From 814be66b98f9bd09a31cc8298633cc230c74d86b Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 26 Apr 2025 16:05:07 +0530 Subject: [PATCH 001/362] update: use new terminologies on path params and local variables. --- app/controllers/api/databases.php | 1806 +++++++++++++++-------------- 1 file changed, 909 insertions(+), 897 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index c5d0e9e754..d3a34f56e8 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -66,11 +66,11 @@ use Utopia\Validator\URL; use Utopia\Validator\WhiteList; /** - * * Create attribute of varying type + * * Create column of varying type * * @param string $databaseId - * @param string $collectionId - * @param Document $attribute + * @param string $tableId + * @param Document $column * @param Response $response * @param Database $dbForProject * @param EventDatabase $queueForDatabase @@ -85,19 +85,19 @@ use Utopia\Validator\WhiteList; * @throws ConflictException * @throws Exception */ -function createAttribute(string $databaseId, string $collectionId, Document $attribute, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): Document +function createColumn(string $databaseId, string $tableId, Document $column, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): Document { - $key = $attribute->getAttribute('key'); - $type = $attribute->getAttribute('type', ''); - $size = $attribute->getAttribute('size', 0); - $required = $attribute->getAttribute('required', true); - $signed = $attribute->getAttribute('signed', true); // integers are signed by default - $array = $attribute->getAttribute('array', false); - $format = $attribute->getAttribute('format', ''); - $formatOptions = $attribute->getAttribute('formatOptions', []); - $filters = $attribute->getAttribute('filters', []); // filters are hidden from the endpoint - $default = $attribute->getAttribute('default'); - $options = $attribute->getAttribute('options', []); + $key = $column->getAttribute('key'); + $type = $column->getAttribute('type', ''); + $size = $column->getAttribute('size', 0); + $required = $column->getAttribute('required', true); + $signed = $column->getAttribute('signed', true); // integers are signed by default + $array = $column->getAttribute('array', false); + $format = $column->getAttribute('format', ''); + $formatOptions = $column->getAttribute('formatOptions', []); + $filters = $column->getAttribute('filters', []); // filters are hidden from the endpoint + $default = $column->getAttribute('default'); + $options = $column->getAttribute('options', []); $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -105,43 +105,43 @@ function createAttribute(string $databaseId, string $collectionId, Document $att throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } if (!empty($format)) { if (!Structure::hasFormat($format, $type)) { - throw new Exception(Exception::ATTRIBUTE_FORMAT_UNSUPPORTED, "Format {$format} not available for {$type} attributes."); + throw new Exception(Exception::ATTRIBUTE_FORMAT_UNSUPPORTED, "Format {$format} not available for {$type} columns."); } } // Must throw here since dbForProject->createAttribute is performed by db worker if ($required && isset($default)) { - throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for required attribute'); + throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for required column'); } if ($array && isset($default)) { - throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for array attributes'); + throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for array columns'); } if ($type === Database::VAR_RELATIONSHIP) { $options['side'] = Database::RELATION_SIDE_PARENT; - $relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection'] ?? ''); - if ($relatedCollection->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND, 'The related collection was not found.'); + $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection'] ?? ''); + if ($relatedTable->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND, 'The related table was not found.'); } } try { - $attribute = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key), + $column = new Document([ + '$id' => ID::custom($db->getInternalId() . '_' . $table->getInternalId() . '_' . $key), 'key' => $key, 'databaseInternalId' => $db->getInternalId(), 'databaseId' => $db->getId(), - 'collectionInternalId' => $collection->getInternalId(), - 'collectionId' => $collectionId, + 'collectionInternalId' => $table->getInternalId(), + 'collectionId' => $tableId, 'type' => $type, 'status' => 'processing', // processing, available, failed, deleting, stuck 'size' => $size, @@ -155,35 +155,35 @@ function createAttribute(string $databaseId, string $collectionId, Document $att 'options' => $options, ]); - $dbForProject->checkAttribute($collection, $attribute); - $attribute = $dbForProject->createDocument('attributes', $attribute); + $dbForProject->checkAttribute($table, $column); + $column = $dbForProject->createDocument('attributes', $column); } catch (DuplicateException) { throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); } catch (LimitException) { throw new Exception(Exception::ATTRIBUTE_LIMIT_EXCEEDED); } catch (\Throwable $e) { - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); throw $e; } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); if ($type === Database::VAR_RELATIONSHIP && $options['twoWay']) { $twoWayKey = $options['twoWayKey']; - $options['relatedCollection'] = $collection->getId(); + $options['relatedCollection'] = $table->getId(); $options['twoWayKey'] = $key; $options['side'] = Database::RELATION_SIDE_CHILD; try { $twoWayAttribute = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $twoWayKey), + '$id' => ID::custom($db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $twoWayKey), 'key' => $twoWayKey, 'databaseInternalId' => $db->getInternalId(), 'databaseId' => $db->getId(), - 'collectionInternalId' => $relatedCollection->getInternalId(), - 'collectionId' => $relatedCollection->getId(), + 'collectionInternalId' => $relatedTable->getInternalId(), + 'collectionId' => $relatedTable->getId(), 'type' => $type, 'status' => 'processing', // processing, available, failed, deleting, stuck 'size' => $size, @@ -197,45 +197,45 @@ function createAttribute(string $databaseId, string $collectionId, Document $att 'options' => $options, ]); - $dbForProject->checkAttribute($relatedCollection, $twoWayAttribute); + $dbForProject->checkAttribute($relatedTable, $twoWayAttribute); $dbForProject->createDocument('attributes', $twoWayAttribute); } catch (DuplicateException) { - $dbForProject->deleteDocument('attributes', $attribute->getId()); + $dbForProject->deleteDocument('attributes', $column->getId()); throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); } catch (LimitException) { - $dbForProject->deleteDocument('attributes', $attribute->getId()); + $dbForProject->deleteDocument('attributes', $column->getId()); throw new Exception(Exception::ATTRIBUTE_LIMIT_EXCEEDED); } catch (\Throwable $e) { - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedCollection->getId()); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedCollection->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); throw $e; } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedCollection->getId()); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedCollection->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); } $queueForDatabase ->setType(DATABASE_TYPE_CREATE_ATTRIBUTE) ->setDatabase($db) - ->setCollection($collection) - ->setDocument($attribute); + ->setCollection($table) + ->setDocument($column); $queueForEvents - ->setContext('collection', $collection) + ->setContext('table', $table) ->setContext('database', $db) ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()) - ->setParam('attributeId', $attribute->getId()); + ->setParam('tableId', $table->getId()) + ->setParam('columnId', $column->getId()); $response->setStatusCode(Response::STATUS_CODE_CREATED); - return $attribute; + return $column; } -function updateAttribute( +function updateColumn( string $databaseId, - string $collectionId, + string $tableId, string $key, Database $dbForProject, Event $queueForEvents, @@ -256,59 +256,59 @@ function updateAttribute( throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $attribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); + $column = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); - if ($attribute->isEmpty()) { + if ($column->isEmpty()) { throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); } - if ($attribute->getAttribute('status') !== 'available') { + if ($column->getAttribute('status') !== 'available') { throw new Exception(Exception::ATTRIBUTE_NOT_AVAILABLE); } - if ($attribute->getAttribute(('type') !== $type)) { + if ($column->getAttribute(('type') !== $type)) { throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID); } - if ($attribute->getAttribute('type') === Database::VAR_STRING && $attribute->getAttribute(('filter') !== $filter)) { + if ($column->getAttribute('type') === Database::VAR_STRING && $column->getAttribute(('filter') !== $filter)) { throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID); } if ($required && isset($default)) { - throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for required attribute'); + throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for required column'); } - if ($attribute->getAttribute('array', false) && isset($default)) { - throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for array attributes'); + if ($column->getAttribute('array', false) && isset($default)) { + throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for array columns'); } - $collectionId = 'database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId(); + $tableId = 'database_' . $db->getInternalId() . '_collection_' . $table->getInternalId(); - $attribute + $column ->setAttribute('default', $default) ->setAttribute('required', $required); if (!empty($size)) { - $attribute->setAttribute('size', $size); + $column->setAttribute('size', $size); } - switch ($attribute->getAttribute('format')) { + switch ($column->getAttribute('format')) { case APP_DATABASE_ATTRIBUTE_INT_RANGE: case APP_DATABASE_ATTRIBUTE_FLOAT_RANGE: - $min ??= $attribute->getAttribute('formatOptions')['min']; - $max ??= $attribute->getAttribute('formatOptions')['max']; + $min ??= $column->getAttribute('formatOptions')['min']; + $max ??= $column->getAttribute('formatOptions')['max']; if ($min > $max) { throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); } - if ($attribute->getAttribute('format') === APP_DATABASE_ATTRIBUTE_INT_RANGE) { + if ($column->getAttribute('format') === APP_DATABASE_ATTRIBUTE_INT_RANGE) { $validator = new Range($min, $max, Database::VAR_INTEGER); } else { $validator = new Range($min, $max, Database::VAR_FLOAT); @@ -326,7 +326,7 @@ function updateAttribute( 'min' => $min, 'max' => $max ]; - $attribute->setAttribute('formatOptions', $options); + $column->setAttribute('formatOptions', $options); break; case APP_DATABASE_ATTRIBUTE_ENUM: @@ -348,44 +348,44 @@ function updateAttribute( 'elements' => $elements ]; - $attribute->setAttribute('formatOptions', $options); + $column->setAttribute('formatOptions', $options); break; } if ($type === Database::VAR_RELATIONSHIP) { - $primaryDocumentOptions = \array_merge($attribute->getAttribute('options', []), $options); - $attribute->setAttribute('options', $primaryDocumentOptions); + $primaryRowOptions = \array_merge($column->getAttribute('options', []), $options); + $column->setAttribute('options', $primaryRowOptions); try { $dbForProject->updateRelationship( - collection: $collectionId, + collection: $tableId, id: $key, newKey: $newKey, - onDelete: $primaryDocumentOptions['onDelete'], + onDelete: $primaryRowOptions['onDelete'], ); } catch (NotFoundException) { throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); } - if ($primaryDocumentOptions['twoWay']) { - $relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $primaryDocumentOptions['relatedCollection']); + if ($primaryRowOptions['twoWay']) { + $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $primaryRowOptions['relatedCollection']); - $relatedAttribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $primaryDocumentOptions['twoWayKey']); + $relatedColumn = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $primaryRowOptions['twoWayKey']); if (!empty($newKey) && $newKey !== $key) { $options['twoWayKey'] = $newKey; } - $relatedOptions = \array_merge($relatedAttribute->getAttribute('options'), $options); - $relatedAttribute->setAttribute('options', $relatedOptions); - $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $primaryDocumentOptions['twoWayKey'], $relatedAttribute); + $relatedOptions = \array_merge($relatedColumn->getAttribute('options'), $options); + $relatedColumn->setAttribute('options', $relatedOptions); + $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $primaryRowOptions['twoWayKey'], $relatedColumn); - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedCollection->getId()); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); } } else { try { $dbForProject->updateAttribute( - collection: $collectionId, + collection: $tableId, id: $key, size: $size, required: $required, @@ -405,44 +405,44 @@ function updateAttribute( } if (!empty($newKey) && $key !== $newKey) { - $originalUid = $attribute->getId(); + $originalUid = $column->getId(); - $attribute - ->setAttribute('$id', ID::custom($db->getInternalId() . '_' . $collection->getInternalId() . '_' . $newKey)) + $column + ->setAttribute('$id', ID::custom($db->getInternalId() . '_' . $table->getInternalId() . '_' . $newKey)) ->setAttribute('key', $newKey); - $dbForProject->updateDocument('attributes', $originalUid, $attribute); + $dbForProject->updateDocument('attributes', $originalUid, $column); /** * @var Document $index */ - foreach ($collection->getAttribute('indexes') as $index) { + foreach ($table->getAttribute('indexes') as $index) { /** - * @var string[] $attributes + * @var string[] $columns */ - $attributes = $index->getAttribute('attributes', []); - $found = \array_search($key, $attributes); + $columns = $index->getAttribute('attributes', []); + $found = \array_search($key, $columns); if ($found !== false) { - $attributes[$found] = $newKey; - $index->setAttribute('attributes', $attributes); + $columns[$found] = $newKey; + $index->setAttribute('attributes', $columns); $dbForProject->updateDocument('indexes', $index->getId(), $index); } } } else { - $attribute = $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key, $attribute); + $column = $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key, $column); } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collection->getId()); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $table->getId()); $queueForEvents - ->setContext('collection', $collection) + ->setContext('table', $table) ->setContext('database', $db) ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()) - ->setParam('attributeId', $attribute->getId()); + ->setParam('tableId', $table->getId()) + ->setParam('columnId', $column->getId()); - return $attribute; + return $column; } App::init() @@ -845,18 +845,19 @@ App::delete('/v1/databases/:databaseId') $response->noContent(); }); -App::post('/v1/databases/:databaseId/collections') - ->desc('Create collection') +App::post('/v1/databases/:databaseId/tables') + ->alias('/v1/databases/:databaseId/collections') + ->desc('Create table') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].collections.[collectionId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'collection.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{response.$id}') + ->label('audits.event', 'table.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') ->label('sdk', new Method( namespace: 'databases', - group: 'collections', - name: 'createCollection', + group: 'tables', + name: 'createTable', description: '/docs/references/databases/create-collection.md', auth: [AuthType::KEY], responses: [ @@ -868,8 +869,8 @@ App::post('/v1/databases/:databaseId/collections') contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') - ->param('name', '', new Text(128), 'Collection name. Max length: 128 chars.') + ->param('tableId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('name', '', new Text(128), 'Table name. Max length: 128 chars.') ->param('permissions', null, 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) @@ -877,7 +878,7 @@ App::post('/v1/databases/:databaseId/collections') ->inject('dbForProject') ->inject('mode') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, Response $response, Database $dbForProject, string $mode, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, Response $response, Database $dbForProject, string $mode, Event $queueForEvents) { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -885,24 +886,24 @@ App::post('/v1/databases/:databaseId/collections') throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collectionId = $collectionId == 'unique()' ? ID::unique() : $collectionId; + $tableId = $tableId == 'unique()' ? ID::unique() : $tableId; // Map aggregate permissions into the multiple permissions they represent. $permissions = Permission::aggregate($permissions) ?? []; try { - $collection = $dbForProject->createDocument('database_' . $database->getInternalId(), new Document([ - '$id' => $collectionId, + $table = $dbForProject->createDocument('database_' . $database->getInternalId(), new Document([ + '$id' => $tableId, 'databaseInternalId' => $database->getInternalId(), 'databaseId' => $databaseId, '$permissions' => $permissions, 'documentSecurity' => $documentSecurity, 'enabled' => $enabled, 'name' => $name, - 'search' => implode(' ', [$collectionId, $name]), + 'search' => implode(' ', [$tableId, $name]), ])); - $dbForProject->createCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), permissions: $permissions, documentSecurity: $documentSecurity); + $dbForProject->createCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), permissions: $permissions, documentSecurity: $documentSecurity); } catch (DuplicateException) { throw new Exception(Exception::COLLECTION_ALREADY_EXISTS); } catch (LimitException) { @@ -912,23 +913,23 @@ App::post('/v1/databases/:databaseId/collections') $queueForEvents ->setContext('database', $database) ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()); + ->setParam('tableId', $table->getId()); $response ->setStatusCode(Response::STATUS_CODE_CREATED) - ->dynamic($collection, Response::MODEL_COLLECTION); + ->dynamic($table, Response::MODEL_COLLECTION); }); -App::get('/v1/databases/:databaseId/collections') - ->alias('/v1/database/collections') - ->desc('List collections') +App::get('/v1/databases/:databaseId/tables') + ->alias('/v1/databases/:databaseId/collections') + ->desc('List tables') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'collections', - name: 'listCollections', + group: 'tables', + name: 'listTables', description: '/docs/references/databases/list-collections.md', auth: [AuthType::KEY], responses: [ @@ -974,11 +975,11 @@ App::get('/v1/databases/:databaseId/collections') throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); } - $collectionId = $cursor->getValue(); - $cursorDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $tableId = $cursor->getValue(); + $cursorDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); if ($cursorDocument->isEmpty()) { - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Collection '{$collectionId}' for the 'cursor' value not found."); + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Table '{$tableId}' for the 'cursor' value not found."); } $cursor->setValue($cursorDocument); @@ -987,27 +988,29 @@ App::get('/v1/databases/:databaseId/collections') $filterQueries = Query::groupByType($queries)['filters']; try { - $collections = $dbForProject->find('database_' . $database->getInternalId(), $queries); + $tables = $dbForProject->find('database_' . $database->getInternalId(), $queries); $total = $dbForProject->count('database_' . $database->getInternalId(), $filterQueries, APP_LIMIT_COUNT); } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); } + + // TODO: collections > tables $response->dynamic(new Document([ - 'collections' => $collections, + 'collections' => $tables, 'total' => $total, ]), Response::MODEL_COLLECTION_LIST); }); -App::get('/v1/databases/:databaseId/collections/:collectionId') - ->alias('/v1/database/collections/:collectionId') - ->desc('Get collection') +App::get('/v1/databases/:databaseId/tables/:tableId') + ->alias('/v1/databases/:databaseId/collections/:tableId') + ->desc('Get table') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'collections', - name: 'getCollection', + group: 'tables', + name: 'getTable', description: '/docs/references/databases/get-collection.md', auth: [AuthType::KEY], responses: [ @@ -1019,11 +1022,10 @@ App::get('/v1/databases/:databaseId/collections/:collectionId') contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('tableId', '', new UID(), 'Table ID.') ->inject('response') ->inject('dbForProject') - ->inject('mode') - ->action(function (string $databaseId, string $collectionId, Response $response, Database $dbForProject, string $mode) { + ->action(function (string $databaseId, string $tableId, Response $response, Database $dbForProject) { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -1031,25 +1033,25 @@ App::get('/v1/databases/:databaseId/collections/:collectionId') throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $response->dynamic($collection, Response::MODEL_COLLECTION); + $response->dynamic($table, Response::MODEL_COLLECTION); }); -App::get('/v1/databases/:databaseId/collections/:collectionId/logs') - ->alias('/v1/database/collections/:collectionId/logs') - ->desc('List collection logs') +App::get('/v1/databases/:databaseId/tables/:tableId/logs') + ->alias('/v1/databases/:databaseId/collections/:tableId/logs') + ->desc('List table logs') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'collections', - name: 'listCollectionLogs', + group: 'tables', + name: 'listTableLogs', description: '/docs/references/databases/get-collection-logs.md', auth: [AuthType::ADMIN], responses: [ @@ -1061,13 +1063,13 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs') contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('tableId', '', new UID(), 'Table ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) ->inject('response') ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->action(function (string $databaseId, string $collectionId, array $queries, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) { + ->action(function (string $databaseId, string $tableId, array $queries, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -1075,10 +1077,10 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs') throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); - $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); + $tableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $tableDocument->getInternalId()); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } @@ -1095,7 +1097,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs') ]); $audit = new Audit($dbForProject); - $resource = 'database/' . $databaseId . '/collection/' . $collectionId; + $resource = 'database/' . $databaseId . '/table/' . $tableId; $logs = $audit->getLogsByResource($resource, $queries); $output = []; @@ -1150,19 +1152,19 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs') }); -App::put('/v1/databases/:databaseId/collections/:collectionId') - ->alias('/v1/database/collections/:collectionId') - ->desc('Update collection') +App::put('/v1/databases/:databaseId/tables/:tableId') + ->alias('/v1/databases/:databaseId/collections/:tableId') + ->desc('Update table') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].update') - ->label('audits.event', 'collection.update') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].update') + ->label('audits.event', 'table.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'collections', - name: 'updateCollection', + group: 'tables', + name: 'updateTable', description: '/docs/references/databases/update-collection.md', auth: [AuthType::KEY], responses: [ @@ -1174,7 +1176,7 @@ App::put('/v1/databases/:databaseId/collections/:collectionId') contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('tableId', '', new UID(), 'Table ID.') ->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.') ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, the current permissions are inherited. [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) @@ -1183,7 +1185,7 @@ App::put('/v1/databases/:databaseId/collections/:collectionId') ->inject('dbForProject') ->inject('mode') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, Response $response, Database $dbForProject, string $mode, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, Response $response, Database $dbForProject, string $mode, Event $queueForEvents) { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -1191,53 +1193,53 @@ App::put('/v1/databases/:databaseId/collections/:collectionId') throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $permissions ??= $collection->getPermissions() ?? []; + $permissions ??= $table->getPermissions() ?? []; // Map aggregate permissions into the multiple permissions they represent. $permissions = Permission::aggregate($permissions); - $enabled ??= $collection->getAttribute('enabled', true); + $enabled ??= $table->getAttribute('enabled', true); - $collection = $dbForProject->updateDocument( + $table = $dbForProject->updateDocument( 'database_' . $database->getInternalId(), - $collectionId, - $collection + $tableId, + $table ->setAttribute('name', $name) ->setAttribute('$permissions', $permissions) ->setAttribute('documentSecurity', $documentSecurity) ->setAttribute('enabled', $enabled) - ->setAttribute('search', \implode(' ', [$collectionId, $name])) + ->setAttribute('search', \implode(' ', [$tableId, $name])) ); - $dbForProject->updateCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $permissions, $documentSecurity); + $dbForProject->updateCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $permissions, $documentSecurity); $queueForEvents ->setContext('database', $database) ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()); + ->setParam('tableId', $table->getId()); - $response->dynamic($collection, Response::MODEL_COLLECTION); + $response->dynamic($table, Response::MODEL_COLLECTION); }); -App::delete('/v1/databases/:databaseId/collections/:collectionId') - ->alias('/v1/database/collections/:collectionId') - ->desc('Delete collection') +App::delete('/v1/databases/:databaseId/tables/:tableId') + ->alias('/v1/databases/:databaseId/collections/:tableId') + ->desc('Delete table') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].delete') - ->label('audits.event', 'collection.delete') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].delete') + ->label('audits.event', 'table.delete') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'collections', - name: 'deleteCollection', + group: 'tables', + name: 'deleteTable', description: '/docs/references/databases/delete-collection.md', auth: [AuthType::KEY], responses: [ @@ -1249,13 +1251,13 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId') contentType: ContentType::NONE )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('tableId', '', new UID(), 'Table ID.') ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') ->inject('mode') - ->action(function (string $databaseId, string $collectionId, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents, string $mode) { + ->action(function (string $databaseId, string $tableId, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents, string $mode) { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -1263,45 +1265,45 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId') throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - if (!$dbForProject->deleteDocument('database_' . $database->getInternalId(), $collectionId)) { + if (!$dbForProject->deleteDocument('database_' . $database->getInternalId(), $tableId)) { throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove collection from DB'); } - $dbForProject->purgeCachedCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId()); + $dbForProject->purgeCachedCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId()); $queueForDatabase ->setType(DATABASE_TYPE_DELETE_COLLECTION) ->setDatabase($database) - ->setCollection($collection); + ->setCollection($table); $queueForEvents ->setContext('database', $database) ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()) - ->setPayload($response->output($collection, Response::MODEL_COLLECTION)); + ->setParam('tableId', $table->getId()) + ->setPayload($response->output($table, Response::MODEL_COLLECTION)); $response->noContent(); }); -App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string') - ->alias('/v1/database/collections/:collectionId/attributes/string') - ->desc('Create string attribute') +App::post('/v1/databases/:databaseId/tables/:tableId/columns/string') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/string') + ->desc('Create string column') ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'attribute.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'createStringAttribute', + group: 'columns', + name: 'createStringColumn', description: '/docs/references/databases/create-string-attribute.md', auth: [AuthType::KEY], responses: [ @@ -1312,18 +1314,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Range::TYPE_INTEGER), 'Attribute size for text attributes, in number of characters.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Text(0, 0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) - ->param('array', false, new Boolean(), 'Is attribute an array?', true) - ->param('encrypt', false, new Boolean(), 'Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.', true) + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Text(0, 0), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) + ->param('encrypt', false, new Boolean(), 'Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, bool $encrypt, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, bool $encrypt, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { // Ensure attribute default is within required size $validator = new Text($size, 0); @@ -1337,7 +1339,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string $filters[] = 'encrypt'; } - $attribute = createAttribute($databaseId, $collectionId, new Document([ + $column = createColumn($databaseId, $tableId, new Document([ 'key' => $key, 'type' => Database::VAR_STRING, 'size' => $size, @@ -1349,22 +1351,22 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string $response ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_STRING); + ->dynamic($column, Response::MODEL_ATTRIBUTE_STRING); }); -App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/email') - ->alias('/v1/database/collections/:collectionId/attributes/email') - ->desc('Create email attribute') +App::post('/v1/databases/:databaseId/tables/:tableId/columns/email') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/email') + ->desc('Create email column') ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'attribute.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'createEmailAttribute', + group: 'columns', + name: 'createEmailColumn', description: '/docs/references/databases/create-email-attribute.md', auth: [AuthType::KEY], responses: [ @@ -1375,18 +1377,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/email' ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Email(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) - ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Email(), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - $attribute = createAttribute($databaseId, $collectionId, new Document([ + $column = createColumn($databaseId, $tableId, new Document([ 'key' => $key, 'type' => Database::VAR_STRING, 'size' => 254, @@ -1398,22 +1400,22 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/email' $response ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_EMAIL); + ->dynamic($column, Response::MODEL_ATTRIBUTE_EMAIL); }); -App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/enum') - ->alias('/v1/database/collections/:collectionId/attributes/enum') - ->desc('Create enum attribute') +App::post('/v1/databases/:databaseId/collections/:tableId/attributes/enum') + ->alias('/v1/database/collections/:tableId/attributes/enum') + ->desc('Create enum column') ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'attribute.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'createEnumAttribute', + group: 'columns', + name: 'createEnumColumn', description: '/docs/references/databases/create-attribute-enum.md', auth: [AuthType::KEY], responses: [ @@ -1424,22 +1426,22 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/enum') ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') ->param('elements', [], new ArrayList(new Text(DATABASE::LENGTH_KEY), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' elements are allowed, each ' . DATABASE::LENGTH_KEY . ' characters long.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Text(0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) - ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Text(0), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, array $elements, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $key, array $elements, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { if (!is_null($default) && !in_array($default, $elements)) { throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Default value not found in elements'); } - $attribute = createAttribute($databaseId, $collectionId, new Document([ + $column = createColumn($databaseId, $tableId, new Document([ 'key' => $key, 'type' => Database::VAR_STRING, 'size' => Database::LENGTH_KEY, @@ -1452,22 +1454,22 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/enum') $response ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_ENUM); + ->dynamic($column, Response::MODEL_ATTRIBUTE_ENUM); }); -App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/ip') - ->alias('/v1/database/collections/:collectionId/attributes/ip') - ->desc('Create IP address attribute') +App::post('/v1/databases/:databaseId/tables/:tableId/columns/ip') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/ip') + ->desc('Create IP address column') ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'attribute.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'createIpAttribute', + group: 'columns', + name: 'createIpColumn', description: '/docs/references/databases/create-ip-attribute.md', auth: [AuthType::KEY], responses: [ @@ -1478,18 +1480,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/ip') ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new IP(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) - ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new IP(), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - $attribute = createAttribute($databaseId, $collectionId, new Document([ + $column = createColumn($databaseId, $tableId, new Document([ 'key' => $key, 'type' => Database::VAR_STRING, 'size' => 39, @@ -1501,22 +1503,22 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/ip') $response ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_IP); + ->dynamic($column, Response::MODEL_ATTRIBUTE_IP); }); -App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/url') - ->alias('/v1/database/collections/:collectionId/attributes/url') - ->desc('Create URL attribute') +App::post('/v1/databases/:databaseId/tables/:tableId/columns/url') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/url') + ->desc('Create URL column') ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'attribute.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'createUrlAttribute', + group: 'columns', + name: 'createUrlColumn', description: '/docs/references/databases/create-url-attribute.md', auth: [AuthType::KEY], responses: [ @@ -1527,18 +1529,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/url') ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new URL(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) - ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new URL(), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - $attribute = createAttribute($databaseId, $collectionId, new Document([ + $column = createColumn($databaseId, $tableId, new Document([ 'key' => $key, 'type' => Database::VAR_STRING, 'size' => 2000, @@ -1550,22 +1552,22 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/url') $response ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_URL); + ->dynamic($column, Response::MODEL_ATTRIBUTE_URL); }); -App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/integer') - ->alias('/v1/database/collections/:collectionId/attributes/integer') - ->desc('Create integer attribute') +App::post('/v1/databases/:databaseId/tables/:tableId/columns/integer') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/integer') + ->desc('Create integer column') ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'attribute.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'createIntegerAttribute', + group: 'columns', + name: 'createIntegerColumn', description: '/docs/references/databases/create-integer-attribute.md', auth: [AuthType::KEY], responses: [ @@ -1576,18 +1578,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/intege ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') ->param('min', null, new Integer(), 'Minimum value to enforce on new documents', true) ->param('max', null, new Integer(), 'Maximum value to enforce on new documents', true) - ->param('default', null, new Integer(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) - ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->param('default', null, new Integer(), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { // Ensure attribute default is within range $min ??= PHP_INT_MIN; @@ -1605,7 +1607,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/intege $size = $max > 2147483647 ? 8 : 4; // Automatically create BigInt depending on max value - $attribute = createAttribute($databaseId, $collectionId, new Document([ + $column = createColumn($databaseId, $tableId, new Document([ 'key' => $key, 'type' => Database::VAR_INTEGER, 'size' => $size, @@ -1619,31 +1621,31 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/intege ], ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - $formatOptions = $attribute->getAttribute('formatOptions', []); + $formatOptions = $column->getAttribute('formatOptions', []); if (!empty($formatOptions)) { - $attribute->setAttribute('min', \intval($formatOptions['min'])); - $attribute->setAttribute('max', \intval($formatOptions['max'])); + $column->setAttribute('min', \intval($formatOptions['min'])); + $column->setAttribute('max', \intval($formatOptions['max'])); } $response ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_INTEGER); + ->dynamic($column, Response::MODEL_ATTRIBUTE_INTEGER); }); -App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float') - ->alias('/v1/database/collections/:collectionId/attributes/float') - ->desc('Create float attribute') +App::post('/v1/databases/:databaseId/tables/:tableId/columns/float') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/float') + ->desc('Create float column') ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'attribute.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'createFloatAttribute', + group: 'columns', + name: 'createFloatColumn', description: '/docs/references/databases/create-float-attribute.md', auth: [AuthType::KEY], responses: [ @@ -1654,18 +1656,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float' ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') ->param('min', null, new FloatValidator(), 'Minimum value to enforce on new documents', true) ->param('max', null, new FloatValidator(), 'Maximum value to enforce on new documents', true) - ->param('default', null, new FloatValidator(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) - ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->param('default', null, new FloatValidator(), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { // Ensure attribute default is within range $min ??= -PHP_FLOAT_MAX; @@ -1681,7 +1683,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float' throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); } - $attribute = createAttribute($databaseId, $collectionId, new Document([ + $column = createColumn($databaseId, $tableId, new Document([ 'key' => $key, 'type' => Database::VAR_FLOAT, 'required' => $required, @@ -1695,31 +1697,31 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float' ], ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - $formatOptions = $attribute->getAttribute('formatOptions', []); + $formatOptions = $column->getAttribute('formatOptions', []); if (!empty($formatOptions)) { - $attribute->setAttribute('min', \floatval($formatOptions['min'])); - $attribute->setAttribute('max', \floatval($formatOptions['max'])); + $column->setAttribute('min', \floatval($formatOptions['min'])); + $column->setAttribute('max', \floatval($formatOptions['max'])); } $response ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_FLOAT); + ->dynamic($column, Response::MODEL_ATTRIBUTE_FLOAT); }); -App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/boolean') - ->alias('/v1/database/collections/:collectionId/attributes/boolean') - ->desc('Create boolean attribute') +App::post('/v1/databases/:databaseId/tables/:tableId/columns/boolean') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/boolean') + ->desc('Create boolean column') ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'attribute.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'createBooleanAttribute', + group: 'columns', + name: 'createBooleanColumn', description: '/docs/references/databases/create-boolean-attribute.md', auth: [AuthType::KEY], responses: [ @@ -1730,18 +1732,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/boolea ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Boolean(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) - ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Boolean(), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?bool $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - $attribute = createAttribute($databaseId, $collectionId, new Document([ + $column = createColumn($databaseId, $tableId, new Document([ 'key' => $key, 'type' => Database::VAR_BOOLEAN, 'size' => 0, @@ -1752,22 +1754,22 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/boolea $response ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_BOOLEAN); + ->dynamic($column, Response::MODEL_ATTRIBUTE_BOOLEAN); }); -App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/datetime') - ->alias('/v1/database/collections/:collectionId/attributes/datetime') - ->desc('Create datetime attribute') +App::post('/v1/databases/:databaseId/tables/:tableId/columns/datetime') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/datetime') + ->desc('Create datetime column') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'attribute.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'createDatetimeAttribute', + group: 'columns', + name: 'createDatetimeColumn', description: '/docs/references/databases/create-datetime-attribute.md', auth: [AuthType::KEY], responses: [ @@ -1778,20 +1780,20 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/dateti ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, fn (Database $dbForProject) => new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime()), 'Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.', true, ['dbForProject']) - ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, fn (Database $dbForProject) => new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime()), 'Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.', true, ['dbForProject']) + ->param('array', false, new Boolean(), 'Is column an array?', true) ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { $filters[] = 'datetime'; - $attribute = createAttribute($databaseId, $collectionId, new Document([ + $column = createColumn($databaseId, $tableId, new Document([ 'key' => $key, 'type' => Database::VAR_DATETIME, 'size' => 0, @@ -1803,22 +1805,22 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/dateti $response ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_DATETIME); + ->dynamic($column, Response::MODEL_ATTRIBUTE_DATETIME); }); -App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relationship') - ->alias('/v1/database/collections/:collectionId/attributes/relationship') - ->desc('Create relationship attribute') +App::post('/v1/databases/:databaseId/tables/:tableId/columns/relationship') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/relationship') + ->desc('Create relationship column') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'attribute.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'createRelationshipAttribute', + group: 'columns', + name: 'createRelationshipColumn', description: '/docs/references/databases/create-relationship-attribute.md', auth: [AuthType::KEY], responses: [ @@ -1829,12 +1831,12 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('relatedCollectionId', '', new UID(), 'Related Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('relatedTableId', '', new UID(), 'Related Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('type', '', new WhiteList([Database::RELATION_ONE_TO_ONE, Database::RELATION_MANY_TO_ONE, Database::RELATION_MANY_TO_MANY, Database::RELATION_ONE_TO_MANY], true), 'Relation type') ->param('twoWay', false, new Boolean(), 'Is Two Way?', true) - ->param('key', null, new Key(), 'Attribute Key.', true) - ->param('twoWayKey', null, new Key(), 'Two Way Attribute Key.', true) + ->param('key', null, new Key(), 'Column Key.', true) + ->param('twoWayKey', null, new Key(), 'Two Way Column Key.', true) ->param('onDelete', Database::RELATION_MUTATE_RESTRICT, new WhiteList([Database::RELATION_MUTATE_CASCADE, Database::RELATION_MUTATE_RESTRICT, Database::RELATION_MUTATE_SET_NULL], true), 'Constraints option', true) ->inject('response') ->inject('dbForProject') @@ -1842,8 +1844,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati ->inject('queueForEvents') ->action(function ( string $databaseId, - string $collectionId, - string $relatedCollectionId, + string $tableId, + string $relatedTableId, string $type, bool $twoWay, ?string $key, @@ -1854,8 +1856,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati EventDatabase $queueForDatabase, Event $queueForEvents ) { - $key ??= $relatedCollectionId; - $twoWayKey ??= $collectionId; + $key ??= $relatedTableId; + $twoWayKey ??= $tableId; $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -1863,34 +1865,34 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); - $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId()); + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId()); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $relatedCollectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId); - $relatedCollection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $relatedCollectionDocument->getInternalId()); + $relatedTableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId); + $relatedTable = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $relatedTableDocument->getInternalId()); - if ($relatedCollection->isEmpty()) { + if ($relatedTable->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $attributes = $collection->getAttribute('attributes', []); - /** @var Document[] $attributes */ - foreach ($attributes as $attribute) { - if ($attribute->getAttribute('type') !== Database::VAR_RELATIONSHIP) { + $columns = $table->getAttribute('attributes', []); + /** @var Document[] $columns */ + foreach ($columns as $column) { + if ($column->getAttribute('type') !== Database::VAR_RELATIONSHIP) { continue; } - if (\strtolower($attribute->getId()) === \strtolower($key)) { + if (\strtolower($column->getId()) === \strtolower($key)) { throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); } if ( - \strtolower($attribute->getAttribute('options')['twoWayKey']) === \strtolower($twoWayKey) && - $attribute->getAttribute('options')['relatedCollection'] === $relatedCollection->getId() + \strtolower($column->getAttribute('options')['twoWayKey']) === \strtolower($twoWayKey) && + $column->getAttribute('options')['relatedCollection'] === $relatedTable->getId() ) { // Console should provide a unique twoWayKey input! throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.'); @@ -1898,16 +1900,16 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati if ( $type === Database::RELATION_MANY_TO_MANY && - $attribute->getAttribute('options')['relationType'] === Database::RELATION_MANY_TO_MANY && - $attribute->getAttribute('options')['relatedCollection'] === $relatedCollection->getId() + $column->getAttribute('options')['relationType'] === Database::RELATION_MANY_TO_MANY && + $column->getAttribute('options')['relatedCollection'] === $relatedTable->getId() ) { - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Creating more than one "manyToMany" relationship on the same collection is currently not permitted.'); + throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Creating more than one "manyToMany" relationship on the same table is currently not permitted.'); } } - $attribute = createAttribute( + $column = createColumn( $databaseId, - $collectionId, + $tableId, new Document([ 'key' => $key, 'type' => Database::VAR_RELATIONSHIP, @@ -1917,7 +1919,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati 'array' => false, 'filters' => [], 'options' => [ - 'relatedCollection' => $relatedCollectionId, + 'relatedCollection' => $relatedTableId, 'relationType' => $type, 'twoWay' => $twoWay, 'twoWayKey' => $twoWayKey, @@ -1930,27 +1932,27 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati $queueForEvents ); - $options = $attribute->getAttribute('options', []); + $options = $column->getAttribute('options', []); foreach ($options as $key => $option) { - $attribute->setAttribute($key, $option); + $column->setAttribute($key, $option); } $response ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_RELATIONSHIP); + ->dynamic($column, Response::MODEL_ATTRIBUTE_RELATIONSHIP); }); -App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') - ->alias('/v1/database/collections/:collectionId/attributes') - ->desc('List attributes') +App::get('/v1/databases/:databaseId/tables/:tableId/columns') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes') + ->desc('List columns') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'listAttributes', + group: 'columns', + name: 'listColumns', description: '/docs/references/databases/list-attributes.md', auth: [AuthType::KEY], responses: [ @@ -1961,11 +1963,11 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('queries', [], new Attributes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Attributes::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') - ->action(function (string $databaseId, string $collectionId, array $queries, Response $response, Database $dbForProject) { + ->action(function (string $databaseId, string $tableId, array $queries, Response $response, Database $dbForProject) { /** @var Document $database */ $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -1973,9 +1975,9 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } @@ -1984,7 +1986,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') \array_push( $queries, Query::equal('databaseInternalId', [$database->getInternalId()]), - Query::equal('collectionInternalId', [$collection->getInternalId()]), + Query::equal('collectionInternalId', [$table->getInternalId()]), ); /** @@ -2002,16 +2004,16 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); } - $attributeId = $cursor->getValue(); + $columnId = $cursor->getValue(); $cursorDocument = Authorization::skip(fn () => $dbForProject->find('attributes', [ Query::equal('databaseInternalId', [$database->getInternalId()]), - Query::equal('collectionInternalId', [$collection->getInternalId()]), - Query::equal('key', [$attributeId]), + Query::equal('collectionInternalId', [$table->getInternalId()]), + Query::equal('key', [$columnId]), Query::limit(1), ])); if (empty($cursorDocument) || $cursorDocument[0]->isEmpty()) { - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Attribute '{$attributeId}' for the 'cursor' value not found."); + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Column '{$columnId}' for the 'cursor' value not found."); } $cursor->setValue($cursorDocument[0]); @@ -2019,28 +2021,28 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') $filters = Query::groupByType($queries)['filters']; try { - $attributes = $dbForProject->find('attributes', $queries); + $columns = $dbForProject->find('attributes', $queries); $total = $dbForProject->count('attributes', $filters, APP_LIMIT_COUNT); } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); } $response->dynamic(new Document([ - 'attributes' => $attributes, + 'attributes' => $columns, 'total' => $total, ]), Response::MODEL_ATTRIBUTE_LIST); }); -App::get('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') - ->alias('/v1/database/collections/:collectionId/attributes/:key') - ->desc('Get attribute') +App::get('/v1/databases/:databaseId/tables/:tableId/columns/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/:key') + ->desc('Get column') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'getAttribute', + group: 'columns', + name: 'getColumn', description: '/docs/references/databases/get-attribute.md', auth: [AuthType::KEY], responses: [ @@ -2062,11 +2064,11 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') ->inject('response') ->inject('dbForProject') - ->action(function (string $databaseId, string $collectionId, string $key, Response $response, Database $dbForProject) { + ->action(function (string $databaseId, string $tableId, string $key, Response $response, Database $dbForProject) { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -2074,25 +2076,25 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $attribute = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); + $column = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $table->getInternalId() . '_' . $key); - if ($attribute->isEmpty()) { + if ($column->isEmpty()) { throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); } // Select response model based on type and format - $type = $attribute->getAttribute('type'); - $format = $attribute->getAttribute('format'); - $options = $attribute->getAttribute('options', []); + $type = $column->getAttribute('type'); + $format = $column->getAttribute('format'); + $options = $column->getAttribute('options', []); foreach ($options as $key => $option) { - $attribute->setAttribute($key, $option); + $column->setAttribute($key, $option); } $model = match ($type) { @@ -2111,21 +2113,22 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') default => Response::MODEL_ATTRIBUTE, }; - $response->dynamic($attribute, $model); + $response->dynamic($column, $model); }); -App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/string/:key') - ->desc('Update string attribute') +App::patch('/v1/databases/:databaseId/tables/:tableId/columns/string/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/string/:key') + ->desc('Update string column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') - ->label('audits.event', 'attribute.update') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'updateStringAttribute', + group: 'columns', + name: 'updateStringColumn', description: '/docs/references/databases/update-string-attribute.md', auth: [AuthType::KEY], responses: [ @@ -2137,20 +2140,20 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/strin contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Nullable(new Text(0, 0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Nullable(new Text(0, 0)), 'Default value for column when not provided. Cannot be set when column is required.') ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Range::TYPE_INTEGER), 'Maximum size of the string attribute.', true) - ->param('newKey', null, new Key(), 'New attribute key.', true) + ->param('newKey', null, new Key(), 'New Column Key.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?int $size, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?int $size, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $attribute = updateAttribute( + $column = updateColumn( databaseId: $databaseId, - collectionId: $collectionId, + tableId: $tableId, key: $key, dbForProject: $dbForProject, queueForEvents: $queueForEvents, @@ -2163,21 +2166,22 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/strin $response ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_STRING); + ->dynamic($column, Response::MODEL_ATTRIBUTE_STRING); }); -App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/email/:key') - ->desc('Update email attribute') +App::patch('/v1/databases/:databaseId/tables/:tableId/columns/email/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/email/:key') + ->desc('Update email column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') - ->label('audits.event', 'attribute.update') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'updateEmailAttribute', + group: 'columns', + name: 'updateEmailColumn', description: '/docs/references/databases/update-email-attribute.md', auth: [AuthType::KEY], responses: [ @@ -2189,18 +2193,18 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/email contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Nullable(new Email()), 'Default value for attribute when not provided. Cannot be set when attribute is required.') - ->param('newKey', null, new Key(), 'New attribute key.', true) + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Nullable(new Email()), 'Default value for column when not provided. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $attribute = updateAttribute( + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { + $column = updateColumn( databaseId: $databaseId, - collectionId: $collectionId, + tableId: $tableId, key: $key, dbForProject: $dbForProject, queueForEvents: $queueForEvents, @@ -2213,21 +2217,22 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/email $response ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_EMAIL); + ->dynamic($column, Response::MODEL_ATTRIBUTE_EMAIL); }); -App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/enum/:key') - ->desc('Update enum attribute') +App::patch('/v1/databases/:databaseId/tables/:tableId/columns/enum/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/enum/:key') + ->desc('Update enum column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') - ->label('audits.event', 'attribute.update') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'updateEnumAttribute', + group: 'columns', + name: 'updateEnumColumn', description: '/docs/references/databases/update-enum-attribute.md', auth: [AuthType::KEY], responses: [ @@ -2239,19 +2244,19 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/enum/ contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') ->param('elements', null, new ArrayList(new Text(DATABASE::LENGTH_KEY), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' elements are allowed, each ' . DATABASE::LENGTH_KEY . ' characters long.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Nullable(new Text(0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.') - ->param('newKey', null, new Key(), 'New attribute key.', true) + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Nullable(new Text(0)), 'Default value for column when not provided. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?array $elements, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $attribute = updateAttribute( + ->action(function (string $databaseId, string $tableId, string $key, ?array $elements, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { + $column = updateColumn( databaseId: $databaseId, - collectionId: $collectionId, + tableId: $tableId, key: $key, dbForProject: $dbForProject, queueForEvents: $queueForEvents, @@ -2265,21 +2270,22 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/enum/ $response ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_ENUM); + ->dynamic($column, Response::MODEL_ATTRIBUTE_ENUM); }); -App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/ip/:key') - ->desc('Update IP address attribute') +App::patch('/v1/databases/:databaseId/tables/:tableId/columns/ip/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/ip/:key') + ->desc('Update IP address column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') - ->label('audits.event', 'attribute.update') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'updateIpAttribute', + group: 'columns', + name: 'updateIpColumn', description: '/docs/references/databases/update-ip-attribute.md', auth: [AuthType::KEY], responses: [ @@ -2291,18 +2297,18 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/ip/:k contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Nullable(new IP()), 'Default value for attribute when not provided. Cannot be set when attribute is required.') - ->param('newKey', null, new Key(), 'New attribute key.', true) + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Nullable(new IP()), 'Default value for column when not provided. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $attribute = updateAttribute( + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { + $column = updateColumn( databaseId: $databaseId, - collectionId: $collectionId, + tableId: $tableId, key: $key, dbForProject: $dbForProject, queueForEvents: $queueForEvents, @@ -2315,21 +2321,22 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/ip/:k $response ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_IP); + ->dynamic($column, Response::MODEL_ATTRIBUTE_IP); }); -App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/url/:key') - ->desc('Update URL attribute') +App::patch('/v1/databases/:databaseId/tables/:tableId/columns/url/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/url/:key') + ->desc('Update URL column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') - ->label('audits.event', 'attribute.update') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'updateUrlAttribute', + group: 'columns', + name: 'updateUrlColumn', description: '/docs/references/databases/update-url-attribute.md', auth: [AuthType::KEY], responses: [ @@ -2341,18 +2348,18 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/url/: contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Nullable(new URL()), 'Default value for attribute when not provided. Cannot be set when attribute is required.') - ->param('newKey', null, new Key(), 'New attribute key.', true) + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Nullable(new URL()), 'Default value for column when not provided. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $attribute = updateAttribute( + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { + $column = updateColumn( databaseId: $databaseId, - collectionId: $collectionId, + tableId: $tableId, key: $key, dbForProject: $dbForProject, queueForEvents: $queueForEvents, @@ -2365,21 +2372,22 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/url/: $response ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_URL); + ->dynamic($column, Response::MODEL_ATTRIBUTE_URL); }); -App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/integer/:key') - ->desc('Update integer attribute') +App::patch('/v1/databases/:databaseId/tables/:tableId/columns/integer/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/integer/:key') + ->desc('Update integer column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') - ->label('audits.event', 'attribute.update') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'updateIntegerAttribute', + group: 'columns', + name: 'updateIntegerColumn', description: '/docs/references/databases/update-integer-attribute.md', auth: [AuthType::KEY], responses: [ @@ -2391,20 +2399,20 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/integ contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') ->param('min', null, new Integer(), 'Minimum value to enforce on new documents', true) ->param('max', null, new Integer(), 'Maximum value to enforce on new documents', true) - ->param('default', null, new Nullable(new Integer()), 'Default value for attribute when not provided. Cannot be set when attribute is required.') - ->param('newKey', null, new Key(), 'New attribute key.', true) + ->param('default', null, new Nullable(new Integer()), 'Default value for column when not provided. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $attribute = updateAttribute( + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { + $column = updateColumn( databaseId: $databaseId, - collectionId: $collectionId, + tableId: $tableId, key: $key, dbForProject: $dbForProject, queueForEvents: $queueForEvents, @@ -2416,30 +2424,31 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/integ newKey: $newKey ); - $formatOptions = $attribute->getAttribute('formatOptions', []); + $formatOptions = $column->getAttribute('formatOptions', []); if (!empty($formatOptions)) { - $attribute->setAttribute('min', \intval($formatOptions['min'])); - $attribute->setAttribute('max', \intval($formatOptions['max'])); + $column->setAttribute('min', \intval($formatOptions['min'])); + $column->setAttribute('max', \intval($formatOptions['max'])); } $response ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_INTEGER); + ->dynamic($column, Response::MODEL_ATTRIBUTE_INTEGER); }); -App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/float/:key') - ->desc('Update float attribute') +App::patch('/v1/databases/:databaseId/tables/:tableId/columns/float/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/float/:key') + ->desc('Update float column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') - ->label('audits.event', 'attribute.update') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'updateFloatAttribute', + group: 'columns', + name: 'updateFloatColumn', description: '/docs/references/databases/update-float-attribute.md', auth: [AuthType::KEY], responses: [ @@ -2451,20 +2460,20 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/float contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') ->param('min', null, new FloatValidator(), 'Minimum value to enforce on new documents', true) ->param('max', null, new FloatValidator(), 'Maximum value to enforce on new documents', true) - ->param('default', null, new Nullable(new FloatValidator()), 'Default value for attribute when not provided. Cannot be set when attribute is required.') - ->param('newKey', null, new Key(), 'New attribute key.', true) + ->param('default', null, new Nullable(new FloatValidator()), 'Default value for column when not provided. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $attribute = updateAttribute( + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { + $column = updateColumn( databaseId: $databaseId, - collectionId: $collectionId, + tableId: $tableId, key: $key, dbForProject: $dbForProject, queueForEvents: $queueForEvents, @@ -2476,30 +2485,31 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/float newKey: $newKey ); - $formatOptions = $attribute->getAttribute('formatOptions', []); + $formatOptions = $column->getAttribute('formatOptions', []); if (!empty($formatOptions)) { - $attribute->setAttribute('min', \floatval($formatOptions['min'])); - $attribute->setAttribute('max', \floatval($formatOptions['max'])); + $column->setAttribute('min', \floatval($formatOptions['min'])); + $column->setAttribute('max', \floatval($formatOptions['max'])); } $response ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_FLOAT); + ->dynamic($column, Response::MODEL_ATTRIBUTE_FLOAT); }); -App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/boolean/:key') - ->desc('Update boolean attribute') +App::patch('/v1/databases/:databaseId/tables/:tableId/columns/boolean/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/boolean/:key') + ->desc('Update boolean column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') - ->label('audits.event', 'attribute.update') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'updateBooleanAttribute', + group: 'columns', + name: 'updateBooleanColumn', description: '/docs/references/databases/update-boolean-attribute.md', auth: [AuthType::KEY], responses: [ @@ -2511,18 +2521,18 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/boole contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, new Nullable(new Boolean()), 'Default value for attribute when not provided. Cannot be set when attribute is required.') - ->param('newKey', null, new Key(), 'New attribute key.', true) + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Nullable(new Boolean()), 'Default value for column when not provided. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?bool $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $attribute = updateAttribute( + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { + $column = updateColumn( databaseId: $databaseId, - collectionId: $collectionId, + tableId: $tableId, key: $key, dbForProject: $dbForProject, queueForEvents: $queueForEvents, @@ -2534,21 +2544,22 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/boole $response ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_BOOLEAN); + ->dynamic($column, Response::MODEL_ATTRIBUTE_BOOLEAN); }); -App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/datetime/:key') - ->desc('Update dateTime attribute') +App::patch('/v1/databases/:databaseId/tables/:tableId/columns/datetime/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/datetime/:key') + ->desc('Update dateTime column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') - ->label('audits.event', 'attribute.update') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'updateDatetimeAttribute', + group: 'columns', + name: 'updateDatetimeColumn', description: '/docs/references/databases/update-datetime-attribute.md', auth: [AuthType::KEY], responses: [ @@ -2560,18 +2571,18 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/datet contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') - ->param('required', null, new Boolean(), 'Is attribute required?') - ->param('default', null, fn (Database $dbForProject) => new Nullable(new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime())), 'Default value for attribute when not provided. Cannot be set when attribute is required.', injections: ['dbForProject']) - ->param('newKey', null, new Key(), 'New attribute key.', true) + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, fn (Database $dbForProject) => new Nullable(new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime())), 'Default value for column when not provided. Cannot be set when column is required.', injections: ['dbForProject']) + ->param('newKey', null, new Key(), 'New Column Key.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $attribute = updateAttribute( + ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { + $column = updateColumn( databaseId: $databaseId, - collectionId: $collectionId, + tableId: $tableId, key: $key, dbForProject: $dbForProject, queueForEvents: $queueForEvents, @@ -2583,21 +2594,22 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/datet $response ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_DATETIME); + ->dynamic($column, Response::MODEL_ATTRIBUTE_DATETIME); }); -App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/relationship') - ->desc('Update relationship attribute') +App::patch('/v1/databases/:databaseId/tables/:tableId/columns/:key/relationship') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/:key/relationship') + ->desc('Update relationship column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') - ->label('audits.event', 'attribute.update') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'updateRelationshipAttribute', + group: 'columns', + name: 'updateRelationshipColumn', description: '/docs/references/databases/update-relationship-attribute.md', auth: [AuthType::KEY], responses: [ @@ -2609,16 +2621,16 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/ contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') ->param('onDelete', null, new WhiteList([Database::RELATION_MUTATE_CASCADE, Database::RELATION_MUTATE_RESTRICT, Database::RELATION_MUTATE_SET_NULL], true), 'Constraints option', true) - ->param('newKey', null, new Key(), 'New attribute key.', true) + ->param('newKey', null, new Key(), 'New Column Key.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') ->action(function ( string $databaseId, - string $collectionId, + string $tableId, string $key, ?string $onDelete, ?string $newKey, @@ -2626,9 +2638,9 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/ Database $dbForProject, Event $queueForEvents ) { - $attribute = updateAttribute( + $column = updateColumn( $databaseId, - $collectionId, + $tableId, $key, $dbForProject, $queueForEvents, @@ -2640,30 +2652,30 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/ newKey: $newKey ); - $options = $attribute->getAttribute('options', []); + $options = $column->getAttribute('options', []); foreach ($options as $key => $option) { - $attribute->setAttribute($key, $option); + $column->setAttribute($key, $option); } $response ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($attribute, Response::MODEL_ATTRIBUTE_RELATIONSHIP); + ->dynamic($column, Response::MODEL_ATTRIBUTE_RELATIONSHIP); }); -App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') - ->alias('/v1/database/collections/:collectionId/attributes/:key') - ->desc('Delete attribute') +App::delete('/v1/databases/:databaseId/tables/:tableId/columns/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/:key') + ->desc('Delete column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') - ->label('audits.event', 'attribute.delete') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.delete') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'deleteAttribute', + group: 'columns', + name: 'deleteColumn', description: '/docs/references/databases/delete-attribute.md', auth: [AuthType::KEY], responses: [ @@ -2675,29 +2687,29 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key contentType: ContentType::NONE )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Attribute Key.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $collectionId, string $key, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents, StatsUsage $queueForStatsUsage) { + ->action(function (string $databaseId, string $tableId, string $key, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents, StatsUsage $queueForStatsUsage) { $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($db->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $attribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); + $column = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); - if ($attribute->isEmpty()) { + if ($column->isEmpty()) { throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); } @@ -2705,55 +2717,55 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key * Check index dependency */ $validator = new IndexDependencyValidator( - $collection->getAttribute('indexes'), + $table->getAttribute('indexes'), $dbForProject->getAdapter()->getSupportForCastIndexArray(), ); - if (! $validator->isValid($attribute)) { + if (! $validator->isValid($column)) { throw new Exception(Exception::INDEX_DEPENDENCY); } // Only update status if removing available attribute - if ($attribute->getAttribute('status') === 'available') { - $attribute = $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'deleting')); + if ($column->getAttribute('status') === 'available') { + $column = $dbForProject->updateDocument('attributes', $column->getId(), $column->setAttribute('status', 'deleting')); } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); - if ($attribute->getAttribute('type') === Database::VAR_RELATIONSHIP) { - $options = $attribute->getAttribute('options'); + if ($column->getAttribute('type') === Database::VAR_RELATIONSHIP) { + $options = $column->getAttribute('options'); if ($options['twoWay']) { - $relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection']); + $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection']); - if ($relatedCollection->isEmpty()) { + if ($relatedTable->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $relatedAttribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $options['twoWayKey']); + $relatedColumn = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $options['twoWayKey']); - if ($relatedAttribute->isEmpty()) { + if ($relatedColumn->isEmpty()) { throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); } - if ($relatedAttribute->getAttribute('status') === 'available') { - $dbForProject->updateDocument('attributes', $relatedAttribute->getId(), $relatedAttribute->setAttribute('status', 'deleting')); + if ($relatedColumn->getAttribute('status') === 'available') { + $dbForProject->updateDocument('attributes', $relatedColumn->getId(), $relatedColumn->setAttribute('status', 'deleting')); } $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $options['relatedCollection']); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedCollection->getInternalId()); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); } } $queueForDatabase ->setType(DATABASE_TYPE_DELETE_ATTRIBUTE) - ->setCollection($collection) + ->setCollection($table) ->setDatabase($db) - ->setDocument($attribute); + ->setDocument($column); // Select response model based on type and format - $type = $attribute->getAttribute('type'); - $format = $attribute->getAttribute('format'); + $type = $column->getAttribute('type'); + $format = $column->getAttribute('format'); $model = match ($type) { Database::VAR_BOOLEAN => Response::MODEL_ATTRIBUTE_BOOLEAN, @@ -2773,27 +2785,27 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key $queueForEvents ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()) - ->setParam('attributeId', $attribute->getId()) - ->setContext('collection', $collection) + ->setParam('tableId', $table->getId()) + ->setParam('columnId', $column->getId()) + ->setContext('table', $table) ->setContext('database', $db) - ->setPayload($response->output($attribute, $model)); + ->setPayload($response->output($column, $model)); $response->noContent(); }); -App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') - ->alias('/v1/database/collections/:collectionId/indexes') +App::post('/v1/databases/:databaseId/tables/:tableId/indexes') + ->alias('/v1/databases/:databaseId/collections/:tableId/indexes') ->desc('Create index') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].collections.[collectionId].indexes.[indexId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'index.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'collections', + group: 'tables', name: 'createIndex', description: '/docs/references/databases/create-index.md', auth: [AuthType::KEY], @@ -2806,16 +2818,16 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', null, new Key(), 'Index Key.') ->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE]), 'Index type.') - ->param('attributes', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of attributes to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' attributes are allowed, each 32 characters long.') + ->param('columns', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of columns to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' columns are allowed, each 32 characters long.') ->param('orders', [], new ArrayList(new WhiteList(['ASC', 'DESC'], false, Database::VAR_STRING), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index orders. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' orders are allowed.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, string $type, array $attributes, array $orders, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $key, string $type, array $columns, array $orders, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -2823,14 +2835,14 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } $count = $dbForProject->count('indexes', [ - Query::equal('collectionInternalId', [$collection->getInternalId()]), + Query::equal('collectionInternalId', [$table->getInternalId()]), Query::equal('databaseInternalId', [$db->getInternalId()]) ], 61); @@ -2841,9 +2853,9 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') } // Convert Document[] to array of attribute metadata - $oldAttributes = \array_map(fn ($a) => $a->getArrayCopy(), $collection->getAttribute('attributes')); + $oldColumns = \array_map(fn ($a) => $a->getArrayCopy(), $table->getAttribute('attributes')); - $oldAttributes[] = [ + $oldColumns[] = [ 'key' => '$id', 'type' => Database::VAR_STRING, 'status' => 'available', @@ -2853,7 +2865,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') 'size' => Database::LENGTH_KEY ]; - $oldAttributes[] = [ + $oldColumns[] = [ 'key' => '$createdAt', 'type' => Database::VAR_DATETIME, 'status' => 'available', @@ -2864,7 +2876,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') 'size' => 0 ]; - $oldAttributes[] = [ + $oldColumns[] = [ 'key' => '$updatedAt', 'type' => Database::VAR_DATETIME, 'status' => 'available', @@ -2878,51 +2890,51 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') // lengths hidden by default $lengths = []; - foreach ($attributes as $i => $attribute) { + foreach ($columns as $i => $column) { // find attribute metadata in collection document - $attributeIndex = \array_search($attribute, array_column($oldAttributes, 'key')); + $columnIndex = \array_search($column, array_column($oldColumns, 'key')); - if ($attributeIndex === false) { - throw new Exception(Exception::ATTRIBUTE_UNKNOWN, 'Unknown attribute: ' . $attribute . '. Verify the attribute name or create the attribute.'); + if ($columnIndex === false) { + throw new Exception(Exception::ATTRIBUTE_UNKNOWN, 'Unknown column: ' . $column . '. Verify the column name or create the column.'); } - $attributeStatus = $oldAttributes[$attributeIndex]['status']; - $attributeType = $oldAttributes[$attributeIndex]['type']; - $attributeArray = $oldAttributes[$attributeIndex]['array'] ?? false; + $columnStatus = $oldColumns[$columnIndex]['status']; + $columnType = $oldColumns[$columnIndex]['type']; + $columnArray = $oldColumns[$columnIndex]['array'] ?? false; - if ($attributeType === Database::VAR_RELATIONSHIP) { - throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID, 'Cannot create an index for a relationship attribute: ' . $oldAttributes[$attributeIndex]['key']); + if ($columnType === Database::VAR_RELATIONSHIP) { + throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID, 'Cannot create an index for a relationship column: ' . $oldColumns[$columnIndex]['key']); } // ensure attribute is available - if ($attributeStatus !== 'available') { - throw new Exception(Exception::ATTRIBUTE_NOT_AVAILABLE, 'Attribute not available: ' . $oldAttributes[$attributeIndex]['key']); + if ($columnStatus !== 'available') { + throw new Exception(Exception::ATTRIBUTE_NOT_AVAILABLE, 'Column not available: ' . $oldColumns[$columnIndex]['key']); } $lengths[$i] = null; - if ($attributeArray === true) { + if ($columnArray === true) { $lengths[$i] = Database::ARRAY_INDEX_LENGTH; $orders[$i] = null; } } $index = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key), + '$id' => ID::custom($db->getInternalId() . '_' . $table->getInternalId() . '_' . $key), 'key' => $key, 'status' => 'processing', // processing, available, failed, deleting, stuck 'databaseInternalId' => $db->getInternalId(), 'databaseId' => $databaseId, - 'collectionInternalId' => $collection->getInternalId(), - 'collectionId' => $collectionId, + 'collectionInternalId' => $table->getInternalId(), + 'collectionId' => $tableId, 'type' => $type, - 'attributes' => $attributes, + 'attributes' => $columns, 'lengths' => $lengths, 'orders' => $orders, ]); $validator = new IndexValidator( - $collection->getAttribute('attributes'), + $table->getAttribute('attributes'), $dbForProject->getAdapter()->getMaxIndexLength(), $dbForProject->getAdapter()->getInternalIndexesKeys(), ); @@ -2936,19 +2948,19 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') throw new Exception(Exception::INDEX_ALREADY_EXISTS); } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); $queueForDatabase ->setType(DATABASE_TYPE_CREATE_INDEX) ->setDatabase($db) - ->setCollection($collection) + ->setCollection($table) ->setDocument($index); $queueForEvents ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()) + ->setParam('tableId', $table->getId()) ->setParam('indexId', $index->getId()) - ->setContext('collection', $collection) + ->setContext('table', $table) ->setContext('database', $db); $response @@ -2956,8 +2968,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') ->dynamic($index, Response::MODEL_INDEX); }); -App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') - ->alias('/v1/database/collections/:collectionId/indexes') +App::get('/v1/databases/:databaseId/tables/:tableId/indexes') + ->alias('/v1/databases/:databaseId/collections/:tableId/indexes') ->desc('List indexes') ->groups(['api', 'database']) ->label('scope', 'collections.read') @@ -2977,11 +2989,11 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('queries', [], new Indexes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Indexes::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') - ->action(function (string $databaseId, string $collectionId, array $queries, Response $response, Database $dbForProject) { + ->action(function (string $databaseId, string $tableId, array $queries, Response $response, Database $dbForProject) { /** @var Document $database */ $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -2989,9 +3001,9 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } @@ -3000,7 +3012,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') \array_push( $queries, Query::equal('databaseId', [$databaseId]), - Query::equal('collectionId', [$collectionId]), + Query::equal('collectionId', [$tableId]), ); /** @@ -3019,7 +3031,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') $indexId = $cursor->getValue(); $cursorDocument = Authorization::skip(fn () => $dbForProject->find('indexes', [ - Query::equal('collectionInternalId', [$collection->getInternalId()]), + Query::equal('collectionInternalId', [$table->getInternalId()]), Query::equal('databaseInternalId', [$database->getInternalId()]), Query::equal('key', [$indexId]), Query::limit(1) @@ -3037,7 +3049,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') $total = $dbForProject->count('indexes', $filterQueries, APP_LIMIT_COUNT); $indexes = $dbForProject->find('indexes', $queries); } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); } $response->dynamic(new Document([ @@ -3046,8 +3058,8 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') ]), Response::MODEL_INDEX_LIST); }); -App::get('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') - ->alias('/v1/database/collections/:collectionId/indexes/:key', ['databaseId' => 'default']) +App::get('/v1/databases/:databaseId/tables/:tableId/indexes/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/indexes/:key') ->desc('Get index') ->groups(['api', 'database']) ->label('scope', 'collections.read') @@ -3067,24 +3079,24 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', null, new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') - ->action(function (string $databaseId, string $collectionId, string $key, Response $response, Database $dbForProject) { + ->action(function (string $databaseId, string $tableId, string $key, Response $response, Database $dbForProject) { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $index = $collection->find('key', $key, 'indexes'); + $index = $table->find('key', $key, 'indexes'); if (empty($index)) { throw new Exception(Exception::INDEX_NOT_FOUND); } @@ -3093,15 +3105,15 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') }); -App::delete('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') - ->alias('/v1/database/collections/:collectionId/indexes/:key', ['databaseId' => 'default']) +App::delete('/v1/databases/:databaseId/tables/:tableId/indexes/:key') + ->alias('/v1/databases/:databaseId/collections/:tableId/indexes/:key') ->desc('Delete index') ->groups(['api', 'database']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].indexes.[indexId].update') + ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].update') ->label('audits.event', 'index.delete') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', group: 'indexes', @@ -3117,26 +3129,26 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') contentType: ContentType::NONE )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->action(function (string $databaseId, string $collectionId, string $key, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + ->action(function (string $databaseId, string $tableId, string $key, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($db->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $index = $dbForProject->getDocument('indexes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); + $index = $dbForProject->getDocument('indexes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); if (empty($index->getId())) { throw new Exception(Exception::INDEX_NOT_FOUND); @@ -3147,34 +3159,34 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') $index = $dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'deleting')); } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); $queueForDatabase ->setType(DATABASE_TYPE_DELETE_INDEX) ->setDatabase($db) - ->setCollection($collection) + ->setCollection($table) ->setDocument($index); $queueForEvents ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()) + ->setParam('tableId', $table->getId()) ->setParam('indexId', $index->getId()) - ->setContext('collection', $collection) + ->setContext('table', $table) ->setContext('database', $db) ->setPayload($response->output($index, Response::MODEL_INDEX)); $response->noContent(); }); -App::post('/v1/databases/:databaseId/collections/:collectionId/documents') - ->alias('/v1/database/collections/:collectionId/documents', ['databaseId' => 'default']) - ->desc('Create document') +App::post('/v1/databases/:databaseId/tables/:tableId/rows') + ->alias('/v1/databases/:databaseId/collections/:tableId/documents') + ->desc('Create row') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].create') ->label('scope', 'documents.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'document.create') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('audits.event', 'row.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) @@ -3183,8 +3195,8 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') [ new Method( namespace: 'databases', - group: 'documents', - name: 'createDocument', + group: 'rows', + name: 'createRow', description: '/docs/references/databases/create-document.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ @@ -3198,16 +3210,16 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') ] ) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('documentId', '', new CustomId(), 'Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.') - ->param('data', [], new JSON(), 'Document data as JSON object.') + ->param('rowId', '', new CustomId(), 'Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define columns before creating rows.') + ->param('data', [], new JSON(), 'Row data as JSON object.') ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->inject('response') ->inject('dbForProject') ->inject('user') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $documentId, string $collectionId, string|array $data, ?array $permissions, Response $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage) { + ->action(function (string $databaseId, string $rowId, string $tableId, string|array $data, ?array $permissions, Response $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage) { $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array @@ -3228,9 +3240,9 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } @@ -3273,38 +3285,38 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') } } - $data['$collection'] = $collection->getId(); // Adding this param to make API easier for developers - $data['$id'] = $documentId == 'unique()' ? ID::unique() : $documentId; + $data['$collection'] = $table->getId(); // Adding this param to make API easier for developers + $data['$id'] = $rowId == 'unique()' ? ID::unique() : $rowId; $data['$permissions'] = $permissions; - $document = new Document($data); + $row = new Document($data); $operations = 0; - $checkPermissions = function (Document $collection, Document $document, string $permission) use (&$checkPermissions, $dbForProject, $database, &$operations) { + $checkPermissions = function (Document $table, Document $row, string $permission) use (&$checkPermissions, $dbForProject, $database, &$operations) { $operations++; - $documentSecurity = $collection->getAttribute('documentSecurity', false); + $documentSecurity = $table->getAttribute('documentSecurity', false); $validator = new Authorization($permission); - $valid = $validator->isValid($collection->getPermissionsByType($permission)); + $valid = $validator->isValid($table->getPermissionsByType($permission)); if (($permission === Database::PERMISSION_UPDATE && !$documentSecurity) || !$valid) { throw new Exception(Exception::USER_UNAUTHORIZED); } if ($permission === Database::PERMISSION_UPDATE) { - $valid = $valid || $validator->isValid($document->getUpdate()); + $valid = $valid || $validator->isValid($row->getUpdate()); if ($documentSecurity && !$valid) { throw new Exception(Exception::USER_UNAUTHORIZED); } } $relationships = \array_filter( - $collection->getAttribute('attributes', []), + $table->getAttribute('attributes', []), fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); + $related = $row->getAttribute($relationship->getAttribute('key')); if (empty($related)) { continue; @@ -3318,9 +3330,9 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') $relations = [$related]; } - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) ); foreach ($relations as &$relation) { @@ -3334,7 +3346,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') } if ($relation instanceof Document) { $current = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId(), $relation->getId()) + fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId(), $relation->getId()) ); if ($current->isEmpty()) { @@ -3346,26 +3358,26 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') } else { $relation->removeAttribute('$collectionId'); $relation->removeAttribute('$databaseId'); - $relation->setAttribute('$collection', $relatedCollection->getId()); + $relation->setAttribute('$collection', $relatedTable->getId()); $type = Database::PERMISSION_UPDATE; } - $checkPermissions($relatedCollection, $relation, $type); + $checkPermissions($relatedTable, $relation, $type); } } if ($isList) { - $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + $row->setAttribute($relationship->getAttribute('key'), \array_values($relations)); } else { - $document->setAttribute($relationship->getAttribute('key'), \reset($relations)); + $row->setAttribute($relationship->getAttribute('key'), \reset($relations)); } } }; - $checkPermissions($collection, $document, Database::PERMISSION_CREATE); + $checkPermissions($table, $row, Database::PERMISSION_CREATE); try { - $document = $dbForProject->createDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $document); + $row = $dbForProject->createDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $row); } catch (StructureException $e) { throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); } catch (DuplicateException $e) { @@ -3375,18 +3387,18 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') } - // Add $collectionId and $databaseId for all documents - $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database) { - $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); + // Add $tableId and $databaseId for all rows + $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database) { + $row->setAttribute('$databaseId', $database->getId()); + $row->setAttribute('$collectionId', $table->getId()); $relationships = \array_filter( - $collection->getAttribute('attributes', []), + $table->getAttribute('attributes', []), fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); + $related = $row->getAttribute($relationship->getAttribute('key')); if (empty($related)) { continue; @@ -3395,20 +3407,20 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') $related = [$related]; } - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) ); foreach ($related as $relation) { if ($relation instanceof Document) { - $processDocument($relatedCollection, $relation); + $processRow($relatedTable, $relation); } } } }; - $processDocument($collection, $document); + $processRow($table, $row); $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) @@ -3418,35 +3430,35 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') $response ->setStatusCode(Response::STATUS_CODE_CREATED) - ->dynamic($document, Response::MODEL_DOCUMENT); + ->dynamic($row, Response::MODEL_DOCUMENT); $relationships = \array_map( fn ($document) => $document->getAttribute('key'), \array_filter( - $collection->getAttribute('attributes', []), + $table->getAttribute('attributes', []), fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ) ); $queueForEvents ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()) - ->setParam('documentId', $document->getId()) - ->setContext('collection', $collection) + ->setParam('tableId', $table->getId()) + ->setParam('rowId', $row->getId()) + ->setContext('table', $table) ->setContext('database', $database) ->setPayload($response->getPayload(), sensitive: $relationships); }); -App::get('/v1/databases/:databaseId/collections/:collectionId/documents') - ->alias('/v1/database/collections/:collectionId/documents', ['databaseId' => 'default']) - ->desc('List documents') +App::get('/v1/databases/:databaseId/tables/:tableId/rows') + ->alias('/v1/databases/:databaseId/collections/:tableId/documents') + ->desc('List rows') ->groups(['api', 'database']) ->label('scope', 'documents.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'documents', - name: 'listDocuments', + group: 'rows', + name: 'listRows', description: '/docs/references/databases/list-documents.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ @@ -3458,12 +3470,12 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $collectionId, array $queries, Response $response, Database $dbForProject, StatsUsage $queueForStatsUsage) { + ->action(function (string $databaseId, string $tableId, array $queries, Response $response, Database $dbForProject, StatsUsage $queueForStatsUsage) { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); $isAPIKey = Auth::isAppUser(Authorization::getRoles()); $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); @@ -3472,9 +3484,9 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } @@ -3499,44 +3511,44 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); } - $documentId = $cursor->getValue(); + $rowId = $cursor->getValue(); - $cursorDocument = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); + $cursorRow = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); - if ($cursorDocument->isEmpty()) { - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Document '{$documentId}' for the 'cursor' value not found."); + if ($cursorRow->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Row '{$rowId}' for the 'cursor' value not found."); } - $cursor->setValue($cursorDocument); + $cursor->setValue($cursorRow); } try { - $documents = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries); - $total = $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries, APP_LIMIT_COUNT); + $rows = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $queries); + $total = $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $queries, APP_LIMIT_COUNT); } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); } $operations = 0; - // Add $collectionId and $databaseId for all documents - $processDocument = (function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database, &$operations): bool { - if ($document->isEmpty()) { + // Add $tableId and $databaseId for all rows + $processRow = (function (Document $table, Document $row) use (&$processRow, $dbForProject, $database, &$operations): bool { + if ($row->isEmpty()) { return false; } $operations++; - $document->removeAttribute('$collection'); - $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); + $row->removeAttribute('$collection'); + $row->setAttribute('$databaseId', $database->getId()); + $row->setAttribute('$collectionId', $table->getId()); $relationships = \array_filter( - $collection->getAttribute('attributes', []), + $table->getAttribute('attributes', []), fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); + $related = $row->getAttribute($relationship->getAttribute('key')); if (empty($related)) { if (\in_array(\gettype($related), ['array', 'object'])) { @@ -3552,30 +3564,30 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') $relations = $related; } - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedTableId = $relationship->getAttribute('relatedCollection'); // todo: Use local cache for this getDocument - $relatedCollection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId)); + $relatedTable = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId)); foreach ($relations as $index => $doc) { if ($doc instanceof Document) { - if (!$processDocument($relatedCollection, $doc)) { + if (!$processRow($relatedTable, $doc)) { unset($relations[$index]); } } } if (\is_array($related)) { - $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + $row->setAttribute($relationship->getAttribute('key'), \array_values($relations)); } elseif (empty($relations)) { - $document->setAttribute($relationship->getAttribute('key'), null); + $row->setAttribute($relationship->getAttribute('key'), null); } } return true; }); - foreach ($documents as $document) { - $processDocument($collection, $document); + foreach ($rows as $row) { + $processRow($table, $row); } $queueForStatsUsage @@ -3590,43 +3602,43 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') // Check if the SELECT query includes $databaseId and $collectionId $hasDatabaseId = false; - $hasCollectionId = false; + $hasTableId = false; if ($select) { $hasDatabaseId = \array_reduce($queries, function ($result, $query) { return $result || ($query->getMethod() === Query::TYPE_SELECT && \in_array('$databaseId', $query->getValues())); }, false); - $hasCollectionId = \array_reduce($queries, function ($result, $query) { + $hasTableId = \array_reduce($queries, function ($result, $query) { return $result || ($query->getMethod() === Query::TYPE_SELECT && \in_array('$collectionId', $query->getValues())); }, false); } if ($select) { - foreach ($documents as $document) { + foreach ($rows as $row) { if (!$hasDatabaseId) { - $document->removeAttribute('$databaseId'); + $row->removeAttribute('$databaseId'); } - if (!$hasCollectionId) { - $document->removeAttribute('$collectionId'); + if (!$hasTableId) { + $row->removeAttribute('$collectionId'); } } } $response->dynamic(new Document([ 'total' => $total, - 'documents' => $documents, + 'documents' => $rows, ]), Response::MODEL_DOCUMENT_LIST); }); -App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') - ->alias('/v1/database/collections/:collectionId/documents/:documentId', ['databaseId' => 'default']) - ->desc('Get document') +App::get('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->alias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId') + ->desc('Get row') ->groups(['api', 'database']) ->label('scope', 'documents.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'documents', - name: 'getDocument', + group: 'rows', + name: 'getRow', description: '/docs/references/databases/get-document.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ @@ -3638,13 +3650,13 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('documentId', '', new UID(), 'Document ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('rowId', '', new UID(), 'Row ID.') ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $collectionId, string $documentId, array $queries, Response $response, Database $dbForProject, StatsUsage $queueForStatsUsage) { + ->action(function (string $databaseId, string $tableId, string $rowId, array $queries, Response $response, Database $dbForProject, StatsUsage $queueForStatsUsage) { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); $isAPIKey = Auth::isAppUser(Authorization::getRoles()); $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); @@ -3653,45 +3665,45 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } try { $queries = Query::parseQueries($queries); - $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId, $queries); + $row = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId, $queries); } catch (AuthorizationException) { throw new Exception(Exception::USER_UNAUTHORIZED); } catch (QueryException $e) { throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } - if ($document->isEmpty()) { + if ($row->isEmpty()) { throw new Exception(Exception::DOCUMENT_NOT_FOUND); } $operations = 0; - // Add $collectionId and $databaseId for all documents - $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database, &$operations) { - if ($document->isEmpty()) { + // Add $tableId and $databaseId for all rows + $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database, &$operations) { + if ($row->isEmpty()) { return; } $operations++; - $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); + $row->setAttribute('$databaseId', $database->getId()); + $row->setAttribute('$collectionId', $table->getId()); $relationships = \array_filter( - $collection->getAttribute('attributes', []), + $table->getAttribute('attributes', []), fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); + $related = $row->getAttribute($relationship->getAttribute('key')); if (empty($related)) { if (\in_array(\gettype($related), ['array', 'object'])) { @@ -3705,20 +3717,20 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen $related = [$related]; } - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) ); foreach ($related as $relation) { if ($relation instanceof Document) { - $processDocument($relatedCollection, $relation); + $processRow($relatedTable, $relation); } } } }; - $processDocument($collection, $document); + $processRow($table, $row); $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) @@ -3726,19 +3738,19 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen $response->addHeader('X-Debug-Operations', $operations); - $response->dynamic($document, Response::MODEL_DOCUMENT); + $response->dynamic($row, Response::MODEL_DOCUMENT); }); -App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId/logs') - ->alias('/v1/database/collections/:collectionId/documents/:documentId/logs', ['databaseId' => 'default']) - ->desc('List document logs') +App::get('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/logs') + ->alias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId/logs') + ->desc('List row logs') ->groups(['api', 'database']) ->label('scope', 'documents.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', group: 'logs', - name: 'listDocumentLogs', + name: 'listRowLogs', description: '/docs/references/databases/get-document-logs.md', auth: [AuthType::ADMIN], responses: [ @@ -3750,14 +3762,14 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen contentType: ContentType::JSON, )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID.') - ->param('documentId', '', new UID(), 'Document ID.') + ->param('tableId', '', new UID(), 'Collection ID.') + ->param('rowId', '', new UID(), 'Row ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) ->inject('response') ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->action(function (string $databaseId, string $collectionId, string $documentId, array $queries, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) { + ->action(function (string $databaseId, string $tableId, string $rowId, array $queries, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -3765,15 +3777,15 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId); + $row = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId); - if ($document->isEmpty()) { + if ($row->isEmpty()) { throw new Exception(Exception::DOCUMENT_NOT_FOUND); } @@ -3790,7 +3802,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen ]); $audit = new Audit($dbForProject); - $resource = 'database/' . $databaseId . '/collection/' . $collectionId . '/document/' . $document->getId(); + $resource = 'database/' . $databaseId . '/table/' . $tableId . '/row/' . $row->getId(); $logs = $audit->getLogsByResource($resource, $queries); $output = []; @@ -3844,22 +3856,22 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen ]), Response::MODEL_LOG_LIST); }); -App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') - ->alias('/v1/database/collections/:collectionId/documents/:documentId') - ->desc('Update document') +App::patch('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->alias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId') + ->desc('Update row') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].update') + ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') ->label('scope', 'documents.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'document.update') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}/document/{response.$id}') + ->label('audits.event', 'row.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) ->label('sdk', new Method( namespace: 'databases', - group: 'documents', - name: 'updateDocument', + group: 'rows', + name: 'updateRow', description: '/docs/references/databases/update-document.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ @@ -3871,16 +3883,16 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID.') - ->param('documentId', '', new UID(), 'Document ID.') - ->param('data', [], new JSON(), 'Document data as JSON object. Include only attribute and value pairs to be updated.', true) + ->param('tableId', '', new UID(), 'Collection ID.') + ->param('rowId', '', new UID(), 'Row ID.') + ->param('data', [], new JSON(), 'Row data as JSON object. Include only columns and value pairs to be updated.', true) ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->inject('requestTimestamp') ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $collectionId, string $documentId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage) { + ->action(function (string $databaseId, string $tableId, string $rowId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage) { $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array @@ -3897,17 +3909,17 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } // Read permission should not be required for update - /** @var Document $document */ - $document = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); + /** @var Document $row */ + $row = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); - if ($document->isEmpty()) { + if ($row->isEmpty()) { throw new Exception(Exception::DOCUMENT_NOT_FOUND); } @@ -3940,16 +3952,16 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum } if (\is_null($permissions)) { - $permissions = $document->getPermissions() ?? []; + $permissions = $row->getPermissions() ?? []; } - $data['$id'] = $documentId; + $data['$id'] = $rowId; $data['$permissions'] = $permissions; - $newDocument = new Document($data); + $newRow = new Document($data); $operations = 0; - $setCollection = (function (Document $collection, Document $document) use (&$setCollection, $dbForProject, $database, &$operations) { + $setTable = (function (Document $collection, Document $document) use (&$setTable, $dbForProject, $database, &$operations) { $operations++; @@ -3973,9 +3985,9 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum $relations = [$related]; } - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) ); foreach ($relations as &$relation) { @@ -3989,8 +4001,8 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum $relation = new Document($relation); } if ($relation instanceof Document) { - $oldDocument = Authorization::skip(fn () => $dbForProject->getDocument( - 'database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId(), + $oldRow = Authorization::skip(fn () => $dbForProject->getDocument( + 'database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId(), $relation->getId() )); $relation->removeAttribute('$collectionId'); @@ -3998,15 +4010,15 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum // Attribute $collection is required for Utopia. $relation->setAttribute( '$collection', - 'database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId() + 'database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId() ); - if ($oldDocument->isEmpty()) { + if ($oldRow->isEmpty()) { if (isset($relation['$id']) && $relation['$id'] === 'unique()') { $relation['$id'] = ID::unique(); } } - $setCollection($relatedCollection, $relation); + $setTable($relatedTable, $relation); } } @@ -4018,7 +4030,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum } }); - $setCollection($collection, $newDocument); + $setTable($table, $newRow); $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) @@ -4027,12 +4039,12 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum $response->addHeader('X-Debug-Operations', $operations); try { - $document = $dbForProject->withRequestTimestamp( + $row = $dbForProject->withRequestTimestamp( $requestTimestamp, fn () => $dbForProject->updateDocument( - 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), - $document->getId(), - $newDocument + 'database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), + $row->getId(), + $newRow ) ); } catch (AuthorizationException) { @@ -4045,18 +4057,18 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum throw new Exception(Exception::COLLECTION_NOT_FOUND); } - // Add $collectionId and $databaseId for all documents - $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database) { - $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); + // Add $tableId and $databaseId for all rows + $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database) { + $row->setAttribute('$databaseId', $database->getId()); + $row->setAttribute('$collectionId', $table->getId()); $relationships = \array_filter( - $collection->getAttribute('attributes', []), + $table->getAttribute('attributes', []), fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); + $related = $row->getAttribute($relationship->getAttribute('key')); if (empty($related)) { continue; @@ -4065,56 +4077,56 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum $related = [$related]; } - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) ); foreach ($related as $relation) { if ($relation instanceof Document) { - $processDocument($relatedCollection, $relation); + $processRow($relatedTable, $relation); } } } }; - $processDocument($collection, $document); + $processRow($table, $row); - $response->dynamic($document, Response::MODEL_DOCUMENT); + $response->dynamic($row, Response::MODEL_DOCUMENT); $relationships = \array_map( fn ($document) => $document->getAttribute('key'), \array_filter( - $collection->getAttribute('attributes', []), + $table->getAttribute('attributes', []), fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ) ); $queueForEvents ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()) - ->setParam('documentId', $document->getId()) - ->setContext('collection', $collection) + ->setParam('tableId', $table->getId()) + ->setParam('rowId', $row->getId()) + ->setContext('table', $table) ->setContext('database', $database) ->setPayload($response->getPayload(), sensitive: $relationships); }); -App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') - ->alias('/v1/database/collections/:collectionId/documents/:documentId', ['databaseId' => 'default']) - ->desc('Delete document') +App::delete('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->alias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId') + ->desc('Delete row') ->groups(['api', 'database']) ->label('scope', 'documents.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].delete') - ->label('audits.event', 'document.delete') - ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}/document/{request.documentId}') + ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].delete') + ->label('audits.event', 'row.delete') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{request.rowId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) ->label('sdk', new Method( namespace: 'databases', - group: 'documents', - name: 'deleteDocument', + group: 'rows', + name: 'deleteRow', description: '/docs/references/databases/delete-document.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ @@ -4126,14 +4138,14 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu contentType: ContentType::NONE )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('documentId', '', new UID(), 'Document ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('rowId', '', new UID(), 'Row ID.') ->inject('requestTimestamp') ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $collectionId, string $documentId, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage) { + ->action(function (string $databaseId, string $tableId, string $rowId, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage) { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); $isAPIKey = Auth::isAppUser(Authorization::getRoles()); @@ -4143,42 +4155,42 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } // Read permission should not be required for delete - $document = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); + $row = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); - if ($document->isEmpty()) { + if ($row->isEmpty()) { throw new Exception(Exception::DOCUMENT_NOT_FOUND); } try { - $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $collection, $documentId) { + $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $table, $rowId) { $dbForProject->deleteDocument( - 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), - $documentId + 'database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), + $rowId ); }); } catch (NotFoundException $e) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } - // Add $collectionId and $databaseId for all documents - $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database) { - $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); + // Add $tableId and $databaseId for all rows + $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database) { + $row->setAttribute('$databaseId', $database->getId()); + $row->setAttribute('$collectionId', $table->getId()); $relationships = \array_filter( - $collection->getAttribute('attributes', []), + $table->getAttribute('attributes', []), fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); + $related = $row->getAttribute($relationship->getAttribute('key')); if (empty($related)) { continue; @@ -4187,20 +4199,20 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu $related = [$related]; } - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) ); foreach ($related as $relation) { if ($relation instanceof Document) { - $processDocument($relatedCollection, $relation); + $processRow($relatedTable, $relation); } } } }; - $processDocument($collection, $document); + $processRow($table, $row); $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) @@ -4211,18 +4223,18 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu $relationships = \array_map( fn ($document) => $document->getAttribute('key'), \array_filter( - $collection->getAttribute('attributes', []), + $table->getAttribute('attributes', []), fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ) ); $queueForEvents ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()) - ->setParam('documentId', $document->getId()) - ->setContext('collection', $collection) + ->setParam('tableId', $table->getId()) + ->setParam('rowId', $row->getId()) + ->setContext('table', $table) ->setContext('database', $database) - ->setPayload($response->output($document, Response::MODEL_DOCUMENT), sensitive: $relationships); + ->setPayload($response->output($row, Response::MODEL_DOCUMENT), sensitive: $relationships); $response->noContent(); }); @@ -4424,16 +4436,16 @@ App::get('/v1/databases/:databaseId/usage') ]), Response::MODEL_USAGE_DATABASE); }); -App::get('/v1/databases/:databaseId/collections/:collectionId/usage') - ->alias('/v1/database/:collectionId/usage', ['databaseId' => 'default']) - ->desc('Get collection usage stats') +App::get('/v1/databases/:databaseId/tables/:tableId/usage') + ->alias('/v1/databases/:databaseId/collections/:tableId/usage') + ->desc('Get table usage stats') ->groups(['api', 'database', 'usage']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', group: null, - name: 'getCollectionUsage', + name: 'getTableUsage', description: '/docs/references/databases/get-collection-usage.md', auth: [AuthType::ADMIN], responses: [ @@ -4446,16 +4458,16 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) - ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('tableId', '', new UID(), 'Collection ID.') ->inject('response') ->inject('dbForProject') - ->action(function (string $databaseId, string $range, string $collectionId, Response $response, Database $dbForProject) { + ->action(function (string $databaseId, string $range, string $tableId, Response $response, Database $dbForProject) { $database = $dbForProject->getDocument('databases', $databaseId); - $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); - $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); + $tableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $tableDocument->getInternalId()); - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } @@ -4463,7 +4475,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage') $stats = $usage = []; $days = $periods[$range]; $metrics = [ - str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getInternalId(), $collectionDocument->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), + str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getInternalId(), $tableDocument->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { From 4f1f9bb4a23281a8088385b8065cfba64c8acc09 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 26 Apr 2025 16:06:53 +0530 Subject: [PATCH 002/362] add: filter for latest changes. --- app/controllers/general.php | 3 +- src/Appwrite/Utopia/Request/Filters/V19.php | 32 +++++++++++++++------ 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 889571fe62..bf048be9d6 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -805,7 +805,8 @@ App::init() if (version_compare($requestFormat, '1.6.0', '<')) { $request->addFilter(new RequestV18()); } - if (version_compare($requestFormat, '1.7.0', '<')) { + // alias filters on 1.7.x, so we use `<=` and not just `<` + if (version_compare($requestFormat, '1.7.0', '<=')) { $request->addFilter(new RequestV19()); } } diff --git a/src/Appwrite/Utopia/Request/Filters/V19.php b/src/Appwrite/Utopia/Request/Filters/V19.php index 041c126a69..9597f40570 100644 --- a/src/Appwrite/Utopia/Request/Filters/V19.php +++ b/src/Appwrite/Utopia/Request/Filters/V19.php @@ -6,18 +6,32 @@ use Appwrite\Utopia\Request\Filter; class V19 extends Filter { - // Convert 1.6 params to 1.7 public function parse(array $content, string $model): array { - /* - Uncomment with first request filter; current is just a copy of V18 - switch ($model) { - case 'functions.create': - $content['something'] = $content['somethingElse'] ?? ""; - unset($content['something']); - break; + return $this->overrideDatabaseParams($content, $model); + } + + // Database terminology change handling. + protected function overrideDatabaseParams(array $content, string $model): array + { + if (!str_starts_with($model, 'databases.')) { + return $content; + } + + $map = [ + 'collectionId' => 'tableId', + 'attributeId' => 'columnId', + 'attributes' => 'columns', + 'documentId' => 'rowId', + 'relatedCollectionId' => 'relatedTableId' + ]; + + foreach ($map as $oldKey => $newKey) { + if (isset($content[$oldKey])) { + $content[$newKey] = $content[$oldKey]; + unset($content[$oldKey]); + } } - */ return $content; } From 21715448ac04b154df005e79135cb2f6ee6fdd33 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 26 Apr 2025 16:07:32 +0530 Subject: [PATCH 003/362] fix|update: database tests for new error messages. --- tests/e2e/Services/Databases/DatabasesBase.php | 4 ++-- tests/e2e/Services/Databases/DatabasesCustomClientTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 0c7e1d386e..989d1217d3 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -1373,7 +1373,7 @@ trait DatabasesBase ]); $this->assertEquals(400, $unknown['headers']['status-code']); - $this->assertEquals('Unknown attribute: Unknown. Verify the attribute name or create the attribute.', $unknown['body']['message']); + $this->assertEquals('Unknown column: Unknown. Verify the column name or create the column.', $unknown['body']['message']); $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -2671,7 +2671,7 @@ trait DatabasesBase $this->assertEquals(400, $enumDefault['headers']['status-code']); $this->assertEquals(400, $enumDefaultStrict['headers']['status-code']); $this->assertEquals('Minimum value must be lesser than maximum value', $invalidRange['body']['message']); - $this->assertEquals('Cannot set default value for array attributes', $defaultArray['body']['message']); + $this->assertEquals('Cannot set default value for array columns', $defaultArray['body']['message']); $this->assertEquals(400, $datetimeDefault['headers']['status-code']); // wait for worker to add attributes sleep(3); diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index 8484996058..d4a8c87868 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -472,7 +472,7 @@ class DatabasesCustomClientTest extends Scope \sleep(2); $this->assertEquals(409, $relation['body']['code']); - $this->assertEquals('Creating more than one "manyToMany" relationship on the same collection is currently not permitted.', $relation['body']['message']); + $this->assertEquals('Creating more than one "manyToMany" relationship on the same table is currently not permitted.', $relation['body']['message']); } public function testUpdateWithoutRelationPermission(): void From 89ce5a6e1044b6866613760381172a4b6fb727c3 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 26 Apr 2025 16:07:46 +0530 Subject: [PATCH 004/362] add: todo. --- app/config/scopes.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/config/scopes.php b/app/config/scopes.php index 7dea7b1cd5..d459ffb2fc 100644 --- a/app/config/scopes.php +++ b/app/config/scopes.php @@ -1,5 +1,6 @@ [ 'description' => 'Access to create, update, and delete user sessions', From 949f58522d7c46d6f6cb0bb782ed6fc8eecd576b Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 27 Apr 2025 10:33:44 +0530 Subject: [PATCH 005/362] change: events system. --- app/config/events.php | 28 +- app/config/templates/function.php | 2 +- app/controllers/api/databases.php | 21 +- app/controllers/general.php | 7 +- src/Appwrite/Event/Database.php | 36 +-- src/Appwrite/Event/Realtime.php | 4 +- src/Appwrite/Messaging/Adapter/Realtime.php | 35 +-- src/Appwrite/Platform/Workers/Databases.php | 284 +++++++++--------- .../Request/Filters/DatabaseAliases.php | 38 +++ src/Appwrite/Utopia/Request/Filters/V19.php | 32 +- .../Utopia/Response/Model/Webhook.php | 2 +- 11 files changed, 254 insertions(+), 235 deletions(-) create mode 100644 src/Appwrite/Utopia/Request/Filters/DatabaseAliases.php diff --git a/app/config/events.php b/app/config/events.php index 0bfddf4f1f..3b0cc982a0 100644 --- a/app/config/events.php +++ b/app/config/events.php @@ -95,22 +95,22 @@ return [ '$model' => Response::MODEL_DATABASE, '$resource' => true, '$description' => 'This event triggers on any database event.', - 'collections' => [ + 'tables' => [ '$model' => Response::MODEL_COLLECTION, '$resource' => true, - '$description' => 'This event triggers on any collection event.', - 'documents' => [ + '$description' => 'This event triggers on any table event.', + 'rows' => [ '$model' => Response::MODEL_DOCUMENT, '$resource' => true, - '$description' => 'This event triggers on any documents event.', + '$description' => 'This event triggers on any rows event.', 'create' => [ - '$description' => 'This event triggers when a document is created.', + '$description' => 'This event triggers when a row is created.', ], 'delete' => [ - '$description' => 'This event triggers when a document is deleted.' + '$description' => 'This event triggers when a row is deleted.' ], 'update' => [ - '$description' => 'This event triggers when a document is updated.' + '$description' => 'This event triggers when a row is updated.' ], ], 'indexes' => [ @@ -124,25 +124,25 @@ return [ '$description' => 'This event triggers when an index is deleted.' ] ], - 'attributes' => [ + 'columns' => [ '$model' => Response::MODEL_ATTRIBUTE, '$resource' => true, - '$description' => 'This event triggers on any attributes event.', + '$description' => 'This event triggers on any columns event.', 'create' => [ - '$description' => 'This event triggers when an attribute is created.', + '$description' => 'This event triggers when an column is created.', ], 'delete' => [ - '$description' => 'This event triggers when an attribute is deleted.' + '$description' => 'This event triggers when an column is deleted.' ] ], 'create' => [ - '$description' => 'This event triggers when a collection is created.' + '$description' => 'This event triggers when a table is created.' ], 'delete' => [ - '$description' => 'This event triggers when a collection is deleted.', + '$description' => 'This event triggers when a table is deleted.', ], 'update' => [ - '$description' => 'This event triggers when a collection is updated.', + '$description' => 'This event triggers when a table is updated.', ] ], 'create' => [ diff --git a/app/config/templates/function.php b/app/config/templates/function.php index d8426ad900..b017281dbe 100644 --- a/app/config/templates/function.php +++ b/app/config/templates/function.php @@ -1395,7 +1395,7 @@ return [ 'score' => 5, 'tagline' => 'Convert text to speech using the Hugging Face inference API.', 'permissions' => ['any'], - 'events' => ['databases.*.collections.*.documents.*.create'], + 'events' => ['databases.*.tables.*.rows.*.create'], 'cron' => '', 'timeout' => 15, 'useCases' => ['ai'], diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index d3a34f56e8..d8556dd4fe 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -218,8 +218,8 @@ function createColumn(string $databaseId, string $tableId, Document $column, Res $queueForDatabase ->setType(DATABASE_TYPE_CREATE_ATTRIBUTE) ->setDatabase($db) - ->setCollection($table) - ->setDocument($column); + ->setTable($table) + ->setRow($column); $queueForEvents ->setContext('table', $table) @@ -485,8 +485,7 @@ App::post('/v1/databases') ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $name, bool $enabled, Response $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage) { + ->action(function (string $databaseId, string $name, bool $enabled, Response $response, Database $dbForProject, Event $queueForEvents) { $databaseId = $databaseId == 'unique()' ? ID::unique() : $databaseId; @@ -1280,7 +1279,7 @@ App::delete('/v1/databases/:databaseId/tables/:tableId') $queueForDatabase ->setType(DATABASE_TYPE_DELETE_COLLECTION) ->setDatabase($database) - ->setCollection($table); + ->setTable($table); $queueForEvents ->setContext('database', $database) @@ -2759,9 +2758,9 @@ App::delete('/v1/databases/:databaseId/tables/:tableId/columns/:key') $queueForDatabase ->setType(DATABASE_TYPE_DELETE_ATTRIBUTE) - ->setCollection($table) + ->setTable($table) ->setDatabase($db) - ->setDocument($column); + ->setRow($column); // Select response model based on type and format $type = $column->getAttribute('type'); @@ -2953,8 +2952,8 @@ App::post('/v1/databases/:databaseId/tables/:tableId/indexes') $queueForDatabase ->setType(DATABASE_TYPE_CREATE_INDEX) ->setDatabase($db) - ->setCollection($table) - ->setDocument($index); + ->setTable($table) + ->setRow($index); $queueForEvents ->setParam('databaseId', $databaseId) @@ -3164,8 +3163,8 @@ App::delete('/v1/databases/:databaseId/tables/:tableId/indexes/:key') $queueForDatabase ->setType(DATABASE_TYPE_DELETE_INDEX) ->setDatabase($db) - ->setCollection($table) - ->setDocument($index); + ->setTable($table) + ->setRow($index); $queueForEvents ->setParam('databaseId', $databaseId) diff --git a/app/controllers/general.php b/app/controllers/general.php index bf048be9d6..fdef1e9cee 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -18,6 +18,7 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Transformation\Adapter\Preview; use Appwrite\Transformation\Transformation; use Appwrite\Utopia\Request; +use Appwrite\Utopia\Request\Filters\DatabaseAliases; use Appwrite\Utopia\Request\Filters\V16 as RequestV16; use Appwrite\Utopia\Request\Filters\V17 as RequestV17; use Appwrite\Utopia\Request\Filters\V18 as RequestV18; @@ -805,12 +806,14 @@ App::init() if (version_compare($requestFormat, '1.6.0', '<')) { $request->addFilter(new RequestV18()); } - // alias filters on 1.7.x, so we use `<=` and not just `<` - if (version_compare($requestFormat, '1.7.0', '<=')) { + if (version_compare($requestFormat, '1.7.0', '<')) { $request->addFilter(new RequestV19()); } } + // process on all databases endpoints! + $request->addFilter(new DatabaseAliases()); + $domain = $request->getHostname(); $domains = Config::getParam('domains', []); if (!array_key_exists($domain, $domains)) { diff --git a/src/Appwrite/Event/Database.php b/src/Appwrite/Event/Database.php index d2f70dddf2..797574d2fc 100644 --- a/src/Appwrite/Event/Database.php +++ b/src/Appwrite/Event/Database.php @@ -10,8 +10,8 @@ class Database extends Event { protected string $type = ''; protected ?Document $database = null; - protected ?Document $collection = null; - protected ?Document $document = null; + protected ?Document $table = null; + protected ?Document $row = null; public function __construct(protected Publisher $publisher) { @@ -55,48 +55,48 @@ class Database extends Event } /** - * Set the collection for this database event. + * Set the table for this database event. * - * @param Document $collection + * @param Document $table * @return self */ - public function setCollection(Document $collection): self + public function setTable(Document $table): self { - $this->collection = $collection; + $this->table = $table; return $this; } /** - * Returns set collection for this event. + * Returns set table for this event. * * @return null|Document */ - public function getCollection(): ?Document + public function getTable(): ?Document { - return $this->collection; + return $this->table; } /** - * Set the document for this database event. + * Set the row for this database event. * - * @param Document $document + * @param Document $row * @return self */ - public function setDocument(Document $document): self + public function setRow(Document $row): self { - $this->document = $document; + $this->row = $row; return $this; } /** - * Returns set document for this database event. + * Returns set row for this database event. * @return null|Document */ - public function getDocument(): ?Document + public function getRow(): ?Document { - return $this->document; + return $this->row; } public function getQueue(): string @@ -123,8 +123,8 @@ class Database extends Event 'project' => $this->project, 'user' => $this->user, 'type' => $this->type, - 'collection' => $this->collection, - 'document' => $this->document, + 'table' => $this->table, + 'row' => $this->row, 'database' => $this->database, 'events' => Event::generateEvents($this->getEvent(), $this->getParams()) ]; diff --git a/src/Appwrite/Event/Realtime.php b/src/Appwrite/Event/Realtime.php index 4d8c9a321b..e1ec891e67 100644 --- a/src/Appwrite/Event/Realtime.php +++ b/src/Appwrite/Event/Realtime.php @@ -76,7 +76,7 @@ class Realtime extends Event $payload = new Document($this->getPayload()); $db = $this->getContext('database'); - $collection = $this->getContext('collection'); + $table = $this->getContext('table'); $bucket = $this->getContext('bucket'); $target = RealtimeAdapter::fromPayload( @@ -85,7 +85,7 @@ class Realtime extends Event payload: $payload, project: $this->getProject(), database: $db, - collection: $collection, + table: $table, bucket: $bucket, ); diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index 568132ceb1..400589f677 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -252,12 +252,12 @@ class Realtime extends Adapter * @param Document $payload * @param Document|null $project * @param Document|null $database - * @param Document|null $collection + * @param Document|null $table * @param Document|null $bucket * @return array * @throws \Exception */ - public static function fromPayload(string $event, Document $payload, Document $project = null, Document $database = null, Document $collection = null, Document $bucket = null): array + public static function fromPayload(string $event, Document $payload, Document $project = null, Document $database = null, Document $table = null, Document $bucket = null): array { $channels = []; $roles = []; @@ -273,6 +273,7 @@ class Realtime extends Adapter $roles = [Role::user(ID::custom($parts[1]))->toString()]; break; case 'rules': + case 'migrations': $channels[] = 'console'; $channels[] = 'projects.' . $project->getId(); $projectId = 'console'; @@ -297,26 +298,26 @@ class Realtime extends Adapter $roles = [Role::team(ID::custom($parts[1]))->toString()]; break; case 'databases': - if (in_array($parts[4] ?? [], ['attributes', 'indexes'])) { + if (in_array($parts[4] ?? [], ['columns', 'indexes'])) { $channels[] = 'console'; $channels[] = 'projects.' . $project->getId(); $projectId = 'console'; $roles = [Role::team($project->getAttribute('teamId'))->toString()]; - } elseif (($parts[4] ?? '') === 'documents') { + } elseif (($parts[4] ?? '') === 'rows') { if ($database->isEmpty()) { - throw new \Exception('Database needs to be passed to Realtime for Document events in the Database.'); + throw new \Exception('Database needs to be passed to Realtime for Row events in the Database.'); } - if ($collection->isEmpty()) { - throw new \Exception('Collection needs to be passed to Realtime for Document events in the Database.'); + if ($table->isEmpty()) { + throw new \Exception('Table needs to be passed to Realtime for Row events in the Database.'); } - $channels[] = 'documents'; - $channels[] = 'databases.' . $database->getId() . '.collections.' . $payload->getAttribute('$collectionId') . '.documents'; - $channels[] = 'databases.' . $database->getId() . '.collections.' . $payload->getAttribute('$collectionId') . '.documents.' . $payload->getId(); + $channels[] = 'rows'; + $channels[] = 'databases.' . $database->getId() . '.tables.' . $payload->getAttribute('$collectionId') . '.rows'; + $channels[] = 'databases.' . $database->getId() . '.tables.' . $payload->getAttribute('$collectionId') . '.rows.' . $payload->getId(); - $roles = $collection->getAttribute('documentSecurity', false) - ? \array_merge($collection->getRead(), $payload->getRead()) - : $collection->getRead(); + $roles = $table->getAttribute('documentSecurity', false) + ? \array_merge($table->getRead(), $payload->getRead()) + : $table->getRead(); } break; case 'buckets': @@ -334,7 +335,6 @@ class Realtime extends Adapter } break; - case 'functions': if ($parts[2] === 'executions') { if (!empty($payload->getRead())) { @@ -353,7 +353,6 @@ class Realtime extends Adapter } break; - case 'sites': if ($parts[2] === 'deployments') { $channels[] = 'console'; @@ -362,12 +361,6 @@ class Realtime extends Adapter $roles = [Role::team($project->getAttribute('teamId'))->toString()]; } - break; - case 'migrations': - $channels[] = 'console'; - $channels[] = 'projects.' . $project->getId(); - $projectId = 'console'; - $roles = [Role::team($project->getAttribute('teamId'))->toString()]; break; } diff --git a/src/Appwrite/Platform/Workers/Databases.php b/src/Appwrite/Platform/Workers/Databases.php index b2691b420e..1f3b76d6eb 100644 --- a/src/Appwrite/Platform/Workers/Databases.php +++ b/src/Appwrite/Platform/Workers/Databases.php @@ -60,8 +60,8 @@ class Databases extends Action } $type = $payload['type']; - $collection = new Document($payload['collection'] ?? []); - $document = new Document($payload['document'] ?? []); + $row = new Document($payload['row'] ?? []); + $table = new Document($payload['table'] ?? []); $database = new Document($payload['database'] ?? []); $log->addTag('projectId', $project->getId()); @@ -75,19 +75,19 @@ class Databases extends Action match (\strval($type)) { DATABASE_TYPE_DELETE_DATABASE => $this->deleteDatabase($database, $project, $dbForProject), - DATABASE_TYPE_DELETE_COLLECTION => $this->deleteCollection($database, $collection, $project, $dbForProject), - DATABASE_TYPE_CREATE_ATTRIBUTE => $this->createAttribute($database, $collection, $document, $project, $dbForPlatform, $dbForProject, $queueForRealtime), - DATABASE_TYPE_DELETE_ATTRIBUTE => $this->deleteAttribute($database, $collection, $document, $project, $dbForPlatform, $dbForProject, $queueForRealtime), - DATABASE_TYPE_CREATE_INDEX => $this->createIndex($database, $collection, $document, $project, $dbForPlatform, $dbForProject, $queueForRealtime), - DATABASE_TYPE_DELETE_INDEX => $this->deleteIndex($database, $collection, $document, $project, $dbForPlatform, $dbForProject, $queueForRealtime), + DATABASE_TYPE_DELETE_COLLECTION => $this->deleteTable($database, $table, $project, $dbForProject), + DATABASE_TYPE_CREATE_ATTRIBUTE => $this->createColumn($database, $table, $row, $project, $dbForPlatform, $dbForProject, $queueForRealtime), + DATABASE_TYPE_DELETE_ATTRIBUTE => $this->deleteColumn($database, $table, $row, $project, $dbForPlatform, $dbForProject, $queueForRealtime), + DATABASE_TYPE_CREATE_INDEX => $this->createIndex($database, $table, $row, $project, $dbForPlatform, $dbForProject, $queueForRealtime), + DATABASE_TYPE_DELETE_INDEX => $this->deleteIndex($database, $table, $row, $project, $dbForPlatform, $dbForProject, $queueForRealtime), default => throw new Exception('No database operation for type: ' . \strval($type)), }; } /** * @param Document $database - * @param Document $collection - * @param Document $attribute + * @param Document $table + * @param Document $column * @param Document $project * @param Database $dbForPlatform * @param Database $dbForProject @@ -98,64 +98,64 @@ class Databases extends Action * @throws \Exception * @throws \Throwable */ - private function createAttribute( + private function createColumn( Document $database, - Document $collection, - Document $attribute, + Document $table, + Document $column, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime ): void { - if ($collection->isEmpty()) { - throw new Exception('Missing collection'); + if ($table->isEmpty()) { + throw new Exception('Missing table'); } - if ($attribute->isEmpty()) { - throw new Exception('Missing attribute'); + if ($column->isEmpty()) { + throw new Exception('Missing column'); } $projectId = $project->getId(); - $event = "databases.[databaseId].collections.[collectionId].attributes.[attributeId].update"; + $event = "databases.[databaseId].tables.[tableId].columns.[columnId].update"; /** * TODO @christyjacob4 verify if this is still the case * Fetch attribute from the database, since with Resque float values are loosing informations. */ - $attribute = $dbForProject->getDocument('attributes', $attribute->getId()); + $column = $dbForProject->getDocument('attributes', $column->getId()); - if ($attribute->isEmpty()) { + if ($column->isEmpty()) { // Attribute was deleted before job was processed return; } - $collectionId = $collection->getId(); - $key = $attribute->getAttribute('key', ''); - $type = $attribute->getAttribute('type', ''); - $size = $attribute->getAttribute('size', 0); - $required = $attribute->getAttribute('required', false); - $default = $attribute->getAttribute('default', null); - $signed = $attribute->getAttribute('signed', true); - $array = $attribute->getAttribute('array', false); - $format = $attribute->getAttribute('format', ''); - $formatOptions = $attribute->getAttribute('formatOptions', []); - $filters = $attribute->getAttribute('filters', []); - $options = $attribute->getAttribute('options', []); + $tableId = $table->getId(); + $key = $column->getAttribute('key', ''); + $type = $column->getAttribute('type', ''); + $size = $column->getAttribute('size', 0); + $required = $column->getAttribute('required', false); + $default = $column->getAttribute('default', null); + $signed = $column->getAttribute('signed', true); + $array = $column->getAttribute('array', false); + $format = $column->getAttribute('format', ''); + $formatOptions = $column->getAttribute('formatOptions', []); + $filters = $column->getAttribute('filters', []); + $options = $column->getAttribute('options', []); $project = $dbForPlatform->getDocument('projects', $projectId); - $relatedAttribute = new Document(); - $relatedCollection = new Document(); + $relatedColumn = new Document(); + $relatedTable = new Document(); try { switch ($type) { case Database::VAR_RELATIONSHIP: - $relatedCollection = $dbForProject->getDocument('database_' . $database->getInternalId(), $options['relatedCollection']); - if ($relatedCollection->isEmpty()) { - throw new DatabaseException('Collection not found'); + $relatedTable = $dbForProject->getDocument('database_' . $database->getInternalId(), $options['relatedCollection']); + if ($relatedTable->isEmpty()) { + throw new DatabaseException('Table not found'); } if ( !$dbForProject->createRelationship( - collection: 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), - relatedCollection: 'database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId(), + collection: 'database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), + relatedCollection: 'database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId(), type: $options['relationType'], twoWay: $options['twoWay'], id: $key, @@ -163,61 +163,61 @@ class Databases extends Action onDelete: $options['onDelete'], ) ) { - throw new DatabaseException('Failed to create Attribute'); + throw new DatabaseException('Failed to create Column'); } if ($options['twoWay']) { - $relatedAttribute = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $options['twoWayKey']); - $dbForProject->updateDocument('attributes', $relatedAttribute->getId(), $relatedAttribute->setAttribute('status', 'available')); + $relatedColumn = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $options['twoWayKey']); + $dbForProject->updateDocument('attributes', $relatedColumn->getId(), $relatedColumn->setAttribute('status', 'available')); } break; default: - if (!$dbForProject->createAttribute('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $key, $type, $size, $required, $default, $signed, $array, $format, $formatOptions, $filters)) { - throw new Exception('Failed to create Attribute'); + if (!$dbForProject->createAttribute('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $key, $type, $size, $required, $default, $signed, $array, $format, $formatOptions, $filters)) { + throw new Exception('Failed to create Column'); } } - $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'available')); + $dbForProject->updateDocument('attributes', $column->getId(), $column->setAttribute('status', 'available')); } catch (\Throwable $e) { Console::error($e->getMessage()); if ($e instanceof DatabaseException) { - $attribute->setAttribute('error', $e->getMessage()); - if (! $relatedAttribute->isEmpty()) { - $relatedAttribute->setAttribute('error', $e->getMessage()); + $column->setAttribute('error', $e->getMessage()); + if (! $relatedColumn->isEmpty()) { + $relatedColumn->setAttribute('error', $e->getMessage()); } } $dbForProject->updateDocument( 'attributes', - $attribute->getId(), - $attribute->setAttribute('status', 'failed') + $column->getId(), + $column->setAttribute('status', 'failed') ); - if (! $relatedAttribute->isEmpty()) { + if (! $relatedColumn->isEmpty()) { $dbForProject->updateDocument( 'attributes', - $relatedAttribute->getId(), - $relatedAttribute->setAttribute('status', 'failed') + $relatedColumn->getId(), + $relatedColumn->setAttribute('status', 'failed') ); } throw $e; } finally { - $this->trigger($database, $collection, $project, $event, $queueForRealtime, $attribute); + $this->trigger($database, $table, $project, $event, $queueForRealtime, $column); - if (! $relatedCollection->isEmpty()) { - $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $relatedCollection->getId()); + if (! $relatedTable->isEmpty()) { + $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $relatedTable->getId()); } - $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collectionId); + $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $tableId); } } /** * @param Document $database - * @param Document $collection - * @param Document $attribute + * @param Document $table + * @param Document $column * @param Document $project * @param Database $dbForPlatform * @param Database $dbForProject @@ -228,24 +228,24 @@ class Databases extends Action * @throws \Exception * @throws \Throwable **/ - private function deleteAttribute(Document $database, Document $collection, Document $attribute, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime): void + private function deleteColumn(Document $database, Document $table, Document $column, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime): void { - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception('Missing collection'); } - if ($attribute->isEmpty()) { + if ($column->isEmpty()) { throw new Exception('Missing attribute'); } $projectId = $project->getId(); - $event = 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].delete'; - $collectionId = $collection->getId(); - $key = $attribute->getAttribute('key', ''); - $type = $attribute->getAttribute('type', ''); + $event = 'databases.[databaseId].tables.[tableId].columns.[columnId].delete'; + $tableId = $table->getId(); + $key = $column->getAttribute('key', ''); + $type = $column->getAttribute('type', ''); $project = $dbForPlatform->getDocument('projects', $projectId); - $options = $attribute->getAttribute('options', []); - $relatedAttribute = new Document(); - $relatedCollection = new Document(); + $options = $column->getAttribute('options', []); + $relatedColumn = new Document(); + $relatedTable = new Document(); // possible states at this point: // - available: should not land in queue; controller flips these to 'deleting' // - processing: hasn't finished creating @@ -257,89 +257,89 @@ class Databases extends Action try { if ($type === Database::VAR_RELATIONSHIP) { if ($options['twoWay']) { - $relatedCollection = $dbForProject->getDocument('database_' . $database->getInternalId(), $options['relatedCollection']); - if ($relatedCollection->isEmpty()) { - throw new DatabaseException('Collection not found'); + $relatedTable = $dbForProject->getDocument('database_' . $database->getInternalId(), $options['relatedCollection']); + if ($relatedTable->isEmpty()) { + throw new DatabaseException('Table not found'); } - $relatedAttribute = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $options['twoWayKey']); + $relatedColumn = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $options['twoWayKey']); } - if (!$dbForProject->deleteRelationship('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $key)) { - $dbForProject->updateDocument('attributes', $relatedAttribute->getId(), $relatedAttribute->setAttribute('status', 'stuck')); + if (!$dbForProject->deleteRelationship('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $key)) { + $dbForProject->updateDocument('attributes', $relatedColumn->getId(), $relatedColumn->setAttribute('status', 'stuck')); throw new DatabaseException('Failed to delete Relationship'); } - } elseif (!$dbForProject->deleteAttribute('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $key)) { - throw new DatabaseException('Failed to delete Attribute'); + } elseif (!$dbForProject->deleteAttribute('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $key)) { + throw new DatabaseException('Failed to delete Column'); } - $dbForProject->deleteDocument('attributes', $attribute->getId()); + $dbForProject->deleteDocument('attributes', $column->getId()); - if (!$relatedAttribute->isEmpty()) { - $dbForProject->deleteDocument('attributes', $relatedAttribute->getId()); + if (!$relatedColumn->isEmpty()) { + $dbForProject->deleteDocument('attributes', $relatedColumn->getId()); } } catch (NotFound $e) { Console::error($e->getMessage()); - $dbForProject->deleteDocument('attributes', $attribute->getId()); + $dbForProject->deleteDocument('attributes', $column->getId()); - if (!$relatedAttribute->isEmpty()) { - $dbForProject->deleteDocument('attributes', $relatedAttribute->getId()); + if (!$relatedColumn->isEmpty()) { + $dbForProject->deleteDocument('attributes', $relatedColumn->getId()); } } catch (\Throwable $e) { Console::error($e->getMessage()); if ($e instanceof DatabaseException) { - $attribute->setAttribute('error', $e->getMessage()); - if (!$relatedAttribute->isEmpty()) { - $relatedAttribute->setAttribute('error', $e->getMessage()); + $column->setAttribute('error', $e->getMessage()); + if (!$relatedColumn->isEmpty()) { + $relatedColumn->setAttribute('error', $e->getMessage()); } } $dbForProject->updateDocument( 'attributes', - $attribute->getId(), - $attribute->setAttribute('status', 'stuck') + $column->getId(), + $column->setAttribute('status', 'stuck') ); - if (!$relatedAttribute->isEmpty()) { + if (!$relatedColumn->isEmpty()) { $dbForProject->updateDocument( 'attributes', - $relatedAttribute->getId(), - $relatedAttribute->setAttribute('status', 'stuck') + $relatedColumn->getId(), + $relatedColumn->setAttribute('status', 'stuck') ); } throw $e; } finally { - $this->trigger($database, $collection, $project, $event, $queueForRealtime, $attribute); + $this->trigger($database, $table, $project, $event, $queueForRealtime, $column); } // The underlying database removes/rebuilds indexes when attribute is removed // Update indexes table with changes /** @var Document[] $indexes */ - $indexes = $collection->getAttribute('indexes', []); + $indexes = $table->getAttribute('indexes', []); foreach ($indexes as $index) { - /** @var string[] $attributes */ - $attributes = $index->getAttribute('attributes'); + /** @var string[] $columns */ + $columns = $index->getAttribute('attributes'); $lengths = $index->getAttribute('lengths'); $orders = $index->getAttribute('orders'); - $found = \array_search($key, $attributes); + $found = \array_search($key, $columns); if ($found !== false) { // If found, remove entry from attributes, lengths, and orders // array_values wraps array_diff to reindex array keys // when found attribute is removed from array - $attributes = \array_values(\array_diff($attributes, [$attributes[$found]])); + $columns = \array_values(\array_diff($columns, [$columns[$found]])); $lengths = \array_values(\array_diff($lengths, isset($lengths[$found]) ? [$lengths[$found]] : [])); $orders = \array_values(\array_diff($orders, isset($orders[$found]) ? [$orders[$found]] : [])); - if (empty($attributes)) { + if (empty($columns)) { $dbForProject->deleteDocument('indexes', $index->getId()); } else { $index - ->setAttribute('attributes', $attributes, Document::SET_TYPE_ASSIGN) + ->setAttribute('attributes', $columns, Document::SET_TYPE_ASSIGN) ->setAttribute('lengths', $lengths, Document::SET_TYPE_ASSIGN) ->setAttribute('orders', $orders, Document::SET_TYPE_ASSIGN); @@ -357,7 +357,7 @@ class Databases extends Action } if ($exists) { // Delete the duplicate if created, else update in db - $this->deleteIndex($database, $collection, $index, $project, $dbForPlatform, $dbForProject, $queueForRealtime); + $this->deleteIndex($database, $table, $index, $project, $dbForPlatform, $dbForProject, $queueForRealtime); } else { $dbForProject->updateDocument('indexes', $index->getId(), $index); } @@ -365,17 +365,17 @@ class Databases extends Action } } } finally { - $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collectionId); + $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $tableId); - if (! $relatedCollection->isEmpty()) { - $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $relatedCollection->getId()); + if (! $relatedTable->isEmpty()) { + $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $relatedTable->getId()); } } } /** * @param Document $database - * @param Document $collection + * @param Document $table * @param Document $index * @param Document $project * @param Database $dbForPlatform @@ -388,9 +388,9 @@ class Databases extends Action * @throws DatabaseException * @throws \Throwable */ - private function createIndex(Document $database, Document $collection, Document $index, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime): void + private function createIndex(Document $database, Document $table, Document $index, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime): void { - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception('Missing collection'); } if ($index->isEmpty()) { @@ -398,8 +398,8 @@ class Databases extends Action } $projectId = $project->getId(); - $event = 'databases.[databaseId].collections.[collectionId].indexes.[indexId].update'; - $collectionId = $collection->getId(); + $event = 'databases.[databaseId].tables.[tableId].indexes.[indexId].update'; + $collectionId = $table->getId(); $key = $index->getAttribute('key', ''); $type = $index->getAttribute('type', ''); $attributes = $index->getAttribute('attributes', []); @@ -408,7 +408,7 @@ class Databases extends Action $project = $dbForPlatform->getDocument('projects', $projectId); try { - if (!$dbForProject->createIndex('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $key, $type, $attributes, $lengths, $orders)) { + if (!$dbForProject->createIndex('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $key, $type, $attributes, $lengths, $orders)) { throw new DatabaseException('Failed to create Index'); } $dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'available')); @@ -425,14 +425,14 @@ class Databases extends Action throw $e; } finally { - $this->trigger($database, $collection, $project, $event, $queueForRealtime, null, $index); + $this->trigger($database, $table, $project, $event, $queueForRealtime, null, $index); $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collectionId); } } /** * @param Document $database - * @param Document $collection + * @param Document $table * @param Document $index * @param Document $project * @param Database $dbForPlatform @@ -445,9 +445,9 @@ class Databases extends Action * @throws DatabaseException * @throws \Throwable */ - private function deleteIndex(Document $database, Document $collection, Document $index, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime): void + private function deleteIndex(Document $database, Document $table, Document $index, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime): void { - if ($collection->isEmpty()) { + if ($table->isEmpty()) { throw new Exception('Missing collection'); } if ($index->isEmpty()) { @@ -455,13 +455,13 @@ class Databases extends Action } $projectId = $project->getId(); - $event = 'databases.[databaseId].collections.[collectionId].indexes.[indexId].delete'; + $event = 'databases.[databaseId].tables.[tableId].indexes.[indexId].delete'; $key = $index->getAttribute('key'); $status = $index->getAttribute('status', ''); $project = $dbForPlatform->getDocument('projects', $projectId); try { - if ($status !== 'failed' && !$dbForProject->deleteIndex('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $key)) { + if ($status !== 'failed' && !$dbForProject->deleteIndex('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $key)) { throw new DatabaseException('Failed to delete index'); } $dbForProject->deleteDocument('indexes', $index->getId()); @@ -481,8 +481,8 @@ class Databases extends Action throw $e; } finally { - $this->trigger($database, $collection, $project, $event, $queueForRealtime, null, $index); - $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collection->getId()); + $this->trigger($database, $table, $project, $event, $queueForRealtime, null, $index); + $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $table->getId()); } } @@ -496,7 +496,7 @@ class Databases extends Action protected function deleteDatabase(Document $database, Document $project, $dbForProject): void { $this->deleteByGroup('database_' . $database->getInternalId(), [], $dbForProject, function ($collection) use ($database, $project, $dbForProject) { - $this->deleteCollection($database, $collection, $project, $dbForProject); + $this->deleteTable($database, $collection, $project, $dbForProject); }); $dbForProject->deleteCollection('database_' . $database->getInternalId()); @@ -504,7 +504,7 @@ class Databases extends Action /** * @param Document $database - * @param Document $collection + * @param Document $table * @param Document $project * @param Database $dbForProject * @return void @@ -515,17 +515,17 @@ class Databases extends Action * @throws Structure * @throws Exception */ - protected function deleteCollection(Document $database, Document $collection, Document $project, Database $dbForProject): void + protected function deleteTable(Document $database, Document $table, Document $project, Database $dbForProject): void { - if ($collection->isEmpty()) { - throw new Exception('Missing collection'); + if ($table->isEmpty()) { + throw new Exception('Missing table'); } - $collectionId = $collection->getId(); - $collectionInternalId = $collection->getInternalId(); + $collectionId = $table->getId(); + $collectionInternalId = $table->getInternalId(); $databaseInternalId = $database->getInternalId(); - $dbForProject->deleteCollection('database_' . $databaseInternalId . '_collection_' . $collection->getInternalId()); + $dbForProject->deleteCollection('database_' . $databaseInternalId . '_collection_' . $table->getInternalId()); /** * Related collections relating to current collection @@ -558,50 +558,50 @@ class Databases extends Action /** - * @param string $collectionId + * @param string $tableId * @param array $queries * @param Database $database * @param callable|null $callback * @return void * @throws Exception */ - protected function deleteByGroup(string $collectionId, array $queries, Database $database, callable $callback = null): void + protected function deleteByGroup(string $tableId, array $queries, Database $database, callable $callback = null): void { $start = \microtime(true); try { $count = $database->deleteDocuments( - $collectionId, + $tableId, $queries, Database::DELETE_BATCH_SIZE, $callback ); } catch (\Throwable $th) { $tenant = $database->getSharedTables() ? 'Tenant:'.$database->getTenant() : ''; - Console::error("Failed to delete documents for collection:{$database->getNamespace()}_{$collectionId} {$tenant} :{$th->getMessage()}"); + Console::error("Failed to delete rows for table:{$database->getNamespace()}_{$tableId} {$tenant} :{$th->getMessage()}"); return; } $end = \microtime(true); - Console::info("Deleted {$count} documents by group in " . ($end - $start) . " seconds"); + Console::info("Deleted {$count} rows by group in " . ($end - $start) . " seconds"); } /** * @param Document $database - * @param Document $collection + * @param Document $table * @param Document $project * @param Realtime $queueForRealtime - * @param Document|null $attribute + * @param Document|null $column * @param Document|null $index * @return void */ protected function trigger( - Document $database, - Document $collection, - Document $project, - string $event, - Realtime $queueForRealtime, - Document|null $attribute = null, + Document $database, + Document $table, + Document $project, + string $event, + Realtime $queueForRealtime, + Document|null $column = null, Document|null $index = null, ): void { $queueForRealtime @@ -609,14 +609,14 @@ class Databases extends Action ->setSubscribers(['console']) ->setEvent($event) ->setParam('databaseId', $database->getId()) - ->setParam('collectionId', $collection->getId()); + ->setParam('tableId', $table->getId()); - if ($attribute !== null && !empty($attribute)) { + if (! empty($column)) { $queueForRealtime - ->setParam('attributeId', $attribute->getId()) - ->setPayload($attribute->getArrayCopy()); + ->setParam('columnId', $column->getId()) + ->setPayload($column->getArrayCopy()); } - if ($index !== null && !empty($index)) { + if (! empty($index)) { $queueForRealtime ->setParam('indexId', $index->getId()) ->setPayload($index->getArrayCopy()); diff --git a/src/Appwrite/Utopia/Request/Filters/DatabaseAliases.php b/src/Appwrite/Utopia/Request/Filters/DatabaseAliases.php new file mode 100644 index 0000000000..b2b772be11 --- /dev/null +++ b/src/Appwrite/Utopia/Request/Filters/DatabaseAliases.php @@ -0,0 +1,38 @@ + 'rowId', + 'attributes' => 'columns', + 'collectionId' => 'tableId', + 'attributeId' => 'columnId', + 'relatedCollectionId' => 'relatedTableId' + ]; + + public function parse(array $content, string $model): array + { + return $this->overrideDatabaseParams($content, $model); + } + + protected function overrideDatabaseParams(array $content, string $model): array + { + if (!str_starts_with($model, 'databases.')) { + return $content; + } + + $intersect = array_intersect_key(self::PARAMS_MAP, $content); + + foreach ($intersect as $oldKey => $newKey) { + $content[$newKey] = $content[$oldKey]; + unset($content[$oldKey]); + } + + return $content; + } +} diff --git a/src/Appwrite/Utopia/Request/Filters/V19.php b/src/Appwrite/Utopia/Request/Filters/V19.php index 9597f40570..041c126a69 100644 --- a/src/Appwrite/Utopia/Request/Filters/V19.php +++ b/src/Appwrite/Utopia/Request/Filters/V19.php @@ -6,32 +6,18 @@ use Appwrite\Utopia\Request\Filter; class V19 extends Filter { + // Convert 1.6 params to 1.7 public function parse(array $content, string $model): array { - return $this->overrideDatabaseParams($content, $model); - } - - // Database terminology change handling. - protected function overrideDatabaseParams(array $content, string $model): array - { - if (!str_starts_with($model, 'databases.')) { - return $content; - } - - $map = [ - 'collectionId' => 'tableId', - 'attributeId' => 'columnId', - 'attributes' => 'columns', - 'documentId' => 'rowId', - 'relatedCollectionId' => 'relatedTableId' - ]; - - foreach ($map as $oldKey => $newKey) { - if (isset($content[$oldKey])) { - $content[$newKey] = $content[$oldKey]; - unset($content[$oldKey]); - } + /* + Uncomment with first request filter; current is just a copy of V18 + switch ($model) { + case 'functions.create': + $content['something'] = $content['somethingElse'] ?? ""; + unset($content['something']); + break; } + */ return $content; } diff --git a/src/Appwrite/Utopia/Response/Model/Webhook.php b/src/Appwrite/Utopia/Response/Model/Webhook.php index 57abb4900d..8e53b41e6e 100644 --- a/src/Appwrite/Utopia/Response/Model/Webhook.php +++ b/src/Appwrite/Utopia/Response/Model/Webhook.php @@ -49,7 +49,7 @@ class Webhook extends Model 'type' => self::TYPE_STRING, 'description' => 'Webhook trigger events.', 'default' => [], - 'example' => 'database.collections.update', + 'example' => 'database.tables.update', 'array' => true, ]) ->addRule('security', [ From f94ecc885a4c4852f90f1c2ceac2d1c5d6adea58 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 27 Apr 2025 10:36:21 +0530 Subject: [PATCH 006/362] fix: tests as per new events system. --- tests/e2e/Services/Realtime/RealtimeBase.php | 6 +- .../Realtime/RealtimeConsoleClientTest.php | 98 ++++----- .../Realtime/RealtimeCustomClientTest.php | 202 +++++++++--------- tests/e2e/Services/Webhooks/WebhooksBase.php | 92 ++++---- .../Webhooks/WebhooksCustomServerTest.php | 40 ++-- tests/unit/Event/EventTest.php | 78 +++---- tests/unit/Event/MockPublisher.php | 2 +- .../Event/Validator/EventValidatorTest.php | 44 ++-- .../Validator/FunctionEventValidatorTest.php | 44 ++-- tests/unit/Messaging/MessagingTest.php | 38 ++-- 10 files changed, 322 insertions(+), 322 deletions(-) diff --git a/tests/e2e/Services/Realtime/RealtimeBase.php b/tests/e2e/Services/Realtime/RealtimeBase.php index 99f31134c0..0004781773 100644 --- a/tests/e2e/Services/Realtime/RealtimeBase.php +++ b/tests/e2e/Services/Realtime/RealtimeBase.php @@ -42,7 +42,7 @@ trait RealtimeBase /** * Test for SUCCESS */ - $client = $this->getWebsocket(["documents"]); + $client = $this->getWebsocket(["rows"]); $this->assertNotEmpty($client->receive()); $client->close(); } @@ -58,7 +58,7 @@ trait RealtimeBase $this->assertEquals(1008, $payload["data"]["code"]); $this->assertEquals("Missing channels", $payload["data"]["message"]); \usleep(250000); // 250ms - $this->expectException(ConnectionException::class); // Check if server disconnnected client + $this->expectException(ConnectionException::class); // Check if server disconnected client $client->close(); } @@ -83,7 +83,7 @@ trait RealtimeBase $payload["data"]["message"] ); \usleep(250000); // 250ms - $this->expectException(ConnectionException::class); // Check if server disconnnected client + $this->expectException(ConnectionException::class); // Check if server disconnected client $client->close(); } } diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index 4e27457b05..a206692ea2 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -201,12 +201,12 @@ class RealtimeConsoleClientTest extends Scope $this->assertCount(2, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); $this->assertContains("projects.{$projectId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.attributes.*.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.attributes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.columns.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.columns.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.columns.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.columns.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); @@ -222,12 +222,12 @@ class RealtimeConsoleClientTest extends Scope $this->assertCount(2, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); $this->assertContains("projects.{$projectId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.attributes.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.attributes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.columns.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.columns.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.columns.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.columns.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); @@ -292,12 +292,12 @@ class RealtimeConsoleClientTest extends Scope $this->assertCount(2, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); $this->assertContains("projects.{$projectId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.indexes.*.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.indexes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.indexes.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.indexes.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals('processing', $response['data']['payload']['status']); @@ -311,12 +311,12 @@ class RealtimeConsoleClientTest extends Scope $this->assertCount(2, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); $this->assertContains("projects.{$projectId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.indexes.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.indexes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.indexes.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.indexes.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $this->assertEquals('available', $response['data']['payload']['status']); @@ -372,12 +372,12 @@ class RealtimeConsoleClientTest extends Scope $this->assertCount(2, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); $this->assertContains("projects.{$projectId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.indexes.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.indexes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.indexes.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.indexes.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); /** Delete index generates two events. One from the API and one from the database worker */ @@ -390,12 +390,12 @@ class RealtimeConsoleClientTest extends Scope $this->assertCount(2, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); $this->assertContains("projects.{$projectId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.indexes.*.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.indexes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.indexes.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.indexes.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $client->close(); @@ -449,12 +449,12 @@ class RealtimeConsoleClientTest extends Scope $this->assertCount(2, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); $this->assertContains("projects.{$projectId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.attributes.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.attributes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.columns.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.columns.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.columns.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.columns.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $response = json_decode($client->receive(), true); @@ -467,12 +467,12 @@ class RealtimeConsoleClientTest extends Scope $this->assertCount(2, $response['data']['channels']); $this->assertContains('console', $response['data']['channels']); $this->assertContains("projects.{$projectId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.attributes.*.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.attributes.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.columns.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.columns.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.columns.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.columns.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); $client->close(); @@ -607,7 +607,7 @@ class RealtimeConsoleClientTest extends Scope $this->assertContains("projects.{$projectId}", $response['data']['channels']); $this->assertArrayHasKey('buildLogs', $response['data']['payload']); - // Ignore comparasion for first payload + // Ignore comparison for first payload if ($previousBuildLogs !== null) { $this->assertNotEquals($previousBuildLogs, $response['data']['payload']['buildLogs']); } diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index e356397408..d279bb45c7 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -31,7 +31,7 @@ class RealtimeCustomClientTest extends Scope 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session ]; - $client = $this->getWebsocket(['documents'], $headers); + $client = $this->getWebsocket(['rows'], $headers); $response = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $response); @@ -40,7 +40,7 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($response['data']); $this->assertNotEmpty($response['data']['user']); $this->assertCount(1, $response['data']['channels']); - $this->assertContains('documents', $response['data']['channels']); + $this->assertContains('rows', $response['data']['channels']); $this->assertEquals($userId, $response['data']['user']['$id']); $client->close(); @@ -60,7 +60,7 @@ class RealtimeCustomClientTest extends Scope $client->close(); - $client = $this->getWebsocket(['account', 'documents', 'account.123'], $headers); + $client = $this->getWebsocket(['account', 'rows', 'account.123'], $headers); $response = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $response); @@ -69,7 +69,7 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($response['data']); $this->assertNotEmpty($response['data']['user']); $this->assertCount(3, $response['data']['channels']); - $this->assertContains('documents', $response['data']['channels']); + $this->assertContains('rows', $response['data']['channels']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); $this->assertEquals($userId, $response['data']['user']['$id']); @@ -80,12 +80,12 @@ class RealtimeCustomClientTest extends Scope 'account', 'files', 'files.1', - 'collections', - 'collections.1.documents', - 'collections.2.documents', - 'documents', - 'collections.1.documents.1', - 'collections.2.documents.2', + 'tables', + 'tables.1.rows', + 'tables.2.rows', + 'rows', + 'tables.1.rows.1', + 'tables.2.rows.2', ], $headers); $response = json_decode($client->receive(), true); @@ -100,12 +100,12 @@ class RealtimeCustomClientTest extends Scope $this->assertContains('account.' . $userId, $response['data']['channels']); $this->assertContains('files', $response['data']['channels']); $this->assertContains('files.1', $response['data']['channels']); - $this->assertContains('collections', $response['data']['channels']); - $this->assertContains('collections.1.documents', $response['data']['channels']); - $this->assertContains('collections.2.documents', $response['data']['channels']); - $this->assertContains('documents', $response['data']['channels']); - $this->assertContains('collections.1.documents.1', $response['data']['channels']); - $this->assertContains('collections.2.documents.2', $response['data']['channels']); + $this->assertContains('tables', $response['data']['channels']); + $this->assertContains('tables.1.rows', $response['data']['channels']); + $this->assertContains('tables.2.rows', $response['data']['channels']); + $this->assertContains('rows', $response['data']['channels']); + $this->assertContains('tables.1.rows.1', $response['data']['channels']); + $this->assertContains('tables.2.rows.2', $response['data']['channels']); $this->assertEquals($userId, $response['data']['user']['$id']); $client->close(); @@ -245,7 +245,7 @@ class RealtimeCustomClientTest extends Scope /** * Test for FAILURE */ - $client = $this->getWebsocket(['documents'], ['origin' => 'http://appwrite.unknown']); + $client = $this->getWebsocket(['rows'], ['origin' => 'http://appwrite.unknown']); $payload = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $payload); @@ -675,7 +675,7 @@ class RealtimeCustomClientTest extends Scope $session = $user['session'] ?? ''; $projectId = $this->getProject()['$id']; - $client = $this->getWebsocket(['documents', 'collections'], [ + $client = $this->getWebsocket(['rows', 'tables'], [ 'origin' => 'http://localhost', 'cookie' => 'a_session_' . $projectId . '=' . $session ]); @@ -687,8 +687,8 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('connected', $response['type']); $this->assertNotEmpty($response['data']); $this->assertCount(2, $response['data']['channels']); - $this->assertContains('documents', $response['data']['channels']); - $this->assertContains('collections', $response['data']['channels']); + $this->assertContains('rows', $response['data']['channels']); + $this->assertContains('tables', $response['data']['channels']); $this->assertNotEmpty($response['data']['user']); $this->assertEquals($user['$id'], $response['data']['user']['$id']); @@ -770,19 +770,19 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); - $this->assertContains('documents', $response['data']['channels']); - $this->assertContains('databases.' . $databaseId . '.collections.' . $actorsId . '.documents.' . $documentId, $response['data']['channels']); - $this->assertContains('databases.' . $databaseId . '.collections.' . $actorsId . '.documents', $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.*.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains('rows', $response['data']['channels']); + $this->assertContains('databases.' . $databaseId . '.tables.' . $actorsId . '.rows.' . $documentId, $response['data']['channels']); + $this->assertContains('databases.' . $databaseId . '.tables.' . $actorsId . '.rows', $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); @@ -814,19 +814,19 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); - $this->assertContains('documents', $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains('rows', $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); @@ -868,19 +868,19 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); - $this->assertContains('documents', $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains('rows', $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); @@ -895,7 +895,7 @@ class RealtimeCustomClientTest extends Scope $session = $user['session'] ?? ''; $projectId = $this->getProject()['$id']; - $client = $this->getWebsocket(['documents', 'collections'], [ + $client = $this->getWebsocket(['rows', 'tables'], [ 'origin' => 'http://localhost', 'cookie' => 'a_session_' . $projectId . '=' . $session ]); @@ -907,8 +907,8 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('connected', $response['type']); $this->assertNotEmpty($response['data']); $this->assertCount(2, $response['data']['channels']); - $this->assertContains('documents', $response['data']['channels']); - $this->assertContains('collections', $response['data']['channels']); + $this->assertContains('rows', $response['data']['channels']); + $this->assertContains('tables', $response['data']['channels']); $this->assertNotEmpty($response['data']['user']); $this->assertEquals($user['$id'], $response['data']['user']['$id']); @@ -988,19 +988,19 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); - $this->assertContains('documents', $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.*.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains('rows', $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); @@ -1027,19 +1027,19 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); - $this->assertContains('documents', $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains('rows', $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); @@ -1077,19 +1077,19 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); $this->assertCount(3, $response['data']['channels']); - $this->assertContains('documents', $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains('rows', $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*.rows.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index c743810feb..5cd95c220d 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -83,10 +83,10 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -155,12 +155,12 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.attributes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.attributes.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.attributes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.attributes.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.columns.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.columns.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.columns.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.columns.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -181,12 +181,12 @@ trait WebhooksBase // $this->assertEquals($webhook['method'], 'DELETE'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.attributes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.attributes.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.attributes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.attributes.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.columns.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.columns.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.columns.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.columns.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -234,16 +234,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.documents.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.documents.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.*.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.*.documents.{$documentId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -296,16 +296,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.documents.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.documents.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.*.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.*.documents.{$documentId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -366,16 +366,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.documents.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.documents.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.*.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.*.documents.{$documentId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index d2f132e960..14188a807b 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -48,10 +48,10 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -96,12 +96,12 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.indexes.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.indexes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.indexes.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.indexes.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.indexes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.indexes.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -121,12 +121,12 @@ class WebhooksCustomServerTest extends Scope // $this->assertEquals($webhook['method'], 'DELETE'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.indexes.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.indexes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.indexes.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.indexes.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.indexes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.indexes.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -189,10 +189,10 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.collections.{$id}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$id}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); diff --git a/tests/unit/Event/EventTest.php b/tests/unit/Event/EventTest.php index c852cf2757..d5936e4b8f 100644 --- a/tests/unit/Event/EventTest.php +++ b/tests/unit/Event/EventTest.php @@ -93,57 +93,57 @@ class EventTest extends TestCase $this->assertContains('users.*.update', $event); $this->assertContains('users.*', $event); - $event = Event::generateEvents('collections.[collectionId].documents.[documentId].create', [ - 'collectionId' => 'chapters', - 'documentId' => 'prolog', + $event = Event::generateEvents('tables.[tableId].rows.[rowId].create', [ + 'tableId' => 'chapters', + 'rowId' => 'prolog', ]); $this->assertCount(10, $event); - $this->assertContains('collections.chapters.documents.prolog.create', $event); - $this->assertContains('collections.chapters.documents.prolog', $event); - $this->assertContains('collections.chapters.documents.*.create', $event); - $this->assertContains('collections.chapters.documents.*', $event); - $this->assertContains('collections.chapters', $event); - $this->assertContains('collections.*.documents.prolog.create', $event); - $this->assertContains('collections.*.documents.prolog', $event); - $this->assertContains('collections.*.documents.*.create', $event); - $this->assertContains('collections.*.documents.*', $event); - $this->assertContains('collections.*', $event); + $this->assertContains('tables.chapters.rows.prolog.create', $event); + $this->assertContains('tables.chapters.rows.prolog', $event); + $this->assertContains('tables.chapters.rows.*.create', $event); + $this->assertContains('tables.chapters.rows.*', $event); + $this->assertContains('tables.chapters', $event); + $this->assertContains('tables.*.rows.prolog.create', $event); + $this->assertContains('tables.*.rows.prolog', $event); + $this->assertContains('tables.*.rows.*.create', $event); + $this->assertContains('tables.*.rows.*', $event); + $this->assertContains('tables.*', $event); - $event = Event::generateEvents('databases.[databaseId].collections.[collectionId].documents.[documentId].create', [ + $event = Event::generateEvents('databases.[databaseId].tables.[tableId].rows.[rowId].create', [ 'databaseId' => 'chaptersDB', - 'collectionId' => 'chapters', - 'documentId' => 'prolog', + 'tableId' => 'chapters', + 'rowId' => 'prolog', ]); $this->assertCount(22, $event); - $this->assertContains('databases.chaptersDB.collections.chapters.documents.prolog.create', $event); - $this->assertContains('databases.chaptersDB.collections.chapters.documents.prolog', $event); - $this->assertContains('databases.chaptersDB.collections.chapters.documents.*.create', $event); - $this->assertContains('databases.chaptersDB.collections.chapters.documents.*', $event); - $this->assertContains('databases.chaptersDB.collections.chapters', $event); - $this->assertContains('databases.chaptersDB.collections.*.documents.prolog.create', $event); - $this->assertContains('databases.chaptersDB.collections.*.documents.prolog', $event); - $this->assertContains('databases.chaptersDB.collections.*', $event); + $this->assertContains('databases.chaptersDB.tables.chapters.rows.prolog.create', $event); + $this->assertContains('databases.chaptersDB.tables.chapters.rows.prolog', $event); + $this->assertContains('databases.chaptersDB.tables.chapters.rows.*.create', $event); + $this->assertContains('databases.chaptersDB.tables.chapters.rows.*', $event); + $this->assertContains('databases.chaptersDB.tables.chapters', $event); + $this->assertContains('databases.chaptersDB.tables.*.rows.prolog.create', $event); + $this->assertContains('databases.chaptersDB.tables.*.rows.prolog', $event); + $this->assertContains('databases.chaptersDB.tables.*', $event); $this->assertContains('databases.chaptersDB', $event); - $this->assertContains('databases.*.collections.chapters.documents.prolog.create', $event); - $this->assertContains('databases.*.collections.chapters.documents.prolog', $event); - $this->assertContains('databases.*.collections.chapters', $event); - $this->assertContains('databases.*.collections.*.documents.*.create', $event); - $this->assertContains('databases.*.collections.*.documents.*', $event); - $this->assertContains('databases.*.collections.*', $event); + $this->assertContains('databases.*.tables.chapters.rows.prolog.create', $event); + $this->assertContains('databases.*.tables.chapters.rows.prolog', $event); + $this->assertContains('databases.*.tables.chapters', $event); + $this->assertContains('databases.*.tables.*.rows.*.create', $event); + $this->assertContains('databases.*.tables.*.rows.*', $event); + $this->assertContains('databases.*.tables.*', $event); $this->assertContains('databases.*', $event); - $this->assertContains('databases.*.collections.*.documents.prolog', $event); - $this->assertContains('databases.*.collections.*.documents.prolog.create', $event); - $this->assertContains('databases.*.collections.chapters.documents.*', $event); - $this->assertContains('databases.*.collections.chapters.documents.*.create', $event); - $this->assertContains('databases.chaptersDB.collections.*.documents.*', $event); - $this->assertContains('databases.chaptersDB.collections.*.documents.*.create', $event); + $this->assertContains('databases.*.tables.*.rows.prolog', $event); + $this->assertContains('databases.*.tables.*.rows.prolog.create', $event); + $this->assertContains('databases.*.tables.chapters.rows.*', $event); + $this->assertContains('databases.*.tables.chapters.rows.*.create', $event); + $this->assertContains('databases.chaptersDB.tables.*.rows.*', $event); + $this->assertContains('databases.chaptersDB.tables.*.rows.*.create', $event); try { - $event = Event::generateEvents('collections.[collectionId].documents.[documentId].create', [ - 'collectionId' => 'chapters' + $event = Event::generateEvents('tables.[tableId].rows.[rowId].create', [ + 'tableId' => 'chapters' ]); $this->fail(); } catch (\Throwable $th) { @@ -151,7 +151,7 @@ class EventTest extends TestCase } try { - $event = Event::generateEvents('collections.[collectionId].documents.[documentId].create'); + $event = Event::generateEvents('tables.[tableId].rows.[rowId].create'); $this->fail(); } catch (\Throwable $th) { $this->assertInstanceOf(InvalidArgumentException::class, $th, 'An invalid exception was thrown'); diff --git a/tests/unit/Event/MockPublisher.php b/tests/unit/Event/MockPublisher.php index 54fcc89358..0b812e7032 100644 --- a/tests/unit/Event/MockPublisher.php +++ b/tests/unit/Event/MockPublisher.php @@ -7,7 +7,7 @@ use Utopia\Queue\Queue; class MockPublisher implements Publisher { - private $events = []; + private array $events = []; public function enqueue(Queue $queue, array $payload): bool { diff --git a/tests/unit/Event/Validator/EventValidatorTest.php b/tests/unit/Event/Validator/EventValidatorTest.php index e9f652adeb..6885d20bfb 100644 --- a/tests/unit/Event/Validator/EventValidatorTest.php +++ b/tests/unit/Event/Validator/EventValidatorTest.php @@ -29,27 +29,27 @@ class EventValidatorTest extends TestCase $this->assertTrue($this->object->isValid('users.*.update.email')); $this->assertTrue($this->object->isValid('users.*.update')); $this->assertTrue($this->object->isValid('users.*')); - $this->assertTrue($this->object->isValid('databases.books.collections.chapters.documents.prolog.create')); - $this->assertTrue($this->object->isValid('databases.books.collections.chapters.documents.prolog')); - $this->assertTrue($this->object->isValid('databases.books.collections.chapters.documents.*.create')); - $this->assertTrue($this->object->isValid('databases.books.collections.chapters.documents.*')); - $this->assertTrue($this->object->isValid('databases.books.collections.*.documents.prolog.create')); - $this->assertTrue($this->object->isValid('databases.books.collections.*.documents.prolog')); - $this->assertTrue($this->object->isValid('databases.books.collections.*.documents.*.create')); - $this->assertTrue($this->object->isValid('databases.books.collections.*.documents.*')); - $this->assertTrue($this->object->isValid('databases.*.collections.chapters.documents.prolog.create')); - $this->assertTrue($this->object->isValid('databases.*.collections.chapters.documents.prolog')); - $this->assertTrue($this->object->isValid('databases.*.collections.chapters.documents.*.create')); - $this->assertTrue($this->object->isValid('databases.*.collections.chapters.documents.*')); - $this->assertTrue($this->object->isValid('databases.*.collections.*.documents.prolog.create')); - $this->assertTrue($this->object->isValid('databases.*.collections.*.documents.prolog')); - $this->assertTrue($this->object->isValid('databases.*.collections.*.documents.*.create')); - $this->assertTrue($this->object->isValid('databases.*.collections.*.documents.*')); - $this->assertTrue($this->object->isValid('databases.*.collections.*')); + $this->assertTrue($this->object->isValid('databases.books.tables.chapters.rows.prolog.create')); + $this->assertTrue($this->object->isValid('databases.books.tables.chapters.rows.prolog')); + $this->assertTrue($this->object->isValid('databases.books.tables.chapters.rows.*.create')); + $this->assertTrue($this->object->isValid('databases.books.tables.chapters.rows.*')); + $this->assertTrue($this->object->isValid('databases.books.tables.*.rows.prolog.create')); + $this->assertTrue($this->object->isValid('databases.books.tables.*.rows.prolog')); + $this->assertTrue($this->object->isValid('databases.books.tables.*.rows.*.create')); + $this->assertTrue($this->object->isValid('databases.books.tables.*.rows.*')); + $this->assertTrue($this->object->isValid('databases.*.tables.chapters.rows.prolog.create')); + $this->assertTrue($this->object->isValid('databases.*.tables.chapters.rows.prolog')); + $this->assertTrue($this->object->isValid('databases.*.tables.chapters.rows.*.create')); + $this->assertTrue($this->object->isValid('databases.*.tables.chapters.rows.*')); + $this->assertTrue($this->object->isValid('databases.*.tables.*.rows.prolog.create')); + $this->assertTrue($this->object->isValid('databases.*.tables.*.rows.prolog')); + $this->assertTrue($this->object->isValid('databases.*.tables.*.rows.*.create')); + $this->assertTrue($this->object->isValid('databases.*.tables.*.rows.*')); + $this->assertTrue($this->object->isValid('databases.*.tables.*')); $this->assertTrue($this->object->isValid('databases.*')); $this->assertTrue($this->object->isValid('databases.books')); - $this->assertTrue($this->object->isValid('databases.books.collections.chapters')); - $this->assertTrue($this->object->isValid('databases.books.collections.*')); + $this->assertTrue($this->object->isValid('databases.books.tables.chapters')); + $this->assertTrue($this->object->isValid('databases.books.tables.*')); $this->assertTrue($this->object->isValid('functions.*')); $this->assertTrue($this->object->isValid('buckets.*')); $this->assertTrue($this->object->isValid('teams.*')); @@ -63,9 +63,9 @@ class EventValidatorTest extends TestCase $this->assertFalse($this->object->isValid(null)); $this->assertFalse($this->object->isValid('')); $this->assertFalse($this->object->isValid('unknown.*')); - $this->assertFalse($this->object->isValid('collections')); - $this->assertFalse($this->object->isValid('collections.*.unknown')); - $this->assertFalse($this->object->isValid('collections.*.documents.*.unknown')); + $this->assertFalse($this->object->isValid('tables')); + $this->assertFalse($this->object->isValid('tables.*.unknown')); + $this->assertFalse($this->object->isValid('tables.*.rows.*.unknown')); $this->assertFalse($this->object->isValid('users.torsten.unknown')); $this->assertFalse($this->object->isValid('users.torsten.delete.email')); $this->assertFalse($this->object->isValid('teams.*.memberships.*.update.unknown')); diff --git a/tests/unit/Event/Validator/FunctionEventValidatorTest.php b/tests/unit/Event/Validator/FunctionEventValidatorTest.php index ea59f6771a..9b6e05b9f7 100644 --- a/tests/unit/Event/Validator/FunctionEventValidatorTest.php +++ b/tests/unit/Event/Validator/FunctionEventValidatorTest.php @@ -29,27 +29,27 @@ class FunctionEventValidatorTest extends TestCase $this->assertTrue($this->object->isValid('users.*.update.email')); $this->assertTrue($this->object->isValid('users.*.update')); $this->assertTrue($this->object->isValid('users.*')); - $this->assertTrue($this->object->isValid('databases.books.collections.chapters.documents.prolog.create')); - $this->assertTrue($this->object->isValid('databases.books.collections.chapters.documents.prolog')); - $this->assertTrue($this->object->isValid('databases.books.collections.chapters.documents.*.create')); - $this->assertTrue($this->object->isValid('databases.books.collections.chapters.documents.*')); - $this->assertTrue($this->object->isValid('databases.books.collections.*.documents.prolog.create')); - $this->assertTrue($this->object->isValid('databases.books.collections.*.documents.prolog')); - $this->assertTrue($this->object->isValid('databases.books.collections.*.documents.*.create')); - $this->assertTrue($this->object->isValid('databases.books.collections.*.documents.*')); - $this->assertTrue($this->object->isValid('databases.*.collections.chapters.documents.prolog.create')); - $this->assertTrue($this->object->isValid('databases.*.collections.chapters.documents.prolog')); - $this->assertTrue($this->object->isValid('databases.*.collections.chapters.documents.*.create')); - $this->assertTrue($this->object->isValid('databases.*.collections.chapters.documents.*')); - $this->assertTrue($this->object->isValid('databases.*.collections.*.documents.prolog.create')); - $this->assertTrue($this->object->isValid('databases.*.collections.*.documents.prolog')); - $this->assertTrue($this->object->isValid('databases.*.collections.*.documents.*.create')); - $this->assertTrue($this->object->isValid('databases.*.collections.*.documents.*')); - $this->assertTrue($this->object->isValid('databases.*.collections.*')); + $this->assertTrue($this->object->isValid('databases.books.tables.chapters.rows.prolog.create')); + $this->assertTrue($this->object->isValid('databases.books.tables.chapters.rows.prolog')); + $this->assertTrue($this->object->isValid('databases.books.tables.chapters.rows.*.create')); + $this->assertTrue($this->object->isValid('databases.books.tables.chapters.rows.*')); + $this->assertTrue($this->object->isValid('databases.books.tables.*.rows.prolog.create')); + $this->assertTrue($this->object->isValid('databases.books.tables.*.rows.prolog')); + $this->assertTrue($this->object->isValid('databases.books.tables.*.rows.*.create')); + $this->assertTrue($this->object->isValid('databases.books.tables.*.rows.*')); + $this->assertTrue($this->object->isValid('databases.*.tables.chapters.rows.prolog.create')); + $this->assertTrue($this->object->isValid('databases.*.tables.chapters.rows.prolog')); + $this->assertTrue($this->object->isValid('databases.*.tables.chapters.rows.*.create')); + $this->assertTrue($this->object->isValid('databases.*.tables.chapters.rows.*')); + $this->assertTrue($this->object->isValid('databases.*.tables.*.rows.prolog.create')); + $this->assertTrue($this->object->isValid('databases.*.tables.*.rows.prolog')); + $this->assertTrue($this->object->isValid('databases.*.tables.*.rows.*.create')); + $this->assertTrue($this->object->isValid('databases.*.tables.*.rows.*')); + $this->assertTrue($this->object->isValid('databases.*.tables.*')); $this->assertTrue($this->object->isValid('databases.*')); $this->assertTrue($this->object->isValid('databases.books')); - $this->assertTrue($this->object->isValid('databases.books.collections.chapters')); - $this->assertTrue($this->object->isValid('databases.books.collections.*')); + $this->assertTrue($this->object->isValid('databases.books.tables.chapters')); + $this->assertTrue($this->object->isValid('databases.books.tables.*')); $this->assertTrue($this->object->isValid('buckets.*')); $this->assertTrue($this->object->isValid('teams.*')); $this->assertTrue($this->object->isValid('users.*')); @@ -62,9 +62,9 @@ class FunctionEventValidatorTest extends TestCase $this->assertFalse($this->object->isValid(null)); $this->assertFalse($this->object->isValid('')); $this->assertFalse($this->object->isValid('unknown.*')); - $this->assertFalse($this->object->isValid('collections')); - $this->assertFalse($this->object->isValid('collections.*.unknown')); - $this->assertFalse($this->object->isValid('collections.*.documents.*.unknown')); + $this->assertFalse($this->object->isValid('tables')); + $this->assertFalse($this->object->isValid('tables.*.unknown')); + $this->assertFalse($this->object->isValid('tables.*.rows.*.unknown')); $this->assertFalse($this->object->isValid('users.torsten.unknown')); $this->assertFalse($this->object->isValid('users.torsten.delete.email')); $this->assertFalse($this->object->isValid('teams.*.memberships.*.update.unknown')); diff --git a/tests/unit/Messaging/MessagingTest.php b/tests/unit/Messaging/MessagingTest.php index c2b6490869..2cb15c5750 100644 --- a/tests/unit/Messaging/MessagingTest.php +++ b/tests/unit/Messaging/MessagingTest.php @@ -35,7 +35,7 @@ class MessagingTest extends TestCase Role::team(ID::custom('def'))->toString(), Role::team(ID::custom('def'), 'guest')->toString(), ], - ['files' => 0, 'documents' => 0, 'documents.789' => 0, 'account.123' => 0] + ['files' => 0, 'rows' => 0, 'rows.789' => 0, 'account.123' => 0] ); $event = [ @@ -115,13 +115,13 @@ class MessagingTest extends TestCase $this->assertEmpty($receivers); $event['roles'] = [Role::any()->toString()]; - $event['data']['channels'] = ['documents.123']; + $event['data']['channels'] = ['rows.123']; $receivers = $realtime->getSubscribers($event); $this->assertEmpty($receivers); - $event['data']['channels'] = ['documents.789']; + $event['data']['channels'] = ['rows.789']; $receivers = $realtime->getSubscribers($event); @@ -153,8 +153,8 @@ class MessagingTest extends TestCase $channels = [ 0 => 'files', - 1 => 'documents', - 2 => 'documents.789', + 1 => 'rows', + 2 => 'rows.789', 3 => 'account', 4 => 'account.456' ]; @@ -162,8 +162,8 @@ class MessagingTest extends TestCase $channels = Realtime::convertChannels($channels, $user->getId()); $this->assertCount(4, $channels); $this->assertArrayHasKey('files', $channels); - $this->assertArrayHasKey('documents', $channels); - $this->assertArrayHasKey('documents.789', $channels); + $this->assertArrayHasKey('rows', $channels); + $this->assertArrayHasKey('rows.789', $channels); $this->assertArrayHasKey('account', $channels); $this->assertArrayNotHasKey('account.456', $channels); } @@ -190,8 +190,8 @@ class MessagingTest extends TestCase ]); $channels = [ 0 => 'files', - 1 => 'documents', - 2 => 'documents.789', + 1 => 'rows', + 2 => 'rows.789', 3 => 'account', 4 => 'account.456' ]; @@ -200,8 +200,8 @@ class MessagingTest extends TestCase $this->assertCount(5, $channels); $this->assertArrayHasKey('files', $channels); - $this->assertArrayHasKey('documents', $channels); - $this->assertArrayHasKey('documents.789', $channels); + $this->assertArrayHasKey('rows', $channels); + $this->assertArrayHasKey('rows.789', $channels); $this->assertArrayHasKey('account.123', $channels); $this->assertArrayHasKey('account', $channels); $this->assertArrayNotHasKey('account.456', $channels); @@ -213,10 +213,10 @@ class MessagingTest extends TestCase * Test Collection Level Permissions */ $result = Realtime::fromPayload( - event: 'databases.database_id.collections.collection_id.documents.document_id.create', + event: 'databases.database_id.tables.collection_id.rows.document_id.create', payload: new Document([ '$id' => ID::custom('test'), - '$collection' => ID::custom('collection'), + '$collection' => ID::custom('table'), '$permissions' => [ Permission::read(Role::team('123abc')), Permission::update(Role::team('123abc')), @@ -226,8 +226,8 @@ class MessagingTest extends TestCase database: new Document([ '$id' => ID::custom('database'), ]), - collection: new Document([ - '$id' => ID::custom('collection'), + table: new Document([ + '$id' => ID::custom('table'), '$permissions' => [ Permission::read(Role::any()), Permission::update(Role::any()), @@ -243,10 +243,10 @@ class MessagingTest extends TestCase * Test Document Level Permissions */ $result = Realtime::fromPayload( - event: 'databases.database_id.collections.collection_id.documents.document_id.create', + event: 'databases.database_id.tables.collection_id.rows.document_id.create', payload: new Document([ '$id' => ID::custom('test'), - '$collection' => ID::custom('collection'), + '$collection' => ID::custom('table'), '$permissions' => [ Permission::read(Role::any()), Permission::update(Role::any()), @@ -256,8 +256,8 @@ class MessagingTest extends TestCase database: new Document([ '$id' => ID::custom('database'), ]), - collection: new Document([ - '$id' => ID::custom('collection'), + table: new Document([ + '$id' => ID::custom('table'), '$permissions' => [ Permission::read(Role::team('123abc')), Permission::update(Role::team('123abc')), From 9cccd89439431736ead2620732fe9fd64fda9048 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 27 Apr 2025 14:08:26 +0530 Subject: [PATCH 007/362] fix: graphql tests. --- tests/e2e/Services/GraphQL/AbuseTest.php | 6 +- tests/e2e/Services/GraphQL/AuthTest.php | 53 +-- tests/e2e/Services/GraphQL/Base.php | 302 +++++++++--------- .../Services/GraphQL/DatabaseClientTest.php | 2 +- .../Services/GraphQL/DatabaseServerTest.php | 287 ++++++++--------- 5 files changed, 326 insertions(+), 324 deletions(-) diff --git a/tests/e2e/Services/GraphQL/AbuseTest.php b/tests/e2e/Services/GraphQL/AbuseTest.php index ea97492c2b..7137123757 100644 --- a/tests/e2e/Services/GraphQL/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/AbuseTest.php @@ -32,7 +32,7 @@ class AbuseTest extends Scope $databaseId = $data['databaseId']; $collectionId = $data['collectionId']; $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::$CREATE_ROW); $max = 120; for ($i = 0; $i <= $max + 1; $i++) { @@ -133,7 +133,7 @@ class AbuseTest extends Scope $databaseId = $response['body']['data']['databasesCreate']['_id']; - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::$CREATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -156,7 +156,7 @@ class AbuseTest extends Scope $collectionId = $response['body']['data']['databasesCreateCollection']['_id']; - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/AuthTest.php b/tests/e2e/Services/GraphQL/AuthTest.php index ecce29f2b3..d8bd0d6326 100644 --- a/tests/e2e/Services/GraphQL/AuthTest.php +++ b/tests/e2e/Services/GraphQL/AuthTest.php @@ -23,7 +23,7 @@ class AuthTest extends Scope private string $token2; private array $database; - private array $collection; + private array $table; public function setUp(): void { @@ -101,7 +101,7 @@ class AuthTest extends Scope ], $gqlPayload); // Create collection - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::$CREATE_TABLE); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, @@ -115,19 +115,19 @@ class AuthTest extends Scope ] ] ]; - $this->collection = $this->client->call(Client::METHOD_POST, '/graphql', [ + $this->table = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'x-appwrite-key' => $this->getProject()['apiKey'], ], $gqlPayload); // Create string attribute - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], + 'collectionId' => $this->table['body']['data']['databasesCreateTable']['_id'], 'key' => 'name', 'size' => 256, 'required' => true, @@ -147,13 +147,13 @@ class AuthTest extends Scope $projectId = $this->getProject()['$id']; // Create document as account 1 - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::$CREATE_ROW); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], + 'collectionId' => $this->table['body']['data']['databasesCreateTable']['_id'], 'documentId' => ID::unique(), 'data' => [ 'name' => 'John Doe', @@ -165,40 +165,41 @@ class AuthTest extends Scope ] ] ]; - $document = $this->client->call(Client::METHOD_POST, '/graphql', [ + + $row = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, ], $gqlPayload); // Try to read as account 1 - $query = $this->getQuery(self::$GET_DOCUMENT); + $query = $this->getQuery(self::$GET_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], - 'documentId' => $document['body']['data']['databasesCreateDocument']['_id'], + 'collectionId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'documentId' => $row['body']['data']['databasesCreateRow']['_id'], ] ]; - $document = $this->client->call(Client::METHOD_POST, '/graphql', [ + $row = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, ], $gqlPayload); - $this->assertIsArray($document['body']['data']['databasesGetDocument']); - $this->assertArrayNotHasKey('errors', $document['body']); + $this->assertIsArray($row['body']['data']['databasesGetRow']); + $this->assertArrayNotHasKey('errors', $row['body']); // Try to read as account 2 - $document = $this->client->call(Client::METHOD_POST, '/graphql', [ + $row = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'cookie' => 'a_session_' . $projectId . '=' . $this->token2, ], $gqlPayload); - $this->assertArrayHasKey('errors', $document['body']); - $this->assertEquals('Document with the requested ID could not be found.', $document['body']['errors'][0]['message']); + $this->assertArrayHasKey('errors', $row['body']); + $this->assertEquals('Document with the requested ID could not be found.', $row['body']['errors'][0]['message']); } public function testValidAuth() @@ -206,13 +207,13 @@ class AuthTest extends Scope $projectId = $this->getProject()['$id']; // Create document as account 1 - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::$CREATE_ROW); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], + 'collectionId' => $this->table['body']['data']['databasesCreateTable']['_id'], 'documentId' => ID::unique(), 'data' => [ 'name' => 'John Doe', @@ -224,29 +225,29 @@ class AuthTest extends Scope ], ] ]; - $document = $this->client->call(Client::METHOD_POST, '/graphql', [ + $row = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, ], $gqlPayload); // Try to delete as account 1 - $query = $this->getQuery(self::$DELETE_DOCUMENT); + $query = $this->getQuery(self::$DELETE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], - 'documentId' => $document['body']['data']['databasesCreateDocument']['_id'], + 'collectionId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'documentId' => $row['body']['data']['databasesCreateRow']['_id'], ] ]; - $document = $this->client->call(Client::METHOD_POST, '/graphql', [ + $row = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, ], $gqlPayload); - $this->assertIsNotArray($document['body']); - $this->assertEquals(204, $document['headers']['status-code']); + $this->assertIsNotArray($row['body']); + $this->assertEquals(204, $row['headers']['status-code']); } } diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 121d40156e..95f446cf6f 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -13,49 +13,49 @@ trait Base public static string $GET_DATABASE = 'get_database'; public static string $UPDATE_DATABASE = 'update_database'; public static string $DELETE_DATABASE = 'delete_database'; - // Collections - public static string $CREATE_COLLECTION = 'create_collection'; - public static string $GET_COLLECTION = 'get_collection'; - public static string $GET_COLLECTIONS = 'list_collections'; - public static string $UPDATE_COLLECTION = 'update_collection'; - public static string $DELETE_COLLECTION = 'delete_collection'; - // Attributes - public static string $CREATE_STRING_ATTRIBUTE = 'create_string_attribute'; - public static string $CREATE_INTEGER_ATTRIBUTE = 'create_integer_attribute'; - public static string $CREATE_FLOAT_ATTRIBUTE = 'create_float_attribute'; - public static string $CREATE_BOOLEAN_ATTRIBUTE = 'create_boolean_attribute'; - public static string $CREATE_URL_ATTRIBUTE = 'create_url_attribute'; - public static string $CREATE_EMAIL_ATTRIBUTE = 'create_email_attribute'; - public static string $CREATE_IP_ATTRIBUTE = 'create_ip_attribute'; - public static string $CREATE_ENUM_ATTRIBUTE = 'create_enum_attribute'; - public static string $CREATE_DATETIME_ATTRIBUTE = 'create_datetime_attribute'; + // Tables + public static string $CREATE_TABLE = 'create_table'; + public static string $GET_TABLE = 'get_table'; + public static string $GET_TABLES = 'list_tables'; + public static string $UPDATE_TABLE = 'update_table'; + public static string $DELETE_TABLE = 'delete_table'; + // Columns + public static string $CREATE_STRING_COLUMN = 'create_string_column'; + public static string $CREATE_INTEGER_COLUMN = 'create_integer_column'; + public static string $CREATE_FLOAT_COLUMN = 'create_float_column'; + public static string $CREATE_BOOLEAN_COLUMN = 'create_boolean_column'; + public static string $CREATE_URL_COLUMN = 'create_url_column'; + public static string $CREATE_EMAIL_COLUMN = 'create_email_column'; + public static string $CREATE_IP_COLUMN = 'create_ip_column'; + public static string $CREATE_ENUM_COLUMN = 'create_enum_column'; + public static string $CREATE_DATETIME_COLUMN = 'create_datetime_column'; - public static string $CREATE_RELATIONSHIP_ATTRIBUTE = 'create_relationship_attribute'; - public static string $UPDATE_STRING_ATTRIBUTE = 'update_string_attribute'; - public static string $UPDATE_INTEGER_ATTRIBUTE = 'update_integer_attribute'; - public static string $UPDATE_FLOAT_ATTRIBUTE = 'update_float_attribute'; - public static string $UPDATE_BOOLEAN_ATTRIBUTE = 'update_boolean_attribute'; - public static string $UPDATE_URL_ATTRIBUTE = 'update_url_attribute'; - public static string $UPDATE_EMAIL_ATTRIBUTE = 'update_email_attribute'; - public static string $UPDATE_IP_ATTRIBUTE = 'update_ip_attribute'; - public static string $UPDATE_ENUM_ATTRIBUTE = 'update_enum_attribute'; - public static string $UPDATE_DATETIME_ATTRIBUTE = 'update_datetime_attribute'; + public static string $CREATE_RELATIONSHIP_COLUMN = 'create_relationship_column'; + public static string $UPDATE_STRING_COLUMN = 'update_string_column'; + public static string $UPDATE_INTEGER_COLUMN = 'update_integer_column'; + public static string $UPDATE_FLOAT_COLUMN = 'update_float_column'; + public static string $UPDATE_BOOLEAN_COLUMN = 'update_boolean_column'; + public static string $UPDATE_URL_COLUMN = 'update_url_column'; + public static string $UPDATE_EMAIL_COLUMN = 'update_email_column'; + public static string $UPDATE_IP_COLUMN = 'update_ip_column'; + public static string $UPDATE_ENUM_COLUMN = 'update_enum_column'; + public static string $UPDATE_DATETIME_COLUMN = 'update_datetime_column'; - public static string $UPDATE_RELATIONSHIP_ATTRIBUTE = 'update_relationship_attribute'; - public static string $GET_ATTRIBUTES = 'get_attributes'; - public static string $GET_ATTRIBUTE = 'get_attribute'; - public static string $DELETE_ATTRIBUTE = 'delete_attribute'; + public static string $UPDATE_RELATIONSHIP_COLUMN = 'update_relationship_column'; + public static string $GET_COLUMNS = 'get_columns'; + public static string $GET_COLUMN = 'get_column'; + public static string $DELETE_COLUMN = 'delete_column'; // Indexes public static string $CREATE_INDEX = 'create_index'; public static string $GET_INDEXES = 'get_indexes'; public static string $GET_INDEX = 'get_index'; public static string $DELETE_INDEX = 'delete_index'; // Documents - public static string $CREATE_DOCUMENT = 'create_document_rest'; - public static string $GET_DOCUMENTS = 'list_documents'; - public static string $GET_DOCUMENT = 'get_document'; - public static string $UPDATE_DOCUMENT = 'update_document'; - public static string $DELETE_DOCUMENT = 'delete_document'; + public static string $CREATE_ROW = 'create_row_rest'; + public static string $GET_ROWS = 'list_rows'; + public static string $GET_ROW = 'get_row'; + public static string $UPDATE_ROW = 'update_row'; + public static string $DELETE_ROW = 'delete_row'; // Custom Entities public static string $CREATE_CUSTOM_ENTITY = 'create_custom_entity'; @@ -258,7 +258,7 @@ trait Base public static string $COMPLEX_QUERY = 'complex_query'; // Fragments - public static string $FRAGMENT_ATTRIBUTES = ' + public static string $FRAGMENT_COLUMNS = ' fragment attributeProperties on Attributes { ... on AttributeString { key @@ -393,18 +393,18 @@ trait Base status } }'; - case self::$GET_COLLECTION: - return 'query getCollection($databaseId: String!, $collectionId: String!) { - databasesGetCollection(databaseId: $databaseId, collectionId: $collectionId) { + case self::$GET_TABLE: + return 'query getTable($databaseId: String!, $tableId: String!) { + databasesGetTable(databaseId: $databaseId, tableId: $tableId) { _id _permissions documentSecurity name } }'; - case self::$GET_COLLECTIONS: - return 'query listCollections($databaseId: String!) { - databasesListCollections(databaseId: $databaseId) { + case self::$GET_TABLES: + return 'query listTables($databaseId: String!) { + databasesListTables(databaseId: $databaseId) { total collections { _id @@ -414,42 +414,42 @@ trait Base } } }'; - case self::$CREATE_COLLECTION: - return 'mutation createCollection($databaseId: String!, $collectionId: String!, $name: String!, $documentSecurity: Boolean!, $permissions: [String!]!) { - databasesCreateCollection(databaseId: $databaseId, collectionId: $collectionId, name: $name, documentSecurity: $documentSecurity, permissions: $permissions) { + case self::$CREATE_TABLE: + return 'mutation createTable($databaseId: String!, $tableId: String!, $name: String!, $documentSecurity: Boolean!, $permissions: [String!]!) { + databasesCreateTable(databaseId: $databaseId, tableId: $tableId, name: $name, documentSecurity: $documentSecurity, permissions: $permissions) { _id _permissions documentSecurity name } }'; - case self::$UPDATE_COLLECTION: - return 'mutation updateCollection($databaseId: String!, $collectionId: String!, $name: String!, $documentSecurity: Boolean!, $permissions: [String!], $enabled: Boolean){ - databasesUpdateCollection(databaseId: $databaseId, collectionId: $collectionId, name: $name, documentSecurity: $documentSecurity, permissions: $permissions, enabled: $enabled) { + case self::$UPDATE_TABLE: + return 'mutation updateTable($databaseId: String!, $tableId: String!, $name: String!, $documentSecurity: Boolean!, $permissions: [String!], $enabled: Boolean){ + databasesUpdateTable(databaseId: $databaseId, tableId: $tableId, name: $name, documentSecurity: $documentSecurity, permissions: $permissions, enabled: $enabled) { _id _permissions documentSecurity name } }'; - case self::$DELETE_COLLECTION: - return 'mutation deleteCollection($databaseId: String!, $collectionId: String!){ - databasesDeleteCollection(databaseId: $databaseId, collectionId: $collectionId) { + case self::$DELETE_TABLE: + return 'mutation deleteTable($databaseId: String!, $tableId: String!){ + databasesDeleteTable(databaseId: $databaseId, tableId: $tableId) { status } }'; - case self::$CREATE_STRING_ATTRIBUTE: - return 'mutation createStringAttribute($databaseId: String!, $collectionId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, size: $size, required: $required, default: $default, array: $array) { + case self::$CREATE_STRING_COLUMN: + return 'mutation createStringColumn($databaseId: String!, $tableId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ + databasesCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, size: $size, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_INTEGER_ATTRIBUTE: - return 'mutation createIntegerAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Int, $max: Int, $default: Int, $array: Boolean){ - databasesCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + case self::$CREATE_INTEGER_COLUMN: + return 'mutation createIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int, $max: Int, $default: Int, $array: Boolean){ + databasesCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -458,9 +458,9 @@ trait Base array } }'; - case self::$CREATE_FLOAT_ATTRIBUTE: - return 'mutation createFloatAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Float, $max: Float, $default: Float, $array: Boolean){ - databasesCreateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + case self::$CREATE_FLOAT_COLUMN: + return 'mutation createFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float, $max: Float, $default: Float, $array: Boolean){ + databasesCreateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -469,45 +469,45 @@ trait Base array } }'; - case self::$CREATE_BOOLEAN_ATTRIBUTE: - return 'mutation createBooleanAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: Boolean, $array: Boolean){ - databasesCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + case self::$CREATE_BOOLEAN_COLUMN: + return 'mutation createBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean, $array: Boolean){ + databasesCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_URL_ATTRIBUTE: - return 'mutation createUrlAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + case self::$CREATE_URL_COLUMN: + return 'mutation createUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ + databasesCreateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_EMAIL_ATTRIBUTE: - return 'mutation createEmailAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + case self::$CREATE_EMAIL_COLUMN: + return 'mutation createEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ + databasesCreateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_IP_ATTRIBUTE: - return 'mutation createIpAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + case self::$CREATE_IP_COLUMN: + return 'mutation createIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ + databasesCreateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_ENUM_ATTRIBUTE: - return 'mutation createEnumAttribute($databaseId: String!, $collectionId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { + case self::$CREATE_ENUM_COLUMN: + return 'mutation createEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String, $array: Boolean){ + databasesCreateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { key elements required @@ -515,18 +515,18 @@ trait Base array } }'; - case self::$CREATE_DATETIME_ATTRIBUTE: - return 'mutation createDatetimeAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + case self::$CREATE_DATETIME_COLUMN: + return 'mutation createDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ + databasesCreateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_RELATIONSHIP_ATTRIBUTE: - return 'mutation createRelationshipAttribute($databaseId: String!, $collectionId: String!, $relatedCollectionId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ - databasesCreateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, relatedCollectionId: $relatedCollectionId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { + case self::$CREATE_RELATIONSHIP_COLUMN: + return 'mutation createRelationshipColumn($databaseId: String!, $tableId: String!, $relatedTableId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ + databasesCreateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, relatedTableId: $relatedTableId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { relatedCollection relationType twoWay @@ -535,77 +535,77 @@ trait Base onDelete } }'; - case self::$UPDATE_STRING_ATTRIBUTE: - return 'mutation updateStringAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + case self::$UPDATE_STRING_COLUMN: + return 'mutation updateStringColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ + databasesUpdateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_INTEGER_ATTRIBUTE: - return 'mutation updateIntegerAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Int!, $max: Int!, $default: Int){ - databasesUpdateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, min: $min, max: $max, default: $default) { + case self::$UPDATE_INTEGER_COLUMN: + return 'mutation updateIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int!, $max: Int!, $default: Int){ + databasesUpdateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, min: $min, max: $max, default: $default) { required min max default } }'; - case self::$UPDATE_FLOAT_ATTRIBUTE: - return 'mutation updateFloatAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Float!, $max: Float!, $default: Float){ - databasesUpdateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default) { + case self::$UPDATE_FLOAT_COLUMN: + return 'mutation updateFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float!, $max: Float!, $default: Float){ + databasesUpdateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default) { required min max default } }'; - case self::$UPDATE_BOOLEAN_ATTRIBUTE: - return 'mutation updateBooleanAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: Boolean){ - databasesUpdateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + case self::$UPDATE_BOOLEAN_COLUMN: + return 'mutation updateBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean){ + databasesUpdateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_URL_ATTRIBUTE: - return 'mutation updateUrlAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + case self::$UPDATE_URL_COLUMN: + return 'mutation updateUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ + databasesUpdateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_EMAIL_ATTRIBUTE: - return 'mutation updateEmailAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + case self::$UPDATE_EMAIL_COLUMN: + return 'mutation updateEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ + databasesUpdateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_IP_ATTRIBUTE: - return 'mutation updateIpAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + case self::$UPDATE_IP_COLUMN: + return 'mutation updateIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ + databasesUpdateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_ENUM_ATTRIBUTE: - return 'mutation updateEnumAttribute($databaseId: String!, $collectionId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String){ - databasesUpdateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default) { + case self::$UPDATE_ENUM_COLUMN: + return 'mutation updateEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String){ + databasesUpdateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default) { elements required default } }'; - case self::$UPDATE_DATETIME_ATTRIBUTE: - return 'mutation updateDatetimeAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + case self::$UPDATE_DATETIME_COLUMN: + return 'mutation updateDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ + databasesUpdateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_RELATIONSHIP_ATTRIBUTE: - return 'mutation updateRelationshipAttribute($databaseId: String!, $collectionId: String!, $key: String!, $onDelete: String){ - databasesUpdateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, onDelete: $onDelete) { + case self::$UPDATE_RELATIONSHIP_COLUMN: + return 'mutation updateRelationshipColumn($databaseId: String!, $tableId: String!, $key: String!, $onDelete: String){ + databasesUpdateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, key: $key, onDelete: $onDelete) { relatedCollection relationType twoWay @@ -615,16 +615,16 @@ trait Base } }'; case self::$CREATE_INDEX: - return 'mutation createIndex($databaseId: String!, $collectionId: String!, $key: String!, $type: String!, $attributes: [String!]!, $orders: [String!]){ - databasesCreateIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key, type: $type, attributes: $attributes, orders: $orders) { + return 'mutation createIndex($databaseId: String!, $tableId: String!, $key: String!, $type: String!, $columns: [String!]!, $orders: [String!]){ + databasesCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, columns: $columns, orders: $orders) { key type status } }'; case self::$GET_INDEXES: - return 'query listIndexes($databaseId: String!, $collectionId: String!) { - databasesListIndexes(databaseId: $databaseId, collectionId: $collectionId) { + return 'query listIndexes($databaseId: String!, $tableId: String!) { + databasesListIndexes(databaseId: $databaseId, tableId: $tableId) { total indexes { key @@ -634,52 +634,52 @@ trait Base } }'; case self::$GET_INDEX: - return 'query getIndex($databaseId: String!, $collectionId: String!, $key: String!) { - databasesGetIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + return 'query getIndex($databaseId: String!, $tableId: String!, $key: String!) { + databasesGetIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { key type status } }'; case self::$DELETE_INDEX: - return 'mutation deleteIndex($databaseId: String!, $collectionId: String!, $key: String!) { - databasesDeleteIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + return 'mutation deleteIndex($databaseId: String!, $tableId: String!, $key: String!) { + databasesDeleteIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { status } }'; - case self::$GET_ATTRIBUTES: - return 'query listAttributes($databaseId: String!, $collectionId: String!) { - databasesListAttributes(databaseId: $databaseId, collectionId: $collectionId) { + case self::$GET_COLUMNS: + return 'query listColumns($databaseId: String!, $tableId: String!) { + databasesListColumns(databaseId: $databaseId, tableId: $tableId) { total attributes { ...attributeProperties } } - }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; - case self::$GET_ATTRIBUTE: - return 'query getAttribute($databaseId: String!, $collectionId: String!, $key: String!) { - databasesGetAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + }' . PHP_EOL . self::$FRAGMENT_COLUMNS; + case self::$GET_COLUMN: + return 'query getColumn($databaseId: String!, $tableId: String!, $key: String!) { + databasesGetColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { ...attributeProperties } - }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; - case self::$DELETE_ATTRIBUTE: - return 'mutation deleteAttribute($databaseId: String!, $collectionId: String!, $key: String!) { - databasesDeleteAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + }' . PHP_EOL . self::$FRAGMENT_COLUMNS; + case self::$DELETE_COLUMN: + return 'mutation deleteColumn($databaseId: String!, $tableId: String!, $key: String!) { + databasesDeleteColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { status } }'; - case self::$GET_DOCUMENT: - return 'query getDocument($databaseId: String!, $collectionId: String!, $documentId: String!) { - databasesGetDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { + case self::$GET_ROW: + return 'query getRow($databaseId: String!, $tableId: String!, $rowId: String!) { + databasesGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { _id _collectionId _permissions data } }'; - case self::$GET_DOCUMENTS: - return 'query listDocuments($databaseId: String!, $collectionId: String!){ - databasesListDocuments(databaseId: $databaseId, collectionId: $collectionId) { + case self::$GET_ROWS: + return 'query listRows($databaseId: String!, $tableId: String!){ + databasesListRows(databaseId: $databaseId, tableId: $tableId) { total documents { _id @@ -689,9 +689,9 @@ trait Base } } }'; - case self::$CREATE_DOCUMENT: - return 'mutation createDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!]){ - databasesCreateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { + case self::$CREATE_ROW: + return 'mutation createRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]){ + databasesCreateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _collectionId _permissions @@ -756,17 +756,17 @@ trait Base return 'mutation deleteCustomEntity($id: String!){ actorsDelete(id: $id) }'; - case self::$UPDATE_DOCUMENT: - return 'mutation updateDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!]){ - databasesUpdateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { + case self::$UPDATE_ROW: + return 'mutation updateRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]){ + databasesUpdateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _collectionId data } }'; - case self::$DELETE_DOCUMENT: - return 'mutation deleteDocument($databaseId: String!, $collectionId: String!, $documentId: String!){ - databasesDeleteDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { + case self::$DELETE_ROW: + return 'mutation deleteRow($databaseId: String!, $tableId: String!, $rowId: String!){ + databasesDeleteRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { status } }'; @@ -2246,12 +2246,12 @@ trait Base } }'; case self::$COMPLEX_QUERY: - return 'mutation complex($databaseId: String!, $databaseName: String!, $collectionId: String!, $collectionName: String!, $documentSecurity: Boolean!, $collectionPermissions: [String!]!) { + return 'mutation complex($databaseId: String!, $databaseName: String!, $tableId: String!, $collectionName: String!, $documentSecurity: Boolean!, $collectionPermissions: [String!]!) { databasesCreate(databaseId: $databaseId, name: $databaseName) { _id name } - databasesCreateCollection(databaseId: $databaseId, collectionId: $collectionId, name: $collectionName, documentSecurity: $documentSecurity, permissions: $collectionPermissions) { + databasesCreateTable(databaseId: $databaseId, tableId: $tableId, name: $collectionName, documentSecurity: $documentSecurity, permissions: $collectionPermissions) { _id _createdAt _updatedAt @@ -2268,7 +2268,7 @@ trait Base status } } - databasesCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "name", size: 255, required: true) { + databasesCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: "name", size: 255, required: true) { key type status @@ -2277,7 +2277,7 @@ trait Base default array } - databasesCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "age", min: 0, max: 150, required: true) { + databasesCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: "age", min: 0, max: 150, required: true) { key type status @@ -2287,7 +2287,7 @@ trait Base default array } - databasesCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "alive", required: false, default: true) { + databasesCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: "alive", required: false, default: true) { key type status @@ -2487,7 +2487,7 @@ trait Base data } } - }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; + }' . PHP_EOL . self::$FRAGMENT_COLUMNS; } throw new \InvalidArgumentException('Invalid query type'); diff --git a/tests/e2e/Services/GraphQL/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/DatabaseClientTest.php index 3853a3fc17..327b68224b 100644 --- a/tests/e2e/Services/GraphQL/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/DatabaseClientTest.php @@ -48,7 +48,7 @@ class DatabaseClientTest extends Scope public function testCreateCollection($database): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::$CREATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/DatabaseServerTest.php index 87006a1bea..0ea86c03cf 100644 --- a/tests/e2e/Services/GraphQL/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/DatabaseServerTest.php @@ -49,12 +49,12 @@ class DatabaseServerTest extends Scope public function testCreateCollection($database): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::$CREATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $database['_id'], - 'collectionId' => 'actors', + 'tableId' => 'actors', 'name' => 'Actors', 'documentSecurity' => false, 'permissions' => [ @@ -73,14 +73,14 @@ class DatabaseServerTest extends Scope $this->assertIsArray($collection['body']['data']); $this->assertArrayNotHasKey('errors', $collection['body']); - $collection = $collection['body']['data']['databasesCreateCollection']; + $collection = $collection['body']['data']['databasesCreateTable']; $this->assertEquals('Actors', $collection['name']); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $database['_id'], - 'collectionId' => 'movies', + 'tableId' => 'movies', 'name' => 'Movies', 'documentSecurity' => false, 'permissions' => [ @@ -92,20 +92,20 @@ class DatabaseServerTest extends Scope ] ]; - $collection2 = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, ], $this->getHeaders()), $gqlPayload); - $this->assertIsArray($collection2['body']['data']); - $this->assertArrayNotHasKey('errors', $collection2['body']); - $collection2 = $collection2['body']['data']['databasesCreateCollection']; - $this->assertEquals('Movies', $collection2['name']); + $this->assertIsArray($table2['body']['data']); + $this->assertArrayNotHasKey('errors', $table2['body']); + $table2 = $table2['body']['data']['databasesCreateTable']; + $this->assertEquals('Movies', $table2['name']); return [ 'database' => $database, - 'collection' => $collection, - 'collection2' => $collection2, + 'table' => $collection, + 'table2' => $table2, ]; } @@ -116,12 +116,12 @@ class DatabaseServerTest extends Scope public function testCreateStringAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'name', 'size' => 256, 'required' => true, @@ -135,7 +135,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateStringAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateStringColumn']); return $data; } @@ -150,12 +150,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'name', 'required' => false, 'default' => 'Default Value', @@ -168,9 +168,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateStringAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateStringAttribute']['required']); - $this->assertEquals('Default Value', $attribute['body']['data']['databasesUpdateStringAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateStringColumn']); + $this->assertFalse($attribute['body']['data']['databasesUpdateStringColumn']['required']); + $this->assertEquals('Default Value', $attribute['body']['data']['databasesUpdateStringColumn']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -183,12 +183,12 @@ class DatabaseServerTest extends Scope public function testCreateIntegerAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INTEGER_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_INTEGER_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'age', 'min' => 18, 'max' => 150, @@ -203,7 +203,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateIntegerAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateIntegerColumn']); return $data; } @@ -218,12 +218,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_INTEGER_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_INTEGER_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'age', 'required' => false, 'min' => 12, @@ -238,11 +238,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateIntegerAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateIntegerAttribute']['required']); - $this->assertEquals(12, $attribute['body']['data']['databasesUpdateIntegerAttribute']['min']); - $this->assertEquals(160, $attribute['body']['data']['databasesUpdateIntegerAttribute']['max']); - $this->assertEquals(50, $attribute['body']['data']['databasesUpdateIntegerAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateIntegerColumn']); + $this->assertFalse($attribute['body']['data']['databasesUpdateIntegerColumn']['required']); + $this->assertEquals(12, $attribute['body']['data']['databasesUpdateIntegerColumn']['min']); + $this->assertEquals(160, $attribute['body']['data']['databasesUpdateIntegerColumn']['max']); + $this->assertEquals(50, $attribute['body']['data']['databasesUpdateIntegerColumn']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -255,12 +255,12 @@ class DatabaseServerTest extends Scope public function testCreateBooleanAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_BOOLEAN_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_BOOLEAN_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'alive', 'required' => true, ] @@ -273,7 +273,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateBooleanAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateBooleanColumn']); return $data; } @@ -288,12 +288,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_BOOLEAN_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_BOOLEAN_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'alive', 'required' => false, 'default' => true @@ -306,9 +306,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateBooleanAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateBooleanAttribute']['required']); - $this->assertTrue($attribute['body']['data']['databasesUpdateBooleanAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateBooleanColumn']); + $this->assertFalse($attribute['body']['data']['databasesUpdateBooleanColumn']['required']); + $this->assertTrue($attribute['body']['data']['databasesUpdateBooleanColumn']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -321,12 +321,12 @@ class DatabaseServerTest extends Scope public function testCreateFloatAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FLOAT_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_FLOAT_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'salary', 'min' => 1000.0, 'max' => 999999.99, @@ -342,7 +342,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateFloatAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateFloatColumn']); return $data; } @@ -357,12 +357,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FLOAT_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_FLOAT_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'salary', 'required' => false, 'min' => 100.0, @@ -377,11 +377,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateFloatAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateFloatAttribute']['required']); - $this->assertEquals(100.0, $attribute['body']['data']['databasesUpdateFloatAttribute']['min']); - $this->assertEquals(1000000.0, $attribute['body']['data']['databasesUpdateFloatAttribute']['max']); - $this->assertEquals(2500.0, $attribute['body']['data']['databasesUpdateFloatAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateFloatColumn']); + $this->assertFalse($attribute['body']['data']['databasesUpdateFloatColumn']['required']); + $this->assertEquals(100.0, $attribute['body']['data']['databasesUpdateFloatColumn']['min']); + $this->assertEquals(1000000.0, $attribute['body']['data']['databasesUpdateFloatColumn']['max']); + $this->assertEquals(2500.0, $attribute['body']['data']['databasesUpdateFloatColumn']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -394,12 +394,12 @@ class DatabaseServerTest extends Scope public function testCreateEmailAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_EMAIL_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_EMAIL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'email', 'required' => true, ] @@ -412,7 +412,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateEmailAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateEmailColumn']); return $data; } @@ -427,12 +427,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_EMAIL_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_EMAIL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'email', 'required' => false, 'default' => 'torsten@appwrite.io', @@ -445,9 +445,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateEmailAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateEmailAttribute']['required']); - $this->assertEquals('torsten@appwrite.io', $attribute['body']['data']['databasesUpdateEmailAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateEmailColumn']); + $this->assertFalse($attribute['body']['data']['databasesUpdateEmailColumn']['required']); + $this->assertEquals('torsten@appwrite.io', $attribute['body']['data']['databasesUpdateEmailColumn']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -460,12 +460,12 @@ class DatabaseServerTest extends Scope public function testCreateEnumAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ENUM_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_ENUM_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'role', 'elements' => [ 'crew', @@ -483,7 +483,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateEnumAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateEnumColumn']); return $data; } @@ -499,12 +499,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ENUM_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_ENUM_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'role', 'required' => false, 'elements' => [ @@ -522,11 +522,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateEnumAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateEnumAttribute']['required']); - $this->assertEquals('tech', $attribute['body']['data']['databasesUpdateEnumAttribute']['default']); - $this->assertContains('tech', $attribute['body']['data']['databasesUpdateEnumAttribute']['elements']); - $this->assertNotContains('guest', $attribute['body']['data']['databasesUpdateEnumAttribute']['elements']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateEnumColumn']); + $this->assertFalse($attribute['body']['data']['databasesUpdateEnumColumn']['required']); + $this->assertEquals('tech', $attribute['body']['data']['databasesUpdateEnumColumn']['default']); + $this->assertContains('tech', $attribute['body']['data']['databasesUpdateEnumColumn']['elements']); + $this->assertNotContains('guest', $attribute['body']['data']['databasesUpdateEnumColumn']['elements']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -539,12 +539,12 @@ class DatabaseServerTest extends Scope public function testCreateDatetimeAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATETIME_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_DATETIME_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'dob', 'required' => true, ] @@ -557,7 +557,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateDatetimeAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateDatetimeColumn']); return $data; } @@ -572,12 +572,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DATETIME_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_DATETIME_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'dob', 'required' => false, 'default' => '2000-01-01T00:00:00Z' @@ -590,9 +590,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateDatetimeAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateDatetimeAttribute']['required']); - $this->assertEquals('2000-01-01T00:00:00Z', $attribute['body']['data']['databasesUpdateDatetimeAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateDatetimeColumn']); + $this->assertFalse($attribute['body']['data']['databasesUpdateDatetimeColumn']['required']); + $this->assertEquals('2000-01-01T00:00:00Z', $attribute['body']['data']['databasesUpdateDatetimeColumn']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -604,13 +604,13 @@ class DatabaseServerTest extends Scope public function testCreateRelationshipAttribute(array $data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_RELATIONSHIP_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_RELATIONSHIP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection2']['_id'], // Movies - 'relatedCollectionId' => $data['collection']['_id'], // Actors + 'tableId' => $data['table2']['_id'], // Movies + 'relatedTableId' => $data['table']['_id'], // Actors 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => true, 'key' => 'actors', @@ -623,9 +623,10 @@ class DatabaseServerTest extends Scope 'x-appwrite-project' => $projectId, ], $this->getHeaders()), $gqlPayload); + $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateRelationshipAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateRelationshipColumn']); return $data; } @@ -638,12 +639,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_RELATIONSHIP_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_RELATIONSHIP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection2']['_id'], + 'tableId' => $data['table2']['_id'], 'key' => 'actors', 'onDelete' => Database::RELATION_MUTATE_CASCADE, ] @@ -656,7 +657,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateRelationshipAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateRelationshipColumn']); return $data; } @@ -668,12 +669,12 @@ class DatabaseServerTest extends Scope public function testCreateIPAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_IP_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_IP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'ip', 'required' => false, 'default' => '::1', @@ -687,7 +688,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateIpAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateIpColumn']); return $data; } @@ -702,12 +703,12 @@ class DatabaseServerTest extends Scope sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_IP_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_IP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'ip', 'required' => false, 'default' => '127.0.0.1' @@ -720,9 +721,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateIpAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateIpAttribute']['required']); - $this->assertEquals('127.0.0.1', $attribute['body']['data']['databasesUpdateIpAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateIpColumn']); + $this->assertFalse($attribute['body']['data']['databasesUpdateIpColumn']['required']); + $this->assertEquals('127.0.0.1', $attribute['body']['data']['databasesUpdateIpColumn']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -735,12 +736,12 @@ class DatabaseServerTest extends Scope public function testCreateURLAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_URL_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_URL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'url', 'required' => false, 'default' => 'https://appwrite.io', @@ -754,7 +755,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateUrlAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateUrlColumn']); return $data; } @@ -769,12 +770,12 @@ class DatabaseServerTest extends Scope sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_URL_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_URL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'url', 'required' => false, 'default' => 'https://cloud.appwrite.io' @@ -787,9 +788,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateUrlAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateUrlAttribute']['required']); - $this->assertEquals('https://cloud.appwrite.io', $attribute['body']['data']['databasesUpdateUrlAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateUrlColumn']); + $this->assertFalse($attribute['body']['data']['databasesUpdateUrlColumn']['required']); + $this->assertEquals('https://cloud.appwrite.io', $attribute['body']['data']['databasesUpdateUrlColumn']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); } @@ -806,10 +807,10 @@ class DatabaseServerTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'index', 'type' => 'key', - 'attributes' => [ + 'columns' => [ 'name', 'age', ], @@ -827,7 +828,7 @@ class DatabaseServerTest extends Scope return [ 'database' => $data['database'], - 'collection' => $data['collection'], + 'table' => $data['table'], 'index' => $index['body']['data']['databasesCreateIndex'], ]; } @@ -842,13 +843,13 @@ class DatabaseServerTest extends Scope public function testCreateDocument($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::$CREATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], - 'documentId' => ID::unique(), + 'tableId' => $data['table']['_id'], + 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', 'email' => 'example@appwrite.io', @@ -866,21 +867,21 @@ class DatabaseServerTest extends Scope ] ]; - $document = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, ], $this->getHeaders()), $gqlPayload); - $this->assertArrayNotHasKey('errors', $document['body']); - $this->assertIsArray($document['body']['data']); + $this->assertArrayNotHasKey('errors', $row['body']); + $this->assertIsArray($row['body']['data']); - $document = $document['body']['data']['databasesCreateDocument']; - $this->assertIsArray($document); + $row = $row['body']['data']['databasesCreateRow']; + $this->assertIsArray($row); return [ 'database' => $data['database'], - 'collection' => $data['collection'], - 'document' => $document, + 'table' => $data['table'], + 'row' => $row, ]; } @@ -974,7 +975,7 @@ class DatabaseServerTest extends Scope public function testGetCollections($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLLECTIONS); + $query = $this->getQuery(self::$GET_TABLES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -989,7 +990,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $collections['body']); $this->assertIsArray($collections['body']['data']); - $this->assertIsArray($collections['body']['data']['databasesListCollections']); + $this->assertIsArray($collections['body']['data']['databasesListTables']); } /** @@ -999,12 +1000,12 @@ class DatabaseServerTest extends Scope public function testGetCollection($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLLECTION); + $query = $this->getQuery(self::$GET_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], ] ]; @@ -1015,7 +1016,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $collection['body']); $this->assertIsArray($collection['body']['data']); - $this->assertIsArray($collection['body']['data']['databasesGetCollection']); + $this->assertIsArray($collection['body']['data']['databasesGetTable']); } /** @@ -1026,12 +1027,12 @@ class DatabaseServerTest extends Scope public function testGetAttributes($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ATTRIBUTES); + $query = $this->getQuery(self::$GET_COLUMNS); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], ] ]; @@ -1042,7 +1043,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attributes['body']); $this->assertIsArray($attributes['body']['data']); - $this->assertIsArray($attributes['body']['data']['databasesListAttributes']); + $this->assertIsArray($attributes['body']['data']['databasesListColumns']); } /** @@ -1052,12 +1053,12 @@ class DatabaseServerTest extends Scope public function testGetAttribute($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ATTRIBUTE); + $query = $this->getQuery(self::$GET_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'name', ] ]; @@ -1069,7 +1070,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesGetAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesGetColumn']); } /** @@ -1084,7 +1085,7 @@ class DatabaseServerTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], ] ]; @@ -1110,7 +1111,7 @@ class DatabaseServerTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => $data['index']['key'], ] ]; @@ -1132,12 +1133,12 @@ class DatabaseServerTest extends Scope public function testGetDocuments($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENTS); + $query = $this->getQuery(self::$GET_ROWS); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], ] ]; @@ -1148,7 +1149,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $documents['body']); $this->assertIsArray($documents['body']['data']); - $this->assertIsArray($documents['body']['data']['databasesListDocuments']); + $this->assertIsArray($documents['body']['data']['databasesListRows']); } /** @@ -1158,13 +1159,13 @@ class DatabaseServerTest extends Scope public function testGetDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENT); + $query = $this->getQuery(self::$GET_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], - 'documentId' => $data['document']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => $data['row']['_id'], ] ]; @@ -1175,7 +1176,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $this->assertIsArray($document['body']['data']['databasesGetDocument']); + $this->assertIsArray($document['body']['data']['databasesGetRow']); } // /** @@ -1258,12 +1259,12 @@ class DatabaseServerTest extends Scope public function testUpdateCollection($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_COLLECTION); + $query = $this->getQuery(self::$UPDATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'name' => 'New Collection Name', 'documentSecurity' => false, ] @@ -1276,7 +1277,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $collection['body']); $this->assertIsArray($collection['body']['data']); - $this->assertIsArray($collection['body']['data']['databasesUpdateCollection']); + $this->assertIsArray($collection['body']['data']['databasesUpdateTable']); } /** @@ -1286,13 +1287,13 @@ class DatabaseServerTest extends Scope public function testUpdateDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DOCUMENT); + $query = $this->getQuery(self::$UPDATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], - 'documentId' => $data['document']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => $data['row']['_id'], 'data' => [ 'name' => 'New Document Name', ], @@ -1306,7 +1307,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['databasesUpdateDocument']; + $document = $document['body']['data']['databasesUpdateRow']; $this->assertIsArray($document); $this->assertStringContainsString('New Document Name', $document['data']); } @@ -1346,13 +1347,13 @@ class DatabaseServerTest extends Scope public function testDeleteDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DOCUMENT); + $query = $this->getQuery(self::$DELETE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], - 'documentId' => $data['document']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => $data['row']['_id'], ] ]; @@ -1396,12 +1397,12 @@ class DatabaseServerTest extends Scope public function testDeleteAttribute($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ATTRIBUTE); + $query = $this->getQuery(self::$DELETE_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'name', ] ]; @@ -1422,12 +1423,12 @@ class DatabaseServerTest extends Scope public function testDeleteCollection($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_COLLECTION); + $query = $this->getQuery(self::$DELETE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], ] ]; From 9bf1fdc2ff386ecb301551f993d62989b4840287 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 27 Apr 2025 14:27:07 +0530 Subject: [PATCH 008/362] fix: graphql tests. --- tests/e2e/Services/GraphQL/AuthTest.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/e2e/Services/GraphQL/AuthTest.php b/tests/e2e/Services/GraphQL/AuthTest.php index d8bd0d6326..48a2f475e6 100644 --- a/tests/e2e/Services/GraphQL/AuthTest.php +++ b/tests/e2e/Services/GraphQL/AuthTest.php @@ -107,7 +107,7 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Actors', 'documentSecurity' => true, 'permissions' => [ @@ -127,7 +127,7 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'collectionId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], 'key' => 'name', 'size' => 256, 'required' => true, @@ -153,8 +153,8 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'collectionId' => $this->table['body']['data']['databasesCreateTable']['_id'], - 'documentId' => ID::unique(), + 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', ], @@ -178,8 +178,8 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'collectionId' => $this->table['body']['data']['databasesCreateTable']['_id'], - 'documentId' => $row['body']['data']['databasesCreateRow']['_id'], + 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'rowId' => $row['body']['data']['databasesCreateRow']['_id'], ] ]; $row = $this->client->call(Client::METHOD_POST, '/graphql', [ @@ -213,8 +213,8 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'collectionId' => $this->table['body']['data']['databasesCreateTable']['_id'], - 'documentId' => ID::unique(), + 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', ], @@ -237,8 +237,8 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'collectionId' => $this->table['body']['data']['databasesCreateTable']['_id'], - 'documentId' => $row['body']['data']['databasesCreateRow']['_id'], + 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'rowId' => $row['body']['data']['databasesCreateRow']['_id'], ] ]; $row = $this->client->call(Client::METHOD_POST, '/graphql', [ From 7ffd5cfde6c92e00cd4bf8cac0b19860aaebeefc Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 27 Apr 2025 14:47:59 +0530 Subject: [PATCH 009/362] fix: graphql tests, again. --- .../Services/GraphQL/DatabaseClientTest.php | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/e2e/Services/GraphQL/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/DatabaseClientTest.php index 327b68224b..efd2430629 100644 --- a/tests/e2e/Services/GraphQL/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/DatabaseClientTest.php @@ -53,7 +53,7 @@ class DatabaseClientTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $database['_id'], - 'collectionId' => 'actors', + 'tableId' => 'actors', 'name' => 'Actors', 'documentSecurity' => false, 'permissions' => [ @@ -65,20 +65,20 @@ class DatabaseClientTest extends Scope ] ]; - $collection = $this->client->call(Client::METHOD_POST, '/graphql', [ + $table = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'x-appwrite-key' => $this->getProject()['apiKey'], ], $gqlPayload); - $this->assertIsArray($collection['body']['data']); - $this->assertArrayNotHasKey('errors', $collection['body']); - $collection = $collection['body']['data']['databasesCreateCollection']; - $this->assertEquals('Actors', $collection['name']); + $this->assertIsArray($table['body']['data']); + $this->assertArrayNotHasKey('errors', $table['body']); + $table = $table['body']['data']['databasesCreateTable']; + $this->assertEquals('Actors', $table['name']); return [ 'database' => $database, - 'collection' => $collection, + 'table' => $table, ]; } @@ -88,12 +88,12 @@ class DatabaseClientTest extends Scope public function testCreateStringAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'name', 'size' => 256, 'required' => true, @@ -108,7 +108,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateStringAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateStringColumn']); return $data; } @@ -119,12 +119,12 @@ class DatabaseClientTest extends Scope public function testCreateIntegerAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INTEGER_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_INTEGER_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], 'key' => 'age', 'min' => 18, 'max' => 150, @@ -140,7 +140,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateIntegerAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateIntegerColumn']); return $data; } @@ -154,13 +154,13 @@ class DatabaseClientTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::$CREATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], - 'documentId' => ID::unique(), + 'tableId' => $data['table']['_id'], + 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', 'age' => 35, @@ -181,13 +181,13 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['databasesCreateDocument']; + $document = $document['body']['data']['databasesCreateRow']; $this->assertIsArray($document); return [ 'database' => $data['database'], - 'collection' => $data['collection'], - 'document' => $document, + 'table' => $data['table'], + 'row' => $document, ]; } @@ -198,12 +198,12 @@ class DatabaseClientTest extends Scope public function testGetDocuments($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENTS); + $query = $this->getQuery(self::$GET_ROWS); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], + 'tableId' => $data['table']['_id'], ] ]; @@ -214,7 +214,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $documents['body']); $this->assertIsArray($documents['body']['data']); - $this->assertIsArray($documents['body']['data']['databasesListDocuments']); + $this->assertIsArray($documents['body']['data']['databasesListRows']); } /** @@ -224,13 +224,13 @@ class DatabaseClientTest extends Scope public function testGetDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENT); + $query = $this->getQuery(self::$GET_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], - 'documentId' => $data['document']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => $data['row']['_id'], ] ]; @@ -241,7 +241,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $this->assertIsArray($document['body']['data']['databasesGetDocument']); + $this->assertIsArray($document['body']['data']['databasesGetRow']); } /** @@ -251,13 +251,13 @@ class DatabaseClientTest extends Scope public function testUpdateDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DOCUMENT); + $query = $this->getQuery(self::$UPDATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], - 'documentId' => $data['document']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => $data['row']['_id'], 'data' => [ 'name' => 'New Document Name', ], @@ -271,7 +271,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['databasesUpdateDocument']; + $document = $document['body']['data']['databasesUpdateRow']; $this->assertIsArray($document); $this->assertStringContainsString('New Document Name', $document['data']); @@ -284,13 +284,13 @@ class DatabaseClientTest extends Scope public function testDeleteDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DOCUMENT); + $query = $this->getQuery(self::$DELETE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'collectionId' => $data['collection']['_id'], - 'documentId' => $data['document']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => $data['row']['_id'], ] ]; From b3b99618603ba4aca2e6dc1b72ca4e1184e83416 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 13:22:26 +0530 Subject: [PATCH 010/362] init: move to module structure for database; start with columns. --- app/controllers/api/databases.php | 1956 +---------------- .../Modules/Databases/Http/Columns/Action.php | 417 ++++ .../Databases/Http/Columns/Boolean/Create.php | 84 + .../Databases/Http/Columns/Boolean/Update.php | 86 + .../Http/Columns/Datetime/Create.php | 106 + .../Http/Columns/Datetime/Update.php | 97 + .../Modules/Databases/Http/Columns/Delete.php | 164 ++ .../Databases/Http/Columns/Email/Create.php | 104 + .../Databases/Http/Columns/Email/Update.php | 98 + .../Databases/Http/Columns/Enum/Create.php | 113 + .../Databases/Http/Columns/Enum/Update.php | 102 + .../Databases/Http/Columns/Float/Create.php | 123 ++ .../Databases/Http/Columns/Float/Update.php | 109 + .../Modules/Databases/Http/Columns/Get.php | 112 + .../Databases/Http/Columns/IP/Create.php | 96 + .../Databases/Http/Columns/IP/Update.php | 98 + .../Databases/Http/Columns/Integer/Create.php | 123 ++ .../Databases/Http/Columns/Integer/Update.php | 109 + .../Http/Columns/Relationship/Create.php | 168 ++ .../Http/Columns/Relationship/Update.php | 103 + .../Databases/Http/Columns/String/Create.php | 122 + .../Databases/Http/Columns/String/Update.php | 101 + .../Databases/Http/Columns/URL/Create.php | 96 + .../Databases/Http/Columns/URL/Update.php | 98 + .../Modules/Databases/Http/Columns/XList.php | 125 ++ .../Platform/Modules/Databases/Module.php | 16 + .../Modules/Databases/Services/Http.php | 110 + .../Modules/Databases/Services/Workers.php | 15 + .../Databases}/Workers/Databases.php | 2 +- src/Appwrite/Platform/Services/Workers.php | 2 - 30 files changed, 3125 insertions(+), 1930 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Module.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Services/Http.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Services/Workers.php rename src/Appwrite/Platform/{ => Modules/Databases}/Workers/Databases.php (99%) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index d8556dd4fe..33b839fc41 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -6,13 +6,11 @@ use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception; -use Appwrite\Network\Validator\Email; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; -use Appwrite\Utopia\Database\Validator\Queries\Attributes; use Appwrite\Utopia\Database\Validator\Queries\Collections; use Appwrite\Utopia\Database\Validator\Queries\Databases; use Appwrite\Utopia\Database\Validator\Queries\Indexes; @@ -26,425 +24,32 @@ use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Exception\Authorization as AuthorizationException; -use Utopia\Database\Exception\Conflict as ConflictException; 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\Order as OrderException; use Utopia\Database\Exception\Query as QueryException; -use Utopia\Database\Exception\Restricted as RestrictedException; use Utopia\Database\Exception\Structure as StructureException; -use Utopia\Database\Exception\Truncate as TruncateException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; -use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Index as IndexValidator; -use Utopia\Database\Validator\IndexDependency as IndexDependencyValidator; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\Queries; use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; -use Utopia\Database\Validator\Structure; use Utopia\Database\Validator\UID; use Utopia\Locale\Locale; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; -use Utopia\Validator\FloatValidator; -use Utopia\Validator\Integer; -use Utopia\Validator\IP; use Utopia\Validator\JSON; -use Utopia\Validator\Nullable; -use Utopia\Validator\Range; use Utopia\Validator\Text; -use Utopia\Validator\URL; use Utopia\Validator\WhiteList; -/** - * * Create column of varying type - * - * @param string $databaseId - * @param string $tableId - * @param Document $column - * @param Response $response - * @param Database $dbForProject - * @param EventDatabase $queueForDatabase - * @param Event $queueForEvents - * @return Document Newly created attribute document - * @throws AuthorizationException - * @throws Exception - * @throws LimitException - * @throws RestrictedException - * @throws StructureException - * @throws \Utopia\Database\Exception - * @throws ConflictException - * @throws Exception - */ -function createColumn(string $databaseId, string $tableId, Document $column, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): Document -{ - $key = $column->getAttribute('key'); - $type = $column->getAttribute('type', ''); - $size = $column->getAttribute('size', 0); - $required = $column->getAttribute('required', true); - $signed = $column->getAttribute('signed', true); // integers are signed by default - $array = $column->getAttribute('array', false); - $format = $column->getAttribute('format', ''); - $formatOptions = $column->getAttribute('formatOptions', []); - $filters = $column->getAttribute('filters', []); // filters are hidden from the endpoint - $default = $column->getAttribute('default'); - $options = $column->getAttribute('options', []); - - $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($db->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - if (!empty($format)) { - if (!Structure::hasFormat($format, $type)) { - throw new Exception(Exception::ATTRIBUTE_FORMAT_UNSUPPORTED, "Format {$format} not available for {$type} columns."); - } - } - - // Must throw here since dbForProject->createAttribute is performed by db worker - if ($required && isset($default)) { - throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for required column'); - } - - if ($array && isset($default)) { - throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for array columns'); - } - - if ($type === Database::VAR_RELATIONSHIP) { - $options['side'] = Database::RELATION_SIDE_PARENT; - $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection'] ?? ''); - if ($relatedTable->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND, 'The related table was not found.'); - } - } - - try { - $column = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $table->getInternalId() . '_' . $key), - 'key' => $key, - 'databaseInternalId' => $db->getInternalId(), - 'databaseId' => $db->getId(), - 'collectionInternalId' => $table->getInternalId(), - 'collectionId' => $tableId, - 'type' => $type, - 'status' => 'processing', // processing, available, failed, deleting, stuck - 'size' => $size, - 'required' => $required, - 'signed' => $signed, - 'default' => $default, - 'array' => $array, - 'format' => $format, - 'formatOptions' => $formatOptions, - 'filters' => $filters, - 'options' => $options, - ]); - - $dbForProject->checkAttribute($table, $column); - $column = $dbForProject->createDocument('attributes', $column); - } catch (DuplicateException) { - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); - } catch (LimitException) { - throw new Exception(Exception::ATTRIBUTE_LIMIT_EXCEEDED); - } catch (\Throwable $e) { - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); - throw $e; - } - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); - - if ($type === Database::VAR_RELATIONSHIP && $options['twoWay']) { - $twoWayKey = $options['twoWayKey']; - $options['relatedCollection'] = $table->getId(); - $options['twoWayKey'] = $key; - $options['side'] = Database::RELATION_SIDE_CHILD; - - try { - $twoWayAttribute = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $twoWayKey), - 'key' => $twoWayKey, - 'databaseInternalId' => $db->getInternalId(), - 'databaseId' => $db->getId(), - 'collectionInternalId' => $relatedTable->getInternalId(), - 'collectionId' => $relatedTable->getId(), - 'type' => $type, - 'status' => 'processing', // processing, available, failed, deleting, stuck - 'size' => $size, - 'required' => $required, - 'signed' => $signed, - 'default' => $default, - 'array' => $array, - 'format' => $format, - 'formatOptions' => $formatOptions, - 'filters' => $filters, - 'options' => $options, - ]); - - $dbForProject->checkAttribute($relatedTable, $twoWayAttribute); - $dbForProject->createDocument('attributes', $twoWayAttribute); - } catch (DuplicateException) { - $dbForProject->deleteDocument('attributes', $column->getId()); - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); - } catch (LimitException) { - $dbForProject->deleteDocument('attributes', $column->getId()); - throw new Exception(Exception::ATTRIBUTE_LIMIT_EXCEEDED); - } catch (\Throwable $e) { - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); - throw $e; - } - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); - } - - $queueForDatabase - ->setType(DATABASE_TYPE_CREATE_ATTRIBUTE) - ->setDatabase($db) - ->setTable($table) - ->setRow($column); - - $queueForEvents - ->setContext('table', $table) - ->setContext('database', $db) - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('columnId', $column->getId()); - - $response->setStatusCode(Response::STATUS_CODE_CREATED); - - return $column; -} - -function updateColumn( - string $databaseId, - string $tableId, - string $key, - Database $dbForProject, - Event $queueForEvents, - string $type, - int $size = null, - string $filter = null, - string|bool|int|float $default = null, - bool $required = null, - int|float|null $min = null, - int|float|null $max = null, - array $elements = null, - array $options = [], - string $newKey = null, -): Document { - $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($db->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $column = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); - - if ($column->isEmpty()) { - throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); - } - - if ($column->getAttribute('status') !== 'available') { - throw new Exception(Exception::ATTRIBUTE_NOT_AVAILABLE); - } - - if ($column->getAttribute(('type') !== $type)) { - throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID); - } - - if ($column->getAttribute('type') === Database::VAR_STRING && $column->getAttribute(('filter') !== $filter)) { - throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID); - } - - if ($required && isset($default)) { - throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for required column'); - } - - if ($column->getAttribute('array', false) && isset($default)) { - throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for array columns'); - } - - $tableId = 'database_' . $db->getInternalId() . '_collection_' . $table->getInternalId(); - - $column - ->setAttribute('default', $default) - ->setAttribute('required', $required); - - if (!empty($size)) { - $column->setAttribute('size', $size); - } - - switch ($column->getAttribute('format')) { - case APP_DATABASE_ATTRIBUTE_INT_RANGE: - case APP_DATABASE_ATTRIBUTE_FLOAT_RANGE: - $min ??= $column->getAttribute('formatOptions')['min']; - $max ??= $column->getAttribute('formatOptions')['max']; - - if ($min > $max) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); - } - - if ($column->getAttribute('format') === APP_DATABASE_ATTRIBUTE_INT_RANGE) { - $validator = new Range($min, $max, Database::VAR_INTEGER); - } else { - $validator = new Range($min, $max, Database::VAR_FLOAT); - - if (!is_null($default)) { - $default = \floatval($default); - } - } - - if (!is_null($default) && !$validator->isValid($default)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); - } - - $options = [ - 'min' => $min, - 'max' => $max - ]; - $column->setAttribute('formatOptions', $options); - - break; - case APP_DATABASE_ATTRIBUTE_ENUM: - if (empty($elements)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Enum elements must not be empty'); - } - - foreach ($elements as $element) { - if (\strlen($element) === 0) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Each enum element must not be empty'); - } - } - - if (!is_null($default) && !in_array($default, $elements)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Default value not found in elements'); - } - - $options = [ - 'elements' => $elements - ]; - - $column->setAttribute('formatOptions', $options); - - break; - } - - if ($type === Database::VAR_RELATIONSHIP) { - $primaryRowOptions = \array_merge($column->getAttribute('options', []), $options); - $column->setAttribute('options', $primaryRowOptions); - try { - $dbForProject->updateRelationship( - collection: $tableId, - id: $key, - newKey: $newKey, - onDelete: $primaryRowOptions['onDelete'], - ); - } catch (NotFoundException) { - throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); - } - - if ($primaryRowOptions['twoWay']) { - $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $primaryRowOptions['relatedCollection']); - - $relatedColumn = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $primaryRowOptions['twoWayKey']); - - if (!empty($newKey) && $newKey !== $key) { - $options['twoWayKey'] = $newKey; - } - - $relatedOptions = \array_merge($relatedColumn->getAttribute('options'), $options); - $relatedColumn->setAttribute('options', $relatedOptions); - $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $primaryRowOptions['twoWayKey'], $relatedColumn); - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); - } - } else { - try { - $dbForProject->updateAttribute( - collection: $tableId, - id: $key, - size: $size, - required: $required, - default: $default, - formatOptions: $options, - newKey: $newKey ?? null - ); - } catch (TruncateException) { - throw new Exception(Exception::ATTRIBUTE_INVALID_RESIZE); - } catch (NotFoundException) { - throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); - } catch (LimitException) { - throw new Exception(Exception::ATTRIBUTE_LIMIT_EXCEEDED); - } catch (IndexException $e) { - throw new Exception(Exception::INDEX_INVALID, $e->getMessage()); - } - } - - if (!empty($newKey) && $key !== $newKey) { - $originalUid = $column->getId(); - - $column - ->setAttribute('$id', ID::custom($db->getInternalId() . '_' . $table->getInternalId() . '_' . $newKey)) - ->setAttribute('key', $newKey); - - $dbForProject->updateDocument('attributes', $originalUid, $column); - - /** - * @var Document $index - */ - foreach ($table->getAttribute('indexes') as $index) { - /** - * @var string[] $columns - */ - $columns = $index->getAttribute('attributes', []); - $found = \array_search($key, $columns); - - if ($found !== false) { - $columns[$found] = $newKey; - $index->setAttribute('attributes', $columns); - $dbForProject->updateDocument('indexes', $index->getId(), $index); - } - } - } else { - $column = $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key, $column); - } - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $table->getId()); - - $queueForEvents - ->setContext('table', $table) - ->setContext('database', $db) - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('columnId', $column->getId()); - - return $column; -} - App::init() ->groups(['api', 'database']) ->inject('request') @@ -1209,11 +814,11 @@ App::put('/v1/databases/:databaseId/tables/:tableId') 'database_' . $database->getInternalId(), $tableId, $table - ->setAttribute('name', $name) - ->setAttribute('$permissions', $permissions) - ->setAttribute('documentSecurity', $documentSecurity) - ->setAttribute('enabled', $enabled) - ->setAttribute('search', \implode(' ', [$tableId, $name])) + ->setAttribute('name', $name) + ->setAttribute('$permissions', $permissions) + ->setAttribute('documentSecurity', $documentSecurity) + ->setAttribute('enabled', $enabled) + ->setAttribute('search', \implode(' ', [$tableId, $name])) ); $dbForProject->updateCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $permissions, $documentSecurity); @@ -1290,1509 +895,6 @@ App::delete('/v1/databases/:databaseId/tables/:tableId') $response->noContent(); }); -App::post('/v1/databases/:databaseId/tables/:tableId/columns/string') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/string') - ->desc('Create string column') - ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'createStringColumn', - description: '/docs/references/databases/create-string-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_ACCEPTED, - model: Response::MODEL_ATTRIBUTE_STRING - ) - ] - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Range::TYPE_INTEGER), 'Attribute size for text attributes, in number of characters.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, new Text(0, 0), 'Default value for column when not provided. Cannot be set when column is required.', true) - ->param('array', false, new Boolean(), 'Is column an array?', true) - ->param('encrypt', false, new Boolean(), 'Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, bool $encrypt, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - - // Ensure attribute default is within required size - $validator = new Text($size, 0); - if (!is_null($default) && !$validator->isValid($default)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); - } - - $filters = []; - - if ($encrypt) { - $filters[] = 'encrypt'; - } - - $column = createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_STRING, - 'size' => $size, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'filters' => $filters, - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $response - ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($column, Response::MODEL_ATTRIBUTE_STRING); - }); - -App::post('/v1/databases/:databaseId/tables/:tableId/columns/email') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/email') - ->desc('Create email column') - ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'createEmailColumn', - description: '/docs/references/databases/create-email-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_ACCEPTED, - model: Response::MODEL_ATTRIBUTE_EMAIL, - ) - ] - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, new Email(), 'Default value for column when not provided. Cannot be set when column is required.', true) - ->param('array', false, new Boolean(), 'Is column an array?', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - - $column = createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_STRING, - 'size' => 254, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'format' => APP_DATABASE_ATTRIBUTE_EMAIL, - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $response - ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($column, Response::MODEL_ATTRIBUTE_EMAIL); - }); - -App::post('/v1/databases/:databaseId/collections/:tableId/attributes/enum') - ->alias('/v1/database/collections/:tableId/attributes/enum') - ->desc('Create enum column') - ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'createEnumColumn', - description: '/docs/references/databases/create-attribute-enum.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_ACCEPTED, - model: Response::MODEL_ATTRIBUTE_ENUM, - ) - ] - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('elements', [], new ArrayList(new Text(DATABASE::LENGTH_KEY), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' elements are allowed, each ' . DATABASE::LENGTH_KEY . ' characters long.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, new Text(0), 'Default value for column when not provided. Cannot be set when column is required.', true) - ->param('array', false, new Boolean(), 'Is column an array?', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, array $elements, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - if (!is_null($default) && !in_array($default, $elements)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Default value not found in elements'); - } - - $column = createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_STRING, - 'size' => Database::LENGTH_KEY, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'format' => APP_DATABASE_ATTRIBUTE_ENUM, - 'formatOptions' => ['elements' => $elements], - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $response - ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($column, Response::MODEL_ATTRIBUTE_ENUM); - }); - -App::post('/v1/databases/:databaseId/tables/:tableId/columns/ip') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/ip') - ->desc('Create IP address column') - ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'createIpColumn', - description: '/docs/references/databases/create-ip-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_ACCEPTED, - model: Response::MODEL_ATTRIBUTE_IP, - ) - ] - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, new IP(), 'Default value for column when not provided. Cannot be set when column is required.', true) - ->param('array', false, new Boolean(), 'Is column an array?', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - - $column = createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_STRING, - 'size' => 39, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'format' => APP_DATABASE_ATTRIBUTE_IP, - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $response - ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($column, Response::MODEL_ATTRIBUTE_IP); - }); - -App::post('/v1/databases/:databaseId/tables/:tableId/columns/url') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/url') - ->desc('Create URL column') - ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'createUrlColumn', - description: '/docs/references/databases/create-url-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_ACCEPTED, - model: Response::MODEL_ATTRIBUTE_URL, - ) - ] - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, new URL(), 'Default value for column when not provided. Cannot be set when column is required.', true) - ->param('array', false, new Boolean(), 'Is column an array?', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - - $column = createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_STRING, - 'size' => 2000, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'format' => APP_DATABASE_ATTRIBUTE_URL, - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $response - ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($column, Response::MODEL_ATTRIBUTE_URL); - }); - -App::post('/v1/databases/:databaseId/tables/:tableId/columns/integer') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/integer') - ->desc('Create integer column') - ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'createIntegerColumn', - description: '/docs/references/databases/create-integer-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_ACCEPTED, - model: Response::MODEL_ATTRIBUTE_INTEGER, - ) - ] - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('min', null, new Integer(), 'Minimum value to enforce on new documents', true) - ->param('max', null, new Integer(), 'Maximum value to enforce on new documents', true) - ->param('default', null, new Integer(), 'Default value for column when not provided. Cannot be set when column is required.', true) - ->param('array', false, new Boolean(), 'Is column an array?', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - - // Ensure attribute default is within range - $min ??= PHP_INT_MIN; - $max ??= PHP_INT_MAX; - - if ($min > $max) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); - } - - $validator = new Range($min, $max, Database::VAR_INTEGER); - - if (!is_null($default) && !$validator->isValid($default)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); - } - - $size = $max > 2147483647 ? 8 : 4; // Automatically create BigInt depending on max value - - $column = createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_INTEGER, - 'size' => $size, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'format' => APP_DATABASE_ATTRIBUTE_INT_RANGE, - 'formatOptions' => [ - 'min' => $min, - 'max' => $max, - ], - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $formatOptions = $column->getAttribute('formatOptions', []); - - if (!empty($formatOptions)) { - $column->setAttribute('min', \intval($formatOptions['min'])); - $column->setAttribute('max', \intval($formatOptions['max'])); - } - - $response - ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($column, Response::MODEL_ATTRIBUTE_INTEGER); - }); - -App::post('/v1/databases/:databaseId/tables/:tableId/columns/float') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/float') - ->desc('Create float column') - ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'createFloatColumn', - description: '/docs/references/databases/create-float-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_ACCEPTED, - model: Response::MODEL_ATTRIBUTE_FLOAT, - ) - ] - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('min', null, new FloatValidator(), 'Minimum value to enforce on new documents', true) - ->param('max', null, new FloatValidator(), 'Maximum value to enforce on new documents', true) - ->param('default', null, new FloatValidator(), 'Default value for column when not provided. Cannot be set when column is required.', true) - ->param('array', false, new Boolean(), 'Is column an array?', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - - // Ensure attribute default is within range - $min ??= -PHP_FLOAT_MAX; - $max ??= PHP_FLOAT_MAX; - - if ($min > $max) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); - } - - $validator = new Range($min, $max, Database::VAR_FLOAT); - - if (!\is_null($default) && !$validator->isValid($default)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); - } - - $column = createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_FLOAT, - 'required' => $required, - 'size' => 0, - 'default' => $default, - 'array' => $array, - 'format' => APP_DATABASE_ATTRIBUTE_FLOAT_RANGE, - 'formatOptions' => [ - 'min' => $min, - 'max' => $max, - ], - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $formatOptions = $column->getAttribute('formatOptions', []); - - if (!empty($formatOptions)) { - $column->setAttribute('min', \floatval($formatOptions['min'])); - $column->setAttribute('max', \floatval($formatOptions['max'])); - } - - $response - ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($column, Response::MODEL_ATTRIBUTE_FLOAT); - }); - -App::post('/v1/databases/:databaseId/tables/:tableId/columns/boolean') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/boolean') - ->desc('Create boolean column') - ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'createBooleanColumn', - description: '/docs/references/databases/create-boolean-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_ACCEPTED, - model: Response::MODEL_ATTRIBUTE_BOOLEAN, - ) - ] - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, new Boolean(), 'Default value for column when not provided. Cannot be set when column is required.', true) - ->param('array', false, new Boolean(), 'Is column an array?', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - - $column = createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_BOOLEAN, - 'size' => 0, - 'required' => $required, - 'default' => $default, - 'array' => $array, - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $response - ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($column, Response::MODEL_ATTRIBUTE_BOOLEAN); - }); - -App::post('/v1/databases/:databaseId/tables/:tableId/columns/datetime') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/datetime') - ->desc('Create datetime column') - ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'createDatetimeColumn', - description: '/docs/references/databases/create-datetime-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_ACCEPTED, - model: Response::MODEL_ATTRIBUTE_DATETIME, - ) - ] - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, fn (Database $dbForProject) => new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime()), 'Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.', true, ['dbForProject']) - ->param('array', false, new Boolean(), 'Is column an array?', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - - $filters[] = 'datetime'; - - $column = createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_DATETIME, - 'size' => 0, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'filters' => $filters, - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $response - ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($column, Response::MODEL_ATTRIBUTE_DATETIME); - }); - -App::post('/v1/databases/:databaseId/tables/:tableId/columns/relationship') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/relationship') - ->desc('Create relationship column') - ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'createRelationshipColumn', - description: '/docs/references/databases/create-relationship-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_ACCEPTED, - model: Response::MODEL_ATTRIBUTE_RELATIONSHIP, - ) - ] - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('relatedTableId', '', new UID(), 'Related Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('type', '', new WhiteList([Database::RELATION_ONE_TO_ONE, Database::RELATION_MANY_TO_ONE, Database::RELATION_MANY_TO_MANY, Database::RELATION_ONE_TO_MANY], true), 'Relation type') - ->param('twoWay', false, new Boolean(), 'Is Two Way?', true) - ->param('key', null, new Key(), 'Column Key.', true) - ->param('twoWayKey', null, new Key(), 'Two Way Column Key.', true) - ->param('onDelete', Database::RELATION_MUTATE_RESTRICT, new WhiteList([Database::RELATION_MUTATE_CASCADE, Database::RELATION_MUTATE_RESTRICT, Database::RELATION_MUTATE_SET_NULL], true), 'Constraints option', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->action(function ( - string $databaseId, - string $tableId, - string $relatedTableId, - string $type, - bool $twoWay, - ?string $key, - ?string $twoWayKey, - string $onDelete, - Response $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ) { - $key ??= $relatedTableId; - $twoWayKey ??= $tableId; - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId()); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $relatedTableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId); - $relatedTable = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $relatedTableDocument->getInternalId()); - - if ($relatedTable->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $columns = $table->getAttribute('attributes', []); - /** @var Document[] $columns */ - foreach ($columns as $column) { - if ($column->getAttribute('type') !== Database::VAR_RELATIONSHIP) { - continue; - } - - if (\strtolower($column->getId()) === \strtolower($key)) { - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); - } - - if ( - \strtolower($column->getAttribute('options')['twoWayKey']) === \strtolower($twoWayKey) && - $column->getAttribute('options')['relatedCollection'] === $relatedTable->getId() - ) { - // Console should provide a unique twoWayKey input! - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.'); - } - - if ( - $type === Database::RELATION_MANY_TO_MANY && - $column->getAttribute('options')['relationType'] === Database::RELATION_MANY_TO_MANY && - $column->getAttribute('options')['relatedCollection'] === $relatedTable->getId() - ) { - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Creating more than one "manyToMany" relationship on the same table is currently not permitted.'); - } - } - - $column = createColumn( - $databaseId, - $tableId, - new Document([ - 'key' => $key, - 'type' => Database::VAR_RELATIONSHIP, - 'size' => 0, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - 'options' => [ - 'relatedCollection' => $relatedTableId, - 'relationType' => $type, - 'twoWay' => $twoWay, - 'twoWayKey' => $twoWayKey, - 'onDelete' => $onDelete, - ] - ]), - $response, - $dbForProject, - $queueForDatabase, - $queueForEvents - ); - - $options = $column->getAttribute('options', []); - - foreach ($options as $key => $option) { - $column->setAttribute($key, $option); - } - - $response - ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($column, Response::MODEL_ATTRIBUTE_RELATIONSHIP); - }); - -App::get('/v1/databases/:databaseId/tables/:tableId/columns') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes') - ->desc('List columns') - ->groups(['api', 'database']) - ->label('scope', 'collections.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'listColumns', - description: '/docs/references/databases/list-attributes.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_ATTRIBUTE_LIST - ) - ] - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('queries', [], new Attributes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Attributes::ALLOWED_ATTRIBUTES), true) - ->inject('response') - ->inject('dbForProject') - ->action(function (string $databaseId, string $tableId, array $queries, Response $response, Database $dbForProject) { - /** @var Document $database */ - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $queries = Query::parseQueries($queries); - - \array_push( - $queries, - Query::equal('databaseInternalId', [$database->getInternalId()]), - Query::equal('collectionInternalId', [$table->getInternalId()]), - ); - - /** - * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries - */ - $cursor = \array_filter($queries, function ($query) { - return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); - }); - - $cursor = \reset($cursor); - - if ($cursor) { - $validator = new Cursor(); - if (!$validator->isValid($cursor)) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); - } - - $columnId = $cursor->getValue(); - $cursorDocument = Authorization::skip(fn () => $dbForProject->find('attributes', [ - Query::equal('databaseInternalId', [$database->getInternalId()]), - Query::equal('collectionInternalId', [$table->getInternalId()]), - Query::equal('key', [$columnId]), - Query::limit(1), - ])); - - if (empty($cursorDocument) || $cursorDocument[0]->isEmpty()) { - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Column '{$columnId}' for the 'cursor' value not found."); - } - - $cursor->setValue($cursorDocument[0]); - } - - $filters = Query::groupByType($queries)['filters']; - try { - $columns = $dbForProject->find('attributes', $queries); - $total = $dbForProject->count('attributes', $filters, APP_LIMIT_COUNT); - } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); - } - - $response->dynamic(new Document([ - 'attributes' => $columns, - 'total' => $total, - ]), Response::MODEL_ATTRIBUTE_LIST); - }); - -App::get('/v1/databases/:databaseId/tables/:tableId/columns/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/:key') - ->desc('Get column') - ->groups(['api', 'database']) - ->label('scope', 'collections.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'getColumn', - description: '/docs/references/databases/get-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: [ - Response::MODEL_ATTRIBUTE_BOOLEAN, - Response::MODEL_ATTRIBUTE_INTEGER, - Response::MODEL_ATTRIBUTE_FLOAT, - Response::MODEL_ATTRIBUTE_EMAIL, - Response::MODEL_ATTRIBUTE_ENUM, - Response::MODEL_ATTRIBUTE_URL, - Response::MODEL_ATTRIBUTE_IP, - Response::MODEL_ATTRIBUTE_DATETIME, - Response::MODEL_ATTRIBUTE_RELATIONSHIP, - Response::MODEL_ATTRIBUTE_STRING - ] - ), - ] - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->inject('response') - ->inject('dbForProject') - ->action(function (string $databaseId, string $tableId, string $key, Response $response, Database $dbForProject) { - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $column = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $table->getInternalId() . '_' . $key); - - if ($column->isEmpty()) { - throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); - } - - // Select response model based on type and format - $type = $column->getAttribute('type'); - $format = $column->getAttribute('format'); - $options = $column->getAttribute('options', []); - - foreach ($options as $key => $option) { - $column->setAttribute($key, $option); - } - - $model = match ($type) { - Database::VAR_BOOLEAN => Response::MODEL_ATTRIBUTE_BOOLEAN, - Database::VAR_INTEGER => Response::MODEL_ATTRIBUTE_INTEGER, - Database::VAR_FLOAT => Response::MODEL_ATTRIBUTE_FLOAT, - Database::VAR_DATETIME => Response::MODEL_ATTRIBUTE_DATETIME, - Database::VAR_RELATIONSHIP => Response::MODEL_ATTRIBUTE_RELATIONSHIP, - Database::VAR_STRING => match ($format) { - APP_DATABASE_ATTRIBUTE_EMAIL => Response::MODEL_ATTRIBUTE_EMAIL, - APP_DATABASE_ATTRIBUTE_ENUM => Response::MODEL_ATTRIBUTE_ENUM, - APP_DATABASE_ATTRIBUTE_IP => Response::MODEL_ATTRIBUTE_IP, - APP_DATABASE_ATTRIBUTE_URL => Response::MODEL_ATTRIBUTE_URL, - default => Response::MODEL_ATTRIBUTE_STRING, - }, - default => Response::MODEL_ATTRIBUTE, - }; - - $response->dynamic($column, $model); - }); - -App::patch('/v1/databases/:databaseId/tables/:tableId/columns/string/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/string/:key') - ->desc('Update string column') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') - ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'updateStringColumn', - description: '/docs/references/databases/update-string-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_ATTRIBUTE_STRING, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, new Nullable(new Text(0, 0)), 'Default value for column when not provided. Cannot be set when column is required.') - ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Range::TYPE_INTEGER), 'Maximum size of the string attribute.', true) - ->param('newKey', null, new Key(), 'New Column Key.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?int $size, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - - $column = updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_STRING, - size: $size, - default: $default, - required: $required, - newKey: $newKey - ); - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($column, Response::MODEL_ATTRIBUTE_STRING); - }); - -App::patch('/v1/databases/:databaseId/tables/:tableId/columns/email/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/email/:key') - ->desc('Update email column') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') - ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'updateEmailColumn', - description: '/docs/references/databases/update-email-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_ATTRIBUTE_EMAIL, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, new Nullable(new Email()), 'Default value for column when not provided. Cannot be set when column is required.') - ->param('newKey', null, new Key(), 'New Column Key.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $column = updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_STRING, - filter: APP_DATABASE_ATTRIBUTE_EMAIL, - default: $default, - required: $required, - newKey: $newKey - ); - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($column, Response::MODEL_ATTRIBUTE_EMAIL); - }); - -App::patch('/v1/databases/:databaseId/tables/:tableId/columns/enum/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/enum/:key') - ->desc('Update enum column') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') - ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'updateEnumColumn', - description: '/docs/references/databases/update-enum-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_ATTRIBUTE_ENUM, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('elements', null, new ArrayList(new Text(DATABASE::LENGTH_KEY), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' elements are allowed, each ' . DATABASE::LENGTH_KEY . ' characters long.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, new Nullable(new Text(0)), 'Default value for column when not provided. Cannot be set when column is required.') - ->param('newKey', null, new Key(), 'New Column Key.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?array $elements, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $column = updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_STRING, - filter: APP_DATABASE_ATTRIBUTE_ENUM, - default: $default, - required: $required, - elements: $elements, - newKey: $newKey - ); - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($column, Response::MODEL_ATTRIBUTE_ENUM); - }); - -App::patch('/v1/databases/:databaseId/tables/:tableId/columns/ip/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/ip/:key') - ->desc('Update IP address column') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') - ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'updateIpColumn', - description: '/docs/references/databases/update-ip-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_ATTRIBUTE_IP, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, new Nullable(new IP()), 'Default value for column when not provided. Cannot be set when column is required.') - ->param('newKey', null, new Key(), 'New Column Key.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $column = updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_STRING, - filter: APP_DATABASE_ATTRIBUTE_IP, - default: $default, - required: $required, - newKey: $newKey - ); - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($column, Response::MODEL_ATTRIBUTE_IP); - }); - -App::patch('/v1/databases/:databaseId/tables/:tableId/columns/url/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/url/:key') - ->desc('Update URL column') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') - ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'updateUrlColumn', - description: '/docs/references/databases/update-url-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_ATTRIBUTE_URL, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, new Nullable(new URL()), 'Default value for column when not provided. Cannot be set when column is required.') - ->param('newKey', null, new Key(), 'New Column Key.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $column = updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_STRING, - filter: APP_DATABASE_ATTRIBUTE_URL, - default: $default, - required: $required, - newKey: $newKey - ); - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($column, Response::MODEL_ATTRIBUTE_URL); - }); - -App::patch('/v1/databases/:databaseId/tables/:tableId/columns/integer/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/integer/:key') - ->desc('Update integer column') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') - ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'updateIntegerColumn', - description: '/docs/references/databases/update-integer-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_ATTRIBUTE_INTEGER, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('min', null, new Integer(), 'Minimum value to enforce on new documents', true) - ->param('max', null, new Integer(), 'Maximum value to enforce on new documents', true) - ->param('default', null, new Nullable(new Integer()), 'Default value for column when not provided. Cannot be set when column is required.') - ->param('newKey', null, new Key(), 'New Column Key.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $column = updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_INTEGER, - default: $default, - required: $required, - min: $min, - max: $max, - newKey: $newKey - ); - - $formatOptions = $column->getAttribute('formatOptions', []); - - if (!empty($formatOptions)) { - $column->setAttribute('min', \intval($formatOptions['min'])); - $column->setAttribute('max', \intval($formatOptions['max'])); - } - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($column, Response::MODEL_ATTRIBUTE_INTEGER); - }); - -App::patch('/v1/databases/:databaseId/tables/:tableId/columns/float/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/float/:key') - ->desc('Update float column') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') - ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'updateFloatColumn', - description: '/docs/references/databases/update-float-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_ATTRIBUTE_FLOAT, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('min', null, new FloatValidator(), 'Minimum value to enforce on new documents', true) - ->param('max', null, new FloatValidator(), 'Maximum value to enforce on new documents', true) - ->param('default', null, new Nullable(new FloatValidator()), 'Default value for column when not provided. Cannot be set when column is required.') - ->param('newKey', null, new Key(), 'New Column Key.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $column = updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_FLOAT, - default: $default, - required: $required, - min: $min, - max: $max, - newKey: $newKey - ); - - $formatOptions = $column->getAttribute('formatOptions', []); - - if (!empty($formatOptions)) { - $column->setAttribute('min', \floatval($formatOptions['min'])); - $column->setAttribute('max', \floatval($formatOptions['max'])); - } - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($column, Response::MODEL_ATTRIBUTE_FLOAT); - }); - -App::patch('/v1/databases/:databaseId/tables/:tableId/columns/boolean/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/boolean/:key') - ->desc('Update boolean column') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') - ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'updateBooleanColumn', - description: '/docs/references/databases/update-boolean-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_ATTRIBUTE_BOOLEAN, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, new Nullable(new Boolean()), 'Default value for column when not provided. Cannot be set when column is required.') - ->param('newKey', null, new Key(), 'New Column Key.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $column = updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_BOOLEAN, - default: $default, - required: $required, - newKey: $newKey - ); - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($column, Response::MODEL_ATTRIBUTE_BOOLEAN); - }); - -App::patch('/v1/databases/:databaseId/tables/:tableId/columns/datetime/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/datetime/:key') - ->desc('Update dateTime column') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') - ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'updateDatetimeColumn', - description: '/docs/references/databases/update-datetime-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_ATTRIBUTE_DATETIME, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, fn (Database $dbForProject) => new Nullable(new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime())), 'Default value for column when not provided. Cannot be set when column is required.', injections: ['dbForProject']) - ->param('newKey', null, new Key(), 'New Column Key.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?string $newKey, Response $response, Database $dbForProject, Event $queueForEvents) { - $column = updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_DATETIME, - default: $default, - required: $required, - newKey: $newKey - ); - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($column, Response::MODEL_ATTRIBUTE_DATETIME); - }); - -App::patch('/v1/databases/:databaseId/tables/:tableId/columns/:key/relationship') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/:key/relationship') - ->desc('Update relationship column') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') - ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'updateRelationshipColumn', - description: '/docs/references/databases/update-relationship-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_ATTRIBUTE_RELATIONSHIP, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->param('onDelete', null, new WhiteList([Database::RELATION_MUTATE_CASCADE, Database::RELATION_MUTATE_RESTRICT, Database::RELATION_MUTATE_SET_NULL], true), 'Constraints option', true) - ->param('newKey', null, new Key(), 'New Column Key.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->action(function ( - string $databaseId, - string $tableId, - string $key, - ?string $onDelete, - ?string $newKey, - Response $response, - Database $dbForProject, - Event $queueForEvents - ) { - $column = updateColumn( - $databaseId, - $tableId, - $key, - $dbForProject, - $queueForEvents, - type: Database::VAR_RELATIONSHIP, - required: false, - options: [ - 'onDelete' => $onDelete - ], - newKey: $newKey - ); - - $options = $column->getAttribute('options', []); - - foreach ($options as $key => $option) { - $column->setAttribute($key, $option); - } - - $response - ->setStatusCode(Response::STATUS_CODE_OK) - ->dynamic($column, Response::MODEL_ATTRIBUTE_RELATIONSHIP); - }); - -App::delete('/v1/databases/:databaseId/tables/:tableId/columns/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/attributes/:key') - ->desc('Delete column') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') - ->label('audits.event', 'column.delete') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'columns', - name: 'deleteColumn', - description: '/docs/references/databases/delete-attribute.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_NOCONTENT, - model: Response::MODEL_NONE, - ) - ], - contentType: ContentType::NONE - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Column Key.') - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $tableId, string $key, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents, StatsUsage $queueForStatsUsage) { - - $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($db->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $column = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); - - if ($column->isEmpty()) { - throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); - } - - /** - * Check index dependency - */ - $validator = new IndexDependencyValidator( - $table->getAttribute('indexes'), - $dbForProject->getAdapter()->getSupportForCastIndexArray(), - ); - - if (! $validator->isValid($column)) { - throw new Exception(Exception::INDEX_DEPENDENCY); - } - - // Only update status if removing available attribute - if ($column->getAttribute('status') === 'available') { - $column = $dbForProject->updateDocument('attributes', $column->getId(), $column->setAttribute('status', 'deleting')); - } - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); - - if ($column->getAttribute('type') === Database::VAR_RELATIONSHIP) { - $options = $column->getAttribute('options'); - if ($options['twoWay']) { - $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection']); - - if ($relatedTable->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $relatedColumn = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $options['twoWayKey']); - - if ($relatedColumn->isEmpty()) { - throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); - } - - if ($relatedColumn->getAttribute('status') === 'available') { - $dbForProject->updateDocument('attributes', $relatedColumn->getId(), $relatedColumn->setAttribute('status', 'deleting')); - } - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $options['relatedCollection']); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); - } - } - - $queueForDatabase - ->setType(DATABASE_TYPE_DELETE_ATTRIBUTE) - ->setTable($table) - ->setDatabase($db) - ->setRow($column); - - // Select response model based on type and format - $type = $column->getAttribute('type'); - $format = $column->getAttribute('format'); - - $model = match ($type) { - Database::VAR_BOOLEAN => Response::MODEL_ATTRIBUTE_BOOLEAN, - Database::VAR_INTEGER => Response::MODEL_ATTRIBUTE_INTEGER, - Database::VAR_FLOAT => Response::MODEL_ATTRIBUTE_FLOAT, - Database::VAR_DATETIME => Response::MODEL_ATTRIBUTE_DATETIME, - Database::VAR_RELATIONSHIP => Response::MODEL_ATTRIBUTE_RELATIONSHIP, - Database::VAR_STRING => match ($format) { - APP_DATABASE_ATTRIBUTE_EMAIL => Response::MODEL_ATTRIBUTE_EMAIL, - APP_DATABASE_ATTRIBUTE_ENUM => Response::MODEL_ATTRIBUTE_ENUM, - APP_DATABASE_ATTRIBUTE_IP => Response::MODEL_ATTRIBUTE_IP, - APP_DATABASE_ATTRIBUTE_URL => Response::MODEL_ATTRIBUTE_URL, - default => Response::MODEL_ATTRIBUTE_STRING, - }, - default => Response::MODEL_ATTRIBUTE, - }; - - $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('columnId', $column->getId()) - ->setContext('table', $table) - ->setContext('database', $db) - ->setPayload($response->output($column, $model)); - - $response->noContent(); - }); - App::post('/v1/databases/:databaseId/tables/:tableId/indexes') ->alias('/v1/databases/:databaseId/collections/:tableId/indexes') ->desc('Create index') @@ -4276,7 +2378,7 @@ App::get('/v1/databases/usage') Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { foreach ($metrics as $metric) { - $result = $dbForProject->findOne('stats', [ + $result = $dbForProject->findOne('stats', [ Query::equal('metric', [$metric]), Query::equal('period', ['inf']) ]); @@ -4305,7 +2407,7 @@ App::get('/v1/databases/usage') }; foreach ($metrics as $metric) { - $usage[$metric]['total'] = $stats[$metric]['total']; + $usage[$metric]['total'] = $stats[$metric]['total']; $usage[$metric]['data'] = []; $leap = time() - ($days['limit'] * $days['factor']); while ($leap < time()) { @@ -4319,16 +2421,16 @@ App::get('/v1/databases/usage') } $response->dynamic(new Document([ 'range' => $range, - 'databasesTotal' => $usage[$metrics[0]]['total'], + 'databasesTotal' => $usage[$metrics[0]]['total'], 'collectionsTotal' => $usage[$metrics[1]]['total'], - 'documentsTotal' => $usage[$metrics[2]]['total'], - 'storageTotal' => $usage[$metrics[3]]['total'], + 'documentsTotal' => $usage[$metrics[2]]['total'], + 'storageTotal' => $usage[$metrics[3]]['total'], 'databasesReadsTotal' => $usage[$metrics[4]]['total'], 'databasesWritesTotal' => $usage[$metrics[5]]['total'], - 'databases' => $usage[$metrics[0]]['data'], + 'databases' => $usage[$metrics[0]]['data'], 'collections' => $usage[$metrics[1]]['data'], - 'documents' => $usage[$metrics[2]]['data'], - 'storage' => $usage[$metrics[3]]['data'], + 'documents' => $usage[$metrics[2]]['data'], + 'storage' => $usage[$metrics[3]]['data'], 'databasesReads' => $usage[$metrics[4]]['data'], 'databasesWrites' => $usage[$metrics[5]]['data'], ]), Response::MODEL_USAGE_DATABASES); @@ -4359,7 +2461,7 @@ App::get('/v1/databases/:databaseId/usage') ->inject('dbForProject') ->action(function (string $databaseId, string $range, Response $response, Database $dbForProject) { - $database = $dbForProject->getDocument('databases', $databaseId); + $database = $dbForProject->getDocument('databases', $databaseId); if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); @@ -4378,7 +2480,7 @@ App::get('/v1/databases/:databaseId/usage') Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { foreach ($metrics as $metric) { - $result = $dbForProject->findOne('stats', [ + $result = $dbForProject->findOne('stats', [ Query::equal('metric', [$metric]), Query::equal('period', ['inf']) ]); @@ -4407,7 +2509,7 @@ App::get('/v1/databases/:databaseId/usage') }; foreach ($metrics as $metric) { - $usage[$metric]['total'] = $stats[$metric]['total']; + $usage[$metric]['total'] = $stats[$metric]['total']; $usage[$metric]['data'] = []; $leap = time() - ($days['limit'] * $days['factor']); while ($leap < time()) { @@ -4422,16 +2524,16 @@ App::get('/v1/databases/:databaseId/usage') $response->dynamic(new Document([ 'range' => $range, - 'collectionsTotal' => $usage[$metrics[0]]['total'], - 'documentsTotal' => $usage[$metrics[1]]['total'], - 'storageTotal' => $usage[$metrics[2]]['total'], + 'collectionsTotal' => $usage[$metrics[0]]['total'], + 'documentsTotal' => $usage[$metrics[1]]['total'], + 'storageTotal' => $usage[$metrics[2]]['total'], 'databaseReadsTotal' => $usage[$metrics[3]]['total'], 'databaseWritesTotal' => $usage[$metrics[4]]['total'], - 'collections' => $usage[$metrics[0]]['data'], - 'documents' => $usage[$metrics[1]]['data'], - 'storage' => $usage[$metrics[2]]['data'], - 'databaseReads' => $usage[$metrics[3]]['data'], - 'databaseWrites' => $usage[$metrics[4]]['data'], + 'collections' => $usage[$metrics[0]]['data'], + 'documents' => $usage[$metrics[1]]['data'], + 'storage' => $usage[$metrics[2]]['data'], + 'databaseReads' => $usage[$metrics[3]]['data'], + 'databaseWrites' => $usage[$metrics[4]]['data'], ]), Response::MODEL_USAGE_DATABASE); }); @@ -4479,7 +2581,7 @@ App::get('/v1/databases/:databaseId/tables/:tableId/usage') Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { foreach ($metrics as $metric) { - $result = $dbForProject->findOne('stats', [ + $result = $dbForProject->findOne('stats', [ Query::equal('metric', [$metric]), Query::equal('period', ['inf']) ]); @@ -4496,7 +2598,7 @@ App::get('/v1/databases/:databaseId/tables/:tableId/usage') $stats[$metric]['data'] = []; foreach ($results as $result) { $stats[$metric]['data'][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), + 'value' => $result->getAttribute('value'), ]; } } @@ -4508,7 +2610,7 @@ App::get('/v1/databases/:databaseId/tables/:tableId/usage') }; foreach ($metrics as $metric) { - $usage[$metric]['total'] = $stats[$metric]['total']; + $usage[$metric]['total'] = $stats[$metric]['total']; $usage[$metric]['data'] = []; $leap = time() - ($days['limit'] * $days['factor']); while ($leap < time()) { @@ -4523,7 +2625,7 @@ App::get('/v1/databases/:databaseId/tables/:tableId/usage') $response->dynamic(new Document([ 'range' => $range, - 'documentsTotal' => $usage[$metrics[0]]['total'], - 'documents' => $usage[$metrics[0]]['data'], + 'documentsTotal' => $usage[$metrics[0]]['total'], + 'documents' => $usage[$metrics[0]]['data'], ]), Response::MODEL_USAGE_COLLECTION); }); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php new file mode 100644 index 0000000000..70c26594a3 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php @@ -0,0 +1,417 @@ +getAttribute('key'); + $type = $column->getAttribute('type', ''); + $size = $column->getAttribute('size', 0); + $required = $column->getAttribute('required', true); + $signed = $column->getAttribute('signed', true); // integers are signed by default + $array = $column->getAttribute('array', false); + $format = $column->getAttribute('format', ''); + $formatOptions = $column->getAttribute('formatOptions', []); + $filters = $column->getAttribute('filters', []); // filters are hidden from the endpoint + $default = $column->getAttribute('default'); + $options = $column->getAttribute('options', []); + + $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($db->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); + + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + if (!empty($format)) { + if (!Structure::hasFormat($format, $type)) { + throw new Exception(Exception::ATTRIBUTE_FORMAT_UNSUPPORTED, "Format {$format} not available for {$type} columns."); + } + } + + // Must throw here since dbForProject->createAttribute is performed by db worker + if ($required && isset($default)) { + throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for required column'); + } + + if ($array && isset($default)) { + throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for array columns'); + } + + if ($type === Database::VAR_RELATIONSHIP) { + $options['side'] = Database::RELATION_SIDE_PARENT; + $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection'] ?? ''); + if ($relatedTable->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND, 'The related table was not found.'); + } + } + + try { + $column = new Document([ + '$id' => ID::custom($db->getInternalId() . '_' . $table->getInternalId() . '_' . $key), + 'key' => $key, + 'databaseInternalId' => $db->getInternalId(), + 'databaseId' => $db->getId(), + 'collectionInternalId' => $table->getInternalId(), + 'collectionId' => $tableId, + 'type' => $type, + 'status' => 'processing', // processing, available, failed, deleting, stuck + 'size' => $size, + 'required' => $required, + 'signed' => $signed, + 'default' => $default, + 'array' => $array, + 'format' => $format, + 'formatOptions' => $formatOptions, + 'filters' => $filters, + 'options' => $options, + ]); + + $dbForProject->checkAttribute($table, $column); + $column = $dbForProject->createDocument('attributes', $column); + } catch (DuplicateException) { + throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); + } catch (LimitException) { + throw new Exception(Exception::ATTRIBUTE_LIMIT_EXCEEDED); + } catch (Throwable $e) { + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); + throw $e; + } + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); + + if ($type === Database::VAR_RELATIONSHIP && $options['twoWay']) { + $twoWayKey = $options['twoWayKey']; + $options['relatedCollection'] = $table->getId(); + $options['twoWayKey'] = $key; + $options['side'] = Database::RELATION_SIDE_CHILD; + + try { + $twoWayAttribute = new Document([ + '$id' => ID::custom($db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $twoWayKey), + 'key' => $twoWayKey, + 'databaseInternalId' => $db->getInternalId(), + 'databaseId' => $db->getId(), + 'collectionInternalId' => $relatedTable->getInternalId(), + 'collectionId' => $relatedTable->getId(), + 'type' => $type, + 'status' => 'processing', // processing, available, failed, deleting, stuck + 'size' => $size, + 'required' => $required, + 'signed' => $signed, + 'default' => $default, + 'array' => $array, + 'format' => $format, + 'formatOptions' => $formatOptions, + 'filters' => $filters, + 'options' => $options, + ]); + + $dbForProject->checkAttribute($relatedTable, $twoWayAttribute); + $dbForProject->createDocument('attributes', $twoWayAttribute); + } catch (DuplicateException) { + $dbForProject->deleteDocument('attributes', $column->getId()); + throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); + } catch (LimitException) { + $dbForProject->deleteDocument('attributes', $column->getId()); + throw new Exception(Exception::ATTRIBUTE_LIMIT_EXCEEDED); + } catch (Throwable $e) { + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); + throw $e; + } + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); + } + + $queueForDatabase + ->setType(DATABASE_TYPE_CREATE_ATTRIBUTE) + ->setDatabase($db) + ->setTable($table) + ->setRow($column); + + $queueForEvents + ->setContext('table', $table) + ->setContext('database', $db) + ->setParam('databaseId', $databaseId) + ->setParam('tableId', $table->getId()) + ->setParam('columnId', $column->getId()); + + $response->setStatusCode(SwooleResponse::STATUS_CODE_CREATED); + + return $column; + } + + protected function updateColumn( + string $databaseId, + string $tableId, + string $key, + Database $dbForProject, + Event $queueForEvents, + string $type, + int $size = null, + string $filter = null, + string|bool|int|float $default = null, + bool $required = null, + int|float|null $min = null, + int|float|null $max = null, + array $elements = null, + array $options = [], + string $newKey = null, + ): Document { + $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($db->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); + + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $column = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); + + if ($column->isEmpty()) { + throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + } + + if ($column->getAttribute('status') !== 'available') { + throw new Exception(Exception::ATTRIBUTE_NOT_AVAILABLE); + } + + if ($column->getAttribute(('type') !== $type)) { + throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID); + } + + if ($column->getAttribute('type') === Database::VAR_STRING && $column->getAttribute(('filter') !== $filter)) { + throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID); + } + + if ($required && isset($default)) { + throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for required column'); + } + + if ($column->getAttribute('array', false) && isset($default)) { + throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for array columns'); + } + + $tableId = 'database_' . $db->getInternalId() . '_collection_' . $table->getInternalId(); + + $column + ->setAttribute('default', $default) + ->setAttribute('required', $required); + + if (!empty($size)) { + $column->setAttribute('size', $size); + } + + switch ($column->getAttribute('format')) { + case APP_DATABASE_ATTRIBUTE_INT_RANGE: + case APP_DATABASE_ATTRIBUTE_FLOAT_RANGE: + $min ??= $column->getAttribute('formatOptions')['min']; + $max ??= $column->getAttribute('formatOptions')['max']; + + if ($min > $max) { + throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); + } + + if ($column->getAttribute('format') === APP_DATABASE_ATTRIBUTE_INT_RANGE) { + $validator = new Range($min, $max, Database::VAR_INTEGER); + } else { + $validator = new Range($min, $max, Database::VAR_FLOAT); + + if (!is_null($default)) { + $default = \floatval($default); + } + } + + if (!is_null($default) && !$validator->isValid($default)) { + throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); + } + + $options = [ + 'min' => $min, + 'max' => $max + ]; + $column->setAttribute('formatOptions', $options); + + break; + case APP_DATABASE_ATTRIBUTE_ENUM: + if (empty($elements)) { + throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Enum elements must not be empty'); + } + + foreach ($elements as $element) { + if (\strlen($element) === 0) { + throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Each enum element must not be empty'); + } + } + + if (!is_null($default) && !in_array($default, $elements)) { + throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Default value not found in elements'); + } + + $options = [ + 'elements' => $elements + ]; + + $column->setAttribute('formatOptions', $options); + + break; + } + + if ($type === Database::VAR_RELATIONSHIP) { + $primaryRowOptions = \array_merge($column->getAttribute('options', []), $options); + $column->setAttribute('options', $primaryRowOptions); + try { + $dbForProject->updateRelationship( + collection: $tableId, + id: $key, + newKey: $newKey, + onDelete: $primaryRowOptions['onDelete'], + ); + } catch (NotFoundException) { + throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + } + + if ($primaryRowOptions['twoWay']) { + $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $primaryRowOptions['relatedCollection']); + + $relatedColumn = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $primaryRowOptions['twoWayKey']); + + if (!empty($newKey) && $newKey !== $key) { + $options['twoWayKey'] = $newKey; + } + + $relatedOptions = \array_merge($relatedColumn->getAttribute('options'), $options); + $relatedColumn->setAttribute('options', $relatedOptions); + $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $primaryRowOptions['twoWayKey'], $relatedColumn); + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); + } + } else { + try { + $dbForProject->updateAttribute( + collection: $tableId, + id: $key, + size: $size, + required: $required, + default: $default, + formatOptions: $options, + newKey: $newKey ?? null + ); + } catch (TruncateException) { + throw new Exception(Exception::ATTRIBUTE_INVALID_RESIZE); + } catch (NotFoundException) { + throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + } catch (LimitException) { + throw new Exception(Exception::ATTRIBUTE_LIMIT_EXCEEDED); + } catch (IndexException $e) { + throw new Exception(Exception::INDEX_INVALID, $e->getMessage()); + } + } + + if (!empty($newKey) && $key !== $newKey) { + $originalUid = $column->getId(); + + $column + ->setAttribute('$id', ID::custom($db->getInternalId() . '_' . $table->getInternalId() . '_' . $newKey)) + ->setAttribute('key', $newKey); + + $dbForProject->updateDocument('attributes', $originalUid, $column); + + /** + * @var Document $index + */ + foreach ($table->getAttribute('indexes') as $index) { + /** + * @var string[] $columns + */ + $columns = $index->getAttribute('attributes', []); + $found = \array_search($key, $columns); + + if ($found !== false) { + $columns[$found] = $newKey; + $index->setAttribute('attributes', $columns); + $dbForProject->updateDocument('indexes', $index->getId(), $index); + } + } + } else { + $column = $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key, $column); + } + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $table->getId()); + + $queueForEvents + ->setContext('table', $table) + ->setContext('database', $db) + ->setParam('databaseId', $databaseId) + ->setParam('tableId', $table->getId()) + ->setParam('columnId', $column->getId()); + + return $column; + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php new file mode 100644 index 0000000000..dab0527fa7 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php @@ -0,0 +1,84 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/boolean') + ->desc('Create boolean column') + ->groups(['api', 'database', 'schema']) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'createBooleanColumn', + description: '/docs/references/databases/create-boolean-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN, + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Boolean(), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { + + $column = $this->createColumn($databaseId, $tableId, new Document([ + 'key' => $key, + 'type' => Database::VAR_BOOLEAN, + 'size' => 0, + 'required' => $required, + 'default' => $default, + 'array' => $array, + ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php new file mode 100644 index 0000000000..35148fc174 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php @@ -0,0 +1,86 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/boolean/:key') + ->desc('Update boolean column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'updateBooleanColumn', + description: '/docs/references/databases/update-boolean-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Nullable(new Boolean()), 'Default value for column when not provided. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + { + $column = $this->updateColumn( + databaseId: $databaseId, + tableId: $tableId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_BOOLEAN, + default: $default, + required: $required, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php new file mode 100644 index 0000000000..36ddfb4dfa --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php @@ -0,0 +1,106 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/datetime') + ->desc('Create datetime column') + ->groups(['api', 'database']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'createDatetimeColumn', + description: '/docs/references/databases/create-datetime-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: UtopiaResponse::MODEL_ATTRIBUTE_DATETIME, + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, fn (Database $dbForProject) => new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime()), 'Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.', true, ['dbForProject']) + ->param('array', false, new Boolean(), 'Is column an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?string $default, + bool $array, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $filters = ['datetime']; + + $column = $this->createColumn( + $databaseId, + $tableId, + new Document([ + 'key' => $key, + 'type' => Database::VAR_DATETIME, + 'size' => 0, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'filters' => $filters, + ]), + $response, + $dbForProject, + $queueForDatabase, + $queueForEvents + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_DATETIME); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php new file mode 100644 index 0000000000..d323ed4fd0 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php @@ -0,0 +1,97 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/datetime/:key') + ->desc('Update dateTime column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'updateDatetimeColumn', + description: '/docs/references/databases/update-datetime-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_ATTRIBUTE_DATETIME, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, fn (Database $dbForProject) => new Nullable(new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime())), 'Default value for column when not provided. Cannot be set when column is required.', injections: ['dbForProject']) + ->param('newKey', null, new Key(), 'New Column Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?string $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $column = $this->updateColumn( + databaseId: $databaseId, + tableId: $tableId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_DATETIME, + default: $default, + required: $required, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_DATETIME); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php new file mode 100644 index 0000000000..9baa857fec --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php @@ -0,0 +1,164 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/:key') + ->desc('Delete column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.delete') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'deleteColumn', + description: '/docs/references/databases/delete-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents, + ): void { + $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($db->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $column = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); + if ($column->isEmpty()) { + throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + } + + $validator = new IndexDependencyValidator( + $table->getAttribute('indexes'), + $dbForProject->getAdapter()->getSupportForCastIndexArray(), + ); + if (!$validator->isValid($column)) { + throw new Exception(Exception::INDEX_DEPENDENCY); + } + + if ($column->getAttribute('status') === 'available') { + $column = $dbForProject->updateDocument('attributes', $column->getId(), $column->setAttribute('status', 'deleting')); + } + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); + + if ($column->getAttribute('type') === Database::VAR_RELATIONSHIP) { + $options = $column->getAttribute('options'); + if ($options['twoWay']) { + $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection']); + if ($relatedTable->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $relatedColumn = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $options['twoWayKey']); + if ($relatedColumn->isEmpty()) { + throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + } + + if ($relatedColumn->getAttribute('status') === 'available') { + $dbForProject->updateDocument('attributes', $relatedColumn->getId(), $relatedColumn->setAttribute('status', 'deleting')); + } + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $options['relatedCollection']); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); + } + } + + $queueForDatabase + ->setType(DATABASE_TYPE_DELETE_ATTRIBUTE) + ->setTable($table) + ->setDatabase($db) + ->setRow($column); + + $type = $column->getAttribute('type'); + $format = $column->getAttribute('format'); + + $model = match ($type) { + Database::VAR_BOOLEAN => UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN, + Database::VAR_INTEGER => UtopiaResponse::MODEL_ATTRIBUTE_INTEGER, + Database::VAR_FLOAT => UtopiaResponse::MODEL_ATTRIBUTE_FLOAT, + Database::VAR_DATETIME => UtopiaResponse::MODEL_ATTRIBUTE_DATETIME, + Database::VAR_RELATIONSHIP => UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP, + Database::VAR_STRING => match ($format) { + APP_DATABASE_ATTRIBUTE_EMAIL => UtopiaResponse::MODEL_ATTRIBUTE_EMAIL, + APP_DATABASE_ATTRIBUTE_ENUM => UtopiaResponse::MODEL_ATTRIBUTE_ENUM, + APP_DATABASE_ATTRIBUTE_IP => UtopiaResponse::MODEL_ATTRIBUTE_IP, + APP_DATABASE_ATTRIBUTE_URL => UtopiaResponse::MODEL_ATTRIBUTE_URL, + default => UtopiaResponse::MODEL_ATTRIBUTE_STRING, + }, + default => UtopiaResponse::MODEL_ATTRIBUTE, + }; + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setParam('tableId', $table->getId()) + ->setParam('columnId', $column->getId()) + ->setContext('table', $table) + ->setContext('database', $db) + ->setPayload($response->output($column, $model)); + + $response->noContent(); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php new file mode 100644 index 0000000000..1d51e26efc --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php @@ -0,0 +1,104 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/email') + ->desc('Create email column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'createEmailColumn', + description: '/docs/references/databases/create-email-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: UtopiaResponse::MODEL_ATTRIBUTE_EMAIL, + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Email(), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?string $default, + bool $array, + \Appwrite\Utopia\Response $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $column = $this->createColumn( + $databaseId, + $tableId, + new Document([ + 'key' => $key, + 'type' => Database::VAR_STRING, + 'size' => 254, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'format' => APP_DATABASE_ATTRIBUTE_EMAIL, + ]), + $response, + $dbForProject, + $queueForDatabase, + $queueForEvents + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_EMAIL); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php new file mode 100644 index 0000000000..53e03c93a2 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php @@ -0,0 +1,98 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/email/:key') + ->desc('Update email column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'updateEmailColumn', + description: '/docs/references/databases/update-email-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_ATTRIBUTE_EMAIL, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Nullable(new Email()), 'Default value for column when not provided. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?string $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $column = $this->updateColumn( + databaseId: $databaseId, + tableId: $tableId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_STRING, + filter: APP_DATABASE_ATTRIBUTE_EMAIL, + default: $default, + required: $required, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_EMAIL); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php new file mode 100644 index 0000000000..95ed0b0630 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php @@ -0,0 +1,113 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/enum') + ->desc('Create enum column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'createEnumColumn', + description: '/docs/references/databases/create-attribute-enum.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: UtopiaResponse::MODEL_ATTRIBUTE_ENUM, + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('elements', [], new ArrayList(new Text(Database::LENGTH_KEY), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of enum values.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Text(0), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + array $elements, + ?bool $required, + ?string $default, + bool $array, + \Appwrite\Utopia\Response $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + if (!is_null($default) && !in_array($default, $elements, true)) { + throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Default value not found in elements'); + } + + $column = $this->createColumn( + $databaseId, + $tableId, + new Document([ + 'key' => $key, + 'type' => Database::VAR_STRING, + 'size' => Database::LENGTH_KEY, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'format' => APP_DATABASE_ATTRIBUTE_ENUM, + 'formatOptions' => ['elements' => $elements], + ]), + $response, + $dbForProject, + $queueForDatabase, + $queueForEvents + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_ENUM); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php new file mode 100644 index 0000000000..d52dd161e4 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php @@ -0,0 +1,102 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/enum/:key') + ->desc('Update enum column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'updateEnumColumn', + description: '/docs/references/databases/update-enum-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_ATTRIBUTE_ENUM, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('elements', null, new ArrayList(new Text(Database::LENGTH_KEY), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Updated list of enum values.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Nullable(new Text(0)), 'Default value for column when not provided. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?array $elements, + ?bool $required, + ?string $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $column = $this->updateColumn( + databaseId: $databaseId, + tableId: $tableId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_STRING, + filter: APP_DATABASE_ATTRIBUTE_ENUM, + default: $default, + required: $required, + elements: $elements, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_ENUM); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php new file mode 100644 index 0000000000..0782f8eb29 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php @@ -0,0 +1,123 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/float') + ->desc('Create float column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'createFloatColumn', + description: '/docs/references/databases/create-float-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: UtopiaResponse::MODEL_ATTRIBUTE_FLOAT, + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('min', null, new FloatValidator(), 'Minimum value', true) + ->param('max', null, new FloatValidator(), 'Maximum value', true) + ->param('default', null, new FloatValidator(), 'Default value. Cannot be set when required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?float $min, + ?float $max, + ?float $default, + bool $array, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $min ??= -INF; + $max ??= INF; + + if ($min > $max) { + throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum must be less than or equal to maximum'); + } + + $validator = new Range($min, $max, Database::VAR_FLOAT); + if (!\is_null($default) && !$validator->isValid($default)) { + throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); + } + + $column = $this->createColumn($databaseId, $tableId, new Document([ + 'key' => $key, + 'type' => Database::VAR_FLOAT, + 'size' => 0, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'format' => APP_DATABASE_ATTRIBUTE_FLOAT_RANGE, + 'formatOptions' => ['min' => $min, 'max' => $max], + ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); + + $formatOptions = $column->getAttribute('formatOptions', []); + if (!empty($formatOptions)) { + $column->setAttribute('min', \floatval($formatOptions['min'])); + $column->setAttribute('max', \floatval($formatOptions['max'])); + } + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_FLOAT); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php new file mode 100644 index 0000000000..c585205388 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php @@ -0,0 +1,109 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/float/:key') + ->desc('Update float column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'updateFloatColumn', + description: '/docs/references/databases/update-float-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_ATTRIBUTE_FLOAT, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('min', null, new FloatValidator(), 'Minimum value', true) + ->param('max', null, new FloatValidator(), 'Maximum value', true) + ->param('default', null, new Nullable(new FloatValidator()), 'Default value. Cannot be set when required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?float $min, + ?float $max, + ?float $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $column = $this->updateColumn( + databaseId: $databaseId, + tableId: $tableId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_FLOAT, + default: $default, + required: $required, + min: $min, + max: $max, + newKey: $newKey + ); + + $formatOptions = $column->getAttribute('formatOptions', []); + if (!empty($formatOptions)) { + $column->setAttribute('min', \floatval($formatOptions['min'])); + $column->setAttribute('max', \floatval($formatOptions['max'])); + } + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_FLOAT); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php new file mode 100644 index 0000000000..14744f0442 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php @@ -0,0 +1,112 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/:key') + ->desc('Get column') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'getColumn', + description: '/docs/references/databases/get-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: [ + UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN, + UtopiaResponse::MODEL_ATTRIBUTE_INTEGER, + UtopiaResponse::MODEL_ATTRIBUTE_FLOAT, + UtopiaResponse::MODEL_ATTRIBUTE_EMAIL, + UtopiaResponse::MODEL_ATTRIBUTE_ENUM, + UtopiaResponse::MODEL_ATTRIBUTE_URL, + UtopiaResponse::MODEL_ATTRIBUTE_IP, + UtopiaResponse::MODEL_ATTRIBUTE_DATETIME, + UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP, + UtopiaResponse::MODEL_ATTRIBUTE_STRING, + ] + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $column = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $table->getInternalId() . '_' . $key); + if ($column->isEmpty()) { + throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + } + + $type = $column->getAttribute('type'); + $format = $column->getAttribute('format'); + $options = $column->getAttribute('options', []); + + foreach ($options as $optKey => $optValue) { + $column->setAttribute($optKey, $optValue); + } + + $model = match ($type) { + Database::VAR_BOOLEAN => UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN, + Database::VAR_INTEGER => UtopiaResponse::MODEL_ATTRIBUTE_INTEGER, + Database::VAR_FLOAT => UtopiaResponse::MODEL_ATTRIBUTE_FLOAT, + Database::VAR_DATETIME => UtopiaResponse::MODEL_ATTRIBUTE_DATETIME, + Database::VAR_RELATIONSHIP => UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP, + Database::VAR_STRING => match ($format) { + APP_DATABASE_ATTRIBUTE_EMAIL => UtopiaResponse::MODEL_ATTRIBUTE_EMAIL, + APP_DATABASE_ATTRIBUTE_ENUM => UtopiaResponse::MODEL_ATTRIBUTE_ENUM, + APP_DATABASE_ATTRIBUTE_IP => UtopiaResponse::MODEL_ATTRIBUTE_IP, + APP_DATABASE_ATTRIBUTE_URL => UtopiaResponse::MODEL_ATTRIBUTE_URL, + default => UtopiaResponse::MODEL_ATTRIBUTE_STRING, + }, + default => UtopiaResponse::MODEL_ATTRIBUTE, + }; + + $response->dynamic($column, $model); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php new file mode 100644 index 0000000000..b3916a5fad --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php @@ -0,0 +1,96 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/ip') + ->desc('Create IP address column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'createIpColumn', + description: '/docs/references/databases/create-ip-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: UtopiaResponse::MODEL_ATTRIBUTE_IP, + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new IP(), 'Default value. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?string $default, + bool $array, + \Appwrite\Utopia\Response $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $column = $this->createColumn($databaseId, $tableId, new Document([ + 'key' => $key, + 'type' => Database::VAR_STRING, + 'size' => 39, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'format' => APP_DATABASE_ATTRIBUTE_IP, + ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_IP); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php new file mode 100644 index 0000000000..6da08a2c9f --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php @@ -0,0 +1,98 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/ip/:key') + ->desc('Update IP address column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'updateIpColumn', + description: '/docs/references/databases/update-ip-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_ATTRIBUTE_IP, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Nullable(new IP()), 'Default value. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?string $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $column = $this->updateColumn( + databaseId: $databaseId, + tableId: $tableId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_STRING, + filter: APP_DATABASE_ATTRIBUTE_IP, + default: $default, + required: $required, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_IP); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php new file mode 100644 index 0000000000..7a26d10bc8 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php @@ -0,0 +1,123 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/integer') + ->desc('Create integer column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'createIntegerColumn', + description: '/docs/references/databases/create-integer-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: UtopiaResponse::MODEL_ATTRIBUTE_INTEGER, + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('min', null, new Integer(), 'Minimum value', true) + ->param('max', null, new Integer(), 'Maximum value', true) + ->param('default', null, new Integer(), 'Default value. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?int $min, + ?int $max, + ?int $default, + bool $array, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $min ??= \PHP_INT_MIN; + $max ??= \PHP_INT_MAX; + + if ($min > $max) { + throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); + } + + $validator = new Range($min, $max, Database::VAR_INTEGER); + if (!\is_null($default) && !$validator->isValid($default)) { + throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); + } + + $size = $max > 2147483647 ? 8 : 4; + + $column = $this->createColumn($databaseId, $tableId, new Document([ + 'key' => $key, + 'type' => Database::VAR_INTEGER, + 'size' => $size, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'format' => APP_DATABASE_ATTRIBUTE_INT_RANGE, + 'formatOptions' => ['min' => $min, 'max' => $max], + ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); + + $formatOptions = $column->getAttribute('formatOptions', []); + if (!empty($formatOptions)) { + $column->setAttribute('min', \intval($formatOptions['min'])); + $column->setAttribute('max', \intval($formatOptions['max'])); + } + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_INTEGER); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php new file mode 100644 index 0000000000..27616c07c9 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php @@ -0,0 +1,109 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/integer/:key') + ->desc('Update integer column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'updateIntegerColumn', + description: '/docs/references/databases/update-integer-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_ATTRIBUTE_INTEGER, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('min', null, new Integer(), 'Minimum value', true) + ->param('max', null, new Integer(), 'Maximum value', true) + ->param('default', null, new Nullable(new Integer()), 'Default value. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?int $min, + ?int $max, + ?int $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $column = $this->updateColumn( + databaseId: $databaseId, + tableId: $tableId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_INTEGER, + default: $default, + required: $required, + min: $min, + max: $max, + newKey: $newKey + ); + + $formatOptions = $column->getAttribute('formatOptions', []); + if (!empty($formatOptions)) { + $column->setAttribute('min', \intval($formatOptions['min'])); + $column->setAttribute('max', \intval($formatOptions['max'])); + } + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_INTEGER); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php new file mode 100644 index 0000000000..32cb235b62 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php @@ -0,0 +1,168 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/relationship') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/relationship') + ->desc('Create relationship column') + ->groups(['api', 'database']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'createRelationshipColumn', + description: '/docs/references/databases/create-relationship-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('relatedTableId', '', new UID(), 'Related Table ID.') + ->param('type', '', new WhiteList([ + Database::RELATION_ONE_TO_ONE, + Database::RELATION_MANY_TO_ONE, + Database::RELATION_MANY_TO_MANY, + Database::RELATION_ONE_TO_MANY + ], true), 'Relation type') + ->param('twoWay', false, new Boolean(), 'Is Two Way?', true) + ->param('key', null, new Key(), 'Column Key.', true) + ->param('twoWayKey', null, new Key(), 'Two Way Column Key.', true) + ->param('onDelete', Database::RELATION_MUTATE_RESTRICT, new WhiteList([ + Database::RELATION_MUTATE_CASCADE, + Database::RELATION_MUTATE_RESTRICT, + Database::RELATION_MUTATE_SET_NULL + ], true), 'Constraints option', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $relatedTableId, + string $type, + bool $twoWay, + ?string $key, + ?string $twoWayKey, + string $onDelete, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $key ??= $relatedTableId; + $twoWayKey ??= $tableId; + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId()); + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $relatedTableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId); + $relatedTable = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $relatedTableDocument->getInternalId()); + if ($relatedTable->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $columns = $table->getAttribute('attributes', []); + foreach ($columns as $column) { + if ($column->getAttribute('type') !== Database::VAR_RELATIONSHIP) { + continue; + } + + if (\strtolower($column->getId()) === \strtolower($key)) { + throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); + } + + if ( + \strtolower($column->getAttribute('options')['twoWayKey']) === \strtolower($twoWayKey) && + $column->getAttribute('options')['relatedCollection'] === $relatedTable->getId() + ) { + throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Attribute with the requested key already exists. Attribute keys must be unique.'); + } + + if ( + $type === Database::RELATION_MANY_TO_MANY && + $column->getAttribute('options')['relationType'] === Database::RELATION_MANY_TO_MANY && + $column->getAttribute('options')['relatedCollection'] === $relatedTable->getId() + ) { + throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Only one "manyToMany" relationship per table is allowed.'); + } + } + + $column = $this->createColumn($databaseId, $tableId, new Document([ + 'key' => $key, + 'type' => Database::VAR_RELATIONSHIP, + 'size' => 0, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + 'options' => [ + 'relatedCollection' => $relatedTableId, + 'relationType' => $type, + 'twoWay' => $twoWay, + 'twoWayKey' => $twoWayKey, + 'onDelete' => $onDelete, + ] + ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); + + foreach ($column->getAttribute('options', []) as $k => $option) { + $column->setAttribute($k, $option); + } + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php new file mode 100644 index 0000000000..34231ad611 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php @@ -0,0 +1,103 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key/relationship') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/:key/relationship') + ->desc('Update relationship column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'updateRelationshipColumn', + description: '/docs/references/databases/update-relationship-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('onDelete', null, new WhiteList([ + Database::RELATION_MUTATE_CASCADE, + Database::RELATION_MUTATE_RESTRICT, + Database::RELATION_MUTATE_SET_NULL + ], true), 'Constraints option', true) + ->param('newKey', null, new Key(), 'New Column Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?string $onDelete, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $column = $this->updateColumn( + $databaseId, + $tableId, + $key, + $dbForProject, + $queueForEvents, + type: Database::VAR_RELATIONSHIP, + required: false, + options: [ + 'onDelete' => $onDelete + ], + newKey: $newKey + ); + + foreach ($column->getAttribute('options', []) as $k => $option) { + $column->setAttribute($k, $option); + } + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php new file mode 100644 index 0000000000..1987f5fdbe --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php @@ -0,0 +1,122 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/string') + ->desc('Create string column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'createStringColumn', + description: '/docs/references/databases/create-string-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: UtopiaResponse::MODEL_ATTRIBUTE_STRING + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Validator::TYPE_INTEGER), 'Attribute size for text attributes, in number of characters.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Text(0, 0), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) + ->param('encrypt', false, new Boolean(), 'Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?int $size, + ?bool $required, + ?string $default, + bool $array, + bool $encrypt, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + // Ensure default fits in the given size + $validator = new Text($size, 0); + if (!is_null($default) && !$validator->isValid($default)) { + throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); + } + + $filters = []; + if ($encrypt) { + $filters[] = 'encrypt'; + } + + $column = $this->createColumn( + $databaseId, + $tableId, + new Document([ + 'key' => $key, + 'type' => Database::VAR_STRING, + 'size' => $size, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'filters' => $filters, + ]), + $response, + $dbForProject, + $queueForDatabase, + $queueForEvents + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_STRING); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php new file mode 100644 index 0000000000..a73ae0f9b1 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php @@ -0,0 +1,101 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/string/:key') + ->desc('Update string column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'updateStringColumn', + description: '/docs/references/databases/update-string-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_ATTRIBUTE_STRING, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Nullable(new Text(0, 0)), 'Default value for column when not provided. Cannot be set when column is required.') + ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Validator::TYPE_INTEGER), 'Maximum size of the string attribute.', true) + ->param('newKey', null, new Key(), 'New Column Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?string $default, + ?int $size, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $column = $this->updateColumn( + databaseId: $databaseId, + tableId: $tableId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_STRING, + size: $size, + default: $default, + required: $required, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_STRING); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php new file mode 100644 index 0000000000..74eedfa98b --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php @@ -0,0 +1,96 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/url') + ->desc('Create URL column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') + ->label('audits.event', 'column.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'createUrlColumn', + description: '/docs/references/databases/create-url-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: UtopiaResponse::MODEL_ATTRIBUTE_URL, + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new URL(), 'Default value for column when not provided. Cannot be set when column is required.', true) + ->param('array', false, new Boolean(), 'Is column an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?string $default, + bool $array, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $column = $this->createColumn($databaseId, $tableId, new Document([ + 'key' => $key, + 'type' => Database::VAR_STRING, + 'size' => 2000, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'format' => APP_DATABASE_ATTRIBUTE_URL, + ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_URL); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php new file mode 100644 index 0000000000..109b9c575b --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php @@ -0,0 +1,98 @@ +setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/url/:key') + ->desc('Update URL column') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') + ->label('audits.event', 'column.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'updateUrlColumn', + description: '/docs/references/databases/update-url-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_ATTRIBUTE_URL, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->param('required', null, new Boolean(), 'Is column required?') + ->param('default', null, new Nullable(new URL()), 'Default value for column when not provided. Cannot be set when column is required.') + ->param('newKey', null, new Key(), 'New Column Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?string $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $column = $this->updateColumn( + $databaseId, + $tableId, + $key, + $dbForProject, + $queueForEvents, + type: Database::VAR_STRING, + filter: APP_DATABASE_ATTRIBUTE_URL, + default: $default, + required: $required, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_URL); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php new file mode 100644 index 0000000000..f2343e927b --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php @@ -0,0 +1,125 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes') + ->desc('List columns') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'listColumns', + description: '/docs/references/databases/list-attributes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_ATTRIBUTE_LIST + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('queries', [], new Attributes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Attributes::ALLOWED_ATTRIBUTES), true) + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $queries = Query::parseQueries($queries); + + \array_push( + $queries, + Query::equal('databaseInternalId', [$database->getInternalId()]), + Query::equal('collectionInternalId', [$table->getInternalId()]) + ); + + $cursor = \array_filter( + $queries, + fn ($query) => \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]) + ); + $cursor = \reset($cursor); + + if ($cursor) { + $validator = new Cursor(); + if (!$validator->isValid($cursor)) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); + } + + $columnId = $cursor->getValue(); + $cursorDocument = Authorization::skip( + fn () => $dbForProject->find('attributes', [ + Query::equal('databaseInternalId', [$database->getInternalId()]), + Query::equal('collectionInternalId', [$table->getInternalId()]), + Query::equal('key', [$columnId]), + Query::limit(1), + ]) + ); + + if (empty($cursorDocument) || $cursorDocument[0]->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Column '{$columnId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument[0]); + } + + $filters = Query::groupByType($queries)['filters']; + + try { + $columns = $dbForProject->find('attributes', $queries); + $total = $dbForProject->count('attributes', $filters, APP_LIMIT_COUNT); + } catch (OrderException $e) { + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); + } + + $response->dynamic(new Document([ + 'attributes' => $columns, + 'total' => $total, + ]), UtopiaResponse::MODEL_ATTRIBUTE_LIST); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Module.php b/src/Appwrite/Platform/Modules/Databases/Module.php new file mode 100644 index 0000000000..f8686999dd --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Module.php @@ -0,0 +1,16 @@ +addService('http', new Http()); + $this->addService('workers', new Workers()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Http.php b/src/Appwrite/Platform/Modules/Databases/Services/Http.php new file mode 100644 index 0000000000..1cd482d61a --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Services/Http.php @@ -0,0 +1,110 @@ +type = Service::TYPE_HTTP; + + $this->registerDatabaseActions(); + $this->registerTableActions(); + $this->registerColumnActions(); + $this->registerIndexActions(); + $this->registerRowActions(); + } + + private function registerDatabaseActions() + { + + } + + private function registerTableActions() + { + + } + + private function registerColumnActions(): void + { + // Column top level actions + $this->addAction(GetColumn::getName(), new GetColumn()); + $this->addAction(DeleteColumn::getName(), new DeleteColumn()); + $this->addAction(ListColumns::getName(), new ListColumns()); + + // Column: Boolean + $this->addAction(CreateBoolean::getName(), new CreateBoolean()); + $this->addAction(UpdateBoolean::getName(), new UpdateBoolean()); + + // Column: Datetime + $this->addAction(CreateDatetime::getName(), new CreateDatetime()); + $this->addAction(UpdateDatetime::getName(), new UpdateDatetime()); + + // Column: Email + $this->addAction(CreateEmail::getName(), new CreateEmail()); + $this->addAction(UpdateEmail::getName(), new UpdateEmail()); + + // Column: Enum + $this->addAction(CreateEnum::getName(), new CreateEnum()); + $this->addAction(UpdateEnum::getName(), new UpdateEnum()); + + // Column: Float + $this->addAction(CreateFloat::getName(), new CreateFloat()); + $this->addAction(UpdateFloat::getName(), new UpdateFloat()); + + // Column: Integer + $this->addAction(CreateInteger::getName(), new CreateInteger()); + $this->addAction(UpdateInteger::getName(), new UpdateInteger()); + + // Column: IP + $this->addAction(CreateIP::getName(), new CreateIP()); + $this->addAction(UpdateIP::getName(), new UpdateIP()); + + // Column: Relationship + $this->addAction(CreateRelationship::getName(), new CreateRelationship()); + $this->addAction(UpdateRelationship::getName(), new UpdateRelationship()); + + // Column: String + $this->addAction(CreateString::getName(), new CreateString()); + $this->addAction(UpdateString::getName(), new UpdateString()); + + // Column: URL + $this->addAction(CreateURL::getName(), new CreateURL()); + $this->addAction(UpdateURL::getName(), new UpdateURL()); + } + + private function registerIndexActions() + { + + } + + private function registerRowActions() + { + + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Workers.php b/src/Appwrite/Platform/Modules/Databases/Services/Workers.php new file mode 100644 index 0000000000..55388ea7ff --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Services/Workers.php @@ -0,0 +1,15 @@ +type = Service::TYPE_WORKER; + $this->addAction(Databases::getName(), new Databases()); + } +} diff --git a/src/Appwrite/Platform/Workers/Databases.php b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php similarity index 99% rename from src/Appwrite/Platform/Workers/Databases.php rename to src/Appwrite/Platform/Modules/Databases/Workers/Databases.php index 1f3b76d6eb..6564239630 100644 --- a/src/Appwrite/Platform/Workers/Databases.php +++ b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php @@ -1,6 +1,6 @@ addAction(Audits::getName(), new Audits()) ->addAction(Certificates::getName(), new Certificates()) - ->addAction(Databases::getName(), new Databases()) ->addAction(Deletes::getName(), new Deletes()) ->addAction(Functions::getName(), new Functions()) ->addAction(Mails::getName(), new Mails()) From 9c1ec6fe029497803854509b3bf4351c74ad2893 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 13:37:25 +0530 Subject: [PATCH 011/362] update: move the init hook. --- app/controllers/api/databases.php | 12 ------------ app/controllers/general.php | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 33b839fc41..6b19c96be6 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -50,18 +50,6 @@ use Utopia\Validator\JSON; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; -App::init() - ->groups(['api', 'database']) - ->inject('request') - ->inject('dbForProject') - ->action(function (Request $request, Database $dbForProject) { - $timeout = \intval($request->getHeader('x-appwrite-timeout')); - - if (!empty($timeout) && App::isDevelopment()) { - $dbForProject->setTimeout($timeout); - } - }); - App::post('/v1/databases') ->desc('Create database') ->groups(['api', 'database']) diff --git a/app/controllers/general.php b/app/controllers/general.php index fdef1e9cee..32323d6e05 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1576,6 +1576,20 @@ foreach (Config::getParam('services', []) as $service) { } } +// legacy controller init hooks as the endpoint controller logic is now moved to a module structure. +// 1. databases +App::init() + ->groups(['api', 'database']) + ->inject('request') + ->inject('dbForProject') + ->action(function (Request $request, Database $dbForProject) { + $timeout = \intval($request->getHeader('x-appwrite-timeout')); + + if (!empty($timeout) && App::isDevelopment()) { + $dbForProject->setTimeout($timeout); + } + }); + // Check for any errors found while we were initialising the SDK Methods. if (!empty(Method::getErrors())) { throw new \Exception('Errors found during SDK initialization:' . PHP_EOL . implode(PHP_EOL, Method::getErrors())); From 1945a64083bd9fc261ad3fb3e1f006180a927ff2 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 14:08:10 +0530 Subject: [PATCH 012/362] update: move DB ops to module. --- app/controllers/api/databases.php | 389 ------------------ .../Databases/Http/Databases/Create.php | 123 ++++++ .../Databases/Http/Databases/Delete.php | 88 ++++ .../Modules/Databases/Http/Databases/Get.php | 65 +++ .../Databases/Http/Databases/Logs/XList.php | 143 +++++++ .../Databases/Http/Databases/Update.php | 81 ++++ .../Databases/Http/Databases/XList.php | 107 +++++ .../Modules/Databases/Services/Http.php | 21 +- 8 files changed, 623 insertions(+), 394 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 6b19c96be6..dd181f8894 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -12,9 +12,7 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Database\Validator\Queries\Collections; -use Appwrite\Utopia\Database\Validator\Queries\Databases; use Appwrite\Utopia\Database\Validator\Queries\Indexes; -use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use MaxMind\Db\Reader; use Utopia\App; @@ -50,393 +48,6 @@ use Utopia\Validator\JSON; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; -App::post('/v1/databases') - ->desc('Create database') - ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].create') - ->label('scope', 'databases.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'database.create') - ->label('audits.resource', 'database/{response.$id}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'databases', - name: 'create', - description: '/docs/references/databases/create.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_CREATED, - model: Response::MODEL_DATABASE, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') - ->param('name', '', new Text(128), 'Database name. Max length: 128 chars.') - ->param('enabled', true, new Boolean(), 'Is the database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $name, bool $enabled, Response $response, Database $dbForProject, Event $queueForEvents) { - - $databaseId = $databaseId == 'unique()' ? ID::unique() : $databaseId; - - try { - $dbForProject->createDocument('databases', new Document([ - '$id' => $databaseId, - 'name' => $name, - 'enabled' => $enabled, - 'search' => implode(' ', [$databaseId, $name]), - ])); - $database = $dbForProject->getDocument('databases', $databaseId); - - $collections = (Config::getParam('collections', [])['databases'] ?? [])['collections'] ?? []; - if (empty($collections)) { - throw new Exception(Exception::GENERAL_SERVER_ERROR, 'The "collections" collection is not configured.'); - } - - $attributes = []; - $indexes = []; - - foreach ($collections['attributes'] as $attribute) { - $attributes[] = new Document([ - '$id' => $attribute['$id'], - 'type' => $attribute['type'], - 'size' => $attribute['size'], - 'required' => $attribute['required'], - 'signed' => $attribute['signed'], - 'array' => $attribute['array'], - 'filters' => $attribute['filters'], - 'default' => $attribute['default'] ?? null, - 'format' => $attribute['format'] ?? '' - ]); - } - - foreach ($collections['indexes'] as $index) { - $indexes[] = new Document([ - '$id' => $index['$id'], - 'type' => $index['type'], - 'attributes' => $index['attributes'], - 'lengths' => $index['lengths'], - 'orders' => $index['orders'], - ]); - } - $dbForProject->createCollection('database_' . $database->getInternalId(), $attributes, $indexes); - } catch (DuplicateException) { - throw new Exception(Exception::DATABASE_ALREADY_EXISTS); - } - - $queueForEvents->setParam('databaseId', $database->getId()); - - $response - ->setStatusCode(Response::STATUS_CODE_CREATED) - ->dynamic($database, Response::MODEL_DATABASE); - }); - -App::get('/v1/databases') - ->desc('List databases') - ->groups(['api', 'database']) - ->label('scope', 'databases.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'databases', - name: 'list', - description: '/docs/references/databases/list.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_DATABASE_LIST, - ) - ], - contentType: ContentType::JSON - )) - ->param('queries', [], new Databases(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Databases::ALLOWED_ATTRIBUTES), true) - ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) - ->inject('response') - ->inject('dbForProject') - ->action(function (array $queries, string $search, Response $response, Database $dbForProject) { - $queries = Query::parseQueries($queries); - - if (!empty($search)) { - $queries[] = Query::search('search', $search); - } - - /** - * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries - */ - $cursor = \array_filter($queries, function ($query) { - return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); - }); - $cursor = reset($cursor); - if ($cursor) { - /** @var Query $cursor */ - - $validator = new Cursor(); - if (!$validator->isValid($cursor)) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); - } - - $databaseId = $cursor->getValue(); - $cursorDocument = $dbForProject->getDocument('databases', $databaseId); - - if ($cursorDocument->isEmpty()) { - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Database '{$databaseId}' for the 'cursor' value not found."); - } - - $cursor->setValue($cursorDocument); - } - - $filterQueries = Query::groupByType($queries)['filters']; - - try { - $databases = $dbForProject->find('databases', $queries); - $total = $dbForProject->count('databases', $filterQueries, APP_LIMIT_COUNT); - } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); - } - $response->dynamic(new Document([ - 'databases' => $databases, - 'total' => $total, - ]), Response::MODEL_DATABASE_LIST); - }); - -App::get('/v1/databases/:databaseId') - ->desc('Get database') - ->groups(['api', 'database']) - ->label('scope', 'databases.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'databases', - name: 'get', - description: '/docs/references/databases/get.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_DATABASE, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->inject('response') - ->inject('dbForProject') - ->action(function (string $databaseId, Response $response, Database $dbForProject) { - - $database = $dbForProject->getDocument('databases', $databaseId); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $response->dynamic($database, Response::MODEL_DATABASE); - }); - -App::get('/v1/databases/:databaseId/logs') - ->desc('List database logs') - ->groups(['api', 'database']) - ->label('scope', 'databases.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'logs', - name: 'listLogs', - description: '/docs/references/databases/get-logs.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_LOG_LIST, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) - ->inject('response') - ->inject('dbForProject') - ->inject('locale') - ->inject('geodb') - ->action(function (string $databaseId, array $queries, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) { - - $database = $dbForProject->getDocument('databases', $databaseId); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } - - // Temp fix for logs - $queries[] = Query::or([ - Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))), - Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))), - ]); - - $audit = new Audit($dbForProject); - $resource = 'database/' . $databaseId; - $logs = $audit->getLogsByResource($resource, $queries); - - $output = []; - - foreach ($logs as $i => &$log) { - $log['userAgent'] = (!empty($log['userAgent'])) ? $log['userAgent'] : 'UNKNOWN'; - - $detector = new Detector($log['userAgent']); - $detector->skipBotDetection(); // OPTIONAL: If called, bot detection will completely be skipped (bots will be detected as regular devices then) - - $os = $detector->getOS(); - $client = $detector->getClient(); - $device = $detector->getDevice(); - - $output[$i] = new Document([ - 'event' => $log['event'], - 'userId' => ID::custom($log['data']['userId']), - 'userEmail' => $log['data']['userEmail'] ?? null, - 'userName' => $log['data']['userName'] ?? null, - 'mode' => $log['data']['mode'] ?? null, - 'ip' => $log['ip'], - 'time' => $log['time'], - 'osCode' => $os['osCode'], - 'osName' => $os['osName'], - 'osVersion' => $os['osVersion'], - 'clientType' => $client['clientType'], - 'clientCode' => $client['clientCode'], - 'clientName' => $client['clientName'], - 'clientVersion' => $client['clientVersion'], - 'clientEngine' => $client['clientEngine'], - 'clientEngineVersion' => $client['clientEngineVersion'], - 'deviceName' => $device['deviceName'], - 'deviceBrand' => $device['deviceBrand'], - 'deviceModel' => $device['deviceModel'] - ]); - - $record = $geodb->get($log['ip']); - - if ($record) { - $output[$i]['countryCode'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), false) ? \strtolower($record['country']['iso_code']) : '--'; - $output[$i]['countryName'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), $locale->getText('locale.country.unknown')); - } else { - $output[$i]['countryCode'] = '--'; - $output[$i]['countryName'] = $locale->getText('locale.country.unknown'); - } - } - - $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource, $queries), - 'logs' => $output, - ]), Response::MODEL_LOG_LIST); - }); - - -App::put('/v1/databases/:databaseId') - ->desc('Update database') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'databases.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].update') - ->label('audits.event', 'database.update') - ->label('audits.resource', 'database/{response.$id}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'databases', - name: 'update', - description: '/docs/references/databases/update.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_DATABASE, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('name', null, new Text(128), 'Database name. Max length: 128 chars.') - ->param('enabled', true, new Boolean(), 'Is database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $name, bool $enabled, Response $response, Database $dbForProject, Event $queueForEvents) { - - $database = $dbForProject->getDocument('databases', $databaseId); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $database = $dbForProject->updateDocument('databases', $databaseId, $database - ->setAttribute('name', $name) - ->setAttribute('enabled', $enabled) - ->setAttribute('search', implode(' ', [$databaseId, $name]))); - - $queueForEvents->setParam('databaseId', $database->getId()); - - $response->dynamic($database, Response::MODEL_DATABASE); - }); - -App::delete('/v1/databases/:databaseId') - ->desc('Delete database') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'databases.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].delete') - ->label('audits.event', 'database.delete') - ->label('audits.resource', 'database/{request.databaseId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'databases', - name: 'delete', - description: '/docs/references/databases/delete.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_NOCONTENT, - model: Response::MODEL_NONE, - ) - ], - contentType: ContentType::NONE - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->inject('queueForStatsUsage') - ->action(function (string $databaseId, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents, StatsUsage $queueForStatsUsage) { - - $database = $dbForProject->getDocument('databases', $databaseId); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - if (!$dbForProject->deleteDocument('databases', $databaseId)) { - throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove collection from DB'); - } - - $dbForProject->purgeCachedDocument('databases', $database->getId()); - $dbForProject->purgeCachedCollection('databases_' . $database->getInternalId()); - - $queueForDatabase - ->setType(DATABASE_TYPE_DELETE_DATABASE) - ->setDatabase($database); - - $queueForEvents - ->setParam('databaseId', $database->getId()) - ->setPayload($response->output($database, Response::MODEL_DATABASE)); - - $response->noContent(); - }); - App::post('/v1/databases/:databaseId/tables') ->alias('/v1/databases/:databaseId/collections') ->desc('Create table') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php new file mode 100644 index 0000000000..a734cbdd22 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -0,0 +1,123 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases') + ->desc('Create database') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].create') + ->label('scope', 'databases.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'database.create') + ->label('audits.resource', 'database/{response.$id}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'databases', + name: 'create', + description: '/docs/references/databases/create.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('name', '', new Text(128), 'Database name. Max length: 128 chars.') + ->param('enabled', true, new Boolean(), 'Is the database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $name, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + { + $databaseId = $databaseId == 'unique()' ? ID::unique() : $databaseId; + + try { + $dbForProject->createDocument('databases', new Document([ + '$id' => $databaseId, + 'name' => $name, + 'enabled' => $enabled, + 'search' => implode(' ', [$databaseId, $name]), + ])); + $database = $dbForProject->getDocument('databases', $databaseId); + + $collections = (Config::getParam('collections', [])['databases'] ?? [])['collections'] ?? []; + if (empty($collections)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'The "collections" collection is not configured.'); + } + + $attributes = []; + $indexes = []; + + foreach ($collections['attributes'] as $attribute) { + $attributes[] = new Document([ + '$id' => $attribute['$id'], + 'type' => $attribute['type'], + 'size' => $attribute['size'], + 'required' => $attribute['required'], + 'signed' => $attribute['signed'], + 'array' => $attribute['array'], + 'filters' => $attribute['filters'], + 'default' => $attribute['default'] ?? null, + 'format' => $attribute['format'] ?? '' + ]); + } + + foreach ($collections['indexes'] as $index) { + $indexes[] = new Document([ + '$id' => $index['$id'], + 'type' => $index['type'], + 'attributes' => $index['attributes'], + 'lengths' => $index['lengths'], + 'orders' => $index['orders'], + ]); + } + $dbForProject->createCollection('database_' . $database->getInternalId(), $attributes, $indexes); + } catch (DuplicateException) { + throw new Exception(Exception::DATABASE_ALREADY_EXISTS); + } + + $queueForEvents->setParam('databaseId', $database->getId()); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_CREATED) + ->dynamic($database, UtopiaResponse::MODEL_DATABASE); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php new file mode 100644 index 0000000000..e0651b5e5b --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php @@ -0,0 +1,88 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/databases/:databaseId') + ->desc('Delete database') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'databases.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].delete') + ->label('audits.event', 'database.delete') + ->label('audits.resource', 'database/{request.databaseId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'databases', + name: 'delete', + description: '/docs/references/databases/delete.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { + $database = $dbForProject->getDocument('databases', $databaseId); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + if (!$dbForProject->deleteDocument('databases', $databaseId)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove collection from DB'); + } + + $dbForProject->purgeCachedDocument('databases', $database->getId()); + $dbForProject->purgeCachedCollection('databases_' . $database->getInternalId()); + + $queueForDatabase + ->setType(DATABASE_TYPE_DELETE_DATABASE) + ->setDatabase($database); + + $queueForEvents + ->setParam('databaseId', $database->getId()) + ->setPayload($response->output($database, UtopiaResponse::MODEL_DATABASE)); + + $response->noContent(); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php new file mode 100644 index 0000000000..67b61bceb2 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php @@ -0,0 +1,65 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId') + ->desc('Get database') + ->groups(['api', 'database']) + ->label('scope', 'databases.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'databases', + name: 'get', + description: '/docs/references/databases/get.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, UtopiaResponse $response, Database $dbForProject): void + { + $database = $dbForProject->getDocument('databases', $databaseId); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $response->dynamic($database, UtopiaResponse::MODEL_DATABASE); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php new file mode 100644 index 0000000000..56358aa723 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php @@ -0,0 +1,143 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/logs') + ->desc('List database logs') + ->groups(['api', 'database']) + ->label('scope', 'databases.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'logs', + name: 'listLogs', + description: '/docs/references/databases/get-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_LOG_LIST, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) + ->inject('response') + ->inject('dbForProject') + ->inject('locale') + ->inject('geodb') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void + { + $database = $dbForProject->getDocument('databases', $databaseId); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + // Temp fix for logs + $queries[] = Query::or([ + Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))), + Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))), + ]); + + $audit = new Audit($dbForProject); + $resource = 'database/' . $databaseId; + $logs = $audit->getLogsByResource($resource, $queries); + + $output = []; + + foreach ($logs as $i => &$log) { + $log['userAgent'] = $log['userAgent'] ?: 'UNKNOWN'; + $detector = new Detector($log['userAgent']); + $detector->skipBotDetection(); + + $os = $detector->getOS(); + $client = $detector->getClient(); + $device = $detector->getDevice(); + + $output[$i] = new Document([ + 'event' => $log['event'], + 'userId' => ID::custom($log['data']['userId']), + 'userEmail' => $log['data']['userEmail'] ?? null, + 'userName' => $log['data']['userName'] ?? null, + 'mode' => $log['data']['mode'] ?? null, + 'ip' => $log['ip'], + 'time' => $log['time'], + 'osCode' => $os['osCode'], + 'osName' => $os['osName'], + 'osVersion' => $os['osVersion'], + 'clientType' => $client['clientType'], + 'clientCode' => $client['clientCode'], + 'clientName' => $client['clientName'], + 'clientVersion' => $client['clientVersion'], + 'clientEngine' => $client['clientEngine'], + 'clientEngineVersion' => $client['clientEngineVersion'], + 'deviceName' => $device['deviceName'], + 'deviceBrand' => $device['deviceBrand'], + 'deviceModel' => $device['deviceModel'], + ]); + + $record = $geodb->get($log['ip']); + if ($record) { + $countryCode = strtolower($record['country']['iso_code']); + $output[$i]['countryCode'] = $locale->getText("countries.{$countryCode}", false) ? $countryCode : '--'; + $output[$i]['countryName'] = $locale->getText("countries.{$countryCode}", $locale->getText('locale.country.unknown')); + } else { + $output[$i]['countryCode'] = '--'; + $output[$i]['countryName'] = $locale->getText('locale.country.unknown'); + } + } + + $response->dynamic(new Document([ + 'total' => $audit->countLogsByResource($resource, $queries), + 'logs' => $output, + ]), UtopiaResponse::MODEL_LOG_LIST); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php new file mode 100644 index 0000000000..49c92a65a2 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php @@ -0,0 +1,81 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) + ->setHttpPath('/v1/databases/:databaseId') + ->desc('Update database') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'databases.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].update') + ->label('audits.event', 'database.update') + ->label('audits.resource', 'database/{response.$id}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'databases', + name: 'update', + description: '/docs/references/databases/update.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('name', null, new Text(128), 'Database name. Max length: 128 chars.') + ->param('enabled', true, new Boolean(), 'Is database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $name, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + { + $database = $dbForProject->getDocument('databases', $databaseId); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $database = $dbForProject->updateDocument('databases', $databaseId, $database + ->setAttribute('name', $name) + ->setAttribute('enabled', $enabled) + ->setAttribute('search', implode(' ', [$databaseId, $name]))); + + $queueForEvents->setParam('databaseId', $database->getId()); + + $response->dynamic($database, UtopiaResponse::MODEL_DATABASE); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php new file mode 100644 index 0000000000..7453fb39f4 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -0,0 +1,107 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases') + ->desc('List databases') + ->groups(['api', 'database']) + ->label('scope', 'databases.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'databases', + name: 'list', + description: '/docs/references/databases/list.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE_LIST, + ) + ], + contentType: ContentType::JSON + )) + ->param('queries', [], new Databases(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Databases::ALLOWED_ATTRIBUTES), true) + ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(array $queries, string $search, UtopiaResponse $response, Database $dbForProject): void + { + $queries = Query::parseQueries($queries); + + if (!empty($search)) { + $queries[] = Query::search('search', $search); + } + + /** + * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries + */ + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); + }); + $cursor = reset($cursor); + if ($cursor) { + /** @var Query $cursor */ + + $validator = new Cursor(); + if (!$validator->isValid($cursor)) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); + } + + $databaseId = $cursor->getValue(); + $cursorDocument = $dbForProject->getDocument('databases', $databaseId); + + if ($cursorDocument->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Database '{$databaseId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument); + } + + $filterQueries = Query::groupByType($queries)['filters']; + + try { + $databases = $dbForProject->find('databases', $queries); + $total = $dbForProject->count('databases', $filterQueries, APP_LIMIT_COUNT); + } catch (OrderException $e) { + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + } + $response->dynamic(new Document([ + 'databases' => $databases, + 'total' => $total, + ]), UtopiaResponse::MODEL_DATABASE_LIST); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Http.php b/src/Appwrite/Platform/Modules/Databases/Services/Http.php index 1cd482d61a..de0de71e05 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Http.php @@ -25,6 +25,12 @@ use Appwrite\Platform\Modules\Databases\Http\Columns\String\Update as UpdateStri use Appwrite\Platform\Modules\Databases\Http\Columns\URL\Create as CreateURL; use Appwrite\Platform\Modules\Databases\Http\Columns\URL\Update as UpdateURL; use Appwrite\Platform\Modules\Databases\Http\Columns\XList as ListColumns; +use Appwrite\Platform\Modules\Databases\Http\Databases\Create as CreateDatabase; +use Appwrite\Platform\Modules\Databases\Http\Databases\Delete as DeleteDatabase; +use Appwrite\Platform\Modules\Databases\Http\Databases\Get as GetDatabase; +use Appwrite\Platform\Modules\Databases\Http\Databases\Logs\XList as ListDatabaseLogs; +use Appwrite\Platform\Modules\Databases\Http\Databases\Update as UpdateDatabase; +use Appwrite\Platform\Modules\Databases\Http\Databases\XList as ListDatabases; use Utopia\Platform\Service; class Http extends Service @@ -40,12 +46,17 @@ class Http extends Service $this->registerRowActions(); } - private function registerDatabaseActions() + private function registerDatabaseActions(): void { - + $this->addAction(CreateDatabase::getName(), new CreateDatabase()); + $this->addAction(GetDatabase::getName(), new GetDatabase()); + $this->addAction(UpdateDatabase::getName(), new UpdateDatabase()); + $this->addAction(DeleteDatabase::getName(), new DeleteDatabase()); + $this->addAction(ListDatabases::getName(), new ListDatabases()); + $this->addAction(ListDatabaseLogs::getName(), new ListDatabaseLogs()); } - private function registerTableActions() + private function registerTableActions(): void { } @@ -98,12 +109,12 @@ class Http extends Service $this->addAction(UpdateURL::getName(), new UpdateURL()); } - private function registerIndexActions() + private function registerIndexActions(): void { } - private function registerRowActions() + private function registerRowActions(): void { } From 8efc1543e9c0889621cdf2ae5011358b464ef8d0 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 17:05:14 +0530 Subject: [PATCH 013/362] update: move Table ops to module. --- app/controllers/api/databases.php | 448 ------------------ .../Modules/Databases/Http/Tables/Create.php | 116 +++++ .../Modules/Databases/Http/Tables/Delete.php | 95 ++++ .../Modules/Databases/Http/Tables/Get.php | 74 +++ .../Databases/Http/Tables/Logs/XList.php | 153 ++++++ .../Modules/Databases/Http/Tables/Update.php | 110 +++++ .../Modules/Databases/Http/Tables/XList.php | 117 +++++ 7 files changed, 665 insertions(+), 448 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index dd181f8894..bc80502521 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -11,7 +11,6 @@ use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; -use Appwrite\Utopia\Database\Validator\Queries\Collections; use Appwrite\Utopia\Database\Validator\Queries\Indexes; use Appwrite\Utopia\Response; use MaxMind\Db\Reader; @@ -23,7 +22,6 @@ use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Exception\Authorization as AuthorizationException; use Utopia\Database\Exception\Duplicate as DuplicateException; -use Utopia\Database\Exception\Limit as LimitException; use Utopia\Database\Exception\NotFound as NotFoundException; use Utopia\Database\Exception\Order as OrderException; use Utopia\Database\Exception\Query as QueryException; @@ -48,452 +46,6 @@ use Utopia\Validator\JSON; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; -App::post('/v1/databases/:databaseId/tables') - ->alias('/v1/databases/:databaseId/collections') - ->desc('Create table') - ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].tables.[tableId].create') - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'table.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'tables', - name: 'createTable', - description: '/docs/references/databases/create-collection.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_CREATED, - model: Response::MODEL_COLLECTION, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') - ->param('name', '', new Text(128), 'Table name. Max length: 128 chars.') - ->param('permissions', null, 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) - ->inject('response') - ->inject('dbForProject') - ->inject('mode') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, Response $response, Database $dbForProject, string $mode, Event $queueForEvents) { - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $tableId = $tableId == 'unique()' ? ID::unique() : $tableId; - - // Map aggregate permissions into the multiple permissions they represent. - $permissions = Permission::aggregate($permissions) ?? []; - - try { - $table = $dbForProject->createDocument('database_' . $database->getInternalId(), new Document([ - '$id' => $tableId, - 'databaseInternalId' => $database->getInternalId(), - 'databaseId' => $databaseId, - '$permissions' => $permissions, - 'documentSecurity' => $documentSecurity, - 'enabled' => $enabled, - 'name' => $name, - 'search' => implode(' ', [$tableId, $name]), - ])); - - $dbForProject->createCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), permissions: $permissions, documentSecurity: $documentSecurity); - } catch (DuplicateException) { - throw new Exception(Exception::COLLECTION_ALREADY_EXISTS); - } catch (LimitException) { - throw new Exception(Exception::COLLECTION_LIMIT_EXCEEDED); - } - - $queueForEvents - ->setContext('database', $database) - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()); - - $response - ->setStatusCode(Response::STATUS_CODE_CREATED) - ->dynamic($table, Response::MODEL_COLLECTION); - }); - -App::get('/v1/databases/:databaseId/tables') - ->alias('/v1/databases/:databaseId/collections') - ->desc('List tables') - ->groups(['api', 'database']) - ->label('scope', 'collections.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'tables', - name: 'listTables', - description: '/docs/references/databases/list-collections.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_COLLECTION_LIST, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('queries', [], new Collections(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Collections::ALLOWED_ATTRIBUTES), true) - ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('mode') - ->action(function (string $databaseId, array $queries, string $search, Response $response, Database $dbForProject, string $mode) { - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $queries = Query::parseQueries($queries); - - if (!empty($search)) { - $queries[] = Query::search('search', $search); - } - - /** - * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries - */ - $cursor = \array_filter($queries, function ($query) { - return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); - }); - $cursor = reset($cursor); - if ($cursor) { - /** @var Query $cursor */ - - $validator = new Cursor(); - if (!$validator->isValid($cursor)) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); - } - - $tableId = $cursor->getValue(); - $cursorDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - - if ($cursorDocument->isEmpty()) { - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Table '{$tableId}' for the 'cursor' value not found."); - } - - $cursor->setValue($cursorDocument); - } - - $filterQueries = Query::groupByType($queries)['filters']; - - try { - $tables = $dbForProject->find('database_' . $database->getInternalId(), $queries); - $total = $dbForProject->count('database_' . $database->getInternalId(), $filterQueries, APP_LIMIT_COUNT); - } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); - } - - // TODO: collections > tables - $response->dynamic(new Document([ - 'collections' => $tables, - 'total' => $total, - ]), Response::MODEL_COLLECTION_LIST); - }); - -App::get('/v1/databases/:databaseId/tables/:tableId') - ->alias('/v1/databases/:databaseId/collections/:tableId') - ->desc('Get table') - ->groups(['api', 'database']) - ->label('scope', 'collections.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'tables', - name: 'getTable', - description: '/docs/references/databases/get-collection.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_COLLECTION, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID.') - ->inject('response') - ->inject('dbForProject') - ->action(function (string $databaseId, string $tableId, Response $response, Database $dbForProject) { - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $response->dynamic($table, Response::MODEL_COLLECTION); - }); - -App::get('/v1/databases/:databaseId/tables/:tableId/logs') - ->alias('/v1/databases/:databaseId/collections/:tableId/logs') - ->desc('List table logs') - ->groups(['api', 'database']) - ->label('scope', 'collections.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'tables', - name: 'listTableLogs', - description: '/docs/references/databases/get-collection-logs.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_LOG_LIST, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID.') - ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) - ->inject('response') - ->inject('dbForProject') - ->inject('locale') - ->inject('geodb') - ->action(function (string $databaseId, string $tableId, array $queries, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) { - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $tableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $tableDocument->getInternalId()); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } - - // Temp fix for logs - $queries[] = Query::or([ - Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))), - Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))), - ]); - - $audit = new Audit($dbForProject); - $resource = 'database/' . $databaseId . '/table/' . $tableId; - $logs = $audit->getLogsByResource($resource, $queries); - - $output = []; - - foreach ($logs as $i => &$log) { - $log['userAgent'] = (!empty($log['userAgent'])) ? $log['userAgent'] : 'UNKNOWN'; - - $detector = new Detector($log['userAgent']); - $detector->skipBotDetection(); // OPTIONAL: If called, bot detection will completely be skipped (bots will be detected as regular devices then) - - $os = $detector->getOS(); - $client = $detector->getClient(); - $device = $detector->getDevice(); - - $output[$i] = new Document([ - 'event' => $log['event'], - 'userId' => $log['data']['userId'], - 'userEmail' => $log['data']['userEmail'] ?? null, - 'userName' => $log['data']['userName'] ?? null, - 'mode' => $log['data']['mode'] ?? null, - 'ip' => $log['ip'], - 'time' => $log['time'], - 'osCode' => $os['osCode'], - 'osName' => $os['osName'], - 'osVersion' => $os['osVersion'], - 'clientType' => $client['clientType'], - 'clientCode' => $client['clientCode'], - 'clientName' => $client['clientName'], - 'clientVersion' => $client['clientVersion'], - 'clientEngine' => $client['clientEngine'], - 'clientEngineVersion' => $client['clientEngineVersion'], - 'deviceName' => $device['deviceName'], - 'deviceBrand' => $device['deviceBrand'], - 'deviceModel' => $device['deviceModel'] - ]); - - $record = $geodb->get($log['ip']); - - if ($record) { - $output[$i]['countryCode'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), false) ? \strtolower($record['country']['iso_code']) : '--'; - $output[$i]['countryName'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), $locale->getText('locale.country.unknown')); - } else { - $output[$i]['countryCode'] = '--'; - $output[$i]['countryName'] = $locale->getText('locale.country.unknown'); - } - } - - $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource, $queries), - 'logs' => $output, - ]), Response::MODEL_LOG_LIST); - }); - - -App::put('/v1/databases/:databaseId/tables/:tableId') - ->alias('/v1/databases/:databaseId/collections/:tableId') - ->desc('Update table') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].update') - ->label('audits.event', 'table.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'tables', - name: 'updateTable', - description: '/docs/references/databases/update-collection.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_COLLECTION, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID.') - ->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.') - ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, the current permissions are inherited. [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) - ->inject('response') - ->inject('dbForProject') - ->inject('mode') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, Response $response, Database $dbForProject, string $mode, Event $queueForEvents) { - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $permissions ??= $table->getPermissions() ?? []; - - // Map aggregate permissions into the multiple permissions they represent. - $permissions = Permission::aggregate($permissions); - - $enabled ??= $table->getAttribute('enabled', true); - - $table = $dbForProject->updateDocument( - 'database_' . $database->getInternalId(), - $tableId, - $table - ->setAttribute('name', $name) - ->setAttribute('$permissions', $permissions) - ->setAttribute('documentSecurity', $documentSecurity) - ->setAttribute('enabled', $enabled) - ->setAttribute('search', \implode(' ', [$tableId, $name])) - ); - - $dbForProject->updateCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $permissions, $documentSecurity); - - $queueForEvents - ->setContext('database', $database) - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()); - - $response->dynamic($table, Response::MODEL_COLLECTION); - }); - -App::delete('/v1/databases/:databaseId/tables/:tableId') - ->alias('/v1/databases/:databaseId/collections/:tableId') - ->desc('Delete table') - ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].delete') - ->label('audits.event', 'table.delete') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'tables', - name: 'deleteTable', - description: '/docs/references/databases/delete-collection.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_NOCONTENT, - model: Response::MODEL_NONE, - ) - ], - contentType: ContentType::NONE - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID.') - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->inject('mode') - ->action(function (string $databaseId, string $tableId, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents, string $mode) { - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - if (!$dbForProject->deleteDocument('database_' . $database->getInternalId(), $tableId)) { - throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove collection from DB'); - } - - $dbForProject->purgeCachedCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId()); - - $queueForDatabase - ->setType(DATABASE_TYPE_DELETE_COLLECTION) - ->setDatabase($database) - ->setTable($table); - - $queueForEvents - ->setContext('database', $database) - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setPayload($response->output($table, Response::MODEL_COLLECTION)); - - $response->noContent(); - }); - App::post('/v1/databases/:databaseId/tables/:tableId/indexes') ->alias('/v1/databases/:databaseId/collections/:tableId/indexes') ->desc('Create index') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php new file mode 100644 index 0000000000..ead5a64f88 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php @@ -0,0 +1,116 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables') + ->httpAlias('/v1/databases/:databaseId/collections') + ->desc('Create table') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].tables.[tableId].create') + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'table.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'tables', + name: 'createTable', + description: '/docs/references/databases/create-collection.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: UtopiaResponse::MODEL_COLLECTION, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('name', '', new Text(128), 'Table name. Max length: 128 chars.') + ->param('permissions', null, 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) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $tableId = $tableId === 'unique()' ? ID::unique() : $tableId; + + $permissions = Permission::aggregate($permissions) ?? []; + + try { + $table = $dbForProject->createDocument('database_' . $database->getInternalId(), new Document([ + '$id' => $tableId, + 'databaseInternalId' => $database->getInternalId(), + 'databaseId' => $databaseId, + '$permissions' => $permissions, + 'documentSecurity' => $documentSecurity, + 'enabled' => $enabled, + 'name' => $name, + 'search' => \implode(' ', [$tableId, $name]), + ])); + + $dbForProject->createCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), permissions: $permissions, documentSecurity: $documentSecurity); + } catch (DuplicateException) { + throw new Exception(Exception::COLLECTION_ALREADY_EXISTS); + } catch (LimitException) { + throw new Exception(Exception::COLLECTION_LIMIT_EXCEEDED); + } + + $queueForEvents + ->setContext('database', $database) + ->setParam('databaseId', $databaseId) + ->setParam('tableId', $table->getId()); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_CREATED) + ->dynamic($table, UtopiaResponse::MODEL_COLLECTION); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php new file mode 100644 index 0000000000..b3120ef36d --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php @@ -0,0 +1,95 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId') + ->desc('Delete table') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].delete') + ->label('audits.event', 'table.delete') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'tables', + name: 'deleteTable', + description: '/docs/references/databases/delete-collection.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$thiss, 'action']); + } + + public function action(string $databaseId, string $tableId, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { + $database = \Utopia\Database\Validator\Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + if (!$dbForProject->deleteDocument('database_' . $database->getInternalId(), $tableId)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove collection from DB'); + } + + $dbForProject->purgeCachedCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId()); + + $queueForDatabase + ->setType(DATABASE_TYPE_DELETE_COLLECTION) + ->setDatabase($database) + ->setTable($table); + + $queueForEvents + ->setContext('database', $database) + ->setParam('databaseId', $databaseId) + ->setParam('tableId', $table->getId()) + ->setPayload($response->output($table, UtopiaResponse::MODEL_COLLECTION)); + + $response->noContent(); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php new file mode 100644 index 0000000000..2b0f77fc81 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php @@ -0,0 +1,74 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId') + ->desc('Get table') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'tables', + name: 'getTable', + description: '/docs/references/databases/get-collection.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_COLLECTION, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, UtopiaResponse $response, Database $dbForProject): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $response->dynamic($table, UtopiaResponse::MODEL_COLLECTION); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php new file mode 100644 index 0000000000..44a850424f --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php @@ -0,0 +1,153 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/logs') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/logs') + ->desc('List table logs') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'tables', + name: 'listTableLogs', + description: '/docs/references/databases/get-collection-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_LOG_LIST, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) + ->inject('response') + ->inject('dbForProject') + ->inject('locale') + ->inject('geodb') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $tableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $tableDocument->getInternalId()); + + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + // Temp fix for logs + $queries[] = Query::or([ + Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))), + Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))), + ]); + + $audit = new Audit($dbForProject); + $resource = 'database/' . $databaseId . '/table/' . $tableId; + $logs = $audit->getLogsByResource($resource, $queries); + + $output = []; + + foreach ($logs as $i => &$log) { + $log['userAgent'] = (!empty($log['userAgent'])) ? $log['userAgent'] : 'UNKNOWN'; + + $detector = new Detector($log['userAgent']); + $detector->skipBotDetection(); // OPTIONAL: If called, bot detection will completely be skipped (bots will be detected as regular devices then) + + $os = $detector->getOS(); + $client = $detector->getClient(); + $device = $detector->getDevice(); + + $output[$i] = new Document([ + 'event' => $log['event'], + 'userId' => $log['data']['userId'], + 'userEmail' => $log['data']['userEmail'] ?? null, + 'userName' => $log['data']['userName'] ?? null, + 'mode' => $log['data']['mode'] ?? null, + 'ip' => $log['ip'], + 'time' => $log['time'], + 'osCode' => $os['osCode'], + 'osName' => $os['osName'], + 'osVersion' => $os['osVersion'], + 'clientType' => $client['clientType'], + 'clientCode' => $client['clientCode'], + 'clientName' => $client['clientName'], + 'clientVersion' => $client['clientVersion'], + 'clientEngine' => $client['clientEngine'], + 'clientEngineVersion' => $client['clientEngineVersion'], + 'deviceName' => $device['deviceName'], + 'deviceBrand' => $device['deviceBrand'], + 'deviceModel' => $device['deviceModel'] + ]); + + $record = $geodb->get($log['ip']); + + if ($record) { + $output[$i]['countryCode'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), false) ? \strtolower($record['country']['iso_code']) : '--'; + $output[$i]['countryName'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), $locale->getText('locale.country.unknown')); + } else { + $output[$i]['countryCode'] = '--'; + $output[$i]['countryName'] = $locale->getText('locale.country.unknown'); + } + } + + $response->dynamic(new Document([ + 'total' => $audit->countLogsByResource($resource, $queries), + 'logs' => $output, + ]), UtopiaResponse::MODEL_LOG_LIST); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php new file mode 100644 index 0000000000..2db6c5d328 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php @@ -0,0 +1,110 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId') + ->desc('Update table') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].update') + ->label('audits.event', 'table.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'tables', + name: 'updateTable', + description: '/docs/references/databases/update-collection.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_COLLECTION, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.') + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, the current permissions are inherited. [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) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + { + $database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $permissions ??= $table->getPermissions() ?? []; + + // Map aggregate permissions into the multiple permissions they represent. + $permissions = Permission::aggregate($permissions); + + $enabled ??= $table->getAttribute('enabled', true); + + $table = $dbForProject->updateDocument( + 'database_' . $database->getInternalId(), + $tableId, + $table + ->setAttribute('name', $name) + ->setAttribute('$permissions', $permissions) + ->setAttribute('documentSecurity', $documentSecurity) + ->setAttribute('enabled', $enabled) + ->setAttribute('search', \implode(' ', [$tableId, $name])) + ); + + $dbForProject->updateCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $permissions, $documentSecurity); + + $queueForEvents + ->setContext('database', $database) + ->setParam('databaseId', $databaseId) + ->setParam('tableId', $table->getId()); + + $response->dynamic($table, UtopiaResponse::MODEL_COLLECTION); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php new file mode 100644 index 0000000000..d75150f2bb --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php @@ -0,0 +1,117 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables') + ->httpAlias('/v1/databases/:databaseId/collections') + ->desc('List tables') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'tables', + name: 'listTables', + description: '/docs/references/databases/list-collections.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_COLLECTION_LIST, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('queries', [], new Collections(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Collections::ALLOWED_ATTRIBUTES), true) + ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, array $queries, string $search, UtopiaResponse $response, Database $dbForProject): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $queries = Query::parseQueries($queries); + + if (!empty($search)) { + $queries[] = Query::search('search', $search); + } + + /** + * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries + */ + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); + }); + $cursor = reset($cursor); + + if ($cursor) { + $validator = new Cursor(); + if (!$validator->isValid($cursor)) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); + } + + $tableId = $cursor->getValue(); + $cursorDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + + if ($cursorDocument->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Table '{$tableId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument); + } + + $filterQueries = Query::groupByType($queries)['filters']; + + try { + $tables = $dbForProject->find('database_' . $database->getInternalId(), $queries); + $total = $dbForProject->count('database_' . $database->getInternalId(), $filterQueries, APP_LIMIT_COUNT); + } catch (OrderException $e) { + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + } + + $response->dynamic(new Document([ + 'collections' => $tables, // TODO: consider renaming to 'tables' + 'total' => $total, + ]), UtopiaResponse::MODEL_COLLECTION_LIST); + } +} From 3271ef57695f56b2a3e0dfa4d229167dad7eb576 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 17:16:37 +0530 Subject: [PATCH 014/362] update: move Index ops to module. --- app/controllers/api/databases.php | 389 ------------------ .../Modules/Databases/Http/Indexes/Create.php | 217 ++++++++++ .../Modules/Databases/Http/Indexes/Delete.php | 109 +++++ .../Modules/Databases/Http/Indexes/Get.php | 80 ++++ .../Modules/Databases/Http/Indexes/XList.php | 129 ++++++ 5 files changed, 535 insertions(+), 389 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Indexes/Delete.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Indexes/XList.php diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index bc80502521..63a4e3fbb7 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -2,7 +2,6 @@ use Appwrite\Auth\Auth; use Appwrite\Detector\Detector; -use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception; @@ -11,7 +10,6 @@ use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; -use Appwrite\Utopia\Database\Validator\Queries\Indexes; use Appwrite\Utopia\Response; use MaxMind\Db\Reader; use Utopia\App; @@ -31,8 +29,6 @@ use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; -use Utopia\Database\Validator\Index as IndexValidator; -use Utopia\Database\Validator\Key; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\Queries; use Utopia\Database\Validator\Query\Cursor; @@ -41,395 +37,10 @@ use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; use Utopia\Locale\Locale; use Utopia\Validator\ArrayList; -use Utopia\Validator\Boolean; use Utopia\Validator\JSON; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; -App::post('/v1/databases/:databaseId/tables/:tableId/indexes') - ->alias('/v1/databases/:databaseId/collections/:tableId/indexes') - ->desc('Create index') - ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'index.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'tables', - name: 'createIndex', - description: '/docs/references/databases/create-index.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_ACCEPTED, - model: Response::MODEL_INDEX, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', null, new Key(), 'Index Key.') - ->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE]), 'Index type.') - ->param('columns', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of columns to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' columns are allowed, each 32 characters long.') - ->param('orders', [], new ArrayList(new WhiteList(['ASC', 'DESC'], false, Database::VAR_STRING), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index orders. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' orders are allowed.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, string $type, array $columns, array $orders, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - - $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($db->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $count = $dbForProject->count('indexes', [ - Query::equal('collectionInternalId', [$table->getInternalId()]), - Query::equal('databaseInternalId', [$db->getInternalId()]) - ], 61); - - $limit = $dbForProject->getLimitForIndexes(); - - if ($count >= $limit) { - throw new Exception(Exception::INDEX_LIMIT_EXCEEDED, 'Index limit exceeded'); - } - - // Convert Document[] to array of attribute metadata - $oldColumns = \array_map(fn ($a) => $a->getArrayCopy(), $table->getAttribute('attributes')); - - $oldColumns[] = [ - 'key' => '$id', - 'type' => Database::VAR_STRING, - 'status' => 'available', - 'required' => true, - 'array' => false, - 'default' => null, - 'size' => Database::LENGTH_KEY - ]; - - $oldColumns[] = [ - 'key' => '$createdAt', - 'type' => Database::VAR_DATETIME, - 'status' => 'available', - 'signed' => false, - 'required' => false, - 'array' => false, - 'default' => null, - 'size' => 0 - ]; - - $oldColumns[] = [ - 'key' => '$updatedAt', - 'type' => Database::VAR_DATETIME, - 'status' => 'available', - 'signed' => false, - 'required' => false, - 'array' => false, - 'default' => null, - 'size' => 0 - ]; - - // lengths hidden by default - $lengths = []; - - foreach ($columns as $i => $column) { - // find attribute metadata in collection document - $columnIndex = \array_search($column, array_column($oldColumns, 'key')); - - if ($columnIndex === false) { - throw new Exception(Exception::ATTRIBUTE_UNKNOWN, 'Unknown column: ' . $column . '. Verify the column name or create the column.'); - } - - $columnStatus = $oldColumns[$columnIndex]['status']; - $columnType = $oldColumns[$columnIndex]['type']; - $columnArray = $oldColumns[$columnIndex]['array'] ?? false; - - if ($columnType === Database::VAR_RELATIONSHIP) { - throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID, 'Cannot create an index for a relationship column: ' . $oldColumns[$columnIndex]['key']); - } - - // ensure attribute is available - if ($columnStatus !== 'available') { - throw new Exception(Exception::ATTRIBUTE_NOT_AVAILABLE, 'Column not available: ' . $oldColumns[$columnIndex]['key']); - } - - $lengths[$i] = null; - - if ($columnArray === true) { - $lengths[$i] = Database::ARRAY_INDEX_LENGTH; - $orders[$i] = null; - } - } - - $index = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $table->getInternalId() . '_' . $key), - 'key' => $key, - 'status' => 'processing', // processing, available, failed, deleting, stuck - 'databaseInternalId' => $db->getInternalId(), - 'databaseId' => $databaseId, - 'collectionInternalId' => $table->getInternalId(), - 'collectionId' => $tableId, - 'type' => $type, - 'attributes' => $columns, - 'lengths' => $lengths, - 'orders' => $orders, - ]); - - $validator = new IndexValidator( - $table->getAttribute('attributes'), - $dbForProject->getAdapter()->getMaxIndexLength(), - $dbForProject->getAdapter()->getInternalIndexesKeys(), - ); - if (!$validator->isValid($index)) { - throw new Exception(Exception::INDEX_INVALID, $validator->getDescription()); - } - - try { - $index = $dbForProject->createDocument('indexes', $index); - } catch (DuplicateException) { - throw new Exception(Exception::INDEX_ALREADY_EXISTS); - } - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); - - $queueForDatabase - ->setType(DATABASE_TYPE_CREATE_INDEX) - ->setDatabase($db) - ->setTable($table) - ->setRow($index); - - $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('indexId', $index->getId()) - ->setContext('table', $table) - ->setContext('database', $db); - - $response - ->setStatusCode(Response::STATUS_CODE_ACCEPTED) - ->dynamic($index, Response::MODEL_INDEX); - }); - -App::get('/v1/databases/:databaseId/tables/:tableId/indexes') - ->alias('/v1/databases/:databaseId/collections/:tableId/indexes') - ->desc('List indexes') - ->groups(['api', 'database']) - ->label('scope', 'collections.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'indexes', - name: 'listIndexes', - description: '/docs/references/databases/list-indexes.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_INDEX_LIST, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('queries', [], new Indexes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Indexes::ALLOWED_ATTRIBUTES), true) - ->inject('response') - ->inject('dbForProject') - ->action(function (string $databaseId, string $tableId, array $queries, Response $response, Database $dbForProject) { - /** @var Document $database */ - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $queries = Query::parseQueries($queries); - - \array_push( - $queries, - Query::equal('databaseId', [$databaseId]), - Query::equal('collectionId', [$tableId]), - ); - - /** - * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries - */ - $cursor = \array_filter($queries, function ($query) { - return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); - }); - $cursor = reset($cursor); - - if ($cursor) { - $validator = new Cursor(); - if (!$validator->isValid($cursor)) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); - } - - $indexId = $cursor->getValue(); - $cursorDocument = Authorization::skip(fn () => $dbForProject->find('indexes', [ - Query::equal('collectionInternalId', [$table->getInternalId()]), - Query::equal('databaseInternalId', [$database->getInternalId()]), - Query::equal('key', [$indexId]), - Query::limit(1) - ])); - - if (empty($cursorDocument) || $cursorDocument[0]->isEmpty()) { - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Index '{$indexId}' for the 'cursor' value not found."); - } - - $cursor->setValue($cursorDocument[0]); - } - - $filterQueries = Query::groupByType($queries)['filters']; - try { - $total = $dbForProject->count('indexes', $filterQueries, APP_LIMIT_COUNT); - $indexes = $dbForProject->find('indexes', $queries); - } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); - } - - $response->dynamic(new Document([ - 'total' => $total, - 'indexes' => $indexes, - ]), Response::MODEL_INDEX_LIST); - }); - -App::get('/v1/databases/:databaseId/tables/:tableId/indexes/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/indexes/:key') - ->desc('Get index') - ->groups(['api', 'database']) - ->label('scope', 'collections.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'indexes', - name: 'getIndex', - description: '/docs/references/databases/get-index.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_INDEX, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', null, new Key(), 'Index Key.') - ->inject('response') - ->inject('dbForProject') - ->action(function (string $databaseId, string $tableId, string $key, Response $response, Database $dbForProject) { - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $index = $table->find('key', $key, 'indexes'); - if (empty($index)) { - throw new Exception(Exception::INDEX_NOT_FOUND); - } - - $response->dynamic($index, Response::MODEL_INDEX); - }); - - -App::delete('/v1/databases/:databaseId/tables/:tableId/indexes/:key') - ->alias('/v1/databases/:databaseId/collections/:tableId/indexes/:key') - ->desc('Delete index') - ->groups(['api', 'database']) - ->label('scope', 'collections.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].update') - ->label('audits.event', 'index.delete') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('sdk', new Method( - namespace: 'databases', - group: 'indexes', - name: 'deleteIndex', - description: '/docs/references/databases/delete-index.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_NOCONTENT, - model: Response::MODEL_NONE, - ) - ], - contentType: ContentType::NONE - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('key', '', new Key(), 'Index Key.') - ->inject('response') - ->inject('dbForProject') - ->inject('queueForDatabase') - ->inject('queueForEvents') - ->action(function (string $databaseId, string $tableId, string $key, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - - $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($db->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $index = $dbForProject->getDocument('indexes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); - - if (empty($index->getId())) { - throw new Exception(Exception::INDEX_NOT_FOUND); - } - - // Only update status if removing available index - if ($index->getAttribute('status') === 'available') { - $index = $dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'deleting')); - } - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); - - $queueForDatabase - ->setType(DATABASE_TYPE_DELETE_INDEX) - ->setDatabase($db) - ->setTable($table) - ->setRow($index); - - $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('indexId', $index->getId()) - ->setContext('table', $table) - ->setContext('database', $db) - ->setPayload($response->output($index, Response::MODEL_INDEX)); - - $response->noContent(); - }); - App::post('/v1/databases/:databaseId/tables/:tableId/rows') ->alias('/v1/databases/:databaseId/collections/:tableId/documents') ->desc('Create row') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php new file mode 100644 index 0000000000..49cb7157b0 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php @@ -0,0 +1,217 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/indexes') + ->desc('Create index') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'index.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'tables', + name: 'createIndex', + description: '/docs/references/databases/create-index.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: UtopiaResponse::MODEL_INDEX, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', null, new Key(), 'Index Key.') + ->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE]), 'Index type.') + ->param('columns', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of columns to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' columns are allowed, each 32 characters long.') + ->param('orders', [], new ArrayList(new WhiteList(['ASC', 'DESC'], false, Database::VAR_STRING), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index orders. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' orders are allowed.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, string $key, string $type, array $columns, array $orders, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { + $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($db->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); + + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $count = $dbForProject->count('indexes', [ + Query::equal('collectionInternalId', [$table->getInternalId()]), + Query::equal('databaseInternalId', [$db->getInternalId()]) + ], 61); + + $limit = $dbForProject->getLimitForIndexes(); + + if ($count >= $limit) { + throw new Exception(Exception::INDEX_LIMIT_EXCEEDED, 'Index limit exceeded'); + } + + // Convert Document[] to array of attribute metadata + $oldColumns = \array_map(fn ($a) => $a->getArrayCopy(), $table->getAttribute('attributes')); + + $oldColumns[] = [ + 'key' => '$id', + 'type' => Database::VAR_STRING, + 'status' => 'available', + 'required' => true, + 'array' => false, + 'default' => null, + 'size' => Database::LENGTH_KEY + ]; + + $oldColumns[] = [ + 'key' => '$createdAt', + 'type' => Database::VAR_DATETIME, + 'status' => 'available', + 'signed' => false, + 'required' => false, + 'array' => false, + 'default' => null, + 'size' => 0 + ]; + + $oldColumns[] = [ + 'key' => '$updatedAt', + 'type' => Database::VAR_DATETIME, + 'status' => 'available', + 'signed' => false, + 'required' => false, + 'array' => false, + 'default' => null, + 'size' => 0 + ]; + + // lengths hidden by default + $lengths = []; + + foreach ($columns as $i => $column) { + // find attribute metadata in collection document + $columnIndex = \array_search($column, array_column($oldColumns, 'key')); + + if ($columnIndex === false) { + throw new Exception(Exception::ATTRIBUTE_UNKNOWN, 'Unknown column: ' . $column . '. Verify the column name or create the column.'); + } + + $columnStatus = $oldColumns[$columnIndex]['status']; + $columnType = $oldColumns[$columnIndex]['type']; + $columnArray = $oldColumns[$columnIndex]['array'] ?? false; + + if ($columnType === Database::VAR_RELATIONSHIP) { + throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID, 'Cannot create an index for a relationship column: ' . $oldColumns[$columnIndex]['key']); + } + + // ensure attribute is available + if ($columnStatus !== 'available') { + throw new Exception(Exception::ATTRIBUTE_NOT_AVAILABLE, 'Column not available: ' . $oldColumns[$columnIndex]['key']); + } + + $lengths[$i] = null; + + if ($columnArray === true) { + $lengths[$i] = Database::ARRAY_INDEX_LENGTH; + $orders[$i] = null; + } + } + + $index = new Document([ + '$id' => ID::custom($db->getInternalId() . '_' . $table->getInternalId() . '_' . $key), + 'key' => $key, + 'status' => 'processing', // processing, available, failed, deleting, stuck + 'databaseInternalId' => $db->getInternalId(), + 'databaseId' => $databaseId, + 'collectionInternalId' => $table->getInternalId(), + 'collectionId' => $tableId, + 'type' => $type, + 'attributes' => $columns, + 'lengths' => $lengths, + 'orders' => $orders, + ]); + + $validator = new IndexValidator( + $table->getAttribute('attributes'), + $dbForProject->getAdapter()->getMaxIndexLength(), + $dbForProject->getAdapter()->getInternalIndexesKeys(), + ); + if (!$validator->isValid($index)) { + throw new Exception(Exception::INDEX_INVALID, $validator->getDescription()); + } + + try { + $index = $dbForProject->createDocument('indexes', $index); + } catch (DuplicateException) { + throw new Exception(Exception::INDEX_ALREADY_EXISTS); + } + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); + + $queueForDatabase + ->setType(DATABASE_TYPE_CREATE_INDEX) + ->setDatabase($db) + ->setTable($table) + ->setRow($index); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setParam('tableId', $table->getId()) + ->setParam('indexId', $index->getId()) + ->setContext('table', $table) + ->setContext('database', $db); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($index, UtopiaResponse::MODEL_INDEX); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Delete.php new file mode 100644 index 0000000000..eeb772e0c3 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Delete.php @@ -0,0 +1,109 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/indexes/:key') + ->desc('Delete index') + ->groups(['api', 'database']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].update') + ->label('audits.event', 'index.delete') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'indexes', + name: 'deleteIndex', + description: '/docs/references/databases/delete-index.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Index Key.') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { + $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($db->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); + + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $index = $dbForProject->getDocument('indexes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); + + if (empty($index->getId())) { + throw new Exception(Exception::INDEX_NOT_FOUND); + } + + // Only update status if removing available index + if ($index->getAttribute('status') === 'available') { + $index = $dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'deleting')); + } + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); + + $queueForDatabase + ->setType(DATABASE_TYPE_DELETE_INDEX) + ->setDatabase($db) + ->setTable($table) + ->setRow($index); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setParam('tableId', $table->getId()) + ->setParam('indexId', $index->getId()) + ->setContext('table', $table) + ->setContext('database', $db) + ->setPayload($response->output($index, UtopiaResponse::MODEL_INDEX)); + + $response->noContent(); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php new file mode 100644 index 0000000000..72ab1a02b1 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php @@ -0,0 +1,80 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/indexes/:key') + ->desc('Get index') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'indexes', + name: 'getIndex', + description: '/docs/references/databases/get-index.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_INDEX, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', null, new Key(), 'Index Key.') + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $index = $table->find('key', $key, 'indexes'); + if (empty($index)) { + throw new Exception(Exception::INDEX_NOT_FOUND); + } + + $response->dynamic($index, UtopiaResponse::MODEL_INDEX); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/XList.php new file mode 100644 index 0000000000..4920b679c1 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/XList.php @@ -0,0 +1,129 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/indexes') + ->desc('List indexes') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'indexes', + name: 'listIndexes', + description: '/docs/references/databases/list-indexes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_INDEX_LIST, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('queries', [], new Indexes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Indexes::ALLOWED_ATTRIBUTES), true) + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject): void + { + /** @var Document $database */ + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $queries = Query::parseQueries($queries); + + \array_push( + $queries, + Query::equal('databaseId', [$databaseId]), + Query::equal('collectionId', [$tableId]), + ); + + /** + * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries + */ + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); + }); + $cursor = reset($cursor); + + if ($cursor) { + $validator = new Cursor(); + if (!$validator->isValid($cursor)) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); + } + + $indexId = $cursor->getValue(); + $cursorDocument = Authorization::skip(fn () => $dbForProject->find('indexes', [ + Query::equal('collectionInternalId', [$table->getInternalId()]), + Query::equal('databaseInternalId', [$database->getInternalId()]), + Query::equal('key', [$indexId]), + Query::limit(1) + ])); + + if (empty($cursorDocument) || $cursorDocument[0]->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Index '{$indexId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument[0]); + } + + $filterQueries = Query::groupByType($queries)['filters']; + try { + $total = $dbForProject->count('indexes', $filterQueries, APP_LIMIT_COUNT); + $indexes = $dbForProject->find('indexes', $queries); + } catch (OrderException $e) { + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); + } + + $response->dynamic(new Document([ + 'total' => $total, + 'indexes' => $indexes, + ]), UtopiaResponse::MODEL_INDEX_LIST); + } +} From 76785d58c63420eadd82a9a2afbef44ddf18a958 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 17:16:52 +0530 Subject: [PATCH 015/362] fix: imports, lint. --- .../Platform/Modules/Databases/Http/Tables/Delete.php | 5 +++-- .../Platform/Modules/Databases/Http/Tables/Update.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php index b3120ef36d..92003f3eeb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php @@ -11,6 +11,7 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; +use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; @@ -58,12 +59,12 @@ class Delete extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$thiss, 'action']); + ->callback([$this, 'action']); } public function action(string $databaseId, string $tableId, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void { - $database = \Utopia\Database\Validator\Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php index 2db6c5d328..dc302ce47f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php @@ -70,7 +70,7 @@ class Update extends Action public function action(string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void { - $database = Authorization::skip(fn() => $dbForProject->getDocument('databases', $databaseId)); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } From fd7801fe26ff95aba9ba5d94a05e94f310151ceb Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 17:24:38 +0530 Subject: [PATCH 016/362] add: register index and table modules. --- .../Modules/Databases/Services/Http.php | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Http.php b/src/Appwrite/Platform/Modules/Databases/Services/Http.php index de0de71e05..045dc6ff42 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Http.php @@ -31,6 +31,16 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Get as GetDatabase; use Appwrite\Platform\Modules\Databases\Http\Databases\Logs\XList as ListDatabaseLogs; use Appwrite\Platform\Modules\Databases\Http\Databases\Update as UpdateDatabase; use Appwrite\Platform\Modules\Databases\Http\Databases\XList as ListDatabases; +use Appwrite\Platform\Modules\Databases\Http\Indexes\Create as CreateIndex; +use Appwrite\Platform\Modules\Databases\Http\Indexes\Delete as DeleteIndex; +use Appwrite\Platform\Modules\Databases\Http\Indexes\Get as GetIndex; +use Appwrite\Platform\Modules\Databases\Http\Indexes\XList as ListIndexes; +use Appwrite\Platform\Modules\Databases\Http\Tables\Create as CreateTable; +use Appwrite\Platform\Modules\Databases\Http\Tables\Delete as DeleteTable; +use Appwrite\Platform\Modules\Databases\Http\Tables\Get as GetTable; +use Appwrite\Platform\Modules\Databases\Http\Tables\Logs\XList as ListTableLogs; +use Appwrite\Platform\Modules\Databases\Http\Tables\Update as UpdateTable; +use Appwrite\Platform\Modules\Databases\Http\Tables\XList as ListTables; use Utopia\Platform\Service; class Http extends Service @@ -58,7 +68,12 @@ class Http extends Service private function registerTableActions(): void { - + $this->addAction(CreateTable::getName(), new CreateTable()); + $this->addAction(GetTable::getName(), new GetTable()); + $this->addAction(UpdateTable::getName(), new UpdateTable()); + $this->addAction(DeleteTable::getName(), new DeleteTable()); + $this->addAction(ListTables::getName(), new ListTables()); + $this->addAction(ListTableLogs::getName(), new ListTableLogs()); } private function registerColumnActions(): void @@ -111,7 +126,10 @@ class Http extends Service private function registerIndexActions(): void { - + $this->addAction(CreateIndex::getName(), new CreateIndex()); + $this->addAction(GetIndex::getName(), new GetIndex()); + $this->addAction(DeleteIndex::getName(), new DeleteIndex()); + $this->addAction(ListIndexes::getName(), new ListIndexes()); } private function registerRowActions(): void From 286c695b47c51a6608fe8723d431e8865b9c2069 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 17:52:29 +0530 Subject: [PATCH 017/362] add: move and register row modules. --- app/controllers/api/databases.php | 1087 ----------------- .../Modules/Databases/Http/Rows/Create.php | 314 +++++ .../Modules/Databases/Http/Rows/Delete.php | 167 +++ .../Modules/Databases/Http/Rows/Get.php | 154 +++ .../Databases/Http/Rows/Logs/XList.php | 159 +++ .../Modules/Databases/Http/Rows/Update.php | 302 +++++ .../Modules/Databases/Http/Rows/XList.php | 223 ++++ .../Modules/Databases/Services/Http.php | 13 +- 8 files changed, 1331 insertions(+), 1088 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 63a4e3fbb7..1f18d2fa1e 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1,1107 +1,20 @@ alias('/v1/databases/:databaseId/collections/:tableId/documents') - ->desc('Create row') - ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].create') - ->label('scope', 'documents.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'row.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') - ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') - ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) - ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) - ->label( - 'sdk', - [ - new Method( - namespace: 'databases', - group: 'rows', - name: 'createRow', - description: '/docs/references/databases/create-document.md', - auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_CREATED, - model: Response::MODEL_DOCUMENT, - ) - ], - contentType: ContentType::JSON - ) - ] - ) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('rowId', '', new CustomId(), 'Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define columns before creating rows.') - ->param('data', [], new JSON(), 'Row data as JSON object.') - ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) - ->inject('response') - ->inject('dbForProject') - ->inject('user') - ->inject('queueForEvents') - ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $rowId, string $tableId, string|array $data, ?array $permissions, Response $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage) { - - $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array - - if (empty($data)) { - throw new Exception(Exception::DOCUMENT_MISSING_DATA); - } - - if (isset($data['$id'])) { - throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, '$id is not allowed for creating new documents, try update instead'); - } - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - $isAPIKey = Auth::isAppUser(Authorization::getRoles()); - $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); - - if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - - if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $allowedPermissions = [ - Database::PERMISSION_READ, - Database::PERMISSION_UPDATE, - Database::PERMISSION_DELETE, - ]; - - // Map aggregate permissions to into the set of individual permissions they represent. - $permissions = Permission::aggregate($permissions, $allowedPermissions); - - // Add permissions for current the user if none were provided. - if (\is_null($permissions)) { - $permissions = []; - if (!empty($user->getId())) { - foreach ($allowedPermissions as $permission) { - $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); - } - } - } - - // Users can only manage their own roles, API keys and Admin users can manage any - if (!$isAPIKey && !$isPrivilegedUser) { - foreach (Database::PERMISSIONS as $type) { - foreach ($permissions as $permission) { - $permission = Permission::parse($permission); - if ($permission->getPermission() != $type) { - continue; - } - $role = (new Role( - $permission->getRole(), - $permission->getIdentifier(), - $permission->getDimension() - ))->toString(); - if (!Authorization::isRole($role)) { - throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', Authorization::getRoles()) . ')'); - } - } - } - } - - $data['$collection'] = $table->getId(); // Adding this param to make API easier for developers - $data['$id'] = $rowId == 'unique()' ? ID::unique() : $rowId; - $data['$permissions'] = $permissions; - $row = new Document($data); - - $operations = 0; - - $checkPermissions = function (Document $table, Document $row, string $permission) use (&$checkPermissions, $dbForProject, $database, &$operations) { - $operations++; - - $documentSecurity = $table->getAttribute('documentSecurity', false); - $validator = new Authorization($permission); - - $valid = $validator->isValid($table->getPermissionsByType($permission)); - if (($permission === Database::PERMISSION_UPDATE && !$documentSecurity) || !$valid) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } - - if ($permission === Database::PERMISSION_UPDATE) { - $valid = $valid || $validator->isValid($row->getUpdate()); - if ($documentSecurity && !$valid) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } - } - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - - $isList = \is_array($related) && \array_values($related) === $related; - - if ($isList) { - $relations = $related; - } else { - $relations = [$related]; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) - ); - - foreach ($relations as &$relation) { - if ( - \is_array($relation) - && \array_values($relation) !== $relation - && !isset($relation['$id']) - ) { - $relation['$id'] = ID::unique(); - $relation = new Document($relation); - } - if ($relation instanceof Document) { - $current = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId(), $relation->getId()) - ); - - if ($current->isEmpty()) { - $type = Database::PERMISSION_CREATE; - - if (isset($relation['$id']) && $relation['$id'] === 'unique()') { - $relation['$id'] = ID::unique(); - } - } else { - $relation->removeAttribute('$collectionId'); - $relation->removeAttribute('$databaseId'); - $relation->setAttribute('$collection', $relatedTable->getId()); - $type = Database::PERMISSION_UPDATE; - } - - $checkPermissions($relatedTable, $relation, $type); - } - } - - if ($isList) { - $row->setAttribute($relationship->getAttribute('key'), \array_values($relations)); - } else { - $row->setAttribute($relationship->getAttribute('key'), \reset($relations)); - } - } - }; - - $checkPermissions($table, $row, Database::PERMISSION_CREATE); - - try { - $row = $dbForProject->createDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $row); - } catch (StructureException $e) { - throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); - } catch (DuplicateException $e) { - throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); - } catch (NotFoundException $e) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - - // Add $tableId and $databaseId for all rows - $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database) { - $row->setAttribute('$databaseId', $database->getId()); - $row->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processRow($relatedTable, $relation); - } - } - } - }; - - $processRow($table, $row); - - $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); // per collection - - $response->addHeader('X-Debug-Operations', $operations); - - $response - ->setStatusCode(Response::STATUS_CODE_CREATED) - ->dynamic($row, Response::MODEL_DOCUMENT); - - $relationships = \array_map( - fn ($document) => $document->getAttribute('key'), - \array_filter( - $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ) - ); - - $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('rowId', $row->getId()) - ->setContext('table', $table) - ->setContext('database', $database) - ->setPayload($response->getPayload(), sensitive: $relationships); - }); - -App::get('/v1/databases/:databaseId/tables/:tableId/rows') - ->alias('/v1/databases/:databaseId/collections/:tableId/documents') - ->desc('List rows') - ->groups(['api', 'database']) - ->label('scope', 'documents.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'rows', - name: 'listRows', - description: '/docs/references/databases/list-documents.md', - auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_DOCUMENT_LIST, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $tableId, array $queries, Response $response, Database $dbForProject, StatsUsage $queueForStatsUsage) { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - $isAPIKey = Auth::isAppUser(Authorization::getRoles()); - $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); - - if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - - if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } - - /** - * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries - */ - $cursor = \array_filter($queries, function ($query) { - return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); - }); - - $cursor = \reset($cursor); - - if ($cursor) { - $validator = new Cursor(); - if (!$validator->isValid($cursor)) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); - } - - $rowId = $cursor->getValue(); - - $cursorRow = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); - - if ($cursorRow->isEmpty()) { - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Row '{$rowId}' for the 'cursor' value not found."); - } - - $cursor->setValue($cursorRow); - } - try { - $rows = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $queries); - $total = $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $queries, APP_LIMIT_COUNT); - } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); - } - - $operations = 0; - - // Add $tableId and $databaseId for all rows - $processRow = (function (Document $table, Document $row) use (&$processRow, $dbForProject, $database, &$operations): bool { - if ($row->isEmpty()) { - return false; - } - - $operations++; - - $row->removeAttribute('$collection'); - $row->setAttribute('$databaseId', $database->getId()); - $row->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - if (\in_array(\gettype($related), ['array', 'object'])) { - $operations++; - } - - continue; - } - - if (!\is_array($related)) { - $relations = [$related]; - } else { - $relations = $related; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - // todo: Use local cache for this getDocument - $relatedTable = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId)); - - foreach ($relations as $index => $doc) { - if ($doc instanceof Document) { - if (!$processRow($relatedTable, $doc)) { - unset($relations[$index]); - } - } - } - - if (\is_array($related)) { - $row->setAttribute($relationship->getAttribute('key'), \array_values($relations)); - } elseif (empty($relations)) { - $row->setAttribute($relationship->getAttribute('key'), null); - } - } - - return true; - }); - - foreach ($rows as $row) { - $processRow($table, $row); - } - - $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); - - $response->addHeader('X-Debug-Operations', $operations); - - $select = \array_reduce($queries, function ($result, $query) { - return $result || ($query->getMethod() === Query::TYPE_SELECT); - }, false); - - // Check if the SELECT query includes $databaseId and $collectionId - $hasDatabaseId = false; - $hasTableId = false; - if ($select) { - $hasDatabaseId = \array_reduce($queries, function ($result, $query) { - return $result || ($query->getMethod() === Query::TYPE_SELECT && \in_array('$databaseId', $query->getValues())); - }, false); - $hasTableId = \array_reduce($queries, function ($result, $query) { - return $result || ($query->getMethod() === Query::TYPE_SELECT && \in_array('$collectionId', $query->getValues())); - }, false); - } - - if ($select) { - foreach ($rows as $row) { - if (!$hasDatabaseId) { - $row->removeAttribute('$databaseId'); - } - if (!$hasTableId) { - $row->removeAttribute('$collectionId'); - } - } - } - - $response->dynamic(new Document([ - 'total' => $total, - 'documents' => $rows, - ]), Response::MODEL_DOCUMENT_LIST); - }); - -App::get('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') - ->alias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId') - ->desc('Get row') - ->groups(['api', 'database']) - ->label('scope', 'documents.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'rows', - name: 'getRow', - description: '/docs/references/databases/get-document.md', - auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_DOCUMENT, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('rowId', '', new UID(), 'Row ID.') - ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) - ->inject('response') - ->inject('dbForProject') - ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $tableId, string $rowId, array $queries, Response $response, Database $dbForProject, StatsUsage $queueForStatsUsage) { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - $isAPIKey = Auth::isAppUser(Authorization::getRoles()); - $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); - - if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - - if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - try { - $queries = Query::parseQueries($queries); - $row = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId, $queries); - } catch (AuthorizationException) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } - - if ($row->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND); - } - - $operations = 0; - - // Add $tableId and $databaseId for all rows - $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database, &$operations) { - if ($row->isEmpty()) { - return; - } - - $operations++; - - $row->setAttribute('$databaseId', $database->getId()); - $row->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - if (\in_array(\gettype($related), ['array', 'object'])) { - $operations++; - } - - continue; - } - - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processRow($relatedTable, $relation); - } - } - } - }; - - $processRow($table, $row); - - $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); - - $response->addHeader('X-Debug-Operations', $operations); - - $response->dynamic($row, Response::MODEL_DOCUMENT); - }); - -App::get('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/logs') - ->alias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId/logs') - ->desc('List row logs') - ->groups(['api', 'database']) - ->label('scope', 'documents.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: 'logs', - name: 'listRowLogs', - description: '/docs/references/databases/get-document-logs.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_LOG_LIST, - ) - ], - contentType: ContentType::JSON, - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Collection ID.') - ->param('rowId', '', new UID(), 'Row ID.') - ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) - ->inject('response') - ->inject('dbForProject') - ->inject('locale') - ->inject('geodb') - ->action(function (string $databaseId, string $tableId, string $rowId, array $queries, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) { - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $row = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId); - - if ($row->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND); - } - - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } - - // Temp fix for logs - $queries[] = Query::or([ - Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))), - Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))), - ]); - - $audit = new Audit($dbForProject); - $resource = 'database/' . $databaseId . '/table/' . $tableId . '/row/' . $row->getId(); - $logs = $audit->getLogsByResource($resource, $queries); - - $output = []; - - foreach ($logs as $i => &$log) { - $log['userAgent'] = (!empty($log['userAgent'])) ? $log['userAgent'] : 'UNKNOWN'; - - $detector = new Detector($log['userAgent']); - $detector->skipBotDetection(); // OPTIONAL: If called, bot detection will completely be skipped (bots will be detected as regular devices then) - - $os = $detector->getOS(); - $client = $detector->getClient(); - $device = $detector->getDevice(); - - $output[$i] = new Document([ - 'event' => $log['event'], - 'userId' => $log['data']['userId'], - 'userEmail' => $log['data']['userEmail'] ?? null, - 'userName' => $log['data']['userName'] ?? null, - 'mode' => $log['data']['mode'] ?? null, - 'ip' => $log['ip'], - 'time' => $log['time'], - 'osCode' => $os['osCode'], - 'osName' => $os['osName'], - 'osVersion' => $os['osVersion'], - 'clientType' => $client['clientType'], - 'clientCode' => $client['clientCode'], - 'clientName' => $client['clientName'], - 'clientVersion' => $client['clientVersion'], - 'clientEngine' => $client['clientEngine'], - 'clientEngineVersion' => $client['clientEngineVersion'], - 'deviceName' => $device['deviceName'], - 'deviceBrand' => $device['deviceBrand'], - 'deviceModel' => $device['deviceModel'] - ]); - - $record = $geodb->get($log['ip']); - - if ($record) { - $output[$i]['countryCode'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), false) ? \strtolower($record['country']['iso_code']) : '--'; - $output[$i]['countryName'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), $locale->getText('locale.country.unknown')); - } else { - $output[$i]['countryCode'] = '--'; - $output[$i]['countryName'] = $locale->getText('locale.country.unknown'); - } - } - - $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource, $queries), - 'logs' => $output, - ]), Response::MODEL_LOG_LIST); - }); - -App::patch('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') - ->alias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId') - ->desc('Update row') - ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') - ->label('scope', 'documents.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'row.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') - ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') - ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) - ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) - ->label('sdk', new Method( - namespace: 'databases', - group: 'rows', - name: 'updateRow', - description: '/docs/references/databases/update-document.md', - auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_DOCUMENT, - ) - ], - contentType: ContentType::JSON - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Collection ID.') - ->param('rowId', '', new UID(), 'Row ID.') - ->param('data', [], new JSON(), 'Row data as JSON object. Include only columns and value pairs to be updated.', true) - ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) - ->inject('requestTimestamp') - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $tableId, string $rowId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage) { - - $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array - - if (empty($data) && \is_null($permissions)) { - throw new Exception(Exception::DOCUMENT_MISSING_PAYLOAD); - } - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - $isAPIKey = Auth::isAppUser(Authorization::getRoles()); - $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); - - if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - - if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - // Read permission should not be required for update - /** @var Document $row */ - $row = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); - - if ($row->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND); - } - - // Map aggregate permissions into the multiple permissions they represent. - $permissions = Permission::aggregate($permissions, [ - Database::PERMISSION_READ, - Database::PERMISSION_UPDATE, - Database::PERMISSION_DELETE, - ]); - - // Users can only manage their own roles, API keys and Admin users can manage any - $roles = Authorization::getRoles(); - if (!$isAPIKey && !$isPrivilegedUser && !\is_null($permissions)) { - foreach (Database::PERMISSIONS as $type) { - foreach ($permissions as $permission) { - $permission = Permission::parse($permission); - if ($permission->getPermission() != $type) { - continue; - } - $role = (new Role( - $permission->getRole(), - $permission->getIdentifier(), - $permission->getDimension() - ))->toString(); - if (!Authorization::isRole($role)) { - throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $roles) . ')'); - } - } - } - } - - if (\is_null($permissions)) { - $permissions = $row->getPermissions() ?? []; - } - - $data['$id'] = $rowId; - $data['$permissions'] = $permissions; - $newRow = new Document($data); - - $operations = 0; - - $setTable = (function (Document $collection, Document $document) use (&$setTable, $dbForProject, $database, &$operations) { - - $operations++; - - $relationships = \array_filter( - $collection->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - - $isList = \is_array($related) && \array_values($related) === $related; - - if ($isList) { - $relations = $related; - } else { - $relations = [$related]; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) - ); - - foreach ($relations as &$relation) { - // If the relation is an array it can be either update or create a child document. - if ( - \is_array($relation) - && \array_values($relation) !== $relation - && !isset($relation['$id']) - ) { - $relation['$id'] = ID::unique(); - $relation = new Document($relation); - } - if ($relation instanceof Document) { - $oldRow = Authorization::skip(fn () => $dbForProject->getDocument( - 'database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId(), - $relation->getId() - )); - $relation->removeAttribute('$collectionId'); - $relation->removeAttribute('$databaseId'); - // Attribute $collection is required for Utopia. - $relation->setAttribute( - '$collection', - 'database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId() - ); - - if ($oldRow->isEmpty()) { - if (isset($relation['$id']) && $relation['$id'] === 'unique()') { - $relation['$id'] = ID::unique(); - } - } - $setTable($relatedTable, $relation); - } - } - - if ($isList) { - $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); - } else { - $document->setAttribute($relationship->getAttribute('key'), \reset($relations)); - } - } - }); - - $setTable($table, $newRow); - - $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); - - $response->addHeader('X-Debug-Operations', $operations); - - try { - $row = $dbForProject->withRequestTimestamp( - $requestTimestamp, - fn () => $dbForProject->updateDocument( - 'database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), - $row->getId(), - $newRow - ) - ); - } catch (AuthorizationException) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } catch (DuplicateException) { - throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); - } catch (StructureException $e) { - throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); - } catch (NotFoundException $e) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - // Add $tableId and $databaseId for all rows - $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database) { - $row->setAttribute('$databaseId', $database->getId()); - $row->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processRow($relatedTable, $relation); - } - } - } - }; - - $processRow($table, $row); - - $response->dynamic($row, Response::MODEL_DOCUMENT); - - $relationships = \array_map( - fn ($document) => $document->getAttribute('key'), - \array_filter( - $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ) - ); - - $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('rowId', $row->getId()) - ->setContext('table', $table) - ->setContext('database', $database) - ->setPayload($response->getPayload(), sensitive: $relationships); - }); - -App::delete('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') - ->alias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId') - ->desc('Delete row') - ->groups(['api', 'database']) - ->label('scope', 'documents.write') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].delete') - ->label('audits.event', 'row.delete') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{request.rowId}') - ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') - ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) - ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) - ->label('sdk', new Method( - namespace: 'databases', - group: 'rows', - name: 'deleteRow', - description: '/docs/references/databases/delete-document.md', - auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_NOCONTENT, - model: Response::MODEL_NONE, - ) - ], - contentType: ContentType::NONE - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') - ->param('rowId', '', new UID(), 'Row ID.') - ->inject('requestTimestamp') - ->inject('response') - ->inject('dbForProject') - ->inject('queueForEvents') - ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $tableId, string $rowId, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage) { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - $isAPIKey = Auth::isAppUser(Authorization::getRoles()); - $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); - - if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - - if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - // Read permission should not be required for delete - $row = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); - - if ($row->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND); - } - - try { - $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $table, $rowId) { - $dbForProject->deleteDocument( - 'database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), - $rowId - ); - }); - } catch (NotFoundException $e) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - // Add $tableId and $databaseId for all rows - $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database) { - $row->setAttribute('$databaseId', $database->getId()); - $row->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processRow($relatedTable, $relation); - } - } - } - }; - - $processRow($table, $row); - - $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), 1); // per collection - - $response->addHeader('X-Debug-Operations', 1); - - $relationships = \array_map( - fn ($document) => $document->getAttribute('key'), - \array_filter( - $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ) - ); - - $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('rowId', $row->getId()) - ->setContext('table', $table) - ->setContext('database', $database) - ->setPayload($response->output($row, Response::MODEL_DOCUMENT), sensitive: $relationships); - - $response->noContent(); - }); - App::get('/v1/databases/usage') ->desc('Get databases usage stats') ->groups(['api', 'database', 'usage']) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php new file mode 100644 index 0000000000..ab40f4d5e1 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php @@ -0,0 +1,314 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/documents') + ->desc('Create row') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].create') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'row.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'rows', + name: 'createRow', + description: '/docs/references/databases/create-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: UtopiaResponse::MODEL_DOCUMENT, + ) + ], + contentType: ContentType::JSON + ) + ]) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('rowId', '', new CustomId(), 'Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define columns before creating rows.') + ->param('data', [], new JSON(), 'Row data as JSON object.') + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->inject('response') + ->inject('dbForProject') + ->inject('user') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $rowId, string $tableId, string|array $data, ?array $permissions, UtopiaResponse $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage): void + { + $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array + + if (empty($data)) { + throw new Exception(Exception::DOCUMENT_MISSING_DATA); + } + + if (isset($data['$id'])) { + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, '$id is not allowed for creating new documents, try update instead'); + } + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); + + if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $allowedPermissions = [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + ]; + + // Map aggregate permissions to into the set of individual permissions they represent. + $permissions = Permission::aggregate($permissions, $allowedPermissions); + + // Add permissions for current the user if none were provided. + if (\is_null($permissions)) { + $permissions = []; + if (!empty($user->getId())) { + foreach ($allowedPermissions as $permission) { + $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); + } + } + } + + // Users can only manage their own roles, API keys and Admin users can manage any + if (!$isAPIKey && !$isPrivilegedUser) { + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + if (!Authorization::isRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', Authorization::getRoles()) . ')'); + } + } + } + } + + $data['$collection'] = $table->getId(); // Adding this param to make API easier for developers + $data['$id'] = $rowId == 'unique()' ? ID::unique() : $rowId; + $data['$permissions'] = $permissions; + $row = new Document($data); + + $operations = 0; + + $checkPermissions = function (Document $table, Document $row, string $permission) use (&$checkPermissions, $dbForProject, $database, &$operations) { + $operations++; + + $documentSecurity = $table->getAttribute('documentSecurity', false); + $validator = new Authorization($permission); + + $valid = $validator->isValid($table->getPermissionsByType($permission)); + if (($permission === Database::PERMISSION_UPDATE && !$documentSecurity) || !$valid) { + throw new Exception(Exception::USER_UNAUTHORIZED); + } + + if ($permission === Database::PERMISSION_UPDATE) { + $valid = $valid || $validator->isValid($row->getUpdate()); + if ($documentSecurity && !$valid) { + throw new Exception(Exception::USER_UNAUTHORIZED); + } + } + + $relationships = \array_filter( + $table->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $row->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + + $isList = \is_array($related) && \array_values($related) === $related; + + if ($isList) { + $relations = $related; + } else { + $relations = [$related]; + } + + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) + ); + + foreach ($relations as &$relation) { + if ( + \is_array($relation) + && \array_values($relation) !== $relation + && !isset($relation['$id']) + ) { + $relation['$id'] = ID::unique(); + $relation = new Document($relation); + } + if ($relation instanceof Document) { + $current = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId(), $relation->getId()) + ); + + if ($current->isEmpty()) { + $type = Database::PERMISSION_CREATE; + + if (isset($relation['$id']) && $relation['$id'] === 'unique()') { + $relation['$id'] = ID::unique(); + } + } else { + $relation->removeAttribute('$collectionId'); + $relation->removeAttribute('$databaseId'); + $relation->setAttribute('$collection', $relatedTable->getId()); + $type = Database::PERMISSION_UPDATE; + } + + $checkPermissions($relatedTable, $relation, $type); + } + } + + if ($isList) { + $row->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + } else { + $row->setAttribute($relationship->getAttribute('key'), \reset($relations)); + } + } + }; + + $checkPermissions($table, $row, Database::PERMISSION_CREATE); + + try { + $row = $dbForProject->createDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $row); + } catch (StructureException $e) { + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); + } catch (DuplicateException) { + throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); + } catch (NotFoundException) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + + // Add $tableId and $databaseId for all rows + $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database) { + $row->setAttribute('$databaseId', $database->getId()); + $row->setAttribute('$collectionId', $table->getId()); + + $relationships = \array_filter( + $table->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $row->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + if (!\is_array($related)) { + $related = [$related]; + } + + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) + ); + + foreach ($related as $relation) { + if ($relation instanceof Document) { + $processRow($relatedTable, $relation); + } + } + } + }; + + $processRow($table, $row); + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) + ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); // per collection + + $response->addHeader('X-Debug-Operations', $operations); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_CREATED) + ->dynamic($row, UtopiaResponse::MODEL_DOCUMENT); + + $relationships = \array_map( + fn ($document) => $document->getAttribute('key'), + \array_filter( + $table->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ) + ); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setParam('tableId', $table->getId()) + ->setParam('rowId', $row->getId()) + ->setContext('table', $table) + ->setContext('database', $database) + ->setPayload($response->getPayload(), sensitive: $relationships); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php new file mode 100644 index 0000000000..61ed961c64 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php @@ -0,0 +1,167 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId') + ->desc('Delete row') + ->groups(['api', 'database']) + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].delete') + ->label('audits.event', 'row.delete') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{request.rowId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: 'databases', + group: 'rows', + name: 'deleteRow', + description: '/docs/references/databases/delete-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('rowId', '', new UID(), 'Row ID.') + ->inject('requestTimestamp') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, string $rowId, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); + + if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + // Read permission should not be required for delete + $row = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); + + if ($row->isEmpty()) { + throw new Exception(Exception::DOCUMENT_NOT_FOUND); + } + + try { + $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $table, $rowId) { + $dbForProject->deleteDocument( + 'database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), + $rowId + ); + }); + } catch (NotFoundException) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + // Add $tableId and $databaseId for all rows + $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database) { + $row->setAttribute('$databaseId', $database->getId()); + $row->setAttribute('$collectionId', $table->getId()); + + $relationships = \array_filter( + $table->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $row->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + if (!\is_array($related)) { + $related = [$related]; + } + + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) + ); + + foreach ($related as $relation) { + if ($relation instanceof Document) { + $processRow($relatedTable, $relation); + } + } + } + }; + + $processRow($table, $row); + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) + ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), 1); // per collection + + $response->addHeader('X-Debug-Operations', 1); + + $relationships = \array_map( + fn ($document) => $document->getAttribute('key'), + \array_filter( + $table->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ) + ); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setParam('tableId', $table->getId()) + ->setParam('rowId', $row->getId()) + ->setContext('table', $table) + ->setContext('database', $database) + ->setPayload($response->output($row, UtopiaResponse::MODEL_DOCUMENT), sensitive: $relationships); + + $response->noContent(); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php new file mode 100644 index 0000000000..a3a484be70 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php @@ -0,0 +1,154 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId') + ->desc('Get row') + ->groups(['api', 'database']) + ->label('scope', 'documents.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'rows', + name: 'getRow', + description: '/docs/references/databases/get-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DOCUMENT, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('rowId', '', new UID(), 'Row ID.') + ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForStatsUsage') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, string $rowId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); + + if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + try { + $queries = Query::parseQueries($queries); + $row = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId, $queries); + } catch (AuthorizationException) { + throw new Exception(Exception::USER_UNAUTHORIZED); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + if ($row->isEmpty()) { + throw new Exception(Exception::DOCUMENT_NOT_FOUND); + } + + $operations = 0; + + // Add $tableId and $databaseId for all rows + $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database, &$operations) { + if ($row->isEmpty()) { + return; + } + + $operations++; + + $row->setAttribute('$databaseId', $database->getId()); + $row->setAttribute('$collectionId', $table->getId()); + + $relationships = \array_filter( + $table->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $row->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + if (\in_array(\gettype($related), ['array', 'object'])) { + $operations++; + } + + continue; + } + + if (!\is_array($related)) { + $related = [$related]; + } + + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) + ); + + foreach ($related as $relation) { + if ($relation instanceof Document) { + $processRow($relatedTable, $relation); + } + } + } + }; + + $processRow($table, $row); + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) + ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); + + $response->addHeader('X-Debug-Operations', $operations); + + $response->dynamic($row, UtopiaResponse::MODEL_DOCUMENT); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php new file mode 100644 index 0000000000..02358be8f2 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php @@ -0,0 +1,159 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/logs') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId/logs') + ->desc('List row logs') + ->groups(['api', 'database']) + ->label('scope', 'documents.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'logs', + name: 'listRowLogs', + description: '/docs/references/databases/get-document-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_LOG_LIST, + ) + ], + contentType: ContentType::JSON, + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Collection ID.') + ->param('rowId', '', new UID(), 'Row ID.') + ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) + ->inject('response') + ->inject('dbForProject') + ->inject('locale') + ->inject('geodb') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, string $rowId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $row = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId); + + if ($row->isEmpty()) { + throw new Exception(Exception::DOCUMENT_NOT_FOUND); + } + + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + // Temp fix for logs + $queries[] = Query::or([ + Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))), + Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))), + ]); + + $audit = new Audit($dbForProject); + $resource = 'database/' . $databaseId . '/table/' . $tableId . '/row/' . $row->getId(); + $logs = $audit->getLogsByResource($resource, $queries); + + $output = []; + + foreach ($logs as $i => &$log) { + $log['userAgent'] = (!empty($log['userAgent'])) ? $log['userAgent'] : 'UNKNOWN'; + + $detector = new Detector($log['userAgent']); + $detector->skipBotDetection(); // OPTIONAL: If called, bot detection will completely be skipped (bots will be detected as regular devices then) + + $os = $detector->getOS(); + $client = $detector->getClient(); + $device = $detector->getDevice(); + + $output[$i] = new Document([ + 'event' => $log['event'], + 'userId' => $log['data']['userId'], + 'userEmail' => $log['data']['userEmail'] ?? null, + 'userName' => $log['data']['userName'] ?? null, + 'mode' => $log['data']['mode'] ?? null, + 'ip' => $log['ip'], + 'time' => $log['time'], + 'osCode' => $os['osCode'], + 'osName' => $os['osName'], + 'osVersion' => $os['osVersion'], + 'clientType' => $client['clientType'], + 'clientCode' => $client['clientCode'], + 'clientName' => $client['clientName'], + 'clientVersion' => $client['clientVersion'], + 'clientEngine' => $client['clientEngine'], + 'clientEngineVersion' => $client['clientEngineVersion'], + 'deviceName' => $device['deviceName'], + 'deviceBrand' => $device['deviceBrand'], + 'deviceModel' => $device['deviceModel'] + ]); + + $record = $geodb->get($log['ip']); + + if ($record) { + $output[$i]['countryCode'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), false) ? \strtolower($record['country']['iso_code']) : '--'; + $output[$i]['countryName'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), $locale->getText('locale.country.unknown')); + } else { + $output[$i]['countryCode'] = '--'; + $output[$i]['countryName'] = $locale->getText('locale.country.unknown'); + } + } + + $response->dynamic(new Document([ + 'total' => $audit->countLogsByResource($resource, $queries), + 'logs' => $output, + ]), UtopiaResponse::MODEL_LOG_LIST); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php new file mode 100644 index 0000000000..bc41118206 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php @@ -0,0 +1,302 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId') + ->desc('Update row') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'row.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: 'databases', + group: 'rows', + name: 'updateRow', + description: '/docs/references/databases/update-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DOCUMENT, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Collection ID.') + ->param('rowId', '', new UID(), 'Row ID.') + ->param('data', [], new JSON(), 'Row data as JSON object. Include only columns and value pairs to be updated.', true) + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->inject('requestTimestamp') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, string $rowId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void + { + + $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array + + if (empty($data) && \is_null($permissions)) { + throw new Exception(Exception::DOCUMENT_MISSING_PAYLOAD); + } + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); + + if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + // Read permission should not be required for update + /** @var Document $row */ + $row = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); + + if ($row->isEmpty()) { + throw new Exception(Exception::DOCUMENT_NOT_FOUND); + } + + // Map aggregate permissions into the multiple permissions they represent. + $permissions = Permission::aggregate($permissions, [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + ]); + + // Users can only manage their own roles, API keys and Admin users can manage any + $roles = Authorization::getRoles(); + if (!$isAPIKey && !$isPrivilegedUser && !\is_null($permissions)) { + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + if (!Authorization::isRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $roles) . ')'); + } + } + } + } + + if (\is_null($permissions)) { + $permissions = $row->getPermissions() ?? []; + } + + $data['$id'] = $rowId; + $data['$permissions'] = $permissions; + $newRow = new Document($data); + + $operations = 0; + + $setTable = (function (Document $collection, Document $document) use (&$setTable, $dbForProject, $database, &$operations) { + + $operations++; + + $relationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + + $isList = \is_array($related) && \array_values($related) === $related; + + if ($isList) { + $relations = $related; + } else { + $relations = [$related]; + } + + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) + ); + + foreach ($relations as &$relation) { + // If the relation is an array it can be either update or create a child document. + if ( + \is_array($relation) + && \array_values($relation) !== $relation + && !isset($relation['$id']) + ) { + $relation['$id'] = ID::unique(); + $relation = new Document($relation); + } + if ($relation instanceof Document) { + $oldRow = Authorization::skip(fn () => $dbForProject->getDocument( + 'database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId(), + $relation->getId() + )); + $relation->removeAttribute('$collectionId'); + $relation->removeAttribute('$databaseId'); + // Attribute $collection is required for Utopia. + $relation->setAttribute( + '$collection', + 'database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId() + ); + + if ($oldRow->isEmpty()) { + if (isset($relation['$id']) && $relation['$id'] === 'unique()') { + $relation['$id'] = ID::unique(); + } + } + $setTable($relatedTable, $relation); + } + } + + if ($isList) { + $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + } else { + $document->setAttribute($relationship->getAttribute('key'), \reset($relations)); + } + } + }); + + $setTable($table, $newRow); + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) + ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); + + $response->addHeader('X-Debug-Operations', $operations); + + try { + $row = $dbForProject->withRequestTimestamp( + $requestTimestamp, + fn () => $dbForProject->updateDocument( + 'database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), + $row->getId(), + $newRow + ) + ); + } catch (AuthorizationException) { + throw new Exception(Exception::USER_UNAUTHORIZED); + } catch (DuplicateException) { + throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); + } catch (StructureException $e) { + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); + } catch (NotFoundException) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + // Add $tableId and $databaseId for all rows + $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database) { + $row->setAttribute('$databaseId', $database->getId()); + $row->setAttribute('$collectionId', $table->getId()); + + $relationships = \array_filter( + $table->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $row->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + if (!\is_array($related)) { + $related = [$related]; + } + + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) + ); + + foreach ($related as $relation) { + if ($relation instanceof Document) { + $processRow($relatedTable, $relation); + } + } + } + }; + + $processRow($table, $row); + + $response->dynamic($row, UtopiaResponse::MODEL_DOCUMENT); + + $relationships = \array_map( + fn ($document) => $document->getAttribute('key'), + \array_filter( + $table->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ) + ); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setParam('tableId', $table->getId()) + ->setParam('rowId', $row->getId()) + ->setContext('table', $table) + ->setContext('database', $database) + ->setPayload($response->getPayload(), sensitive: $relationships); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php new file mode 100644 index 0000000000..b27930405f --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php @@ -0,0 +1,223 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/documents') + ->desc('List rows') + ->groups(['api', 'database']) + ->label('scope', 'documents.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'rows', + name: 'listRows', + description: '/docs/references/databases/list-documents.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DOCUMENT_LIST, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForStatsUsage') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); + + if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + /** + * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries + */ + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); + }); + + $cursor = \reset($cursor); + + if ($cursor) { + $validator = new Cursor(); + if (!$validator->isValid($cursor)) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); + } + + $rowId = $cursor->getValue(); + + $cursorRow = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); + + if ($cursorRow->isEmpty()) { + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Row '{$rowId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorRow); + } + try { + $rows = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $queries); + $total = $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $queries, APP_LIMIT_COUNT); + } catch (OrderException $e) { + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); + } + + $operations = 0; + + // Add $tableId and $databaseId for all rows + $processRow = (function (Document $table, Document $row) use (&$processRow, $dbForProject, $database, &$operations): bool { + if ($row->isEmpty()) { + return false; + } + + $operations++; + + $row->removeAttribute('$collection'); + $row->setAttribute('$databaseId', $database->getId()); + $row->setAttribute('$collectionId', $table->getId()); + + $relationships = \array_filter( + $table->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $row->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + if (\in_array(\gettype($related), ['array', 'object'])) { + $operations++; + } + + continue; + } + + if (!\is_array($related)) { + $relations = [$related]; + } else { + $relations = $related; + } + + $relatedTableId = $relationship->getAttribute('relatedCollection'); + // todo: Use local cache for this getDocument + $relatedTable = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId)); + + foreach ($relations as $index => $doc) { + if ($doc instanceof Document) { + if (!$processRow($relatedTable, $doc)) { + unset($relations[$index]); + } + } + } + + if (\is_array($related)) { + $row->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + } elseif (empty($relations)) { + $row->setAttribute($relationship->getAttribute('key'), null); + } + } + + return true; + }); + + foreach ($rows as $row) { + $processRow($table, $row); + } + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) + ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); + + $response->addHeader('X-Debug-Operations', $operations); + + $select = \array_reduce($queries, function ($result, $query) { + return $result || ($query->getMethod() === Query::TYPE_SELECT); + }, false); + + // Check if the SELECT query includes $databaseId and $collectionId + $hasDatabaseId = false; + $hasTableId = false; + if ($select) { + $hasDatabaseId = \array_reduce($queries, function ($result, $query) { + return $result || ($query->getMethod() === Query::TYPE_SELECT && \in_array('$databaseId', $query->getValues())); + }, false); + $hasTableId = \array_reduce($queries, function ($result, $query) { + return $result || ($query->getMethod() === Query::TYPE_SELECT && \in_array('$collectionId', $query->getValues())); + }, false); + } + + if ($select) { + foreach ($rows as $row) { + if (!$hasDatabaseId) { + $row->removeAttribute('$databaseId'); + } + if (!$hasTableId) { + $row->removeAttribute('$collectionId'); + } + } + } + + $response->dynamic(new Document([ + 'total' => $total, + 'documents' => $rows, + ]), UtopiaResponse::MODEL_DOCUMENT_LIST); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Http.php b/src/Appwrite/Platform/Modules/Databases/Services/Http.php index 045dc6ff42..17dd715906 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Http.php @@ -35,6 +35,12 @@ use Appwrite\Platform\Modules\Databases\Http\Indexes\Create as CreateIndex; use Appwrite\Platform\Modules\Databases\Http\Indexes\Delete as DeleteIndex; use Appwrite\Platform\Modules\Databases\Http\Indexes\Get as GetIndex; use Appwrite\Platform\Modules\Databases\Http\Indexes\XList as ListIndexes; +use Appwrite\Platform\Modules\Databases\Http\Rows\Create as CreateRow; +use Appwrite\Platform\Modules\Databases\Http\Rows\Delete as DeleteRow; +use Appwrite\Platform\Modules\Databases\Http\Rows\Get as GetRow; +use Appwrite\Platform\Modules\Databases\Http\Rows\Logs\XList as ListRowLogs; +use Appwrite\Platform\Modules\Databases\Http\Rows\Update as UpdateRow; +use Appwrite\Platform\Modules\Databases\Http\Rows\XList as ListRows; use Appwrite\Platform\Modules\Databases\Http\Tables\Create as CreateTable; use Appwrite\Platform\Modules\Databases\Http\Tables\Delete as DeleteTable; use Appwrite\Platform\Modules\Databases\Http\Tables\Get as GetTable; @@ -134,6 +140,11 @@ class Http extends Service private function registerRowActions(): void { - + $this->addAction(CreateRow::getName(), new CreateRow()); + $this->addAction(GetRow::getName(), new GetRow()); + $this->addAction(UpdateRow::getName(), new UpdateRow()); + $this->addAction(DeleteRow::getName(), new DeleteRow()); + $this->addAction(ListRows::getName(), new ListRows()); + $this->addAction(ListRowLogs::getName(), new ListRowLogs()); } } From 4cd8f49f829aa2612ccfff40884f744f4fa2e078 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 18:09:39 +0530 Subject: [PATCH 018/362] add: usage. --- .../Databases/Http/Databases/Usage/Get.php | 138 ++++++++++++++++++ .../Databases/Http/Databases/Usage/XList.php | 132 +++++++++++++++++ .../Databases/Http/Tables/Usage/Get.php | 131 +++++++++++++++++ .../Modules/Databases/Services/Http.php | 6 + 4 files changed, 407 insertions(+) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php new file mode 100644 index 0000000000..c4105effa0 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -0,0 +1,138 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/usage') + ->desc('Get database usage stats') + ->groups(['api', 'database', 'usage']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: null, + name: 'getUsage', + description: '/docs/references/databases/get-database-usage.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_USAGE_DATABASE, + ) + ], + contentType: ContentType::JSON, + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $range, UtopiaResponse $response, Database $dbForProject): void + { + $database = $dbForProject->getDocument('databases', $databaseId); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS), + str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS), + str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_STORAGE), + str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASES_OPERATIONS_READS), + str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASES_OPERATIONS_WRITES) + ]; + + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $result = $dbForProject->findOne('stats', [ + Query::equal('metric', [$metric]), + Query::equal('period', ['inf']) + ]); + + $stats[$metric]['total'] = $result['value'] ?? 0; + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('metric', [$metric]), + Query::equal('period', [$period]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric]['data'] = []; + foreach ($results as $result) { + $stats[$metric]['data'][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); + + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; + + foreach ($metrics as $metric) { + $usage[$metric]['total'] = $stats[$metric]['total']; + $usage[$metric]['data'] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric]['data'][] = [ + 'value' => $stats[$metric]['data'][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + } + + $response->dynamic(new Document([ + 'range' => $range, + 'collectionsTotal' => $usage[$metrics[0]]['total'], + 'documentsTotal' => $usage[$metrics[1]]['total'], + 'storageTotal' => $usage[$metrics[2]]['total'], + 'databaseReadsTotal' => $usage[$metrics[3]]['total'], + 'databaseWritesTotal' => $usage[$metrics[4]]['total'], + 'collections' => $usage[$metrics[0]]['data'], + 'documents' => $usage[$metrics[1]]['data'], + 'storage' => $usage[$metrics[2]]['data'], + 'databaseReads' => $usage[$metrics[3]]['data'], + 'databaseWrites' => $usage[$metrics[4]]['data'], + ]), UtopiaResponse::MODEL_USAGE_DATABASE); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php new file mode 100644 index 0000000000..0078d54a4b --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -0,0 +1,132 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/usage') + ->desc('Get databases usage stats') + ->groups(['api', 'database', 'usage']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: null, + name: 'listUsages', + description: '/docs/references/databases/get-usage.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_USAGE_DATABASES, + ) + ], + contentType: ContentType::JSON + )) + ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $range, UtopiaResponse $response, Database $dbForProject): void + { + + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + METRIC_DATABASES, + METRIC_COLLECTIONS, + METRIC_DOCUMENTS, + METRIC_DATABASES_STORAGE, + METRIC_DATABASES_OPERATIONS_READS, + METRIC_DATABASES_OPERATIONS_WRITES, + ]; + + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $result = $dbForProject->findOne('stats', [ + Query::equal('metric', [$metric]), + Query::equal('period', ['inf']) + ]); + + $stats[$metric]['total'] = $result['value'] ?? 0; + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('metric', [$metric]), + Query::equal('period', [$period]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric]['data'] = []; + foreach ($results as $result) { + $stats[$metric]['data'][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); + + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; + + foreach ($metrics as $metric) { + $usage[$metric]['total'] = $stats[$metric]['total']; + $usage[$metric]['data'] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric]['data'][] = [ + 'value' => $stats[$metric]['data'][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + } + $response->dynamic(new Document([ + 'range' => $range, + 'databasesTotal' => $usage[$metrics[0]]['total'], + 'collectionsTotal' => $usage[$metrics[1]]['total'], + 'documentsTotal' => $usage[$metrics[2]]['total'], + 'storageTotal' => $usage[$metrics[3]]['total'], + 'databasesReadsTotal' => $usage[$metrics[4]]['total'], + 'databasesWritesTotal' => $usage[$metrics[5]]['total'], + 'databases' => $usage[$metrics[0]]['data'], + 'collections' => $usage[$metrics[1]]['data'], + 'documents' => $usage[$metrics[2]]['data'], + 'storage' => $usage[$metrics[3]]['data'], + 'databasesReads' => $usage[$metrics[4]]['data'], + 'databasesWrites' => $usage[$metrics[5]]['data'], + ]), UtopiaResponse::MODEL_USAGE_DATABASES); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php new file mode 100644 index 0000000000..3943c27618 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php @@ -0,0 +1,131 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/usage') + ->httpAlias('/v1/databases/:databaseId/collections/:tableId/usage') + ->desc('Get table usage stats') + ->groups(['api', 'database', 'usage']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: null, + name: 'getTableUsage', + description: '/docs/references/databases/get-collection-usage.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_USAGE_COLLECTION, + ) + ], + contentType: ContentType::JSON, + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) + ->param('tableId', '', new UID(), 'Collection ID.') + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $range, string $tableId, UtopiaResponse $response, Database $dbForProject): void + { + + $database = $dbForProject->getDocument('databases', $databaseId); + $tableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $tableDocument->getInternalId()); + + if ($table->isEmpty()) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getInternalId(), $tableDocument->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), + ]; + + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $result = $dbForProject->findOne('stats', [ + Query::equal('metric', [$metric]), + Query::equal('period', ['inf']) + ]); + + $stats[$metric]['total'] = $result['value'] ?? 0; + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('metric', [$metric]), + Query::equal('period', [$period]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric]['data'] = []; + foreach ($results as $result) { + $stats[$metric]['data'][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); + + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; + + foreach ($metrics as $metric) { + $usage[$metric]['total'] = $stats[$metric]['total']; + $usage[$metric]['data'] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric]['data'][] = [ + 'value' => $stats[$metric]['data'][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + } + + $response->dynamic(new Document([ + 'range' => $range, + 'documentsTotal' => $usage[$metrics[0]]['total'], + 'documents' => $usage[$metrics[0]]['data'], + ]), UtopiaResponse::MODEL_USAGE_COLLECTION); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Http.php b/src/Appwrite/Platform/Modules/Databases/Services/Http.php index 17dd715906..ffdd4f1903 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Http.php @@ -30,6 +30,8 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Delete as DeleteDatabase; use Appwrite\Platform\Modules\Databases\Http\Databases\Get as GetDatabase; use Appwrite\Platform\Modules\Databases\Http\Databases\Logs\XList as ListDatabaseLogs; use Appwrite\Platform\Modules\Databases\Http\Databases\Update as UpdateDatabase; +use Appwrite\Platform\Modules\Databases\Http\Databases\Usage\Get as GetDatabaseUsage; +use Appwrite\Platform\Modules\Databases\Http\Databases\Usage\XList as ListDatabaseUsage; use Appwrite\Platform\Modules\Databases\Http\Databases\XList as ListDatabases; use Appwrite\Platform\Modules\Databases\Http\Indexes\Create as CreateIndex; use Appwrite\Platform\Modules\Databases\Http\Indexes\Delete as DeleteIndex; @@ -46,6 +48,7 @@ use Appwrite\Platform\Modules\Databases\Http\Tables\Delete as DeleteTable; use Appwrite\Platform\Modules\Databases\Http\Tables\Get as GetTable; use Appwrite\Platform\Modules\Databases\Http\Tables\Logs\XList as ListTableLogs; use Appwrite\Platform\Modules\Databases\Http\Tables\Update as UpdateTable; +use Appwrite\Platform\Modules\Databases\Http\Tables\Usage\Get as GetTableUsage; use Appwrite\Platform\Modules\Databases\Http\Tables\XList as ListTables; use Utopia\Platform\Service; @@ -70,6 +73,8 @@ class Http extends Service $this->addAction(DeleteDatabase::getName(), new DeleteDatabase()); $this->addAction(ListDatabases::getName(), new ListDatabases()); $this->addAction(ListDatabaseLogs::getName(), new ListDatabaseLogs()); + $this->addAction(GetDatabaseUsage::getName(), new GetDatabaseUsage()); + $this->addAction(ListDatabaseUsage::getName(), new ListDatabaseUsage()); } private function registerTableActions(): void @@ -80,6 +85,7 @@ class Http extends Service $this->addAction(DeleteTable::getName(), new DeleteTable()); $this->addAction(ListTables::getName(), new ListTables()); $this->addAction(ListTableLogs::getName(), new ListTableLogs()); + $this->addAction(GetTableUsage::getName(), new GetTableUsage()); } private function registerColumnActions(): void From 57a9218649a3185581943e7f2e17c16a612fa5f4 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 18:10:09 +0530 Subject: [PATCH 019/362] =?UTF-8?q?remove:=20database=20controller=20?= =?UTF-8?q?=F0=9F=91=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/databases.php | 306 ------------------------------ 1 file changed, 306 deletions(-) delete mode 100644 app/controllers/api/databases.php diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php deleted file mode 100644 index 1f18d2fa1e..0000000000 --- a/app/controllers/api/databases.php +++ /dev/null @@ -1,306 +0,0 @@ -desc('Get databases usage stats') - ->groups(['api', 'database', 'usage']) - ->label('scope', 'collections.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: null, - name: 'getUsage', - description: '/docs/references/databases/get-usage.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_USAGE_DATABASES, - ) - ], - contentType: ContentType::JSON - )) - ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), '`Date range.', true) - ->inject('response') - ->inject('dbForProject') - ->action(function (string $range, Response $response, Database $dbForProject) { - - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - METRIC_DATABASES, - METRIC_COLLECTIONS, - METRIC_DOCUMENTS, - METRIC_DATABASES_STORAGE, - METRIC_DATABASES_OPERATIONS_READS, - METRIC_DATABASES_OPERATIONS_WRITES, - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $result = $dbForProject->findOne('stats', [ - Query::equal('metric', [$metric]), - Query::equal('period', ['inf']) - ]); - - $stats[$metric]['total'] = $result['value'] ?? 0; - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('metric', [$metric]), - Query::equal('period', [$period]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric]['data'] = []; - foreach ($results as $result) { - $stats[$metric]['data'][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric]['total'] = $stats[$metric]['total']; - $usage[$metric]['data'] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric]['data'][] = [ - 'value' => $stats[$metric]['data'][$formatDate]['value'] ?? 0, - 'date' => $formatDate, - ]; - } - } - $response->dynamic(new Document([ - 'range' => $range, - 'databasesTotal' => $usage[$metrics[0]]['total'], - 'collectionsTotal' => $usage[$metrics[1]]['total'], - 'documentsTotal' => $usage[$metrics[2]]['total'], - 'storageTotal' => $usage[$metrics[3]]['total'], - 'databasesReadsTotal' => $usage[$metrics[4]]['total'], - 'databasesWritesTotal' => $usage[$metrics[5]]['total'], - 'databases' => $usage[$metrics[0]]['data'], - 'collections' => $usage[$metrics[1]]['data'], - 'documents' => $usage[$metrics[2]]['data'], - 'storage' => $usage[$metrics[3]]['data'], - 'databasesReads' => $usage[$metrics[4]]['data'], - 'databasesWrites' => $usage[$metrics[5]]['data'], - ]), Response::MODEL_USAGE_DATABASES); - }); - -App::get('/v1/databases/:databaseId/usage') - ->desc('Get database usage stats') - ->groups(['api', 'database', 'usage']) - ->label('scope', 'collections.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: null, - name: 'getDatabaseUsage', - description: '/docs/references/databases/get-database-usage.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_USAGE_DATABASE, - ) - ], - contentType: ContentType::JSON, - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), '`Date range.', true) - ->inject('response') - ->inject('dbForProject') - ->action(function (string $databaseId, string $range, Response $response, Database $dbForProject) { - - $database = $dbForProject->getDocument('databases', $databaseId); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS), - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS), - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_STORAGE), - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASES_OPERATIONS_READS), - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASES_OPERATIONS_WRITES) - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $result = $dbForProject->findOne('stats', [ - Query::equal('metric', [$metric]), - Query::equal('period', ['inf']) - ]); - - $stats[$metric]['total'] = $result['value'] ?? 0; - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('metric', [$metric]), - Query::equal('period', [$period]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric]['data'] = []; - foreach ($results as $result) { - $stats[$metric]['data'][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric]['total'] = $stats[$metric]['total']; - $usage[$metric]['data'] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric]['data'][] = [ - 'value' => $stats[$metric]['data'][$formatDate]['value'] ?? 0, - 'date' => $formatDate, - ]; - } - } - - $response->dynamic(new Document([ - 'range' => $range, - 'collectionsTotal' => $usage[$metrics[0]]['total'], - 'documentsTotal' => $usage[$metrics[1]]['total'], - 'storageTotal' => $usage[$metrics[2]]['total'], - 'databaseReadsTotal' => $usage[$metrics[3]]['total'], - 'databaseWritesTotal' => $usage[$metrics[4]]['total'], - 'collections' => $usage[$metrics[0]]['data'], - 'documents' => $usage[$metrics[1]]['data'], - 'storage' => $usage[$metrics[2]]['data'], - 'databaseReads' => $usage[$metrics[3]]['data'], - 'databaseWrites' => $usage[$metrics[4]]['data'], - ]), Response::MODEL_USAGE_DATABASE); - }); - -App::get('/v1/databases/:databaseId/tables/:tableId/usage') - ->alias('/v1/databases/:databaseId/collections/:tableId/usage') - ->desc('Get table usage stats') - ->groups(['api', 'database', 'usage']) - ->label('scope', 'collections.read') - ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( - namespace: 'databases', - group: null, - name: 'getTableUsage', - description: '/docs/references/databases/get-collection-usage.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_USAGE_COLLECTION, - ) - ], - contentType: ContentType::JSON, - )) - ->param('databaseId', '', new UID(), 'Database ID.') - ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) - ->param('tableId', '', new UID(), 'Collection ID.') - ->inject('response') - ->inject('dbForProject') - ->action(function (string $databaseId, string $range, string $tableId, Response $response, Database $dbForProject) { - - $database = $dbForProject->getDocument('databases', $databaseId); - $tableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $tableDocument->getInternalId()); - - if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); - } - - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getInternalId(), $tableDocument->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $result = $dbForProject->findOne('stats', [ - Query::equal('metric', [$metric]), - Query::equal('period', ['inf']) - ]); - - $stats[$metric]['total'] = $result['value'] ?? 0; - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('metric', [$metric]), - Query::equal('period', [$period]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric]['data'] = []; - foreach ($results as $result) { - $stats[$metric]['data'][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric]['total'] = $stats[$metric]['total']; - $usage[$metric]['data'] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric]['data'][] = [ - 'value' => $stats[$metric]['data'][$formatDate]['value'] ?? 0, - 'date' => $formatDate, - ]; - } - } - - $response->dynamic(new Document([ - 'range' => $range, - 'documentsTotal' => $usage[$metrics[0]]['total'], - 'documents' => $usage[$metrics[0]]['data'], - ]), Response::MODEL_USAGE_COLLECTION); - }); From ad16bd281e18c0a767c53560b181a4cf0e5933c8 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 18:16:08 +0530 Subject: [PATCH 020/362] add: database module to platform registry. --- src/Appwrite/Platform/Appwrite.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Appwrite/Platform/Appwrite.php b/src/Appwrite/Platform/Appwrite.php index ae3d4d6646..b2a92fcc00 100644 --- a/src/Appwrite/Platform/Appwrite.php +++ b/src/Appwrite/Platform/Appwrite.php @@ -4,6 +4,7 @@ namespace Appwrite\Platform; use Appwrite\Platform\Modules\Console; use Appwrite\Platform\Modules\Core; +use Appwrite\Platform\Modules\Databases; use Appwrite\Platform\Modules\Functions; use Appwrite\Platform\Modules\Projects; use Appwrite\Platform\Modules\Proxy; @@ -16,6 +17,7 @@ class Appwrite extends Platform public function __construct() { parent::__construct(new Core()); + $this->addModule(new Databases\Module()); $this->addModule(new Projects\Module()); $this->addModule(new Functions\Module()); $this->addModule(new Sites\Module()); From 6fac164d4646e5e51c872412218ea1a1f29826df Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 18:18:28 +0530 Subject: [PATCH 021/362] update: keep message same. --- .../Modules/Databases/Http/Columns/Relationship/Create.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php index 32cb235b62..09efdd14f9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php @@ -128,7 +128,7 @@ class Create extends ColumnAction \strtolower($column->getAttribute('options')['twoWayKey']) === \strtolower($twoWayKey) && $column->getAttribute('options')['relatedCollection'] === $relatedTable->getId() ) { - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Attribute with the requested key already exists. Attribute keys must be unique.'); + throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.'); } if ( From 2554adb41e1eef549ee8abc1b5efd1a5127ca81b Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 18:29:11 +0530 Subject: [PATCH 022/362] update: error messages. --- .../Platform/Modules/Databases/Http/Columns/Float/Create.php | 2 +- .../Modules/Databases/Http/Columns/Relationship/Create.php | 2 +- .../Platform/Modules/Databases/Http/Databases/XList.php | 2 +- src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php | 2 +- src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php index 0782f8eb29..b8f13d481b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php @@ -91,7 +91,7 @@ class Create extends ColumnAction $max ??= INF; if ($min > $max) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum must be less than or equal to maximum'); + throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); } $validator = new Range($min, $max, Database::VAR_FLOAT); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php index 09efdd14f9..f5806b6d8c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php @@ -136,7 +136,7 @@ class Create extends ColumnAction $column->getAttribute('options')['relationType'] === Database::RELATION_MANY_TO_MANY && $column->getAttribute('options')['relatedCollection'] === $relatedTable->getId() ) { - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Only one "manyToMany" relationship per table is allowed.'); + throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Creating more than one "manyToMany" relationship on the same table is currently not permitted.'); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php index 7453fb39f4..1fd0967b37 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -97,7 +97,7 @@ class XList extends Action $databases = $dbForProject->find('databases', $queries); $total = $dbForProject->count('databases', $filterQueries, APP_LIMIT_COUNT); } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); } $response->dynamic(new Document([ 'databases' => $databases, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php index ab40f4d5e1..215ee94550 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php @@ -91,7 +91,7 @@ class Create extends Action } if (isset($data['$id'])) { - throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, '$id is not allowed for creating new documents, try update instead'); + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, '$id is not allowed for creating new rows, try update instead'); } $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php index d75150f2bb..85474840df 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php @@ -106,7 +106,7 @@ class XList extends Action $tables = $dbForProject->find('database_' . $database->getInternalId(), $queries); $total = $dbForProject->count('database_' . $database->getInternalId(), $filterQueries, APP_LIMIT_COUNT); } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); } $response->dynamic(new Document([ From e0a4c698bc24505b508bd5e42f5d686b136f4607 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 18:43:32 +0530 Subject: [PATCH 023/362] fix: `float` column creation! --- .../Platform/Modules/Databases/Http/Columns/Float/Create.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php index b8f13d481b..088eef0b39 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php @@ -87,8 +87,8 @@ class Create extends ColumnAction EventDatabase $queueForDatabase, Event $queueForEvents ): void { - $min ??= -INF; - $max ??= INF; + $min ??= -PHP_FLOAT_MAX; + $max ??= PHP_FLOAT_MAX; if ($min > $max) { throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); From d184d1c7b163f53764893e9d3857865b78417d38 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sun, 4 May 2025 18:50:24 +0530 Subject: [PATCH 024/362] fix: lint! --- .../Platform/Modules/Databases/Http/Columns/Float/Create.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php index 088eef0b39..28e671fb72 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php @@ -2,8 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Float; -use const INF; - use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Extend\Exception; From 8504fbc0b93eb2802d8ae0fb1bfa68c97f61ddbe Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 09:14:20 +0530 Subject: [PATCH 025/362] update: `collection` response model to `table`. --- src/Appwrite/Utopia/Response.php | 12 ++++----- .../Utopia/Response/Model/BaseList.php | 6 ++--- .../Model/{Collection.php => Table.php} | 26 +++++++++---------- 3 files changed, 22 insertions(+), 22 deletions(-) rename src/Appwrite/Utopia/Response/Model/{Collection.php => Table.php} (77%) diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 3d69ac1291..ad2e7ad9b8 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -31,7 +31,7 @@ use Appwrite\Utopia\Response\Model\AuthProvider; use Appwrite\Utopia\Response\Model\BaseList; use Appwrite\Utopia\Response\Model\Branch; use Appwrite\Utopia\Response\Model\Bucket; -use Appwrite\Utopia\Response\Model\Collection; +use Appwrite\Utopia\Response\Model\Table; use Appwrite\Utopia\Response\Model\ConsoleVariables; use Appwrite\Utopia\Response\Model\Continent; use Appwrite\Utopia\Response\Model\Country; @@ -160,8 +160,8 @@ class Response extends SwooleResponse // Database public const MODEL_DATABASE = 'database'; public const MODEL_DATABASE_LIST = 'databaseList'; - public const MODEL_COLLECTION = 'collection'; - public const MODEL_COLLECTION_LIST = 'collectionList'; + public const MODEL_TABLE = 'table'; + public const MODEL_TABLE_LIST = 'tableList'; public const MODEL_INDEX = 'index'; public const MODEL_INDEX_LIST = 'indexList'; public const MODEL_DOCUMENT = 'document'; @@ -376,8 +376,8 @@ class Response extends SwooleResponse ->setModel(new Error()) ->setModel(new ErrorDev()) // Lists - ->setModel(new BaseList('Documents List', self::MODEL_DOCUMENT_LIST, 'documents', self::MODEL_DOCUMENT)) - ->setModel(new BaseList('Collections List', self::MODEL_COLLECTION_LIST, 'collections', self::MODEL_COLLECTION)) + ->setModel(new BaseList('Rows List', self::MODEL_DOCUMENT_LIST, 'rows', self::MODEL_DOCUMENT)) + ->setModel(new BaseList('Tables List', self::MODEL_TABLE_LIST, 'tables', self::MODEL_TABLE)) ->setModel(new BaseList('Databases List', self::MODEL_DATABASE_LIST, 'databases', self::MODEL_DATABASE)) ->setModel(new BaseList('Indexes List', self::MODEL_INDEX_LIST, 'indexes', self::MODEL_INDEX)) ->setModel(new BaseList('Users List', self::MODEL_USER_LIST, 'users', self::MODEL_USER)) @@ -428,7 +428,7 @@ class Response extends SwooleResponse ->setModel(new BaseList('VCS Content List', self::MODEL_VCS_CONTENT_LIST, 'contents', self::MODEL_VCS_CONTENT)) // Entities ->setModel(new Database()) - ->setModel(new Collection()) + ->setModel(new Table()) ->setModel(new Attribute()) ->setModel(new AttributeList()) ->setModel(new AttributeString()) diff --git a/src/Appwrite/Utopia/Response/Model/BaseList.php b/src/Appwrite/Utopia/Response/Model/BaseList.php index d4ba6b0ab7..1fa3197ba7 100644 --- a/src/Appwrite/Utopia/Response/Model/BaseList.php +++ b/src/Appwrite/Utopia/Response/Model/BaseList.php @@ -32,15 +32,15 @@ class BaseList extends Model if ($paging) { $namesWithCap = [ - 'documents', 'collections', 'users', 'files', 'buckets', 'functions', + 'rows', 'tables', 'users', 'files', 'buckets', 'functions', 'deployments', 'executions', 'projects', 'webhooks', 'keys', 'platforms', 'rules', 'memberships', 'teams' ]; if (\in_array($name, $namesWithCap)) { - $description = 'Total number of ' . $key . ' documents that matched your query used as reference for offset pagination. When the `total` number of ' . $key . ' documents available is greater than 5000, total returned will be capped at 5000, and cursor pagination should be used. Read more about [pagination](https://appwrite.io/docs/pagination).'; + $description = 'Total number of ' . $key . ' rows that matched your query used as reference for offset pagination. When the `total` number of ' . $key . ' rows available is greater than 5000, total returned will be capped at 5000, and cursor pagination should be used. Read more about [pagination](https://appwrite.io/docs/pagination).'; } else { - $description = 'Total number of ' . $key . ' documents that matched your query.'; + $description = 'Total number of ' . $key . ' rows that matched your query.'; } $this->addRule('total', [ diff --git a/src/Appwrite/Utopia/Response/Model/Collection.php b/src/Appwrite/Utopia/Response/Model/Table.php similarity index 77% rename from src/Appwrite/Utopia/Response/Model/Collection.php rename to src/Appwrite/Utopia/Response/Model/Table.php index 2c2bf0cca8..305f1db3c9 100644 --- a/src/Appwrite/Utopia/Response/Model/Collection.php +++ b/src/Appwrite/Utopia/Response/Model/Table.php @@ -5,32 +5,32 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; -class Collection extends Model +class Table extends Model { public function __construct() { $this ->addRule('$id', [ 'type' => self::TYPE_STRING, - 'description' => 'Collection ID.', + 'description' => 'Table ID.', 'default' => '', 'example' => '5e5ea5c16897e', ]) ->addRule('$createdAt', [ 'type' => self::TYPE_DATETIME, - 'description' => 'Collection creation date in ISO 8601 format.', + 'description' => 'Table creation date in ISO 8601 format.', 'default' => '', 'example' => self::TYPE_DATETIME_EXAMPLE, ]) ->addRule('$updatedAt', [ 'type' => self::TYPE_DATETIME, - 'description' => 'Collection update date in ISO 8601 format.', + 'description' => 'Table update date in ISO 8601 format.', 'default' => '', 'example' => self::TYPE_DATETIME_EXAMPLE, ]) ->addRule('$permissions', [ 'type' => self::TYPE_STRING, - 'description' => 'Collection permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', + 'description' => 'Table permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', 'default' => '', 'example' => ['read("any")'], 'array' => true @@ -43,13 +43,13 @@ class Collection extends Model ]) ->addRule('name', [ 'type' => self::TYPE_STRING, - 'description' => 'Collection name.', + 'description' => 'Table name.', 'default' => '', - 'example' => 'My Collection', + 'example' => 'My Table', ]) ->addRule('enabled', [ 'type' => self::TYPE_BOOLEAN, - 'description' => 'Collection enabled. Can be \'enabled\' or \'disabled\'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.', + 'description' => 'Table enabled. Can be \'enabled\' or \'disabled\'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.', 'default' => true, 'example' => false, ]) @@ -59,7 +59,7 @@ class Collection extends Model 'default' => '', 'example' => true, ]) - ->addRule('attributes', [ + ->addRule('columns', [ 'type' => [ Response::MODEL_ATTRIBUTE_BOOLEAN, Response::MODEL_ATTRIBUTE_INTEGER, @@ -72,14 +72,14 @@ class Collection extends Model Response::MODEL_ATTRIBUTE_RELATIONSHIP, Response::MODEL_ATTRIBUTE_STRING, // needs to be last, since its condition would dominate any other string attribute ], - 'description' => 'Collection attributes.', + 'description' => 'Table columns.', 'default' => [], 'example' => new \stdClass(), 'array' => true, ]) ->addRule('indexes', [ 'type' => Response::MODEL_INDEX, - 'description' => 'Collection indexes.', + 'description' => 'Table indexes.', 'default' => [], 'example' => new \stdClass(), 'array' => true @@ -94,7 +94,7 @@ class Collection extends Model */ public function getName(): string { - return 'Collection'; + return 'Table'; } /** @@ -104,6 +104,6 @@ class Collection extends Model */ public function getType(): string { - return Response::MODEL_COLLECTION; + return Response::MODEL_TABLE; } } From 675d404b9b1c4bf9724a3bf4f715b9bb3544e296 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 09:30:27 +0530 Subject: [PATCH 026/362] update: `attribute*` response model to `column*`. --- app/config/events.php | 2 +- .../Databases/Http/Columns/Boolean/Create.php | 4 +- .../Databases/Http/Columns/Boolean/Update.php | 4 +- .../Http/Columns/Datetime/Create.php | 4 +- .../Http/Columns/Datetime/Update.php | 4 +- .../Modules/Databases/Http/Columns/Delete.php | 22 +++--- .../Databases/Http/Columns/Email/Create.php | 4 +- .../Databases/Http/Columns/Email/Update.php | 4 +- .../Databases/Http/Columns/Enum/Create.php | 4 +- .../Databases/Http/Columns/Enum/Update.php | 4 +- .../Databases/Http/Columns/Float/Create.php | 4 +- .../Databases/Http/Columns/Float/Update.php | 4 +- .../Modules/Databases/Http/Columns/Get.php | 42 +++++----- .../Databases/Http/Columns/IP/Create.php | 4 +- .../Databases/Http/Columns/IP/Update.php | 4 +- .../Databases/Http/Columns/Integer/Create.php | 4 +- .../Databases/Http/Columns/Integer/Update.php | 4 +- .../Http/Columns/Relationship/Create.php | 4 +- .../Http/Columns/Relationship/Update.php | 4 +- .../Databases/Http/Columns/String/Create.php | 4 +- .../Databases/Http/Columns/String/Update.php | 4 +- .../Databases/Http/Columns/URL/Create.php | 4 +- .../Databases/Http/Columns/URL/Update.php | 4 +- .../Modules/Databases/Http/Columns/XList.php | 4 +- src/Appwrite/Utopia/Response.php | 78 +++++++++---------- .../Utopia/Response/Model/AttributeList.php | 58 -------------- .../Model/{Attribute.php => Column.php} | 22 +++--- ...AttributeBoolean.php => ColumnBoolean.php} | 10 +-- ...tributeDatetime.php => ColumnDatetime.php} | 10 +-- .../{AttributeEmail.php => ColumnEmail.php} | 10 +-- .../{AttributeEnum.php => ColumnEnum.php} | 10 +-- .../{AttributeFloat.php => ColumnFloat.php} | 10 +-- .../Model/{AttributeIP.php => ColumnIP.php} | 10 +-- ...AttributeInteger.php => ColumnInteger.php} | 10 +-- .../Utopia/Response/Model/ColumnList.php | 58 ++++++++++++++ ...elationship.php => ColumnRelationship.php} | 10 +-- .../{AttributeString.php => ColumnString.php} | 10 +-- .../Model/{AttributeURL.php => ColumnURL.php} | 14 ++-- src/Appwrite/Utopia/Response/Model/Table.php | 20 ++--- 39 files changed, 245 insertions(+), 245 deletions(-) delete mode 100644 src/Appwrite/Utopia/Response/Model/AttributeList.php rename src/Appwrite/Utopia/Response/Model/{Attribute.php => Column.php} (74%) rename src/Appwrite/Utopia/Response/Model/{AttributeBoolean.php => ColumnBoolean.php} (83%) rename src/Appwrite/Utopia/Response/Model/{AttributeDatetime.php => ColumnDatetime.php} (86%) rename src/Appwrite/Utopia/Response/Model/{AttributeEmail.php => ColumnEmail.php} (86%) rename src/Appwrite/Utopia/Response/Model/{AttributeEnum.php => ColumnEnum.php} (88%) rename src/Appwrite/Utopia/Response/Model/{AttributeFloat.php => ColumnFloat.php} (88%) rename src/Appwrite/Utopia/Response/Model/{AttributeIP.php => ColumnIP.php} (87%) rename src/Appwrite/Utopia/Response/Model/{AttributeInteger.php => ColumnInteger.php} (88%) create mode 100644 src/Appwrite/Utopia/Response/Model/ColumnList.php rename src/Appwrite/Utopia/Response/Model/{AttributeRelationship.php => ColumnRelationship.php} (91%) rename src/Appwrite/Utopia/Response/Model/{AttributeString.php => ColumnString.php} (74%) rename src/Appwrite/Utopia/Response/Model/{AttributeURL.php => ColumnURL.php} (76%) diff --git a/app/config/events.php b/app/config/events.php index 3b0cc982a0..41857fad70 100644 --- a/app/config/events.php +++ b/app/config/events.php @@ -125,7 +125,7 @@ return [ ] ], 'columns' => [ - '$model' => Response::MODEL_ATTRIBUTE, + '$model' => Response::MODEL_COLUMN, '$resource' => true, '$description' => 'This event triggers on any columns event.', 'create' => [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php index dab0527fa7..7e1331a637 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php @@ -48,7 +48,7 @@ class Create extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN, + model: UtopiaResponse::MODEL_COLUMN_BOOLEAN, ) ] )) @@ -79,6 +79,6 @@ class Create extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_BOOLEAN); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php index 35148fc174..6725e0c817 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php @@ -48,7 +48,7 @@ class Update extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN, + model: UtopiaResponse::MODEL_COLUMN_BOOLEAN, ) ], contentType: ContentType::JSON @@ -81,6 +81,6 @@ class Update extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_BOOLEAN); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php index 36ddfb4dfa..775d33ab19 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php @@ -50,7 +50,7 @@ class Create extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_ATTRIBUTE_DATETIME, + model: UtopiaResponse::MODEL_COLUMN_DATETIME, ) ] )) @@ -101,6 +101,6 @@ class Create extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_DATETIME); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_DATETIME); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php index d323ed4fd0..6ff0744859 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php @@ -50,7 +50,7 @@ class Update extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ATTRIBUTE_DATETIME, + model: UtopiaResponse::MODEL_COLUMN_DATETIME, ) ], contentType: ContentType::JSON @@ -92,6 +92,6 @@ class Update extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_DATETIME); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_DATETIME); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php index 9baa857fec..945097e66b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php @@ -136,19 +136,19 @@ class Delete extends Action $format = $column->getAttribute('format'); $model = match ($type) { - Database::VAR_BOOLEAN => UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN, - Database::VAR_INTEGER => UtopiaResponse::MODEL_ATTRIBUTE_INTEGER, - Database::VAR_FLOAT => UtopiaResponse::MODEL_ATTRIBUTE_FLOAT, - Database::VAR_DATETIME => UtopiaResponse::MODEL_ATTRIBUTE_DATETIME, - Database::VAR_RELATIONSHIP => UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP, + Database::VAR_BOOLEAN => UtopiaResponse::MODEL_COLUMN_BOOLEAN, + Database::VAR_INTEGER => UtopiaResponse::MODEL_COLUMN_INTEGER, + Database::VAR_FLOAT => UtopiaResponse::MODEL_COLUMN_FLOAT, + Database::VAR_DATETIME => UtopiaResponse::MODEL_COLUMN_DATETIME, + Database::VAR_RELATIONSHIP => UtopiaResponse::MODEL_COLUMN_RELATIONSHIP, Database::VAR_STRING => match ($format) { - APP_DATABASE_ATTRIBUTE_EMAIL => UtopiaResponse::MODEL_ATTRIBUTE_EMAIL, - APP_DATABASE_ATTRIBUTE_ENUM => UtopiaResponse::MODEL_ATTRIBUTE_ENUM, - APP_DATABASE_ATTRIBUTE_IP => UtopiaResponse::MODEL_ATTRIBUTE_IP, - APP_DATABASE_ATTRIBUTE_URL => UtopiaResponse::MODEL_ATTRIBUTE_URL, - default => UtopiaResponse::MODEL_ATTRIBUTE_STRING, + APP_DATABASE_ATTRIBUTE_EMAIL => UtopiaResponse::MODEL_COLUMN_EMAIL, + APP_DATABASE_ATTRIBUTE_ENUM => UtopiaResponse::MODEL_COLUMN_ENUM, + APP_DATABASE_ATTRIBUTE_IP => UtopiaResponse::MODEL_COLUMN_IP, + APP_DATABASE_ATTRIBUTE_URL => UtopiaResponse::MODEL_COLUMN_URL, + default => UtopiaResponse::MODEL_COLUMN_STRING, }, - default => UtopiaResponse::MODEL_ATTRIBUTE, + default => UtopiaResponse::MODEL_COLUMN, }; $queueForEvents diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php index 1d51e26efc..2372d8b032 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php @@ -50,7 +50,7 @@ class Create extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_ATTRIBUTE_EMAIL, + model: UtopiaResponse::MODEL_COLUMN_EMAIL, ) ] )) @@ -99,6 +99,6 @@ class Create extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_EMAIL); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_EMAIL); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php index 53e03c93a2..74124eba37 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php @@ -50,7 +50,7 @@ class Update extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ATTRIBUTE_EMAIL, + model: UtopiaResponse::MODEL_COLUMN_EMAIL, ) ], contentType: ContentType::JSON @@ -93,6 +93,6 @@ class Update extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_EMAIL); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_EMAIL); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php index 95ed0b0630..5c5c7da071 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php @@ -52,7 +52,7 @@ class Create extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_ATTRIBUTE_ENUM, + model: UtopiaResponse::MODEL_COLUMN_ENUM, ) ] )) @@ -108,6 +108,6 @@ class Create extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_ENUM); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_ENUM); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php index d52dd161e4..aa588a9f1b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php @@ -51,7 +51,7 @@ class Update extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ATTRIBUTE_ENUM, + model: UtopiaResponse::MODEL_COLUMN_ENUM, ) ], contentType: ContentType::JSON @@ -97,6 +97,6 @@ class Update extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_ENUM); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_ENUM); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php index 28e671fb72..150ce8d25e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php @@ -52,7 +52,7 @@ class Create extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_ATTRIBUTE_FLOAT, + model: UtopiaResponse::MODEL_COLUMN_FLOAT, ) ] )) @@ -116,6 +116,6 @@ class Create extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_FLOAT); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_FLOAT); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php index c585205388..8ea7ab474a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php @@ -50,7 +50,7 @@ class Update extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ATTRIBUTE_FLOAT, + model: UtopiaResponse::MODEL_COLUMN_FLOAT, ) ], contentType: ContentType::JSON @@ -104,6 +104,6 @@ class Update extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_FLOAT); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_FLOAT); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php index 14744f0442..160ab60868 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php @@ -44,16 +44,16 @@ class Get extends Action new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, model: [ - UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN, - UtopiaResponse::MODEL_ATTRIBUTE_INTEGER, - UtopiaResponse::MODEL_ATTRIBUTE_FLOAT, - UtopiaResponse::MODEL_ATTRIBUTE_EMAIL, - UtopiaResponse::MODEL_ATTRIBUTE_ENUM, - UtopiaResponse::MODEL_ATTRIBUTE_URL, - UtopiaResponse::MODEL_ATTRIBUTE_IP, - UtopiaResponse::MODEL_ATTRIBUTE_DATETIME, - UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP, - UtopiaResponse::MODEL_ATTRIBUTE_STRING, + UtopiaResponse::MODEL_COLUMN_BOOLEAN, + UtopiaResponse::MODEL_COLUMN_INTEGER, + UtopiaResponse::MODEL_COLUMN_FLOAT, + UtopiaResponse::MODEL_COLUMN_EMAIL, + UtopiaResponse::MODEL_COLUMN_ENUM, + UtopiaResponse::MODEL_COLUMN_URL, + UtopiaResponse::MODEL_COLUMN_IP, + UtopiaResponse::MODEL_COLUMN_DATETIME, + UtopiaResponse::MODEL_COLUMN_RELATIONSHIP, + UtopiaResponse::MODEL_COLUMN_STRING, ] ) ] @@ -92,19 +92,19 @@ class Get extends Action } $model = match ($type) { - Database::VAR_BOOLEAN => UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN, - Database::VAR_INTEGER => UtopiaResponse::MODEL_ATTRIBUTE_INTEGER, - Database::VAR_FLOAT => UtopiaResponse::MODEL_ATTRIBUTE_FLOAT, - Database::VAR_DATETIME => UtopiaResponse::MODEL_ATTRIBUTE_DATETIME, - Database::VAR_RELATIONSHIP => UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP, + Database::VAR_BOOLEAN => UtopiaResponse::MODEL_COLUMN_BOOLEAN, + Database::VAR_INTEGER => UtopiaResponse::MODEL_COLUMN_INTEGER, + Database::VAR_FLOAT => UtopiaResponse::MODEL_COLUMN_FLOAT, + Database::VAR_DATETIME => UtopiaResponse::MODEL_COLUMN_DATETIME, + Database::VAR_RELATIONSHIP => UtopiaResponse::MODEL_COLUMN_RELATIONSHIP, Database::VAR_STRING => match ($format) { - APP_DATABASE_ATTRIBUTE_EMAIL => UtopiaResponse::MODEL_ATTRIBUTE_EMAIL, - APP_DATABASE_ATTRIBUTE_ENUM => UtopiaResponse::MODEL_ATTRIBUTE_ENUM, - APP_DATABASE_ATTRIBUTE_IP => UtopiaResponse::MODEL_ATTRIBUTE_IP, - APP_DATABASE_ATTRIBUTE_URL => UtopiaResponse::MODEL_ATTRIBUTE_URL, - default => UtopiaResponse::MODEL_ATTRIBUTE_STRING, + APP_DATABASE_ATTRIBUTE_EMAIL => UtopiaResponse::MODEL_COLUMN_EMAIL, + APP_DATABASE_ATTRIBUTE_ENUM => UtopiaResponse::MODEL_COLUMN_ENUM, + APP_DATABASE_ATTRIBUTE_IP => UtopiaResponse::MODEL_COLUMN_IP, + APP_DATABASE_ATTRIBUTE_URL => UtopiaResponse::MODEL_COLUMN_URL, + default => UtopiaResponse::MODEL_COLUMN_STRING, }, - default => UtopiaResponse::MODEL_ATTRIBUTE, + default => UtopiaResponse::MODEL_COLUMN, }; $response->dynamic($column, $model); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php index b3916a5fad..73d8c93031 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php @@ -50,7 +50,7 @@ class Create extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_ATTRIBUTE_IP, + model: UtopiaResponse::MODEL_COLUMN_IP, ) ] )) @@ -91,6 +91,6 @@ class Create extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_IP); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_IP); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php index 6da08a2c9f..4b9fa8bca8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php @@ -50,7 +50,7 @@ class Update extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ATTRIBUTE_IP, + model: UtopiaResponse::MODEL_COLUMN_IP, ) ], contentType: ContentType::JSON @@ -93,6 +93,6 @@ class Update extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_IP); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_IP); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php index 7a26d10bc8..d58b79d597 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php @@ -52,7 +52,7 @@ class Create extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_ATTRIBUTE_INTEGER, + model: UtopiaResponse::MODEL_COLUMN_INTEGER, ) ] )) @@ -118,6 +118,6 @@ class Create extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_INTEGER); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_INTEGER); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php index 27616c07c9..1806cc91c3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php @@ -50,7 +50,7 @@ class Update extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ATTRIBUTE_INTEGER, + model: UtopiaResponse::MODEL_COLUMN_INTEGER, ) ], contentType: ContentType::JSON @@ -104,6 +104,6 @@ class Update extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_INTEGER); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_INTEGER); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php index f5806b6d8c..d063c8e055 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php @@ -52,7 +52,7 @@ class Create extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP + model: UtopiaResponse::MODEL_COLUMN_RELATIONSHIP ) ] )) @@ -163,6 +163,6 @@ class Create extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_RELATIONSHIP); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php index 34231ad611..80ca25e9cf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php @@ -48,7 +48,7 @@ class Update extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP + model: UtopiaResponse::MODEL_COLUMN_RELATIONSHIP ) ], contentType: ContentType::JSON @@ -98,6 +98,6 @@ class Update extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_RELATIONSHIP); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php index 1987f5fdbe..caafdbc32f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php @@ -53,7 +53,7 @@ class Create extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_ATTRIBUTE_STRING + model: UtopiaResponse::MODEL_COLUMN_STRING ) ] )) @@ -117,6 +117,6 @@ class Create extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_STRING); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_STRING); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php index a73ae0f9b1..35fe6bc86d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php @@ -51,7 +51,7 @@ class Update extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ATTRIBUTE_STRING, + model: UtopiaResponse::MODEL_COLUMN_STRING, ) ], contentType: ContentType::JSON @@ -96,6 +96,6 @@ class Update extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_STRING); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_STRING); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php index 74eedfa98b..c1483c373a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php @@ -50,7 +50,7 @@ class Create extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_ATTRIBUTE_URL, + model: UtopiaResponse::MODEL_COLUMN_URL, ) ] )) @@ -91,6 +91,6 @@ class Create extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_URL); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_URL); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php index 109b9c575b..db35cf56c4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php @@ -50,7 +50,7 @@ class Update extends ColumnAction responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ATTRIBUTE_URL, + model: UtopiaResponse::MODEL_COLUMN_URL, ) ], contentType: ContentType::JSON @@ -93,6 +93,6 @@ class Update extends ColumnAction $response ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_ATTRIBUTE_URL); + ->dynamic($column, UtopiaResponse::MODEL_COLUMN_URL); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php index f2343e927b..cba6e2d077 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php @@ -47,7 +47,7 @@ class XList extends Action responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ATTRIBUTE_LIST + model: UtopiaResponse::MODEL_COLUMN_LIST ) ] )) @@ -120,6 +120,6 @@ class XList extends Action $response->dynamic(new Document([ 'attributes' => $columns, 'total' => $total, - ]), UtopiaResponse::MODEL_ATTRIBUTE_LIST); + ]), UtopiaResponse::MODEL_COLUMN_LIST); } } diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index ad2e7ad9b8..0fae030b82 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -15,23 +15,22 @@ use Appwrite\Utopia\Response\Model\AlgoScrypt; use Appwrite\Utopia\Response\Model\AlgoScryptModified; use Appwrite\Utopia\Response\Model\AlgoSha; use Appwrite\Utopia\Response\Model\Any; -use Appwrite\Utopia\Response\Model\Attribute; -use Appwrite\Utopia\Response\Model\AttributeBoolean; -use Appwrite\Utopia\Response\Model\AttributeDatetime; -use Appwrite\Utopia\Response\Model\AttributeEmail; -use Appwrite\Utopia\Response\Model\AttributeEnum; -use Appwrite\Utopia\Response\Model\AttributeFloat; -use Appwrite\Utopia\Response\Model\AttributeInteger; -use Appwrite\Utopia\Response\Model\AttributeIP; -use Appwrite\Utopia\Response\Model\AttributeList; -use Appwrite\Utopia\Response\Model\AttributeRelationship; -use Appwrite\Utopia\Response\Model\AttributeString; -use Appwrite\Utopia\Response\Model\AttributeURL; use Appwrite\Utopia\Response\Model\AuthProvider; use Appwrite\Utopia\Response\Model\BaseList; use Appwrite\Utopia\Response\Model\Branch; use Appwrite\Utopia\Response\Model\Bucket; -use Appwrite\Utopia\Response\Model\Table; +use Appwrite\Utopia\Response\Model\Column; +use Appwrite\Utopia\Response\Model\ColumnBoolean; +use Appwrite\Utopia\Response\Model\ColumnDatetime; +use Appwrite\Utopia\Response\Model\ColumnEmail; +use Appwrite\Utopia\Response\Model\ColumnEnum; +use Appwrite\Utopia\Response\Model\ColumnFloat; +use Appwrite\Utopia\Response\Model\ColumnInteger; +use Appwrite\Utopia\Response\Model\ColumnIP; +use Appwrite\Utopia\Response\Model\ColumnList; +use Appwrite\Utopia\Response\Model\ColumnRelationship; +use Appwrite\Utopia\Response\Model\ColumnString; +use Appwrite\Utopia\Response\Model\ColumnURL; use Appwrite\Utopia\Response\Model\ConsoleVariables; use Appwrite\Utopia\Response\Model\Continent; use Appwrite\Utopia\Response\Model\Country; @@ -94,6 +93,7 @@ use Appwrite\Utopia\Response\Model\Session; use Appwrite\Utopia\Response\Model\Site; use Appwrite\Utopia\Response\Model\Specification; use Appwrite\Utopia\Response\Model\Subscriber; +use Appwrite\Utopia\Response\Model\Table; use Appwrite\Utopia\Response\Model\Target; use Appwrite\Utopia\Response\Model\Team; use Appwrite\Utopia\Response\Model\TemplateEmail; @@ -168,18 +168,18 @@ class Response extends SwooleResponse public const MODEL_DOCUMENT_LIST = 'documentList'; // Database Attributes - public const MODEL_ATTRIBUTE = 'attribute'; - public const MODEL_ATTRIBUTE_LIST = 'attributeList'; - public const MODEL_ATTRIBUTE_STRING = 'attributeString'; - public const MODEL_ATTRIBUTE_INTEGER = 'attributeInteger'; - public const MODEL_ATTRIBUTE_FLOAT = 'attributeFloat'; - public const MODEL_ATTRIBUTE_BOOLEAN = 'attributeBoolean'; - public const MODEL_ATTRIBUTE_EMAIL = 'attributeEmail'; - public const MODEL_ATTRIBUTE_ENUM = 'attributeEnum'; - public const MODEL_ATTRIBUTE_IP = 'attributeIp'; - public const MODEL_ATTRIBUTE_URL = 'attributeUrl'; - public const MODEL_ATTRIBUTE_DATETIME = 'attributeDatetime'; - public const MODEL_ATTRIBUTE_RELATIONSHIP = 'attributeRelationship'; + public const MODEL_COLUMN = 'column'; + public const MODEL_COLUMN_LIST = 'columnList'; + public const MODEL_COLUMN_STRING = 'columnString'; + public const MODEL_COLUMN_INTEGER = 'columnInteger'; + public const MODEL_COLUMN_FLOAT = 'columnFloat'; + public const MODEL_COLUMN_BOOLEAN = 'columnBoolean'; + public const MODEL_COLUMN_EMAIL = 'columnEmail'; + public const MODEL_COLUMN_ENUM = 'columnEnum'; + public const MODEL_COLUMN_IP = 'columnIp'; + public const MODEL_COLUMN_URL = 'columnUrl'; + public const MODEL_COLUMN_DATETIME = 'columnDatetime'; + public const MODEL_COLUMN_RELATIONSHIP = 'columnRelationship'; // Users public const MODEL_ACCOUNT = 'account'; @@ -429,18 +429,18 @@ class Response extends SwooleResponse // Entities ->setModel(new Database()) ->setModel(new Table()) - ->setModel(new Attribute()) - ->setModel(new AttributeList()) - ->setModel(new AttributeString()) - ->setModel(new AttributeInteger()) - ->setModel(new AttributeFloat()) - ->setModel(new AttributeBoolean()) - ->setModel(new AttributeEmail()) - ->setModel(new AttributeEnum()) - ->setModel(new AttributeIP()) - ->setModel(new AttributeURL()) - ->setModel(new AttributeDatetime()) - ->setModel(new AttributeRelationship()) + ->setModel(new Column()) + ->setModel(new ColumnList()) + ->setModel(new ColumnString()) + ->setModel(new ColumnInteger()) + ->setModel(new ColumnFloat()) + ->setModel(new ColumnBoolean()) + ->setModel(new ColumnEmail()) + ->setModel(new ColumnEnum()) + ->setModel(new ColumnIP()) + ->setModel(new ColumnURL()) + ->setModel(new ColumnDatetime()) + ->setModel(new ColumnRelationship()) ->setModel(new Index()) ->setModel(new ModelDocument()) ->setModel(new Log()) @@ -558,7 +558,7 @@ class Response extends SwooleResponse * * @return self */ - public function setModel(Model $instance) + public function setModel(Model $instance): Response { $this->models[$instance->getType()] = $instance; @@ -836,7 +836,7 @@ class Response extends SwooleResponse /** * Function to add a response filter, the order of filters are first in - first out. * - * @param $filter the response filter to set + * @param $filter - the response filter to set * * @return void */ diff --git a/src/Appwrite/Utopia/Response/Model/AttributeList.php b/src/Appwrite/Utopia/Response/Model/AttributeList.php deleted file mode 100644 index 8b04475a14..0000000000 --- a/src/Appwrite/Utopia/Response/Model/AttributeList.php +++ /dev/null @@ -1,58 +0,0 @@ -addRule('total', [ - 'type' => self::TYPE_INTEGER, - 'description' => 'Total number of attributes in the given collection.', - 'default' => 0, - 'example' => 5, - ]) - ->addRule('attributes', [ - 'type' => [ - Response::MODEL_ATTRIBUTE_BOOLEAN, - Response::MODEL_ATTRIBUTE_INTEGER, - Response::MODEL_ATTRIBUTE_FLOAT, - Response::MODEL_ATTRIBUTE_EMAIL, - Response::MODEL_ATTRIBUTE_ENUM, - Response::MODEL_ATTRIBUTE_URL, - Response::MODEL_ATTRIBUTE_IP, - Response::MODEL_ATTRIBUTE_DATETIME, - Response::MODEL_ATTRIBUTE_RELATIONSHIP, - Response::MODEL_ATTRIBUTE_STRING // needs to be last, since its condition would dominate any other string attribute - ], - 'description' => 'List of attributes.', - 'default' => [], - 'array' => true - ]) - ; - } - - /** - * Get Name - * - * @return string - */ - public function getName(): string - { - return 'Attributes List'; - } - - /** - * Get Type - * - * @return string - */ - public function getType(): string - { - return Response::MODEL_ATTRIBUTE_LIST; - } -} diff --git a/src/Appwrite/Utopia/Response/Model/Attribute.php b/src/Appwrite/Utopia/Response/Model/Column.php similarity index 74% rename from src/Appwrite/Utopia/Response/Model/Attribute.php rename to src/Appwrite/Utopia/Response/Model/Column.php index 8c43f8d21c..5562de39f2 100644 --- a/src/Appwrite/Utopia/Response/Model/Attribute.php +++ b/src/Appwrite/Utopia/Response/Model/Column.php @@ -5,57 +5,57 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; -class Attribute extends Model +class Column extends Model { public function __construct() { $this ->addRule('key', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute Key.', + 'description' => 'Column Key.', 'default' => '', 'example' => 'fullName', ]) ->addRule('type', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute type.', + 'description' => 'Column type.', 'default' => '', 'example' => 'string', ]) ->addRule('status', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`', + 'description' => 'Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`', 'default' => '', 'example' => 'available', ]) ->addRule('error', [ 'type' => self::TYPE_STRING, - 'description' => 'Error message. Displays error generated on failure of creating or deleting an attribute.', + 'description' => 'Error message. Displays error generated on failure of creating or deleting an column.', 'default' => '', 'example' => 'string', ]) ->addRule('required', [ 'type' => self::TYPE_BOOLEAN, - 'description' => 'Is attribute required?', + 'description' => 'Is column required?', 'default' => false, 'example' => true, ]) ->addRule('array', [ 'type' => self::TYPE_BOOLEAN, - 'description' => 'Is attribute an array?', + 'description' => 'Is column an array?', 'default' => false, 'required' => false, 'example' => false, ]) ->addRule('$createdAt', [ 'type' => self::TYPE_DATETIME, - 'description' => 'Attribute creation date in ISO 8601 format.', + 'description' => 'Column creation date in ISO 8601 format.', 'default' => '', 'example' => self::TYPE_DATETIME_EXAMPLE, ]) ->addRule('$updatedAt', [ 'type' => self::TYPE_DATETIME, - 'description' => 'Attribute update date in ISO 8601 format.', + 'description' => 'Column update date in ISO 8601 format.', 'default' => '', 'example' => self::TYPE_DATETIME_EXAMPLE, ]); @@ -70,7 +70,7 @@ class Attribute extends Model */ public function getName(): string { - return 'Attribute'; + return 'Column'; } /** @@ -80,6 +80,6 @@ class Attribute extends Model */ public function getType(): string { - return Response::MODEL_ATTRIBUTE; + return Response::MODEL_COLUMN; } } diff --git a/src/Appwrite/Utopia/Response/Model/AttributeBoolean.php b/src/Appwrite/Utopia/Response/Model/ColumnBoolean.php similarity index 83% rename from src/Appwrite/Utopia/Response/Model/AttributeBoolean.php rename to src/Appwrite/Utopia/Response/Model/ColumnBoolean.php index 05846817ca..ffbfe0e793 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeBoolean.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnBoolean.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -class AttributeBoolean extends Attribute +class ColumnBoolean extends Column { public function __construct() { @@ -13,13 +13,13 @@ class AttributeBoolean extends Attribute $this ->addRule('key', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute Key.', + 'description' => 'Column Key.', 'default' => '', 'example' => 'isEnabled', ]) ->addRule('type', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute type.', + 'description' => 'Column type.', 'default' => '', 'example' => 'boolean', ]) @@ -44,7 +44,7 @@ class AttributeBoolean extends Attribute */ public function getName(): string { - return 'AttributeBoolean'; + return 'ColumnBoolean'; } /** @@ -54,6 +54,6 @@ class AttributeBoolean extends Attribute */ public function getType(): string { - return Response::MODEL_ATTRIBUTE_BOOLEAN; + return Response::MODEL_COLUMN_BOOLEAN; } } diff --git a/src/Appwrite/Utopia/Response/Model/AttributeDatetime.php b/src/Appwrite/Utopia/Response/Model/ColumnDatetime.php similarity index 86% rename from src/Appwrite/Utopia/Response/Model/AttributeDatetime.php rename to src/Appwrite/Utopia/Response/Model/ColumnDatetime.php index 4651aebd06..4c68102775 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeDatetime.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnDatetime.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -class AttributeDatetime extends Attribute +class ColumnDatetime extends Column { public function __construct() { @@ -13,13 +13,13 @@ class AttributeDatetime extends Attribute $this ->addRule('key', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute Key.', + 'description' => 'Column Key.', 'default' => '', 'example' => 'birthDay', ]) ->addRule('type', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute type.', + 'description' => 'Column type.', 'default' => '', 'example' => self::TYPE_DATETIME, ]) @@ -52,7 +52,7 @@ class AttributeDatetime extends Attribute */ public function getName(): string { - return 'AttributeDatetime'; + return 'ColumnDatetime'; } /** @@ -62,6 +62,6 @@ class AttributeDatetime extends Attribute */ public function getType(): string { - return Response::MODEL_ATTRIBUTE_DATETIME; + return Response::MODEL_COLUMN_DATETIME; } } diff --git a/src/Appwrite/Utopia/Response/Model/AttributeEmail.php b/src/Appwrite/Utopia/Response/Model/ColumnEmail.php similarity index 86% rename from src/Appwrite/Utopia/Response/Model/AttributeEmail.php rename to src/Appwrite/Utopia/Response/Model/ColumnEmail.php index 078087dd4b..446f993227 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeEmail.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnEmail.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -class AttributeEmail extends Attribute +class ColumnEmail extends Column { public function __construct() { @@ -13,13 +13,13 @@ class AttributeEmail extends Attribute $this ->addRule('key', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute Key.', + 'description' => 'Column Key.', 'default' => '', 'example' => 'userEmail', ]) ->addRule('type', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute type.', + 'description' => 'Column type.', 'default' => '', 'example' => 'string', ]) @@ -51,7 +51,7 @@ class AttributeEmail extends Attribute */ public function getName(): string { - return 'AttributeEmail'; + return 'ColumnEmail'; } /** @@ -61,6 +61,6 @@ class AttributeEmail extends Attribute */ public function getType(): string { - return Response::MODEL_ATTRIBUTE_EMAIL; + return Response::MODEL_COLUMN_EMAIL; } } diff --git a/src/Appwrite/Utopia/Response/Model/AttributeEnum.php b/src/Appwrite/Utopia/Response/Model/ColumnEnum.php similarity index 88% rename from src/Appwrite/Utopia/Response/Model/AttributeEnum.php rename to src/Appwrite/Utopia/Response/Model/ColumnEnum.php index 992b62ee3a..b0873a2f7b 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeEnum.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnEnum.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -class AttributeEnum extends Attribute +class ColumnEnum extends Column { public function __construct() { @@ -13,13 +13,13 @@ class AttributeEnum extends Attribute $this ->addRule('key', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute Key.', + 'description' => 'Column Key.', 'default' => '', 'example' => 'status', ]) ->addRule('type', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute type.', + 'description' => 'Column type.', 'default' => '', 'example' => 'string', ]) @@ -58,7 +58,7 @@ class AttributeEnum extends Attribute */ public function getName(): string { - return 'AttributeEnum'; + return 'ColumnEnum'; } /** @@ -68,6 +68,6 @@ class AttributeEnum extends Attribute */ public function getType(): string { - return Response::MODEL_ATTRIBUTE_ENUM; + return Response::MODEL_COLUMN_ENUM; } } diff --git a/src/Appwrite/Utopia/Response/Model/AttributeFloat.php b/src/Appwrite/Utopia/Response/Model/ColumnFloat.php similarity index 88% rename from src/Appwrite/Utopia/Response/Model/AttributeFloat.php rename to src/Appwrite/Utopia/Response/Model/ColumnFloat.php index 266b89c330..5867ac8712 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeFloat.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnFloat.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -class AttributeFloat extends Attribute +class ColumnFloat extends Column { public function __construct() { @@ -13,13 +13,13 @@ class AttributeFloat extends Attribute $this ->addRule('key', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute Key.', + 'description' => 'Column Key.', 'default' => '', 'example' => 'percentageCompleted', ]) ->addRule('type', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute type.', + 'description' => 'Column type.', 'default' => '', 'example' => 'double', ]) @@ -58,7 +58,7 @@ class AttributeFloat extends Attribute */ public function getName(): string { - return 'AttributeFloat'; + return 'ColumnFloat'; } /** @@ -68,6 +68,6 @@ class AttributeFloat extends Attribute */ public function getType(): string { - return Response::MODEL_ATTRIBUTE_FLOAT; + return Response::MODEL_COLUMN_FLOAT; } } diff --git a/src/Appwrite/Utopia/Response/Model/AttributeIP.php b/src/Appwrite/Utopia/Response/Model/ColumnIP.php similarity index 87% rename from src/Appwrite/Utopia/Response/Model/AttributeIP.php rename to src/Appwrite/Utopia/Response/Model/ColumnIP.php index cfa309317a..2ca7130720 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeIP.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnIP.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -class AttributeIP extends Attribute +class ColumnIP extends Column { public function __construct() { @@ -13,13 +13,13 @@ class AttributeIP extends Attribute $this ->addRule('key', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute Key.', + 'description' => 'Column Key.', 'default' => '', 'example' => 'ipAddress', ]) ->addRule('type', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute type.', + 'description' => 'Column type.', 'default' => '', 'example' => 'string', ]) @@ -51,7 +51,7 @@ class AttributeIP extends Attribute */ public function getName(): string { - return 'AttributeIP'; + return 'ColumnIP'; } /** @@ -61,6 +61,6 @@ class AttributeIP extends Attribute */ public function getType(): string { - return Response::MODEL_ATTRIBUTE_IP; + return Response::MODEL_COLUMN_IP; } } diff --git a/src/Appwrite/Utopia/Response/Model/AttributeInteger.php b/src/Appwrite/Utopia/Response/Model/ColumnInteger.php similarity index 88% rename from src/Appwrite/Utopia/Response/Model/AttributeInteger.php rename to src/Appwrite/Utopia/Response/Model/ColumnInteger.php index fddfe57445..086f36a961 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeInteger.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnInteger.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -class AttributeInteger extends Attribute +class ColumnInteger extends Column { public function __construct() { @@ -13,13 +13,13 @@ class AttributeInteger extends Attribute $this ->addRule('key', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute Key.', + 'description' => 'Column Key.', 'default' => '', 'example' => 'count', ]) ->addRule('type', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute type.', + 'description' => 'Column type.', 'default' => '', 'example' => 'integer', ]) @@ -57,7 +57,7 @@ class AttributeInteger extends Attribute */ public function getName(): string { - return 'AttributeInteger'; + return 'ColumnInteger'; } /** @@ -67,6 +67,6 @@ class AttributeInteger extends Attribute */ public function getType(): string { - return Response::MODEL_ATTRIBUTE_INTEGER; + return Response::MODEL_COLUMN_INTEGER; } } diff --git a/src/Appwrite/Utopia/Response/Model/ColumnList.php b/src/Appwrite/Utopia/Response/Model/ColumnList.php new file mode 100644 index 0000000000..0c9f5a49b5 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/ColumnList.php @@ -0,0 +1,58 @@ +addRule('total', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of columns in the given table.', + 'default' => 0, + 'example' => 5, + ]) + ->addRule('columns', [ + 'type' => [ + Response::MODEL_COLUMN_BOOLEAN, + Response::MODEL_COLUMN_INTEGER, + Response::MODEL_COLUMN_FLOAT, + Response::MODEL_COLUMN_EMAIL, + Response::MODEL_COLUMN_ENUM, + Response::MODEL_COLUMN_URL, + Response::MODEL_COLUMN_IP, + Response::MODEL_COLUMN_DATETIME, + Response::MODEL_COLUMN_RELATIONSHIP, + Response::MODEL_COLUMN_STRING // needs to be last, since its condition would dominate any other string attribute + ], + 'description' => 'List of columns.', + 'default' => [], + 'array' => true + ]) + ; + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'Columns List'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_COLUMN_LIST; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php b/src/Appwrite/Utopia/Response/Model/ColumnRelationship.php similarity index 91% rename from src/Appwrite/Utopia/Response/Model/AttributeRelationship.php rename to src/Appwrite/Utopia/Response/Model/ColumnRelationship.php index d88fbd1530..2c5649b5bf 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnRelationship.php @@ -5,7 +5,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Utopia\Database\Document; -class AttributeRelationship extends Attribute +class ColumnRelationship extends Column { public function __construct() { @@ -14,9 +14,9 @@ class AttributeRelationship extends Attribute $this ->addRule('relatedCollection', [ 'type' => self::TYPE_STRING, - 'description' => 'The ID of the related collection.', + 'description' => 'The ID of the related table.', 'default' => null, - 'example' => 'collection', + 'example' => 'table', ]) ->addRule('relationType', [ 'type' => self::TYPE_STRING, @@ -62,7 +62,7 @@ class AttributeRelationship extends Attribute */ public function getName(): string { - return 'AttributeRelationship'; + return 'ColumnRelationship'; } /** @@ -72,7 +72,7 @@ class AttributeRelationship extends Attribute */ public function getType(): string { - return Response::MODEL_ATTRIBUTE_RELATIONSHIP; + return Response::MODEL_COLUMN_RELATIONSHIP; } /** diff --git a/src/Appwrite/Utopia/Response/Model/AttributeString.php b/src/Appwrite/Utopia/Response/Model/ColumnString.php similarity index 74% rename from src/Appwrite/Utopia/Response/Model/AttributeString.php rename to src/Appwrite/Utopia/Response/Model/ColumnString.php index 12bb42009d..f962e51c37 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeString.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnString.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -class AttributeString extends Attribute +class ColumnString extends Column { public function __construct() { @@ -13,13 +13,13 @@ class AttributeString extends Attribute $this ->addRule('size', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Attribute size.', + 'description' => 'Column size.', 'default' => 0, 'example' => 128, ]) ->addRule('default', [ 'type' => self::TYPE_STRING, - 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', + 'description' => 'Default value for column when not provided. Cannot be set when column is required.', 'default' => null, 'required' => false, 'example' => 'default', @@ -38,7 +38,7 @@ class AttributeString extends Attribute */ public function getName(): string { - return 'AttributeString'; + return 'ColumnString'; } /** @@ -48,6 +48,6 @@ class AttributeString extends Attribute */ public function getType(): string { - return Response::MODEL_ATTRIBUTE_STRING; + return Response::MODEL_COLUMN_STRING; } } diff --git a/src/Appwrite/Utopia/Response/Model/AttributeURL.php b/src/Appwrite/Utopia/Response/Model/ColumnURL.php similarity index 76% rename from src/Appwrite/Utopia/Response/Model/AttributeURL.php rename to src/Appwrite/Utopia/Response/Model/ColumnURL.php index 633d5b49d7..12850b3907 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeURL.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnURL.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; -class AttributeURL extends Attribute +class ColumnURL extends Column { public function __construct() { @@ -13,13 +13,13 @@ class AttributeURL extends Attribute $this ->addRule('key', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute Key.', + 'description' => 'Column Key.', 'default' => '', 'example' => 'githubUrl', ]) ->addRule('type', [ 'type' => self::TYPE_STRING, - 'description' => 'Attribute type.', + 'description' => 'Column type.', 'default' => '', 'example' => 'string', ]) @@ -31,10 +31,10 @@ class AttributeURL extends Attribute ]) ->addRule('default', [ 'type' => self::TYPE_STRING, - 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', + 'description' => 'Default value for column when not provided. Cannot be set when column is required.', 'default' => null, 'required' => false, - 'example' => 'http://example.com', + 'example' => 'https://example.com', ]) ; } @@ -51,7 +51,7 @@ class AttributeURL extends Attribute */ public function getName(): string { - return 'AttributeURL'; + return 'ColumnURL'; } /** @@ -61,6 +61,6 @@ class AttributeURL extends Attribute */ public function getType(): string { - return Response::MODEL_ATTRIBUTE_URL; + return Response::MODEL_COLUMN_URL; } } diff --git a/src/Appwrite/Utopia/Response/Model/Table.php b/src/Appwrite/Utopia/Response/Model/Table.php index 305f1db3c9..d7098f313f 100644 --- a/src/Appwrite/Utopia/Response/Model/Table.php +++ b/src/Appwrite/Utopia/Response/Model/Table.php @@ -61,16 +61,16 @@ class Table extends Model ]) ->addRule('columns', [ 'type' => [ - Response::MODEL_ATTRIBUTE_BOOLEAN, - Response::MODEL_ATTRIBUTE_INTEGER, - Response::MODEL_ATTRIBUTE_FLOAT, - Response::MODEL_ATTRIBUTE_EMAIL, - Response::MODEL_ATTRIBUTE_ENUM, - Response::MODEL_ATTRIBUTE_URL, - Response::MODEL_ATTRIBUTE_IP, - Response::MODEL_ATTRIBUTE_DATETIME, - Response::MODEL_ATTRIBUTE_RELATIONSHIP, - Response::MODEL_ATTRIBUTE_STRING, // needs to be last, since its condition would dominate any other string attribute + Response::MODEL_COLUMN_BOOLEAN, + Response::MODEL_COLUMN_INTEGER, + Response::MODEL_COLUMN_FLOAT, + Response::MODEL_COLUMN_EMAIL, + Response::MODEL_COLUMN_ENUM, + Response::MODEL_COLUMN_URL, + Response::MODEL_COLUMN_IP, + Response::MODEL_COLUMN_DATETIME, + Response::MODEL_COLUMN_RELATIONSHIP, + Response::MODEL_COLUMN_STRING, // needs to be last, since its condition would dominate any other string attribute ], 'description' => 'Table columns.', 'default' => [], From 7a5368078622fdaa8ef08ffb55121586dda197e1 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 09:42:33 +0530 Subject: [PATCH 027/362] update: `document` response model to `row`; refactor: old collection to table models on response types. --- app/config/events.php | 4 +-- .../Modules/Databases/Http/Rows/Create.php | 4 +-- .../Modules/Databases/Http/Rows/Delete.php | 2 +- .../Modules/Databases/Http/Rows/Get.php | 4 +-- .../Modules/Databases/Http/Rows/Update.php | 4 +-- .../Modules/Databases/Http/Rows/XList.php | 4 +-- .../Modules/Databases/Http/Tables/Create.php | 4 +-- .../Modules/Databases/Http/Tables/Delete.php | 2 +- .../Modules/Databases/Http/Tables/Get.php | 4 +-- .../Modules/Databases/Http/Tables/Update.php | 4 +-- .../Modules/Databases/Http/Tables/XList.php | 6 ++--- src/Appwrite/Utopia/Response.php | 10 +++---- .../Response/Model/{Document.php => Row.php} | 26 +++++++++---------- tests/unit/GraphQL/BuilderTest.php | 4 +-- 14 files changed, 41 insertions(+), 41 deletions(-) rename src/Appwrite/Utopia/Response/Model/{Document.php => Row.php} (73%) diff --git a/app/config/events.php b/app/config/events.php index 41857fad70..4523b56206 100644 --- a/app/config/events.php +++ b/app/config/events.php @@ -96,11 +96,11 @@ return [ '$resource' => true, '$description' => 'This event triggers on any database event.', 'tables' => [ - '$model' => Response::MODEL_COLLECTION, + '$model' => Response::MODEL_TABLE, '$resource' => true, '$description' => 'This event triggers on any table event.', 'rows' => [ - '$model' => Response::MODEL_DOCUMENT, + '$model' => Response::MODEL_ROW, '$resource' => true, '$description' => 'This event triggers on any rows event.', 'create' => [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php index 215ee94550..55efbc3632 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php @@ -63,7 +63,7 @@ class Create extends Action responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_CREATED, - model: UtopiaResponse::MODEL_DOCUMENT, + model: UtopiaResponse::MODEL_ROW, ) ], contentType: ContentType::JSON @@ -293,7 +293,7 @@ class Create extends Action $response ->setStatusCode(SwooleResponse::STATUS_CODE_CREATED) - ->dynamic($row, UtopiaResponse::MODEL_DOCUMENT); + ->dynamic($row, UtopiaResponse::MODEL_ROW); $relationships = \array_map( fn ($document) => $document->getAttribute('key'), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php index 61ed961c64..bba042bca5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php @@ -160,7 +160,7 @@ class Delete extends Action ->setParam('rowId', $row->getId()) ->setContext('table', $table) ->setContext('database', $database) - ->setPayload($response->output($row, UtopiaResponse::MODEL_DOCUMENT), sensitive: $relationships); + ->setPayload($response->output($row, UtopiaResponse::MODEL_ROW), sensitive: $relationships); $response->noContent(); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php index a3a484be70..85b6127bd3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php @@ -51,7 +51,7 @@ class Get extends Action responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DOCUMENT, + model: UtopiaResponse::MODEL_ROW, ) ], contentType: ContentType::JSON @@ -149,6 +149,6 @@ class Get extends Action $response->addHeader('X-Debug-Operations', $operations); - $response->dynamic($row, UtopiaResponse::MODEL_DOCUMENT); + $response->dynamic($row, UtopiaResponse::MODEL_ROW); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php index bc41118206..b7f3a4f6c4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php @@ -62,7 +62,7 @@ class Update extends Action responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DOCUMENT, + model: UtopiaResponse::MODEL_ROW, ) ], contentType: ContentType::JSON @@ -281,7 +281,7 @@ class Update extends Action $processRow($table, $row); - $response->dynamic($row, UtopiaResponse::MODEL_DOCUMENT); + $response->dynamic($row, UtopiaResponse::MODEL_ROW); $relationships = \array_map( fn ($document) => $document->getAttribute('key'), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php index b27930405f..e93d72cad6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php @@ -52,7 +52,7 @@ class XList extends Action responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DOCUMENT_LIST, + model: UtopiaResponse::MODEL_ROW_LIST, ) ], contentType: ContentType::JSON @@ -218,6 +218,6 @@ class XList extends Action $response->dynamic(new Document([ 'total' => $total, 'documents' => $rows, - ]), UtopiaResponse::MODEL_DOCUMENT_LIST); + ]), UtopiaResponse::MODEL_ROW_LIST); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php index ead5a64f88..9acd248190 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php @@ -56,7 +56,7 @@ class Create extends Action responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_CREATED, - model: UtopiaResponse::MODEL_COLLECTION, + model: UtopiaResponse::MODEL_TABLE, ) ], contentType: ContentType::JSON @@ -111,6 +111,6 @@ class Create extends Action $response ->setStatusCode(SwooleResponse::STATUS_CODE_CREATED) - ->dynamic($table, UtopiaResponse::MODEL_COLLECTION); + ->dynamic($table, UtopiaResponse::MODEL_TABLE); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php index 92003f3eeb..6fe7228ed9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php @@ -89,7 +89,7 @@ class Delete extends Action ->setContext('database', $database) ->setParam('databaseId', $databaseId) ->setParam('tableId', $table->getId()) - ->setPayload($response->output($table, UtopiaResponse::MODEL_COLLECTION)); + ->setPayload($response->output($table, UtopiaResponse::MODEL_TABLE)); $response->noContent(); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php index 2b0f77fc81..63bc1fa48c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php @@ -43,7 +43,7 @@ class Get extends Action responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLLECTION, + model: UtopiaResponse::MODEL_TABLE, ) ], contentType: ContentType::JSON @@ -69,6 +69,6 @@ class Get extends Action throw new Exception(Exception::COLLECTION_NOT_FOUND); } - $response->dynamic($table, UtopiaResponse::MODEL_COLLECTION); + $response->dynamic($table, UtopiaResponse::MODEL_TABLE); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php index dc302ce47f..d5f8d388ab 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php @@ -51,7 +51,7 @@ class Update extends Action responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLLECTION, + model: UtopiaResponse::MODEL_TABLE, ) ], contentType: ContentType::JSON @@ -105,6 +105,6 @@ class Update extends Action ->setParam('databaseId', $databaseId) ->setParam('tableId', $table->getId()); - $response->dynamic($table, UtopiaResponse::MODEL_COLLECTION); + $response->dynamic($table, UtopiaResponse::MODEL_TABLE); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php index 85474840df..a5e6789eaa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php @@ -49,7 +49,7 @@ class XList extends Action responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLLECTION_LIST, + model: UtopiaResponse::MODEL_TABLE, ) ], contentType: ContentType::JSON @@ -110,8 +110,8 @@ class XList extends Action } $response->dynamic(new Document([ - 'collections' => $tables, // TODO: consider renaming to 'tables' + 'collections' => $tables, 'total' => $total, - ]), UtopiaResponse::MODEL_COLLECTION_LIST); + ]), UtopiaResponse::MODEL_TABLE_LIST); } } diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 0fae030b82..2ea399c450 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -40,7 +40,6 @@ use Appwrite\Utopia\Response\Model\Deployment; use Appwrite\Utopia\Response\Model\DetectionFramework; use Appwrite\Utopia\Response\Model\DetectionRuntime; use Appwrite\Utopia\Response\Model\DevKey; -use Appwrite\Utopia\Response\Model\Document as ModelDocument; use Appwrite\Utopia\Response\Model\Error; use Appwrite\Utopia\Response\Model\ErrorDev; use Appwrite\Utopia\Response\Model\Execution; @@ -87,6 +86,7 @@ use Appwrite\Utopia\Response\Model\ProviderRepository; use Appwrite\Utopia\Response\Model\ProviderRepositoryFramework; use Appwrite\Utopia\Response\Model\ProviderRepositoryRuntime; use Appwrite\Utopia\Response\Model\ResourceToken; +use Appwrite\Utopia\Response\Model\Row; use Appwrite\Utopia\Response\Model\Rule; use Appwrite\Utopia\Response\Model\Runtime; use Appwrite\Utopia\Response\Model\Session; @@ -164,8 +164,8 @@ class Response extends SwooleResponse public const MODEL_TABLE_LIST = 'tableList'; public const MODEL_INDEX = 'index'; public const MODEL_INDEX_LIST = 'indexList'; - public const MODEL_DOCUMENT = 'document'; - public const MODEL_DOCUMENT_LIST = 'documentList'; + public const MODEL_ROW = 'row'; + public const MODEL_ROW_LIST = 'rowList'; // Database Attributes public const MODEL_COLUMN = 'column'; @@ -376,7 +376,7 @@ class Response extends SwooleResponse ->setModel(new Error()) ->setModel(new ErrorDev()) // Lists - ->setModel(new BaseList('Rows List', self::MODEL_DOCUMENT_LIST, 'rows', self::MODEL_DOCUMENT)) + ->setModel(new BaseList('Rows List', self::MODEL_ROW_LIST, 'rows', self::MODEL_ROW)) ->setModel(new BaseList('Tables List', self::MODEL_TABLE_LIST, 'tables', self::MODEL_TABLE)) ->setModel(new BaseList('Databases List', self::MODEL_DATABASE_LIST, 'databases', self::MODEL_DATABASE)) ->setModel(new BaseList('Indexes List', self::MODEL_INDEX_LIST, 'indexes', self::MODEL_INDEX)) @@ -442,7 +442,7 @@ class Response extends SwooleResponse ->setModel(new ColumnDatetime()) ->setModel(new ColumnRelationship()) ->setModel(new Index()) - ->setModel(new ModelDocument()) + ->setModel(new Row()) ->setModel(new Log()) ->setModel(new User()) ->setModel(new AlgoMd5()) diff --git a/src/Appwrite/Utopia/Response/Model/Document.php b/src/Appwrite/Utopia/Response/Model/Row.php similarity index 73% rename from src/Appwrite/Utopia/Response/Model/Document.php rename to src/Appwrite/Utopia/Response/Model/Row.php index 41a10cee89..49325bdc81 100644 --- a/src/Appwrite/Utopia/Response/Model/Document.php +++ b/src/Appwrite/Utopia/Response/Model/Row.php @@ -5,7 +5,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Utopia\Database\Document as DatabaseDocument; -class Document extends Any +class Row extends Any { /** * Get Name @@ -14,7 +14,7 @@ class Document extends Any */ public function getName(): string { - return 'Document'; + return 'Row'; } /** @@ -24,7 +24,7 @@ class Document extends Any */ public function getType(): string { - return Response::MODEL_DOCUMENT; + return Response::MODEL_ROW; } public function __construct() @@ -32,13 +32,13 @@ class Document extends Any $this ->addRule('$id', [ 'type' => self::TYPE_STRING, - 'description' => 'Document ID.', + 'description' => 'Row ID.', 'default' => '', 'example' => '5e5ea5c16897e', ]) ->addRule('$collectionId', [ 'type' => self::TYPE_STRING, - 'description' => 'Collection ID.', + 'description' => 'Table ID.', 'default' => '', 'example' => '5e5ea5c15117e', ]) @@ -50,19 +50,19 @@ class Document extends Any ]) ->addRule('$createdAt', [ 'type' => self::TYPE_DATETIME, - 'description' => 'Document creation date in ISO 8601 format.', + 'description' => 'Row creation date in ISO 8601 format.', 'default' => '', 'example' => self::TYPE_DATETIME_EXAMPLE, ]) ->addRule('$updatedAt', [ 'type' => self::TYPE_DATETIME, - 'description' => 'Document update date in ISO 8601 format.', + 'description' => 'Row update date in ISO 8601 format.', 'default' => '', 'example' => self::TYPE_DATETIME_EXAMPLE, ]) ->addRule('$permissions', [ 'type' => self::TYPE_STRING, - 'description' => 'Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', + 'description' => 'Row permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', 'default' => '', 'example' => ['read("any")'], 'array' => true, @@ -75,15 +75,15 @@ class Document extends Any $document->removeAttribute('$collection'); $document->removeAttribute('$tenant'); - foreach ($document->getAttributes() as $attribute) { - if (\is_array($attribute)) { - foreach ($attribute as $subAttribute) { + foreach ($document->getAttributes() as $column) { + if (\is_array($column)) { + foreach ($column as $subAttribute) { if ($subAttribute instanceof DatabaseDocument) { $this->filter($subAttribute); } } - } elseif ($attribute instanceof DatabaseDocument) { - $this->filter($attribute); + } elseif ($column instanceof DatabaseDocument) { + $this->filter($column); } } diff --git a/tests/unit/GraphQL/BuilderTest.php b/tests/unit/GraphQL/BuilderTest.php index d79a104c90..3dd1bcadc7 100644 --- a/tests/unit/GraphQL/BuilderTest.php +++ b/tests/unit/GraphQL/BuilderTest.php @@ -22,8 +22,8 @@ class BuilderTest extends TestCase */ public function testCreateTypeMapping() { - $model = $this->response->getModel(Response::MODEL_COLLECTION); + $model = $this->response->getModel(Response::MODEL_TABLE); $type = Mapper::model(\ucfirst($model->getType())); - $this->assertEquals('Collection', $type->name); + $this->assertEquals('Table', $type->name); } } From cabf32559a723d28c6f8f1b6fb09bb2a3678d7e6 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 09:50:57 +0530 Subject: [PATCH 028/362] update: return keys. --- .../Platform/Modules/Databases/Http/Columns/XList.php | 2 +- .../Modules/Databases/Http/Databases/Usage/Get.php | 8 ++++---- .../Modules/Databases/Http/Databases/Usage/XList.php | 8 ++++---- .../Platform/Modules/Databases/Http/Rows/Update.php | 10 +++++----- .../Platform/Modules/Databases/Http/Rows/XList.php | 2 +- .../Modules/Databases/Http/Tables/Usage/Get.php | 4 ++-- .../Platform/Modules/Databases/Http/Tables/XList.php | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php index cba6e2d077..e9800e71a0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php @@ -118,7 +118,7 @@ class XList extends Action } $response->dynamic(new Document([ - 'attributes' => $columns, + 'columns' => $columns, 'total' => $total, ]), UtopiaResponse::MODEL_COLUMN_LIST); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index c4105effa0..c7ae2e4d81 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -123,13 +123,13 @@ class Get extends Action $response->dynamic(new Document([ 'range' => $range, - 'collectionsTotal' => $usage[$metrics[0]]['total'], - 'documentsTotal' => $usage[$metrics[1]]['total'], + 'tablesTotal' => $usage[$metrics[0]]['total'], + 'rowsTotal' => $usage[$metrics[1]]['total'], 'storageTotal' => $usage[$metrics[2]]['total'], 'databaseReadsTotal' => $usage[$metrics[3]]['total'], 'databaseWritesTotal' => $usage[$metrics[4]]['total'], - 'collections' => $usage[$metrics[0]]['data'], - 'documents' => $usage[$metrics[1]]['data'], + 'tables' => $usage[$metrics[0]]['data'], + 'rows' => $usage[$metrics[1]]['data'], 'storage' => $usage[$metrics[2]]['data'], 'databaseReads' => $usage[$metrics[3]]['data'], 'databaseWrites' => $usage[$metrics[4]]['data'], diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php index 0078d54a4b..8737585e8c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -116,14 +116,14 @@ class XList extends Action $response->dynamic(new Document([ 'range' => $range, 'databasesTotal' => $usage[$metrics[0]]['total'], - 'collectionsTotal' => $usage[$metrics[1]]['total'], - 'documentsTotal' => $usage[$metrics[2]]['total'], + 'tablesTotal' => $usage[$metrics[1]]['total'], + 'rowsTotal' => $usage[$metrics[2]]['total'], 'storageTotal' => $usage[$metrics[3]]['total'], 'databasesReadsTotal' => $usage[$metrics[4]]['total'], 'databasesWritesTotal' => $usage[$metrics[5]]['total'], 'databases' => $usage[$metrics[0]]['data'], - 'collections' => $usage[$metrics[1]]['data'], - 'documents' => $usage[$metrics[2]]['data'], + 'tables' => $usage[$metrics[1]]['data'], + 'rows' => $usage[$metrics[2]]['data'], 'storage' => $usage[$metrics[3]]['data'], 'databasesReads' => $usage[$metrics[4]]['data'], 'databasesWrites' => $usage[$metrics[5]]['data'], diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php index b7f3a4f6c4..c9ed71d569 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php @@ -150,17 +150,17 @@ class Update extends Action $operations = 0; - $setTable = (function (Document $collection, Document $document) use (&$setTable, $dbForProject, $database, &$operations) { + $setTable = (function (Document $table, Document $row) use (&$setTable, $dbForProject, $database, &$operations) { $operations++; $relationships = \array_filter( - $collection->getAttribute('attributes', []), + $table->getAttribute('attributes', []), fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); + $related = $row->getAttribute($relationship->getAttribute('key')); if (empty($related)) { continue; @@ -212,9 +212,9 @@ class Update extends Action } if ($isList) { - $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + $row->setAttribute($relationship->getAttribute('key'), \array_values($relations)); } else { - $document->setAttribute($relationship->getAttribute('key'), \reset($relations)); + $row->setAttribute($relationship->getAttribute('key'), \reset($relations)); } } }); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php index e93d72cad6..4396c2b112 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php @@ -217,7 +217,7 @@ class XList extends Action $response->dynamic(new Document([ 'total' => $total, - 'documents' => $rows, + 'rows' => $rows, ]), UtopiaResponse::MODEL_ROW_LIST); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php index 3943c27618..b55fa84282 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php @@ -124,8 +124,8 @@ class Get extends Action $response->dynamic(new Document([ 'range' => $range, - 'documentsTotal' => $usage[$metrics[0]]['total'], - 'documents' => $usage[$metrics[0]]['data'], + 'rows' => $usage[$metrics[0]]['data'], + 'rowsTotal' => $usage[$metrics[0]]['total'], ]), UtopiaResponse::MODEL_USAGE_COLLECTION); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php index a5e6789eaa..86107cc533 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php @@ -110,7 +110,7 @@ class XList extends Action } $response->dynamic(new Document([ - 'collections' => $tables, + 'tables' => $tables, 'total' => $total, ]), UtopiaResponse::MODEL_TABLE_LIST); } From 6cb44399c147cffe0dfb69dc0e4276da9230bdcd Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 10:57:54 +0530 Subject: [PATCH 029/362] update: services. --- app/config/services.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/services.php b/app/config/services.php index 7e4656a277..edc4024272 100644 --- a/app/config/services.php +++ b/app/config/services.php @@ -58,7 +58,7 @@ return [ 'name' => 'Databases', 'subtitle' => 'The Databases service allows you to create structured collections of documents, query and filter lists of documents', 'description' => '/docs/services/databases.md', - 'controller' => 'api/databases.php', + 'controller' => '', // Uses modules 'sdk' => true, 'docs' => true, 'docsUrl' => 'https://appwrite.io/docs/client/databases', From 71ad9c203e7d03be19958618a71ba234d34959ec Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 13:53:57 +0530 Subject: [PATCH 030/362] fix: response modals, mappings, filters. --- .../Databases/Http/Tables/Usage/Get.php | 4 +- src/Appwrite/Utopia/Request/Filters/V19.php | 19 +++-- src/Appwrite/Utopia/Response.php | 6 +- src/Appwrite/Utopia/Response/Filters/V19.php | 77 ++++++++++++++++++- .../Response/Model/ColumnRelationship.php | 4 +- src/Appwrite/Utopia/Response/Model/Table.php | 38 +++++++++ .../Utopia/Response/Model/UsageDatabase.php | 16 ++-- .../Utopia/Response/Model/UsageDatabases.php | 16 ++-- .../{UsageCollection.php => UsageTable.php} | 14 ++-- 9 files changed, 152 insertions(+), 42 deletions(-) rename src/Appwrite/Utopia/Response/Model/{UsageCollection.php => UsageTable.php} (77%) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php index b55fa84282..4c591bff1a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php @@ -47,7 +47,7 @@ class Get extends Action responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_USAGE_COLLECTION, + model: UtopiaResponse::MODEL_USAGE_TABLE, ) ], contentType: ContentType::JSON, @@ -126,6 +126,6 @@ class Get extends Action 'range' => $range, 'rows' => $usage[$metrics[0]]['data'], 'rowsTotal' => $usage[$metrics[0]]['total'], - ]), UtopiaResponse::MODEL_USAGE_COLLECTION); + ]), UtopiaResponse::MODEL_USAGE_TABLE); } } diff --git a/src/Appwrite/Utopia/Request/Filters/V19.php b/src/Appwrite/Utopia/Request/Filters/V19.php index 041c126a69..ee04cea038 100644 --- a/src/Appwrite/Utopia/Request/Filters/V19.php +++ b/src/Appwrite/Utopia/Request/Filters/V19.php @@ -9,15 +9,18 @@ class V19 extends Filter // Convert 1.6 params to 1.7 public function parse(array $content, string $model): array { - /* - Uncomment with first request filter; current is just a copy of V18 - switch ($model) { - case 'functions.create': - $content['something'] = $content['somethingElse'] ?? ""; - unset($content['something']); - break; + return match ($model) { + 'databases.createRelationshipColumn' => $this->convertV16RelationshipParams($content), + default => $content + }; + } + + protected function convertV16RelationshipParams(array $content): array + { + if (isset($content['relatedCollectionId'])) { + $content['relatedTableId'] = $content['relatedCollectionId']; + unset($content['relatedCollectionId']); } - */ return $content; } diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 2ea399c450..62822e9956 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -106,7 +106,6 @@ use Appwrite\Utopia\Response\Model\TemplateVariable; use Appwrite\Utopia\Response\Model\Token; use Appwrite\Utopia\Response\Model\Topic; use Appwrite\Utopia\Response\Model\UsageBuckets; -use Appwrite\Utopia\Response\Model\UsageCollection; use Appwrite\Utopia\Response\Model\UsageDatabase; use Appwrite\Utopia\Response\Model\UsageDatabases; use Appwrite\Utopia\Response\Model\UsageFunction; @@ -115,6 +114,7 @@ use Appwrite\Utopia\Response\Model\UsageProject; use Appwrite\Utopia\Response\Model\UsageSite; use Appwrite\Utopia\Response\Model\UsageSites; use Appwrite\Utopia\Response\Model\UsageStorage; +use Appwrite\Utopia\Response\Model\UsageTable; use Appwrite\Utopia\Response\Model\UsageUsers; use Appwrite\Utopia\Response\Model\User; use Appwrite\Utopia\Response\Model\Variable; @@ -147,7 +147,7 @@ class Response extends SwooleResponse public const MODEL_BASE_LIST = 'baseList'; public const MODEL_USAGE_DATABASES = 'usageDatabases'; public const MODEL_USAGE_DATABASE = 'usageDatabase'; - public const MODEL_USAGE_COLLECTION = 'usageCollection'; + public const MODEL_USAGE_TABLE = 'usageTable'; public const MODEL_USAGE_USERS = 'usageUsers'; public const MODEL_USAGE_BUCKETS = 'usageBuckets'; public const MODEL_USAGE_STORAGE = 'usageStorage'; @@ -508,7 +508,7 @@ class Response extends SwooleResponse ->setModel(new MetricBreakdown()) ->setModel(new UsageDatabases()) ->setModel(new UsageDatabase()) - ->setModel(new UsageCollection()) + ->setModel(new UsageTable()) ->setModel(new UsageUsers()) ->setModel(new UsageStorage()) ->setModel(new UsageBuckets()) diff --git a/src/Appwrite/Utopia/Response/Filters/V19.php b/src/Appwrite/Utopia/Response/Filters/V19.php index 2987c5a7e4..5e1a7e40e7 100644 --- a/src/Appwrite/Utopia/Response/Filters/V19.php +++ b/src/Appwrite/Utopia/Response/Filters/V19.php @@ -7,24 +7,93 @@ use Appwrite\Utopia\Response\Filter; class V19 extends Filter { + private const DATABASE_MAPPINGS = [ + 'table' => 'collection', + 'tables' => 'collections', + 'tablesTotal' => 'collectionsTotal', + 'relatedTable' => 'relatedCollection', + + 'column' => 'attribute', + 'columns' => 'attributes', + 'columnsTotal' => 'attributesTotal', + + 'row' => 'document', + 'rows' => 'documents', + 'rowsTotal' => 'documentsTotal' + ]; + // Convert 1.7 Data format to 1.6 format public function parse(array $content, string $model): array { $parsedResponse = $content; - $parsedResponse = match($model) { + return match ($model) { + Response::MODEL_ROW, + Response::MODEL_TABLE, + Response::MODEL_COLUMN, + Response::MODEL_ROW_LIST, + Response::MODEL_TABLE_LIST, + Response::MODEL_COLUMN_LIST, + Response::MODEL_USAGE_TABLE, + Response::MODEL_USAGE_DATABASE, + Response::MODEL_USAGE_DATABASES, + Response::MODEL_COLUMN_RELATIONSHIP => $this->handleDBTerminology($model, $content), + Response::MODEL_FUNCTION => $this->parseFunction($content), Response::MODEL_FUNCTION_LIST => $this->handleList($content, 'functions', fn ($item) => $this->parseFunction($item)), default => $parsedResponse, }; - - return $parsedResponse; } - protected function parseFunction(array $content) + protected function parseFunction(array $content): array { $content['deployment'] = $content['deploymentId'] ?? ''; unset($content['deploymentId']); return $content; } + + protected function handleDBTerminology(string $model, array $content): array + { + $isListModel = match ($model) { + Response::MODEL_ROW_LIST, + Response::MODEL_TABLE_LIST, + Response::MODEL_COLUMN_LIST => true, + + default => false + }; + + if ($isListModel) { + foreach (self::DATABASE_MAPPINGS as $oldKey => $newKey) { + if (isset($content[$oldKey])) { + $content[$newKey] = array_map(fn ($item) => $this->remapKeys($item), $content[$oldKey]); + unset($content[$oldKey]); + } + } + } else { + $content = $this->remapKeysRecursive($content); + } + + return $content; + } + + private function remapKeys(array $data): array + { + foreach (self::DATABASE_MAPPINGS as $old => $new) { + if (isset($data[$old])) { + $data[$new] = $data[$old]; + unset($data[$old]); + } + } + return $data; + } + + private function remapKeysRecursive(array $data): array + { + $result = []; + foreach ($data as $key => $value) { + $newKey = self::DATABASE_MAPPINGS[$key] ?? $key; + $result[$newKey] = \is_array($value) ? $this->remapKeysRecursive($value) : $value; + } + return $result; + } } diff --git a/src/Appwrite/Utopia/Response/Model/ColumnRelationship.php b/src/Appwrite/Utopia/Response/Model/ColumnRelationship.php index 2c5649b5bf..877982365b 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnRelationship.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnRelationship.php @@ -12,7 +12,7 @@ class ColumnRelationship extends Column parent::__construct(); $this - ->addRule('relatedCollection', [ + ->addRule('relatedTable', [ 'type' => self::TYPE_STRING, 'description' => 'The ID of the related table.', 'default' => null, @@ -84,7 +84,7 @@ class ColumnRelationship extends Column { $options = $document->getAttribute('options'); if (!\is_null($options)) { - $document->setAttribute('relatedCollection', $options['relatedCollection']); + $document->setAttribute('relatedTable', $options['relatedCollection']); $document->setAttribute('relationType', $options['relationType']); $document->setAttribute('twoWay', $options['twoWay']); $document->setAttribute('twoWayKey', $options['twoWayKey']); diff --git a/src/Appwrite/Utopia/Response/Model/Table.php b/src/Appwrite/Utopia/Response/Model/Table.php index d7098f313f..e36cb1dabd 100644 --- a/src/Appwrite/Utopia/Response/Model/Table.php +++ b/src/Appwrite/Utopia/Response/Model/Table.php @@ -4,6 +4,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; +use Utopia\Database\Document; class Table extends Model { @@ -106,4 +107,41 @@ class Table extends Model { return Response::MODEL_TABLE; } + + /** + * Process Document before returning it to the client for backwards compatibility! + */ + public function filter(Document $document): Document + { + $columns = $document->getAttribute('attributes', []); + if (!empty($columns) && \is_array($columns)) { + $columns = $this->remapNestedRelatedCollections($columns); + } + + $document + ->setAttribute('columns', $columns) + ->removeAttribute('attributes'); + + $related = $document->getAttribute('relatedCollection'); + if ($related !== null) { + $document + ->setAttribute('relatedTable', $related) + ->removeAttribute('relatedCollection'); + } + + return $document; + } + + // 1.7 now sends back `relatedTable` instead of `relatedCollection`. + // This is necessary because the actual database underneath uses `relatedCollection`. + private function remapNestedRelatedCollections(array $columns): array + { + foreach ($columns as $i => $column) { + if (isset($column['relatedCollection'])) { + $columns[$i]['relatedTable'] = $column['relatedCollection']; + unset($columns[$i]['relatedCollection']); + } + } + return $columns; + } } diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php index a0fe421f5f..a3212017a4 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php @@ -16,15 +16,15 @@ class UsageDatabase extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('collectionsTotal', [ + ->addRule('tablesTotal', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Total aggregated number of collections.', + 'description' => 'Total aggregated number of tables.', 'default' => 0, 'example' => 0, ]) - ->addRule('documentsTotal', [ + ->addRule('rowsTotal', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Total aggregated number of documents.', + 'description' => 'Total aggregated number of rows.', 'default' => 0, 'example' => 0, ]) @@ -46,16 +46,16 @@ class UsageDatabase extends Model 'default' => 0, 'example' => 0, ]) - ->addRule('collections', [ + ->addRule('tables', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated number of collections per period.', + 'description' => 'Aggregated number of tables per period.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('documents', [ + ->addRule('rows', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated number of documents per period.', + 'description' => 'Aggregated number of rows per period.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php index 4e053e5223..11392f6efb 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php @@ -22,15 +22,15 @@ class UsageDatabases extends Model 'default' => 0, 'example' => 0, ]) - ->addRule('collectionsTotal', [ + ->addRule('tablesTotal', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Total aggregated number of collections.', + 'description' => 'Total aggregated number of tables.', 'default' => 0, 'example' => 0, ]) - ->addRule('documentsTotal', [ + ->addRule('rowsTotal', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Total aggregated number of documents.', + 'description' => 'Total aggregated number of rows.', 'default' => 0, 'example' => 0, ]) @@ -59,16 +59,16 @@ class UsageDatabases extends Model 'example' => [], 'array' => true ]) - ->addRule('collections', [ + ->addRule('tables', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated number of collections per period.', + 'description' => 'Aggregated number of tables per period.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('documents', [ + ->addRule('rows', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated number of documents per period.', + 'description' => 'Aggregated number of rows per period.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageCollection.php b/src/Appwrite/Utopia/Response/Model/UsageTable.php similarity index 77% rename from src/Appwrite/Utopia/Response/Model/UsageCollection.php rename to src/Appwrite/Utopia/Response/Model/UsageTable.php index b2336d65ba..553a4b5001 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageCollection.php +++ b/src/Appwrite/Utopia/Response/Model/UsageTable.php @@ -5,7 +5,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; -class UsageCollection extends Model +class UsageTable extends Model { public function __construct() { @@ -16,15 +16,15 @@ class UsageCollection extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('documentsTotal', [ + ->addRule('rowsTotal', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Total aggregated number of of documents.', + 'description' => 'Total aggregated number of of rows.', 'default' => 0, 'example' => 0, ]) - ->addRule('documents', [ + ->addRule('rows', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated number of documents per period.', + 'description' => 'Aggregated number of rows per period.', 'default' => [], 'example' => [], 'array' => true @@ -39,7 +39,7 @@ class UsageCollection extends Model */ public function getName(): string { - return 'UsageCollection'; + return 'UsageTable'; } /** @@ -49,6 +49,6 @@ class UsageCollection extends Model */ public function getType(): string { - return Response::MODEL_USAGE_COLLECTION; + return Response::MODEL_USAGE_TABLE; } } From d30fd565733df843c038eb83b7ae418f09ac0901 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 14:04:39 +0530 Subject: [PATCH 031/362] patch: index module to use/specify `columns` instead of `attributes`. --- src/Appwrite/Utopia/Response/Model/Index.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Model/Index.php b/src/Appwrite/Utopia/Response/Model/Index.php index 2d795ad439..e18a9db334 100644 --- a/src/Appwrite/Utopia/Response/Model/Index.php +++ b/src/Appwrite/Utopia/Response/Model/Index.php @@ -4,6 +4,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; +use Utopia\Database\Document; class Index extends Model { @@ -34,7 +35,7 @@ class Index extends Model 'default' => '', 'example' => 'string', ]) - ->addRule('attributes', [ + ->addRule('columns', [ 'type' => self::TYPE_STRING, 'description' => 'Index attributes.', 'default' => [], @@ -78,4 +79,16 @@ class Index extends Model { return Response::MODEL_INDEX; } + + public function filter(Document $document): Document + { + + $columns = $document->getAttribute('attributes', []); + $document + ->removeAttribute('attributes') + ->setAttribute('columns', $columns); + + return $document; + + } } From e2202e9ffa8a9fdbffd93257e251b28d2c25ff2d Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 14:05:24 +0530 Subject: [PATCH 032/362] remove: old attributes anyway. --- src/Appwrite/Utopia/Response/Model/Table.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Model/Table.php b/src/Appwrite/Utopia/Response/Model/Table.php index e36cb1dabd..1855f471b1 100644 --- a/src/Appwrite/Utopia/Response/Model/Table.php +++ b/src/Appwrite/Utopia/Response/Model/Table.php @@ -118,17 +118,18 @@ class Table extends Model $columns = $this->remapNestedRelatedCollections($columns); } - $document - ->setAttribute('columns', $columns) - ->removeAttribute('attributes'); + $document->setAttribute('columns', $columns); $related = $document->getAttribute('relatedCollection'); if ($related !== null) { - $document - ->setAttribute('relatedTable', $related) - ->removeAttribute('relatedCollection'); + $document->setAttribute('relatedTable', $related); } + // remove anyways as they are already copied above. + $document + ->removeAttribute('attributes') + ->removeAttribute('relatedCollection'); + return $document; } From 75c9db8031bd0525053f879dbec13d11f7c5c43e Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 14:07:34 +0530 Subject: [PATCH 033/362] update: tests to use the 1.7.x changes on databases. --- .../e2e/Services/Databases/DatabasesBase.php | 326 +++++++++--------- .../Databases/DatabasesConsoleClientTest.php | 12 +- .../Databases/DatabasesCustomClientTest.php | 4 +- .../Databases/DatabasesCustomServerTest.php | 172 ++++----- .../DatabasesPermissionsGuestTest.php | 4 +- .../DatabasesPermissionsMemberTest.php | 4 +- .../DatabasesPermissionsTeamTest.php | 2 +- 7 files changed, 262 insertions(+), 262 deletions(-) diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 989d1217d3..14713a52ee 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -339,7 +339,7 @@ trait DatabasesBase $this->assertEquals($relationship['headers']['status-code'], 202); $this->assertEquals($relationship['body']['key'], 'starringActors'); $this->assertEquals($relationship['body']['type'], 'relationship'); - $this->assertEquals($relationship['body']['relatedCollection'], $data['actorsId']); + $this->assertEquals($relationship['body']['relatedTable'], $data['actorsId']); $this->assertEquals($relationship['body']['relationType'], 'oneToMany'); $this->assertEquals($relationship['body']['twoWay'], true); $this->assertEquals($relationship['body']['twoWayKey'], 'movie'); @@ -360,17 +360,17 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertIsArray($movies['body']['attributes']); - $this->assertCount(9, $movies['body']['attributes']); - $this->assertEquals($movies['body']['attributes'][0]['key'], $title['body']['key']); - $this->assertEquals($movies['body']['attributes'][1]['key'], $description['body']['key']); - $this->assertEquals($movies['body']['attributes'][2]['key'], $tagline['body']['key']); - $this->assertEquals($movies['body']['attributes'][3]['key'], $releaseYear['body']['key']); - $this->assertEquals($movies['body']['attributes'][4]['key'], $duration['body']['key']); - $this->assertEquals($movies['body']['attributes'][5]['key'], $actors['body']['key']); - $this->assertEquals($movies['body']['attributes'][6]['key'], $datetime['body']['key']); - $this->assertEquals($movies['body']['attributes'][7]['key'], $relationship['body']['key']); - $this->assertEquals($movies['body']['attributes'][8]['key'], $integers['body']['key']); + $this->assertIsArray($movies['body']['columns']); + $this->assertCount(9, $movies['body']['columns']); + $this->assertEquals($movies['body']['columns'][0]['key'], $title['body']['key']); + $this->assertEquals($movies['body']['columns'][1]['key'], $description['body']['key']); + $this->assertEquals($movies['body']['columns'][2]['key'], $tagline['body']['key']); + $this->assertEquals($movies['body']['columns'][3]['key'], $releaseYear['body']['key']); + $this->assertEquals($movies['body']['columns'][4]['key'], $duration['body']['key']); + $this->assertEquals($movies['body']['columns'][5]['key'], $actors['body']['key']); + $this->assertEquals($movies['body']['columns'][6]['key'], $datetime['body']['key']); + $this->assertEquals($movies['body']['columns'][7]['key'], $relationship['body']['key']); + $this->assertEquals($movies['body']['columns'][8]['key'], $integers['body']['key']); return $data; } @@ -393,7 +393,7 @@ trait DatabasesBase ], ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(2, \count($response['body']['attributes'])); + $this->assertEquals(2, \count($response['body']['columns'])); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/attributes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -449,7 +449,7 @@ trait DatabasesBase ]), [ 'key' => 'titleIndex', 'type' => 'key', - 'attributes' => ['title'], + 'columns' => ['title'], ]); $this->assertEquals(202, $index['headers']['status-code']); @@ -763,7 +763,7 @@ trait DatabasesBase $this->assertEquals('relationship', $relationship['body']['type']); $this->assertEquals(false, $relationship['body']['required']); $this->assertEquals(false, $relationship['body']['array']); - $this->assertEquals($data['actorsId'], $relationship['body']['relatedCollection']); + $this->assertEquals($data['actorsId'], $relationship['body']['relatedTable']); $this->assertEquals('oneToMany', $relationship['body']['relationType']); $this->assertEquals(true, $relationship['body']['twoWay']); $this->assertEquals('twoWayKey', $relationship['body']['twoWayKey']); @@ -947,7 +947,7 @@ trait DatabasesBase $this->assertEquals('available', $relationshipResponse['body']['status']); $this->assertEquals($relationship['body']['required'], $relationshipResponse['body']['required']); $this->assertEquals($relationship['body']['array'], $relationshipResponse['body']['array']); - $this->assertEquals($relationship['body']['relatedCollection'], $relationshipResponse['body']['relatedCollection']); + $this->assertEquals($relationship['body']['relatedTable'], $relationshipResponse['body']['relatedTable']); $this->assertEquals($relationship['body']['relationType'], $relationshipResponse['body']['relationType']); $this->assertEquals($relationship['body']['twoWay'], $relationshipResponse['body']['twoWay']); $this->assertEquals($relationship['body']['twoWayKey'], $relationshipResponse['body']['twoWayKey']); @@ -961,7 +961,7 @@ trait DatabasesBase $this->assertEquals(200, $attributes['headers']['status-code']); $this->assertEquals(12, $attributes['body']['total']); - $attributes = $attributes['body']['attributes']; + $attributes = $attributes['body']['columns']; $this->assertIsArray($attributes); $this->assertCount(12, $attributes); @@ -1043,7 +1043,7 @@ trait DatabasesBase $this->assertEquals($relationshipResponse['body']['status'], $attributes[9]['status']); $this->assertEquals($relationshipResponse['body']['required'], $attributes[9]['required']); $this->assertEquals($relationshipResponse['body']['array'], $attributes[9]['array']); - $this->assertEquals($relationshipResponse['body']['relatedCollection'], $attributes[9]['relatedCollection']); + $this->assertEquals($relationshipResponse['body']['relatedTable'], $attributes[9]['relatedTable']); $this->assertEquals($relationshipResponse['body']['relationType'], $attributes[9]['relationType']); $this->assertEquals($relationshipResponse['body']['twoWay'], $attributes[9]['twoWay']); $this->assertEquals($relationshipResponse['body']['twoWayKey'], $attributes[9]['twoWayKey']); @@ -1072,7 +1072,7 @@ trait DatabasesBase $this->assertEquals(200, $collection['headers']['status-code']); - $attributes = $collection['body']['attributes']; + $attributes = $collection['body']['columns']; $this->assertIsArray($attributes); $this->assertCount(12, $attributes); @@ -1155,7 +1155,7 @@ trait DatabasesBase $this->assertEquals($relationshipResponse['body']['status'], $attributes[9]['status']); $this->assertEquals($relationshipResponse['body']['required'], $attributes[9]['required']); $this->assertEquals($relationshipResponse['body']['array'], $attributes[9]['array']); - $this->assertEquals($relationshipResponse['body']['relatedCollection'], $attributes[9]['relatedCollection']); + $this->assertEquals($relationshipResponse['body']['relatedTable'], $attributes[9]['relatedTable']); $this->assertEquals($relationshipResponse['body']['relationType'], $attributes[9]['relationType']); $this->assertEquals($relationshipResponse['body']['twoWay'], $attributes[9]['twoWay']); $this->assertEquals($relationshipResponse['body']['twoWayKey'], $attributes[9]['twoWayKey']); @@ -1210,14 +1210,14 @@ trait DatabasesBase ]), [ 'key' => 'titleIndex', 'type' => 'fulltext', - 'attributes' => ['title'], + 'columns' => ['title'], ]); $this->assertEquals(202, $titleIndex['headers']['status-code']); $this->assertEquals('titleIndex', $titleIndex['body']['key']); $this->assertEquals('fulltext', $titleIndex['body']['type']); - $this->assertCount(1, $titleIndex['body']['attributes']); - $this->assertEquals('title', $titleIndex['body']['attributes'][0]); + $this->assertCount(1, $titleIndex['body']['columns']); + $this->assertEquals('title', $titleIndex['body']['columns'][0]); $releaseYearIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1226,14 +1226,14 @@ trait DatabasesBase ]), [ 'key' => 'releaseYear', 'type' => 'key', - 'attributes' => ['releaseYear'], + 'columns' => ['releaseYear'], ]); $this->assertEquals(202, $releaseYearIndex['headers']['status-code']); $this->assertEquals('releaseYear', $releaseYearIndex['body']['key']); $this->assertEquals('key', $releaseYearIndex['body']['type']); - $this->assertCount(1, $releaseYearIndex['body']['attributes']); - $this->assertEquals('releaseYear', $releaseYearIndex['body']['attributes'][0]); + $this->assertCount(1, $releaseYearIndex['body']['columns']); + $this->assertEquals('releaseYear', $releaseYearIndex['body']['columns'][0]); $releaseWithDate1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1242,16 +1242,16 @@ trait DatabasesBase ]), [ 'key' => 'releaseYearDated', 'type' => 'key', - 'attributes' => ['releaseYear', '$createdAt', '$updatedAt'], + 'columns' => ['releaseYear', '$createdAt', '$updatedAt'], ]); $this->assertEquals(202, $releaseWithDate1['headers']['status-code']); $this->assertEquals('releaseYearDated', $releaseWithDate1['body']['key']); $this->assertEquals('key', $releaseWithDate1['body']['type']); - $this->assertCount(3, $releaseWithDate1['body']['attributes']); - $this->assertEquals('releaseYear', $releaseWithDate1['body']['attributes'][0]); - $this->assertEquals('$createdAt', $releaseWithDate1['body']['attributes'][1]); - $this->assertEquals('$updatedAt', $releaseWithDate1['body']['attributes'][2]); + $this->assertCount(3, $releaseWithDate1['body']['columns']); + $this->assertEquals('releaseYear', $releaseWithDate1['body']['columns'][0]); + $this->assertEquals('$createdAt', $releaseWithDate1['body']['columns'][1]); + $this->assertEquals('$updatedAt', $releaseWithDate1['body']['columns'][2]); $releaseWithDate2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1260,14 +1260,14 @@ trait DatabasesBase ]), [ 'key' => 'birthDay', 'type' => 'key', - 'attributes' => ['birthDay'], + 'columns' => ['birthDay'], ]); $this->assertEquals(202, $releaseWithDate2['headers']['status-code']); $this->assertEquals('birthDay', $releaseWithDate2['body']['key']); $this->assertEquals('key', $releaseWithDate2['body']['type']); - $this->assertCount(1, $releaseWithDate2['body']['attributes']); - $this->assertEquals('birthDay', $releaseWithDate2['body']['attributes'][0]); + $this->assertCount(1, $releaseWithDate2['body']['columns']); + $this->assertEquals('birthDay', $releaseWithDate2['body']['columns'][0]); // Test for failure $fulltextReleaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ @@ -1277,7 +1277,7 @@ trait DatabasesBase ]), [ 'key' => 'releaseYearDated', 'type' => 'fulltext', - 'attributes' => ['releaseYear'], + 'columns' => ['releaseYear'], ]); $this->assertEquals(400, $fulltextReleaseYear['headers']['status-code']); @@ -1290,7 +1290,7 @@ trait DatabasesBase ]), [ 'key' => 'none', 'type' => 'key', - 'attributes' => [], + 'columns' => [], ]); $this->assertEquals(400, $noAttributes['headers']['status-code']); @@ -1303,7 +1303,7 @@ trait DatabasesBase ]), [ 'key' => 'duplicate', 'type' => 'fulltext', - 'attributes' => ['releaseYear', 'releaseYear'], + 'columns' => ['releaseYear', 'releaseYear'], ]); $this->assertEquals(400, $duplicates['headers']['status-code']); @@ -1316,7 +1316,7 @@ trait DatabasesBase ]), [ 'key' => 'tooLong', 'type' => 'key', - 'attributes' => ['description', 'tagline'], + 'columns' => ['description', 'tagline'], ]); $this->assertEquals(400, $tooLong['headers']['status-code']); @@ -1329,7 +1329,7 @@ trait DatabasesBase ]), [ 'key' => 'ft', 'type' => 'fulltext', - 'attributes' => ['actors'], + 'columns' => ['actors'], ]); $this->assertEquals(400, $fulltextArray['headers']['status-code']); @@ -1342,7 +1342,7 @@ trait DatabasesBase ]), [ 'key' => 'index-actors', 'type' => 'key', - 'attributes' => ['actors'], + 'columns' => ['actors'], ]); $this->assertEquals(202, $actorsArray['headers']['status-code']); @@ -1354,7 +1354,7 @@ trait DatabasesBase ]), [ 'key' => 'index-ip-actors', 'type' => 'key', - 'attributes' => ['releaseYear', 'actors'], // 2 levels + 'columns' => ['releaseYear', 'actors'], // 2 levels 'orders' => ['DESC', 'DESC'], ]); @@ -1369,7 +1369,7 @@ trait DatabasesBase ]), [ 'key' => 'index-unknown', 'type' => 'key', - 'attributes' => ['Unknown'], + 'columns' => ['Unknown'], ]); $this->assertEquals(400, $unknown['headers']['status-code']); @@ -1382,7 +1382,7 @@ trait DatabasesBase ]), [ 'key' => 'integers-order', 'type' => 'key', - 'attributes' => ['integers'], // array attribute + 'columns' => ['integers'], // array attribute 'orders' => ['DESC'], // Check order is removed in API ]); $this->assertEquals(202, $index1['headers']['status-code']); @@ -1394,7 +1394,7 @@ trait DatabasesBase ]), [ 'key' => 'integers-size', 'type' => 'key', - 'attributes' => ['integers'], // array attribute + 'columns' => ['integers'], // array attribute ]); $this->assertEquals(202, $index2['headers']['status-code']); @@ -1612,15 +1612,15 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(1944, $documents['body']['documents'][0]['releaseYear']); - $this->assertEquals(2017, $documents['body']['documents'][1]['releaseYear']); - $this->assertEquals(2019, $documents['body']['documents'][2]['releaseYear']); - $this->assertFalse(array_key_exists('$internalId', $documents['body']['documents'][0])); - $this->assertFalse(array_key_exists('$internalId', $documents['body']['documents'][1])); - $this->assertFalse(array_key_exists('$internalId', $documents['body']['documents'][2])); - $this->assertCount(3, $documents['body']['documents']); + $this->assertEquals(1944, $documents['body']['rows'][0]['releaseYear']); + $this->assertEquals(2017, $documents['body']['rows'][1]['releaseYear']); + $this->assertEquals(2019, $documents['body']['rows'][2]['releaseYear']); + $this->assertFalse(array_key_exists('$internalId', $documents['body']['rows'][0])); + $this->assertFalse(array_key_exists('$internalId', $documents['body']['rows'][1])); + $this->assertFalse(array_key_exists('$internalId', $documents['body']['rows'][2])); + $this->assertCount(3, $documents['body']['rows']); - foreach ($documents['body']['documents'] as $document) { + foreach ($documents['body']['rows'] as $document) { $this->assertEquals($data['moviesId'], $document['$collectionId']); $this->assertArrayNotHasKey('$collection', $document); $this->assertEquals($databaseId, $document['$databaseId']); @@ -1636,10 +1636,10 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(1944, $documents['body']['documents'][2]['releaseYear']); - $this->assertEquals(2017, $documents['body']['documents'][1]['releaseYear']); - $this->assertEquals(2019, $documents['body']['documents'][0]['releaseYear']); - $this->assertCount(3, $documents['body']['documents']); + $this->assertEquals(1944, $documents['body']['rows'][2]['releaseYear']); + $this->assertEquals(2017, $documents['body']['rows'][1]['releaseYear']); + $this->assertEquals(2019, $documents['body']['rows'][0]['releaseYear']); + $this->assertCount(3, $documents['body']['rows']); // changing description attribute to be null by default instead of empty string $patchNull = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/attributes/string/description', array_merge([ @@ -1685,7 +1685,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - return ['documents' => $documents['body']['documents'], 'databaseId' => $databaseId]; + return ['rows' => $documents['body']['rows'], 'databaseId' => $databaseId]; } @@ -1695,7 +1695,7 @@ trait DatabasesBase public function testGetDocument(array $data): void { $databaseId = $data['databaseId']; - foreach ($data['documents'] as $document) { + foreach ($data['rows'] as $document) { $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$collectionId'] . '/documents/' . $document['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1721,7 +1721,7 @@ trait DatabasesBase public function testGetDocumentWithQueries(array $data): void { $databaseId = $data['databaseId']; - $document = $data['documents'][0]; + $document = $data['rows'][0]; $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$collectionId'] . '/documents/' . $document['$id'], array_merge([ 'content-type' => 'application/json', @@ -1753,36 +1753,36 @@ trait DatabasesBase ], $this->getHeaders())); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertEquals('Captain America', $base['body']['documents'][0]['title']); - $this->assertEquals('Spider-Man: Far From Home', $base['body']['documents'][1]['title']); - $this->assertEquals('Spider-Man: Homecoming', $base['body']['documents'][2]['title']); - $this->assertCount(3, $base['body']['documents']); + $this->assertEquals('Captain America', $base['body']['rows'][0]['title']); + $this->assertEquals('Spider-Man: Far From Home', $base['body']['rows'][1]['title']); + $this->assertEquals('Spider-Man: Homecoming', $base['body']['rows'][2]['title']); + $this->assertCount(3, $base['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorAfter(new Document(['$id' => $base['body']['documents'][0]['$id']]))->toString() + Query::cursorAfter(new Document(['$id' => $base['body']['rows'][0]['$id']]))->toString() ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals($base['body']['documents'][1]['$id'], $documents['body']['documents'][0]['$id']); - $this->assertEquals($base['body']['documents'][2]['$id'], $documents['body']['documents'][1]['$id']); - $this->assertCount(2, $documents['body']['documents']); + $this->assertEquals($base['body']['rows'][1]['$id'], $documents['body']['rows'][0]['$id']); + $this->assertEquals($base['body']['rows'][2]['$id'], $documents['body']['rows'][1]['$id']); + $this->assertCount(2, $documents['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorAfter(new Document(['$id' => $base['body']['documents'][2]['$id']]))->toString() + Query::cursorAfter(new Document(['$id' => $base['body']['rows'][2]['$id']]))->toString() ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEmpty($documents['body']['documents']); + $this->assertEmpty($documents['body']['rows']); /** * Test with ASC order and after. @@ -1797,24 +1797,24 @@ trait DatabasesBase ]); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertEquals(1944, $base['body']['documents'][0]['releaseYear']); - $this->assertEquals(2017, $base['body']['documents'][1]['releaseYear']); - $this->assertEquals(2019, $base['body']['documents'][2]['releaseYear']); - $this->assertCount(3, $base['body']['documents']); + $this->assertEquals(1944, $base['body']['rows'][0]['releaseYear']); + $this->assertEquals(2017, $base['body']['rows'][1]['releaseYear']); + $this->assertEquals(2019, $base['body']['rows'][2]['releaseYear']); + $this->assertCount(3, $base['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorAfter(new Document(['$id' => $base['body']['documents'][1]['$id']]))->toString(), + Query::cursorAfter(new Document(['$id' => $base['body']['rows'][1]['$id']]))->toString(), Query::orderAsc('releaseYear')->toString() ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals($base['body']['documents'][2]['$id'], $documents['body']['documents'][0]['$id']); - $this->assertCount(1, $documents['body']['documents']); + $this->assertEquals($base['body']['rows'][2]['$id'], $documents['body']['rows'][0]['$id']); + $this->assertCount(1, $documents['body']['rows']); /** * Test with DESC order and after. @@ -1829,24 +1829,24 @@ trait DatabasesBase ]); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertEquals(1944, $base['body']['documents'][2]['releaseYear']); - $this->assertEquals(2017, $base['body']['documents'][1]['releaseYear']); - $this->assertEquals(2019, $base['body']['documents'][0]['releaseYear']); - $this->assertCount(3, $base['body']['documents']); + $this->assertEquals(1944, $base['body']['rows'][2]['releaseYear']); + $this->assertEquals(2017, $base['body']['rows'][1]['releaseYear']); + $this->assertEquals(2019, $base['body']['rows'][0]['releaseYear']); + $this->assertCount(3, $base['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorAfter(new Document(['$id' => $base['body']['documents'][1]['$id']]))->toString(), + Query::cursorAfter(new Document(['$id' => $base['body']['rows'][1]['$id']]))->toString(), Query::orderDesc('releaseYear')->toString() ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals($base['body']['documents'][2]['$id'], $documents['body']['documents'][0]['$id']); - $this->assertCount(1, $documents['body']['documents']); + $this->assertEquals($base['body']['rows'][2]['$id'], $documents['body']['rows'][0]['$id']); + $this->assertCount(1, $documents['body']['rows']); /** * Test after with unknown document. @@ -1895,36 +1895,36 @@ trait DatabasesBase ], $this->getHeaders())); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertEquals('Captain America', $base['body']['documents'][0]['title']); - $this->assertEquals('Spider-Man: Far From Home', $base['body']['documents'][1]['title']); - $this->assertEquals('Spider-Man: Homecoming', $base['body']['documents'][2]['title']); - $this->assertCount(3, $base['body']['documents']); + $this->assertEquals('Captain America', $base['body']['rows'][0]['title']); + $this->assertEquals('Spider-Man: Far From Home', $base['body']['rows'][1]['title']); + $this->assertEquals('Spider-Man: Homecoming', $base['body']['rows'][2]['title']); + $this->assertCount(3, $base['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorBefore(new Document(['$id' => $base['body']['documents'][2]['$id']]))->toString(), + Query::cursorBefore(new Document(['$id' => $base['body']['rows'][2]['$id']]))->toString(), ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals($base['body']['documents'][0]['$id'], $documents['body']['documents'][0]['$id']); - $this->assertEquals($base['body']['documents'][1]['$id'], $documents['body']['documents'][1]['$id']); - $this->assertCount(2, $documents['body']['documents']); + $this->assertEquals($base['body']['rows'][0]['$id'], $documents['body']['rows'][0]['$id']); + $this->assertEquals($base['body']['rows'][1]['$id'], $documents['body']['rows'][1]['$id']); + $this->assertCount(2, $documents['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorBefore(new Document(['$id' => $base['body']['documents'][0]['$id']]))->toString(), + Query::cursorBefore(new Document(['$id' => $base['body']['rows'][0]['$id']]))->toString(), ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEmpty($documents['body']['documents']); + $this->assertEmpty($documents['body']['rows']); /** * Test with ASC order and after. @@ -1939,24 +1939,24 @@ trait DatabasesBase ]); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertEquals(1944, $base['body']['documents'][0]['releaseYear']); - $this->assertEquals(2017, $base['body']['documents'][1]['releaseYear']); - $this->assertEquals(2019, $base['body']['documents'][2]['releaseYear']); - $this->assertCount(3, $base['body']['documents']); + $this->assertEquals(1944, $base['body']['rows'][0]['releaseYear']); + $this->assertEquals(2017, $base['body']['rows'][1]['releaseYear']); + $this->assertEquals(2019, $base['body']['rows'][2]['releaseYear']); + $this->assertCount(3, $base['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorBefore(new Document(['$id' => $base['body']['documents'][1]['$id']]))->toString(), + Query::cursorBefore(new Document(['$id' => $base['body']['rows'][1]['$id']]))->toString(), Query::orderAsc('releaseYear')->toString(), ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals($base['body']['documents'][0]['$id'], $documents['body']['documents'][0]['$id']); - $this->assertCount(1, $documents['body']['documents']); + $this->assertEquals($base['body']['rows'][0]['$id'], $documents['body']['rows'][0]['$id']); + $this->assertCount(1, $documents['body']['rows']); /** * Test with DESC order and after. @@ -1971,24 +1971,24 @@ trait DatabasesBase ]); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertEquals(1944, $base['body']['documents'][2]['releaseYear']); - $this->assertEquals(2017, $base['body']['documents'][1]['releaseYear']); - $this->assertEquals(2019, $base['body']['documents'][0]['releaseYear']); - $this->assertCount(3, $base['body']['documents']); + $this->assertEquals(1944, $base['body']['rows'][2]['releaseYear']); + $this->assertEquals(2017, $base['body']['rows'][1]['releaseYear']); + $this->assertEquals(2019, $base['body']['rows'][0]['releaseYear']); + $this->assertCount(3, $base['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorBefore(new Document(['$id' => $base['body']['documents'][1]['$id']]))->toString(), + Query::cursorBefore(new Document(['$id' => $base['body']['rows'][1]['$id']]))->toString(), Query::orderDesc('releaseYear')->toString(), ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals($base['body']['documents'][0]['$id'], $documents['body']['documents'][0]['$id']); - $this->assertCount(1, $documents['body']['documents']); + $this->assertEquals($base['body']['rows'][0]['$id'], $documents['body']['rows'][0]['$id']); + $this->assertCount(1, $documents['body']['rows']); return []; } @@ -2010,8 +2010,8 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(1944, $documents['body']['documents'][0]['releaseYear']); - $this->assertCount(1, $documents['body']['documents']); + $this->assertEquals(1944, $documents['body']['rows'][0]['releaseYear']); + $this->assertCount(1, $documents['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2025,9 +2025,9 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(2017, $documents['body']['documents'][0]['releaseYear']); - $this->assertEquals(2019, $documents['body']['documents'][1]['releaseYear']); - $this->assertCount(2, $documents['body']['documents']); + $this->assertEquals(2017, $documents['body']['rows'][0]['releaseYear']); + $this->assertEquals(2019, $documents['body']['rows'][1]['releaseYear']); + $this->assertCount(2, $documents['body']['rows']); return []; } @@ -2048,21 +2048,21 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(1944, $documents['body']['documents'][0]['releaseYear']); - $this->assertCount(1, $documents['body']['documents']); + $this->assertEquals(1944, $documents['body']['rows'][0]['releaseYear']); + $this->assertCount(1, $documents['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::equal('$id', [$documents['body']['documents'][0]['$id']])->toString(), + Query::equal('$id', [$documents['body']['rows'][0]['$id']])->toString(), ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(1944, $documents['body']['documents'][0]['releaseYear']); - $this->assertCount(1, $documents['body']['documents']); + $this->assertEquals(1944, $documents['body']['rows'][0]['releaseYear']); + $this->assertCount(1, $documents['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2074,8 +2074,8 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(2017, $documents['body']['documents'][0]['releaseYear']); - $this->assertCount(1, $documents['body']['documents']); + $this->assertEquals(2017, $documents['body']['rows'][0]['releaseYear']); + $this->assertCount(1, $documents['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2087,9 +2087,9 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(2019, $documents['body']['documents'][0]['releaseYear']); - $this->assertEquals(2017, $documents['body']['documents'][1]['releaseYear']); - $this->assertCount(2, $documents['body']['documents']); + $this->assertEquals(2019, $documents['body']['rows'][0]['releaseYear']); + $this->assertEquals(2017, $documents['body']['rows'][1]['releaseYear']); + $this->assertCount(2, $documents['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2124,8 +2124,8 @@ trait DatabasesBase ], ]); - $this->assertCount(1, $documents['body']['documents']); - $this->assertEquals('Captain America', $documents['body']['documents'][0]['title']); + $this->assertCount(1, $documents['body']['rows']); + $this->assertEquals('Captain America', $documents['body']['rows'][0]['title']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2136,9 +2136,9 @@ trait DatabasesBase ], ]); - $this->assertCount(2, $documents['body']['documents']); - $this->assertEquals('Spider-Man: Far From Home', $documents['body']['documents'][0]['title']); - $this->assertEquals('Spider-Man: Homecoming', $documents['body']['documents'][1]['title']); + $this->assertCount(2, $documents['body']['rows']); + $this->assertEquals('Spider-Man: Far From Home', $documents['body']['rows'][0]['title']); + $this->assertEquals('Spider-Man: Homecoming', $documents['body']['rows'][1]['title']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2149,7 +2149,7 @@ trait DatabasesBase ], ]); - $this->assertCount(3, $documents['body']['documents']); + $this->assertCount(3, $documents['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2160,7 +2160,7 @@ trait DatabasesBase ], ]); - $this->assertCount(0, $documents['body']['documents']); + $this->assertCount(0, $documents['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2208,9 +2208,9 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals('1975-06-12T12:12:55.000+00:00', $documents['body']['documents'][0]['birthDay']); - $this->assertEquals('1975-06-12T18:12:55.000+00:00', $documents['body']['documents'][1]['birthDay']); - $this->assertCount(2, $documents['body']['documents']); + $this->assertEquals('1975-06-12T12:12:55.000+00:00', $documents['body']['rows'][0]['birthDay']); + $this->assertEquals('1975-06-12T18:12:55.000+00:00', $documents['body']['rows'][1]['birthDay']); + $this->assertCount(2, $documents['body']['rows']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2682,7 +2682,7 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'], ]), []); - $this->assertCount(10, $collection['body']['attributes']); + $this->assertCount(10, $collection['body']['columns']); /** * Test for successful validation @@ -3187,7 +3187,7 @@ trait DatabasesBase ]), [ 'key' => 'key_attribute', 'type' => 'key', - 'attributes' => [$attribute['body']['key']], + 'columns' => [$attribute['body']['key']], ]); $this->assertEquals(202, $index['headers']['status-code']); @@ -3253,7 +3253,7 @@ trait DatabasesBase // Current user has read permission on the collection so can get any document $this->assertEquals(3, $documentsUser1['body']['total']); - $this->assertCount(3, $documentsUser1['body']['documents']); + $this->assertCount(3, $documentsUser1['body']['rows']); $document3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $document3['body']['$id'], array_merge([ 'content-type' => 'application/json', @@ -3315,7 +3315,7 @@ trait DatabasesBase // Current user has no collection permissions but has read permission for one document $this->assertEquals(1, $documentsUser2['body']['total']); - $this->assertCount(1, $documentsUser2['body']['documents']); + $this->assertCount(1, $documentsUser2['body']['rows']); } public function testEnforceCollectionPermissions() @@ -3376,7 +3376,7 @@ trait DatabasesBase ]), [ 'key' => 'key_attribute', 'type' => 'key', - 'attributes' => [$attribute['body']['key']], + 'columns' => [$attribute['body']['key']], ]); $this->assertEquals(202, $index['headers']['status-code']); @@ -3441,7 +3441,7 @@ trait DatabasesBase // Current user has read permission on the collection so can get any document $this->assertEquals(3, $documentsUser1['body']['total']); - $this->assertCount(3, $documentsUser1['body']['documents']); + $this->assertCount(3, $documentsUser1['body']['rows']); $document3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $document3['body']['$id'], array_merge([ 'content-type' => 'application/json', @@ -3513,7 +3513,7 @@ trait DatabasesBase // Current user has no collection permissions read access to one document $this->assertEquals(1, $documentsUser2['body']['total']); - $this->assertCount(1, $documentsUser2['body']['documents']); + $this->assertCount(1, $documentsUser2['body']['rows']); } /** @@ -3529,7 +3529,7 @@ trait DatabasesBase ]), [ 'key' => 'unique_title', 'type' => 'unique', - 'attributes' => ['title'], + 'columns' => ['title'], ]); $this->assertEquals(202, $uniqueIndex['headers']['status-code']); @@ -3929,8 +3929,8 @@ trait DatabasesBase $this->assertEquals(200, $attributes['headers']['status-code']); $this->assertEquals(2, $attributes['body']['total']); - $attributes = $attributes['body']['attributes']; - $this->assertEquals('library', $attributes[1]['relatedCollection']); + $attributes = $attributes['body']['columns']; + $this->assertEquals('library', $attributes[1]['relatedTable']); $this->assertEquals('oneToOne', $attributes[1]['relationType']); $this->assertEquals(true, $attributes[1]['twoWay']); $this->assertEquals('person', $attributes[1]['twoWayKey']); @@ -4019,8 +4019,8 @@ trait DatabasesBase ]); $this->assertEquals(1, $documents['body']['total']); - $this->assertEquals('Library 1', $documents['body']['documents'][0]['library']['libraryName']); - $this->assertArrayHasKey('fullName', $documents['body']['documents'][0]); + $this->assertEquals('Library 1', $documents['body']['rows'][0]['library']['libraryName']); + $this->assertArrayHasKey('fullName', $documents['body']['rows'][0]); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -4068,7 +4068,7 @@ trait DatabasesBase $this->assertEquals(200, $attributes['headers']['status-code']); $this->assertEquals(1, $attributes['body']['total']); - $this->assertEquals('libraryName', $attributes['body']['attributes'][0]['key']); + $this->assertEquals('libraryName', $attributes['body']['columns'][0]['key']); return [ 'databaseId' => $databaseId, @@ -4107,9 +4107,9 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertIsArray($libraryAttributesResponse['body']['attributes']); + $this->assertIsArray($libraryAttributesResponse['body']['columns']); $this->assertEquals(2, $libraryAttributesResponse['body']['total']); - $this->assertEquals('person_one_to_many', $libraryAttributesResponse['body']['attributes'][1]['key']); + $this->assertEquals('person_one_to_many', $libraryAttributesResponse['body']['columns'][1]['key']); $libraryCollectionResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $libraryCollection, array_merge([ 'content-type' => 'application/json', @@ -4117,8 +4117,8 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertIsArray($libraryCollectionResponse['body']['attributes']); - $this->assertCount(2, $libraryCollectionResponse['body']['attributes']); + $this->assertIsArray($libraryCollectionResponse['body']['columns']); + $this->assertCount(2, $libraryCollectionResponse['body']['columns']); $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/collections/{$personCollection}/attributes/libraries", array_merge([ 'content-type' => 'application/json', @@ -4541,10 +4541,10 @@ trait DatabasesBase ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(1, count($response['body']['documents'])); - $this->assertEquals('person10', $response['body']['documents'][0]['$id']); - $this->assertEquals('Stevie Wonder', $response['body']['documents'][0]['fullName']); - $this->assertEquals(2, count($response['body']['documents'][0]['libraries'])); + $this->assertEquals(1, count($response['body']['rows'])); + $this->assertEquals('person10', $response['body']['rows'][0]['$id']); + $this->assertEquals('Stevie Wonder', $response['body']['rows'][0]['fullName']); + $this->assertEquals(2, count($response['body']['rows'][0]['libraries'])); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -4558,11 +4558,11 @@ trait DatabasesBase ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(2, count($response['body']['documents'])); - $this->assertEquals(null, $response['body']['documents'][0]['fullName']); - $this->assertArrayNotHasKey("libraries", $response['body']['documents'][0]); - $this->assertArrayNotHasKey('$databaseId', $response['body']['documents'][0]); - $this->assertArrayNotHasKey('$collectionId', $response['body']['documents'][0]); + $this->assertEquals(2, count($response['body']['rows'])); + $this->assertEquals(null, $response['body']['rows'][0]['fullName']); + $this->assertArrayNotHasKey("libraries", $response['body']['rows'][0]); + $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); + $this->assertArrayNotHasKey('$collectionId', $response['body']['rows'][0]); } /** @@ -4581,9 +4581,9 @@ trait DatabasesBase ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertArrayNotHasKey('libraries', $response['body']['documents'][0]); - $this->assertArrayNotHasKey('$databaseId', $response['body']['documents'][0]); - $this->assertArrayNotHasKey('$collectionId', $response['body']['documents'][0]); + $this->assertArrayNotHasKey('libraries', $response['body']['rows'][0]); + $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); + $this->assertArrayNotHasKey('$collectionId', $response['body']['rows'][0]); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -4593,7 +4593,7 @@ trait DatabasesBase Query::select(['libraries.*', '$id'])->toString(), ], ]); - $document = $response['body']['documents'][0]; + $document = $response['body']['rows'][0]; $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayHasKey('libraries', $document); $this->assertArrayNotHasKey('$databaseId', $document); @@ -4746,7 +4746,7 @@ trait DatabasesBase ); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertCount(2, $documents['body']['documents']); + $this->assertCount(2, $documents['body']['rows']); } /** diff --git a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php index 2266c91afe..04daddd47a 100644 --- a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php @@ -226,10 +226,10 @@ class DatabasesConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(11, count($response['body'])); $this->assertEquals('24h', $response['body']['range']); - $this->assertIsNumeric($response['body']['documentsTotal']); - $this->assertIsNumeric($response['body']['collectionsTotal']); - $this->assertIsArray($response['body']['collections']); - $this->assertIsArray($response['body']['documents']); + $this->assertIsNumeric($response['body']['rowsTotal']); + $this->assertIsNumeric($response['body']['tablesTotal']); + $this->assertIsArray($response['body']['tables']); + $this->assertIsArray($response['body']['rows']); } @@ -273,8 +273,8 @@ class DatabasesConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(3, count($response['body'])); $this->assertEquals('24h', $response['body']['range']); - $this->assertIsNumeric($response['body']['documentsTotal']); - $this->assertIsArray($response['body']['documents']); + $this->assertIsNumeric($response['body']['rowsTotal']); + $this->assertIsArray($response['body']['rows']); } /** diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index d4a8c87868..6caeb3ca8b 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -309,11 +309,11 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $collection1RelationAttribute = $collection1Attributes['body']['attributes'][0]; + $collection1RelationAttribute = $collection1Attributes['body']['columns'][0]; $this->assertEquals($relation['body']['side'], $collection1RelationAttribute['side']); $this->assertEquals($relation['body']['twoWayKey'], $collection1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedCollection'], $collection1RelationAttribute['relatedCollection']); + $this->assertEquals($relation['body']['relatedTable'], $collection1RelationAttribute['relatedTable']); $this->assertEquals('restrict', $collection1RelationAttribute['onDelete']); } diff --git a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php index 57e0b93634..7e5da78ccd 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php @@ -390,12 +390,12 @@ class DatabasesCustomServerTest extends Scope ], $this->getHeaders())); $this->assertEquals(2, $collections['body']['total']); - $this->assertEquals($test1['body']['$id'], $collections['body']['collections'][0]['$id']); - $this->assertEquals($test1['body']['enabled'], $collections['body']['collections'][0]['enabled']); - $this->assertEquals($test2['body']['$id'], $collections['body']['collections'][1]['$id']); - $this->assertEquals($test1['body']['enabled'], $collections['body']['collections'][0]['enabled']); + $this->assertEquals($test1['body']['$id'], $collections['body']['tables'][0]['$id']); + $this->assertEquals($test1['body']['enabled'], $collections['body']['tables'][0]['enabled']); + $this->assertEquals($test2['body']['$id'], $collections['body']['tables'][1]['$id']); + $this->assertEquals($test1['body']['enabled'], $collections['body']['tables'][0]['enabled']); - $base = array_reverse($collections['body']['collections']); + $base = array_reverse($collections['body']['tables']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', @@ -407,7 +407,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collections['headers']['status-code']); - $this->assertCount(1, $collections['body']['collections']); + $this->assertCount(1, $collections['body']['tables']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', @@ -419,7 +419,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collections['headers']['status-code']); - $this->assertCount(1, $collections['body']['collections']); + $this->assertCount(1, $collections['body']['tables']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', @@ -431,7 +431,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collections['headers']['status-code']); - $this->assertCount(2, $collections['body']['collections']); + $this->assertCount(2, $collections['body']['tables']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', @@ -443,7 +443,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collections['headers']['status-code']); - $this->assertCount(0, $collections['body']['collections']); + $this->assertCount(0, $collections['body']['tables']); /** * Test for Order @@ -458,8 +458,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(2, $collections['body']['total']); - $this->assertEquals($base[0]['$id'], $collections['body']['collections'][0]['$id']); - $this->assertEquals($base[1]['$id'], $collections['body']['collections'][1]['$id']); + $this->assertEquals($base[0]['$id'], $collections['body']['tables'][0]['$id']); + $this->assertEquals($base[1]['$id'], $collections['body']['tables'][1]['$id']); /** * Test for After @@ -474,24 +474,24 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorAfter(new Document(['$id' => $base['body']['collections'][0]['$id']]))->toString(), + Query::cursorAfter(new Document(['$id' => $base['body']['tables'][0]['$id']]))->toString(), ], ]); - $this->assertCount(1, $collections['body']['collections']); - $this->assertEquals($base['body']['collections'][1]['$id'], $collections['body']['collections'][0]['$id']); + $this->assertCount(1, $collections['body']['tables']); + $this->assertEquals($base['body']['tables'][1]['$id'], $collections['body']['tables'][0]['$id']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorAfter(new Document(['$id' => $base['body']['collections'][1]['$id']]))->toString(), + Query::cursorAfter(new Document(['$id' => $base['body']['tables'][1]['$id']]))->toString(), ], ]); - $this->assertCount(0, $collections['body']['collections']); - $this->assertEmpty($collections['body']['collections']); + $this->assertCount(0, $collections['body']['tables']); + $this->assertEmpty($collections['body']['tables']); /** * Test for Before @@ -506,24 +506,24 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorBefore(new Document(['$id' => $base['body']['collections'][1]['$id']]))->toString(), + Query::cursorBefore(new Document(['$id' => $base['body']['tables'][1]['$id']]))->toString(), ], ]); - $this->assertCount(1, $collections['body']['collections']); - $this->assertEquals($base['body']['collections'][0]['$id'], $collections['body']['collections'][0]['$id']); + $this->assertCount(1, $collections['body']['tables']); + $this->assertEquals($base['body']['tables'][0]['$id'], $collections['body']['tables'][0]['$id']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorBefore(new Document(['$id' => $base['body']['collections'][0]['$id']]))->toString(), + Query::cursorBefore(new Document(['$id' => $base['body']['tables'][0]['$id']]))->toString(), ], ]); - $this->assertCount(0, $collections['body']['collections']); - $this->assertEmpty($collections['body']['collections']); + $this->assertCount(0, $collections['body']['tables']); + $this->assertEmpty($collections['body']['tables']); /** * Test for Search @@ -536,7 +536,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(1, $collections['body']['total']); - $this->assertEquals('first', $collections['body']['collections'][0]['$id']); + $this->assertEquals('first', $collections['body']['tables'][0]['$id']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', @@ -546,8 +546,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(2, $collections['body']['total']); - $this->assertEquals('Test 1', $collections['body']['collections'][0]['name']); - $this->assertEquals('Test 2', $collections['body']['collections'][1]['name']); + $this->assertEquals('Test 1', $collections['body']['tables'][0]['name']); + $this->assertEquals('Test 2', $collections['body']['tables'][1]['name']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', @@ -840,7 +840,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'key_lastName', 'type' => 'key', - 'attributes' => [ + 'columns' => [ 'lastName', ], ]); @@ -857,11 +857,11 @@ class DatabasesCustomServerTest extends Scope $unneededId = $unneeded['body']['key']; $this->assertEquals(200, $collection['headers']['status-code']); - $this->assertIsArray($collection['body']['attributes']); - $this->assertCount(3, $collection['body']['attributes']); - $this->assertEquals($collection['body']['attributes'][0]['key'], $firstName['body']['key']); - $this->assertEquals($collection['body']['attributes'][1]['key'], $lastName['body']['key']); - $this->assertEquals($collection['body']['attributes'][2]['key'], $unneeded['body']['key']); + $this->assertIsArray($collection['body']['columns']); + $this->assertCount(3, $collection['body']['columns']); + $this->assertEquals($collection['body']['columns'][0]['key'], $firstName['body']['key']); + $this->assertEquals($collection['body']['columns'][1]['key'], $lastName['body']['key']); + $this->assertEquals($collection['body']['columns'][2]['key'], $unneeded['body']['key']); $this->assertCount(1, $collection['body']['indexes']); $this->assertEquals($collection['body']['indexes'][0]['key'], $index['body']['key']); @@ -892,10 +892,10 @@ class DatabasesCustomServerTest extends Scope ]), []); $this->assertEquals(200, $collection['headers']['status-code']); - $this->assertIsArray($collection['body']['attributes']); - $this->assertCount(2, $collection['body']['attributes']); - $this->assertEquals($collection['body']['attributes'][0]['key'], $firstName['body']['key']); - $this->assertEquals($collection['body']['attributes'][1]['key'], $lastName['body']['key']); + $this->assertIsArray($collection['body']['columns']); + $this->assertCount(2, $collection['body']['columns']); + $this->assertEquals($collection['body']['columns'][0]['key'], $firstName['body']['key']); + $this->assertEquals($collection['body']['columns'][1]['key'], $lastName['body']['key']); return [ 'collectionId' => $actors['body']['$id'], @@ -972,7 +972,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'index1', 'type' => 'key', - 'attributes' => ['attribute1', 'attribute2'], + 'columns' => ['attribute1', 'attribute2'], 'orders' => ['ASC', 'ASC'], ]); @@ -983,7 +983,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'index2', 'type' => 'key', - 'attributes' => ['attribute2'], + 'columns' => ['attribute2'], ]); $this->assertEquals(202, $index1['headers']['status-code']); @@ -1015,9 +1015,9 @@ class DatabasesCustomServerTest extends Scope $this->assertIsArray($collection['body']['indexes']); $this->assertCount(1, $collection['body']['indexes']); $this->assertEquals($index1['body']['key'], $collection['body']['indexes'][0]['key']); - $this->assertIsArray($collection['body']['indexes'][0]['attributes']); - $this->assertCount(1, $collection['body']['indexes'][0]['attributes']); - $this->assertEquals($attribute1['body']['key'], $collection['body']['indexes'][0]['attributes'][0]); + $this->assertIsArray($collection['body']['indexes'][0]['columns']); + $this->assertCount(1, $collection['body']['indexes'][0]['columns']); + $this->assertEquals($attribute1['body']['key'], $collection['body']['indexes'][0]['columns'][0]); // Delete attribute $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/attributes/' . $attribute1['body']['key'], array_merge([ @@ -1100,7 +1100,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'index1', 'type' => 'key', - 'attributes' => ['attribute1', 'attribute2'], + 'columns' => ['attribute1', 'attribute2'], 'orders' => ['ASC', 'ASC'], ]); @@ -1111,7 +1111,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'index2', 'type' => 'key', - 'attributes' => ['attribute2'], + 'columns' => ['attribute2'], ]); $this->assertEquals(202, $index1['headers']['status-code']); @@ -1143,9 +1143,9 @@ class DatabasesCustomServerTest extends Scope $this->assertIsArray($collection['body']['indexes']); $this->assertCount(1, $collection['body']['indexes']); $this->assertEquals($index2['body']['key'], $collection['body']['indexes'][0]['key']); - $this->assertIsArray($collection['body']['indexes'][0]['attributes']); - $this->assertCount(1, $collection['body']['indexes'][0]['attributes']); - $this->assertEquals($attribute2['body']['key'], $collection['body']['indexes'][0]['attributes'][0]); + $this->assertIsArray($collection['body']['indexes'][0]['columns']); + $this->assertCount(1, $collection['body']['indexes'][0]['columns']); + $this->assertEquals($attribute2['body']['key'], $collection['body']['indexes'][0]['columns'][0]); // Delete attribute $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/' . $attribute2['body']['key'], array_merge([ @@ -1426,12 +1426,12 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $collection['headers']['status-code']); $this->assertEquals($collection['body']['name'], 'testLimitException'); - $this->assertIsArray($collection['body']['attributes']); + $this->assertIsArray($collection['body']['columns']); $this->assertIsArray($collection['body']['indexes']); - $this->assertCount(64, $collection['body']['attributes']); + $this->assertCount(64, $collection['body']['columns']); $this->assertCount(0, $collection['body']['indexes']); - foreach ($collection['body']['attributes'] as $attribute) { + foreach ($collection['body']['columns'] as $attribute) { $this->assertEquals('available', $attribute['status'], 'attribute: ' . $attribute['key']); } @@ -1446,7 +1446,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => "key_attribute{$i}", 'type' => 'key', - 'attributes' => ["attribute{$i}"], + 'columns' => ["attribute{$i}"], ]); $this->assertEquals(202, $index['headers']['status-code']); @@ -1463,9 +1463,9 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $collection['headers']['status-code']); $this->assertEquals($collection['body']['name'], 'testLimitException'); - $this->assertIsArray($collection['body']['attributes']); + $this->assertIsArray($collection['body']['columns']); $this->assertIsArray($collection['body']['indexes']); - $this->assertCount(64, $collection['body']['attributes']); + $this->assertCount(64, $collection['body']['columns']); $this->assertCount(58, $collection['body']['indexes']); $tooMany = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/indexes', array_merge([ @@ -1475,7 +1475,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'tooMany', 'type' => 'key', - 'attributes' => ['attribute61'], + 'columns' => ['attribute61'], ]); $this->assertEquals(400, $tooMany['headers']['status-code']); @@ -1681,7 +1681,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals('lorem', $attribute['default']); @@ -1823,7 +1823,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals('torsten@appwrite.io', $attribute['default']); @@ -1966,7 +1966,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals('127.0.0.1', $attribute['default']); @@ -2108,7 +2108,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals('http://appwrite.io', $attribute['default']); @@ -2254,7 +2254,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals(123, $attribute['default']); @@ -2515,7 +2515,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals(123.456, $attribute['default']); @@ -2772,7 +2772,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals(true, $attribute['default']); @@ -2914,7 +2914,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals('1975-06-12 14:12:55+02:00', $attribute['default']); @@ -3061,7 +3061,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals('lorem', $attribute['default']); @@ -3700,11 +3700,11 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $collection1RelationAttribute = $collection1Attributes['body']['attributes'][0]; + $collection1RelationAttribute = $collection1Attributes['body']['columns'][0]; $this->assertEquals($relation['body']['side'], $collection1RelationAttribute['side']); $this->assertEquals($relation['body']['twoWayKey'], $collection1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedCollection'], $collection1RelationAttribute['relatedCollection']); + $this->assertEquals($relation['body']['relatedTable'], $collection1RelationAttribute['relatedTable']); // Create a document for checking later $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1Id . '/documents', array_merge([ @@ -3764,8 +3764,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection1Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection1Attributes['body']['attributes'])); - $this->assertEquals('new_level_2', $collection1Attributes['body']['attributes'][0]['key']); + $this->assertEquals(1, count($collection1Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $collection1Attributes['body']['columns'][0]['key']); // Check if attribute was renamed on the child's side $collection2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2Id, [ @@ -3775,8 +3775,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection2Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection2Attributes['body']['attributes'])); - $this->assertEquals('new_level_2', $collection2Attributes['body']['attributes'][0]['twoWayKey']); + $this->assertEquals(1, count($collection2Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $collection2Attributes['body']['columns'][0]['twoWayKey']); $this->cleanupRelationshipCollection(); } @@ -3810,11 +3810,11 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $collection1RelationAttribute = $collection1Attributes['body']['attributes'][0]; + $collection1RelationAttribute = $collection1Attributes['body']['columns'][0]; $this->assertEquals($relation['body']['side'], $collection1RelationAttribute['side']); $this->assertEquals($relation['body']['twoWayKey'], $collection1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedCollection'], $collection1RelationAttribute['relatedCollection']); + $this->assertEquals($relation['body']['relatedTable'], $collection1RelationAttribute['relatedTable']); // Create a document for checking later $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1Id . '/documents', array_merge([ @@ -3874,8 +3874,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection1Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection1Attributes['body']['attributes'])); - $this->assertEquals('new_level_2', $collection1Attributes['body']['attributes'][0]['key']); + $this->assertEquals(1, count($collection1Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $collection1Attributes['body']['columns'][0]['key']); // Check if attribute was renamed on the child's side $collection2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2Id, [ @@ -3885,8 +3885,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection2Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection2Attributes['body']['attributes'])); - $this->assertEquals('new_level_2', $collection2Attributes['body']['attributes'][0]['twoWayKey']); + $this->assertEquals(1, count($collection2Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $collection2Attributes['body']['columns'][0]['twoWayKey']); $this->cleanupRelationshipCollection(); } @@ -3920,11 +3920,11 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $collection1RelationAttribute = $collection1Attributes['body']['attributes'][0]; + $collection1RelationAttribute = $collection1Attributes['body']['columns'][0]; $this->assertEquals($relation['body']['side'], $collection1RelationAttribute['side']); $this->assertEquals($relation['body']['twoWayKey'], $collection1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedCollection'], $collection1RelationAttribute['relatedCollection']); + $this->assertEquals($relation['body']['relatedTable'], $collection1RelationAttribute['relatedTable']); // Create a document for checking later $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1Id . '/documents', array_merge([ @@ -3984,8 +3984,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection1Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection1Attributes['body']['attributes'])); - $this->assertEquals('new_level_2', $collection1Attributes['body']['attributes'][0]['key']); + $this->assertEquals(1, count($collection1Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $collection1Attributes['body']['columns'][0]['key']); // Check if attribute was renamed on the child's side $collection2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2Id, [ @@ -3995,8 +3995,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection2Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection2Attributes['body']['attributes'])); - $this->assertEquals('new_level_2', $collection2Attributes['body']['attributes'][0]['twoWayKey']); + $this->assertEquals(1, count($collection2Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $collection2Attributes['body']['columns'][0]['twoWayKey']); $this->cleanupRelationshipCollection(); } @@ -4030,11 +4030,11 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $collection1RelationAttribute = $collection1Attributes['body']['attributes'][0]; + $collection1RelationAttribute = $collection1Attributes['body']['columns'][0]; $this->assertEquals($relation['body']['side'], $collection1RelationAttribute['side']); $this->assertEquals($relation['body']['twoWayKey'], $collection1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedCollection'], $collection1RelationAttribute['relatedCollection']); + $this->assertEquals($relation['body']['relatedTable'], $collection1RelationAttribute['relatedTable']); // Create a document for checking later $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1Id . '/documents', array_merge([ @@ -4094,8 +4094,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection1Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection1Attributes['body']['attributes'])); - $this->assertEquals('new_level_2', $collection1Attributes['body']['attributes'][0]['key']); + $this->assertEquals(1, count($collection1Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $collection1Attributes['body']['columns'][0]['key']); // Check if attribute was renamed on the child's side $collection2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2Id, [ @@ -4105,8 +4105,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection2Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection2Attributes['body']['attributes'])); - $this->assertEquals('new_level_2', $collection2Attributes['body']['attributes'][0]['twoWayKey']); + $this->assertEquals(1, count($collection2Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $collection2Attributes['body']['columns'][0]['twoWayKey']); $this->cleanupRelationshipCollection(); } diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php b/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php index ca8753f374..9e20e13c2a 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php @@ -124,11 +124,11 @@ class DatabasesPermissionsGuestTest extends Scope ]); $this->assertEquals(1, $publicDocuments['body']['total']); - $this->assertEquals($permissions, $publicDocuments['body']['documents'][0]['$permissions']); + $this->assertEquals($permissions, $publicDocuments['body']['rows'][0]['$permissions']); if (\in_array(Permission::read(Role::any()), $permissions)) { $this->assertEquals(1, $privateDocuments['body']['total']); - $this->assertEquals($permissions, $privateDocuments['body']['documents'][0]['$permissions']); + $this->assertEquals($permissions, $privateDocuments['body']['rows'][0]['$permissions']); } else { $this->assertEquals(0, $privateDocuments['body']['total']); } diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php b/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php index 860fb7fb12..239fa58c99 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php @@ -186,7 +186,7 @@ class DatabasesPermissionsMemberTest extends Scope return [ 'users' => $this->users, - 'collections' => $this->collections, + 'tables' => $this->collections, 'databaseId' => $databaseId ]; } @@ -199,7 +199,7 @@ class DatabasesPermissionsMemberTest extends Scope public function testReadDocuments($permissions, $anyCount, $usersCount, $docOnlyCount, $data) { $users = $data['users']; - $collections = $data['collections']; + $collections = $data['tables']; $databaseId = $data['databaseId']; $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collections['public'] . '/documents', $this->getServerHeader(), [ diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php b/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php index 066d83a7ee..9b0a04ac27 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php +++ b/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php @@ -174,7 +174,7 @@ class DatabasesPermissionsTeamTest extends Scope ]); if ($success) { - $this->assertCount(1, $documents['body']['documents']); + $this->assertCount(1, $documents['body']['rows']); } else { $this->assertEquals(401, $documents['headers']['status-code']); } From 37fb34ae1207275892cf7116d0a18f840c75d4cf Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 14:33:27 +0530 Subject: [PATCH 034/362] wip: events compat based on version. --- app/controllers/shared/api.php | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 8c15f27acc..ba695acff4 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -483,10 +483,26 @@ App::init() /* * Background Jobs */ + $events = $route->getLabel('event', ''); $queueForEvents - ->setEvent($route->getLabel('event', '')) - ->setProject($project) - ->setUser($user); + ->setUser($user) + ->setEvent($events) + ->setProject($project); + + if (str_contains($events, '.tables.')) { + $requestFormat = $request->getHeader('x-appwrite-response-format', System::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', '')); + if ($requestFormat && version_compare($requestFormat, '1.7.0', '<')) { + $map = [ + 'rows' => 'documents', + 'tables' => 'collections', + 'columns' => 'attributes', + ]; + + $compatibleEvents = str_replace(array_keys($map), array_values($map), $events); + // override the events + $queueForEvents->setEvent($compatibleEvents); + } + } $queueForAudits ->setMode($mode) From b905af91af8f55071328e46ab59dbeb8ca63eeb0 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 14:43:09 +0530 Subject: [PATCH 035/362] fix: project usage `documents` to `rows`. --- app/controllers/api/project.php | 2 +- src/Appwrite/Utopia/Response/Model/UsageProject.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 047179b888..97475c743a 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -353,7 +353,7 @@ App::get('/v1/project/usage') 'executionsTotal' => $total[METRIC_EXECUTIONS], 'executionsMbSecondsTotal' => $total[METRIC_EXECUTIONS_MB_SECONDS], 'buildsMbSecondsTotal' => $total[METRIC_BUILDS_MB_SECONDS], - 'documentsTotal' => $total[METRIC_DOCUMENTS], + 'rowsTotal' => $total[METRIC_DOCUMENTS], 'databasesTotal' => $total[METRIC_DATABASES], 'databasesStorageTotal' => $total[METRIC_DATABASES_STORAGE], 'usersTotal' => $total[METRIC_USERS], diff --git a/src/Appwrite/Utopia/Response/Model/UsageProject.php b/src/Appwrite/Utopia/Response/Model/UsageProject.php index 395b19b7cd..b79cd85bed 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageProject.php +++ b/src/Appwrite/Utopia/Response/Model/UsageProject.php @@ -16,9 +16,9 @@ class UsageProject extends Model 'default' => 0, 'example' => 0, ]) - ->addRule('documentsTotal', [ + ->addRule('rowsTotal', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Total aggregated number of documents.', + 'description' => 'Total aggregated number of rows.', 'default' => 0, 'example' => 0, ]) From 67a8f522e5d9ae147807a9fcd8b2c74bdfd08313 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 14:45:55 +0530 Subject: [PATCH 036/362] fix: project and general usage tests. --- tests/e2e/General/UsageTest.php | 48 +++++++++---------- .../Projects/ProjectsConsoleClientTest.php | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 5549ef800d..0c27a76311 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -416,8 +416,8 @@ class UsageTest extends Scope $requestsTotal = $data['requestsTotal']; $databasesTotal = 0; - $collectionsTotal = 0; - $documentsTotal = 0; + $tablesTotal = 0; + $rowsTotal = 0; for ($i = 0; $i < self::CREATE; $i++) { $name = uniqid() . ' database'; @@ -470,7 +470,7 @@ class UsageTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ - 'collectionId' => 'unique()', + 'tableId' => 'unique()', 'name' => $name, 'documentSecurity' => false, 'permissions' => [ @@ -486,7 +486,7 @@ class UsageTest extends Scope $this->assertNotEmpty($response['body']['$id']); $requestsTotal += 1; - $collectionsTotal += 1; + $tablesTotal += 1; $collectionId = $response['body']['$id']; @@ -501,7 +501,7 @@ class UsageTest extends Scope $this->assertEmpty($response['body']); - $collectionsTotal -= 1; + $tablesTotal -= 1; $requestsTotal += 1; } } @@ -546,7 +546,7 @@ class UsageTest extends Scope $this->assertNotEmpty($response['body']['$id']); $requestsTotal += 1; - $documentsTotal += 1; + $rowsTotal += 1; $documentId = $response['body']['$id']; @@ -561,18 +561,18 @@ class UsageTest extends Scope $this->assertEmpty($response['body']); - $documentsTotal -= 1; + $rowsTotal -= 1; $requestsTotal += 1; } } return array_merge($data, [ 'databaseId' => $databaseId, - 'collectionId' => $collectionId, + 'tableId' => $collectionId, 'requestsTotal' => $requestsTotal, 'databasesTotal' => $databasesTotal, - 'collectionsTotal' => $collectionsTotal, - 'documentsTotal' => $documentsTotal, + 'tablesTotal' => $tablesTotal, + 'rowsTotal' => $rowsTotal, ]); } @@ -581,11 +581,11 @@ class UsageTest extends Scope public function testDatabaseStats(array $data): array { $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $requestsTotal = $data['requestsTotal']; $databasesTotal = $data['databasesTotal']; - $collectionsTotal = $data['collectionsTotal']; - $documentsTotal = $data['documentsTotal']; + $tablesTotal = $data['tablesTotal']; + $rowsTotal = $data['rowsTotal']; sleep(self::WAIT); @@ -606,7 +606,7 @@ class UsageTest extends Scope $this->assertEquals($requestsTotal, $response['body']['requests'][array_key_last($response['body']['requests'])]['value']); $this->validateDates($response['body']['requests']); $this->assertEquals($databasesTotal, $response['body']['databasesTotal']); - $this->assertEquals($documentsTotal, $response['body']['documentsTotal']); + $this->assertEquals($rowsTotal, $response['body']['rowsTotal']); $response = $this->client->call( Client::METHOD_GET, @@ -616,10 +616,10 @@ class UsageTest extends Scope $this->assertEquals($databasesTotal, $response['body']['databases'][array_key_last($response['body']['databases'])]['value']); $this->validateDates($response['body']['databases']); - $this->assertEquals($collectionsTotal, $response['body']['collections'][array_key_last($response['body']['collections'])]['value']); - $this->validateDates($response['body']['collections']); - $this->assertEquals($documentsTotal, $response['body']['documents'][array_key_last($response['body']['documents'])]['value']); - $this->validateDates($response['body']['documents']); + $this->assertEquals($tablesTotal, $response['body']['tables'][array_key_last($response['body']['tables'])]['value']); + $this->validateDates($response['body']['tables']); + $this->assertEquals($rowsTotal, $response['body']['rows'][array_key_last($response['body']['rows'])]['value']); + $this->validateDates($response['body']['rows']); $response = $this->client->call( Client::METHOD_GET, @@ -627,11 +627,11 @@ class UsageTest extends Scope $this->getConsoleHeaders() ); - $this->assertEquals($collectionsTotal, $response['body']['collections'][array_key_last($response['body']['collections'])]['value']); - $this->validateDates($response['body']['collections']); + $this->assertEquals($tablesTotal, $response['body']['tables'][array_key_last($response['body']['tables'])]['value']); + $this->validateDates($response['body']['tables']); - $this->assertEquals($documentsTotal, $response['body']['documents'][array_key_last($response['body']['documents'])]['value']); - $this->validateDates($response['body']['documents']); + $this->assertEquals($rowsTotal, $response['body']['rows'][array_key_last($response['body']['rows'])]['value']); + $this->validateDates($response['body']['rows']); $response = $this->client->call( Client::METHOD_GET, @@ -639,8 +639,8 @@ class UsageTest extends Scope $this->getConsoleHeaders() ); - $this->assertEquals($documentsTotal, $response['body']['documents'][array_key_last($response['body']['documents'])]['value']); - $this->validateDates($response['body']['documents']); + $this->assertEquals($rowsTotal, $response['body']['rows'][array_key_last($response['body']['rows'])]['value']); + $this->validateDates($response['body']['rows']); return $data; } diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index c66a581b1a..c864773535 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -483,7 +483,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertIsArray($response['body']['requests']); $this->assertIsArray($response['body']['network']); $this->assertIsNumeric($response['body']['executionsTotal']); - $this->assertIsNumeric($response['body']['documentsTotal']); + $this->assertIsNumeric($response['body']['rowsTotal']); $this->assertIsNumeric($response['body']['databasesTotal']); $this->assertIsNumeric($response['body']['bucketsTotal']); $this->assertIsNumeric($response['body']['usersTotal']); From 565e6b2ad8bfb8fb2685fad630cd5115708e0a70 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 17:03:17 +0530 Subject: [PATCH 037/362] fix: migrations test <> csv imports. --- tests/e2e/Services/Migrations/MigrationsBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index c241b38e3d..208bd58731 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -1176,7 +1176,7 @@ trait MigrationsBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertIsArray($documents['body']['documents']); + $this->assertIsArray($documents['body']['rows']); $this->assertIsNumeric($documents['body']['total']); $this->assertEquals($documentsCountInCSV, $documents['body']['total']); } From 56077d59f72398369dda3771f23a3f8fb0cd3d31 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 10:51:11 +0530 Subject: [PATCH 038/362] fix: graphql tests. --- app/init/resources.php | 8 ++-- src/Appwrite/GraphQL/Types/Mapper.php | 26 ++++++------- .../Modules/Databases/Http/Tables/XList.php | 2 +- .../Request/Filters/DatabaseAliases.php | 3 +- tests/e2e/Services/GraphQL/Base.php | 38 +++++++++---------- 5 files changed, 39 insertions(+), 38 deletions(-) diff --git a/app/init/resources.php b/app/init/resources.php index 3a1539e59b..7657b9ea69 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -721,8 +721,8 @@ App::setResource('schema', function ($utopia, $dbForProject) { // Order must be the same as the route params return [ 'databaseId' => $databaseId, - 'documentId' => $id, - 'collectionId' => $collectionId, + 'rowId' => $id, + 'tableId' => $collectionId, 'data' => $args, 'permissions' => $permissions, ]; @@ -737,8 +737,8 @@ App::setResource('schema', function ($utopia, $dbForProject) { // Order must be the same as the route params return [ 'databaseId' => $databaseId, - 'collectionId' => $collectionId, - 'documentId' => $documentId, + 'tableId' => $collectionId, + 'rowId' => $documentId, 'data' => $args, 'permissions' => $permissions, ]; diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index e5056d0abc..8cfad823af 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -418,8 +418,8 @@ class Mapper // TODO: Find a better way to do this switch ($name) { - case 'Attributes': - return static::getAttributeImplementation($object); + case 'Columns': + return static::getColumnImplementation($object); case 'HashOptions': return static::getHashOptionsImplementation($object); } @@ -427,29 +427,29 @@ class Mapper throw new Exception('Unknown union type: ' . $name); } - private static function getAttributeImplementation(array $object): Type + private static function getColumnImplementation(array $object): Type { switch ($object['type']) { case 'string': return match ($object['format'] ?? '') { - 'email' => static::model('AttributeEmail'), - 'url' => static::model('AttributeUrl'), - 'ip' => static::model('AttributeIp'), - default => static::model('AttributeString'), + 'email' => static::model('ColumnEmail'), + 'url' => static::model('ColumnUrl'), + 'ip' => static::model('ColumnIp'), + default => static::model('ColumnString'), }; case 'integer': - return static::model('AttributeInteger'); + return static::model('ColumnInteger'); case 'double': - return static::model('AttributeFloat'); + return static::model('ColumnFloat'); case 'boolean': - return static::model('AttributeBoolean'); + return static::model('ColumnBoolean'); case 'datetime': - return static::model('AttributeDatetime'); + return static::model('ColumnDatetime'); case 'relationship': - return static::model('AttributeRelationship'); + return static::model('ColumnRelationship'); } - throw new Exception('Unknown attribute implementation'); + throw new Exception('Unknown column implementation'); } private static function getHashOptionsImplementation(array $object): Type diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php index 86107cc533..055102415d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php @@ -49,7 +49,7 @@ class XList extends Action responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_TABLE, + model: UtopiaResponse::MODEL_TABLE_LIST, ) ], contentType: ContentType::JSON diff --git a/src/Appwrite/Utopia/Request/Filters/DatabaseAliases.php b/src/Appwrite/Utopia/Request/Filters/DatabaseAliases.php index b2b772be11..0ee2754475 100644 --- a/src/Appwrite/Utopia/Request/Filters/DatabaseAliases.php +++ b/src/Appwrite/Utopia/Request/Filters/DatabaseAliases.php @@ -12,7 +12,8 @@ class DatabaseAliases extends Filter 'attributes' => 'columns', 'collectionId' => 'tableId', 'attributeId' => 'columnId', - 'relatedCollectionId' => 'relatedTableId' + 'relatedCollection' => 'relatedTable', + 'relatedCollectionId' => 'relatedTableId', ]; public function parse(array $content, string $model): array diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 95f446cf6f..7c91cf67f7 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -259,8 +259,8 @@ trait Base // Fragments public static string $FRAGMENT_COLUMNS = ' - fragment attributeProperties on Attributes { - ... on AttributeString { + fragment columnProperties on Columns { + ... on ColumnString { key required array @@ -268,7 +268,7 @@ trait Base default size } - ... on AttributeInteger { + ... on ColumnInteger { key required array @@ -277,7 +277,7 @@ trait Base intMin: min intMax: max } - ... on AttributeFloat { + ... on ColumnFloat { key required array @@ -286,35 +286,35 @@ trait Base floatMin: min floatMax: max } - ... on AttributeBoolean { + ... on ColumnBoolean { key required array status boolDefault:default } - ... on AttributeUrl { + ... on ColumnUrl { key required array status default } - ... on AttributeEmail { + ... on ColumnEmail { key required array status default } - ... on AttributeIp { + ... on ColumnIp { key required array status default } - ... on AttributeEnum { + ... on ColumnEnum { key required array @@ -322,7 +322,7 @@ trait Base default elements } - ... on AttributeDatetime { + ... on ColumnDatetime { key required array @@ -406,7 +406,7 @@ trait Base return 'query listTables($databaseId: String!) { databasesListTables(databaseId: $databaseId) { total - collections { + tables { _id _permissions documentSecurity @@ -527,7 +527,7 @@ trait Base case self::$CREATE_RELATIONSHIP_COLUMN: return 'mutation createRelationshipColumn($databaseId: String!, $tableId: String!, $relatedTableId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ databasesCreateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, relatedTableId: $relatedTableId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { - relatedCollection + relatedTable relationType twoWay key @@ -606,7 +606,7 @@ trait Base case self::$UPDATE_RELATIONSHIP_COLUMN: return 'mutation updateRelationshipColumn($databaseId: String!, $tableId: String!, $key: String!, $onDelete: String){ databasesUpdateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, key: $key, onDelete: $onDelete) { - relatedCollection + relatedTable relationType twoWay key @@ -651,15 +651,15 @@ trait Base return 'query listColumns($databaseId: String!, $tableId: String!) { databasesListColumns(databaseId: $databaseId, tableId: $tableId) { total - attributes { - ...attributeProperties + columns { + ...columnProperties } } }' . PHP_EOL . self::$FRAGMENT_COLUMNS; case self::$GET_COLUMN: return 'query getColumn($databaseId: String!, $tableId: String!, $key: String!) { databasesGetColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { - ...attributeProperties + ...columnProperties } }' . PHP_EOL . self::$FRAGMENT_COLUMNS; case self::$DELETE_COLUMN: @@ -681,7 +681,7 @@ trait Base return 'query listRows($databaseId: String!, $tableId: String!){ databasesListRows(databaseId: $databaseId, tableId: $tableId) { total - documents { + rows { _id _collectionId _permissions @@ -2259,8 +2259,8 @@ trait Base _databaseId name documentSecurity - attributes { - ...attributeProperties + columns { + ...columnProperties } indexes { key From 9e1105b61f71b357adf5871bf57bebc9dff40061 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 11:29:56 +0530 Subject: [PATCH 039/362] update: tests. --- tests/e2e/General/AbuseTest.php | 16 +- tests/e2e/General/UsageTest.php | 2 +- .../e2e/Services/Databases/DatabasesBase.php | 152 +++++++++--------- .../Databases/DatabasesConsoleClientTest.php | 4 +- .../Databases/DatabasesCustomClientTest.php | 62 +++---- .../Databases/DatabasesCustomServerTest.php | 120 +++++++------- .../DatabasesPermissionsGuestTest.php | 18 +-- .../DatabasesPermissionsMemberTest.php | 12 +- .../DatabasesPermissionsTeamTest.php | 10 +- tests/e2e/Services/GraphQL/AbuseTest.php | 14 +- tests/e2e/Services/GraphQL/Base.php | 8 +- .../Services/Migrations/MigrationsBase.php | 14 +- .../Realtime/RealtimeConsoleClientTest.php | 4 +- .../Realtime/RealtimeCustomClientTest.php | 14 +- tests/e2e/Services/Webhooks/WebhooksBase.php | 12 +- .../Webhooks/WebhooksCustomServerTest.php | 4 +- 16 files changed, 233 insertions(+), 233 deletions(-) diff --git a/tests/e2e/General/AbuseTest.php b/tests/e2e/General/AbuseTest.php index 898fbd4aff..2ef351f43e 100644 --- a/tests/e2e/General/AbuseTest.php +++ b/tests/e2e/General/AbuseTest.php @@ -30,7 +30,7 @@ class AbuseTest extends Scope { $data = $this->createCollection(); $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $max = 120; for ($i = 0; $i <= $max + 1; $i++) { @@ -38,7 +38,7 @@ class AbuseTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'The Hulk ' . $i, ], @@ -56,7 +56,7 @@ class AbuseTest extends Scope { $data = $this->createCollection(); $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $max = 120; $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', [ @@ -64,7 +64,7 @@ class AbuseTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ], [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'The Hulk', ], @@ -94,7 +94,7 @@ class AbuseTest extends Scope { $data = $this->createCollection(); $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $max = 60; for ($i = 0; $i <= $max + 1; $i++) { @@ -103,7 +103,7 @@ class AbuseTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ], [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'The Hulk', ], @@ -232,7 +232,7 @@ class AbuseTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ], [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ Permission::read(Role::any()), @@ -258,7 +258,7 @@ class AbuseTest extends Scope return [ 'databaseId' => $databaseId, - 'collectionId' => $collectionId, + 'tableId' => $collectionId, ]; } diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 0c27a76311..54b8597204 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -537,7 +537,7 @@ class UsageTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => ['name' => $name] ] ); diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 14713a52ee..3df5dd4387 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -51,7 +51,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Movies', 'documentSecurity' => true, 'permissions' => [ @@ -67,7 +67,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Actors', 'documentSecurity' => true, 'permissions' => [ @@ -148,7 +148,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Captain America', ], @@ -275,7 +275,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $data['actorsId'], + 'relatedTableId' => $data['actorsId'], 'type' => 'oneToMany', 'twoWay' => true, 'key' => 'starringActors', @@ -417,7 +417,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'patch', 'documentSecurity' => true, 'permissions' => [ @@ -488,7 +488,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Players', 'documentSecurity' => true, 'permissions' => [ @@ -540,7 +540,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Response Models', // 'permissions' missing on purpose to make sure it's optional 'documentSecurity' => true, @@ -654,7 +654,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $data['actorsId'], + 'relatedTableId' => $data['actorsId'], 'type' => 'oneToMany', 'twoWay' => true, 'key' => 'relationship', @@ -1463,7 +1463,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Captain America', 'releaseYear' => 1944, @@ -1484,7 +1484,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Spider-Man: Far From Home', 'releaseYear' => 2019, @@ -1507,7 +1507,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Spider-Man: Homecoming', 'releaseYear' => 2017, @@ -1530,7 +1530,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'releaseYear' => 2020, // Missing title, expect an 400 error ], @@ -1655,7 +1655,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Dummy', 'releaseYear' => 1944, @@ -2287,7 +2287,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Thor: Ragnaroc', 'releaseYear' => 2017, @@ -2413,7 +2413,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Thor: Ragnarok', 'releaseYear' => 2017, @@ -2474,7 +2474,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'invalidDocumentStructure', 'permissions' => [ Permission::create(Role::any()), @@ -2692,7 +2692,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'email' => 'user@example.com', ], @@ -2707,7 +2707,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'enum' => 'yes', ], @@ -2722,7 +2722,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'ip' => '1.1.1.1', ], @@ -2737,7 +2737,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'url' => 'http://www.example.com', ], @@ -2752,7 +2752,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'range' => 3, ], @@ -2767,7 +2767,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'floatRange' => 1.4, ], @@ -2782,7 +2782,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'probability' => 0.99999, ], @@ -2797,7 +2797,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'upperBound' => 8, ], @@ -2812,7 +2812,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'lowerBound' => 8, ], @@ -2841,7 +2841,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'email' => 'user@@example.com', ], @@ -2856,7 +2856,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'enum' => 'badEnum', ], @@ -2871,7 +2871,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'ip' => '1.1.1.1.1', ], @@ -2886,7 +2886,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'url' => 'example...com', ], @@ -2901,7 +2901,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'range' => 11, ], @@ -2916,7 +2916,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'floatRange' => 2.5, ], @@ -2931,7 +2931,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'probability' => 1.1, ], @@ -2946,7 +2946,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'upperBound' => 11, ], @@ -2961,7 +2961,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'lowerBound' => 3, ], @@ -2976,7 +2976,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => [ 'birthDay' => '2020-10-10 27:30:10+01:00', ], @@ -3015,7 +3015,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Captain America', 'releaseYear' => 1944, @@ -3145,7 +3145,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'enforceCollectionAndDocumentPermissions', 'documentSecurity' => true, 'permissions' => [ @@ -3200,7 +3200,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'attribute' => 'one', ], @@ -3217,7 +3217,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'attribute' => 'one', ], @@ -3234,7 +3234,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ], [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'attribute' => 'one', ], @@ -3338,7 +3338,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'enforceCollectionPermissions', 'permissions' => [ Permission::read(Role::user($user)), @@ -3388,7 +3388,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'attribute' => 'one', ], @@ -3405,7 +3405,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'attribute' => 'one', ], @@ -3422,7 +3422,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ], [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'attribute' => 'one', ], @@ -3541,7 +3541,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Captain America', 'releaseYear' => 1944, @@ -3564,7 +3564,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Captain America 5', 'releaseYear' => 1944, @@ -3587,7 +3587,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Captain America', 'releaseYear' => 1944, @@ -3623,7 +3623,7 @@ trait DatabasesBase ]; $document = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['moviesId'] . '/documents', $headers, [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Creation Date Test', 'releaseYear' => 2000 @@ -3691,7 +3691,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ Permission::create(Role::user(ID::custom($this->getUser()['$id']))), @@ -3728,7 +3728,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Captain America', ], @@ -3802,7 +3802,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Boolean' ]); @@ -3847,7 +3847,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => 'person', + 'tableId' => 'person', 'name' => 'person', 'permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), @@ -3865,7 +3865,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => 'library', + 'tableId' => 'library', 'name' => 'library', 'permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), @@ -3894,7 +3894,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => 'library', + 'relatedTableId' => 'library', 'type' => Database::RELATION_ONE_TO_ONE, 'key' => 'library', 'twoWay' => true, @@ -3957,7 +3957,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'library' => [ '$id' => 'library1', @@ -3981,7 +3981,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'library' => [ 'libraryName' => 'Library 2', @@ -4092,7 +4092,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => 'library', + 'relatedTableId' => 'library', 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => true, 'key' => 'libraries', @@ -4141,7 +4141,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => 'person10', + 'rowId' => 'person10', 'data' => [ 'fullName' => 'Stevie Wonder', 'libraries' => [ @@ -4237,7 +4237,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Albums', 'documentSecurity' => true, 'permissions' => [ @@ -4263,7 +4263,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Artists', 'documentSecurity' => true, 'permissions' => [ @@ -4289,7 +4289,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $artists['body']['$id'], + 'relatedTableId' => $artists['body']['$id'], 'type' => Database::RELATION_MANY_TO_ONE, 'twoWay' => true, 'key' => 'artist', @@ -4318,7 +4318,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => 'album1', + 'rowId' => 'album1', 'permissions' => $permissions, 'data' => [ 'name' => 'Album 1', @@ -4381,7 +4381,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Sports', 'documentSecurity' => true, 'permissions' => [ @@ -4407,7 +4407,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Players', 'documentSecurity' => true, 'permissions' => [ @@ -4433,7 +4433,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $players['body']['$id'], + 'relatedTableId' => $players['body']['$id'], 'type' => Database::RELATION_MANY_TO_MANY, 'twoWay' => true, 'key' => 'players', @@ -4463,7 +4463,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => 'sport1', + 'rowId' => 'sport1', 'permissions' => $permissions, 'data' => [ 'name' => 'Sport 1', @@ -4641,7 +4641,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'USA Presidents', 'documentSecurity' => true, 'permissions' => [ @@ -4683,7 +4683,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'first_name' => 'Donald', 'last_name' => 'Trump', @@ -4698,7 +4698,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'first_name' => 'George', 'last_name' => 'Bush', @@ -4713,7 +4713,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'first_name' => 'Joe', 'last_name' => 'Biden', @@ -4764,7 +4764,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Collection1', 'documentSecurity' => true, 'permissions' => [ @@ -4778,7 +4778,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Collection2', 'documentSecurity' => true, 'permissions' => [ @@ -4815,7 +4815,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2, + 'relatedTableId' => $collection2, 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => true, 'key' => 'collection2' @@ -4827,7 +4827,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'name' => 'Document 1', 'collection2' => [ @@ -4860,7 +4860,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Slow Queries', 'documentSecurity' => true, 'permissions' => [ @@ -4893,7 +4893,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'longtext' => file_get_contents(__DIR__ . '/../../../resources/longtext.txt'), ], diff --git a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php index 04daddd47a..e9dca1d674 100644 --- a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php @@ -38,7 +38,7 @@ class DatabasesConsoleClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ Permission::read(Role::any()), @@ -69,7 +69,7 @@ class DatabasesConsoleClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'TvShows', 'permissions' => [ Permission::read(Role::any()), diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index 6caeb3ca8b..b192cd04a1 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -40,7 +40,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Movies', 'documentSecurity' => true, 'permissions' => [ @@ -73,7 +73,7 @@ class DatabasesCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Captain America', ], @@ -95,7 +95,7 @@ class DatabasesCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Captain America', ], @@ -138,7 +138,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::custom('permissionCheck'), + 'tableId' => ID::custom('permissionCheck'), 'name' => 'permissionCheck', 'permissions' => [], 'documentSecurity' => true, @@ -166,7 +166,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => ID::custom('permissionCheckDocument'), + 'rowId' => ID::custom('permissionCheckDocument'), 'data' => [ 'name' => 'AppwriteBeginner', ], @@ -247,7 +247,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'level1', 'documentSecurity' => false, 'permissions' => [ @@ -264,7 +264,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'level2', 'documentSecurity' => false, 'permissions' => [ @@ -283,7 +283,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2['body']['$id'], + 'relatedTableId' => $collection2['body']['$id'], 'type' => 'oneToMany', 'twoWay' => true, 'onDelete' => 'cascade', @@ -335,7 +335,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'c1', 'documentSecurity' => false, 'permissions' => [ @@ -351,7 +351,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'c2', 'documentSecurity' => false, 'permissions' => [ @@ -369,7 +369,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2['body']['$id'], + 'relatedTableId' => $collection2['body']['$id'], 'type' => Database::RELATION_ONE_TO_ONE, 'twoWay' => false, 'onDelete' => 'cascade', @@ -387,7 +387,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2['body']['$id'], + 'relatedTableId' => $collection2['body']['$id'], 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => false, 'onDelete' => 'cascade', @@ -406,7 +406,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2['body']['$id'], + 'relatedTableId' => $collection2['body']['$id'], 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => false, 'onDelete' => 'cascade', @@ -424,7 +424,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2['body']['$id'], + 'relatedTableId' => $collection2['body']['$id'], 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => false, 'onDelete' => 'cascade', @@ -442,7 +442,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2['body']['$id'], + 'relatedTableId' => $collection2['body']['$id'], 'type' => Database::RELATION_MANY_TO_MANY, 'twoWay' => true, 'onDelete' => 'setNull', @@ -461,7 +461,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2['body']['$id'], + 'relatedTableId' => $collection2['body']['$id'], 'type' => Database::RELATION_MANY_TO_MANY, 'twoWay' => true, 'onDelete' => 'setNull', @@ -495,7 +495,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::custom('collection1'), + 'tableId' => ID::custom('collection1'), 'name' => ID::custom('collection1'), 'documentSecurity' => false, 'permissions' => [ @@ -511,7 +511,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::custom('collection2'), + 'tableId' => ID::custom('collection2'), 'name' => ID::custom('collection2'), 'documentSecurity' => false, 'permissions' => [ @@ -524,7 +524,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::custom('collection3'), + 'tableId' => ID::custom('collection3'), 'name' => ID::custom('collection3'), 'documentSecurity' => false, 'permissions' => [ @@ -539,7 +539,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::custom('collection4'), + 'tableId' => ID::custom('collection4'), 'name' => ID::custom('collection4'), 'documentSecurity' => false, 'permissions' => [ @@ -552,7 +552,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::custom('collection5'), + 'tableId' => ID::custom('collection5'), 'name' => ID::custom('collection5'), 'documentSecurity' => false, 'permissions' => [ @@ -568,7 +568,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2['body']['$id'], + 'relatedTableId' => $collection2['body']['$id'], 'type' => 'oneToOne', 'twoWay' => false, 'onDelete' => 'setNull', @@ -581,7 +581,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection3['body']['$id'], + 'relatedTableId' => $collection3['body']['$id'], 'type' => 'oneToOne', 'twoWay' => false, 'onDelete' => 'setNull', @@ -594,7 +594,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection4['body']['$id'], + 'relatedTableId' => $collection4['body']['$id'], 'type' => 'oneToOne', 'twoWay' => false, 'onDelete' => 'setNull', @@ -607,7 +607,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection5['body']['$id'], + 'relatedTableId' => $collection5['body']['$id'], 'type' => 'oneToOne', 'twoWay' => false, 'onDelete' => 'setNull', @@ -681,7 +681,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => ID::custom($collection1['body']['$id']), + 'rowId' => ID::custom($collection1['body']['$id']), 'data' => [ 'Title' => 'Captain America', $collection2['body']['$id'] => [ @@ -709,7 +709,7 @@ class DatabasesCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::custom($collection1['body']['$id']), + 'rowId' => ID::custom($collection1['body']['$id']), 'data' => [ 'Title' => 'Captain America', $collection2['body']['$id'] => [ @@ -739,7 +739,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::custom('collection3'), + 'tableId' => ID::custom('collection3'), 'name' => ID::custom('collection3'), 'documentSecurity' => false, 'permissions' => [ @@ -814,7 +814,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::custom('collection3'), + 'tableId' => ID::custom('collection3'), 'name' => ID::custom('collection3'), 'documentSecurity' => false, 'permissions' => [ @@ -830,7 +830,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::custom('collection2'), + 'tableId' => ID::custom('collection2'), 'name' => ID::custom('collection2'), 'documentSecurity' => false, 'permissions' => [ @@ -847,7 +847,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => ID::custom('collection3Doc1'), + 'rowId' => ID::custom('collection3Doc1'), 'data' => [ 'Rating' => '20' ] diff --git a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php index 7e5da78ccd..508578f149 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php @@ -358,7 +358,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'name' => 'Test 1', - 'collectionId' => ID::custom('first'), + 'tableId' => ID::custom('first'), 'permissions' => [ Permission::read(Role::any()), Permission::create(Role::any()), @@ -374,7 +374,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'name' => 'Test 2', - 'collectionId' => ID::custom('second'), + 'tableId' => ID::custom('second'), 'permissions' => [ Permission::read(Role::any()), Permission::create(Role::any()), @@ -579,7 +579,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'name' => 'Test 1', - 'collectionId' => ID::custom('first'), + 'tableId' => ID::custom('first'), 'permissions' => [ Permission::read(Role::any()), Permission::create(Role::any()), @@ -592,7 +592,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(409, $response['headers']['status-code']); return [ 'databaseId' => $databaseId, - 'collectionId' => $test1['body']['$id'], + 'tableId' => $test1['body']['$id'], ]; } @@ -602,7 +602,7 @@ class DatabasesCustomServerTest extends Scope public function testGetCollection(array $data): void { $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $collection = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([ 'content-type' => 'application/json', @@ -622,7 +622,7 @@ class DatabasesCustomServerTest extends Scope public function testUpdateCollection(array $data) { $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $collection = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([ 'content-type' => 'application/json', @@ -657,7 +657,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Encrypted Actors Data', 'permissions' => [ Permission::read(Role::any()), @@ -719,7 +719,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'firstName' => 'Jonah', 'lastName' => 'Jameson', @@ -767,7 +767,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Actors', 'permissions' => [ Permission::read(Role::any()), @@ -820,7 +820,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'firstName' => 'lorem', 'lastName' => 'ipsum', @@ -898,7 +898,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($collection['body']['columns'][1]['key'], $lastName['body']['key']); return [ - 'collectionId' => $actors['body']['$id'], + 'tableId' => $actors['body']['$id'], 'key' => $index['body']['key'], 'databaseId' => $databaseId ]; @@ -910,7 +910,7 @@ class DatabasesCustomServerTest extends Scope public function testDeleteIndex($data): array { $databaseId = $data['databaseId']; - $index = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/indexes/' . $data['key'], array_merge([ + $index = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/indexes/' . $data['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -921,7 +921,7 @@ class DatabasesCustomServerTest extends Scope // Wait for database worker to finish deleting index sleep(2); - $collection = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['collectionId'], array_merge([ + $collection = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['tableId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -938,7 +938,7 @@ class DatabasesCustomServerTest extends Scope public function testDeleteIndexOnDeleteAttribute($data) { $databaseId = $data['databaseId']; - $attribute1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/attributes/string', array_merge([ + $attribute1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -948,7 +948,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $attribute2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/attributes/string', array_merge([ + $attribute2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -965,7 +965,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); - $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -976,7 +976,7 @@ class DatabasesCustomServerTest extends Scope 'orders' => ['ASC', 'ASC'], ]); - $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -994,7 +994,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Expected behavior: deleting attribute2 will cause index2 to be dropped, and index1 rebuilt with a single key - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/attributes/' . $attribute2['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/attributes/' . $attribute2['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1005,7 +1005,7 @@ class DatabasesCustomServerTest extends Scope // wait for database worker to complete sleep(2); - $collection = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['collectionId'], array_merge([ + $collection = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['tableId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1020,7 +1020,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($attribute1['body']['key'], $collection['body']['indexes'][0]['columns'][0]); // Delete attribute - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/attributes/' . $attribute1['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/attributes/' . $attribute1['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1050,7 +1050,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'TestCleanupDuplicateIndexOnDeleteAttribute', 'permissions' => [ Permission::read(Role::any()), @@ -1163,14 +1163,14 @@ class DatabasesCustomServerTest extends Scope public function testDeleteCollection($data) { $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; // Add Documents to the collection $document1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'firstName' => 'Tom', 'lastName' => 'Holland', @@ -1186,7 +1186,7 @@ class DatabasesCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'firstName' => 'Samuel', 'lastName' => 'Jackson', @@ -1249,7 +1249,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Collection1', 'documentSecurity' => false, 'permissions' => [], @@ -1260,7 +1260,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Collection2', 'documentSecurity' => false, 'permissions' => [], @@ -1274,7 +1274,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ]), [ - 'relatedCollectionId' => $collection2, + 'relatedTableId' => $collection2, 'type' => Database::RELATION_MANY_TO_ONE, 'twoWay' => false, 'key' => 'collection2' @@ -1318,7 +1318,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::custom('attributeRowWidthLimit'), + 'tableId' => ID::custom('attributeRowWidthLimit'), 'name' => 'attributeRowWidthLimit', 'permissions' => [ Permission::read(Role::any()), @@ -1384,7 +1384,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::custom('testLimitException'), + 'tableId' => ID::custom('testLimitException'), 'name' => 'testLimitException', 'permissions' => [ Permission::read(Role::any()), @@ -1508,7 +1508,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::custom('updateAttributes'), + 'tableId' => ID::custom('updateAttributes'), 'name' => 'updateAttributes' ]); @@ -1642,7 +1642,7 @@ class DatabasesCustomServerTest extends Scope return [ 'databaseId' => $databaseId, - 'collectionId' => $collectionId + 'tableId' => $collectionId ]; } @@ -1653,7 +1653,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'string'; $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/string/' . $key, array_merge([ 'content-type' => 'application/json', @@ -1795,7 +1795,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'email'; $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/email/' . $key, array_merge([ 'content-type' => 'application/json', @@ -1938,7 +1938,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'ip'; $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/ip/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2080,7 +2080,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'url'; $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/url/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2222,7 +2222,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'integer'; $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/integer/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2483,7 +2483,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'float'; $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/float/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2744,7 +2744,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'boolean'; $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/boolean/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2886,7 +2886,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'datetime'; $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/datetime/' . $key, array_merge([ 'content-type' => 'application/json', @@ -3028,7 +3028,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'enum'; $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/enum/' . $key, array_merge([ 'content-type' => 'application/json', @@ -3244,7 +3244,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'string'; $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $document = $this->client->call( Client::METHOD_POST, @@ -3255,7 +3255,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => [ 'string' => 'string' ], @@ -3287,7 +3287,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => [ 'string' => str_repeat('a', 2048) ], @@ -3373,7 +3373,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => [ 'string' => str_repeat('a', 10) ], @@ -3408,7 +3408,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => [ 'string' => str_repeat('a', 11) ], @@ -3426,7 +3426,7 @@ class DatabasesCustomServerTest extends Scope public function testAttributeUpdateNotFound(array $data) { $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $attributes = [ 'string' => [ @@ -3514,7 +3514,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'string'; $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; // Create document to test against $document = $this->client->call( @@ -3526,7 +3526,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => [ 'string' => 'string' ], @@ -3578,7 +3578,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => [ 'new_string' => 'string' ], @@ -3600,7 +3600,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => [ 'string' => 'string' ], @@ -3630,7 +3630,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => 'collection1', + 'tableId' => 'collection1', 'name' => 'level1', 'documentSecurity' => false, 'permissions' => [ @@ -3646,7 +3646,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => 'collection2', + 'tableId' => 'collection2', 'name' => 'level2', 'documentSecurity' => false, 'permissions' => [ @@ -3684,7 +3684,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2Id, + 'relatedTableId' => $collection2Id, 'type' => 'oneToMany', 'twoWay' => true, 'onDelete' => 'cascade', @@ -3712,7 +3712,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => [ 'level2' => [[ '$id' => 'unique()', @@ -3794,7 +3794,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2Id, + 'relatedTableId' => $collection2Id, 'type' => 'oneToOne', 'twoWay' => true, 'onDelete' => 'cascade', @@ -3822,7 +3822,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => [ 'level2' => [ '$id' => 'unique()', @@ -3904,7 +3904,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2Id, + 'relatedTableId' => $collection2Id, 'type' => 'manyToOne', 'twoWay' => true, 'onDelete' => 'cascade', @@ -3932,7 +3932,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => [ 'level2' => [ '$id' => 'unique()', @@ -4014,7 +4014,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedCollectionId' => $collection2Id, + 'relatedTableId' => $collection2Id, 'type' => 'manyToOne', 'twoWay' => true, 'onDelete' => 'cascade', @@ -4042,7 +4042,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'documentId' => 'unique()', + 'rowId' => 'unique()', 'data' => [ 'level2' => [ '$id' => 'unique()', diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php b/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php index 9e20e13c2a..64413c2fab 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php @@ -32,7 +32,7 @@ class DatabasesPermissionsGuestTest extends Scope $databaseId = $database['body']['$id']; $publicMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $this->getServerHeader(), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ Permission::read(Role::any()), @@ -42,7 +42,7 @@ class DatabasesPermissionsGuestTest extends Scope ], ]); $privateMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $this->getServerHeader(), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [], 'documentSecurity' => true, @@ -94,14 +94,14 @@ class DatabasesPermissionsGuestTest extends Scope $databaseId = $data['databaseId']; $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $publicCollectionId . '/documents', $this->getServerHeader(), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], 'permissions' => $permissions, ]); $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $privateCollectionId . '/documents', $this->getServerHeader(), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], @@ -152,7 +152,7 @@ class DatabasesPermissionsGuestTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ] @@ -165,7 +165,7 @@ class DatabasesPermissionsGuestTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], @@ -175,7 +175,7 @@ class DatabasesPermissionsGuestTest extends Scope // Create a document in private collection with API key so we can test that update and delete are also not allowed $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $privateCollectionId . '/documents', $this->getServerHeader(), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], @@ -241,7 +241,7 @@ class DatabasesPermissionsGuestTest extends Scope $databaseId = $database['body']['$id']; $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $this->getServerHeader(), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ Permission::create(Role::any()), @@ -263,7 +263,7 @@ class DatabasesPermissionsGuestTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Thor: Ragnarok', ], diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php b/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php index 239fa58c99..2b959344fe 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php @@ -125,7 +125,7 @@ class DatabasesPermissionsMemberTest extends Scope $databaseId = $db['body']['$id']; $public = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $this->getServerHeader(), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ Permission::read(Role::any()), @@ -146,7 +146,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(202, $response['headers']['status-code']); $private = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $this->getServerHeader(), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Private Movies', 'permissions' => [ Permission::read(Role::users()), @@ -167,7 +167,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(202, $response['headers']['status-code']); $doconly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $this->getServerHeader(), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Document Only Movies', 'permissions' => [], 'documentSecurity' => true, @@ -203,7 +203,7 @@ class DatabasesPermissionsMemberTest extends Scope $databaseId = $data['databaseId']; $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collections['public'] . '/documents', $this->getServerHeader(), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], @@ -212,7 +212,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collections['private'] . '/documents', $this->getServerHeader(), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], @@ -221,7 +221,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collections['doconly'] . '/documents', $this->getServerHeader(), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php b/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php index 9b0a04ac27..5a160a25b8 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php +++ b/tests/e2e/Services/Databases/DatabasesPermissionsTeamTest.php @@ -45,7 +45,7 @@ class DatabasesPermissionsTeamTest extends Scope $this->assertEquals(201, $db['headers']['status-code']); $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/collections', $this->getServerHeader(), [ - 'collectionId' => ID::custom('collection1'), + 'tableId' => ID::custom('collection1'), 'name' => 'Collection 1', 'permissions' => [ Permission::read(Role::team($teams['team1']['$id'])), @@ -64,7 +64,7 @@ class DatabasesPermissionsTeamTest extends Scope ]); $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/collections', $this->getServerHeader(), [ - 'collectionId' => ID::custom('collection2'), + 'tableId' => ID::custom('collection2'), 'name' => 'Collection 2', 'permissions' => [ Permission::read(Role::team($teams['team2']['$id'])), @@ -141,7 +141,7 @@ class DatabasesPermissionsTeamTest extends Scope $this->createCollections($this->teams); $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/collections/' . $this->collections['collection1'] . '/documents', $this->getServerHeader(), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], @@ -149,7 +149,7 @@ class DatabasesPermissionsTeamTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/collections/' . $this->collections['collection2'] . '/documents', $this->getServerHeader(), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Ipsum', ], @@ -192,7 +192,7 @@ class DatabasesPermissionsTeamTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $users[$user]['session'], ], [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'title' => 'Ipsum', ], diff --git a/tests/e2e/Services/GraphQL/AbuseTest.php b/tests/e2e/Services/GraphQL/AbuseTest.php index 7137123757..10b8421b04 100644 --- a/tests/e2e/Services/GraphQL/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/AbuseTest.php @@ -30,7 +30,7 @@ class AbuseTest extends Scope { $data = $this->createCollection(); $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $projectId = $this->getProject()['$id']; $query = $this->getQuery(self::$CREATE_ROW); $max = 120; @@ -40,8 +40,8 @@ class AbuseTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $databaseId, - 'collectionId' => $collectionId, - 'documentId' => ID::unique(), + 'tableId' => $collectionId, + 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', ], @@ -73,7 +73,7 @@ class AbuseTest extends Scope 'password' => 'password', 'databaseId' => 'database', 'databaseName' => 'database', - 'collectionId' => 'collection', + 'tableId' => 'collection', 'collectionName' => 'collection', 'collectionPermissions' => [ Permission::read(Role::users()), @@ -138,7 +138,7 @@ class AbuseTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $databaseId, - 'collectionId' => 'actors', + 'tableId' => 'actors', 'name' => 'Actors', 'documentSecurity' => false, 'permissions' => [ @@ -161,7 +161,7 @@ class AbuseTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $databaseId, - 'collectionId' => $collectionId, + 'tableId' => $collectionId, 'key' => 'name', 'size' => 256, 'required' => true, @@ -178,7 +178,7 @@ class AbuseTest extends Scope return [ 'databaseId' => $databaseId, - 'collectionId' => $collectionId, + 'tableId' => $collectionId, ]; } } diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 7c91cf67f7..22112d2e12 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -672,7 +672,7 @@ trait Base return 'query getRow($databaseId: String!, $tableId: String!, $rowId: String!) { databasesGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { _id - _collectionId + _tableId _permissions data } @@ -683,7 +683,7 @@ trait Base total rows { _id - _collectionId + _tableId _permissions data } @@ -693,7 +693,7 @@ trait Base return 'mutation createRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]){ databasesCreateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id - _collectionId + _tableId _permissions } }'; @@ -760,7 +760,7 @@ trait Base return 'mutation updateRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]){ databasesUpdateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id - _collectionId + _tableId data } }'; diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index 208bd58731..a40a2156ea 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -445,7 +445,7 @@ trait MigrationsBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ], [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Test Collection', ]); @@ -536,7 +536,7 @@ trait MigrationsBase return [ 'databaseId' => $databaseId, - 'collectionId' => $collectionId, + 'tableId' => $collectionId, ]; } @@ -546,14 +546,14 @@ trait MigrationsBase public function testAppwriteMigrationDatabasesDocument(array $data): void { $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; + $collectionId = $data['tableId']; $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ], [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'name' => 'Test Document', ] @@ -927,7 +927,7 @@ trait MigrationsBase 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'name' => 'Test collection', - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), ]); $this->assertEquals(201, $response['headers']['status-code']); @@ -1131,7 +1131,7 @@ trait MigrationsBase return [ 'databaseId' => $databaseId, - 'collectionId' => $collectionId, + 'tableId' => $collectionId, 'migrationId' => $migration['body']['$id'], ]; } @@ -1142,7 +1142,7 @@ trait MigrationsBase public function testImportSuccessful(array $response): void { $databaseId = $response['databaseId']; - $collectionId = $response['collectionId']; + $collectionId = $response['tableId']; $migrationId = $response['migrationId']; $documentsCountInCSV = 100; diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index a206692ea2..bb21ef8619 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -162,7 +162,7 @@ class RealtimeConsoleClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Actors', 'permissions' => [ Permission::read(Role::any()), @@ -272,7 +272,7 @@ class RealtimeConsoleClientTest extends Scope ], $this->getHeaders()), [ 'key' => 'key_name', 'type' => 'key', - 'attributes' => [ + 'columns' => [ 'name', ], ]); diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index d279bb45c7..671bc491f4 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -714,7 +714,7 @@ class RealtimeCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Actors', 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), @@ -749,7 +749,7 @@ class RealtimeCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'name' => 'Chris Evans' ], @@ -795,7 +795,7 @@ class RealtimeCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'name' => 'Chris Evans 2' ], @@ -840,7 +840,7 @@ class RealtimeCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'name' => 'Bradley Cooper' ], @@ -934,7 +934,7 @@ class RealtimeCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Actors', 'permissions' => [ Permission::read(Role::any()), @@ -971,7 +971,7 @@ class RealtimeCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'name' => 'Chris Evans' ], @@ -1053,7 +1053,7 @@ class RealtimeCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'name' => 'Bradley Cooper' ], diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index 5cd95c220d..feb43d17ab 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -61,7 +61,7 @@ trait WebhooksBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Actors', 'permissions' => [ Permission::read(Role::any()), @@ -211,7 +211,7 @@ trait WebhooksBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'firstName' => 'Chris', 'lastName' => 'Evans', @@ -254,7 +254,7 @@ trait WebhooksBase $this->assertIsArray($webhook['data']['$permissions']); $this->assertCount(3, $webhook['data']['$permissions']); - $data['documentId'] = $document['body']['$id']; + $data['rowId'] = $document['body']['$id']; return $data; } @@ -270,7 +270,7 @@ trait WebhooksBase /** * Test for SUCCESS */ - $document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $actorsId . '/documents/' . $data['documentId'], array_merge([ + $document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $actorsId . '/documents/' . $data['rowId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -335,7 +335,7 @@ trait WebhooksBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ 'firstName' => 'Bradly', 'lastName' => 'Cooper', @@ -1119,7 +1119,7 @@ trait WebhooksBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'newCollection' . $i, 'permissions' => [ Permission::read(Role::any()), diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index 14188a807b..83a29b741f 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -79,7 +79,7 @@ class WebhooksCustomServerTest extends Scope ]), [ 'key' => 'fullname', 'type' => 'key', - 'attributes' => ['lastName', 'firstName'], + 'columns' => ['lastName', 'firstName'], 'orders' => ['ASC', 'ASC'], ]); @@ -159,7 +159,7 @@ class WebhooksCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'collectionId' => ID::unique(), + 'tableId' => ID::unique(), 'name' => 'Demo', 'permissions' => [ Permission::read(Role::any()), From 253c428ca226de5c777f87d56f6877ec3d42949d Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 11:30:15 +0530 Subject: [PATCH 040/362] remove: filter. --- app/controllers/general.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index f07fb2f178..6f46f529ce 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -18,7 +18,6 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Transformation\Adapter\Preview; use Appwrite\Transformation\Transformation; use Appwrite\Utopia\Request; -use Appwrite\Utopia\Request\Filters\DatabaseAliases; use Appwrite\Utopia\Request\Filters\V16 as RequestV16; use Appwrite\Utopia\Request\Filters\V17 as RequestV17; use Appwrite\Utopia\Request\Filters\V18 as RequestV18; @@ -835,9 +834,6 @@ App::init() } } - // process on all databases endpoints! - $request->addFilter(new DatabaseAliases()); - $domain = $request->getHostname(); $domains = Config::getParam('domains', []); if (!array_key_exists($domain, $domains)) { From 3a8f097c173c2860aeb2b7f454839cf4545c678f Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 11:31:05 +0530 Subject: [PATCH 041/362] fix: realtime channels; update: row model. --- src/Appwrite/Messaging/Adapter/Realtime.php | 4 ++-- src/Appwrite/Utopia/Response/Model/Row.php | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index 400589f677..2657ecccaa 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -312,8 +312,8 @@ class Realtime extends Adapter } $channels[] = 'rows'; - $channels[] = 'databases.' . $database->getId() . '.tables.' . $payload->getAttribute('$collectionId') . '.rows'; - $channels[] = 'databases.' . $database->getId() . '.tables.' . $payload->getAttribute('$collectionId') . '.rows.' . $payload->getId(); + $channels[] = 'databases.' . $database->getId() . '.tables.' . $payload->getAttribute('$tableId') . '.rows'; + $channels[] = 'databases.' . $database->getId() . '.tables.' . $payload->getAttribute('$tableId') . '.rows.' . $payload->getId(); $roles = $table->getAttribute('documentSecurity', false) ? \array_merge($table->getRead(), $payload->getRead()) diff --git a/src/Appwrite/Utopia/Response/Model/Row.php b/src/Appwrite/Utopia/Response/Model/Row.php index 49325bdc81..c84a81738d 100644 --- a/src/Appwrite/Utopia/Response/Model/Row.php +++ b/src/Appwrite/Utopia/Response/Model/Row.php @@ -36,7 +36,7 @@ class Row extends Any 'default' => '', 'example' => '5e5ea5c16897e', ]) - ->addRule('$collectionId', [ + ->addRule('$tableId', [ 'type' => self::TYPE_STRING, 'description' => 'Table ID.', 'default' => '', @@ -75,6 +75,11 @@ class Row extends Any $document->removeAttribute('$collection'); $document->removeAttribute('$tenant'); + $collectionId = $document->getAttribute('$collectionId'); + $document + ->removeAttribute('$collectionId') + ->setAttribute('$tableId', $collectionId); + foreach ($document->getAttributes() as $column) { if (\is_array($column)) { foreach ($column as $subAttribute) { From 86d195c1c0a49d7c351dac4e9dfd9be4defb9f7c Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 11:31:35 +0530 Subject: [PATCH 042/362] update: request, response filters. --- src/Appwrite/Utopia/Request/Filters/V19.php | 32 +++++++++++++++----- src/Appwrite/Utopia/Response/Filters/V19.php | 2 ++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/Appwrite/Utopia/Request/Filters/V19.php b/src/Appwrite/Utopia/Request/Filters/V19.php index ee04cea038..01d2da01a2 100644 --- a/src/Appwrite/Utopia/Request/Filters/V19.php +++ b/src/Appwrite/Utopia/Request/Filters/V19.php @@ -6,20 +6,36 @@ use Appwrite\Utopia\Request\Filter; class V19 extends Filter { + // Map old params to new + private const PARAMS_MAP = [ + 'documentId' => 'rowId', + 'attributes' => 'columns', + 'collectionId' => 'tableId', + 'attributeId' => 'columnId', + '$collectionId' => '$tableId', + 'relatedCollection' => 'relatedTable', + 'relatedCollectionId' => 'relatedTableId', + ]; + // Convert 1.6 params to 1.7 public function parse(array $content, string $model): array { - return match ($model) { - 'databases.createRelationshipColumn' => $this->convertV16RelationshipParams($content), - default => $content - }; + $content = $this->overrideDatabaseParams($content, $model); + + return $content; } - protected function convertV16RelationshipParams(array $content): array + protected function overrideDatabaseParams(array $content, string $model): array { - if (isset($content['relatedCollectionId'])) { - $content['relatedTableId'] = $content['relatedCollectionId']; - unset($content['relatedCollectionId']); + if (!str_starts_with($model, 'databases.')) { + return $content; + } + + $intersect = array_intersect_key(self::PARAMS_MAP, $content); + + foreach ($intersect as $oldKey => $newKey) { + $content[$newKey] = $content[$oldKey]; + unset($content[$oldKey]); } return $content; diff --git a/src/Appwrite/Utopia/Response/Filters/V19.php b/src/Appwrite/Utopia/Response/Filters/V19.php index 5e1a7e40e7..24cb07889f 100644 --- a/src/Appwrite/Utopia/Response/Filters/V19.php +++ b/src/Appwrite/Utopia/Response/Filters/V19.php @@ -10,8 +10,10 @@ class V19 extends Filter private const DATABASE_MAPPINGS = [ 'table' => 'collection', 'tables' => 'collections', + '$tableId' => '$collectionId', 'tablesTotal' => 'collectionsTotal', 'relatedTable' => 'relatedCollection', + 'relatedTableId' => 'relatedCollectionId', 'column' => 'attribute', 'columns' => 'attributes', From 9ec897f7d606ca7c431655a0fadbfe9e3f14ff63 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 12:05:06 +0530 Subject: [PATCH 043/362] fix: filtering --- src/Appwrite/Utopia/Response/Model/Row.php | 10 +++--- .../e2e/Services/Databases/DatabasesBase.php | 31 ++++++++++--------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Model/Row.php b/src/Appwrite/Utopia/Response/Model/Row.php index c84a81738d..c30984ab7a 100644 --- a/src/Appwrite/Utopia/Response/Model/Row.php +++ b/src/Appwrite/Utopia/Response/Model/Row.php @@ -75,10 +75,12 @@ class Row extends Any $document->removeAttribute('$collection'); $document->removeAttribute('$tenant'); - $collectionId = $document->getAttribute('$collectionId'); - $document - ->removeAttribute('$collectionId') - ->setAttribute('$tableId', $collectionId); + $collectionId = $document->getAttribute('$collectionId', ''); + if (!empty($collectionId)) { + $document + ->removeAttribute('$collectionId') + ->setAttribute('$tableId', $collectionId); + } foreach ($document->getAttributes() as $column) { if (\is_array($column)) { diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 3df5dd4387..186f906252 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -1542,7 +1542,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $document1['headers']['status-code']); - $this->assertEquals($data['moviesId'], $document1['body']['$collectionId']); + $this->assertEquals($data['moviesId'], $document1['body']['$tableId']); $this->assertArrayNotHasKey('$collection', $document1['body']); $this->assertEquals($databaseId, $document1['body']['$databaseId']); $this->assertEquals($document1['body']['title'], 'Captain America'); @@ -1555,7 +1555,7 @@ trait DatabasesBase $this->assertEquals($document1['body']['birthDay'], '1975-06-12T12:12:55.000+00:00'); $this->assertEquals(201, $document2['headers']['status-code']); - $this->assertEquals($data['moviesId'], $document2['body']['$collectionId']); + $this->assertEquals($data['moviesId'], $document2['body']['$tableId']); $this->assertArrayNotHasKey('$collection', $document2['body']); $this->assertEquals($databaseId, $document2['body']['$databaseId']); $this->assertEquals($document2['body']['title'], 'Spider-Man: Far From Home'); @@ -1572,7 +1572,7 @@ trait DatabasesBase $this->assertEquals($document2['body']['integers'][1], 60); $this->assertEquals(201, $document3['headers']['status-code']); - $this->assertEquals($data['moviesId'], $document3['body']['$collectionId']); + $this->assertEquals($data['moviesId'], $document3['body']['$tableId']); $this->assertArrayNotHasKey('$collection', $document3['body']); $this->assertEquals($databaseId, $document3['body']['$databaseId']); $this->assertEquals($document3['body']['title'], 'Spider-Man: Homecoming'); @@ -1621,7 +1621,8 @@ trait DatabasesBase $this->assertCount(3, $documents['body']['rows']); foreach ($documents['body']['rows'] as $document) { - $this->assertEquals($data['moviesId'], $document['$collectionId']); + print_r($document); + $this->assertEquals($data['moviesId'], $document['$tableId']); $this->assertArrayNotHasKey('$collection', $document); $this->assertEquals($databaseId, $document['$databaseId']); } @@ -1696,14 +1697,14 @@ trait DatabasesBase { $databaseId = $data['databaseId']; foreach ($data['rows'] as $document) { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$collectionId'] . '/documents/' . $document['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$tableId'] . '/documents/' . $document['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals($response['body']['$id'], $document['$id']); - $this->assertEquals($document['$collectionId'], $response['body']['$collectionId']); + $this->assertEquals($document['$tableId'], $response['body']['$tableId']); $this->assertArrayNotHasKey('$collection', $response['body']); $this->assertEquals($document['$databaseId'], $response['body']['$databaseId']); $this->assertEquals($response['body']['title'], $document['title']); @@ -1723,7 +1724,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; $document = $data['rows'][0]; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$collectionId'] . '/documents/' . $document['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$tableId'] . '/documents/' . $document['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2305,7 +2306,7 @@ trait DatabasesBase $id = $document['body']['$id']; $this->assertEquals(201, $document['headers']['status-code']); - $this->assertEquals($data['moviesId'], $document['body']['$collectionId']); + $this->assertEquals($data['moviesId'], $document['body']['$tableId']); $this->assertArrayNotHasKey('$collection', $document['body']); $this->assertEquals($databaseId, $document['body']['$databaseId']); $this->assertEquals($document['body']['title'], 'Thor: Ragnaroc'); @@ -2333,7 +2334,7 @@ trait DatabasesBase $this->assertEquals(200, $document['headers']['status-code']); $this->assertEquals($document['body']['$id'], $id); - $this->assertEquals($data['moviesId'], $document['body']['$collectionId']); + $this->assertEquals($data['moviesId'], $document['body']['$tableId']); $this->assertArrayNotHasKey('$collection', $document['body']); $this->assertEquals($databaseId, $document['body']['$databaseId']); $this->assertEquals($document['body']['title'], 'Thor: Ragnarok'); @@ -2350,7 +2351,7 @@ trait DatabasesBase $id = $document['body']['$id']; $this->assertEquals(200, $document['headers']['status-code']); - $this->assertEquals($data['moviesId'], $document['body']['$collectionId']); + $this->assertEquals($data['moviesId'], $document['body']['$tableId']); $this->assertArrayNotHasKey('$collection', $document['body']); $this->assertEquals($databaseId, $document['body']['$databaseId']); $this->assertEquals($document['body']['title'], 'Thor: Ragnarok'); @@ -4000,8 +4001,8 @@ trait DatabasesBase $this->assertEquals($databaseId, $person1['body']['$databaseId']); $this->assertEquals($databaseId, $person1['body']['library']['$databaseId']); - $this->assertEquals($person['body']['$id'], $person1['body']['$collectionId']); - $this->assertEquals($library['body']['$id'], $person1['body']['library']['$collectionId']); + $this->assertEquals($person['body']['$id'], $person1['body']['$tableId']); + $this->assertEquals($library['body']['$id'], $person1['body']['library']['$tableId']); $this->assertArrayNotHasKey('$collection', $person1['body']); $this->assertArrayNotHasKey('$collection', $person1['body']['library']); @@ -4562,7 +4563,7 @@ trait DatabasesBase $this->assertEquals(null, $response['body']['rows'][0]['fullName']); $this->assertArrayNotHasKey("libraries", $response['body']['rows'][0]); $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$collectionId', $response['body']['rows'][0]); + $this->assertArrayNotHasKey('$tableId', $response['body']['rows'][0]); } /** @@ -4583,7 +4584,7 @@ trait DatabasesBase $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayNotHasKey('libraries', $response['body']['rows'][0]); $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$collectionId', $response['body']['rows'][0]); + $this->assertArrayNotHasKey('$tableId', $response['body']['rows'][0]); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -4597,7 +4598,7 @@ trait DatabasesBase $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayHasKey('libraries', $document); $this->assertArrayNotHasKey('$databaseId', $document); - $this->assertArrayNotHasKey('$collectionId', $document); + $this->assertArrayNotHasKey('$tableId', $document); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents/' . $document['$id'], array_merge([ 'content-type' => 'application/json', From b1735ef9452a9a16baaa55d4fe6c488b3149dcb5 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 12:14:54 +0530 Subject: [PATCH 044/362] remove: aliasing filter. --- .../Request/Filters/DatabaseAliases.php | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/Appwrite/Utopia/Request/Filters/DatabaseAliases.php diff --git a/src/Appwrite/Utopia/Request/Filters/DatabaseAliases.php b/src/Appwrite/Utopia/Request/Filters/DatabaseAliases.php deleted file mode 100644 index 0ee2754475..0000000000 --- a/src/Appwrite/Utopia/Request/Filters/DatabaseAliases.php +++ /dev/null @@ -1,39 +0,0 @@ - 'rowId', - 'attributes' => 'columns', - 'collectionId' => 'tableId', - 'attributeId' => 'columnId', - 'relatedCollection' => 'relatedTable', - 'relatedCollectionId' => 'relatedTableId', - ]; - - public function parse(array $content, string $model): array - { - return $this->overrideDatabaseParams($content, $model); - } - - protected function overrideDatabaseParams(array $content, string $model): array - { - if (!str_starts_with($model, 'databases.')) { - return $content; - } - - $intersect = array_intersect_key(self::PARAMS_MAP, $content); - - foreach ($intersect as $oldKey => $newKey) { - $content[$newKey] = $content[$oldKey]; - unset($content[$oldKey]); - } - - return $content; - } -} From d70d001f5ab14a9d4b4437ea67d29d0797ef797a Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 12:52:05 +0530 Subject: [PATCH 045/362] add: backported channels. --- src/Appwrite/Messaging/Adapter/Realtime.php | 6 ++++++ .../Services/Realtime/RealtimeCustomClientTest.php | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index 2657ecccaa..b775078c61 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -311,10 +311,16 @@ class Realtime extends Adapter throw new \Exception('Table needs to be passed to Realtime for Row events in the Database.'); } + // 1.7.x $channels[] = 'rows'; $channels[] = 'databases.' . $database->getId() . '.tables.' . $payload->getAttribute('$tableId') . '.rows'; $channels[] = 'databases.' . $database->getId() . '.tables.' . $payload->getAttribute('$tableId') . '.rows.' . $payload->getId(); + // 1.6.x + $channels[] = 'documents'; + $channels[] = 'databases.' . $database->getId() . '.collections.' . $payload->getAttribute('$tableId') . '.documents'; + $channels[] = 'databases.' . $database->getId() . '.collections.' . $payload->getAttribute('$tableId') . '.documents.' . $payload->getId(); + $roles = $table->getAttribute('documentSecurity', false) ? \array_merge($table->getRead(), $payload->getRead()) : $table->getRead(); diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index 671bc491f4..eef7978a0e 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -769,7 +769,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(3, $response['data']['channels']); + $this->assertCount(6, $response['data']['channels']); // includes old and new channels $this->assertContains('rows', $response['data']['channels']); $this->assertContains('databases.' . $databaseId . '.tables.' . $actorsId . '.rows.' . $documentId, $response['data']['channels']); $this->assertContains('databases.' . $databaseId . '.tables.' . $actorsId . '.rows', $response['data']['channels']); @@ -813,7 +813,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(3, $response['data']['channels']); + $this->assertCount(6, $response['data']['channels']); // includes old and new channels $this->assertContains('rows', $response['data']['channels']); $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); @@ -867,7 +867,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(3, $response['data']['channels']); + $this->assertCount(6, $response['data']['channels']); // includes old and new channels $this->assertContains('rows', $response['data']['channels']); $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); @@ -987,7 +987,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(3, $response['data']['channels']); + $this->assertCount(6, $response['data']['channels']); // includes old and new channels $this->assertContains('rows', $response['data']['channels']); $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); @@ -1026,7 +1026,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(3, $response['data']['channels']); + $this->assertCount(6, $response['data']['channels']); // includes old and new channels $this->assertContains('rows', $response['data']['channels']); $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); @@ -1076,7 +1076,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(3, $response['data']['channels']); + $this->assertCount(6, $response['data']['channels']); // includes old and new channels $this->assertContains('rows', $response['data']['channels']); $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); From 59e5ce0664e3bbe039e307acbc70c192610f68fe Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 16:44:19 +0530 Subject: [PATCH 046/362] update: `collections` <> `tables` errors. --- app/config/errors.php | 20 +++++++++---------- app/controllers/general.php | 2 +- src/Appwrite/Extend/Exception.php | 6 +++--- .../Modules/Databases/Http/Columns/Action.php | 6 +++--- .../Modules/Databases/Http/Columns/Delete.php | 4 ++-- .../Modules/Databases/Http/Columns/Get.php | 2 +- .../Http/Columns/Relationship/Create.php | 4 ++-- .../Modules/Databases/Http/Columns/XList.php | 2 +- .../Modules/Databases/Http/Indexes/Create.php | 2 +- .../Modules/Databases/Http/Indexes/Delete.php | 2 +- .../Modules/Databases/Http/Indexes/Get.php | 2 +- .../Modules/Databases/Http/Indexes/XList.php | 2 +- .../Modules/Databases/Http/Rows/Create.php | 4 ++-- .../Modules/Databases/Http/Rows/Delete.php | 4 ++-- .../Modules/Databases/Http/Rows/Get.php | 2 +- .../Databases/Http/Rows/Logs/XList.php | 2 +- .../Modules/Databases/Http/Rows/Update.php | 4 ++-- .../Modules/Databases/Http/Rows/XList.php | 2 +- .../Modules/Databases/Http/Tables/Create.php | 4 ++-- .../Modules/Databases/Http/Tables/Delete.php | 2 +- .../Modules/Databases/Http/Tables/Get.php | 2 +- .../Databases/Http/Tables/Logs/XList.php | 2 +- .../Modules/Databases/Http/Tables/Update.php | 2 +- .../Databases/Http/Tables/Usage/Get.php | 2 +- .../Databases/DatabasesCustomServerTest.php | 2 +- 25 files changed, 44 insertions(+), 44 deletions(-) diff --git a/app/config/errors.php b/app/config/errors.php index 9d30170c2d..6923090ee1 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -657,20 +657,20 @@ return [ 'code' => 400, ], - /** Collections */ - Exception::COLLECTION_NOT_FOUND => [ - 'name' => Exception::COLLECTION_NOT_FOUND, - 'description' => 'Collection with the requested ID could not be found.', + /** Tables */ + Exception::TABLE_NOT_FOUND => [ + 'name' => Exception::TABLE_NOT_FOUND, + 'description' => 'Table with the requested ID could not be found.', 'code' => 404, ], - Exception::COLLECTION_ALREADY_EXISTS => [ - 'name' => Exception::COLLECTION_ALREADY_EXISTS, - 'description' => 'A collection with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.', + Exception::TABLE_ALREADY_EXISTS => [ + 'name' => Exception::TABLE_ALREADY_EXISTS, + 'description' => 'A table with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.', 'code' => 409, ], - Exception::COLLECTION_LIMIT_EXCEEDED => [ - 'name' => Exception::COLLECTION_LIMIT_EXCEEDED, - 'description' => 'The maximum number of collections has been reached.', + Exception::TABLE_LIMIT_EXCEEDED => [ + 'name' => Exception::TABLE_LIMIT_EXCEEDED, + 'description' => 'The maximum number of tables has been reached.', 'code' => 400, ], diff --git a/app/controllers/general.php b/app/controllers/general.php index 6f46f529ce..a0e707ea2f 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1185,7 +1185,7 @@ App::error() $error = new AppwriteException(AppwriteException::RELATIONSHIP_VALUE_INVALID, $error->getMessage(), previous: $error); break; case 'Utopia\Database\Exception\NotFound': - $error = new AppwriteException(AppwriteException::COLLECTION_NOT_FOUND, $error->getMessage(), previous: $error); + $error = new AppwriteException(AppwriteException::TABLE_NOT_FOUND, $error->getMessage(), previous: $error); break; case 'Utopia\Database\Exception\Dependency': $error = new AppwriteException(AppwriteException::INDEX_DEPENDENCY, null, previous: $error); diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 7df9134c9f..0ea0c16174 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -192,9 +192,9 @@ class Exception extends \Exception public const DATABASE_QUERY_ORDER_NULL = 'database_query_order_null'; /** Collections */ - public const COLLECTION_NOT_FOUND = 'collection_not_found'; - public const COLLECTION_ALREADY_EXISTS = 'collection_already_exists'; - public const COLLECTION_LIMIT_EXCEEDED = 'collection_limit_exceeded'; + public const TABLE_NOT_FOUND = 'table_not_found'; + public const TABLE_ALREADY_EXISTS = 'table_already_exists'; + public const TABLE_LIMIT_EXCEEDED = 'table_limit_exceeded'; /** Documents */ public const DOCUMENT_NOT_FOUND = 'document_not_found'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php index 70c26594a3..109844534b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php @@ -78,7 +78,7 @@ class Action extends UtopiaAction $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } if (!empty($format)) { @@ -100,7 +100,7 @@ class Action extends UtopiaAction $options['side'] = Database::RELATION_SIDE_PARENT; $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection'] ?? ''); if ($relatedTable->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND, 'The related table was not found.'); + throw new Exception(Exception::TABLE_NOT_FOUND, 'The related table was not found.'); } } @@ -229,7 +229,7 @@ class Action extends UtopiaAction $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $column = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php index 945097e66b..c4c681b080 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php @@ -81,7 +81,7 @@ class Delete extends Action $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $column = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); @@ -109,7 +109,7 @@ class Delete extends Action if ($options['twoWay']) { $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection']); if ($relatedTable->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $relatedColumn = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $options['twoWayKey']); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php index 160ab60868..091b778eb8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php @@ -75,7 +75,7 @@ class Get extends Action $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $column = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $table->getInternalId() . '_' . $key); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php index d063c8e055..9628d79a92 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php @@ -105,13 +105,13 @@ class Create extends ColumnAction $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId()); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $relatedTableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId); $relatedTable = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $relatedTableDocument->getInternalId()); if ($relatedTable->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $columns = $table->getAttribute('attributes', []); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php index e9800e71a0..2b212e2be3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php @@ -68,7 +68,7 @@ class XList extends Action $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $queries = Query::parseQueries($queries); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php index 49cb7157b0..1b45f58a2f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php @@ -85,7 +85,7 @@ class Create extends Action $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $count = $dbForProject->count('indexes', [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Delete.php index eeb772e0c3..78e1799164 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Delete.php @@ -74,7 +74,7 @@ class Delete extends Action $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $index = $dbForProject->getDocument('indexes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php index 72ab1a02b1..b1689481ed 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php @@ -67,7 +67,7 @@ class Get extends Action $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $index = $table->find('key', $key, 'indexes'); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/XList.php index 4920b679c1..53c623f9f4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/XList.php @@ -73,7 +73,7 @@ class XList extends Action $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $queries = Query::parseQueries($queries); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php index 55efbc3632..adf481c1c4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php @@ -106,7 +106,7 @@ class Create extends Action $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $allowedPermissions = [ @@ -246,7 +246,7 @@ class Create extends Action } catch (DuplicateException) { throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); } catch (NotFoundException) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php index bba042bca5..16e16b7d73 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php @@ -84,7 +84,7 @@ class Delete extends Action $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } // Read permission should not be required for delete @@ -102,7 +102,7 @@ class Delete extends Action ); }); } catch (NotFoundException) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } // Add $tableId and $databaseId for all rows diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php index 85b6127bd3..f2da5e69f4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php @@ -79,7 +79,7 @@ class Get extends Action $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } try { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php index 02358be8f2..43e61c1434 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php @@ -81,7 +81,7 @@ class XList extends Action $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $row = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php index c9ed71d569..6de7e6ae92 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php @@ -101,7 +101,7 @@ class Update extends Action $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } // Read permission should not be required for update @@ -243,7 +243,7 @@ class Update extends Action } catch (StructureException $e) { throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); } catch (NotFoundException) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } // Add $tableId and $databaseId for all rows diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php index 4396c2b112..95410507bf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php @@ -79,7 +79,7 @@ class XList extends Action $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } try { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php index 9acd248190..dc3f7b8574 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php @@ -99,9 +99,9 @@ class Create extends Action $dbForProject->createCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), permissions: $permissions, documentSecurity: $documentSecurity); } catch (DuplicateException) { - throw new Exception(Exception::COLLECTION_ALREADY_EXISTS); + throw new Exception(Exception::TABLE_ALREADY_EXISTS); } catch (LimitException) { - throw new Exception(Exception::COLLECTION_LIMIT_EXCEEDED); + throw new Exception(Exception::TABLE_LIMIT_EXCEEDED); } $queueForEvents diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php index 6fe7228ed9..b7e8f6ecf7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php @@ -71,7 +71,7 @@ class Delete extends Action $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } if (!$dbForProject->deleteDocument('database_' . $database->getInternalId(), $tableId)) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php index 63bc1fa48c..4c76c1f89d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php @@ -66,7 +66,7 @@ class Get extends Action $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $response->dynamic($table, UtopiaResponse::MODEL_TABLE); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php index 44a850424f..1dba2493cf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php @@ -81,7 +81,7 @@ class XList extends Action $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $tableDocument->getInternalId()); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } try { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php index d5f8d388ab..f5621feab3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php @@ -77,7 +77,7 @@ class Update extends Action $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $permissions ??= $table->getPermissions() ?? []; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php index 4c591bff1a..b528fee7cf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php @@ -68,7 +68,7 @@ class Get extends Action $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $tableDocument->getInternalId()); if ($table->isEmpty()) { - throw new Exception(Exception::COLLECTION_NOT_FOUND); + throw new Exception(Exception::TABLE_NOT_FOUND); } $periods = Config::getParam('usage', []); diff --git a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php index 508578f149..a5beb77bf3 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php @@ -3491,7 +3491,7 @@ class DatabasesCustomServerTest extends Scope ]), $payload); $this->assertEquals(404, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLLECTION_NOT_FOUND, $update['body']['type']); + $this->assertEquals(AppwriteException::TABLE_NOT_FOUND, $update['body']['type']); /** * Check if Attribute exists From 6e8dbfc6749bd44a53bbe4ad07dc8c27087f5554 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 16:48:04 +0530 Subject: [PATCH 047/362] update: `documents` <> `rows` errors. --- app/config/errors.php | 44 +++++++++---------- app/controllers/general.php | 8 ++-- src/Appwrite/Extend/Exception.php | 16 +++---- .../Modules/Databases/Http/Rows/Create.php | 8 ++-- .../Modules/Databases/Http/Rows/Delete.php | 2 +- .../Modules/Databases/Http/Rows/Get.php | 2 +- .../Databases/Http/Rows/Logs/XList.php | 2 +- .../Modules/Databases/Http/Rows/Update.php | 8 ++-- .../e2e/Services/Databases/DatabasesBase.php | 2 +- .../Databases/DatabasesCustomServerTest.php | 2 +- 10 files changed, 47 insertions(+), 47 deletions(-) diff --git a/app/config/errors.php b/app/config/errors.php index 6923090ee1..12d494faf6 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -674,40 +674,40 @@ return [ 'code' => 400, ], - /** Documents */ - Exception::DOCUMENT_NOT_FOUND => [ - 'name' => Exception::DOCUMENT_NOT_FOUND, - 'description' => 'Document with the requested ID could not be found.', + /** Rows */ + Exception::ROW_NOT_FOUND => [ + 'name' => Exception::ROW_NOT_FOUND, + 'description' => 'Row with the requested ID could not be found.', 'code' => 404, ], - Exception::DOCUMENT_INVALID_STRUCTURE => [ - 'name' => Exception::DOCUMENT_INVALID_STRUCTURE, - 'description' => 'The document structure is invalid. Please ensure the attributes match the collection definition.', + Exception::ROW_INVALID_STRUCTURE => [ + 'name' => Exception::ROW_INVALID_STRUCTURE, + 'description' => 'The row structure is invalid. Please ensure the columns match the table definition.', 'code' => 400, ], - Exception::DOCUMENT_MISSING_DATA => [ - 'name' => Exception::DOCUMENT_MISSING_DATA, - 'description' => 'The document data is missing. Try again with document data populated', + Exception::ROW_MISSING_DATA => [ + 'name' => Exception::ROW_MISSING_DATA, + 'description' => 'The row data is missing. Try again with row data populated', 'code' => 400, ], - Exception::DOCUMENT_MISSING_PAYLOAD => [ - 'name' => Exception::DOCUMENT_MISSING_PAYLOAD, - 'description' => 'The document data and permissions are missing. You must provide either document data or permissions to be updated.', + Exception::ROW_MISSING_PAYLOAD => [ + 'name' => Exception::ROW_MISSING_PAYLOAD, + 'description' => 'The row data and permissions are missing. You must provide either row data or permissions to be updated.', 'code' => 400, ], - Exception::DOCUMENT_ALREADY_EXISTS => [ - 'name' => Exception::DOCUMENT_ALREADY_EXISTS, - 'description' => 'Document with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.', + Exception::ROW_ALREADY_EXISTS => [ + 'name' => Exception::ROW_ALREADY_EXISTS, + 'description' => 'Row with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.', 'code' => 409, ], - Exception::DOCUMENT_UPDATE_CONFLICT => [ - 'name' => Exception::DOCUMENT_UPDATE_CONFLICT, - 'description' => 'Remote document is newer than local.', + Exception::ROW_UPDATE_CONFLICT => [ + 'name' => Exception::ROW_UPDATE_CONFLICT, + 'description' => 'Remote row is newer than local.', 'code' => 409, ], - Exception::DOCUMENT_DELETE_RESTRICTED => [ - 'name' => Exception::DOCUMENT_DELETE_RESTRICTED, - 'description' => 'Document cannot be deleted because it is referenced by another document.', + Exception::ROW_DELETE_RESTRICTED => [ + 'name' => Exception::ROW_DELETE_RESTRICTED, + 'description' => 'Row cannot be deleted because it is referenced by another document.', 'code' => 403, ], diff --git a/app/controllers/general.php b/app/controllers/general.php index a0e707ea2f..cc6739e790 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1161,7 +1161,7 @@ App::error() } break; case 'Utopia\Database\Exception\Conflict': - $error = new AppwriteException(AppwriteException::DOCUMENT_UPDATE_CONFLICT, previous: $error); + $error = new AppwriteException(AppwriteException::ROW_UPDATE_CONFLICT, previous: $error); break; case 'Utopia\Database\Exception\Timeout': $error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error); @@ -1170,13 +1170,13 @@ App::error() $error = new AppwriteException(AppwriteException::GENERAL_QUERY_INVALID, $error->getMessage(), previous: $error); break; case 'Utopia\Database\Exception\Structure': - $error = new AppwriteException(AppwriteException::DOCUMENT_INVALID_STRUCTURE, $error->getMessage(), previous: $error); + $error = new AppwriteException(AppwriteException::ROW_INVALID_STRUCTURE, $error->getMessage(), previous: $error); break; case 'Utopia\Database\Exception\Duplicate': - $error = new AppwriteException(AppwriteException::DOCUMENT_ALREADY_EXISTS); + $error = new AppwriteException(AppwriteException::ROW_ALREADY_EXISTS); break; case 'Utopia\Database\Exception\Restricted': - $error = new AppwriteException(AppwriteException::DOCUMENT_DELETE_RESTRICTED); + $error = new AppwriteException(AppwriteException::ROW_DELETE_RESTRICTED); break; case 'Utopia\Database\Exception\Authorization': $error = new AppwriteException(AppwriteException::USER_UNAUTHORIZED); diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 0ea0c16174..6468a774ce 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -196,14 +196,14 @@ class Exception extends \Exception public const TABLE_ALREADY_EXISTS = 'table_already_exists'; public const TABLE_LIMIT_EXCEEDED = 'table_limit_exceeded'; - /** Documents */ - public const DOCUMENT_NOT_FOUND = 'document_not_found'; - public const DOCUMENT_INVALID_STRUCTURE = 'document_invalid_structure'; - public const DOCUMENT_MISSING_DATA = 'document_missing_data'; - public const DOCUMENT_MISSING_PAYLOAD = 'document_missing_payload'; - public const DOCUMENT_ALREADY_EXISTS = 'document_already_exists'; - public const DOCUMENT_UPDATE_CONFLICT = 'document_update_conflict'; - public const DOCUMENT_DELETE_RESTRICTED = 'document_delete_restricted'; + /** Rows */ + public const ROW_NOT_FOUND = 'row_not_found'; + public const ROW_INVALID_STRUCTURE = 'row_invalid_structure'; + public const ROW_MISSING_DATA = 'row_missing_data'; + public const ROW_MISSING_PAYLOAD = 'row_missing_payload'; + public const ROW_ALREADY_EXISTS = 'row_already_exists'; + public const ROW_UPDATE_CONFLICT = 'row_update_conflict'; + public const ROW_DELETE_RESTRICTED = 'row_delete_restricted'; /** Attribute */ public const ATTRIBUTE_NOT_FOUND = 'attribute_not_found'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php index adf481c1c4..df36696d80 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php @@ -87,11 +87,11 @@ class Create extends Action $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array if (empty($data)) { - throw new Exception(Exception::DOCUMENT_MISSING_DATA); + throw new Exception(Exception::ROW_MISSING_DATA); } if (isset($data['$id'])) { - throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, '$id is not allowed for creating new rows, try update instead'); + throw new Exception(Exception::ROW_INVALID_STRUCTURE, '$id is not allowed for creating new rows, try update instead'); } $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -242,9 +242,9 @@ class Create extends Action try { $row = $dbForProject->createDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $row); } catch (StructureException $e) { - throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); + throw new Exception(Exception::ROW_INVALID_STRUCTURE, $e->getMessage()); } catch (DuplicateException) { - throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); + throw new Exception(Exception::ROW_ALREADY_EXISTS); } catch (NotFoundException) { throw new Exception(Exception::TABLE_NOT_FOUND); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php index 16e16b7d73..8c68f23bfb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php @@ -91,7 +91,7 @@ class Delete extends Action $row = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); if ($row->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND); + throw new Exception(Exception::ROW_NOT_FOUND); } try { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php index f2da5e69f4..69127ca238 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php @@ -92,7 +92,7 @@ class Get extends Action } if ($row->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND); + throw new Exception(Exception::ROW_NOT_FOUND); } $operations = 0; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php index 43e61c1434..238815d849 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php @@ -87,7 +87,7 @@ class XList extends Action $row = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId); if ($row->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND); + throw new Exception(Exception::ROW_NOT_FOUND); } try { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php index 6de7e6ae92..7dcd1f8fcb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php @@ -86,7 +86,7 @@ class Update extends Action $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array if (empty($data) && \is_null($permissions)) { - throw new Exception(Exception::DOCUMENT_MISSING_PAYLOAD); + throw new Exception(Exception::ROW_MISSING_PAYLOAD); } $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -109,7 +109,7 @@ class Update extends Action $row = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); if ($row->isEmpty()) { - throw new Exception(Exception::DOCUMENT_NOT_FOUND); + throw new Exception(Exception::ROW_NOT_FOUND); } // Map aggregate permissions into the multiple permissions they represent. @@ -239,9 +239,9 @@ class Update extends Action } catch (AuthorizationException) { throw new Exception(Exception::USER_UNAUTHORIZED); } catch (DuplicateException) { - throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); + throw new Exception(Exception::ROW_ALREADY_EXISTS); } catch (StructureException $e) { - throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); + throw new Exception(Exception::ROW_INVALID_STRUCTURE, $e->getMessage()); } catch (NotFoundException) { throw new Exception(Exception::TABLE_NOT_FOUND); } diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 186f906252..3c2a2c4186 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -2399,7 +2399,7 @@ trait DatabasesBase $this->assertEquals(409, $response['headers']['status-code']); $this->assertEquals('Remote document is newer than local.', $response['body']['message']); - $this->assertEquals(Exception::DOCUMENT_UPDATE_CONFLICT, $response['body']['type']); + $this->assertEquals(Exception::ROW_UPDATE_CONFLICT, $response['body']['type']); return []; } diff --git a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php index a5beb77bf3..314e3e1ae1 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php @@ -3417,7 +3417,7 @@ class DatabasesCustomServerTest extends Scope ); $this->assertEquals(400, $newDoc['headers']['status-code']); - $this->assertEquals(AppwriteException::DOCUMENT_INVALID_STRUCTURE, $newDoc['body']['type']); + $this->assertEquals(AppwriteException::ROW_INVALID_STRUCTURE, $newDoc['body']['type']); } /** From 7a52ace9b25c952d7d1b801ad0e76dde3f80c159 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 16:53:20 +0530 Subject: [PATCH 048/362] update: `attributes` <> `columns` errors. --- app/config/errors.php | 66 +++++++++---------- src/Appwrite/Extend/Exception.php | 22 +++---- .../Modules/Databases/Http/Columns/Action.php | 44 ++++++------- .../Modules/Databases/Http/Columns/Delete.php | 4 +- .../Databases/Http/Columns/Enum/Create.php | 2 +- .../Databases/Http/Columns/Float/Create.php | 4 +- .../Modules/Databases/Http/Columns/Get.php | 2 +- .../Databases/Http/Columns/Integer/Create.php | 4 +- .../Http/Columns/Relationship/Create.php | 6 +- .../Databases/Http/Columns/String/Create.php | 2 +- .../Modules/Databases/Http/Indexes/Create.php | 6 +- .../Databases/DatabasesCustomServerTest.php | 38 +++++------ 12 files changed, 100 insertions(+), 100 deletions(-) diff --git a/app/config/errors.php b/app/config/errors.php index 12d494faf6..979bf43f7d 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -71,7 +71,7 @@ return [ ], Exception::GENERAL_QUERY_LIMIT_EXCEEDED => [ 'name' => Exception::GENERAL_QUERY_LIMIT_EXCEEDED, - 'description' => 'Query limit exceeded for the current attribute. Usage of more than 100 query values on a single attribute is prohibited.', + 'description' => 'Query limit exceeded for the current column. Usage of more than 100 query values on a single column is prohibited.', 'code' => 400, ], Exception::GENERAL_QUERY_INVALID => [ @@ -653,7 +653,7 @@ return [ ], Exception::DATABASE_QUERY_ORDER_NULL => [ 'name' => Exception::DATABASE_QUERY_ORDER_NULL, - 'description' => 'The order attribute had a null value. Cursor pagination requires all documents order attribute values are non-null.', + 'description' => 'The order column had a null value. Cursor pagination requires all rows order column values are non-null.', 'code' => 400, ], @@ -707,54 +707,54 @@ return [ ], Exception::ROW_DELETE_RESTRICTED => [ 'name' => Exception::ROW_DELETE_RESTRICTED, - 'description' => 'Row cannot be deleted because it is referenced by another document.', + 'description' => 'Row cannot be deleted because it is referenced by another row.', 'code' => 403, ], - /** Attributes */ - Exception::ATTRIBUTE_NOT_FOUND => [ - 'name' => Exception::ATTRIBUTE_NOT_FOUND, - 'description' => 'Attribute with the requested ID could not be found.', + /** Columns */ + Exception::COLUMN_NOT_FOUND => [ + 'name' => Exception::COLUMN_NOT_FOUND, + 'description' => 'Column with the requested ID could not be found.', 'code' => 404, ], - Exception::ATTRIBUTE_UNKNOWN => [ - 'name' => Exception::ATTRIBUTE_UNKNOWN, - 'description' => 'The attribute required for the index could not be found. Please confirm all your attributes are in the available state.', + Exception::COLUMN_UNKNOWN => [ + 'name' => Exception::COLUMN_UNKNOWN, + 'description' => 'The column required for the index could not be found. Please confirm all your columns are in the available state.', 'code' => 400, ], - Exception::ATTRIBUTE_NOT_AVAILABLE => [ - 'name' => Exception::ATTRIBUTE_NOT_AVAILABLE, - 'description' => 'The requested attribute is not yet available. Please try again later.', + Exception::COLUMN_NOT_AVAILABLE => [ + 'name' => Exception::COLUMN_NOT_AVAILABLE, + 'description' => 'The requested column is not yet available. Please try again later.', 'code' => 400, ], - Exception::ATTRIBUTE_FORMAT_UNSUPPORTED => [ - 'name' => Exception::ATTRIBUTE_FORMAT_UNSUPPORTED, - 'description' => 'The requested attribute format is not supported.', + Exception::COLUMN_FORMAT_UNSUPPORTED => [ + 'name' => Exception::COLUMN_FORMAT_UNSUPPORTED, + 'description' => 'The requested column format is not supported.', 'code' => 400, ], - Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED => [ - 'name' => Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, - 'description' => 'Default values cannot be set for array or required attributes.', + Exception::COLUMN_DEFAULT_UNSUPPORTED => [ + 'name' => Exception::COLUMN_DEFAULT_UNSUPPORTED, + 'description' => 'Default values cannot be set for array or required columns.', 'code' => 400, ], - Exception::ATTRIBUTE_ALREADY_EXISTS => [ - 'name' => Exception::ATTRIBUTE_ALREADY_EXISTS, - 'description' => 'Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.', + Exception::COLUMN_ALREADY_EXISTS => [ + 'name' => Exception::COLUMN_ALREADY_EXISTS, + 'description' => 'Column with the requested key already exists. Column keys must be unique, try again with a different key.', 'code' => 409, ], - Exception::ATTRIBUTE_LIMIT_EXCEEDED => [ - 'name' => Exception::ATTRIBUTE_LIMIT_EXCEEDED, - 'description' => 'The maximum number or size of attributes for this collection has been reached.', + Exception::COLUMN_LIMIT_EXCEEDED => [ + 'name' => Exception::COLUMN_LIMIT_EXCEEDED, + 'description' => 'The maximum number or size of columns for this table has been reached.', 'code' => 400, ], - Exception::ATTRIBUTE_VALUE_INVALID => [ - 'name' => Exception::ATTRIBUTE_VALUE_INVALID, - 'description' => 'The attribute value is invalid. Please check the type, range and value of the attribute.', + Exception::COLUMN_VALUE_INVALID => [ + 'name' => Exception::COLUMN_VALUE_INVALID, + 'description' => 'The column value is invalid. Please check the type, range and value of the column.', 'code' => 400, ], - Exception::ATTRIBUTE_TYPE_INVALID => [ - 'name' => Exception::ATTRIBUTE_TYPE_INVALID, - 'description' => 'The attribute type is invalid.', + Exception::COLUMN_TYPE_INVALID => [ + 'name' => Exception::COLUMN_TYPE_INVALID, + 'description' => 'The column type is invalid.', 'code' => 400, ], Exception::RELATIONSHIP_VALUE_INVALID => [ @@ -762,8 +762,8 @@ return [ 'description' => 'The relationship value is invalid.', 'code' => 400, ], - Exception::ATTRIBUTE_INVALID_RESIZE => [ - 'name' => Exception::ATTRIBUTE_INVALID_RESIZE, + Exception::COLUMN_INVALID_RESIZE => [ + 'name' => Exception::COLUMN_INVALID_RESIZE, 'description' => "Existing data is too large for new size, truncate your existing data then try again.", 'code' => 400, ], diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 6468a774ce..31a52a6a04 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -205,17 +205,17 @@ class Exception extends \Exception public const ROW_UPDATE_CONFLICT = 'row_update_conflict'; public const ROW_DELETE_RESTRICTED = 'row_delete_restricted'; - /** Attribute */ - public const ATTRIBUTE_NOT_FOUND = 'attribute_not_found'; - public const ATTRIBUTE_UNKNOWN = 'attribute_unknown'; - public const ATTRIBUTE_NOT_AVAILABLE = 'attribute_not_available'; - public const ATTRIBUTE_FORMAT_UNSUPPORTED = 'attribute_format_unsupported'; - public const ATTRIBUTE_DEFAULT_UNSUPPORTED = 'attribute_default_unsupported'; - public const ATTRIBUTE_ALREADY_EXISTS = 'attribute_already_exists'; - public const ATTRIBUTE_LIMIT_EXCEEDED = 'attribute_limit_exceeded'; - public const ATTRIBUTE_VALUE_INVALID = 'attribute_value_invalid'; - public const ATTRIBUTE_TYPE_INVALID = 'attribute_type_invalid'; - public const ATTRIBUTE_INVALID_RESIZE = 'attribute_invalid_resize'; + /** Columns */ + public const COLUMN_NOT_FOUND = 'column_not_found'; + public const COLUMN_UNKNOWN = 'column_unknown'; + public const COLUMN_NOT_AVAILABLE = 'column_not_available'; + public const COLUMN_FORMAT_UNSUPPORTED = 'column_format_unsupported'; + public const COLUMN_DEFAULT_UNSUPPORTED = 'column_default_unsupported'; + public const COLUMN_ALREADY_EXISTS = 'column_already_exists'; + public const COLUMN_LIMIT_EXCEEDED = 'column_limit_exceeded'; + public const COLUMN_VALUE_INVALID = 'column_value_invalid'; + public const COLUMN_TYPE_INVALID = 'column_type_invalid'; + public const COLUMN_INVALID_RESIZE = 'column_invalid_resize'; /** Relationship */ public const RELATIONSHIP_VALUE_INVALID = 'relationship_value_invalid'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php index 109844534b..a9415fded3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php @@ -83,17 +83,17 @@ class Action extends UtopiaAction if (!empty($format)) { if (!Structure::hasFormat($format, $type)) { - throw new Exception(Exception::ATTRIBUTE_FORMAT_UNSUPPORTED, "Format {$format} not available for {$type} columns."); + throw new Exception(Exception::COLUMN_FORMAT_UNSUPPORTED, "Format {$format} not available for {$type} columns."); } } // Must throw here since dbForProject->createAttribute is performed by db worker if ($required && isset($default)) { - throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for required column'); + throw new Exception(Exception::COLUMN_DEFAULT_UNSUPPORTED, 'Cannot set default value for required column'); } if ($array && isset($default)) { - throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for array columns'); + throw new Exception(Exception::COLUMN_DEFAULT_UNSUPPORTED, 'Cannot set default value for array columns'); } if ($type === Database::VAR_RELATIONSHIP) { @@ -128,9 +128,9 @@ class Action extends UtopiaAction $dbForProject->checkAttribute($table, $column); $column = $dbForProject->createDocument('attributes', $column); } catch (DuplicateException) { - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); + throw new Exception(Exception::COLUMN_ALREADY_EXISTS); } catch (LimitException) { - throw new Exception(Exception::ATTRIBUTE_LIMIT_EXCEEDED); + throw new Exception(Exception::COLUMN_LIMIT_EXCEEDED); } catch (Throwable $e) { $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); @@ -171,10 +171,10 @@ class Action extends UtopiaAction $dbForProject->createDocument('attributes', $twoWayAttribute); } catch (DuplicateException) { $dbForProject->deleteDocument('attributes', $column->getId()); - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); + throw new Exception(Exception::COLUMN_ALREADY_EXISTS); } catch (LimitException) { $dbForProject->deleteDocument('attributes', $column->getId()); - throw new Exception(Exception::ATTRIBUTE_LIMIT_EXCEEDED); + throw new Exception(Exception::COLUMN_LIMIT_EXCEEDED); } catch (Throwable $e) { $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); @@ -235,27 +235,27 @@ class Action extends UtopiaAction $column = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); if ($column->isEmpty()) { - throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + throw new Exception(Exception::COLUMN_NOT_FOUND); } if ($column->getAttribute('status') !== 'available') { - throw new Exception(Exception::ATTRIBUTE_NOT_AVAILABLE); + throw new Exception(Exception::COLUMN_NOT_AVAILABLE); } if ($column->getAttribute(('type') !== $type)) { - throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID); + throw new Exception(Exception::COLUMN_TYPE_INVALID); } if ($column->getAttribute('type') === Database::VAR_STRING && $column->getAttribute(('filter') !== $filter)) { - throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID); + throw new Exception(Exception::COLUMN_TYPE_INVALID); } if ($required && isset($default)) { - throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for required column'); + throw new Exception(Exception::COLUMN_DEFAULT_UNSUPPORTED, 'Cannot set default value for required column'); } if ($column->getAttribute('array', false) && isset($default)) { - throw new Exception(Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, 'Cannot set default value for array columns'); + throw new Exception(Exception::COLUMN_DEFAULT_UNSUPPORTED, 'Cannot set default value for array columns'); } $tableId = 'database_' . $db->getInternalId() . '_collection_' . $table->getInternalId(); @@ -275,7 +275,7 @@ class Action extends UtopiaAction $max ??= $column->getAttribute('formatOptions')['max']; if ($min > $max) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); + throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); } if ($column->getAttribute('format') === APP_DATABASE_ATTRIBUTE_INT_RANGE) { @@ -289,7 +289,7 @@ class Action extends UtopiaAction } if (!is_null($default) && !$validator->isValid($default)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); + throw new Exception(Exception::COLUMN_VALUE_INVALID, $validator->getDescription()); } $options = [ @@ -301,17 +301,17 @@ class Action extends UtopiaAction break; case APP_DATABASE_ATTRIBUTE_ENUM: if (empty($elements)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Enum elements must not be empty'); + throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Enum elements must not be empty'); } foreach ($elements as $element) { if (\strlen($element) === 0) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Each enum element must not be empty'); + throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Each enum element must not be empty'); } } if (!is_null($default) && !in_array($default, $elements)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Default value not found in elements'); + throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Default value not found in elements'); } $options = [ @@ -334,7 +334,7 @@ class Action extends UtopiaAction onDelete: $primaryRowOptions['onDelete'], ); } catch (NotFoundException) { - throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + throw new Exception(Exception::COLUMN_NOT_FOUND); } if ($primaryRowOptions['twoWay']) { @@ -364,11 +364,11 @@ class Action extends UtopiaAction newKey: $newKey ?? null ); } catch (TruncateException) { - throw new Exception(Exception::ATTRIBUTE_INVALID_RESIZE); + throw new Exception(Exception::COLUMN_INVALID_RESIZE); } catch (NotFoundException) { - throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + throw new Exception(Exception::COLUMN_NOT_FOUND); } catch (LimitException) { - throw new Exception(Exception::ATTRIBUTE_LIMIT_EXCEEDED); + throw new Exception(Exception::COLUMN_LIMIT_EXCEEDED); } catch (IndexException $e) { throw new Exception(Exception::INDEX_INVALID, $e->getMessage()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php index c4c681b080..717e8f958c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php @@ -86,7 +86,7 @@ class Delete extends Action $column = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); if ($column->isEmpty()) { - throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + throw new Exception(Exception::COLUMN_NOT_FOUND); } $validator = new IndexDependencyValidator( @@ -114,7 +114,7 @@ class Delete extends Action $relatedColumn = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $options['twoWayKey']); if ($relatedColumn->isEmpty()) { - throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + throw new Exception(Exception::COLUMN_NOT_FOUND); } if ($relatedColumn->getAttribute('status') === 'available') { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php index 5c5c7da071..c57d451743 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php @@ -84,7 +84,7 @@ class Create extends ColumnAction Event $queueForEvents ): void { if (!is_null($default) && !in_array($default, $elements, true)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Default value not found in elements'); + throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Default value not found in elements'); } $column = $this->createColumn( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php index 150ce8d25e..a0a16fafec 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php @@ -89,12 +89,12 @@ class Create extends ColumnAction $max ??= PHP_FLOAT_MAX; if ($min > $max) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); + throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); } $validator = new Range($min, $max, Database::VAR_FLOAT); if (!\is_null($default) && !$validator->isValid($default)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); + throw new Exception(Exception::COLUMN_VALUE_INVALID, $validator->getDescription()); } $column = $this->createColumn($databaseId, $tableId, new Document([ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php index 091b778eb8..4390f0841c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php @@ -80,7 +80,7 @@ class Get extends Action $column = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $table->getInternalId() . '_' . $key); if ($column->isEmpty()) { - throw new Exception(Exception::ATTRIBUTE_NOT_FOUND); + throw new Exception(Exception::COLUMN_NOT_FOUND); } $type = $column->getAttribute('type'); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php index d58b79d597..cf2244bf1f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php @@ -89,12 +89,12 @@ class Create extends ColumnAction $max ??= \PHP_INT_MAX; if ($min > $max) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); + throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); } $validator = new Range($min, $max, Database::VAR_INTEGER); if (!\is_null($default) && !$validator->isValid($default)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); + throw new Exception(Exception::COLUMN_VALUE_INVALID, $validator->getDescription()); } $size = $max > 2147483647 ? 8 : 4; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php index 9628d79a92..8b3ec616a3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php @@ -121,14 +121,14 @@ class Create extends ColumnAction } if (\strtolower($column->getId()) === \strtolower($key)) { - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); + throw new Exception(Exception::COLUMN_ALREADY_EXISTS); } if ( \strtolower($column->getAttribute('options')['twoWayKey']) === \strtolower($twoWayKey) && $column->getAttribute('options')['relatedCollection'] === $relatedTable->getId() ) { - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.'); + throw new Exception(Exception::COLUMN_ALREADY_EXISTS, 'Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.'); } if ( @@ -136,7 +136,7 @@ class Create extends ColumnAction $column->getAttribute('options')['relationType'] === Database::RELATION_MANY_TO_MANY && $column->getAttribute('options')['relatedCollection'] === $relatedTable->getId() ) { - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Creating more than one "manyToMany" relationship on the same table is currently not permitted.'); + throw new Exception(Exception::COLUMN_ALREADY_EXISTS, 'Creating more than one "manyToMany" relationship on the same table is currently not permitted.'); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php index caafdbc32f..e768fda1d6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php @@ -89,7 +89,7 @@ class Create extends ColumnAction // Ensure default fits in the given size $validator = new Text($size, 0); if (!is_null($default) && !$validator->isValid($default)) { - throw new Exception(Exception::ATTRIBUTE_VALUE_INVALID, $validator->getDescription()); + throw new Exception(Exception::COLUMN_VALUE_INVALID, $validator->getDescription()); } $filters = []; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php index 1b45f58a2f..537d8e27f0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php @@ -142,7 +142,7 @@ class Create extends Action $columnIndex = \array_search($column, array_column($oldColumns, 'key')); if ($columnIndex === false) { - throw new Exception(Exception::ATTRIBUTE_UNKNOWN, 'Unknown column: ' . $column . '. Verify the column name or create the column.'); + throw new Exception(Exception::COLUMN_UNKNOWN, 'Unknown column: ' . $column . '. Verify the column name or create the column.'); } $columnStatus = $oldColumns[$columnIndex]['status']; @@ -150,12 +150,12 @@ class Create extends Action $columnArray = $oldColumns[$columnIndex]['array'] ?? false; if ($columnType === Database::VAR_RELATIONSHIP) { - throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID, 'Cannot create an index for a relationship column: ' . $oldColumns[$columnIndex]['key']); + throw new Exception(Exception::COLUMN_TYPE_INVALID, 'Cannot create an index for a relationship column: ' . $oldColumns[$columnIndex]['key']); } // ensure attribute is available if ($columnStatus !== 'available') { - throw new Exception(Exception::ATTRIBUTE_NOT_AVAILABLE, 'Column not available: ' . $oldColumns[$columnIndex]['key']); + throw new Exception(Exception::COLUMN_NOT_AVAILABLE, 'Column not available: ' . $oldColumns[$columnIndex]['key']); } $lengths[$i] = null; diff --git a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php index 314e3e1ae1..874aa5623e 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php @@ -1785,7 +1785,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -1928,7 +1928,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -2070,7 +2070,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -2212,7 +2212,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -2430,7 +2430,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/integer/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2444,7 +2444,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/integer/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2458,7 +2458,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/integer/' . $key, array_merge([ @@ -2473,7 +2473,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); } /** @@ -2691,7 +2691,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/float/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2705,7 +2705,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/float/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2719,7 +2719,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/float/' . $key, array_merge([ @@ -2734,7 +2734,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); } /** @@ -2876,7 +2876,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -3018,7 +3018,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -3133,7 +3133,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/enum/' . $key, array_merge([ 'content-type' => 'application/json', @@ -3146,7 +3146,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/enum/' . $key, array_merge([ 'content-type' => 'application/json', @@ -3234,7 +3234,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -3324,7 +3324,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $attribute['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_INVALID_RESIZE, $attribute['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_INVALID_RESIZE, $attribute['body']['type']); // original documents to original size, remove new document $document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $document['body']['$id'], array_merge([ @@ -3503,7 +3503,7 @@ class DatabasesCustomServerTest extends Scope ]), $payload); $this->assertEquals(404, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::ATTRIBUTE_NOT_FOUND, $update['body']['type']); + $this->assertEquals(AppwriteException::COLUMN_NOT_FOUND, $update['body']['type']); } } From 6eb1c3ae686ad9c549522a70aef5aa587103194c Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 16:58:56 +0530 Subject: [PATCH 049/362] update: rename remaining variables. --- .../Platform/Modules/Databases/Http/Rows/Create.php | 8 ++++---- .../Platform/Modules/Databases/Http/Rows/Delete.php | 6 +++--- src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php | 2 +- .../Platform/Modules/Databases/Http/Rows/Update.php | 8 ++++---- .../Platform/Modules/Databases/Http/Rows/XList.php | 2 +- .../Platform/Modules/Databases/Workers/Databases.php | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php index df36696d80..87078a5d3d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php @@ -175,7 +175,7 @@ class Create extends Action $relationships = \array_filter( $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { @@ -257,7 +257,7 @@ class Create extends Action $relationships = \array_filter( $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { @@ -296,10 +296,10 @@ class Create extends Action ->dynamic($row, UtopiaResponse::MODEL_ROW); $relationships = \array_map( - fn ($document) => $document->getAttribute('key'), + fn ($row) => $row->getAttribute('key'), \array_filter( $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP ) ); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php index 8c68f23bfb..61cd4d218a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php @@ -112,7 +112,7 @@ class Delete extends Action $relationships = \array_filter( $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { @@ -147,10 +147,10 @@ class Delete extends Action $response->addHeader('X-Debug-Operations', 1); $relationships = \array_map( - fn ($document) => $document->getAttribute('key'), + fn ($row) => $row->getAttribute('key'), \array_filter( $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP ) ); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php index 69127ca238..fb600f5a7f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php @@ -110,7 +110,7 @@ class Get extends Action $relationships = \array_filter( $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php index 7dcd1f8fcb..5590aa6c67 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php @@ -156,7 +156,7 @@ class Update extends Action $relationships = \array_filter( $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { @@ -253,7 +253,7 @@ class Update extends Action $relationships = \array_filter( $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { @@ -284,10 +284,10 @@ class Update extends Action $response->dynamic($row, UtopiaResponse::MODEL_ROW); $relationships = \array_map( - fn ($document) => $document->getAttribute('key'), + fn ($row) => $row->getAttribute('key'), \array_filter( $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP ) ); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php index 95410507bf..781c0d7c83 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php @@ -136,7 +136,7 @@ class XList extends Action $relationships = \array_filter( $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { diff --git a/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php index 6564239630..37fa7cf0cc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php +++ b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php @@ -539,9 +539,9 @@ class Databases extends Action Query::contains('options', ['"relatedCollection":"'. $collectionId .'"']), ], $dbForProject, - function ($attribute) use ($dbForProject, $databaseInternalId) { - $dbForProject->purgeCachedDocument('database_' . $databaseInternalId, $attribute->getAttribute('collectionId')); - $dbForProject->purgeCachedCollection('database_' . $databaseInternalId . '_collection_' . $attribute->getAttribute('collectionInternalId')); + function ($column) use ($dbForProject, $databaseInternalId) { + $dbForProject->purgeCachedDocument('database_' . $databaseInternalId, $column->getAttribute('collectionId')); + $dbForProject->purgeCachedCollection('database_' . $databaseInternalId . '_collection_' . $column->getAttribute('collectionInternalId')); } ); From 3e813f6cba68f057bbb70318f49b0708530f7370 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 17:00:12 +0530 Subject: [PATCH 050/362] update: change filter name for collections <> tables. --- src/Appwrite/GraphQL/Types/Mapper.php | 2 +- src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php | 4 ++-- src/Appwrite/Specification/Format/OpenAPI3.php | 2 +- .../Validator/Queries/{Collections.php => Tables.php} | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/Appwrite/Utopia/Database/Validator/Queries/{Collections.php => Tables.php} (91%) diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index 8cfad823af..e763c3b42c 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -284,7 +284,7 @@ class Mapper case 'Utopia\Database\Validator\Authorization': case 'Appwrite\Utopia\Database\Validator\Queries\Base': case 'Appwrite\Utopia\Database\Validator\Queries\Buckets': - case 'Appwrite\Utopia\Database\Validator\Queries\Collections': + case 'Appwrite\Utopia\Database\Validator\Queries\Tables': case 'Appwrite\Utopia\Database\Validator\Queries\Attributes': case 'Appwrite\Utopia\Database\Validator\Queries\Indexes': case 'Appwrite\Utopia\Database\Validator\Queries\Databases': diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php index 055102415d..e6d2a2d02a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php @@ -7,7 +7,7 @@ use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; -use Appwrite\Utopia\Database\Validator\Queries\Collections; +use Appwrite\Utopia\Database\Validator\Queries\Tables; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; @@ -55,7 +55,7 @@ class XList extends Action contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('queries', [], new Collections(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Collections::ALLOWED_ATTRIBUTES), true) + ->param('queries', [], new Tables(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Tables::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 4452f63f0f..9497110950 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -409,7 +409,7 @@ class OpenAPI3 extends Format break; case 'Appwrite\Utopia\Database\Validator\Queries\Attributes': case 'Appwrite\Utopia\Database\Validator\Queries\Buckets': - case 'Appwrite\Utopia\Database\Validator\Queries\Collections': + case 'Appwrite\Utopia\Database\Validator\Queries\Tables': case 'Appwrite\Utopia\Database\Validator\Queries\Databases': case 'Appwrite\Utopia\Database\Validator\Queries\Deployments': case 'Appwrite\Utopia\Database\Validator\Queries\Executions': diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Collections.php b/src/Appwrite/Utopia/Database/Validator/Queries/Tables.php similarity index 91% rename from src/Appwrite/Utopia/Database/Validator/Queries/Collections.php rename to src/Appwrite/Utopia/Database/Validator/Queries/Tables.php index 6e8fcb8339..5a1fc4ec6d 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Collections.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Tables.php @@ -2,7 +2,7 @@ namespace Appwrite\Utopia\Database\Validator\Queries; -class Collections extends Base +class Tables extends Base { public const ALLOWED_ATTRIBUTES = [ 'name', From ed9306ef8d1a56101548d08c59247d9bbf642dd2 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 6 May 2025 17:00:57 +0530 Subject: [PATCH 051/362] update: change filter name for attributes <> columns. --- src/Appwrite/GraphQL/Types/Mapper.php | 2 +- .../Platform/Modules/Databases/Http/Columns/XList.php | 4 ++-- src/Appwrite/Specification/Format/OpenAPI3.php | 2 +- .../Validator/Queries/{Attributes.php => Columns.php} | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/Appwrite/Utopia/Database/Validator/Queries/{Attributes.php => Columns.php} (93%) diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index e763c3b42c..45aa9e0085 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -285,7 +285,7 @@ class Mapper case 'Appwrite\Utopia\Database\Validator\Queries\Base': case 'Appwrite\Utopia\Database\Validator\Queries\Buckets': case 'Appwrite\Utopia\Database\Validator\Queries\Tables': - case 'Appwrite\Utopia\Database\Validator\Queries\Attributes': + case 'Appwrite\Utopia\Database\Validator\Queries\Columns': case 'Appwrite\Utopia\Database\Validator\Queries\Indexes': case 'Appwrite\Utopia\Database\Validator\Queries\Databases': case 'Appwrite\Utopia\Database\Validator\Queries\Deployments': diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php index e9800e71a0..b23fafcbd0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php @@ -6,7 +6,7 @@ use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; -use Appwrite\Utopia\Database\Validator\Queries\Attributes; +use Appwrite\Utopia\Database\Validator\Queries\Columns; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; @@ -53,7 +53,7 @@ class XList extends Action )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('tableId', '', new UID(), 'Table ID.') - ->param('queries', [], new Attributes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Attributes::ALLOWED_ATTRIBUTES), true) + ->param('queries', [], new Columns(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Columns::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') ->callback([$this, 'action']); diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 9497110950..088a20ff98 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -407,7 +407,7 @@ class OpenAPI3 extends Format 'type' => $validator->getValidator()->getType(), ]; break; - case 'Appwrite\Utopia\Database\Validator\Queries\Attributes': + case 'Appwrite\Utopia\Database\Validator\Queries\Columns': case 'Appwrite\Utopia\Database\Validator\Queries\Buckets': case 'Appwrite\Utopia\Database\Validator\Queries\Tables': case 'Appwrite\Utopia\Database\Validator\Queries\Databases': diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Attributes.php b/src/Appwrite/Utopia/Database/Validator/Queries/Columns.php similarity index 93% rename from src/Appwrite/Utopia/Database/Validator/Queries/Attributes.php rename to src/Appwrite/Utopia/Database/Validator/Queries/Columns.php index 4a35c82b73..3c2742bfdd 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Attributes.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Columns.php @@ -2,7 +2,7 @@ namespace Appwrite\Utopia\Database\Validator\Queries; -class Attributes extends Base +class Columns extends Base { public const ALLOWED_ATTRIBUTES = [ 'key', From ee117b816a7ecc4c2bbf4a2f7245825dc7907c7c Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 7 May 2025 10:33:54 +0530 Subject: [PATCH 052/362] manage: events and channels. --- app/controllers/shared/api.php | 22 +++------------------ src/Appwrite/Event/Realtime.php | 6 ++++-- src/Appwrite/Messaging/Adapter/Realtime.php | 14 ++++++------- 3 files changed, 14 insertions(+), 28 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index ba695acff4..8c15f27acc 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -483,26 +483,10 @@ App::init() /* * Background Jobs */ - $events = $route->getLabel('event', ''); $queueForEvents - ->setUser($user) - ->setEvent($events) - ->setProject($project); - - if (str_contains($events, '.tables.')) { - $requestFormat = $request->getHeader('x-appwrite-response-format', System::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', '')); - if ($requestFormat && version_compare($requestFormat, '1.7.0', '<')) { - $map = [ - 'rows' => 'documents', - 'tables' => 'collections', - 'columns' => 'attributes', - ]; - - $compatibleEvents = str_replace(array_keys($map), array_values($map), $events); - // override the events - $queueForEvents->setEvent($compatibleEvents); - } - } + ->setEvent($route->getLabel('event', '')) + ->setProject($project) + ->setUser($user); $queueForAudits ->setMode($mode) diff --git a/src/Appwrite/Event/Realtime.php b/src/Appwrite/Event/Realtime.php index e1ec891e67..67d51e5c52 100644 --- a/src/Appwrite/Event/Realtime.php +++ b/src/Appwrite/Event/Realtime.php @@ -76,16 +76,18 @@ class Realtime extends Event $payload = new Document($this->getPayload()); $db = $this->getContext('database'); - $table = $this->getContext('table'); $bucket = $this->getContext('bucket'); + // can be Tables API or Collections API, generated channels include both! + $tableOrCollection = $this->getContext('table') ?? $this->getContext('collection'); + $target = RealtimeAdapter::fromPayload( // Pass first, most verbose event pattern event: $allEvents[0], payload: $payload, project: $this->getProject(), database: $db, - table: $table, + table: $tableOrCollection, bucket: $bucket, ); diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index b775078c61..5cb908464f 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -303,23 +303,23 @@ class Realtime extends Adapter $channels[] = 'projects.' . $project->getId(); $projectId = 'console'; $roles = [Role::team($project->getAttribute('teamId'))->toString()]; - } elseif (($parts[4] ?? '') === 'rows') { + } elseif (($parts[4] ?? '') === 'rows' || ($parts[4] ?? '') === 'documents') { if ($database->isEmpty()) { - throw new \Exception('Database needs to be passed to Realtime for Row events in the Database.'); + throw new \Exception('Database needs to be passed to Realtime for Document/Row events in the Database.'); } if ($table->isEmpty()) { - throw new \Exception('Table needs to be passed to Realtime for Row events in the Database.'); + throw new \Exception('Collection or the Table needs to be passed to Realtime for Document/Row events in the Database.'); } - // 1.7.x + // 1.7.x - Tables API $channels[] = 'rows'; $channels[] = 'databases.' . $database->getId() . '.tables.' . $payload->getAttribute('$tableId') . '.rows'; $channels[] = 'databases.' . $database->getId() . '.tables.' . $payload->getAttribute('$tableId') . '.rows.' . $payload->getId(); - // 1.6.x + // 1.6.x - Collections API $channels[] = 'documents'; - $channels[] = 'databases.' . $database->getId() . '.collections.' . $payload->getAttribute('$tableId') . '.documents'; - $channels[] = 'databases.' . $database->getId() . '.collections.' . $payload->getAttribute('$tableId') . '.documents.' . $payload->getId(); + $channels[] = 'databases.' . $database->getId() . '.collections.' . $payload->getAttribute('$collectionId') . '.documents'; + $channels[] = 'databases.' . $database->getId() . '.collections.' . $payload->getAttribute('$collectionId') . '.documents.' . $payload->getId(); $roles = $table->getAttribute('documentSecurity', false) ? \array_merge($table->getRead(), $payload->getRead()) From 46ccf6f5370dd7c7a871fed143a257e2736c84d1 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 7 May 2025 11:13:15 +0530 Subject: [PATCH 053/362] update: re-add legacy models; remove: filters. --- app/config/events.php | 50 ++++++++ app/controllers/api/project.php | 2 +- app/init/resources.php | 9 +- src/Appwrite/GraphQL/Types/Mapper.php | 43 ++++--- .../Specification/Format/OpenAPI3.php | 2 + .../Database/Validator/Queries/Attributes.php | 25 ++++ .../Validator/Queries/Collections.php | 21 ++++ src/Appwrite/Utopia/Request/Filters/V19.php | 35 ++---- src/Appwrite/Utopia/Response.php | 53 +++++++++ src/Appwrite/Utopia/Response/Filters/V19.php | 77 +------------ .../Utopia/Response/Model/Attribute.php | 85 ++++++++++++++ .../Response/Model/AttributeBoolean.php | 59 ++++++++++ .../Response/Model/AttributeDatetime.php | 67 +++++++++++ .../Utopia/Response/Model/AttributeEmail.php | 66 +++++++++++ .../Utopia/Response/Model/AttributeEnum.php | 73 ++++++++++++ .../Utopia/Response/Model/AttributeFloat.php | 73 ++++++++++++ .../Utopia/Response/Model/AttributeIP.php | 66 +++++++++++ .../Response/Model/AttributeInteger.php | 72 ++++++++++++ .../Utopia/Response/Model/AttributeList.php | 58 ++++++++++ .../Response/Model/AttributeRelationship.php | 96 +++++++++++++++ .../Utopia/Response/Model/AttributeString.php | 53 +++++++++ .../Utopia/Response/Model/AttributeURL.php | 66 +++++++++++ .../Utopia/Response/Model/BaseList.php | 8 +- .../Utopia/Response/Model/Collection.php | 109 ++++++++++++++++++ .../Utopia/Response/Model/Document.php | 92 +++++++++++++++ .../Utopia/Response/Model/UsageCollection.php | 54 +++++++++ 26 files changed, 1283 insertions(+), 131 deletions(-) create mode 100644 src/Appwrite/Utopia/Database/Validator/Queries/Attributes.php create mode 100644 src/Appwrite/Utopia/Database/Validator/Queries/Collections.php create mode 100644 src/Appwrite/Utopia/Response/Model/Attribute.php create mode 100644 src/Appwrite/Utopia/Response/Model/AttributeBoolean.php create mode 100644 src/Appwrite/Utopia/Response/Model/AttributeDatetime.php create mode 100644 src/Appwrite/Utopia/Response/Model/AttributeEmail.php create mode 100644 src/Appwrite/Utopia/Response/Model/AttributeEnum.php create mode 100644 src/Appwrite/Utopia/Response/Model/AttributeFloat.php create mode 100644 src/Appwrite/Utopia/Response/Model/AttributeIP.php create mode 100644 src/Appwrite/Utopia/Response/Model/AttributeInteger.php create mode 100644 src/Appwrite/Utopia/Response/Model/AttributeList.php create mode 100644 src/Appwrite/Utopia/Response/Model/AttributeRelationship.php create mode 100644 src/Appwrite/Utopia/Response/Model/AttributeString.php create mode 100644 src/Appwrite/Utopia/Response/Model/AttributeURL.php create mode 100644 src/Appwrite/Utopia/Response/Model/Collection.php create mode 100644 src/Appwrite/Utopia/Response/Model/Document.php create mode 100644 src/Appwrite/Utopia/Response/Model/UsageCollection.php diff --git a/app/config/events.php b/app/config/events.php index 4523b56206..182aa91363 100644 --- a/app/config/events.php +++ b/app/config/events.php @@ -145,6 +145,56 @@ return [ '$description' => 'This event triggers when a table is updated.', ] ], + 'collections' => [ + '$model' => Response::MODEL_COLLECTION, + '$resource' => true, + '$description' => 'This event triggers on any collection event.', + 'documents' => [ + '$model' => Response::MODEL_DOCUMENT, + '$resource' => true, + '$description' => 'This event triggers on any document event.', + 'create' => [ + '$description' => 'This event triggers when a document is created.', + ], + 'delete' => [ + '$description' => 'This event triggers when a document is deleted.' + ], + 'update' => [ + '$description' => 'This event triggers when a document is updated.' + ], + ], + 'indexes' => [ + '$model' => Response::MODEL_INDEX, + '$resource' => true, + '$description' => 'This event triggers on any indexes event.', + 'create' => [ + '$description' => 'This event triggers when an index is created.', + ], + 'delete' => [ + '$description' => 'This event triggers when an index is deleted.' + ] + ], + 'attributes' => [ + '$model' => Response::MODEL_ATTRIBUTE, + '$resource' => true, + '$description' => 'This event triggers on any attributes event.', + 'create' => [ + '$description' => 'This event triggers when an attribute is created.', + ], + 'delete' => [ + '$description' => 'This event triggers when an attribute is deleted.' + ] + ], + 'create' => [ + '$description' => 'This event triggers when a collection is created.' + ], + 'delete' => [ + '$description' => 'This event triggers when a collection is deleted.', + ], + 'update' => [ + '$description' => 'This event triggers when a collection is updated.', + ] + ], 'create' => [ '$description' => 'This event triggers when a database is created.' ], diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 97475c743a..047179b888 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -353,7 +353,7 @@ App::get('/v1/project/usage') 'executionsTotal' => $total[METRIC_EXECUTIONS], 'executionsMbSecondsTotal' => $total[METRIC_EXECUTIONS_MB_SECONDS], 'buildsMbSecondsTotal' => $total[METRIC_BUILDS_MB_SECONDS], - 'rowsTotal' => $total[METRIC_DOCUMENTS], + 'documentsTotal' => $total[METRIC_DOCUMENTS], 'databasesTotal' => $total[METRIC_DATABASES], 'databasesStorageTotal' => $total[METRIC_DATABASES_STORAGE], 'usersTotal' => $total[METRIC_USERS], diff --git a/app/init/resources.php b/app/init/resources.php index 7657b9ea69..5ac26281a2 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -707,6 +707,7 @@ App::setResource('schema', function ($utopia, $dbForProject) { }, ]; + // NOTE: `params` and `urls` are not used internally in the `Schema::build` function below! $params = [ 'list' => function (string $databaseId, string $collectionId, array $args) { return [ 'queries' => $args['queries']]; @@ -721,8 +722,8 @@ App::setResource('schema', function ($utopia, $dbForProject) { // Order must be the same as the route params return [ 'databaseId' => $databaseId, - 'rowId' => $id, - 'tableId' => $collectionId, + 'documentId' => $id, + 'collectionId' => $collectionId, 'data' => $args, 'permissions' => $permissions, ]; @@ -737,8 +738,8 @@ App::setResource('schema', function ($utopia, $dbForProject) { // Order must be the same as the route params return [ 'databaseId' => $databaseId, - 'tableId' => $collectionId, - 'rowId' => $documentId, + 'collectionId' => $collectionId, + 'documentId' => $documentId, 'data' => $args, 'permissions' => $permissions, ]; diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index 45aa9e0085..a56b7f2f8a 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -285,7 +285,9 @@ class Mapper case 'Appwrite\Utopia\Database\Validator\Queries\Base': case 'Appwrite\Utopia\Database\Validator\Queries\Buckets': case 'Appwrite\Utopia\Database\Validator\Queries\Tables': + case 'Appwrite\Utopia\Database\Validator\Queries\Collections': case 'Appwrite\Utopia\Database\Validator\Queries\Columns': + case 'Appwrite\Utopia\Database\Validator\Queries\Attributes': case 'Appwrite\Utopia\Database\Validator\Queries\Indexes': case 'Appwrite\Utopia\Database\Validator\Queries\Databases': case 'Appwrite\Utopia\Database\Validator\Queries\Deployments': @@ -418,8 +420,10 @@ class Mapper // TODO: Find a better way to do this switch ($name) { - case 'Columns': + case 'Attributes': return static::getColumnImplementation($object); + case 'Columns': + return static::getColumnImplementation($object, true); case 'HashOptions': return static::getHashOptionsImplementation($object); } @@ -427,29 +431,24 @@ class Mapper throw new Exception('Unknown union type: ' . $name); } - private static function getColumnImplementation(array $object): Type + private static function getColumnImplementation(array $object, bool $isColumns = false): Type { - switch ($object['type']) { - case 'string': - return match ($object['format'] ?? '') { - 'email' => static::model('ColumnEmail'), - 'url' => static::model('ColumnUrl'), - 'ip' => static::model('ColumnIp'), - default => static::model('ColumnString'), - }; - case 'integer': - return static::model('ColumnInteger'); - case 'double': - return static::model('ColumnFloat'); - case 'boolean': - return static::model('ColumnBoolean'); - case 'datetime': - return static::model('ColumnDatetime'); - case 'relationship': - return static::model('ColumnRelationship'); - } + $prefix = $isColumns ? 'Column' : 'Attribute'; - throw new Exception('Unknown column implementation'); + return match ($object['type']) { + 'string' => match ($object['format'] ?? '') { + 'email' => static::model("{$prefix}Email"), + 'url' => static::model("{$prefix}Url"), + 'ip' => static::model("{$prefix}Ip"), + default => static::model("{$prefix}String"), + }, + 'integer' => static::model("{$prefix}Integer"), + 'double' => static::model("{$prefix}Float"), + 'boolean' => static::model("{$prefix}Boolean"), + 'datetime' => static::model("{$prefix}Datetime"), + 'relationship' => static::model("{$prefix}Relationship"), + default => throw new Exception('Unknown ' . strtolower($prefix) . ' implementation'), + }; } private static function getHashOptionsImplementation(array $object): Type diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 088a20ff98..9c906d3ebc 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -408,8 +408,10 @@ class OpenAPI3 extends Format ]; break; case 'Appwrite\Utopia\Database\Validator\Queries\Columns': + case 'Appwrite\Utopia\Database\Validator\Queries\Attributes': case 'Appwrite\Utopia\Database\Validator\Queries\Buckets': case 'Appwrite\Utopia\Database\Validator\Queries\Tables': + case 'Appwrite\Utopia\Database\Validator\Queries\Collections': case 'Appwrite\Utopia\Database\Validator\Queries\Databases': case 'Appwrite\Utopia\Database\Validator\Queries\Deployments': case 'Appwrite\Utopia\Database\Validator\Queries\Executions': diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Attributes.php b/src/Appwrite/Utopia/Database/Validator/Queries/Attributes.php new file mode 100644 index 0000000000..4a35c82b73 --- /dev/null +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Attributes.php @@ -0,0 +1,25 @@ + 'rowId', - 'attributes' => 'columns', - 'collectionId' => 'tableId', - 'attributeId' => 'columnId', - '$collectionId' => '$tableId', - 'relatedCollection' => 'relatedTable', - 'relatedCollectionId' => 'relatedTableId', - ]; - // Convert 1.6 params to 1.7 public function parse(array $content, string $model): array { - $content = $this->overrideDatabaseParams($content, $model); - - return $content; - } - - protected function overrideDatabaseParams(array $content, string $model): array - { - if (!str_starts_with($model, 'databases.')) { - return $content; - } - - $intersect = array_intersect_key(self::PARAMS_MAP, $content); - - foreach ($intersect as $oldKey => $newKey) { - $content[$newKey] = $content[$oldKey]; - unset($content[$oldKey]); + /* + Uncomment with first request filter; current is just a copy of V18 + switch ($model) { + case 'functions.create': + $content['something'] = $content['somethingElse'] ?? ""; + unset($content['something']); + break; } + */ return $content; } diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 62822e9956..c72a01c79a 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -15,10 +15,23 @@ use Appwrite\Utopia\Response\Model\AlgoScrypt; use Appwrite\Utopia\Response\Model\AlgoScryptModified; use Appwrite\Utopia\Response\Model\AlgoSha; use Appwrite\Utopia\Response\Model\Any; +use Appwrite\Utopia\Response\Model\Attribute; +use Appwrite\Utopia\Response\Model\AttributeBoolean; +use Appwrite\Utopia\Response\Model\AttributeDatetime; +use Appwrite\Utopia\Response\Model\AttributeEmail; +use Appwrite\Utopia\Response\Model\AttributeEnum; +use Appwrite\Utopia\Response\Model\AttributeFloat; +use Appwrite\Utopia\Response\Model\AttributeInteger; +use Appwrite\Utopia\Response\Model\AttributeIP; +use Appwrite\Utopia\Response\Model\AttributeList; +use Appwrite\Utopia\Response\Model\AttributeRelationship; +use Appwrite\Utopia\Response\Model\AttributeString; +use Appwrite\Utopia\Response\Model\AttributeURL; use Appwrite\Utopia\Response\Model\AuthProvider; use Appwrite\Utopia\Response\Model\BaseList; use Appwrite\Utopia\Response\Model\Branch; use Appwrite\Utopia\Response\Model\Bucket; +use Appwrite\Utopia\Response\Model\Collection; use Appwrite\Utopia\Response\Model\Column; use Appwrite\Utopia\Response\Model\ColumnBoolean; use Appwrite\Utopia\Response\Model\ColumnDatetime; @@ -40,6 +53,7 @@ use Appwrite\Utopia\Response\Model\Deployment; use Appwrite\Utopia\Response\Model\DetectionFramework; use Appwrite\Utopia\Response\Model\DetectionRuntime; use Appwrite\Utopia\Response\Model\DevKey; +use Appwrite\Utopia\Response\Model\Document as ModelDocument; use Appwrite\Utopia\Response\Model\Error; use Appwrite\Utopia\Response\Model\ErrorDev; use Appwrite\Utopia\Response\Model\Execution; @@ -106,6 +120,7 @@ use Appwrite\Utopia\Response\Model\TemplateVariable; use Appwrite\Utopia\Response\Model\Token; use Appwrite\Utopia\Response\Model\Topic; use Appwrite\Utopia\Response\Model\UsageBuckets; +use Appwrite\Utopia\Response\Model\UsageCollection; use Appwrite\Utopia\Response\Model\UsageDatabase; use Appwrite\Utopia\Response\Model\UsageDatabases; use Appwrite\Utopia\Response\Model\UsageFunction; @@ -148,6 +163,7 @@ class Response extends SwooleResponse public const MODEL_USAGE_DATABASES = 'usageDatabases'; public const MODEL_USAGE_DATABASE = 'usageDatabase'; public const MODEL_USAGE_TABLE = 'usageTable'; + public const MODEL_USAGE_COLLECTION = 'usageCollection'; public const MODEL_USAGE_USERS = 'usageUsers'; public const MODEL_USAGE_BUCKETS = 'usageBuckets'; public const MODEL_USAGE_STORAGE = 'usageStorage'; @@ -160,14 +176,32 @@ class Response extends SwooleResponse // Database public const MODEL_DATABASE = 'database'; public const MODEL_DATABASE_LIST = 'databaseList'; + public const MODEL_COLLECTION = 'collection'; + public const MODEL_COLLECTION_LIST = 'collectionList'; public const MODEL_TABLE = 'table'; public const MODEL_TABLE_LIST = 'tableList'; public const MODEL_INDEX = 'index'; public const MODEL_INDEX_LIST = 'indexList'; + public const MODEL_DOCUMENT = 'document'; + public const MODEL_DOCUMENT_LIST = 'documentList'; public const MODEL_ROW = 'row'; public const MODEL_ROW_LIST = 'rowList'; // Database Attributes + public const MODEL_ATTRIBUTE = 'attribute'; + public const MODEL_ATTRIBUTE_LIST = 'attributeList'; + public const MODEL_ATTRIBUTE_STRING = 'attributeString'; + public const MODEL_ATTRIBUTE_INTEGER = 'attributeInteger'; + public const MODEL_ATTRIBUTE_FLOAT = 'attributeFloat'; + public const MODEL_ATTRIBUTE_BOOLEAN = 'attributeBoolean'; + public const MODEL_ATTRIBUTE_EMAIL = 'attributeEmail'; + public const MODEL_ATTRIBUTE_ENUM = 'attributeEnum'; + public const MODEL_ATTRIBUTE_IP = 'attributeIp'; + public const MODEL_ATTRIBUTE_URL = 'attributeUrl'; + public const MODEL_ATTRIBUTE_DATETIME = 'attributeDatetime'; + public const MODEL_ATTRIBUTE_RELATIONSHIP = 'attributeRelationship'; + + // Database Columns public const MODEL_COLUMN = 'column'; public const MODEL_COLUMN_LIST = 'columnList'; public const MODEL_COLUMN_STRING = 'columnString'; @@ -377,7 +411,9 @@ class Response extends SwooleResponse ->setModel(new ErrorDev()) // Lists ->setModel(new BaseList('Rows List', self::MODEL_ROW_LIST, 'rows', self::MODEL_ROW)) + ->setModel(new BaseList('Documents List', self::MODEL_DOCUMENT_LIST, 'documents', self::MODEL_DOCUMENT)) ->setModel(new BaseList('Tables List', self::MODEL_TABLE_LIST, 'tables', self::MODEL_TABLE)) + ->setModel(new BaseList('Collections List', self::MODEL_COLLECTION_LIST, 'collections', self::MODEL_COLLECTION)) ->setModel(new BaseList('Databases List', self::MODEL_DATABASE_LIST, 'databases', self::MODEL_DATABASE)) ->setModel(new BaseList('Indexes List', self::MODEL_INDEX_LIST, 'indexes', self::MODEL_INDEX)) ->setModel(new BaseList('Users List', self::MODEL_USER_LIST, 'users', self::MODEL_USER)) @@ -428,6 +464,21 @@ class Response extends SwooleResponse ->setModel(new BaseList('VCS Content List', self::MODEL_VCS_CONTENT_LIST, 'contents', self::MODEL_VCS_CONTENT)) // Entities ->setModel(new Database()) + // Collection API Models + ->setModel(new Collection()) + ->setModel(new Attribute()) + ->setModel(new AttributeList()) + ->setModel(new AttributeString()) + ->setModel(new AttributeInteger()) + ->setModel(new AttributeFloat()) + ->setModel(new AttributeBoolean()) + ->setModel(new AttributeEmail()) + ->setModel(new AttributeEnum()) + ->setModel(new AttributeIP()) + ->setModel(new AttributeURL()) + ->setModel(new AttributeDatetime()) + ->setModel(new AttributeRelationship()) + // Table API Models ->setModel(new Table()) ->setModel(new Column()) ->setModel(new ColumnList()) @@ -443,6 +494,7 @@ class Response extends SwooleResponse ->setModel(new ColumnRelationship()) ->setModel(new Index()) ->setModel(new Row()) + ->setModel(new ModelDocument()) ->setModel(new Log()) ->setModel(new User()) ->setModel(new AlgoMd5()) @@ -509,6 +561,7 @@ class Response extends SwooleResponse ->setModel(new UsageDatabases()) ->setModel(new UsageDatabase()) ->setModel(new UsageTable()) + ->setModel(new UsageCollection()) ->setModel(new UsageUsers()) ->setModel(new UsageStorage()) ->setModel(new UsageBuckets()) diff --git a/src/Appwrite/Utopia/Response/Filters/V19.php b/src/Appwrite/Utopia/Response/Filters/V19.php index 24cb07889f..4505b2c8f2 100644 --- a/src/Appwrite/Utopia/Response/Filters/V19.php +++ b/src/Appwrite/Utopia/Response/Filters/V19.php @@ -7,44 +7,18 @@ use Appwrite\Utopia\Response\Filter; class V19 extends Filter { - private const DATABASE_MAPPINGS = [ - 'table' => 'collection', - 'tables' => 'collections', - '$tableId' => '$collectionId', - 'tablesTotal' => 'collectionsTotal', - 'relatedTable' => 'relatedCollection', - 'relatedTableId' => 'relatedCollectionId', - - 'column' => 'attribute', - 'columns' => 'attributes', - 'columnsTotal' => 'attributesTotal', - - 'row' => 'document', - 'rows' => 'documents', - 'rowsTotal' => 'documentsTotal' - ]; - // Convert 1.7 Data format to 1.6 format public function parse(array $content, string $model): array { $parsedResponse = $content; - return match ($model) { - Response::MODEL_ROW, - Response::MODEL_TABLE, - Response::MODEL_COLUMN, - Response::MODEL_ROW_LIST, - Response::MODEL_TABLE_LIST, - Response::MODEL_COLUMN_LIST, - Response::MODEL_USAGE_TABLE, - Response::MODEL_USAGE_DATABASE, - Response::MODEL_USAGE_DATABASES, - Response::MODEL_COLUMN_RELATIONSHIP => $this->handleDBTerminology($model, $content), - + $parsedResponse = match($model) { Response::MODEL_FUNCTION => $this->parseFunction($content), Response::MODEL_FUNCTION_LIST => $this->handleList($content, 'functions', fn ($item) => $this->parseFunction($item)), default => $parsedResponse, }; + + return $parsedResponse; } protected function parseFunction(array $content): array @@ -53,49 +27,4 @@ class V19 extends Filter unset($content['deploymentId']); return $content; } - - protected function handleDBTerminology(string $model, array $content): array - { - $isListModel = match ($model) { - Response::MODEL_ROW_LIST, - Response::MODEL_TABLE_LIST, - Response::MODEL_COLUMN_LIST => true, - - default => false - }; - - if ($isListModel) { - foreach (self::DATABASE_MAPPINGS as $oldKey => $newKey) { - if (isset($content[$oldKey])) { - $content[$newKey] = array_map(fn ($item) => $this->remapKeys($item), $content[$oldKey]); - unset($content[$oldKey]); - } - } - } else { - $content = $this->remapKeysRecursive($content); - } - - return $content; - } - - private function remapKeys(array $data): array - { - foreach (self::DATABASE_MAPPINGS as $old => $new) { - if (isset($data[$old])) { - $data[$new] = $data[$old]; - unset($data[$old]); - } - } - return $data; - } - - private function remapKeysRecursive(array $data): array - { - $result = []; - foreach ($data as $key => $value) { - $newKey = self::DATABASE_MAPPINGS[$key] ?? $key; - $result[$newKey] = \is_array($value) ? $this->remapKeysRecursive($value) : $value; - } - return $result; - } } diff --git a/src/Appwrite/Utopia/Response/Model/Attribute.php b/src/Appwrite/Utopia/Response/Model/Attribute.php new file mode 100644 index 0000000000..8c43f8d21c --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/Attribute.php @@ -0,0 +1,85 @@ +addRule('key', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute Key.', + 'default' => '', + 'example' => 'fullName', + ]) + ->addRule('type', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute type.', + 'default' => '', + 'example' => 'string', + ]) + ->addRule('status', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`', + 'default' => '', + 'example' => 'available', + ]) + ->addRule('error', [ + 'type' => self::TYPE_STRING, + 'description' => 'Error message. Displays error generated on failure of creating or deleting an attribute.', + 'default' => '', + 'example' => 'string', + ]) + ->addRule('required', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Is attribute required?', + 'default' => false, + 'example' => true, + ]) + ->addRule('array', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Is attribute an array?', + 'default' => false, + 'required' => false, + 'example' => false, + ]) + ->addRule('$createdAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Attribute creation date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$updatedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Attribute update date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]); + } + + public array $conditions = []; + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'Attribute'; + } + + /** + * Get Collection + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_ATTRIBUTE; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/AttributeBoolean.php b/src/Appwrite/Utopia/Response/Model/AttributeBoolean.php new file mode 100644 index 0000000000..05846817ca --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/AttributeBoolean.php @@ -0,0 +1,59 @@ +addRule('key', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute Key.', + 'default' => '', + 'example' => 'isEnabled', + ]) + ->addRule('type', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute type.', + 'default' => '', + 'example' => 'boolean', + ]) + ->addRule('default', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', + 'default' => null, + 'required' => false, + 'example' => false + ]) + ; + } + + public array $conditions = [ + 'type' => self::TYPE_BOOLEAN + ]; + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'AttributeBoolean'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_ATTRIBUTE_BOOLEAN; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/AttributeDatetime.php b/src/Appwrite/Utopia/Response/Model/AttributeDatetime.php new file mode 100644 index 0000000000..4651aebd06 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/AttributeDatetime.php @@ -0,0 +1,67 @@ +addRule('key', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute Key.', + 'default' => '', + 'example' => 'birthDay', + ]) + ->addRule('type', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute type.', + 'default' => '', + 'example' => self::TYPE_DATETIME, + ]) + ->addRule('format', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'ISO 8601 format.', + 'default' => APP_DATABASE_ATTRIBUTE_DATETIME, + 'example' => APP_DATABASE_ATTRIBUTE_DATETIME, + 'array' => false, + ]) + ->addRule('default', [ + 'type' => self::TYPE_STRING, + 'description' => 'Default value for attribute when not provided. Only null is optional', + 'default' => null, + 'example' => self::TYPE_DATETIME_EXAMPLE, + 'array' => false, + 'required' => false, + ]) + ; + } + + public array $conditions = [ + 'type' => self::TYPE_DATETIME + ]; + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'AttributeDatetime'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_ATTRIBUTE_DATETIME; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/AttributeEmail.php b/src/Appwrite/Utopia/Response/Model/AttributeEmail.php new file mode 100644 index 0000000000..078087dd4b --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/AttributeEmail.php @@ -0,0 +1,66 @@ +addRule('key', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute Key.', + 'default' => '', + 'example' => 'userEmail', + ]) + ->addRule('type', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute type.', + 'default' => '', + 'example' => 'string', + ]) + ->addRule('format', [ + 'type' => self::TYPE_STRING, + 'description' => 'String format.', + 'default' => APP_DATABASE_ATTRIBUTE_EMAIL, + 'example' => APP_DATABASE_ATTRIBUTE_EMAIL, + ]) + ->addRule('default', [ + 'type' => self::TYPE_STRING, + 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', + 'default' => null, + 'required' => false, + 'example' => 'default@example.com', + ]) + ; + } + + public array $conditions = [ + 'type' => self::TYPE_STRING, + 'format' => \APP_DATABASE_ATTRIBUTE_EMAIL + ]; + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'AttributeEmail'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_ATTRIBUTE_EMAIL; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/AttributeEnum.php b/src/Appwrite/Utopia/Response/Model/AttributeEnum.php new file mode 100644 index 0000000000..992b62ee3a --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/AttributeEnum.php @@ -0,0 +1,73 @@ +addRule('key', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute Key.', + 'default' => '', + 'example' => 'status', + ]) + ->addRule('type', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute type.', + 'default' => '', + 'example' => 'string', + ]) + ->addRule('elements', [ + 'type' => self::TYPE_STRING, + 'description' => 'Array of elements in enumerated type.', + 'default' => null, + 'example' => 'element', + 'array' => true, + ]) + ->addRule('format', [ + 'type' => self::TYPE_STRING, + 'description' => 'String format.', + 'default' => APP_DATABASE_ATTRIBUTE_ENUM, + 'example' => APP_DATABASE_ATTRIBUTE_ENUM, + ]) + ->addRule('default', [ + 'type' => self::TYPE_STRING, + 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', + 'default' => null, + 'required' => false, + 'example' => 'element', + ]) + ; + } + + public array $conditions = [ + 'type' => self::TYPE_STRING, + 'format' => \APP_DATABASE_ATTRIBUTE_ENUM + ]; + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'AttributeEnum'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_ATTRIBUTE_ENUM; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/AttributeFloat.php b/src/Appwrite/Utopia/Response/Model/AttributeFloat.php new file mode 100644 index 0000000000..266b89c330 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/AttributeFloat.php @@ -0,0 +1,73 @@ +addRule('key', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute Key.', + 'default' => '', + 'example' => 'percentageCompleted', + ]) + ->addRule('type', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute type.', + 'default' => '', + 'example' => 'double', + ]) + ->addRule('min', [ + 'type' => self::TYPE_FLOAT, + 'description' => 'Minimum value to enforce for new documents.', + 'default' => null, + 'required' => false, + 'example' => 1.5, + ]) + ->addRule('max', [ + 'type' => self::TYPE_FLOAT, + 'description' => 'Maximum value to enforce for new documents.', + 'default' => null, + 'required' => false, + 'example' => 10.5, + ]) + ->addRule('default', [ + 'type' => self::TYPE_FLOAT, + 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', + 'default' => null, + 'required' => false, + 'example' => 2.5, + ]) + ; + } + + public array $conditions = [ + 'type' => self::TYPE_FLOAT, + ]; + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'AttributeFloat'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_ATTRIBUTE_FLOAT; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/AttributeIP.php b/src/Appwrite/Utopia/Response/Model/AttributeIP.php new file mode 100644 index 0000000000..cfa309317a --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/AttributeIP.php @@ -0,0 +1,66 @@ +addRule('key', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute Key.', + 'default' => '', + 'example' => 'ipAddress', + ]) + ->addRule('type', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute type.', + 'default' => '', + 'example' => 'string', + ]) + ->addRule('format', [ + 'type' => self::TYPE_STRING, + 'description' => 'String format.', + 'default' => APP_DATABASE_ATTRIBUTE_IP, + 'example' => APP_DATABASE_ATTRIBUTE_IP, + ]) + ->addRule('default', [ + 'type' => self::TYPE_STRING, + 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', + 'default' => null, + 'required' => false, + 'example' => '192.0.2.0', + ]) + ; + } + + public array $conditions = [ + 'type' => self::TYPE_STRING, + 'format' => \APP_DATABASE_ATTRIBUTE_IP + ]; + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'AttributeIP'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_ATTRIBUTE_IP; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/AttributeInteger.php b/src/Appwrite/Utopia/Response/Model/AttributeInteger.php new file mode 100644 index 0000000000..fddfe57445 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/AttributeInteger.php @@ -0,0 +1,72 @@ +addRule('key', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute Key.', + 'default' => '', + 'example' => 'count', + ]) + ->addRule('type', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute type.', + 'default' => '', + 'example' => 'integer', + ]) + ->addRule('min', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Minimum value to enforce for new documents.', + 'default' => null, + 'required' => false, + 'example' => 1, + ]) + ->addRule('max', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Maximum value to enforce for new documents.', + 'default' => null, + 'required' => false, + 'example' => 10, + ]) + ->addRule('default', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', + 'default' => null, + 'required' => false, + 'example' => 10, + ]) + ; + } + + public array $conditions = [ + 'type' => self::TYPE_INTEGER, + ]; + + /** + * Get Name * + * @return string + */ + public function getName(): string + { + return 'AttributeInteger'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_ATTRIBUTE_INTEGER; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/AttributeList.php b/src/Appwrite/Utopia/Response/Model/AttributeList.php new file mode 100644 index 0000000000..8b04475a14 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/AttributeList.php @@ -0,0 +1,58 @@ +addRule('total', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total number of attributes in the given collection.', + 'default' => 0, + 'example' => 5, + ]) + ->addRule('attributes', [ + 'type' => [ + Response::MODEL_ATTRIBUTE_BOOLEAN, + Response::MODEL_ATTRIBUTE_INTEGER, + Response::MODEL_ATTRIBUTE_FLOAT, + Response::MODEL_ATTRIBUTE_EMAIL, + Response::MODEL_ATTRIBUTE_ENUM, + Response::MODEL_ATTRIBUTE_URL, + Response::MODEL_ATTRIBUTE_IP, + Response::MODEL_ATTRIBUTE_DATETIME, + Response::MODEL_ATTRIBUTE_RELATIONSHIP, + Response::MODEL_ATTRIBUTE_STRING // needs to be last, since its condition would dominate any other string attribute + ], + 'description' => 'List of attributes.', + 'default' => [], + 'array' => true + ]) + ; + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'Attributes List'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_ATTRIBUTE_LIST; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php b/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php new file mode 100644 index 0000000000..d88fbd1530 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/AttributeRelationship.php @@ -0,0 +1,96 @@ +addRule('relatedCollection', [ + 'type' => self::TYPE_STRING, + 'description' => 'The ID of the related collection.', + 'default' => null, + 'example' => 'collection', + ]) + ->addRule('relationType', [ + 'type' => self::TYPE_STRING, + 'description' => 'The type of the relationship.', + 'default' => '', + 'example' => 'oneToOne|oneToMany|manyToOne|manyToMany', + ]) + ->addRule('twoWay', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Is the relationship two-way?', + 'default' => false, + 'example' => false, + ]) + ->addRule('twoWayKey', [ + 'type' => self::TYPE_STRING, + 'description' => 'The key of the two-way relationship.', + 'default' => '', + 'example' => 'string', + ]) + ->addRule('onDelete', [ + 'type' => self::TYPE_STRING, + 'description' => 'How deleting the parent document will propagate to child documents.', + 'default' => 'restrict', + 'example' => 'restrict|cascade|setNull', + ]) + ->addRule('side', [ + 'type' => self::TYPE_STRING, + 'description' => 'Whether this is the parent or child side of the relationship', + 'default' => '', + 'example' => 'parent|child', + ]) + ; + } + + public array $conditions = [ + 'type' => self::TYPE_RELATIONSHIP, + ]; + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'AttributeRelationship'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_ATTRIBUTE_RELATIONSHIP; + } + + /** + * Process Document before returning it to the client + * + * @return Document + */ + public function filter(Document $document): Document + { + $options = $document->getAttribute('options'); + if (!\is_null($options)) { + $document->setAttribute('relatedCollection', $options['relatedCollection']); + $document->setAttribute('relationType', $options['relationType']); + $document->setAttribute('twoWay', $options['twoWay']); + $document->setAttribute('twoWayKey', $options['twoWayKey']); + $document->setAttribute('side', $options['side']); + $document->setAttribute('onDelete', $options['onDelete']); + } + return $document; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/AttributeString.php b/src/Appwrite/Utopia/Response/Model/AttributeString.php new file mode 100644 index 0000000000..12bb42009d --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/AttributeString.php @@ -0,0 +1,53 @@ +addRule('size', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Attribute size.', + 'default' => 0, + 'example' => 128, + ]) + ->addRule('default', [ + 'type' => self::TYPE_STRING, + 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', + 'default' => null, + 'required' => false, + 'example' => 'default', + ]) + ; + } + + public array $conditions = [ + 'type' => self::TYPE_STRING, + ]; + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'AttributeString'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_ATTRIBUTE_STRING; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/AttributeURL.php b/src/Appwrite/Utopia/Response/Model/AttributeURL.php new file mode 100644 index 0000000000..633d5b49d7 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/AttributeURL.php @@ -0,0 +1,66 @@ +addRule('key', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute Key.', + 'default' => '', + 'example' => 'githubUrl', + ]) + ->addRule('type', [ + 'type' => self::TYPE_STRING, + 'description' => 'Attribute type.', + 'default' => '', + 'example' => 'string', + ]) + ->addRule('format', [ + 'type' => self::TYPE_STRING, + 'description' => 'String format.', + 'default' => APP_DATABASE_ATTRIBUTE_URL, + 'example' => APP_DATABASE_ATTRIBUTE_URL, + ]) + ->addRule('default', [ + 'type' => self::TYPE_STRING, + 'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.', + 'default' => null, + 'required' => false, + 'example' => 'http://example.com', + ]) + ; + } + + public array $conditions = [ + 'type' => self::TYPE_STRING, + 'format' => \APP_DATABASE_ATTRIBUTE_URL + ]; + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'AttributeURL'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_ATTRIBUTE_URL; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/BaseList.php b/src/Appwrite/Utopia/Response/Model/BaseList.php index 1fa3197ba7..dea5d476f2 100644 --- a/src/Appwrite/Utopia/Response/Model/BaseList.php +++ b/src/Appwrite/Utopia/Response/Model/BaseList.php @@ -32,9 +32,11 @@ class BaseList extends Model if ($paging) { $namesWithCap = [ - 'rows', 'tables', 'users', 'files', 'buckets', 'functions', - 'deployments', 'executions', 'projects', 'webhooks', 'keys', - 'platforms', 'rules', 'memberships', 'teams' + 'rows', 'tables', // new api + 'documents', 'collections', // legacy api + 'users', 'files', 'buckets', 'functions', + 'deployments', 'executions', 'projects', + 'webhooks', 'keys', 'platforms', 'rules', 'memberships', 'teams' ]; if (\in_array($name, $namesWithCap)) { diff --git a/src/Appwrite/Utopia/Response/Model/Collection.php b/src/Appwrite/Utopia/Response/Model/Collection.php new file mode 100644 index 0000000000..2c2bf0cca8 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/Collection.php @@ -0,0 +1,109 @@ +addRule('$id', [ + 'type' => self::TYPE_STRING, + 'description' => 'Collection ID.', + 'default' => '', + 'example' => '5e5ea5c16897e', + ]) + ->addRule('$createdAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Collection creation date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$updatedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Collection update date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$permissions', [ + 'type' => self::TYPE_STRING, + 'description' => 'Collection permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', + 'default' => '', + 'example' => ['read("any")'], + 'array' => true + ]) + ->addRule('databaseId', [ + 'type' => self::TYPE_STRING, + 'description' => 'Database ID.', + 'default' => '', + 'example' => '5e5ea5c16897e', + ]) + ->addRule('name', [ + 'type' => self::TYPE_STRING, + 'description' => 'Collection name.', + 'default' => '', + 'example' => 'My Collection', + ]) + ->addRule('enabled', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Collection enabled. Can be \'enabled\' or \'disabled\'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.', + 'default' => true, + 'example' => false, + ]) + ->addRule('documentSecurity', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Whether document-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions).', + 'default' => '', + 'example' => true, + ]) + ->addRule('attributes', [ + 'type' => [ + Response::MODEL_ATTRIBUTE_BOOLEAN, + Response::MODEL_ATTRIBUTE_INTEGER, + Response::MODEL_ATTRIBUTE_FLOAT, + Response::MODEL_ATTRIBUTE_EMAIL, + Response::MODEL_ATTRIBUTE_ENUM, + Response::MODEL_ATTRIBUTE_URL, + Response::MODEL_ATTRIBUTE_IP, + Response::MODEL_ATTRIBUTE_DATETIME, + Response::MODEL_ATTRIBUTE_RELATIONSHIP, + Response::MODEL_ATTRIBUTE_STRING, // needs to be last, since its condition would dominate any other string attribute + ], + 'description' => 'Collection attributes.', + 'default' => [], + 'example' => new \stdClass(), + 'array' => true, + ]) + ->addRule('indexes', [ + 'type' => Response::MODEL_INDEX, + 'description' => 'Collection indexes.', + 'default' => [], + 'example' => new \stdClass(), + 'array' => true + ]) + ; + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'Collection'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_COLLECTION; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/Document.php b/src/Appwrite/Utopia/Response/Model/Document.php new file mode 100644 index 0000000000..41a10cee89 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/Document.php @@ -0,0 +1,92 @@ +addRule('$id', [ + 'type' => self::TYPE_STRING, + 'description' => 'Document ID.', + 'default' => '', + 'example' => '5e5ea5c16897e', + ]) + ->addRule('$collectionId', [ + 'type' => self::TYPE_STRING, + 'description' => 'Collection ID.', + 'default' => '', + 'example' => '5e5ea5c15117e', + ]) + ->addRule('$databaseId', [ + 'type' => self::TYPE_STRING, + 'description' => 'Database ID.', + 'default' => '', + 'example' => '5e5ea5c15117e', + ]) + ->addRule('$createdAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Document creation date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$updatedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Document update date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$permissions', [ + 'type' => self::TYPE_STRING, + 'description' => 'Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', + 'default' => '', + 'example' => ['read("any")'], + 'array' => true, + ]); + } + + public function filter(DatabaseDocument $document): DatabaseDocument + { + $document->removeAttribute('$internalId'); + $document->removeAttribute('$collection'); + $document->removeAttribute('$tenant'); + + foreach ($document->getAttributes() as $attribute) { + if (\is_array($attribute)) { + foreach ($attribute as $subAttribute) { + if ($subAttribute instanceof DatabaseDocument) { + $this->filter($subAttribute); + } + } + } elseif ($attribute instanceof DatabaseDocument) { + $this->filter($attribute); + } + } + + return $document; + } +} diff --git a/src/Appwrite/Utopia/Response/Model/UsageCollection.php b/src/Appwrite/Utopia/Response/Model/UsageCollection.php new file mode 100644 index 0000000000..b2336d65ba --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/UsageCollection.php @@ -0,0 +1,54 @@ +addRule('range', [ + 'type' => self::TYPE_STRING, + 'description' => 'Time range of the usage stats.', + 'default' => '', + 'example' => '30d', + ]) + ->addRule('documentsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of of documents.', + 'default' => 0, + 'example' => 0, + ]) + ->addRule('documents', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated number of documents per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) + ; + } + + /** + * Get Name + * + * @return string + */ + public function getName(): string + { + return 'UsageCollection'; + } + + /** + * Get Type + * + * @return string + */ + public function getType(): string + { + return Response::MODEL_USAGE_COLLECTION; + } +} From 7f023f29c56ee7123026d22e060ce2f17d222dfa Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 7 May 2025 11:30:31 +0530 Subject: [PATCH 054/362] update: keep both tables and collections api errors. --- app/config/errors.php | 122 ++++++++++++++++++++++++++++-- app/controllers/general.php | 38 ++++++++-- src/Appwrite/Extend/Exception.php | 26 +++++++ 3 files changed, 174 insertions(+), 12 deletions(-) diff --git a/app/config/errors.php b/app/config/errors.php index 979bf43f7d..c1121cb98e 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -71,7 +71,7 @@ return [ ], Exception::GENERAL_QUERY_LIMIT_EXCEEDED => [ 'name' => Exception::GENERAL_QUERY_LIMIT_EXCEEDED, - 'description' => 'Query limit exceeded for the current column. Usage of more than 100 query values on a single column is prohibited.', + 'description' => 'Query limit exceeded for the current attribute/column. Usage of more than 100 query values on a single column is prohibited.', 'code' => 400, ], Exception::GENERAL_QUERY_INVALID => [ @@ -653,7 +653,24 @@ return [ ], Exception::DATABASE_QUERY_ORDER_NULL => [ 'name' => Exception::DATABASE_QUERY_ORDER_NULL, - 'description' => 'The order column had a null value. Cursor pagination requires all rows order column values are non-null.', + 'description' => 'The order attribute/column had a null value. Cursor pagination requires all documents/rows order attribute/column values are non-null.', + 'code' => 400, + ], + + /** Collections */ + Exception::COLLECTION_NOT_FOUND => [ + 'name' => Exception::COLLECTION_NOT_FOUND, + 'description' => 'Collection with the requested ID could not be found.', + 'code' => 404, + ], + Exception::COLLECTION_ALREADY_EXISTS => [ + 'name' => Exception::COLLECTION_ALREADY_EXISTS, + 'description' => 'A collection with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.', + 'code' => 409, + ], + Exception::COLLECTION_LIMIT_EXCEEDED => [ + 'name' => Exception::COLLECTION_LIMIT_EXCEEDED, + 'description' => 'The maximum number of collections has been reached.', 'code' => 400, ], @@ -674,6 +691,43 @@ return [ 'code' => 400, ], + /** Documents */ + Exception::DOCUMENT_NOT_FOUND => [ + 'name' => Exception::DOCUMENT_NOT_FOUND, + 'description' => 'Document with the requested ID could not be found.', + 'code' => 404, + ], + Exception::DOCUMENT_INVALID_STRUCTURE => [ + 'name' => Exception::DOCUMENT_INVALID_STRUCTURE, + 'description' => 'The document structure is invalid. Please ensure the attributes match the collection definition.', + 'code' => 400, + ], + Exception::DOCUMENT_MISSING_DATA => [ + 'name' => Exception::DOCUMENT_MISSING_DATA, + 'description' => 'The document data is missing. Try again with document data populated', + 'code' => 400, + ], + Exception::DOCUMENT_MISSING_PAYLOAD => [ + 'name' => Exception::DOCUMENT_MISSING_PAYLOAD, + 'description' => 'The document data and permissions are missing. You must provide either document data or permissions to be updated.', + 'code' => 400, + ], + Exception::DOCUMENT_ALREADY_EXISTS => [ + 'name' => Exception::DOCUMENT_ALREADY_EXISTS, + 'description' => 'Document with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.', + 'code' => 409, + ], + Exception::DOCUMENT_UPDATE_CONFLICT => [ + 'name' => Exception::DOCUMENT_UPDATE_CONFLICT, + 'description' => 'Remote document is newer than local.', + 'code' => 409, + ], + Exception::DOCUMENT_DELETE_RESTRICTED => [ + 'name' => Exception::DOCUMENT_DELETE_RESTRICTED, + 'description' => 'Document cannot be deleted because it is referenced by another document.', + 'code' => 403, + ], + /** Rows */ Exception::ROW_NOT_FOUND => [ 'name' => Exception::ROW_NOT_FOUND, @@ -711,6 +765,65 @@ return [ 'code' => 403, ], + /** Attributes */ + Exception::ATTRIBUTE_NOT_FOUND => [ + 'name' => Exception::ATTRIBUTE_NOT_FOUND, + 'description' => 'Attribute with the requested ID could not be found.', + 'code' => 404, + ], + Exception::ATTRIBUTE_UNKNOWN => [ + 'name' => Exception::ATTRIBUTE_UNKNOWN, + 'description' => 'The attribute required for the index could not be found. Please confirm all your attributes are in the available state.', + 'code' => 400, + ], + Exception::ATTRIBUTE_NOT_AVAILABLE => [ + 'name' => Exception::ATTRIBUTE_NOT_AVAILABLE, + 'description' => 'The requested attribute is not yet available. Please try again later.', + 'code' => 400, + ], + Exception::ATTRIBUTE_FORMAT_UNSUPPORTED => [ + 'name' => Exception::ATTRIBUTE_FORMAT_UNSUPPORTED, + 'description' => 'The requested attribute format is not supported.', + 'code' => 400, + ], + Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED => [ + 'name' => Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED, + 'description' => 'Default values cannot be set for array or required attributes.', + 'code' => 400, + ], + Exception::ATTRIBUTE_ALREADY_EXISTS => [ + 'name' => Exception::ATTRIBUTE_ALREADY_EXISTS, + 'description' => 'Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.', + 'code' => 409, + ], + Exception::ATTRIBUTE_LIMIT_EXCEEDED => [ + 'name' => Exception::ATTRIBUTE_LIMIT_EXCEEDED, + 'description' => 'The maximum number or size of attributes for this collection has been reached.', + 'code' => 400, + ], + Exception::ATTRIBUTE_VALUE_INVALID => [ + 'name' => Exception::ATTRIBUTE_VALUE_INVALID, + 'description' => 'The attribute value is invalid. Please check the type, range and value of the attribute.', + 'code' => 400, + ], + Exception::ATTRIBUTE_TYPE_INVALID => [ + 'name' => Exception::ATTRIBUTE_TYPE_INVALID, + 'description' => 'The attribute type is invalid.', + 'code' => 400, + ], + Exception::ATTRIBUTE_INVALID_RESIZE => [ + 'name' => Exception::ATTRIBUTE_INVALID_RESIZE, + 'description' => "Existing data is too large for new size, truncate your existing data then try again.", + 'code' => 400, + ], + + /** Exists for both Attributes & Columns */ + Exception::RELATIONSHIP_VALUE_INVALID => [ + 'name' => Exception::RELATIONSHIP_VALUE_INVALID, + 'description' => 'The relationship value is invalid.', + 'code' => 400, + ], + /** Columns */ Exception::COLUMN_NOT_FOUND => [ 'name' => Exception::COLUMN_NOT_FOUND, @@ -757,11 +870,6 @@ return [ 'description' => 'The column type is invalid.', 'code' => 400, ], - Exception::RELATIONSHIP_VALUE_INVALID => [ - 'name' => Exception::RELATIONSHIP_VALUE_INVALID, - 'description' => 'The relationship value is invalid.', - 'code' => 400, - ], Exception::COLUMN_INVALID_RESIZE => [ 'name' => Exception::COLUMN_INVALID_RESIZE, 'description' => "Existing data is too large for new size, truncate your existing data then try again.", diff --git a/app/controllers/general.php b/app/controllers/general.php index cc6739e790..da68d4758c 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1148,6 +1148,9 @@ App::error() Console::error('[Error] Line: ' . $line); } + // routes like /tables, /tables/:tableId, etc. + $isTablesAPI = str_contains($route->getPath(), '/databases/:databaseId/tables'); + switch ($class) { case 'Utopia\Exception': $error = new AppwriteException(AppwriteException::GENERAL_UNKNOWN, $message, $code, $error); @@ -1161,7 +1164,12 @@ App::error() } break; case 'Utopia\Database\Exception\Conflict': - $error = new AppwriteException(AppwriteException::ROW_UPDATE_CONFLICT, previous: $error); + $error = new AppwriteException( + $isTablesAPI + ? AppwriteException::ROW_UPDATE_CONFLICT + : AppwriteException::DOCUMENT_UPDATE_CONFLICT, + previous: $error + ); break; case 'Utopia\Database\Exception\Timeout': $error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error); @@ -1170,13 +1178,27 @@ App::error() $error = new AppwriteException(AppwriteException::GENERAL_QUERY_INVALID, $error->getMessage(), previous: $error); break; case 'Utopia\Database\Exception\Structure': - $error = new AppwriteException(AppwriteException::ROW_INVALID_STRUCTURE, $error->getMessage(), previous: $error); + $error = new AppwriteException( + $isTablesAPI + ? AppwriteException::ROW_INVALID_STRUCTURE + : AppwriteException::DOCUMENT_INVALID_STRUCTURE, + $error->getMessage(), + previous: $error + ); break; case 'Utopia\Database\Exception\Duplicate': - $error = new AppwriteException(AppwriteException::ROW_ALREADY_EXISTS); + $error = new AppwriteException( + $isTablesAPI + ? AppwriteException::ROW_ALREADY_EXISTS + : AppwriteException::DOCUMENT_ALREADY_EXISTS + ); break; case 'Utopia\Database\Exception\Restricted': - $error = new AppwriteException(AppwriteException::ROW_DELETE_RESTRICTED); + $error = new AppwriteException( + $isTablesAPI + ? AppwriteException::ROW_DELETE_RESTRICTED + : AppwriteException::DOCUMENT_DELETE_RESTRICTED + ); break; case 'Utopia\Database\Exception\Authorization': $error = new AppwriteException(AppwriteException::USER_UNAUTHORIZED); @@ -1185,7 +1207,13 @@ App::error() $error = new AppwriteException(AppwriteException::RELATIONSHIP_VALUE_INVALID, $error->getMessage(), previous: $error); break; case 'Utopia\Database\Exception\NotFound': - $error = new AppwriteException(AppwriteException::TABLE_NOT_FOUND, $error->getMessage(), previous: $error); + $error = new AppwriteException( + $isTablesAPI + ? AppwriteException::TABLE_NOT_FOUND + : AppwriteException::COLLECTION_NOT_FOUND, + $error->getMessage(), + previous: $error + ); break; case 'Utopia\Database\Exception\Dependency': $error = new AppwriteException(AppwriteException::INDEX_DEPENDENCY, null, previous: $error); diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 31a52a6a04..15b964577d 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -192,10 +192,24 @@ class Exception extends \Exception public const DATABASE_QUERY_ORDER_NULL = 'database_query_order_null'; /** Collections */ + public const COLLECTION_NOT_FOUND = 'collection_not_found'; + public const COLLECTION_ALREADY_EXISTS = 'collection_already_exists'; + public const COLLECTION_LIMIT_EXCEEDED = 'collection_limit_exceeded'; + + /** Tables */ public const TABLE_NOT_FOUND = 'table_not_found'; public const TABLE_ALREADY_EXISTS = 'table_already_exists'; public const TABLE_LIMIT_EXCEEDED = 'table_limit_exceeded'; + /** Documents */ + public const DOCUMENT_NOT_FOUND = 'document_not_found'; + public const DOCUMENT_INVALID_STRUCTURE = 'document_invalid_structure'; + public const DOCUMENT_MISSING_DATA = 'document_missing_data'; + public const DOCUMENT_MISSING_PAYLOAD = 'document_missing_payload'; + public const DOCUMENT_ALREADY_EXISTS = 'document_already_exists'; + public const DOCUMENT_UPDATE_CONFLICT = 'document_update_conflict'; + public const DOCUMENT_DELETE_RESTRICTED = 'document_delete_restricted'; + /** Rows */ public const ROW_NOT_FOUND = 'row_not_found'; public const ROW_INVALID_STRUCTURE = 'row_invalid_structure'; @@ -205,6 +219,18 @@ class Exception extends \Exception public const ROW_UPDATE_CONFLICT = 'row_update_conflict'; public const ROW_DELETE_RESTRICTED = 'row_delete_restricted'; + /** Attributes */ + public const ATTRIBUTE_NOT_FOUND = 'attribute_not_found'; + public const ATTRIBUTE_UNKNOWN = 'attribute_unknown'; + public const ATTRIBUTE_NOT_AVAILABLE = 'attribute_not_available'; + public const ATTRIBUTE_FORMAT_UNSUPPORTED = 'attribute_format_unsupported'; + public const ATTRIBUTE_DEFAULT_UNSUPPORTED = 'attribute_default_unsupported'; + public const ATTRIBUTE_ALREADY_EXISTS = 'attribute_already_exists'; + public const ATTRIBUTE_LIMIT_EXCEEDED = 'attribute_limit_exceeded'; + public const ATTRIBUTE_VALUE_INVALID = 'attribute_value_invalid'; + public const ATTRIBUTE_TYPE_INVALID = 'attribute_type_invalid'; + public const ATTRIBUTE_INVALID_RESIZE = 'attribute_invalid_resize'; + /** Columns */ public const COLUMN_NOT_FOUND = 'column_not_found'; public const COLUMN_UNKNOWN = 'column_unknown'; From 8610687b873df10bfb072b2f4e7f4d8674fabdf3 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 7 May 2025 13:23:27 +0530 Subject: [PATCH 055/362] update: events schema, response models for database usages. --- app/config/events.php | 2 +- .../Databases/Http/Databases/Usage/Get.php | 8 +- .../Databases/Http/Databases/Usage/XList.php | 8 +- src/Appwrite/Utopia/Response.php | 5 + .../Utopia/Response/Model/ColumnIndex.php | 94 +++++++++++++++++++ src/Appwrite/Utopia/Response/Model/Index.php | 15 +-- src/Appwrite/Utopia/Response/Model/Table.php | 2 +- .../Utopia/Response/Model/UsageDatabase.php | 17 ++-- .../Utopia/Response/Model/UsageDatabases.php | 17 ++-- .../Utopia/Response/Model/UsageProject.php | 5 +- 10 files changed, 131 insertions(+), 42 deletions(-) create mode 100644 src/Appwrite/Utopia/Response/Model/ColumnIndex.php diff --git a/app/config/events.php b/app/config/events.php index 182aa91363..e7b079050c 100644 --- a/app/config/events.php +++ b/app/config/events.php @@ -114,7 +114,7 @@ return [ ], ], 'indexes' => [ - '$model' => Response::MODEL_INDEX, + '$model' => Response::MODEL_COLUMN_INDEX, '$resource' => true, '$description' => 'This event triggers on any indexes event.', 'create' => [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index c7ae2e4d81..c4105effa0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -123,13 +123,13 @@ class Get extends Action $response->dynamic(new Document([ 'range' => $range, - 'tablesTotal' => $usage[$metrics[0]]['total'], - 'rowsTotal' => $usage[$metrics[1]]['total'], + 'collectionsTotal' => $usage[$metrics[0]]['total'], + 'documentsTotal' => $usage[$metrics[1]]['total'], 'storageTotal' => $usage[$metrics[2]]['total'], 'databaseReadsTotal' => $usage[$metrics[3]]['total'], 'databaseWritesTotal' => $usage[$metrics[4]]['total'], - 'tables' => $usage[$metrics[0]]['data'], - 'rows' => $usage[$metrics[1]]['data'], + 'collections' => $usage[$metrics[0]]['data'], + 'documents' => $usage[$metrics[1]]['data'], 'storage' => $usage[$metrics[2]]['data'], 'databaseReads' => $usage[$metrics[3]]['data'], 'databaseWrites' => $usage[$metrics[4]]['data'], diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php index 8737585e8c..0078d54a4b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -116,14 +116,14 @@ class XList extends Action $response->dynamic(new Document([ 'range' => $range, 'databasesTotal' => $usage[$metrics[0]]['total'], - 'tablesTotal' => $usage[$metrics[1]]['total'], - 'rowsTotal' => $usage[$metrics[2]]['total'], + 'collectionsTotal' => $usage[$metrics[1]]['total'], + 'documentsTotal' => $usage[$metrics[2]]['total'], 'storageTotal' => $usage[$metrics[3]]['total'], 'databasesReadsTotal' => $usage[$metrics[4]]['total'], 'databasesWritesTotal' => $usage[$metrics[5]]['total'], 'databases' => $usage[$metrics[0]]['data'], - 'tables' => $usage[$metrics[1]]['data'], - 'rows' => $usage[$metrics[2]]['data'], + 'collections' => $usage[$metrics[1]]['data'], + 'documents' => $usage[$metrics[2]]['data'], 'storage' => $usage[$metrics[3]]['data'], 'databasesReads' => $usage[$metrics[4]]['data'], 'databasesWrites' => $usage[$metrics[5]]['data'], diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index c72a01c79a..cec275869a 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -38,6 +38,7 @@ use Appwrite\Utopia\Response\Model\ColumnDatetime; use Appwrite\Utopia\Response\Model\ColumnEmail; use Appwrite\Utopia\Response\Model\ColumnEnum; use Appwrite\Utopia\Response\Model\ColumnFloat; +use Appwrite\Utopia\Response\Model\ColumnIndex; use Appwrite\Utopia\Response\Model\ColumnInteger; use Appwrite\Utopia\Response\Model\ColumnIP; use Appwrite\Utopia\Response\Model\ColumnList; @@ -182,6 +183,8 @@ class Response extends SwooleResponse public const MODEL_TABLE_LIST = 'tableList'; public const MODEL_INDEX = 'index'; public const MODEL_INDEX_LIST = 'indexList'; + public const MODEL_COLUMN_INDEX = 'columnIndex'; + public const MODEL_COLUMN_INDEX_LIST = 'columnIndexList'; public const MODEL_DOCUMENT = 'document'; public const MODEL_DOCUMENT_LIST = 'documentList'; public const MODEL_ROW = 'row'; @@ -416,6 +419,7 @@ class Response extends SwooleResponse ->setModel(new BaseList('Collections List', self::MODEL_COLLECTION_LIST, 'collections', self::MODEL_COLLECTION)) ->setModel(new BaseList('Databases List', self::MODEL_DATABASE_LIST, 'databases', self::MODEL_DATABASE)) ->setModel(new BaseList('Indexes List', self::MODEL_INDEX_LIST, 'indexes', self::MODEL_INDEX)) + ->setModel(new BaseList('Column Indexes List', self::MODEL_COLUMN_INDEX_LIST, 'indexes', self::MODEL_COLUMN_INDEX)) ->setModel(new BaseList('Users List', self::MODEL_USER_LIST, 'users', self::MODEL_USER)) ->setModel(new BaseList('Sessions List', self::MODEL_SESSION_LIST, 'sessions', self::MODEL_SESSION)) ->setModel(new BaseList('Identities List', self::MODEL_IDENTITY_LIST, 'identities', self::MODEL_IDENTITY)) @@ -493,6 +497,7 @@ class Response extends SwooleResponse ->setModel(new ColumnDatetime()) ->setModel(new ColumnRelationship()) ->setModel(new Index()) + ->setModel(new ColumnIndex()) ->setModel(new Row()) ->setModel(new ModelDocument()) ->setModel(new Log()) diff --git a/src/Appwrite/Utopia/Response/Model/ColumnIndex.php b/src/Appwrite/Utopia/Response/Model/ColumnIndex.php new file mode 100644 index 0000000000..8c632266ef --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/ColumnIndex.php @@ -0,0 +1,94 @@ +addRule('key', [ + 'type' => self::TYPE_STRING, + 'description' => 'Index Key.', + 'default' => '', + 'example' => 'index1', + ]) + ->addRule('type', [ + 'type' => self::TYPE_STRING, + 'description' => 'Index type.', + 'default' => '', + 'example' => 'primary', + ]) + ->addRule('status', [ + 'type' => self::TYPE_STRING, + 'description' => 'Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`', + 'default' => '', + 'example' => 'available', + ]) + ->addRule('error', [ + 'type' => self::TYPE_STRING, + 'description' => 'Error message. Displays error generated on failure of creating or deleting an index.', + 'default' => '', + 'example' => 'string', + ]) + ->addRule('columns', [ + 'type' => self::TYPE_STRING, + 'description' => 'Index columns.', + 'default' => [], + 'example' => [], + 'array' => true, + ]) + ->addRule('orders', [ + 'type' => self::TYPE_STRING, + 'description' => 'Index orders.', + 'default' => [], + 'example' => [], + 'array' => true, + 'required' => false, + ]) + ->addRule('$createdAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Index creation date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$updatedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Index update date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]); + } + + /** + * Get Name + */ + public function getName(): string + { + return 'Index'; + } + + /** + * Get Collection + */ + public function getType(): string + { + return Response::MODEL_COLUMN_INDEX; + } + + public function filter(Document $document): Document + { + + $columns = $document->getAttribute('attributes', []); + $document + ->removeAttribute('attributes') + ->setAttribute('columns', $columns); + + return $document; + + } +} diff --git a/src/Appwrite/Utopia/Response/Model/Index.php b/src/Appwrite/Utopia/Response/Model/Index.php index e18a9db334..2d795ad439 100644 --- a/src/Appwrite/Utopia/Response/Model/Index.php +++ b/src/Appwrite/Utopia/Response/Model/Index.php @@ -4,7 +4,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; -use Utopia\Database\Document; class Index extends Model { @@ -35,7 +34,7 @@ class Index extends Model 'default' => '', 'example' => 'string', ]) - ->addRule('columns', [ + ->addRule('attributes', [ 'type' => self::TYPE_STRING, 'description' => 'Index attributes.', 'default' => [], @@ -79,16 +78,4 @@ class Index extends Model { return Response::MODEL_INDEX; } - - public function filter(Document $document): Document - { - - $columns = $document->getAttribute('attributes', []); - $document - ->removeAttribute('attributes') - ->setAttribute('columns', $columns); - - return $document; - - } } diff --git a/src/Appwrite/Utopia/Response/Model/Table.php b/src/Appwrite/Utopia/Response/Model/Table.php index 1855f471b1..1b890d9e60 100644 --- a/src/Appwrite/Utopia/Response/Model/Table.php +++ b/src/Appwrite/Utopia/Response/Model/Table.php @@ -79,7 +79,7 @@ class Table extends Model 'array' => true, ]) ->addRule('indexes', [ - 'type' => Response::MODEL_INDEX, + 'type' => Response::MODEL_COLUMN_INDEX, 'description' => 'Table indexes.', 'default' => [], 'example' => new \stdClass(), diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php index a3212017a4..3adabae4c1 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php @@ -5,6 +5,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; +// TODO: check what do we use for - collectionsTotal, documentsTotal, collections, documents class UsageDatabase extends Model { public function __construct() @@ -16,15 +17,15 @@ class UsageDatabase extends Model 'default' => '', 'example' => '30d', ]) - ->addRule('tablesTotal', [ + ->addRule('collectionsTotal', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Total aggregated number of tables.', + 'description' => 'Total aggregated number of collections.', 'default' => 0, 'example' => 0, ]) - ->addRule('rowsTotal', [ + ->addRule('collectionsTotal', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Total aggregated number of rows.', + 'description' => 'Total aggregated number of documents.', 'default' => 0, 'example' => 0, ]) @@ -46,16 +47,16 @@ class UsageDatabase extends Model 'default' => 0, 'example' => 0, ]) - ->addRule('tables', [ + ->addRule('collections', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated number of tables per period.', + 'description' => 'Aggregated number of collections per period.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('rows', [ + ->addRule('documents', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated number of rows per period.', + 'description' => 'Aggregated number of documents per period.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php index 11392f6efb..ae93182c0f 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php @@ -5,6 +5,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; +// TODO: check what do we use for - collectionsTotal, documentsTotal, collections, documents class UsageDatabases extends Model { public function __construct() @@ -22,15 +23,15 @@ class UsageDatabases extends Model 'default' => 0, 'example' => 0, ]) - ->addRule('tablesTotal', [ + ->addRule('collectionsTotal', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Total aggregated number of tables.', + 'description' => 'Total aggregated number of collections.', 'default' => 0, 'example' => 0, ]) - ->addRule('rowsTotal', [ + ->addRule('documentsTotal', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Total aggregated number of rows.', + 'description' => 'Total aggregated number of documents.', 'default' => 0, 'example' => 0, ]) @@ -59,16 +60,16 @@ class UsageDatabases extends Model 'example' => [], 'array' => true ]) - ->addRule('tables', [ + ->addRule('collections', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated number of tables per period.', + 'description' => 'Aggregated number of collections per period.', 'default' => [], 'example' => [], 'array' => true ]) - ->addRule('rows', [ + ->addRule('documents', [ 'type' => Response::MODEL_METRIC, - 'description' => 'Aggregated number of rows per period.', + 'description' => 'Aggregated number of documents per period.', 'default' => [], 'example' => [], 'array' => true diff --git a/src/Appwrite/Utopia/Response/Model/UsageProject.php b/src/Appwrite/Utopia/Response/Model/UsageProject.php index b79cd85bed..70f8003cfd 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageProject.php +++ b/src/Appwrite/Utopia/Response/Model/UsageProject.php @@ -5,6 +5,7 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; +// TODO: check what do we use for - documents. class UsageProject extends Model { public function __construct() @@ -16,9 +17,9 @@ class UsageProject extends Model 'default' => 0, 'example' => 0, ]) - ->addRule('rowsTotal', [ + ->addRule('documentsTotal', [ 'type' => self::TYPE_INTEGER, - 'description' => 'Total aggregated number of rows.', + 'description' => 'Total aggregated number of documents.', 'default' => 0, 'example' => 0, ]) From f2f23be648f9c3c8c1e07ee073a4c35f3f1f7f5c Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 7 May 2025 14:11:28 +0530 Subject: [PATCH 056/362] update: events, errors, realtime. --- app/config/errors.php | 2 +- app/config/events.php | 2 +- app/config/templates/function.php | 5 +- src/Appwrite/Event/Database.php | 56 ++++++++++++- src/Appwrite/Messaging/Adapter/Realtime.php | 7 +- .../Modules/Databases/Workers/Databases.php | 78 ++++++++++++------- 6 files changed, 114 insertions(+), 36 deletions(-) diff --git a/app/config/errors.php b/app/config/errors.php index c1121cb98e..182b6286e8 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -71,7 +71,7 @@ return [ ], Exception::GENERAL_QUERY_LIMIT_EXCEEDED => [ 'name' => Exception::GENERAL_QUERY_LIMIT_EXCEEDED, - 'description' => 'Query limit exceeded for the current attribute/column. Usage of more than 100 query values on a single column is prohibited.', + 'description' => 'Query limit exceeded for the current attribute/column. Usage of more than 100 query values on a single attribute/column is prohibited.', 'code' => 400, ], Exception::GENERAL_QUERY_INVALID => [ diff --git a/app/config/events.php b/app/config/events.php index e7b079050c..b0e6b9f5fc 100644 --- a/app/config/events.php +++ b/app/config/events.php @@ -152,7 +152,7 @@ return [ 'documents' => [ '$model' => Response::MODEL_DOCUMENT, '$resource' => true, - '$description' => 'This event triggers on any document event.', + '$description' => 'This event triggers on any documents event.', 'create' => [ '$description' => 'This event triggers when a document is created.', ], diff --git a/app/config/templates/function.php b/app/config/templates/function.php index b017281dbe..960bc1d65e 100644 --- a/app/config/templates/function.php +++ b/app/config/templates/function.php @@ -1395,7 +1395,10 @@ return [ 'score' => 5, 'tagline' => 'Convert text to speech using the Hugging Face inference API.', 'permissions' => ['any'], - 'events' => ['databases.*.tables.*.rows.*.create'], + 'events' => [ + 'databases.*.tables.*.rows.*.create', + 'databases.*.collections.*.documents.*.create', + ], 'cron' => '', 'timeout' => 15, 'useCases' => ['ai'], diff --git a/src/Appwrite/Event/Database.php b/src/Appwrite/Event/Database.php index 797574d2fc..be73614dc1 100644 --- a/src/Appwrite/Event/Database.php +++ b/src/Appwrite/Event/Database.php @@ -10,8 +10,15 @@ class Database extends Event { protected string $type = ''; protected ?Document $database = null; - protected ?Document $table = null; + + // tables api protected ?Document $row = null; + protected ?Document $table = null; + + // collections api + protected ?Document $document = null; + protected ?Document $collection = null; + public function __construct(protected Publisher $publisher) { @@ -99,6 +106,51 @@ class Database extends Event return $this->row; } + /** + * Set the collection for this database event. + * + * @param Document $collection + * @return self + */ + public function setCollection(Document $collection): self + { + $this->collection = $collection; + + return $this; + } + + /** + * Returns set collection for this event. + * + * @return null|Document + */ + public function getCollection(): ?Document + { + return $this->collection; + } + + /** + * Set the document for this database event. + * + * @param Document $document + * @return self + */ + public function setDocument(Document $document): self + { + $this->document = $document; + + return $this; + } + + /** + * Returns set document for this database event. + * @return null|Document + */ + public function getDocument(): ?Document + { + return $this->document; + } + public function getQueue(): string { try { @@ -125,6 +177,8 @@ class Database extends Event 'type' => $this->type, 'table' => $this->table, 'row' => $this->row, + 'collection' => $this->collection, + 'document' => $this->document, 'database' => $this->database, 'events' => Event::generateEvents($this->getEvent(), $this->getParams()) ]; diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index 5cb908464f..4980618ab1 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -230,7 +230,7 @@ class Realtime extends Adapter foreach ($channels as $key => $value) { switch (true) { - case strpos($key, 'account.') === 0: + case str_starts_with($key, 'account.'): unset($channels[$key]); break; @@ -298,12 +298,13 @@ class Realtime extends Adapter $roles = [Role::team(ID::custom($parts[1]))->toString()]; break; case 'databases': - if (in_array($parts[4] ?? [], ['columns', 'indexes'])) { + $resource = $parts[4] ?? ''; + if (in_array($resource, ['columns', 'attributes', 'indexes'])) { $channels[] = 'console'; $channels[] = 'projects.' . $project->getId(); $projectId = 'console'; $roles = [Role::team($project->getAttribute('teamId'))->toString()]; - } elseif (($parts[4] ?? '') === 'rows' || ($parts[4] ?? '') === 'documents') { + } elseif (in_array($resource, ['rows', 'documents'])) { if ($database->isEmpty()) { throw new \Exception('Database needs to be passed to Realtime for Document/Row events in the Database.'); } diff --git a/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php index 37fa7cf0cc..2a6d1f1f28 100644 --- a/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php +++ b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php @@ -60,8 +60,8 @@ class Databases extends Action } $type = $payload['type']; - $row = new Document($payload['row'] ?? []); - $table = new Document($payload['table'] ?? []); + $row = new Document($payload['row'] ?? $payload['document'] ?? []); + $table = new Document($payload['table'] ?? $payload['collection'] ?? []); $database = new Document($payload['database'] ?? []); $log->addTag('projectId', $project->getId()); @@ -115,10 +115,13 @@ class Databases extends Action } $projectId = $project->getId(); - $event = "databases.[databaseId].tables.[tableId].columns.[columnId].update"; + $events = [ + "databases.[databaseId].tables.[tableId].columns.[columnId].update", + "databases.[databaseId].collections.[collectionId].attributes.[attributeId].update", + ]; /** * TODO @christyjacob4 verify if this is still the case - * Fetch attribute from the database, since with Resque float values are loosing informations. + * Fetch attribute from the database, since with Resque float values are loosing information. */ $column = $dbForProject->getDocument('attributes', $column->getId()); @@ -204,7 +207,7 @@ class Databases extends Action throw $e; } finally { - $this->trigger($database, $table, $project, $event, $queueForRealtime, $column); + $this->trigger($database, $table, $project, $events, $queueForRealtime, $column); if (! $relatedTable->isEmpty()) { $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $relatedTable->getId()); @@ -238,7 +241,10 @@ class Databases extends Action } $projectId = $project->getId(); - $event = 'databases.[databaseId].tables.[tableId].columns.[columnId].delete'; + $events = [ + 'databases.[databaseId].tables.[tableId].columns.[columnId].delete', + 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].delete', + ]; $tableId = $table->getId(); $key = $column->getAttribute('key', ''); $type = $column->getAttribute('type', ''); @@ -311,7 +317,7 @@ class Databases extends Action throw $e; } finally { - $this->trigger($database, $table, $project, $event, $queueForRealtime, $column); + $this->trigger($database, $table, $project, $events, $queueForRealtime, $column); } // The underlying database removes/rebuilds indexes when attribute is removed @@ -398,7 +404,10 @@ class Databases extends Action } $projectId = $project->getId(); - $event = 'databases.[databaseId].tables.[tableId].indexes.[indexId].update'; + $events = [ + 'databases.[databaseId].tables.[tableId].indexes.[indexId].update', + 'databases.[databaseId].collections.[collectionId].indexes.[indexId].update', + ]; $collectionId = $table->getId(); $key = $index->getAttribute('key', ''); $type = $index->getAttribute('type', ''); @@ -425,7 +434,7 @@ class Databases extends Action throw $e; } finally { - $this->trigger($database, $table, $project, $event, $queueForRealtime, null, $index); + $this->trigger($database, $table, $project, $events, $queueForRealtime, null, $index); $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collectionId); } } @@ -455,7 +464,10 @@ class Databases extends Action } $projectId = $project->getId(); - $event = 'databases.[databaseId].tables.[tableId].indexes.[indexId].delete'; + $events = [ + 'databases.[databaseId].tables.[tableId].indexes.[indexId].delete', + 'databases.[databaseId].collections.[collectionId].indexes.[indexId].delete', + ]; $key = $index->getAttribute('key'); $status = $index->getAttribute('status', ''); $project = $dbForPlatform->getDocument('projects', $projectId); @@ -481,7 +493,7 @@ class Databases extends Action throw $e; } finally { - $this->trigger($database, $table, $project, $event, $queueForRealtime, null, $index); + $this->trigger($database, $table, $project, $events, $queueForRealtime, null, $index); $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $table->getId()); } } @@ -590,38 +602,46 @@ class Databases extends Action * @param Document $database * @param Document $table * @param Document $project + * @param string[] $events * @param Realtime $queueForRealtime * @param Document|null $column * @param Document|null $index * @return void + * @throws DatabaseException */ protected function trigger( Document $database, Document $table, Document $project, - string $event, + array $events, Realtime $queueForRealtime, Document|null $column = null, Document|null $index = null, ): void { - $queueForRealtime - ->setProject($project) - ->setSubscribers(['console']) - ->setEvent($event) - ->setParam('databaseId', $database->getId()) - ->setParam('tableId', $table->getId()); - - if (! empty($column)) { + // table and collection + foreach ($events as $event) { $queueForRealtime - ->setParam('columnId', $column->getId()) - ->setPayload($column->getArrayCopy()); - } - if (! empty($index)) { - $queueForRealtime - ->setParam('indexId', $index->getId()) - ->setPayload($index->getArrayCopy()); - } + ->setProject($project) + ->setSubscribers(['console']) + ->setEvent($event) + ->setParam('tableId', $table->getId()) + ->setParam('collectionId', $table->getId()) + ->setParam('databaseId', $database->getId()); - $queueForRealtime->trigger(); + if (! empty($column)) { + $queueForRealtime + ->setParam('columnId', $column->getId()) + ->setParam('attributeId', $column->getId()) + ->setPayload($column->getArrayCopy()); + } + + if (! empty($index)) { + $queueForRealtime + ->setParam('indexId', $index->getId()) + ->setPayload($index->getArrayCopy()); + } + + $queueForRealtime->trigger(); + } } } From 6d1afea436d9e2cecbee3aca27dd409615ce9889 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 7 May 2025 14:14:12 +0530 Subject: [PATCH 057/362] misc. --- src/Appwrite/Utopia/Response/Model/Webhook.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Model/Webhook.php b/src/Appwrite/Utopia/Response/Model/Webhook.php index 8e53b41e6e..af1e23447e 100644 --- a/src/Appwrite/Utopia/Response/Model/Webhook.php +++ b/src/Appwrite/Utopia/Response/Model/Webhook.php @@ -49,7 +49,10 @@ class Webhook extends Model 'type' => self::TYPE_STRING, 'description' => 'Webhook trigger events.', 'default' => [], - 'example' => 'database.tables.update', + 'example' => [ + 'databases.tables.update', + 'databases.collections.update' + ], 'array' => true, ]) ->addRule('security', [ From 0f94b800a52201e18426bc97f683db3a8259dd2b Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 7 May 2025 17:02:24 +0530 Subject: [PATCH 058/362] update: abstraction over table and collection apis. --- .../Databases/Http/Collections/Action.php | 124 ++++++++++++++ .../Databases/Http/Collections/Create.php | 123 +++++++++++++ .../Databases/Http/Collections/Delete.php | 109 ++++++++++++ .../Databases/Http/Collections/Get.php | 81 +++++++++ .../Databases/Http/Collections/Logs/XList.php | 161 ++++++++++++++++++ .../Databases/Http/Collections/Update.php | 117 +++++++++++++ .../Databases/Http/Collections/Usage/Get.php | 143 ++++++++++++++++ .../Databases/Http/Collections/XList.php | 128 ++++++++++++++ .../Modules/Databases/Http/Tables/Create.php | 75 ++------ .../Modules/Databases/Http/Tables/Delete.php | 55 ++---- .../Modules/Databases/Http/Tables/Get.php | 42 ++--- .../Databases/Http/Tables/Logs/XList.php | 113 ++---------- .../Modules/Databases/Http/Tables/Update.php | 64 ++----- .../Databases/Http/Tables/Usage/Get.php | 95 ++--------- .../Modules/Databases/Http/Tables/XList.php | 82 ++------- .../Modules/Databases/Services/Http.php | 21 ++- 16 files changed, 1116 insertions(+), 417 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Collections/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Collections/Delete.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Collections/Get.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Collections/Logs/XList.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Collections/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Collections/Usage/Get.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Collections/XList.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php new file mode 100644 index 0000000000..d2129f31ea --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php @@ -0,0 +1,124 @@ +context = $context; + } + + /** + * Get the current API context. + * + * @throws \Exception if context has not been set. + */ + final protected function getContext(): string + { + if ($this->context === null) { + throw new \Exception('Missing context: you must call setContext() with either `Action::TABLE` or `Action::COLLECTION` before using this method.'); + } + + return $this->context; + } + + /** + * Get the key used in event parameters (e.g., 'collectionId' or 'tableId'). + */ + final protected function getEventsParamKey(): string + { + return $this->getContext() . 'Id'; + } + + /** + * Get the response model used in the SDK and HTTP responses. + */ + abstract protected function getResponseModel(): string; + + /** + * Determine if the current action is for the Collections API. + */ + final protected function isCollectionsAPI(): bool + { + return $this->getContext() === self::COLLECTION; + } + + /** + * Get the SDK group name for the current action. + */ + final protected function getSdkGroup(): string + { + return $this->isCollectionsAPI() ? 'collections' : 'tables'; + } + + /** + * Get the exception to throw when the resource already exists. + */ + final protected function getDuplicateException(): string + { + return $this->isCollectionsAPI() + ? Exception::COLLECTION_ALREADY_EXISTS + : Exception::TABLE_ALREADY_EXISTS; + } + + /** + * Get the exception to throw when the resource is not found. + */ + final protected function getNotFoundException(): string + { + return $this->isCollectionsAPI() + ? Exception::COLLECTION_NOT_FOUND + : Exception::TABLE_NOT_FOUND; + } + + /** + * Get the exception to throw when the resource limit is exceeded. + */ + final protected function getLimitException(): string + { + return $this->isCollectionsAPI() + ? Exception::COLLECTION_LIMIT_EXCEEDED + : Exception::TABLE_LIMIT_EXCEEDED; + } + + /** + * Ensures that a valid context has been set. + * + * @throws \Exception if context is missing + */ + final protected function validateContext(): void + { + $this->getContext(); // Triggers exception if not set + } + +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Create.php new file mode 100644 index 0000000000..d0320c6dd0 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Create.php @@ -0,0 +1,123 @@ +setContext(Action::COLLECTION); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/collections') + ->desc('Create collections') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].collections.[collectionId].create') + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'collection.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{response.$id}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-collection.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('name', '', new Text(128), 'Collection name. Max length: 128 chars.') + ->param('permissions', null, 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) + ->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 + { + $this->validateContext(); + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collectionId = $collectionId === 'unique()' ? ID::unique() : $collectionId; + + $permissions = Permission::aggregate($permissions) ?? []; + + try { + $collection = $dbForProject->createDocument('database_' . $database->getInternalId(), new Document([ + '$id' => $collectionId, + 'databaseInternalId' => $database->getInternalId(), + 'databaseId' => $databaseId, + '$permissions' => $permissions, + 'documentSecurity' => $documentSecurity, + 'enabled' => $enabled, + 'name' => $name, + 'search' => \implode(' ', [$collectionId, $name]), + ])); + + $dbForProject->createCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), permissions: $permissions, documentSecurity: $documentSecurity); + } catch (DuplicateException) { + throw new Exception($this->getDuplicateException()); + } catch (LimitException) { + throw new Exception($this->getLimitException()); + } + + $queueForEvents + ->setContext('database', $database) + ->setParam('databaseId', $databaseId) + ->setParam($this->getEventsParamKey(), $collection->getId()); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_CREATED) + ->dynamic($collection, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Delete.php new file mode 100644 index 0000000000..d30c37efed --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Delete.php @@ -0,0 +1,109 @@ +setContext(Action::COLLECTION); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId') + ->desc('Delete collection') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].delete') + ->label('audits.event', 'collection.delete') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/delete-collection.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $collectionId, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { + $this->validateContext(); + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + if ($collection->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + if (!$dbForProject->deleteDocument('database_' . $database->getInternalId(), $collectionId)) { + $type = $this->getContext(); + throw new Exception(Exception::GENERAL_SERVER_ERROR, "Failed to remove $type from DB"); + } + + $dbForProject->purgeCachedCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId()); + + $queueForDatabase + ->setType(DATABASE_TYPE_DELETE_COLLECTION) + ->setDatabase($database); + + if ($this->isCollectionsAPI()) { + $queueForDatabase->setCollection($collection); + } else { + $queueForDatabase->setTable($collection); + } + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setContext('database', $database) + ->setParam($this->getEventsParamKey(), $collection->getId()) + ->setPayload($response->output($collection, $this->getResponseModel())); + + $response->noContent(); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Get.php new file mode 100644 index 0000000000..962ad3d21d --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Get.php @@ -0,0 +1,81 @@ +setContext(Action::COLLECTION); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId') + ->desc('Get collection') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/get-collection.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $collectionId, UtopiaResponse $response, Database $dbForProject): void + { + $this->validateContext(); + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + + if ($collection->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + $response->dynamic($collection, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Logs/XList.php new file mode 100644 index 0000000000..429c39dc44 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Logs/XList.php @@ -0,0 +1,161 @@ +setContext(Action::COLLECTION); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/logs') + ->desc('List collection logs') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/get-collection-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) + ->inject('response') + ->inject('dbForProject') + ->inject('locale') + ->inject('geodb') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void + { + $this->validateContext(); + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); + + if ($collection->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + // Temp fix for logs + $queries[] = Query::or([ + Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))), + Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))), + ]); + + $audit = new Audit($dbForProject); + $resource = 'database/' . $databaseId . '/' . $this->getContext() . '/' . $collectionId; + $logs = $audit->getLogsByResource($resource, $queries); + + $output = []; + + foreach ($logs as $i => &$log) { + $log['userAgent'] = (!empty($log['userAgent'])) ? $log['userAgent'] : 'UNKNOWN'; + + $detector = new Detector($log['userAgent']); + $detector->skipBotDetection(); // OPTIONAL: If called, bot detection will completely be skipped (bots will be detected as regular devices then) + + $os = $detector->getOS(); + $client = $detector->getClient(); + $device = $detector->getDevice(); + + $output[$i] = new Document([ + 'event' => $log['event'], + 'userId' => $log['data']['userId'], + 'userEmail' => $log['data']['userEmail'] ?? null, + 'userName' => $log['data']['userName'] ?? null, + 'mode' => $log['data']['mode'] ?? null, + 'ip' => $log['ip'], + 'time' => $log['time'], + 'osCode' => $os['osCode'], + 'osName' => $os['osName'], + 'osVersion' => $os['osVersion'], + 'clientType' => $client['clientType'], + 'clientCode' => $client['clientCode'], + 'clientName' => $client['clientName'], + 'clientVersion' => $client['clientVersion'], + 'clientEngine' => $client['clientEngine'], + 'clientEngineVersion' => $client['clientEngineVersion'], + 'deviceName' => $device['deviceName'], + 'deviceBrand' => $device['deviceBrand'], + 'deviceModel' => $device['deviceModel'] + ]); + + $record = $geodb->get($log['ip']); + + if ($record) { + $output[$i]['countryCode'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), false) ? \strtolower($record['country']['iso_code']) : '--'; + $output[$i]['countryName'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), $locale->getText('locale.country.unknown')); + } else { + $output[$i]['countryCode'] = '--'; + $output[$i]['countryName'] = $locale->getText('locale.country.unknown'); + } + } + + $response->dynamic(new Document([ + 'logs' => $output, + 'total' => $audit->countLogsByResource($resource, $queries), + ]), $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Update.php new file mode 100644 index 0000000000..582f0e84a3 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Update.php @@ -0,0 +1,117 @@ +setContext(Action::COLLECTION); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId') + ->desc('Update collection') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].update') + ->label('audits.event', 'collection.update') + ->label('audits.resource', 'database/{request.databaseId}/collections/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-collection.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.') + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, the current permissions are inherited. [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) + ->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 + { + $this->validateContext(); + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + if ($collection->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + $permissions ??= $collection->getPermissions() ?? []; + + // Map aggregate permissions into the multiple permissions they represent. + $permissions = Permission::aggregate($permissions); + + $enabled ??= $collection->getAttribute('enabled', true); + + $collection = $dbForProject->updateDocument( + 'database_' . $database->getInternalId(), + $collectionId, + $collection + ->setAttribute('name', $name) + ->setAttribute('$permissions', $permissions) + ->setAttribute('documentSecurity', $documentSecurity) + ->setAttribute('enabled', $enabled) + ->setAttribute('search', \implode(' ', [$collectionId, $name])) + ); + + $dbForProject->updateCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $permissions, $documentSecurity); + + $queueForEvents + ->setContext('database', $database) + ->setParam('databaseId', $databaseId) + ->setParam($this->getEventsParamKey(), $collection->getId()); + + $response->dynamic($collection, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Usage/Get.php new file mode 100644 index 0000000000..a9a924114f --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Usage/Get.php @@ -0,0 +1,143 @@ +setContext(Action::COLLECTION); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/usage') + ->desc('Get collection usage stats') + ->groups(['api', 'database', 'usage']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: null, + name: self::getName(), + description: '/docs/references/databases/get-collection-usage.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel() + ) + ], + contentType: ContentType::JSON, + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) + ->param('collectionId', '', new UID(), 'Collection ID.') + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $range, string $collectionId, UtopiaResponse $response, Database $dbForProject): void + { + $this->validateContext(); + + $database = $dbForProject->getDocument('databases', $databaseId); + $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); + + if ($collection->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + $periods = Config::getParam('usage', []); + $stats = $usage = []; + $days = $periods[$range]; + $metrics = [ + str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getInternalId(), $collectionDocument->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), + ]; + + Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { + foreach ($metrics as $metric) { + $result = $dbForProject->findOne('stats', [ + Query::equal('metric', [$metric]), + Query::equal('period', ['inf']) + ]); + + $stats[$metric]['total'] = $result['value'] ?? 0; + $limit = $days['limit']; + $period = $days['period']; + $results = $dbForProject->find('stats', [ + Query::equal('metric', [$metric]), + Query::equal('period', [$period]), + Query::limit($limit), + Query::orderDesc('time'), + ]); + $stats[$metric]['data'] = []; + foreach ($results as $result) { + $stats[$metric]['data'][$result->getAttribute('time')] = [ + 'value' => $result->getAttribute('value'), + ]; + } + } + }); + + $format = match ($days['period']) { + '1h' => 'Y-m-d\TH:00:00.000P', + '1d' => 'Y-m-d\T00:00:00.000P', + }; + + foreach ($metrics as $metric) { + $usage[$metric]['total'] = $stats[$metric]['total']; + $usage[$metric]['data'] = []; + $leap = time() - ($days['limit'] * $days['factor']); + while ($leap < time()) { + $leap += $days['factor']; + $formatDate = date($format, $leap); + $usage[$metric]['data'][] = [ + 'value' => $stats[$metric]['data'][$formatDate]['value'] ?? 0, + 'date' => $formatDate, + ]; + } + } + + $prefix = $this->isCollectionsAPI() ? 'documents' : 'rows'; + + // prefix, prefixTotal + $usageDocument = new Document([ + 'range' => $range, + $prefix => $usage[$metrics[0]]['data'], + $prefix . 'Total' => $usage[$metrics[0]]['total'], + ]); + + $response->dynamic($usageDocument, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/XList.php new file mode 100644 index 0000000000..e540e86c06 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/XList.php @@ -0,0 +1,128 @@ +setContext(Action::COLLECTION); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/collections') + ->desc('List collections') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/list-collections.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('queries', [], new Collections(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Collections::ALLOWED_ATTRIBUTES), true) + ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, array $queries, string $search, UtopiaResponse $response, Database $dbForProject): void + { + $this->validateContext(); + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $queries = Query::parseQueries($queries); + + if (!empty($search)) { + $queries[] = Query::search('search', $search); + } + + /** + * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries + */ + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); + }); + $cursor = reset($cursor); + + if ($cursor) { + $validator = new Cursor(); + if (!$validator->isValid($cursor)) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); + } + + $collectionIdId = $cursor->getValue(); + $cursorDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionIdId); + + if ($cursorDocument->isEmpty()) { + $message = + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, ucfirst($this->getContext()) . " '$collectionIdId' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument); + } + + $filterQueries = Query::groupByType($queries)['filters']; + + try { + $collections = $dbForProject->find('database_' . $database->getInternalId(), $queries); + $total = $dbForProject->count('database_' . $database->getInternalId(), $filterQueries, APP_LIMIT_COUNT); + } catch (OrderException $e) { + $documents = $this->isCollectionsAPI() ? 'documents' : 'rows'; + $attribute = $this->isCollectionsAPI() ? 'attribute' : 'column'; + $message = "The order $attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all $documents order $attribute values are non-null."; + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, $message); + } + + $response->dynamic(new Document([ + 'total' => $total, + $this->getSdkGroup() => $collections, + ]), $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php index dc3f7b8574..6f30c897b4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php @@ -3,7 +3,8 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables; use Appwrite\Event\Event; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Collections\Action; +use Appwrite\Platform\Modules\Databases\Http\Collections\Create as CollectionCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -11,21 +12,14 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; -use Utopia\Database\Exception\Duplicate as DuplicateException; -use Utopia\Database\Exception\Limit as LimitException; -use Utopia\Database\Helpers\ID; -use Utopia\Database\Helpers\Permission; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Text; -class Create extends Action +class Create extends CollectionCreate { use HTTP; @@ -34,12 +28,18 @@ class Create extends Action return 'createTable'; } + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_TABLE; + } + public function __construct() { + $this->setContext(Action::TABLE); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables') - ->httpAlias('/v1/databases/:databaseId/collections') ->desc('Create table') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].create') @@ -49,14 +49,14 @@ class Create extends Action ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') ->label('sdk', new Method( namespace: 'databases', - group: 'tables', - name: 'createTable', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-collection.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_CREATED, - model: UtopiaResponse::MODEL_TABLE, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -65,52 +65,13 @@ class Create extends Action ->param('tableId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Table name. Max length: 128 chars.') ->param('permissions', null, 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('documentSecurity', false, new Boolean(true), 'Enables configuring permissions for individual documents. A user needs one of document or table level permissions to access a document. [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) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void - { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $tableId = $tableId === 'unique()' ? ID::unique() : $tableId; - - $permissions = Permission::aggregate($permissions) ?? []; - - try { - $table = $dbForProject->createDocument('database_' . $database->getInternalId(), new Document([ - '$id' => $tableId, - 'databaseInternalId' => $database->getInternalId(), - 'databaseId' => $databaseId, - '$permissions' => $permissions, - 'documentSecurity' => $documentSecurity, - 'enabled' => $enabled, - 'name' => $name, - 'search' => \implode(' ', [$tableId, $name]), - ])); - - $dbForProject->createCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), permissions: $permissions, documentSecurity: $documentSecurity); - } catch (DuplicateException) { - throw new Exception(Exception::TABLE_ALREADY_EXISTS); - } catch (LimitException) { - throw new Exception(Exception::TABLE_LIMIT_EXCEEDED); - } - - $queueForEvents - ->setContext('database', $database) - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_CREATED) - ->dynamic($table, UtopiaResponse::MODEL_TABLE); + ->callback(function (string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { + parent::action($databaseId, $tableId, $name, $permissions, $documentSecurity, $enabled, $response, $dbForProject, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php index b7e8f6ecf7..810edf7f21 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php @@ -4,20 +4,19 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Collections\Action; +use Appwrite\Platform\Modules\Databases\Http\Collections\Delete as CollectionDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; -class Delete extends Action +class Delete extends CollectionDelete { use HTTP; @@ -26,12 +25,18 @@ class Delete extends Action return 'deleteTable'; } + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_TABLE; + } + public function __construct() { + $this->setContext(Action::TABLE); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId') ->desc('Delete table') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -41,8 +46,8 @@ class Delete extends Action ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'tables', - name: 'deleteTable', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/delete-collection.md', auth: [AuthType::KEY], responses: [ @@ -59,38 +64,8 @@ class Delete extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void - { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - if (!$dbForProject->deleteDocument('database_' . $database->getInternalId(), $tableId)) { - throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove collection from DB'); - } - - $dbForProject->purgeCachedCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId()); - - $queueForDatabase - ->setType(DATABASE_TYPE_DELETE_COLLECTION) - ->setDatabase($database) - ->setTable($table); - - $queueForEvents - ->setContext('database', $database) - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setPayload($response->output($table, UtopiaResponse::MODEL_TABLE)); - - $response->noContent(); + ->callback(function (string $databaseId, string $tableId, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php index 4c76c1f89d..80798a4516 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php @@ -2,20 +2,19 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Collections\Action; +use Appwrite\Platform\Modules\Databases\Http\Collections\Get as CollectionGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; -class Get extends Action +class Get extends CollectionGet { use HTTP; @@ -24,26 +23,32 @@ class Get extends Action return 'getTable'; } + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_TABLE; + } + public function __construct() { + $this->setContext(Action::TABLE); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId') ->desc('Get table') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'tables', - name: 'getTable', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/get-collection.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_TABLE, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -52,23 +57,8 @@ class Get extends Action ->param('tableId', '', new UID(), 'Table ID.') ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, UtopiaResponse $response, Database $dbForProject): void - { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - $response->dynamic($table, UtopiaResponse::MODEL_TABLE); + ->callback(function (string $databaseId, string $tableId, UtopiaResponse $response, Database $dbForProject) { + parent::action($databaseId, $tableId, $response, $dbForProject); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php index 1dba2493cf..b3ce8cd272 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php @@ -2,31 +2,24 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables\Logs; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Collections\Action; +use Appwrite\Platform\Modules\Databases\Http\Collections\Logs\XList as CollectionLogXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use DeviceDetector\DeviceDetector as Detector; use MaxMind\Db\Reader; -use Utopia\Audit\Audit; use Utopia\Database\Database; -use Utopia\Database\DateTime; -use Utopia\Database\Document; -use Utopia\Database\Exception\Query as QueryException; -use Utopia\Database\Query; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Queries; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; use Utopia\Locale\Locale; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; -class XList extends Action +class XList extends CollectionLogXList { use HTTP; @@ -35,26 +28,32 @@ class XList extends Action return 'listTableLogs'; } + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_LOG_LIST; + } + public function __construct() { + $this->setContext(Action::TABLE); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/logs') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/logs') ->desc('List table logs') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'tables', - name: 'listTableLogs', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/get-collection-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_LOG_LIST, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -66,88 +65,8 @@ class XList extends Action ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void - { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $tableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $tableDocument->getInternalId()); - - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } - - // Temp fix for logs - $queries[] = Query::or([ - Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))), - Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))), - ]); - - $audit = new Audit($dbForProject); - $resource = 'database/' . $databaseId . '/table/' . $tableId; - $logs = $audit->getLogsByResource($resource, $queries); - - $output = []; - - foreach ($logs as $i => &$log) { - $log['userAgent'] = (!empty($log['userAgent'])) ? $log['userAgent'] : 'UNKNOWN'; - - $detector = new Detector($log['userAgent']); - $detector->skipBotDetection(); // OPTIONAL: If called, bot detection will completely be skipped (bots will be detected as regular devices then) - - $os = $detector->getOS(); - $client = $detector->getClient(); - $device = $detector->getDevice(); - - $output[$i] = new Document([ - 'event' => $log['event'], - 'userId' => $log['data']['userId'], - 'userEmail' => $log['data']['userEmail'] ?? null, - 'userName' => $log['data']['userName'] ?? null, - 'mode' => $log['data']['mode'] ?? null, - 'ip' => $log['ip'], - 'time' => $log['time'], - 'osCode' => $os['osCode'], - 'osName' => $os['osName'], - 'osVersion' => $os['osVersion'], - 'clientType' => $client['clientType'], - 'clientCode' => $client['clientCode'], - 'clientName' => $client['clientName'], - 'clientVersion' => $client['clientVersion'], - 'clientEngine' => $client['clientEngine'], - 'clientEngineVersion' => $client['clientEngineVersion'], - 'deviceName' => $device['deviceName'], - 'deviceBrand' => $device['deviceBrand'], - 'deviceModel' => $device['deviceModel'] - ]); - - $record = $geodb->get($log['ip']); - - if ($record) { - $output[$i]['countryCode'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), false) ? \strtolower($record['country']['iso_code']) : '--'; - $output[$i]['countryName'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), $locale->getText('locale.country.unknown')); - } else { - $output[$i]['countryCode'] = '--'; - $output[$i]['countryName'] = $locale->getText('locale.country.unknown'); - } - } - - $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource, $queries), - 'logs' => $output, - ]), UtopiaResponse::MODEL_LOG_LIST); + ->callback(function (string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb) { + parent::action($databaseId, $tableId, $queries, $response, $dbForProject, $locale, $geodb); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php index f5621feab3..fde9114e59 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php @@ -3,24 +3,22 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables; use Appwrite\Event\Event; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Collections\Action; +use Appwrite\Platform\Modules\Databases\Http\Collections\Update as CollectionUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Helpers\Permission; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Text; -class Update extends Action +class Update extends CollectionUpdate { use HTTP; @@ -29,12 +27,18 @@ class Update extends Action return 'updateTable'; } + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_TABLE; + } + public function __construct() { + $this->setContext(Action::TABLE); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId') ->desc('Update table') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -44,8 +48,8 @@ class Update extends Action ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'tables', - name: 'updateTable', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/update-collection.md', auth: [AuthType::KEY], responses: [ @@ -65,46 +69,8 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void - { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - $permissions ??= $table->getPermissions() ?? []; - - // Map aggregate permissions into the multiple permissions they represent. - $permissions = Permission::aggregate($permissions); - - $enabled ??= $table->getAttribute('enabled', true); - - $table = $dbForProject->updateDocument( - 'database_' . $database->getInternalId(), - $tableId, - $table - ->setAttribute('name', $name) - ->setAttribute('$permissions', $permissions) - ->setAttribute('documentSecurity', $documentSecurity) - ->setAttribute('enabled', $enabled) - ->setAttribute('search', \implode(' ', [$tableId, $name])) - ); - - $dbForProject->updateCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $permissions, $documentSecurity); - - $queueForEvents - ->setContext('database', $database) - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()); - - $response->dynamic($table, UtopiaResponse::MODEL_TABLE); + ->callback(function (string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { + parent::action($databaseId, $tableId, $name, $permissions, $documentSecurity, $enabled, $response, $dbForProject, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php index b528fee7cf..9ba99d32e1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php @@ -2,24 +2,20 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables\Usage; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Collections\Action; +use Appwrite\Platform\Modules\Databases\Http\Collections\Usage\Get as CollectionUsageGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Config\Config; use Utopia\Database\Database; -use Utopia\Database\Document; -use Utopia\Database\Query; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\WhiteList; -class Get extends Action +class Get extends CollectionUsageGet { use HTTP; @@ -28,12 +24,18 @@ class Get extends Action return 'getTableUsage'; } + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_USAGE_TABLE; + } + public function __construct() { + $this->setContext(Action::TABLE); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/usage') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/usage') ->desc('Get table usage stats') ->groups(['api', 'database', 'usage']) ->label('scope', 'collections.read') @@ -41,13 +43,13 @@ class Get extends Action ->label('sdk', new Method( namespace: 'databases', group: null, - name: 'getTableUsage', + name: self::getName(), description: '/docs/references/databases/get-collection-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_USAGE_TABLE, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON, @@ -57,75 +59,8 @@ class Get extends Action ->param('tableId', '', new UID(), 'Collection ID.') ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $range, string $tableId, UtopiaResponse $response, Database $dbForProject): void - { - - $database = $dbForProject->getDocument('databases', $databaseId); - $tableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $tableDocument->getInternalId()); - - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - $periods = Config::getParam('usage', []); - $stats = $usage = []; - $days = $periods[$range]; - $metrics = [ - str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getInternalId(), $tableDocument->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), - ]; - - Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { - foreach ($metrics as $metric) { - $result = $dbForProject->findOne('stats', [ - Query::equal('metric', [$metric]), - Query::equal('period', ['inf']) - ]); - - $stats[$metric]['total'] = $result['value'] ?? 0; - $limit = $days['limit']; - $period = $days['period']; - $results = $dbForProject->find('stats', [ - Query::equal('metric', [$metric]), - Query::equal('period', [$period]), - Query::limit($limit), - Query::orderDesc('time'), - ]); - $stats[$metric]['data'] = []; - foreach ($results as $result) { - $stats[$metric]['data'][$result->getAttribute('time')] = [ - 'value' => $result->getAttribute('value'), - ]; - } - } - }); - - $format = match ($days['period']) { - '1h' => 'Y-m-d\TH:00:00.000P', - '1d' => 'Y-m-d\T00:00:00.000P', - }; - - foreach ($metrics as $metric) { - $usage[$metric]['total'] = $stats[$metric]['total']; - $usage[$metric]['data'] = []; - $leap = time() - ($days['limit'] * $days['factor']); - while ($leap < time()) { - $leap += $days['factor']; - $formatDate = date($format, $leap); - $usage[$metric]['data'][] = [ - 'value' => $stats[$metric]['data'][$formatDate]['value'] ?? 0, - 'date' => $formatDate, - ]; - } - } - - $response->dynamic(new Document([ - 'range' => $range, - 'rows' => $usage[$metrics[0]]['data'], - 'rowsTotal' => $usage[$metrics[0]]['total'], - ]), UtopiaResponse::MODEL_USAGE_TABLE); + ->callback(function (string $databaseId, string $range, string $tableId, UtopiaResponse $response, Database $dbForProject) { + parent::action($databaseId, $range, $tableId, $response, $dbForProject); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php index e6d2a2d02a..f90a1f66f2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php @@ -2,7 +2,8 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Collections\Action; +use Appwrite\Platform\Modules\Databases\Http\Collections\XList as CollectionXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -10,18 +11,12 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Tables; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; -use Utopia\Database\Exception\Order as OrderException; -use Utopia\Database\Query; -use Utopia\Database\Validator\Authorization; -use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Text; -class XList extends Action +class XList extends CollectionXList { use HTTP; @@ -30,26 +25,32 @@ class XList extends Action return 'listTables'; } + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_TABLE_LIST; + } + public function __construct() { + $this->setContext(Action::TABLE); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables') - ->httpAlias('/v1/databases/:databaseId/collections') ->desc('List tables') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'tables', - name: 'listTables', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/list-collections.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_TABLE_LIST, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -59,59 +60,8 @@ class XList extends Action ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, array $queries, string $search, UtopiaResponse $response, Database $dbForProject): void - { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $queries = Query::parseQueries($queries); - - if (!empty($search)) { - $queries[] = Query::search('search', $search); - } - - /** - * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries - */ - $cursor = \array_filter($queries, function ($query) { - return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); - }); - $cursor = reset($cursor); - - if ($cursor) { - $validator = new Cursor(); - if (!$validator->isValid($cursor)) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); - } - - $tableId = $cursor->getValue(); - $cursorDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - - if ($cursorDocument->isEmpty()) { - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Table '{$tableId}' for the 'cursor' value not found."); - } - - $cursor->setValue($cursorDocument); - } - - $filterQueries = Query::groupByType($queries)['filters']; - - try { - $tables = $dbForProject->find('database_' . $database->getInternalId(), $queries); - $total = $dbForProject->count('database_' . $database->getInternalId(), $filterQueries, APP_LIMIT_COUNT); - } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); - } - - $response->dynamic(new Document([ - 'tables' => $tables, - 'total' => $total, - ]), UtopiaResponse::MODEL_TABLE_LIST); + ->callback(function (string $databaseId, array $queries, string $search, UtopiaResponse $response, Database $dbForProject) { + parent::action($databaseId, $queries, $search, $response, $dbForProject); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Http.php b/src/Appwrite/Platform/Modules/Databases/Services/Http.php index ffdd4f1903..26a4aa0942 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Http.php @@ -2,6 +2,13 @@ namespace Appwrite\Platform\Modules\Databases\Services; +use Appwrite\Platform\Modules\Databases\Http\Collections\Create as CreateCollection; +use Appwrite\Platform\Modules\Databases\Http\Collections\Delete as DeleteCollection; +use Appwrite\Platform\Modules\Databases\Http\Collections\Get as GetCollection; +use Appwrite\Platform\Modules\Databases\Http\Collections\Logs\XList as ListCollectionLogs; +use Appwrite\Platform\Modules\Databases\Http\Collections\Update as UpdateCollection; +use Appwrite\Platform\Modules\Databases\Http\Collections\Usage\Get as GetCollectionUsage; +use Appwrite\Platform\Modules\Databases\Http\Collections\XList as ListCollections; use Appwrite\Platform\Modules\Databases\Http\Columns\Boolean\Create as CreateBoolean; use Appwrite\Platform\Modules\Databases\Http\Columns\Boolean\Update as UpdateBoolean; use Appwrite\Platform\Modules\Databases\Http\Columns\Datetime\Create as CreateDatetime; @@ -59,7 +66,7 @@ class Http extends Service $this->type = Service::TYPE_HTTP; $this->registerDatabaseActions(); - $this->registerTableActions(); + $this->registerCollectionAndTableActions(); $this->registerColumnActions(); $this->registerIndexActions(); $this->registerRowActions(); @@ -77,8 +84,18 @@ class Http extends Service $this->addAction(ListDatabaseUsage::getName(), new ListDatabaseUsage()); } - private function registerTableActions(): void + private function registerCollectionAndTableActions(): void { + // Collections + $this->addAction(CreateCollection::getName(), new CreateCollection()); + $this->addAction(GetCollection::getName(), new GetCollection()); + $this->addAction(UpdateCollection::getName(), new UpdateCollection()); + $this->addAction(DeleteCollection::getName(), new DeleteCollection()); + $this->addAction(ListCollections::getName(), new ListCollections()); + $this->addAction(ListCollectionLogs::getName(), new ListCollectionLogs()); + $this->addAction(GetCollectionUsage::getName(), new GetCollectionUsage()); + + // Tables $this->addAction(CreateTable::getName(), new CreateTable()); $this->addAction(GetTable::getName(), new GetTable()); $this->addAction(UpdateTable::getName(), new UpdateTable()); From 69cc4f0bb6d6f5b6f6f99c559612e919fa23d514 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 7 May 2025 17:32:54 +0530 Subject: [PATCH 059/362] update: handle the context logic, use defaults. --- app/init/constants.php | 10 +++++++ .../Databases/Http/Collections/Action.php | 30 ++++--------------- .../Databases/Http/Collections/Create.php | 4 --- .../Databases/Http/Collections/Delete.php | 4 --- .../Databases/Http/Collections/Get.php | 4 --- .../Databases/Http/Collections/Logs/XList.php | 4 --- .../Databases/Http/Collections/Update.php | 4 --- .../Databases/Http/Collections/Usage/Get.php | 4 --- .../Databases/Http/Collections/XList.php | 4 --- .../Modules/Databases/Http/Tables/Create.php | 2 +- .../Modules/Databases/Http/Tables/Delete.php | 2 +- .../Modules/Databases/Http/Tables/Get.php | 2 +- .../Databases/Http/Tables/Logs/XList.php | 2 +- .../Modules/Databases/Http/Tables/Update.php | 2 +- .../Databases/Http/Tables/Usage/Get.php | 2 +- .../Modules/Databases/Http/Tables/XList.php | 2 +- 16 files changed, 22 insertions(+), 60 deletions(-) diff --git a/app/init/constants.php b/app/init/constants.php index 2b15f9fa0b..80d4796aad 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -257,3 +257,13 @@ const RESOURCE_TYPE_PROVIDERS = 'providers'; const RESOURCE_TYPE_TOPICS = 'topics'; const RESOURCE_TYPE_SUBSCRIBERS = 'subscribers'; const RESOURCE_TYPE_MESSAGES = 'messages'; + +// Context constants for database + +const DATABASE_ROWS_CONTEXT = 'row'; +const DATABASE_TABLES_CONTEXT = 'table'; +const DATABASE_COLUMNS_CONTEXT = 'column'; + +const DATABASE_DOCUMENTS_CONTEXT = 'document'; +const DATABASE_ATTRIBUTES_CONTEXT = 'attribute'; +const DATABASE_COLLECTIONS_CONTEXT = 'collection'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php index d2129f31ea..d00bc1f9f9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php @@ -13,26 +13,21 @@ use Utopia\Platform\Action as UtopiaAction; */ abstract class Action extends UtopiaAction { - /** - * Valid context identifiers. - */ - public const TABLE = 'table'; - public const COLLECTION = 'collection'; /** * The current API context (either 'table' or 'collection'). */ - private ?string $context = null; + private ?string $context = DATABASE_COLLECTIONS_CONTEXT; /** * Set the current API context. * - * @param string $context Must be either `self::TABLE` or `self::COLLECTION`. + * @param string $context Must be either `DATABASE_TABLES_CONTEXT` or `DATABASE_COLLECTIONS_CONTEXT`. */ final protected function setContext(string $context): void { - if (!\in_array($context, [self::TABLE, self::COLLECTION], true)) { - throw new \InvalidArgumentException("Invalid context '$context'. Must be either `Action::TABLE` or `Action::COLLECTION`."); + if (!\in_array($context, [DATABASE_TABLES_CONTEXT, DATABASE_COLLECTIONS_CONTEXT], true)) { + throw new \InvalidArgumentException("Invalid context '$context'. Must be either `DATABASE_TABLES_CONTEXT` or `DATABASE_COLLECTIONS_CONTEXT`."); } $this->context = $context; @@ -45,10 +40,6 @@ abstract class Action extends UtopiaAction */ final protected function getContext(): string { - if ($this->context === null) { - throw new \Exception('Missing context: you must call setContext() with either `Action::TABLE` or `Action::COLLECTION` before using this method.'); - } - return $this->context; } @@ -70,7 +61,7 @@ abstract class Action extends UtopiaAction */ final protected function isCollectionsAPI(): bool { - return $this->getContext() === self::COLLECTION; + return $this->getContext() === DATABASE_COLLECTIONS_CONTEXT; } /** @@ -110,15 +101,4 @@ abstract class Action extends UtopiaAction ? Exception::COLLECTION_LIMIT_EXCEEDED : Exception::TABLE_LIMIT_EXCEEDED; } - - /** - * Ensures that a valid context has been set. - * - * @throws \Exception if context is missing - */ - final protected function validateContext(): void - { - $this->getContext(); // Triggers exception if not set - } - } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Create.php index d0320c6dd0..063ce75720 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Create.php @@ -40,8 +40,6 @@ class Create extends Action public function __construct() { - $this->setContext(Action::COLLECTION); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/collections') @@ -80,8 +78,6 @@ class Create extends Action public function action(string $databaseId, string $collectionId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void { - $this->validateContext(); - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Delete.php index d30c37efed..7cec4addea 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Delete.php @@ -32,8 +32,6 @@ class Delete extends Action public function __construct() { - $this->setContext(Action::COLLECTION); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId') @@ -69,8 +67,6 @@ class Delete extends Action public function action(string $databaseId, string $collectionId, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void { - $this->validateContext(); - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Get.php index 962ad3d21d..e7f02b8930 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Get.php @@ -30,8 +30,6 @@ class Get extends Action public function __construct() { - $this->setContext(Action::COLLECTION); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId') @@ -62,8 +60,6 @@ class Get extends Action public function action(string $databaseId, string $collectionId, UtopiaResponse $response, Database $dbForProject): void { - $this->validateContext(); - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Logs/XList.php index 429c39dc44..bd31ad2fe1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Logs/XList.php @@ -42,8 +42,6 @@ class XList extends Action public function __construct() { - $this->setContext(Action::COLLECTION); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/logs') @@ -77,8 +75,6 @@ class XList extends Action public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void { - $this->validateContext(); - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Update.php index 582f0e84a3..8c8dfb58b5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Update.php @@ -35,8 +35,6 @@ class Update extends Action public function __construct() { - $this->setContext(Action::COLLECTION); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId') @@ -75,8 +73,6 @@ class Update extends Action public function action(string $databaseId, string $collectionId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void { - $this->validateContext(); - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Usage/Get.php index a9a924114f..60c7af4420 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Usage/Get.php @@ -35,8 +35,6 @@ class Get extends Action public function __construct() { - $this->setContext(Action::COLLECTION); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/usage') @@ -68,8 +66,6 @@ class Get extends Action public function action(string $databaseId, string $range, string $collectionId, UtopiaResponse $response, Database $dbForProject): void { - $this->validateContext(); - $database = $dbForProject->getDocument('databases', $databaseId); $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/XList.php index e540e86c06..98246defaa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/XList.php @@ -36,8 +36,6 @@ class XList extends Action public function __construct() { - $this->setContext(Action::COLLECTION); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/collections') @@ -69,8 +67,6 @@ class XList extends Action public function action(string $databaseId, array $queries, string $search, UtopiaResponse $response, Database $dbForProject): void { - $this->validateContext(); - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php index 6f30c897b4..8a6c009e87 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php @@ -35,7 +35,7 @@ class Create extends CollectionCreate public function __construct() { - $this->setContext(Action::TABLE); + $this->setContext(DATABASE_TABLES_CONTEXT); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php index 810edf7f21..e06c19b308 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php @@ -32,7 +32,7 @@ class Delete extends CollectionDelete public function __construct() { - $this->setContext(Action::TABLE); + $this->setContext(DATABASE_TABLES_CONTEXT); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php index 80798a4516..e5f2954de5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php @@ -30,7 +30,7 @@ class Get extends CollectionGet public function __construct() { - $this->setContext(Action::TABLE); + $this->setContext(DATABASE_TABLES_CONTEXT); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php index b3ce8cd272..67ff31efb7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php @@ -35,7 +35,7 @@ class XList extends CollectionLogXList public function __construct() { - $this->setContext(Action::TABLE); + $this->setContext(DATABASE_TABLES_CONTEXT); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php index fde9114e59..f27232353e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php @@ -34,7 +34,7 @@ class Update extends CollectionUpdate public function __construct() { - $this->setContext(Action::TABLE); + $this->setContext(DATABASE_TABLES_CONTEXT); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php index 9ba99d32e1..647a98d952 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php @@ -31,7 +31,7 @@ class Get extends CollectionUsageGet public function __construct() { - $this->setContext(Action::TABLE); + $this->setContext(DATABASE_TABLES_CONTEXT); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php index f90a1f66f2..77eb556301 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php @@ -32,7 +32,7 @@ class XList extends CollectionXList public function __construct() { - $this->setContext(Action::TABLE); + $this->setContext(DATABASE_TABLES_CONTEXT); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) From bc8a38ba55c05c17d4e308fa3ed8585d5fc4c19f Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 7 May 2025 20:01:46 +0530 Subject: [PATCH 060/362] update: abstraction over attribute and column apis [WIP]. --- .../Databases/Http/Attributes/Action.php | 627 ++++++++++++++++++ .../Http/Attributes/Boolean/Create.php | 94 +++ .../Http/Attributes/Boolean/Update.php | 95 +++ .../Http/Attributes/Datetime/Create.php | 104 +++ .../Http/Attributes/Datetime/Update.php | 97 +++ .../Databases/Http/Attributes/Delete.php | 161 +++++ .../Http/Attributes/Email/Create.php | 104 +++ .../Http/Attributes/Email/Update.php | 98 +++ .../Databases/Http/Attributes/Enum/Create.php | 113 ++++ .../Databases/Http/Attributes/Enum/Update.php | 102 +++ .../Http/Attributes/Float/Create.php | 121 ++++ .../Http/Attributes/Float/Update.php | 109 +++ .../Modules/Databases/Http/Attributes/Get.php | 101 +++ .../Databases/Http/Attributes/IP/Create.php | 104 +++ .../Databases/Http/Attributes/IP/Update.php | 98 +++ .../Http/Attributes/Integer/Create.php | 123 ++++ .../Http/Attributes/Integer/Update.php | 109 +++ .../Http/Attributes/Relationship/Create.php | 169 +++++ .../Http/Attributes/Relationship/Update.php | 103 +++ .../Http/Attributes/String/Create.php | 122 ++++ .../Http/Attributes/String/Update.php | 102 +++ .../Databases/Http/Attributes/URL/Create.php | 96 +++ .../Databases/Http/Attributes/URL/Update.php | 98 +++ .../Databases/Http/Attributes/XList.php | 130 ++++ .../Databases/Http/Collections/Action.php | 1 - .../Http/Columns/Datetime/Create.php | 2 +- .../Databases/Http/Columns/String/Update.php | 2 +- .../Modules/Databases/Http/Tables/Create.php | 1 - .../Modules/Databases/Http/Tables/Delete.php | 1 - .../Modules/Databases/Http/Tables/Get.php | 1 - .../Databases/Http/Tables/Logs/XList.php | 1 - .../Modules/Databases/Http/Tables/Update.php | 1 - .../Databases/Http/Tables/Usage/Get.php | 1 - .../Modules/Databases/Http/Tables/XList.php | 1 - 34 files changed, 3182 insertions(+), 10 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Delete.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Get.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Attributes/XList.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php new file mode 100644 index 0000000000..66e8313d33 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php @@ -0,0 +1,627 @@ +context = $context; + } + + /** + * Get the current context. + * + * @throws \LogicException If context has not been set. + */ + final protected function getContext(): string + { + return $this->context; + } + + /** + * Returns true if current context is Collections API. + */ + final protected function isCollectionsAPI(): bool + { + // columns in tables context + // attributes in collections context + return $this->getContext() === DATABASE_ATTRIBUTES_CONTEXT; + } + + /** + * Get the SDK group name for the current action. + * + * Can be used for XList operations as well! + */ + final protected function getSdkGroup(): string + { + return $this->isCollectionsAPI() ? 'attributes' : 'columns'; + } + + /** + * Get the correct parent param key (e.g. `tableId` or `collectionId`) + */ + final protected function getParentEventsParamKey(): string + { + return $this->isCollectionsAPI() ? 'collectionId' : 'tableId'; + } + + /** + * Get the correct param key (e.g. `attributeId` or `columnId`) + */ + final protected function getEventsParamKey(): string + { + return $this->getContext() . 'Id'; + } + + /** + * Set the correct response model. + */ + final protected function setResponseModel(string|array $model): void + { + $this->responseModel = $model; + } + + /** + * Get the correct response model. + */ + final protected function getResponseModel(): string|array + { + if ($this->responseModel === null) { + throw new \LogicException("Missing response model: you must call setResponseModel() before using it."); + } + + return $this->responseModel; + } + + /** + * Get the appropriate parent level not found exception. + */ + final protected function getParentNotFoundException(): string + { + return $this->isCollectionsAPI() + ? Exception::COLLECTION_NOT_FOUND + : Exception::TABLE_NOT_FOUND; + } + + /** + * Get the appropriate not found exception. + */ + final protected function getNotFoundException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_NOT_FOUND + : Exception::COLUMN_NOT_FOUND; + } + + /** + * Get the appropriate already exists exception. + */ + final protected function getDuplicateException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_ALREADY_EXISTS + : Exception::COLUMN_ALREADY_EXISTS; + } + + /** + * Get the appropriate limit exceeded exception. + */ + final protected function getLimitException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_LIMIT_EXCEEDED + : Exception::COLUMN_LIMIT_EXCEEDED; + } + + /** + * Get the correct default unsupported message. + */ + final protected function getDefaultUnsupportedException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_DEFAULT_UNSUPPORTED + : Exception::COLUMN_DEFAULT_UNSUPPORTED; + } + + /** + * Get the correct format unsupported message. + */ + final protected function getFormatUnsupportedException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_FORMAT_UNSUPPORTED + : Exception::COLUMN_FORMAT_UNSUPPORTED; + } + + /** + * Get the exception for invalid type or format mismatch. + */ + final protected function getTypeInvalidException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_TYPE_INVALID + : Exception::COLUMN_TYPE_INVALID; + } + + /** + * Get the exception for resizing invalid attributes/columns. + */ + final protected function getInvalidResizeException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_INVALID_RESIZE + : Exception::COLUMN_INVALID_RESIZE; + } + + /** + * Get the exception for invalid attributes/columns value. + */ + final protected function getInvalidValueException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_VALUE_INVALID + : Exception::COLUMN_VALUE_INVALID; + } + + /** + * Get the exception for non-available column/attribute. + */ + final protected function getNotAvailableException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_NOT_AVAILABLE + : Exception::COLUMN_NOT_AVAILABLE; + } + + /** + * Get the proper column/attribute type based on set context. + */ + final protected function getCorrectModel(string $type, string $format): string + { + $isCollections = $this->isCollectionsAPI(); + + return match ($type) { + Database::VAR_BOOLEAN => $isCollections + ? UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN + : UtopiaResponse::MODEL_COLUMN_BOOLEAN, + + Database::VAR_INTEGER => $isCollections + ? UtopiaResponse::MODEL_ATTRIBUTE_INTEGER + : UtopiaResponse::MODEL_COLUMN_INTEGER, + + Database::VAR_FLOAT => $isCollections + ? UtopiaResponse::MODEL_ATTRIBUTE_FLOAT + : UtopiaResponse::MODEL_COLUMN_FLOAT, + + Database::VAR_DATETIME => $isCollections + ? UtopiaResponse::MODEL_ATTRIBUTE_DATETIME + : UtopiaResponse::MODEL_COLUMN_DATETIME, + + Database::VAR_RELATIONSHIP => $isCollections + ? UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP + : UtopiaResponse::MODEL_COLUMN_RELATIONSHIP, + + Database::VAR_STRING => match ($format) { + APP_DATABASE_ATTRIBUTE_EMAIL => $isCollections + ? UtopiaResponse::MODEL_ATTRIBUTE_EMAIL + : UtopiaResponse::MODEL_COLUMN_EMAIL, + + APP_DATABASE_ATTRIBUTE_ENUM => $isCollections + ? UtopiaResponse::MODEL_ATTRIBUTE_ENUM + : UtopiaResponse::MODEL_COLUMN_ENUM, + + APP_DATABASE_ATTRIBUTE_IP => $isCollections + ? UtopiaResponse::MODEL_ATTRIBUTE_IP + : UtopiaResponse::MODEL_COLUMN_IP, + + APP_DATABASE_ATTRIBUTE_URL => $isCollections + ? UtopiaResponse::MODEL_ATTRIBUTE_URL + : UtopiaResponse::MODEL_COLUMN_URL, + + default => $isCollections + ? UtopiaResponse::MODEL_ATTRIBUTE_STRING + : UtopiaResponse::MODEL_COLUMN_STRING, + }, + default => $isCollections + ? UtopiaResponse::MODEL_ATTRIBUTE + : UtopiaResponse::MODEL_COLUMN, + }; + } + + final protected function createAttribute(string $databaseId, string $collectionId, Document $attribute, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): Document + { + $key = $attribute->getAttribute('key'); + $type = $attribute->getAttribute('type', ''); + $size = $attribute->getAttribute('size', 0); + $required = $attribute->getAttribute('required', true); + $signed = $attribute->getAttribute('signed', true); // integers are signed by default + $array = $attribute->getAttribute('array', false); + $format = $attribute->getAttribute('format', ''); + $formatOptions = $attribute->getAttribute('formatOptions', []); + $filters = $attribute->getAttribute('filters', []); // filters are hidden from the endpoint + $default = $attribute->getAttribute('default'); + $options = $attribute->getAttribute('options', []); + + $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($db->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + + if ($collection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + if (!empty($format)) { + if (!Structure::hasFormat($format, $type)) { + throw new Exception($this->getFormatUnsupportedException(), "Format {$format} not available for {$type} columns."); + } + } + + // Must throw here since dbForProject->createAttribute is performed by db worker + if ($required && isset($default)) { + throw new Exception($this->getDefaultUnsupportedException(), 'Cannot set default value for required ' . $this->getContext()); + } + + if ($array && isset($default)) { + 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; + $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection'] ?? ''); + if ($relatedTable->isEmpty()) { + $parent = $this->isCollectionsAPI() ? 'collection' : 'table'; + throw new Exception($this->getParentNotFoundException(), "The related $parent was not found."); + } + } + + try { + $attribute = new Document([ + '$id' => ID::custom($db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key), + 'key' => $key, + 'databaseInternalId' => $db->getInternalId(), + 'databaseId' => $db->getId(), + 'collectionInternalId' => $collection->getInternalId(), + 'collectionId' => $collectionId, + 'type' => $type, + 'status' => 'processing', // processing, available, failed, deleting, stuck + 'size' => $size, + 'required' => $required, + 'signed' => $signed, + 'default' => $default, + 'array' => $array, + 'format' => $format, + 'formatOptions' => $formatOptions, + 'filters' => $filters, + 'options' => $options, + ]); + + $dbForProject->checkAttribute($collection, $attribute); + $attribute = $dbForProject->createDocument('attributes', $attribute); + } catch (DuplicateException) { + throw new Exception($this->getDuplicateException()); + } catch (LimitException) { + throw new Exception($this->getLimitException()); + } catch (Throwable $e) { + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId()); + throw $e; + } + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId()); + + if ($type === Database::VAR_RELATIONSHIP && $options['twoWay']) { + $twoWayKey = $options['twoWayKey']; + $options['relatedCollection'] = $collection->getId(); + $options['twoWayKey'] = $key; + $options['side'] = Database::RELATION_SIDE_CHILD; + + try { + $twoWayAttribute = new Document([ + '$id' => ID::custom($db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $twoWayKey), + 'key' => $twoWayKey, + 'databaseInternalId' => $db->getInternalId(), + 'databaseId' => $db->getId(), + 'collectionInternalId' => $relatedTable->getInternalId(), + 'collectionId' => $relatedTable->getId(), + 'type' => $type, + 'status' => 'processing', // processing, available, failed, deleting, stuck + 'size' => $size, + 'required' => $required, + 'signed' => $signed, + 'default' => $default, + 'array' => $array, + 'format' => $format, + 'formatOptions' => $formatOptions, + 'filters' => $filters, + 'options' => $options, + ]); + + $dbForProject->checkAttribute($relatedTable, $twoWayAttribute); + $dbForProject->createDocument('attributes', $twoWayAttribute); + } catch (DuplicateException) { + $dbForProject->deleteDocument('attributes', $attribute->getId()); + throw new Exception($this->getDuplicateException()); + } catch (LimitException) { + $dbForProject->deleteDocument('attributes', $attribute->getId()); + throw new Exception($this->getLimitException()); + } catch (Throwable $e) { + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); + throw $e; + } + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); + } + + $queueForDatabase + ->setType(DATABASE_TYPE_CREATE_ATTRIBUTE) + ->setDatabase($db); + + if ($this->isCollectionsAPI()) { + $queueForDatabase + ->setDocument($attribute) + ->setCollection($collection); + } else { + $queueForDatabase + ->setRow($attribute) + ->setTable($collection); + } + + $queueForEvents + ->setContext('database', $db) + ->setParam('databaseId', $databaseId) + ->setParam($this->getEventsParamKey(), $attribute->getId()) + // tableId or columnId + ->setParam($this->getParentEventsParamKey(), $collection->getId()) + ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); + + $response->setStatusCode(SwooleResponse::STATUS_CODE_CREATED); + + return $attribute; + } + + final protected function updateAttribute(string $databaseId, string $collectionId, string $key, Database $dbForProject, Event $queueForEvents, string $type, int $size = null, string $filter = null, string|bool|int|float $default = null, bool $required = null, int|float|null $min = null, int|float|null $max = null, array $elements = null, array $options = [], string $newKey = null): Document + { + $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($db->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + + if ($collection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + $attribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); + + if ($attribute->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + if ($attribute->getAttribute('status') !== 'available') { + throw new Exception($this->getNotAvailableException()); + } + + if ($attribute->getAttribute(('type') !== $type)) { + throw new Exception($this->getTypeInvalidException()); + } + + if ($attribute->getAttribute('type') === Database::VAR_STRING && $attribute->getAttribute(('filter') !== $filter)) { + throw new Exception($this->getTypeInvalidException()); + } + + if ($required && isset($default)) { + throw new Exception($this->getDefaultUnsupportedException(), 'Cannot set default value for required ' . $this->getContext()); + } + + if ($attribute->getAttribute('array', false) && isset($default)) { + throw new Exception($this->getDefaultUnsupportedException(), 'Cannot set default value for array ' . $this->getContext() . 's'); + } + + $collectionId = 'database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId(); + + $attribute + ->setAttribute('default', $default) + ->setAttribute('required', $required); + + if (!empty($size)) { + $attribute->setAttribute('size', $size); + } + + switch ($attribute->getAttribute('format')) { + case APP_DATABASE_ATTRIBUTE_INT_RANGE: + case APP_DATABASE_ATTRIBUTE_FLOAT_RANGE: + $min ??= $attribute->getAttribute('formatOptions')['min']; + $max ??= $attribute->getAttribute('formatOptions')['max']; + + if ($min > $max) { + throw new Exception($this->getTypeInvalidException(), 'Minimum value must be lesser than maximum value'); + } + + if ($attribute->getAttribute('format') === APP_DATABASE_ATTRIBUTE_INT_RANGE) { + $validator = new Range($min, $max, Database::VAR_INTEGER); + } else { + $validator = new Range($min, $max, Database::VAR_FLOAT); + + if (!is_null($default)) { + $default = \floatval($default); + } + } + + if (!is_null($default) && !$validator->isValid($default)) { + throw new Exception($this->getTypeInvalidException(), $validator->getDescription()); + } + + $options = [ + 'min' => $min, + 'max' => $max + ]; + $attribute->setAttribute('formatOptions', $options); + + break; + case APP_DATABASE_ATTRIBUTE_ENUM: + if (empty($elements)) { + throw new Exception($this->getTypeInvalidException(), 'Enum elements must not be empty'); + } + + foreach ($elements as $element) { + if (\strlen($element) === 0) { + throw new Exception($this->getTypeInvalidException(), 'Each enum element must not be empty'); + } + } + + if (!is_null($default) && !in_array($default, $elements)) { + throw new Exception($this->getTypeInvalidException(), 'Default value not found in elements'); + } + + $options = [ + 'elements' => $elements + ]; + + $attribute->setAttribute('formatOptions', $options); + + break; + } + + if ($type === Database::VAR_RELATIONSHIP) { + $primaryDocumentOptions = \array_merge($attribute->getAttribute('options', []), $options); + $attribute->setAttribute('options', $primaryDocumentOptions); + try { + $dbForProject->updateRelationship( + collection: $collectionId, + id: $key, + newKey: $newKey, + onDelete: $primaryDocumentOptions['onDelete'], + ); + } catch (NotFoundException) { + throw new Exception($this->getNotFoundException()); + } + + if ($primaryDocumentOptions['twoWay']) { + $relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $primaryDocumentOptions['relatedCollection']); + + $relatedAttribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $primaryDocumentOptions['twoWayKey']); + + if (!empty($newKey) && $newKey !== $key) { + $options['twoWayKey'] = $newKey; + } + + $relatedOptions = \array_merge($relatedAttribute->getAttribute('options'), $options); + $relatedAttribute->setAttribute('options', $relatedOptions); + $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $primaryDocumentOptions['twoWayKey'], $relatedAttribute); + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedCollection->getId()); + } + } else { + try { + $dbForProject->updateAttribute( + collection: $collectionId, + id: $key, + size: $size, + required: $required, + default: $default, + formatOptions: $options, + newKey: $newKey ?? null + ); + } catch (TruncateException) { + throw new Exception($this->getInvalidResizeException()); + } catch (NotFoundException) { + throw new Exception($this->getNotFoundException()); + } catch (LimitException) { + throw new Exception($this->getLimitException()); + } catch (IndexException $e) { + throw new Exception(Exception::INDEX_INVALID, $e->getMessage()); + } + } + + if (!empty($newKey) && $key !== $newKey) { + $originalUid = $attribute->getId(); + + $attribute + ->setAttribute('$id', ID::custom($db->getInternalId() . '_' . $collection->getInternalId() . '_' . $newKey)) + ->setAttribute('key', $newKey); + + $dbForProject->updateDocument('attributes', $originalUid, $attribute); + + /** + * @var Document $index + */ + foreach ($collection->getAttribute('indexes') as $index) { + /** + * @var string[] $attribute + */ + $attribute = $index->getAttribute('attributes', []); + $found = \array_search($key, $attribute); + + if ($found !== false) { + $attribute[$found] = $newKey; + $index->setAttribute('attributes', $attribute); + $dbForProject->updateDocument('indexes', $index->getId(), $index); + } + } + } else { + $attribute = $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key, $attribute); + } + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collection->getId()); + + $queueForEvents + ->setContext('database', $db) + ->setParam('databaseId', $databaseId) + ->setParam($this->getEventsParamKey(), $attribute->getId()) + // tableId or columnId + ->setParam($this->getParentEventsParamKey(), $collection->getId()) + ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); + + return $attribute; + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php new file mode 100644 index 0000000000..583e42b4ed --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php @@ -0,0 +1,94 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN); + + $this->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/boolean') + ->desc('Create boolean attribute') + ->groups(['api', 'database', 'schema']) + ->label('event', 'databases.[databaseId].collections.[collectionId].collections.[attributeId].create') + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'attribute.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-boolean-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: $this->getResponseModel(), + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, new Boolean(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) + ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?bool $default, + bool $array, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + + $attribute = $this->createAttribute($databaseId, $collectionId, new Document([ + 'key' => $key, + 'type' => Database::VAR_BOOLEAN, + 'size' => 0, + 'required' => $required, + 'default' => $default, + 'array' => $array, + ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Update.php new file mode 100644 index 0000000000..41a0c5a621 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Update.php @@ -0,0 +1,95 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN); + + $this->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/boolean/:key') + ->desc('Update boolean attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') + ->label('audits.event', 'attribute.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-boolean-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, new Nullable(new Boolean()), 'Default value for attribute when not provided. Cannot be set when attribute is required.') + ->param('newKey', null, new Key(), 'New attribute key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?bool $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $attribute = $this->updateAttribute( + databaseId: $databaseId, + collectionId: $collectionId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_BOOLEAN, + default: $default, + required: $required, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Create.php new file mode 100644 index 0000000000..40d7aed1e9 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Create.php @@ -0,0 +1,104 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_DATETIME); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/datetime') + ->desc('Create datetime attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('audits.event', 'attribute.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-datetime-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: $this->getResponseModel() + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, fn (Database $dbForProject) => new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime()), 'Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.', true, ['dbForProject']) + ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?string $default, + bool $array, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $attribute = $this->createAttribute( + $databaseId, + $collectionId, + new Document([ + 'key' => $key, + 'type' => Database::VAR_DATETIME, + 'size' => 0, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'filters' => ['datetime'], + ]), + $response, + $dbForProject, + $queueForDatabase, + $queueForEvents + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Update.php new file mode 100644 index 0000000000..386d6682ad --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Update.php @@ -0,0 +1,97 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_DATETIME); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/datetime/:key') + ->desc('Update datetime attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') + ->label('audits.event', 'attribute.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-datetime-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel() + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, fn (Database $dbForProject) => new Nullable(new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime())), 'Default value for attribute when not provided. Cannot be set when attribute is required.', injections: ['dbForProject']) + ->param('newKey', null, new Key(), 'New attribute key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?string $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $attribute = $this->updateAttribute( + databaseId: $databaseId, + collectionId: $collectionId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_DATETIME, + default: $default, + required: $required, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Delete.php new file mode 100644 index 0000000000..da29fd09ee --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Delete.php @@ -0,0 +1,161 @@ +setResponseModel(UtopiaResponse::MODEL_NONE); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') + ->desc('Delete attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') + ->label('audits.event', 'attribute.delete') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: 'attributes', + name: 'deleteAttribute', + description: '/docs/references/databases/delete-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($db->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + if ($collection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + $attribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); + if ($attribute->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + $validator = new IndexDependencyValidator( + $collection->getAttribute('indexes'), + $dbForProject->getAdapter()->getSupportForCastIndexArray(), + ); + if (!$validator->isValid($attribute)) { + throw new Exception(Exception::INDEX_DEPENDENCY); + } + + if ($attribute->getAttribute('status') === 'available') { + $attribute = $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'deleting')); + } + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId()); + + if ($attribute->getAttribute('type') === Database::VAR_RELATIONSHIP) { + $options = $attribute->getAttribute('options'); + if ($options['twoWay']) { + $relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection']); + if ($relatedCollection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + $relatedAttribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $options['twoWayKey']); + if ($relatedAttribute->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + if ($relatedAttribute->getAttribute('status') === 'available') { + $dbForProject->updateDocument('attributes', $relatedAttribute->getId(), $relatedAttribute->setAttribute('status', 'deleting')); + } + + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $options['relatedCollection']); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedCollection->getInternalId()); + } + } + + $queueForDatabase + ->setDatabase($db) + ->setType(DATABASE_TYPE_DELETE_ATTRIBUTE); + + if ($this->isCollectionsAPI()) { + $queueForDatabase + ->setRow($attribute) + ->setTable($collection); + } else { + $queueForDatabase + ->setDocument($attribute) + ->setCollection($collection); + } + + $type = $attribute->getAttribute('type'); + $format = $attribute->getAttribute('format'); + + $model = $this->getCorrectModel($type, $format); + + $queueForEvents + ->setContext('database', $db) + ->setParam('databaseId', $databaseId) + ->setPayload($response->output($attribute, $model)) + ->setParam($this->getEventsParamKey(), $attribute->getId()) + // tableId or columnId + ->setParam($this->getParentEventsParamKey(), $collection->getId()) + // set proper context + ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); + + $response->noContent(); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Create.php new file mode 100644 index 0000000000..9b63f2198a --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Create.php @@ -0,0 +1,104 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_EMAIL); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/email') + ->desc('Create email attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('audits.event', 'attribute.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-email-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: $this->getResponseModel(), + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, new Email(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) + ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + ?bool $required, + ?string $default, + bool $array, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $attribute = $this->createAttribute( + $databaseId, + $tableId, + new Document([ + 'key' => $key, + 'type' => Database::VAR_STRING, + 'size' => 254, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'format' => APP_DATABASE_ATTRIBUTE_EMAIL, + ]), + $response, + $dbForProject, + $queueForDatabase, + $queueForEvents + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Update.php new file mode 100644 index 0000000000..0c41961099 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Update.php @@ -0,0 +1,98 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_EMAIL); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/email/:key') + ->desc('Update email attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') + ->label('audits.event', 'attribute.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-email-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, new Nullable(new Email()), 'Default value for attribute when not provided. Cannot be set when attribute is required.') + ->param('newKey', null, new Key(), 'New Attribute Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?string $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $attribute = $this->updateAttribute( + databaseId: $databaseId, + collectionId: $collectionId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_STRING, + filter: APP_DATABASE_ATTRIBUTE_EMAIL, + default: $default, + required: $required, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Create.php new file mode 100644 index 0000000000..61298cbe94 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Create.php @@ -0,0 +1,113 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_ENUM); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/enum') + ->desc('Create enum attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('audits.event', 'attribute.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-attribute-enum.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: $this->getResponseModel(), + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('elements', [], new ArrayList(new Text(Database::LENGTH_KEY), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of enum values.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, new Text(0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) + ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + array $elements, + ?bool $required, + ?string $default, + bool $array, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + if (!is_null($default) && !\in_array($default, $elements, true)) { + throw new Exception($this->getInvalidValueException(), 'Default value not found in elements'); + } + + $attribute = $this->createAttribute( + $databaseId, + $collectionId, + new Document([ + 'key' => $key, + 'type' => Database::VAR_STRING, + 'size' => Database::LENGTH_KEY, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'format' => APP_DATABASE_ATTRIBUTE_ENUM, + 'formatOptions' => ['elements' => $elements], + ]), + $response, + $dbForProject, + $queueForDatabase, + $queueForEvents + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Update.php new file mode 100644 index 0000000000..37d8065608 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Update.php @@ -0,0 +1,102 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_ENUM); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/enum/:key') + ->desc('Update enum attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') + ->label('audits.event', 'attribute.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-enum-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('elements', null, new ArrayList(new Text(Database::LENGTH_KEY), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Updated list of enum values.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, new Nullable(new Text(0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.') + ->param('newKey', null, new Key(), 'New Attribute Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?array $elements, + ?bool $required, + ?string $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $attribute = $this->updateAttribute( + databaseId: $databaseId, + collectionId: $collectionId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_STRING, + filter: APP_DATABASE_ATTRIBUTE_ENUM, + default: $default, + required: $required, + elements: $elements, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Create.php new file mode 100644 index 0000000000..9603cf4c9a --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Create.php @@ -0,0 +1,121 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_FLOAT); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/float') + ->desc('Create float attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('audits.event', 'attribute.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-float-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: $this->getResponseModel(), + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('min', null, new FloatValidator(), 'Minimum value.', true) + ->param('max', null, new FloatValidator(), 'Maximum value.', true) + ->param('default', null, new FloatValidator(), 'Default value. Cannot be set when required.', true) + ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?float $min, + ?float $max, + ?float $default, + bool $array, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $min ??= -PHP_FLOAT_MAX; + $max ??= PHP_FLOAT_MAX; + + if ($min > $max) { + throw new Exception($this->getInvalidValueException(), 'Minimum value must be lesser than maximum value'); + } + + $validator = new Range($min, $max, Database::VAR_FLOAT); + if (!\is_null($default) && !$validator->isValid($default)) { + throw new Exception($this->getInvalidValueException(), $validator->getDescription()); + } + + $attribute = $this->createAttribute($databaseId, $collectionId, new Document([ + 'key' => $key, + 'type' => Database::VAR_FLOAT, + 'size' => 0, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'format' => APP_DATABASE_ATTRIBUTE_FLOAT_RANGE, + 'formatOptions' => ['min' => $min, 'max' => $max], + ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); + + $formatOptions = $attribute->getAttribute('formatOptions', []); + if (!empty($formatOptions)) { + $attribute->setAttribute('min', \floatval($formatOptions['min'])); + $attribute->setAttribute('max', \floatval($formatOptions['max'])); + } + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Update.php new file mode 100644 index 0000000000..012e8239c9 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Update.php @@ -0,0 +1,109 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_FLOAT); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/float/:key') + ->desc('Update float attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') + ->label('audits.event', 'attribute.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-float-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('min', null, new FloatValidator(), 'Minimum value.', true) + ->param('max', null, new FloatValidator(), 'Maximum value.', true) + ->param('default', null, new Nullable(new FloatValidator()), 'Default value. Cannot be set when required.') + ->param('newKey', null, new Key(), 'New Attribute Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?float $min, + ?float $max, + ?float $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $attribute = $this->updateAttribute( + databaseId: $databaseId, + collectionId: $collectionId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_FLOAT, + default: $default, + required: $required, + min: $min, + max: $max, + newKey: $newKey + ); + + $formatOptions = $attribute->getAttribute('formatOptions', []); + if (!empty($formatOptions)) { + $attribute->setAttribute('min', \floatval($formatOptions['min'])); + $attribute->setAttribute('max', \floatval($formatOptions['max'])); + } + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Get.php new file mode 100644 index 0000000000..e782897be2 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Get.php @@ -0,0 +1,101 @@ +setResponseModel([ + UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN, + UtopiaResponse::MODEL_ATTRIBUTE_INTEGER, + UtopiaResponse::MODEL_ATTRIBUTE_FLOAT, + UtopiaResponse::MODEL_ATTRIBUTE_EMAIL, + UtopiaResponse::MODEL_ATTRIBUTE_ENUM, + UtopiaResponse::MODEL_ATTRIBUTE_URL, + UtopiaResponse::MODEL_ATTRIBUTE_IP, + UtopiaResponse::MODEL_ATTRIBUTE_DATETIME, + UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP, + UtopiaResponse::MODEL_ATTRIBUTE_STRING, + ]); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') + ->desc('Get column') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'columns', + name: 'getColumn', + description: '/docs/references/databases/get-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel() + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('key', '', new Key(), 'Column Key.') + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $tableId, + string $key, + UtopiaResponse $response, + Database $dbForProject + ): void { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + if ($collection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + $attribute = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); + if ($attribute->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + foreach ($attribute->getAttribute('options', []) as $optKey => $optVal) { + $attribute->setAttribute($optKey, $optVal); + } + + $type = $attribute->getAttribute('type'); + $format = $attribute->getAttribute('format'); + $model = $this->getCorrectModel($type, $format); + + $response->dynamic($attribute, $model); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Create.php new file mode 100644 index 0000000000..8176b03bba --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Create.php @@ -0,0 +1,104 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_IP); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/ip') + ->desc('Create IP address attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('audits.event', 'attribute.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-ip-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: $this->getResponseModel(), + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, new IP(), 'Default value. Cannot be set when attribute is required.', true) + ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?string $default, + bool $array, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $attribute = $this->createAttribute( + $databaseId, + $collectionId, + new Document([ + 'key' => $key, + 'type' => Database::VAR_STRING, + 'size' => 39, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'format' => APP_DATABASE_ATTRIBUTE_IP, + ]), + $response, + $dbForProject, + $queueForDatabase, + $queueForEvents + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Update.php new file mode 100644 index 0000000000..868b735bbb --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Update.php @@ -0,0 +1,98 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_IP); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/ip/:key') + ->desc('Update IP address attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') + ->label('audits.event', 'attribute.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-ip-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, new Nullable(new IP()), 'Default value. Cannot be set when attribute is required.') + ->param('newKey', null, new Key(), 'New Attribute Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?string $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $attribute = $this->updateAttribute( + databaseId: $databaseId, + collectionId: $collectionId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_STRING, + filter: APP_DATABASE_ATTRIBUTE_IP, + default: $default, + required: $required, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Create.php new file mode 100644 index 0000000000..99371b26d9 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Create.php @@ -0,0 +1,123 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_INTEGER); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/integer') + ->desc('Create integer attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('audits.event', 'attribute.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-integer-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: $this->getResponseModel(), + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('min', null, new Integer(), 'Minimum value', true) + ->param('max', null, new Integer(), 'Maximum value', true) + ->param('default', null, new Integer(), 'Default value. Cannot be set when attribute is required.', true) + ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?int $min, + ?int $max, + ?int $default, + bool $array, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $min ??= \PHP_INT_MIN; + $max ??= \PHP_INT_MAX; + + if ($min > $max) { + throw new Exception($this->getInvalidValueException(), 'Minimum value must be lesser than maximum value'); + } + + $validator = new Range($min, $max, Database::VAR_INTEGER); + if (!\is_null($default) && !$validator->isValid($default)) { + throw new Exception($this->getInvalidValueException(), $validator->getDescription()); + } + + $size = $max > 2147483647 ? 8 : 4; + + $attribute = $this->createAttribute($databaseId, $collectionId, new Document([ + 'key' => $key, + 'type' => Database::VAR_INTEGER, + 'size' => $size, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'format' => APP_DATABASE_ATTRIBUTE_INT_RANGE, + 'formatOptions' => ['min' => $min, 'max' => $max], + ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); + + $formatOptions = $attribute->getAttribute('formatOptions', []); + if (!empty($formatOptions)) { + $attribute->setAttribute('min', \intval($formatOptions['min'])); + $attribute->setAttribute('max', \intval($formatOptions['max'])); + } + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Update.php new file mode 100644 index 0000000000..51c72af363 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Update.php @@ -0,0 +1,109 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_INTEGER); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/integer/:key') + ->desc('Update integer attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') + ->label('audits.event', 'attribute.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-integer-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('min', null, new Integer(), 'Minimum value', true) + ->param('max', null, new Integer(), 'Maximum value', true) + ->param('default', null, new Nullable(new Integer()), 'Default value. Cannot be set when attribute is required.') + ->param('newKey', null, new Key(), 'New Attribute Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?int $min, + ?int $max, + ?int $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $attribute = $this->updateAttribute( + databaseId: $databaseId, + collectionId: $collectionId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_INTEGER, + default: $default, + required: $required, + min: $min, + max: $max, + newKey: $newKey + ); + + $formatOptions = $attribute->getAttribute('formatOptions', []); + if (!empty($formatOptions)) { + $attribute->setAttribute('min', \intval($formatOptions['min'])); + $attribute->setAttribute('max', \intval($formatOptions['max'])); + } + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Create.php new file mode 100644 index 0000000000..cdc1861c26 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Create.php @@ -0,0 +1,169 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/relationship') + ->desc('Create relationship attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('audits.event', 'attribute.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-relationship-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: $this->getResponseModel() + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('relatedCollectionId', '', new UID(), 'Related Collection ID.') + ->param('type', '', new WhiteList([ + Database::RELATION_ONE_TO_ONE, + Database::RELATION_MANY_TO_ONE, + Database::RELATION_MANY_TO_MANY, + Database::RELATION_ONE_TO_MANY + ], true), 'Relation type') + ->param('twoWay', false, new Boolean(), 'Is Two Way?', true) + ->param('key', null, new Key(), 'Attribute Key.', true) + ->param('twoWayKey', null, new Key(), 'Two Way Attribute Key.', true) + ->param('onDelete', Database::RELATION_MUTATE_RESTRICT, new WhiteList([ + Database::RELATION_MUTATE_CASCADE, + Database::RELATION_MUTATE_RESTRICT, + Database::RELATION_MUTATE_SET_NULL + ], true), 'Constraints option', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $relatedCollectionId, + string $type, + bool $twoWay, + ?string $key, + ?string $twoWayKey, + string $onDelete, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $key ??= $relatedCollectionId; + $twoWayKey ??= $collectionId; + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId()); + if ($collection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + $relatedCollectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId); + $relatedCollection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $relatedCollectionDocument->getInternalId()); + if ($relatedCollection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + $attributes = $collection->getAttribute('attributes', []); + foreach ($attributes as $attribute) { + if ($attribute->getAttribute('type') !== Database::VAR_RELATIONSHIP) { + continue; + } + + if (\strtolower($attribute->getId()) === \strtolower($key)) { + throw new Exception($this->getDuplicateException()); + } + + if ( + \strtolower($attribute->getAttribute('options')['twoWayKey']) === \strtolower($twoWayKey) && + $attribute->getAttribute('options')['relatedCollection'] === $relatedCollection->getId() + ) { + throw new Exception($this->getDuplicateException(), 'Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.'); + } + + if ( + $type === Database::RELATION_MANY_TO_MANY && + $attribute->getAttribute('options')['relationType'] === Database::RELATION_MANY_TO_MANY && + $attribute->getAttribute('options')['relatedCollection'] === $relatedCollection->getId() + ) { + $parentType = $this->isCollectionsAPI() ? 'collection' : 'table'; + throw new Exception($this->getDuplicateException(), "Creating more than one \"manyToMany\" relationship on the same $parentType is currently not permitted."); + } + } + + $attribute = $this->createAttribute($databaseId, $collectionId, new Document([ + 'key' => $key, + 'type' => Database::VAR_RELATIONSHIP, + 'size' => 0, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + 'options' => [ + 'relatedCollection' => $relatedCollectionId, + 'relationType' => $type, + 'twoWay' => $twoWay, + 'twoWayKey' => $twoWayKey, + 'onDelete' => $onDelete, + ] + ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); + + foreach ($attribute->getAttribute('options', []) as $k => $option) { + $attribute->setAttribute($k, $option); + } + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Update.php new file mode 100644 index 0000000000..6416e7793e --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Update.php @@ -0,0 +1,103 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/relationship') + ->desc('Update relationship attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') + ->label('audits.event', 'attribute.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-relationship-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel() + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('onDelete', null, new WhiteList([ + Database::RELATION_MUTATE_CASCADE, + Database::RELATION_MUTATE_RESTRICT, + Database::RELATION_MUTATE_SET_NULL + ], true), 'Constraints option', true) + ->param('newKey', null, new Key(), 'New Attribute Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?string $onDelete, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $attribute = $this->updateAttribute( + databaseId: $databaseId, + collectionId: $collectionId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_RELATIONSHIP, + required: false, + options: [ + 'onDelete' => $onDelete + ], + newKey: $newKey + ); + + foreach ($attribute->getAttribute('options', []) as $k => $option) { + $attribute->setAttribute($k, $option); + } + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Create.php new file mode 100644 index 0000000000..29e3ce757d --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Create.php @@ -0,0 +1,122 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_STRING); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/string') + ->desc('Create string attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('audits.event', 'attribute.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-string-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: $this->getResponseModel() + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Validator::TYPE_INTEGER), 'Attribute size for text attributes, in number of characters.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, new Text(0, 0), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) + ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->param('encrypt', false, new Boolean(), 'Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?int $size, + ?bool $required, + ?string $default, + bool $array, + bool $encrypt, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + // Ensure default fits in the given size + $validator = new Text($size, 0); + if (!is_null($default) && !$validator->isValid($default)) { + throw new Exception($this->getInvalidValueException(), $validator->getDescription()); + } + + $filters = []; + if ($encrypt) { + $filters[] = 'encrypt'; + } + + $attribute = $this->createAttribute( + $databaseId, + $collectionId, + new Document([ + 'key' => $key, + 'type' => Database::VAR_STRING, + 'size' => $size, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'filters' => $filters, + ]), + $response, + $dbForProject, + $queueForDatabase, + $queueForEvents + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Update.php new file mode 100644 index 0000000000..b76a34951e --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Update.php @@ -0,0 +1,102 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_STRING); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/string/:key') + ->desc('Update string attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') + ->label('audits.event', 'attribute.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-string-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, new Nullable(new Text(0, 0)), 'Default value for attribute when not provided. Cannot be set when attribute is required.') + ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Validator::TYPE_INTEGER), 'Maximum size of the string attribute.', true) + ->param('newKey', null, new Key(), 'New Attribute Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?string $default, + ?int $size, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $attribute = $this->updateAttribute( + databaseId: $databaseId, + collectionId: $collectionId, + key: $key, + dbForProject: $dbForProject, + queueForEvents: $queueForEvents, + type: Database::VAR_STRING, + size: $size, + default: $default, + required: $required, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Create.php new file mode 100644 index 0000000000..5b1906ac2b --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Create.php @@ -0,0 +1,96 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_URL); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/url') + ->desc('Create URL attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') + ->label('audits.event', 'attribute.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-url-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: $this->getResponseModel(), + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, new URL(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) + ->param('array', false, new Boolean(), 'Is attribute an array?', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?string $default, + bool $array, + UtopiaResponse $response, + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents + ): void { + $attribute = $this->createAttribute($databaseId, $collectionId, new Document([ + 'key' => $key, + 'type' => Database::VAR_STRING, + 'size' => 2000, + 'required' => $required, + 'default' => $default, + 'array' => $array, + 'format' => APP_DATABASE_ATTRIBUTE_URL, + ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Update.php new file mode 100644 index 0000000000..253649f15a --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Update.php @@ -0,0 +1,98 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_URL); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/url/:key') + ->desc('Update URL attribute') + ->groups(['api', 'database', 'schema']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].update') + ->label('audits.event', 'attribute.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-url-attribute.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('key', '', new Key(), 'Attribute Key.') + ->param('required', null, new Boolean(), 'Is attribute required?') + ->param('default', null, new Nullable(new URL()), 'Default value for attribute when not provided. Cannot be set when attribute is required.') + ->param('newKey', null, new Key(), 'New Attribute Key.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->callback([$this, 'action']); + } + + public function action( + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?string $default, + ?string $newKey, + UtopiaResponse $response, + Database $dbForProject, + Event $queueForEvents + ): void { + $attribute = $this->updateAttribute( + $databaseId, + $collectionId, + $key, + $dbForProject, + $queueForEvents, + type: Database::VAR_STRING, + filter: APP_DATABASE_ATTRIBUTE_URL, + default: $default, + required: $required, + newKey: $newKey + ); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_OK) + ->dynamic($attribute, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/XList.php new file mode 100644 index 0000000000..072f6987d2 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/XList.php @@ -0,0 +1,130 @@ +setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_LIST); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes') + ->desc('List attributes') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/list-attributes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel() + ) + ] + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('queries', [], new Columns(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Attributes::ALLOWED_ATTRIBUTES), true) + ->inject('response') + ->inject('dbForProject') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + if ($table->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + $queries = Query::parseQueries($queries); + + \array_push( + $queries, + Query::equal('databaseInternalId', [$database->getInternalId()]), + Query::equal('collectionInternalId', [$table->getInternalId()]) + ); + + $cursor = \array_filter( + $queries, + fn ($query) => \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]) + ); + $cursor = \reset($cursor); + + if ($cursor) { + $validator = new Cursor(); + if (!$validator->isValid($cursor)) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); + } + + $attributeId = $cursor->getValue(); + $cursorDocument = Authorization::skip( + fn () => $dbForProject->find('attributes', [ + Query::equal('databaseInternalId', [$database->getInternalId()]), + Query::equal('collectionInternalId', [$table->getInternalId()]), + Query::equal('key', [$attributeId]), + Query::limit(1), + ]) + ); + + if (empty($cursorDocument) || $cursorDocument[0]->isEmpty()) { + $type = ucfirst($this->getContext()); + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "$type '{$attributeId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument[0]); + } + + $filters = Query::groupByType($queries)['filters']; + + try { + $attributes = $dbForProject->find('attributes', $queries); + $total = $dbForProject->count('attributes', $filters, APP_LIMIT_COUNT); + } catch (OrderException $e) { + $documents = $this->isCollectionsAPI() ? 'documents' : 'rows'; + $attribute = $this->isCollectionsAPI() ? 'attribute' : 'column'; + $message = "The order $attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all $documents order $attribute values are non-null."; + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, $message); + } + + $response->dynamic(new Document([ + 'total' => $total, + $this->getSdkGroup() => $attributes, + ]), $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php index d00bc1f9f9..2ebcdb4c3f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php @@ -13,7 +13,6 @@ use Utopia\Platform\Action as UtopiaAction; */ abstract class Action extends UtopiaAction { - /** * The current API context (either 'table' or 'collection'). */ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php index 775d33ab19..29ce39789e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php @@ -58,7 +58,7 @@ class Create extends ColumnAction ->param('tableId', '', new UID(), 'Table ID.') ->param('key', '', new Key(), 'Column Key.') ->param('required', null, new Boolean(), 'Is column required?') - ->param('default', null, fn (Database $dbForProject) => new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime()), 'Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.', true, ['dbForProject']) + ->param('default', null, fn (Database $dbForProject) => new DatetimeValidator($dbForProject->getAdapter()->getMinDateTime(), $dbForProject->getAdapter()->getMaxDateTime()), 'Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.', true, ['dbForProject']) ->param('array', false, new Boolean(), 'Is column an array?', true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php index 35fe6bc86d..ca692d9269 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php @@ -61,7 +61,7 @@ class Update extends ColumnAction ->param('key', '', new Key(), 'Column Key.') ->param('required', null, new Boolean(), 'Is column required?') ->param('default', null, new Nullable(new Text(0, 0)), 'Default value for column when not provided. Cannot be set when column is required.') - ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Validator::TYPE_INTEGER), 'Maximum size of the string attribute.', true) + ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Validator::TYPE_INTEGER), 'Maximum size of the string column.', true) ->param('newKey', null, new Key(), 'New Column Key.', true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php index 8a6c009e87..860c32ee4b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Create.php @@ -3,7 +3,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Collections\Action; use Appwrite\Platform\Modules\Databases\Http\Collections\Create as CollectionCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php index e06c19b308..1c70401a40 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Delete.php @@ -4,7 +4,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Collections\Action; use Appwrite\Platform\Modules\Databases\Http\Collections\Delete as CollectionDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php index e5f2954de5..f7f850a0fe 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Get.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables; -use Appwrite\Platform\Modules\Databases\Http\Collections\Action; use Appwrite\Platform\Modules\Databases\Http\Collections\Get as CollectionGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php index 67ff31efb7..9b86dcff8f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables\Logs; -use Appwrite\Platform\Modules\Databases\Http\Collections\Action; use Appwrite\Platform\Modules\Databases\Http\Collections\Logs\XList as CollectionLogXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php index f27232353e..4a20770cbd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Update.php @@ -3,7 +3,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Collections\Action; use Appwrite\Platform\Modules\Databases\Http\Collections\Update as CollectionUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php index 647a98d952..0371eaa3f9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Usage/Get.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables\Usage; -use Appwrite\Platform\Modules\Databases\Http\Collections\Action; use Appwrite\Platform\Modules\Databases\Http\Collections\Usage\Get as CollectionUsageGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php index 77eb556301..4381597ec6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/XList.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Tables; -use Appwrite\Platform\Modules\Databases\Http\Collections\Action; use Appwrite\Platform\Modules\Databases\Http\Collections\XList as CollectionXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; From b55521e3de5c7470cb3793d2b603110a2655ce2a Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 09:36:13 +0530 Subject: [PATCH 061/362] update: address minor comments by `coderabbitai`. --- .../Databases/Http/Attributes/Action.php | 4 ++-- .../Http/Attributes/Boolean/Create.php | 2 +- .../Http/Attributes/Email/Create.php | 22 +++++++++---------- .../Databases/Http/Collections/XList.php | 3 +-- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php index 66e8313d33..6d729b8cf3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php @@ -451,11 +451,11 @@ abstract class Action extends UtopiaAction throw new Exception($this->getNotAvailableException()); } - if ($attribute->getAttribute(('type') !== $type)) { + if ($attribute->getAttribute('type') !== $type) { throw new Exception($this->getTypeInvalidException()); } - if ($attribute->getAttribute('type') === Database::VAR_STRING && $attribute->getAttribute(('filter') !== $filter)) { + if ($attribute->getAttribute('type') === Database::VAR_STRING && $attribute->getAttribute('filter') !== $filter) { throw new Exception($this->getTypeInvalidException()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php index 583e42b4ed..1db55ba33d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php @@ -34,7 +34,7 @@ class Create extends Action ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/boolean') ->desc('Create boolean attribute') ->groups(['api', 'database', 'schema']) - ->label('event', 'databases.[databaseId].collections.[collectionId].collections.[attributeId].create') + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'attribute.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Create.php index 9b63f2198a..c33ce9daeb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Create.php @@ -55,7 +55,7 @@ class Create extends Action ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Collection ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') ->param('default', null, new Email(), 'Default value for attribute when not provided. Cannot be set when attribute is required.', true) @@ -68,20 +68,20 @@ class Create extends Action } public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?string $default, - bool $array, + string $databaseId, + string $collectionId, + string $key, + ?bool $required, + ?string $default, + bool $array, UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents + Database $dbForProject, + EventDatabase $queueForDatabase, + Event $queueForEvents ): void { $attribute = $this->createAttribute( $databaseId, - $tableId, + $collectionId, new Document([ 'key' => $key, 'type' => Database::VAR_STRING, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/XList.php index 98246defaa..b6d002a59b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/XList.php @@ -97,8 +97,7 @@ class XList extends Action $cursorDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionIdId); if ($cursorDocument->isEmpty()) { - $message = - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, ucfirst($this->getContext()) . " '$collectionIdId' for the 'cursor' value not found."); + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, ucfirst($this->getContext()) . " '$collectionIdId' for the 'cursor' value not found."); } $cursor->setValue($cursorDocument); From fc456b4cca28da0d5b67a8c1f6439d9edef997e0 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 10:40:35 +0530 Subject: [PATCH 062/362] update: abstraction over attribute and column apis. --- .../Http/Attributes/Boolean/Create.php | 3 +- .../Http/Attributes/Boolean/Update.php | 3 +- .../Modules/Databases/Http/Columns/Action.php | 417 ------------------ .../Databases/Http/Columns/Boolean/Create.php | 40 +- .../Databases/Http/Columns/Boolean/Update.php | 41 +- .../Http/Columns/Datetime/Create.php | 59 +-- .../Http/Columns/Datetime/Update.php | 49 +- .../Modules/Databases/Http/Columns/Delete.php | 120 +---- .../Databases/Http/Columns/Email/Create.php | 57 +-- .../Databases/Http/Columns/Email/Update.php | 50 +-- .../Databases/Http/Columns/Enum/Create.php | 64 +-- .../Databases/Http/Columns/Enum/Update.php | 52 +-- .../Databases/Http/Columns/Float/Create.php | 72 +-- .../Databases/Http/Columns/Float/Update.php | 59 +-- .../Modules/Databases/Http/Columns/Get.php | 87 +--- .../Databases/Http/Columns/IP/Create.php | 49 +- .../Databases/Http/Columns/IP/Update.php | 50 +-- .../Databases/Http/Columns/Integer/Create.php | 74 +--- .../Databases/Http/Columns/Integer/Update.php | 59 +-- .../Http/Columns/Relationship/Create.php | 110 +---- .../Http/Columns/Relationship/Update.php | 53 +-- .../Databases/Http/Columns/String/Create.php | 71 +-- .../Databases/Http/Columns/String/Update.php | 52 +-- .../Databases/Http/Columns/URL/Create.php | 49 +- .../Databases/Http/Columns/URL/Update.php | 49 +- .../Modules/Databases/Http/Columns/XList.php | 88 +--- 26 files changed, 294 insertions(+), 1583 deletions(-) delete mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php index 1db55ba33d..57cff8a75f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php @@ -30,7 +30,8 @@ class Create extends Action { $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN); - $this->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/boolean') ->desc('Create boolean attribute') ->groups(['api', 'database', 'schema']) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Update.php index 41a0c5a621..7a2db8e74f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Update.php @@ -30,7 +30,8 @@ class Update extends Action { $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN); - $this->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/boolean/:key') ->desc('Update boolean attribute') ->groups(['api', 'database', 'schema']) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php deleted file mode 100644 index a9415fded3..0000000000 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Action.php +++ /dev/null @@ -1,417 +0,0 @@ -getAttribute('key'); - $type = $column->getAttribute('type', ''); - $size = $column->getAttribute('size', 0); - $required = $column->getAttribute('required', true); - $signed = $column->getAttribute('signed', true); // integers are signed by default - $array = $column->getAttribute('array', false); - $format = $column->getAttribute('format', ''); - $formatOptions = $column->getAttribute('formatOptions', []); - $filters = $column->getAttribute('filters', []); // filters are hidden from the endpoint - $default = $column->getAttribute('default'); - $options = $column->getAttribute('options', []); - - $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($db->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - if (!empty($format)) { - if (!Structure::hasFormat($format, $type)) { - throw new Exception(Exception::COLUMN_FORMAT_UNSUPPORTED, "Format {$format} not available for {$type} columns."); - } - } - - // Must throw here since dbForProject->createAttribute is performed by db worker - if ($required && isset($default)) { - throw new Exception(Exception::COLUMN_DEFAULT_UNSUPPORTED, 'Cannot set default value for required column'); - } - - if ($array && isset($default)) { - throw new Exception(Exception::COLUMN_DEFAULT_UNSUPPORTED, 'Cannot set default value for array columns'); - } - - if ($type === Database::VAR_RELATIONSHIP) { - $options['side'] = Database::RELATION_SIDE_PARENT; - $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection'] ?? ''); - if ($relatedTable->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND, 'The related table was not found.'); - } - } - - try { - $column = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $table->getInternalId() . '_' . $key), - 'key' => $key, - 'databaseInternalId' => $db->getInternalId(), - 'databaseId' => $db->getId(), - 'collectionInternalId' => $table->getInternalId(), - 'collectionId' => $tableId, - 'type' => $type, - 'status' => 'processing', // processing, available, failed, deleting, stuck - 'size' => $size, - 'required' => $required, - 'signed' => $signed, - 'default' => $default, - 'array' => $array, - 'format' => $format, - 'formatOptions' => $formatOptions, - 'filters' => $filters, - 'options' => $options, - ]); - - $dbForProject->checkAttribute($table, $column); - $column = $dbForProject->createDocument('attributes', $column); - } catch (DuplicateException) { - throw new Exception(Exception::COLUMN_ALREADY_EXISTS); - } catch (LimitException) { - throw new Exception(Exception::COLUMN_LIMIT_EXCEEDED); - } catch (Throwable $e) { - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); - throw $e; - } - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); - - if ($type === Database::VAR_RELATIONSHIP && $options['twoWay']) { - $twoWayKey = $options['twoWayKey']; - $options['relatedCollection'] = $table->getId(); - $options['twoWayKey'] = $key; - $options['side'] = Database::RELATION_SIDE_CHILD; - - try { - $twoWayAttribute = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $twoWayKey), - 'key' => $twoWayKey, - 'databaseInternalId' => $db->getInternalId(), - 'databaseId' => $db->getId(), - 'collectionInternalId' => $relatedTable->getInternalId(), - 'collectionId' => $relatedTable->getId(), - 'type' => $type, - 'status' => 'processing', // processing, available, failed, deleting, stuck - 'size' => $size, - 'required' => $required, - 'signed' => $signed, - 'default' => $default, - 'array' => $array, - 'format' => $format, - 'formatOptions' => $formatOptions, - 'filters' => $filters, - 'options' => $options, - ]); - - $dbForProject->checkAttribute($relatedTable, $twoWayAttribute); - $dbForProject->createDocument('attributes', $twoWayAttribute); - } catch (DuplicateException) { - $dbForProject->deleteDocument('attributes', $column->getId()); - throw new Exception(Exception::COLUMN_ALREADY_EXISTS); - } catch (LimitException) { - $dbForProject->deleteDocument('attributes', $column->getId()); - throw new Exception(Exception::COLUMN_LIMIT_EXCEEDED); - } catch (Throwable $e) { - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); - throw $e; - } - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); - } - - $queueForDatabase - ->setType(DATABASE_TYPE_CREATE_ATTRIBUTE) - ->setDatabase($db) - ->setTable($table) - ->setRow($column); - - $queueForEvents - ->setContext('table', $table) - ->setContext('database', $db) - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('columnId', $column->getId()); - - $response->setStatusCode(SwooleResponse::STATUS_CODE_CREATED); - - return $column; - } - - protected function updateColumn( - string $databaseId, - string $tableId, - string $key, - Database $dbForProject, - Event $queueForEvents, - string $type, - int $size = null, - string $filter = null, - string|bool|int|float $default = null, - bool $required = null, - int|float|null $min = null, - int|float|null $max = null, - array $elements = null, - array $options = [], - string $newKey = null, - ): Document { - $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($db->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - $column = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); - - if ($column->isEmpty()) { - throw new Exception(Exception::COLUMN_NOT_FOUND); - } - - if ($column->getAttribute('status') !== 'available') { - throw new Exception(Exception::COLUMN_NOT_AVAILABLE); - } - - if ($column->getAttribute(('type') !== $type)) { - throw new Exception(Exception::COLUMN_TYPE_INVALID); - } - - if ($column->getAttribute('type') === Database::VAR_STRING && $column->getAttribute(('filter') !== $filter)) { - throw new Exception(Exception::COLUMN_TYPE_INVALID); - } - - if ($required && isset($default)) { - throw new Exception(Exception::COLUMN_DEFAULT_UNSUPPORTED, 'Cannot set default value for required column'); - } - - if ($column->getAttribute('array', false) && isset($default)) { - throw new Exception(Exception::COLUMN_DEFAULT_UNSUPPORTED, 'Cannot set default value for array columns'); - } - - $tableId = 'database_' . $db->getInternalId() . '_collection_' . $table->getInternalId(); - - $column - ->setAttribute('default', $default) - ->setAttribute('required', $required); - - if (!empty($size)) { - $column->setAttribute('size', $size); - } - - switch ($column->getAttribute('format')) { - case APP_DATABASE_ATTRIBUTE_INT_RANGE: - case APP_DATABASE_ATTRIBUTE_FLOAT_RANGE: - $min ??= $column->getAttribute('formatOptions')['min']; - $max ??= $column->getAttribute('formatOptions')['max']; - - if ($min > $max) { - throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); - } - - if ($column->getAttribute('format') === APP_DATABASE_ATTRIBUTE_INT_RANGE) { - $validator = new Range($min, $max, Database::VAR_INTEGER); - } else { - $validator = new Range($min, $max, Database::VAR_FLOAT); - - if (!is_null($default)) { - $default = \floatval($default); - } - } - - if (!is_null($default) && !$validator->isValid($default)) { - throw new Exception(Exception::COLUMN_VALUE_INVALID, $validator->getDescription()); - } - - $options = [ - 'min' => $min, - 'max' => $max - ]; - $column->setAttribute('formatOptions', $options); - - break; - case APP_DATABASE_ATTRIBUTE_ENUM: - if (empty($elements)) { - throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Enum elements must not be empty'); - } - - foreach ($elements as $element) { - if (\strlen($element) === 0) { - throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Each enum element must not be empty'); - } - } - - if (!is_null($default) && !in_array($default, $elements)) { - throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Default value not found in elements'); - } - - $options = [ - 'elements' => $elements - ]; - - $column->setAttribute('formatOptions', $options); - - break; - } - - if ($type === Database::VAR_RELATIONSHIP) { - $primaryRowOptions = \array_merge($column->getAttribute('options', []), $options); - $column->setAttribute('options', $primaryRowOptions); - try { - $dbForProject->updateRelationship( - collection: $tableId, - id: $key, - newKey: $newKey, - onDelete: $primaryRowOptions['onDelete'], - ); - } catch (NotFoundException) { - throw new Exception(Exception::COLUMN_NOT_FOUND); - } - - if ($primaryRowOptions['twoWay']) { - $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $primaryRowOptions['relatedCollection']); - - $relatedColumn = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $primaryRowOptions['twoWayKey']); - - if (!empty($newKey) && $newKey !== $key) { - $options['twoWayKey'] = $newKey; - } - - $relatedOptions = \array_merge($relatedColumn->getAttribute('options'), $options); - $relatedColumn->setAttribute('options', $relatedOptions); - $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $primaryRowOptions['twoWayKey'], $relatedColumn); - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); - } - } else { - try { - $dbForProject->updateAttribute( - collection: $tableId, - id: $key, - size: $size, - required: $required, - default: $default, - formatOptions: $options, - newKey: $newKey ?? null - ); - } catch (TruncateException) { - throw new Exception(Exception::COLUMN_INVALID_RESIZE); - } catch (NotFoundException) { - throw new Exception(Exception::COLUMN_NOT_FOUND); - } catch (LimitException) { - throw new Exception(Exception::COLUMN_LIMIT_EXCEEDED); - } catch (IndexException $e) { - throw new Exception(Exception::INDEX_INVALID, $e->getMessage()); - } - } - - if (!empty($newKey) && $key !== $newKey) { - $originalUid = $column->getId(); - - $column - ->setAttribute('$id', ID::custom($db->getInternalId() . '_' . $table->getInternalId() . '_' . $newKey)) - ->setAttribute('key', $newKey); - - $dbForProject->updateDocument('attributes', $originalUid, $column); - - /** - * @var Document $index - */ - foreach ($table->getAttribute('indexes') as $index) { - /** - * @var string[] $columns - */ - $columns = $index->getAttribute('attributes', []); - $found = \array_search($key, $columns); - - if ($found !== false) { - $columns[$found] = $newKey; - $index->setAttribute('attributes', $columns); - $dbForProject->updateDocument('indexes', $index->getId(), $index); - } - } - } else { - $column = $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key, $column); - } - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $table->getId()); - - $queueForEvents - ->setContext('table', $table) - ->setContext('database', $db) - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('columnId', $column->getId()); - - return $column; - } -} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php index 7e1331a637..385c631493 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php @@ -4,21 +4,19 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Boolean; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Boolean\Create as BooleanCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; -class Create extends ColumnAction +class Create extends BooleanCreate { use HTTP; @@ -29,9 +27,12 @@ class Create extends ColumnAction public function __construct() { - $this->setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_BOOLEAN); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/boolean') ->desc('Create boolean column') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') @@ -41,14 +42,14 @@ class Create extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'createBooleanColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-boolean-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_COLUMN_BOOLEAN, + model: $this->getResponseModel(), ) ] )) @@ -62,23 +63,8 @@ class Create extends ColumnAction ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void - { - - $column = $this->createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_BOOLEAN, - 'size' => 0, - 'required' => $required, - 'default' => $default, - 'array' => $array, - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_BOOLEAN); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php index 6725e0c817..7b0754ccc7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Boolean; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Boolean\Update as BooleanUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -12,13 +12,12 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; -class Update extends ColumnAction +class Update extends BooleanUpdate { use HTTP; @@ -29,9 +28,12 @@ class Update extends ColumnAction public function __construct() { - $this->setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_BOOLEAN); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/boolean/:key') ->desc('Update boolean column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -41,14 +43,14 @@ class Update extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'updateBooleanColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/update-boolean-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLUMN_BOOLEAN, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -62,25 +64,8 @@ class Update extends ColumnAction ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void - { - $column = $this->updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_BOOLEAN, - default: $default, - required: $required, - newKey: $newKey - ); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_BOOLEAN); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $default, $newKey, $response, $dbForProject, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php index 29ce39789e..80031d61ab 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php @@ -4,22 +4,20 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Datetime; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Datetime\Create as DatetimeCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; -class Create extends ColumnAction +class Create extends DatetimeCreate { use HTTP; @@ -30,10 +28,12 @@ class Create extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_DATETIME); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/datetime') ->desc('Create datetime column') ->groups(['api', 'database']) ->label('scope', 'collections.write') @@ -43,14 +43,14 @@ class Create extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'createDatetimeColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-datetime-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_COLUMN_DATETIME, + model: $this->getResponseModel(), ) ] )) @@ -64,43 +64,8 @@ class Create extends ColumnAction ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?string $default, - bool $array, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { - $filters = ['datetime']; - - $column = $this->createColumn( - $databaseId, - $tableId, - new Document([ - 'key' => $key, - 'type' => Database::VAR_DATETIME, - 'size' => 0, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'filters' => $filters, - ]), - $response, - $dbForProject, - $queueForDatabase, - $queueForEvents - ); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_DATETIME); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php index 6ff0744859..d7124981d1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Datetime; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Datetime\Update as DatetimeUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -13,13 +13,12 @@ use Utopia\Database\Database; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; -class Update extends ColumnAction +class Update extends DatetimeUpdate { use HTTP; @@ -30,10 +29,12 @@ class Update extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_DATETIME); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/datetime/:key') ->desc('Update dateTime column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -43,14 +44,14 @@ class Update extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'updateDatetimeColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/update-datetime-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLUMN_DATETIME, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -64,34 +65,8 @@ class Update extends ColumnAction ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?string $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { - $column = $this->updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_DATETIME, - default: $default, - required: $required, - newKey: $newKey - ); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_DATETIME); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $default, $newKey, $response, $dbForProject, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php index 717e8f958c..eb2c6a9ccf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php @@ -4,22 +4,19 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Delete as AttributesDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Validator\Authorization; -use Utopia\Database\Validator\IndexDependency as IndexDependencyValidator; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; -class Delete extends Action +class Delete extends AttributesDelete { use HTTP; @@ -30,10 +27,14 @@ class Delete extends Action public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + + // parent action handles multiple model types internally + $this->setResponseModel(UtopiaResponse::MODEL_NONE); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/:key') ->desc('Delete column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -43,14 +44,14 @@ class Delete extends Action ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'deleteColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/delete-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_NOCONTENT, - model: UtopiaResponse::MODEL_NONE, + model: $this->getResponseModel(), ) ], contentType: ContentType::NONE @@ -62,103 +63,8 @@ class Delete extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents, - ): void { - $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - if ($db->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - $column = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); - if ($column->isEmpty()) { - throw new Exception(Exception::COLUMN_NOT_FOUND); - } - - $validator = new IndexDependencyValidator( - $table->getAttribute('indexes'), - $dbForProject->getAdapter()->getSupportForCastIndexArray(), - ); - if (!$validator->isValid($column)) { - throw new Exception(Exception::INDEX_DEPENDENCY); - } - - if ($column->getAttribute('status') === 'available') { - $column = $dbForProject->updateDocument('attributes', $column->getId(), $column->setAttribute('status', 'deleting')); - } - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $table->getInternalId()); - - if ($column->getAttribute('type') === Database::VAR_RELATIONSHIP) { - $options = $column->getAttribute('options'); - if ($options['twoWay']) { - $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection']); - if ($relatedTable->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - $relatedColumn = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $options['twoWayKey']); - if ($relatedColumn->isEmpty()) { - throw new Exception(Exception::COLUMN_NOT_FOUND); - } - - if ($relatedColumn->getAttribute('status') === 'available') { - $dbForProject->updateDocument('attributes', $relatedColumn->getId(), $relatedColumn->setAttribute('status', 'deleting')); - } - - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $options['relatedCollection']); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); - } - } - - $queueForDatabase - ->setType(DATABASE_TYPE_DELETE_ATTRIBUTE) - ->setTable($table) - ->setDatabase($db) - ->setRow($column); - - $type = $column->getAttribute('type'); - $format = $column->getAttribute('format'); - - $model = match ($type) { - Database::VAR_BOOLEAN => UtopiaResponse::MODEL_COLUMN_BOOLEAN, - Database::VAR_INTEGER => UtopiaResponse::MODEL_COLUMN_INTEGER, - Database::VAR_FLOAT => UtopiaResponse::MODEL_COLUMN_FLOAT, - Database::VAR_DATETIME => UtopiaResponse::MODEL_COLUMN_DATETIME, - Database::VAR_RELATIONSHIP => UtopiaResponse::MODEL_COLUMN_RELATIONSHIP, - Database::VAR_STRING => match ($format) { - APP_DATABASE_ATTRIBUTE_EMAIL => UtopiaResponse::MODEL_COLUMN_EMAIL, - APP_DATABASE_ATTRIBUTE_ENUM => UtopiaResponse::MODEL_COLUMN_ENUM, - APP_DATABASE_ATTRIBUTE_IP => UtopiaResponse::MODEL_COLUMN_IP, - APP_DATABASE_ATTRIBUTE_URL => UtopiaResponse::MODEL_COLUMN_URL, - default => UtopiaResponse::MODEL_COLUMN_STRING, - }, - default => UtopiaResponse::MODEL_COLUMN, - }; - - $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('columnId', $column->getId()) - ->setContext('table', $table) - ->setContext('database', $db) - ->setPayload($response->output($column, $model)); - - $response->noContent(); + ->callback(function (string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php index 2372d8b032..2fdb994251 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php @@ -5,21 +5,19 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Email; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Network\Validator\Email; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Email\Create as EmailCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; -class Create extends ColumnAction +class Create extends EmailCreate { use HTTP; @@ -30,10 +28,12 @@ class Create extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_EMAIL); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/email') ->desc('Create email column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -43,14 +43,14 @@ class Create extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'createEmailColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-email-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_COLUMN_EMAIL, + model: $this->getResponseModel(), ) ] )) @@ -64,41 +64,8 @@ class Create extends ColumnAction ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?string $default, - bool $array, - \Appwrite\Utopia\Response $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { - $column = $this->createColumn( - $databaseId, - $tableId, - new Document([ - 'key' => $key, - 'type' => Database::VAR_STRING, - 'size' => 254, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'format' => APP_DATABASE_ATTRIBUTE_EMAIL, - ]), - $response, - $dbForProject, - $queueForDatabase, - $queueForEvents - ); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_EMAIL); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php index 74124eba37..255e636a39 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php @@ -4,7 +4,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Email; use Appwrite\Event\Event; use Appwrite\Network\Validator\Email; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Email\Update as EmailUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -13,13 +13,12 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; -class Update extends ColumnAction +class Update extends EmailUpdate { use HTTP; @@ -30,10 +29,12 @@ class Update extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_EMAIL); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/email/:key') ->desc('Update email column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -43,14 +44,14 @@ class Update extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'updateEmailColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/update-email-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLUMN_EMAIL, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -64,35 +65,8 @@ class Update extends ColumnAction ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?string $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { - $column = $this->updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_STRING, - filter: APP_DATABASE_ATTRIBUTE_EMAIL, - default: $default, - required: $required, - newKey: $newKey - ); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_EMAIL); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $default, $newKey, $response, $dbForProject, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php index c57d451743..2408aeeae4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php @@ -4,24 +4,21 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Enum; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; -use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Enum\Create as EnumCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; use Utopia\Validator\Text; -class Create extends ColumnAction +class Create extends EnumCreate { use HTTP; @@ -32,10 +29,12 @@ class Create extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_ENUM); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/enum') ->desc('Create enum column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -45,14 +44,14 @@ class Create extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'createEnumColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-attribute-enum.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_COLUMN_ENUM, + model: $this->getResponseModel(), ) ] )) @@ -67,47 +66,8 @@ class Create extends ColumnAction ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - array $elements, - ?bool $required, - ?string $default, - bool $array, - \Appwrite\Utopia\Response $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { - if (!is_null($default) && !in_array($default, $elements, true)) { - throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Default value not found in elements'); - } - - $column = $this->createColumn( - $databaseId, - $tableId, - new Document([ - 'key' => $key, - 'type' => Database::VAR_STRING, - 'size' => Database::LENGTH_KEY, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'format' => APP_DATABASE_ATTRIBUTE_ENUM, - 'formatOptions' => ['elements' => $elements], - ]), - $response, - $dbForProject, - $queueForDatabase, - $queueForEvents - ); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_ENUM); + ->callback(function (string $databaseId, string $tableId, string $key, array $elements, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $elements, $required, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php index aa588a9f1b..c47766b4dd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Enum; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Enum\Update as EnumUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -12,7 +12,6 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; @@ -20,7 +19,7 @@ use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; use Utopia\Validator\Text; -class Update extends ColumnAction +class Update extends EnumUpdate { use HTTP; @@ -31,10 +30,12 @@ class Update extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_ENUM); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/enum/:key') ->desc('Update enum column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -44,14 +45,14 @@ class Update extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'updateEnumColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/update-enum-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLUMN_ENUM, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -66,37 +67,8 @@ class Update extends ColumnAction ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?array $elements, - ?bool $required, - ?string $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { - $column = $this->updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_STRING, - filter: APP_DATABASE_ATTRIBUTE_ENUM, - default: $default, - required: $required, - elements: $elements, - newKey: $newKey - ); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_ENUM); + ->callback(function (string $databaseId, string $tableId, string $key, array $elements, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $elements, $required, $default, $newKey, $response, $dbForProject, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php index a0a16fafec..c8b9a7ec7b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php @@ -4,24 +4,20 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Float; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; -use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Float\Create as FloatCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\FloatValidator; -use Utopia\Validator\Range; -class Create extends ColumnAction +class Create extends FloatCreate { use HTTP; @@ -32,10 +28,12 @@ class Create extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_FLOAT); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/float') ->desc('Create float column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -45,14 +43,14 @@ class Create extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'createFloatColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-float-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_COLUMN_FLOAT, + model: $this->getResponseModel(), ) ] )) @@ -68,54 +66,8 @@ class Create extends ColumnAction ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?float $min, - ?float $max, - ?float $default, - bool $array, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { - $min ??= -PHP_FLOAT_MAX; - $max ??= PHP_FLOAT_MAX; - - if ($min > $max) { - throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); - } - - $validator = new Range($min, $max, Database::VAR_FLOAT); - if (!\is_null($default) && !$validator->isValid($default)) { - throw new Exception(Exception::COLUMN_VALUE_INVALID, $validator->getDescription()); - } - - $column = $this->createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_FLOAT, - 'size' => 0, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'format' => APP_DATABASE_ATTRIBUTE_FLOAT_RANGE, - 'formatOptions' => ['min' => $min, 'max' => $max], - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $formatOptions = $column->getAttribute('formatOptions', []); - if (!empty($formatOptions)) { - $column->setAttribute('min', \floatval($formatOptions['min'])); - $column->setAttribute('max', \floatval($formatOptions['max'])); - } - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_FLOAT); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $min, $max, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php index 8ea7ab474a..1e008de2c0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Float; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Float\Update as FloatUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -12,14 +12,13 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\FloatValidator; use Utopia\Validator\Nullable; -class Update extends ColumnAction +class Update extends FloatUpdate { use HTTP; @@ -30,10 +29,12 @@ class Update extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_FLOAT); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/float/:key') ->desc('Update float column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -43,14 +44,14 @@ class Update extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'updateFloatColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/update-float-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLUMN_FLOAT, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -66,44 +67,8 @@ class Update extends ColumnAction ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?float $min, - ?float $max, - ?float $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { - $column = $this->updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_FLOAT, - default: $default, - required: $required, - min: $min, - max: $max, - newKey: $newKey - ); - - $formatOptions = $column->getAttribute('formatOptions', []); - if (!empty($formatOptions)) { - $column->setAttribute('min', \floatval($formatOptions['min'])); - $column->setAttribute('max', \floatval($formatOptions['max'])); - } - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_FLOAT); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $min, $max, $default, $newKey, $response, $dbForProject, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php index 4390f0841c..d8847f0122 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php @@ -2,20 +2,18 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Get as AttributesGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; -class Get extends Action +class Get extends AttributesGet { use HTTP; @@ -26,35 +24,38 @@ class Get extends Action public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + + $this->setResponseModel([ + UtopiaResponse::MODEL_COLUMN_BOOLEAN, + UtopiaResponse::MODEL_COLUMN_INTEGER, + UtopiaResponse::MODEL_COLUMN_FLOAT, + UtopiaResponse::MODEL_COLUMN_EMAIL, + UtopiaResponse::MODEL_COLUMN_ENUM, + UtopiaResponse::MODEL_COLUMN_URL, + UtopiaResponse::MODEL_COLUMN_IP, + UtopiaResponse::MODEL_COLUMN_DATETIME, + UtopiaResponse::MODEL_COLUMN_RELATIONSHIP, + UtopiaResponse::MODEL_COLUMN_STRING, + ]); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/:key') ->desc('Get column') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'getColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/get-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: [ - UtopiaResponse::MODEL_COLUMN_BOOLEAN, - UtopiaResponse::MODEL_COLUMN_INTEGER, - UtopiaResponse::MODEL_COLUMN_FLOAT, - UtopiaResponse::MODEL_COLUMN_EMAIL, - UtopiaResponse::MODEL_COLUMN_ENUM, - UtopiaResponse::MODEL_COLUMN_URL, - UtopiaResponse::MODEL_COLUMN_IP, - UtopiaResponse::MODEL_COLUMN_DATETIME, - UtopiaResponse::MODEL_COLUMN_RELATIONSHIP, - UtopiaResponse::MODEL_COLUMN_STRING, - ] + model: $this->getResponseModel() ) ] )) @@ -63,50 +64,8 @@ class Get extends Action ->param('key', '', new Key(), 'Column Key.') ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject): void - { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - $column = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $table->getInternalId() . '_' . $key); - if ($column->isEmpty()) { - throw new Exception(Exception::COLUMN_NOT_FOUND); - } - - $type = $column->getAttribute('type'); - $format = $column->getAttribute('format'); - $options = $column->getAttribute('options', []); - - foreach ($options as $optKey => $optValue) { - $column->setAttribute($optKey, $optValue); - } - - $model = match ($type) { - Database::VAR_BOOLEAN => UtopiaResponse::MODEL_COLUMN_BOOLEAN, - Database::VAR_INTEGER => UtopiaResponse::MODEL_COLUMN_INTEGER, - Database::VAR_FLOAT => UtopiaResponse::MODEL_COLUMN_FLOAT, - Database::VAR_DATETIME => UtopiaResponse::MODEL_COLUMN_DATETIME, - Database::VAR_RELATIONSHIP => UtopiaResponse::MODEL_COLUMN_RELATIONSHIP, - Database::VAR_STRING => match ($format) { - APP_DATABASE_ATTRIBUTE_EMAIL => UtopiaResponse::MODEL_COLUMN_EMAIL, - APP_DATABASE_ATTRIBUTE_ENUM => UtopiaResponse::MODEL_COLUMN_ENUM, - APP_DATABASE_ATTRIBUTE_IP => UtopiaResponse::MODEL_COLUMN_IP, - APP_DATABASE_ATTRIBUTE_URL => UtopiaResponse::MODEL_COLUMN_URL, - default => UtopiaResponse::MODEL_COLUMN_STRING, - }, - default => UtopiaResponse::MODEL_COLUMN, - }; - - $response->dynamic($column, $model); + ->callback(function (string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject) { + parent::action($databaseId, $tableId, $key, $response, $dbForProject); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php index 73d8c93031..a69cc6ccfe 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php @@ -4,22 +4,20 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\IP; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\IP\Create as IPCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\IP; -class Create extends ColumnAction +class Create extends IPCreate { use HTTP; @@ -30,10 +28,12 @@ class Create extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_IP); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/ip') ->desc('Create IP address column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -43,14 +43,14 @@ class Create extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'createIpColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-ip-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_COLUMN_IP, + model: $this->getResponseModel(), ) ] )) @@ -64,33 +64,8 @@ class Create extends ColumnAction ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?string $default, - bool $array, - \Appwrite\Utopia\Response $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { - $column = $this->createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_STRING, - 'size' => 39, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'format' => APP_DATABASE_ATTRIBUTE_IP, - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_IP); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php index 4b9fa8bca8..d4c6db12fe 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\IP; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\IP\Update as IPUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -12,14 +12,13 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\IP; use Utopia\Validator\Nullable; -class Update extends ColumnAction +class Update extends IPUpdate { use HTTP; @@ -30,10 +29,12 @@ class Update extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_IP); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/ip/:key') ->desc('Update IP address column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -43,14 +44,14 @@ class Update extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'updateIpColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/update-ip-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLUMN_IP, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -64,35 +65,8 @@ class Update extends ColumnAction ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?string $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { - $column = $this->updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_STRING, - filter: APP_DATABASE_ATTRIBUTE_IP, - default: $default, - required: $required, - newKey: $newKey - ); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_IP); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $default, $newKey, $response, $dbForProject, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php index cf2244bf1f..2c394dd042 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php @@ -4,24 +4,20 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Integer; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; -use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Integer\Create as IntegerCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Integer; -use Utopia\Validator\Range; -class Create extends ColumnAction +class Create extends IntegerCreate { use HTTP; @@ -32,10 +28,12 @@ class Create extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_INTEGER); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/integer') ->desc('Create integer column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -45,14 +43,14 @@ class Create extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'createIntegerColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-integer-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_COLUMN_INTEGER, + model: $this->getResponseModel(), ) ] )) @@ -68,56 +66,8 @@ class Create extends ColumnAction ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?int $min, - ?int $max, - ?int $default, - bool $array, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { - $min ??= \PHP_INT_MIN; - $max ??= \PHP_INT_MAX; - - if ($min > $max) { - throw new Exception(Exception::COLUMN_VALUE_INVALID, 'Minimum value must be lesser than maximum value'); - } - - $validator = new Range($min, $max, Database::VAR_INTEGER); - if (!\is_null($default) && !$validator->isValid($default)) { - throw new Exception(Exception::COLUMN_VALUE_INVALID, $validator->getDescription()); - } - - $size = $max > 2147483647 ? 8 : 4; - - $column = $this->createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_INTEGER, - 'size' => $size, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'format' => APP_DATABASE_ATTRIBUTE_INT_RANGE, - 'formatOptions' => ['min' => $min, 'max' => $max], - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $formatOptions = $column->getAttribute('formatOptions', []); - if (!empty($formatOptions)) { - $column->setAttribute('min', \intval($formatOptions['min'])); - $column->setAttribute('max', \intval($formatOptions['max'])); - } - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_INTEGER); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $min, $max, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php index 1806cc91c3..4eacb2b0df 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Integer; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Integer\Update as IntegerUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -12,14 +12,13 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Integer; use Utopia\Validator\Nullable; -class Update extends ColumnAction +class Update extends IntegerUpdate { use HTTP; @@ -30,10 +29,12 @@ class Update extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_INTEGER); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/integer/:key') ->desc('Update integer column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -43,14 +44,14 @@ class Update extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'updateIntegerColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/update-integer-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLUMN_INTEGER, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -66,44 +67,8 @@ class Update extends ColumnAction ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?int $min, - ?int $max, - ?int $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { - $column = $this->updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_INTEGER, - default: $default, - required: $required, - min: $min, - max: $max, - newKey: $newKey - ); - - $formatOptions = $column->getAttribute('formatOptions', []); - if (!empty($formatOptions)) { - $column->setAttribute('min', \intval($formatOptions['min'])); - $column->setAttribute('max', \intval($formatOptions['max'])); - } - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_INTEGER); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $min, $max, $default, $newKey, $response, $dbForProject, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php index 8b3ec616a3..d0b080b237 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php @@ -4,24 +4,20 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Relationship; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; -use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Relationship\Create as RelationshipCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\WhiteList; -class Create extends ColumnAction +class Create extends RelationshipCreate { use HTTP; @@ -32,10 +28,12 @@ class Create extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_RELATIONSHIP); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/relationship') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/relationship') ->desc('Create relationship column') ->groups(['api', 'database']) ->label('scope', 'collections.write') @@ -45,14 +43,14 @@ class Create extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'createRelationshipColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-relationship-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_COLUMN_RELATIONSHIP + model: $this->getResponseModel() ) ] )) @@ -77,92 +75,8 @@ class Create extends ColumnAction ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $relatedTableId, - string $type, - bool $twoWay, - ?string $key, - ?string $twoWayKey, - string $onDelete, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { - $key ??= $relatedTableId; - $twoWayKey ??= $tableId; - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - $table = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId()); - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - $relatedTableDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId); - $relatedTable = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $relatedTableDocument->getInternalId()); - if ($relatedTable->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - $columns = $table->getAttribute('attributes', []); - foreach ($columns as $column) { - if ($column->getAttribute('type') !== Database::VAR_RELATIONSHIP) { - continue; - } - - if (\strtolower($column->getId()) === \strtolower($key)) { - throw new Exception(Exception::COLUMN_ALREADY_EXISTS); - } - - if ( - \strtolower($column->getAttribute('options')['twoWayKey']) === \strtolower($twoWayKey) && - $column->getAttribute('options')['relatedCollection'] === $relatedTable->getId() - ) { - throw new Exception(Exception::COLUMN_ALREADY_EXISTS, 'Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.'); - } - - if ( - $type === Database::RELATION_MANY_TO_MANY && - $column->getAttribute('options')['relationType'] === Database::RELATION_MANY_TO_MANY && - $column->getAttribute('options')['relatedCollection'] === $relatedTable->getId() - ) { - throw new Exception(Exception::COLUMN_ALREADY_EXISTS, 'Creating more than one "manyToMany" relationship on the same table is currently not permitted.'); - } - } - - $column = $this->createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_RELATIONSHIP, - 'size' => 0, - 'required' => false, - 'default' => null, - 'array' => false, - 'filters' => [], - 'options' => [ - 'relatedCollection' => $relatedTableId, - 'relationType' => $type, - 'twoWay' => $twoWay, - 'twoWayKey' => $twoWayKey, - 'onDelete' => $onDelete, - ] - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - foreach ($column->getAttribute('options', []) as $k => $option) { - $column->setAttribute($k, $option); - } - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_RELATIONSHIP); + ->callback(function (string $databaseId, string $tableId, string $relatedTableId, string $type, bool $twoWay, ?string $key, ?string $twoWayKey, string $onDelete, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $relatedTableId, $type, $twoWayKey, $key, $twoWayKey, $onDelete, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php index 80ca25e9cf..85e4e207a5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\Relationship; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\Relationship\Update as RelationshipUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -12,12 +12,11 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\WhiteList; -class Update extends ColumnAction +class Update extends RelationshipUpdate { use HTTP; @@ -28,8 +27,11 @@ class Update extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_RELATIONSHIP); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key/relationship') ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/:key/relationship') ->desc('Update relationship column') @@ -41,14 +43,14 @@ class Update extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'updateRelationshipColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/update-relationship-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLUMN_RELATIONSHIP + model: $this->getResponseModel() ) ], contentType: ContentType::JSON @@ -65,39 +67,8 @@ class Update extends ColumnAction ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?string $onDelete, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { - $column = $this->updateColumn( - $databaseId, - $tableId, - $key, - $dbForProject, - $queueForEvents, - type: Database::VAR_RELATIONSHIP, - required: false, - options: [ - 'onDelete' => $onDelete - ], - newKey: $newKey - ); - - foreach ($column->getAttribute('options', []) as $k => $option) { - $column->setAttribute($k, $option); - } - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_RELATIONSHIP); + ->callback(function (string $databaseId, string $tableId, string $key, ?string $onDelete, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $onDelete, $newKey, $response, $dbForProject, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php index e768fda1d6..e00bdf679e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php @@ -4,17 +4,14 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\String; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; -use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\String\Create as StringCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator; @@ -22,7 +19,7 @@ use Utopia\Validator\Boolean; use Utopia\Validator\Range; use Utopia\Validator\Text; -class Create extends ColumnAction +class Create extends StringCreate { use HTTP; @@ -33,10 +30,12 @@ class Create extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_STRING); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/string') ->desc('Create string column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -46,14 +45,14 @@ class Create extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'createStringColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-string-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_COLUMN_STRING + model: $this->getResponseModel() ) ] )) @@ -69,54 +68,8 @@ class Create extends ColumnAction ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?int $size, - ?bool $required, - ?string $default, - bool $array, - bool $encrypt, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { - // Ensure default fits in the given size - $validator = new Text($size, 0); - if (!is_null($default) && !$validator->isValid($default)) { - throw new Exception(Exception::COLUMN_VALUE_INVALID, $validator->getDescription()); - } - - $filters = []; - if ($encrypt) { - $filters[] = 'encrypt'; - } - - $column = $this->createColumn( - $databaseId, - $tableId, - new Document([ - 'key' => $key, - 'type' => Database::VAR_STRING, - 'size' => $size, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'filters' => $filters, - ]), - $response, - $dbForProject, - $queueForDatabase, - $queueForEvents - ); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_STRING); + ->callback(function (string $databaseId, string $tableId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, bool $encrypt, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $size, $required, $default, $array, $encrypt, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php index ca692d9269..9db47fba69 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\String; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\String\Update as StringUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -12,7 +12,6 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator; @@ -21,7 +20,7 @@ use Utopia\Validator\Nullable; use Utopia\Validator\Range; use Utopia\Validator\Text; -class Update extends ColumnAction +class Update extends StringUpdate { use HTTP; @@ -32,9 +31,12 @@ class Update extends ColumnAction public function __construct() { - $this->setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_STRING); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/string/:key') ->desc('Update string column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -44,14 +46,14 @@ class Update extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'updateStringColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/update-string-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLUMN_STRING, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -66,36 +68,8 @@ class Update extends ColumnAction ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?string $default, - ?int $size, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { - $column = $this->updateColumn( - databaseId: $databaseId, - tableId: $tableId, - key: $key, - dbForProject: $dbForProject, - queueForEvents: $queueForEvents, - type: Database::VAR_STRING, - size: $size, - default: $default, - required: $required, - newKey: $newKey - ); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_STRING); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?int $size, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $default, $size, $newKey, $response, $dbForProject, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php index c1483c373a..ee770e9e4d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php @@ -4,22 +4,20 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\URL; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\URL\Create as URLCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\URL; -class Create extends ColumnAction +class Create extends URLCreate { use HTTP; @@ -30,10 +28,12 @@ class Create extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_URL); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_POST) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/url') ->desc('Create URL column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') @@ -43,14 +43,14 @@ class Create extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'createUrlColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-url-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_COLUMN_URL, + model: $this->getResponseModel(), ) ] )) @@ -64,33 +64,8 @@ class Create extends ColumnAction ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?string $default, - bool $array, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { - $column = $this->createColumn($databaseId, $tableId, new Document([ - 'key' => $key, - 'type' => Database::VAR_STRING, - 'size' => 2000, - 'required' => $required, - 'default' => $default, - 'array' => $array, - 'format' => APP_DATABASE_ATTRIBUTE_URL, - ]), $response, $dbForProject, $queueForDatabase, $queueForEvents); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_URL); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php index db35cf56c4..360445750b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns\URL; use Appwrite\Event\Event; -use Appwrite\Platform\Modules\Databases\Http\Columns\Action as ColumnAction; +use Appwrite\Platform\Modules\Databases\Http\Attributes\URL\Update as URLUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -12,14 +12,13 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; use Utopia\Validator\URL; -class Update extends ColumnAction +class Update extends URLUpdate { use HTTP; @@ -30,8 +29,11 @@ class Update extends ColumnAction public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_URL); + $this - ->setHttpMethod(Action::HTTP_REQUEST_METHOD_PATCH) + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url/:key') ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/url/:key') ->desc('Update URL column') @@ -43,14 +45,14 @@ class Update extends ColumnAction ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'updateUrlColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/update-url-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLUMN_URL, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -64,35 +66,8 @@ class Update extends ColumnAction ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); - } - - public function action( - string $databaseId, - string $tableId, - string $key, - ?bool $required, - ?string $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { - $column = $this->updateColumn( - $databaseId, - $tableId, - $key, - $dbForProject, - $queueForEvents, - type: Database::VAR_STRING, - filter: APP_DATABASE_ATTRIBUTE_URL, - default: $default, - required: $required, - newKey: $newKey - ); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_OK) - ->dynamic($column, UtopiaResponse::MODEL_COLUMN_URL); + ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $required, $default, $newKey, $response, $dbForProject, $queueForEvents); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php index c480536e6c..06d7a57dcf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php @@ -2,24 +2,18 @@ namespace Appwrite\Platform\Modules\Databases\Http\Columns; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Attributes\XList as AttributesXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Columns; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; -use Utopia\Database\Exception\Order as OrderException; -use Utopia\Database\Query; -use Utopia\Database\Validator\Authorization; -use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; -class XList extends Action +class XList extends AttributesXList { use HTTP; @@ -30,24 +24,26 @@ class XList extends Action public function __construct() { + $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_LIST); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes') ->desc('List columns') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'listColumns', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/list-attributes.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_COLUMN_LIST + model: $this->getResponseModel() ) ] )) @@ -56,70 +52,8 @@ class XList extends Action ->param('queries', [], new Columns(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Columns::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject): void - { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - $queries = Query::parseQueries($queries); - - \array_push( - $queries, - Query::equal('databaseInternalId', [$database->getInternalId()]), - Query::equal('collectionInternalId', [$table->getInternalId()]) - ); - - $cursor = \array_filter( - $queries, - fn ($query) => \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]) - ); - $cursor = \reset($cursor); - - if ($cursor) { - $validator = new Cursor(); - if (!$validator->isValid($cursor)) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); - } - - $columnId = $cursor->getValue(); - $cursorDocument = Authorization::skip( - fn () => $dbForProject->find('attributes', [ - Query::equal('databaseInternalId', [$database->getInternalId()]), - Query::equal('collectionInternalId', [$table->getInternalId()]), - Query::equal('key', [$columnId]), - Query::limit(1), - ]) - ); - - if (empty($cursorDocument) || $cursorDocument[0]->isEmpty()) { - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Column '{$columnId}' for the 'cursor' value not found."); - } - - $cursor->setValue($cursorDocument[0]); - } - - $filters = Query::groupByType($queries)['filters']; - - try { - $columns = $dbForProject->find('attributes', $queries); - $total = $dbForProject->count('attributes', $filters, APP_LIMIT_COUNT); - } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); - } - - $response->dynamic(new Document([ - 'columns' => $columns, - 'total' => $total, - ]), UtopiaResponse::MODEL_COLUMN_LIST); + ->callback(function (string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject) { + parent::action($databaseId, $tableId, $queries, $response, $dbForProject); + }); } } From cb64484c440a91ad6f8b50c3d96eeb568c5ba9c4 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 11:59:55 +0530 Subject: [PATCH 063/362] update: abstraction over document and row apis. --- .../Databases/Http/Attributes/Action.php | 2 - .../Databases/Http/Documents/Action.php | 138 ++++++++ .../Databases/Http/Documents/Create.php | 318 ++++++++++++++++++ .../Databases/Http/Documents/Delete.php | 174 ++++++++++ .../Modules/Databases/Http/Documents/Get.php | 157 +++++++++ .../Databases/Http/Documents/Logs/XList.php | 164 +++++++++ .../Databases/Http/Documents/Update.php | 305 +++++++++++++++++ .../Databases/Http/Documents/XList.php | 231 +++++++++++++ .../Modules/Databases/Http/Rows/Create.php | 261 +------------- .../Modules/Databases/Http/Rows/Delete.php | 124 ++----- .../Modules/Databases/Http/Rows/Get.php | 114 +------ .../Databases/Http/Rows/Logs/XList.php | 110 +----- .../Modules/Databases/Http/Rows/Update.php | 252 +------------- .../Modules/Databases/Http/Rows/XList.php | 184 +--------- .../Databases/Http/Tables/Logs/XList.php | 5 - 15 files changed, 1575 insertions(+), 964 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Documents/Action.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Documents/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Documents/Delete.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Documents/Get.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Documents/Logs/XList.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Documents/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Documents/XList.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php index 6d729b8cf3..3cad730b6d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php @@ -50,8 +50,6 @@ abstract class Action extends UtopiaAction /** * Get the current context. - * - * @throws \LogicException If context has not been set. */ final protected function getContext(): string { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Documents/Action.php new file mode 100644 index 0000000000..d12a9bb8a7 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Documents/Action.php @@ -0,0 +1,138 @@ +context = $context; + } + + /** + * Get the current context. + */ + final protected function getContext(): string + { + return $this->context; + } + + /** + * Returns true if current context is Collections API. + */ + final protected function isCollectionsAPI(): bool + { + // rows in tables api context + // documents in collections api context + return $this->getContext() === DATABASE_DOCUMENTS_CONTEXT; + } + + /** + * Get the SDK group name for the current action. + * + * Can be used for XList operations as well! + */ + final protected function getSdkGroup(): string + { + return $this->isCollectionsAPI() ? 'documents' : 'rows'; + } + + /** + * Get the correct parent param key (e.g. `tableId` or `collectionId`) + */ + final protected function getParentEventsParamKey(): string + { + return $this->isCollectionsAPI() ? 'collectionId' : 'tableId'; + } + + /** + * Get the correct param key (e.g. `documentId` or `rowId`) + */ + final protected function getEventsParamKey(): string + { + return $this->getContext() . 'Id'; + } + + /** + * Get the appropriate parent level not found exception. + */ + final protected function getParentNotFoundException(): string + { + return $this->isCollectionsAPI() + ? Exception::COLLECTION_NOT_FOUND + : Exception::TABLE_NOT_FOUND; + } + + /** + * Get the appropriate not found exception. + */ + final protected function getNotFoundException(): string + { + return $this->isCollectionsAPI() + ? Exception::DOCUMENT_NOT_FOUND + : Exception::ROW_NOT_FOUND; + } + + /** + * Get the appropriate already exists exception. + */ + final protected function getDuplicateException(): string + { + return $this->isCollectionsAPI() + ? Exception::DOCUMENT_ALREADY_EXISTS + : Exception::ROW_ALREADY_EXISTS; + } + + + /** + * Get the correct invalid structure message. + */ + final protected function getInvalidStructureException(): string + { + return $this->isCollectionsAPI() + ? Exception::DOCUMENT_INVALID_STRUCTURE + : Exception::ROW_INVALID_STRUCTURE; + } + + /** + * Get the appropriate missing data exception. + */ + final protected function getMissingDataException(): string + { + return $this->isCollectionsAPI() + ? Exception::DOCUMENT_MISSING_DATA + : Exception::ROW_MISSING_DATA; + } + + /** + * Get the appropriate missing payload exception. + */ + final protected function getMissingPayloadException(): string + { + return $this->isCollectionsAPI() + ? Exception::DOCUMENT_MISSING_PAYLOAD + : Exception::ROW_MISSING_PAYLOAD; + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Documents/Create.php new file mode 100644 index 0000000000..a6e938bc18 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Documents/Create.php @@ -0,0 +1,318 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents') + ->desc('Create document') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].create') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'row.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', [ + new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + ) + ]) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('documentId', '', new CustomId(), 'Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.') + ->param('data', [], new JSON(), 'Document data as JSON object.') + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->inject('response') + ->inject('dbForProject') + ->inject('user') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $documentId, string $collectionId, string|array $data, ?array $permissions, UtopiaResponse $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage): void + { + $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array + + if (empty($data)) { + throw new Exception($this->getMissingDataException()); + } + + if (isset($data['$id'])) { + // `rows` or `documents` in message. + throw new Exception($this->getInvalidStructureException(), '$id is not allowed for creating new ' . $this->getContext() . 's, try update instead'); + } + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception($this->getParentNotFoundException()); + } + + $allowedPermissions = [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + ]; + + // Map aggregate permissions to into the set of individual permissions they represent. + $permissions = Permission::aggregate($permissions, $allowedPermissions); + + // Add permissions for current the user if none were provided. + if (\is_null($permissions)) { + $permissions = []; + if (!empty($user->getId())) { + foreach ($allowedPermissions as $permission) { + $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); + } + } + } + + // Users can only manage their own roles, API keys and Admin users can manage any + if (!$isAPIKey && !$isPrivilegedUser) { + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + if (!Authorization::isRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', Authorization::getRoles()) . ')'); + } + } + } + } + + $data['$collection'] = $collection->getId(); // Adding this param to make API easier for developers + $data['$id'] = $documentId == 'unique()' ? ID::unique() : $documentId; + $data['$permissions'] = $permissions; + $document = new Document($data); + + $operations = 0; + + $checkPermissions = function (Document $collection, Document $document, string $permission) use (&$checkPermissions, $dbForProject, $database, &$operations) { + $operations++; + + $documentSecurity = $collection->getAttribute('documentSecurity', false); + $validator = new Authorization($permission); + + $valid = $validator->isValid($collection->getPermissionsByType($permission)); + if (($permission === Database::PERMISSION_UPDATE && !$documentSecurity) || !$valid) { + throw new Exception(Exception::USER_UNAUTHORIZED); + } + + if ($permission === Database::PERMISSION_UPDATE) { + $valid = $valid || $validator->isValid($document->getUpdate()); + if ($documentSecurity && !$valid) { + throw new Exception(Exception::USER_UNAUTHORIZED); + } + } + + $relationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + + $isList = \is_array($related) && \array_values($related) === $related; + + if ($isList) { + $relations = $related; + } else { + $relations = [$related]; + } + + $relatedTableId = $relationship->getAttribute('relatedCollection'); + $relatedTable = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) + ); + + foreach ($relations as &$relation) { + if ( + \is_array($relation) + && \array_values($relation) !== $relation + && !isset($relation['$id']) + ) { + $relation['$id'] = ID::unique(); + $relation = new Document($relation); + } + if ($relation instanceof Document) { + $current = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId(), $relation->getId()) + ); + + if ($current->isEmpty()) { + $type = Database::PERMISSION_CREATE; + + if (isset($relation['$id']) && $relation['$id'] === 'unique()') { + $relation['$id'] = ID::unique(); + } + } else { + $relation->removeAttribute('$collectionId'); + $relation->removeAttribute('$databaseId'); + $relation->setAttribute('$collection', $relatedTable->getId()); + $type = Database::PERMISSION_UPDATE; + } + + $checkPermissions($relatedTable, $relation, $type); + } + } + + if ($isList) { + $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + } else { + $document->setAttribute($relationship->getAttribute('key'), \reset($relations)); + } + } + }; + + $checkPermissions($collection, $document, Database::PERMISSION_CREATE); + + try { + $document = $dbForProject->createDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $document); + } catch (StructureException $e) { + throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + } catch (DuplicateException) { + throw new Exception($this->getDuplicateException()); + } catch (NotFoundException) { + throw new Exception($this->getParentNotFoundException()); + } + + + // Add $collectionId and $databaseId for all documents + $processDocument = function (Document $table, Document $document) use (&$processDocument, $dbForProject, $database) { + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $table->getId()); + + $relationships = \array_filter( + $table->getAttribute('attributes', []), + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + if (!\is_array($related)) { + $related = [$related]; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + ); + + foreach ($related as $relation) { + if ($relation instanceof Document) { + $processDocument($relatedCollection, $relation); + } + } + } + }; + + $processDocument($collection, $document); + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) + ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); // per collection + + $response->addHeader('X-Debug-Operations', $operations); + + $response + ->setStatusCode(SwooleResponse::STATUS_CODE_CREATED) + ->dynamic($document, $this->getResponseModel()); + + $relationships = \array_map( + fn ($row) => $document->getAttribute('key'), + \array_filter( + $collection->getAttribute('attributes', []), + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + ) + ); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setContext('database', $database) + ->setParam($this->getEventsParamKey(), $document->getId()) + ->setPayload($response->getPayload(), sensitive: $relationships) + ->setParam($this->getParentEventsParamKey(), $collection->getId()) + ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Documents/Delete.php new file mode 100644 index 0000000000..93a4fdb57e --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Documents/Delete.php @@ -0,0 +1,174 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') + ->desc('Delete document') + ->groups(['api', 'database']) + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].delete') + ->label('audits.event', 'document.delete') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}/document/{request.documentId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/delete-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('documentId', '', new UID(), 'Document ID.') + ->inject('requestTimestamp') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $collectionId, string $documentId, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception($this->getParentNotFoundException()); + } + + // Read permission should not be required for delete + $document = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); + + if ($document->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + try { + $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $collection, $documentId) { + $dbForProject->deleteDocument( + 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + $documentId + ); + }); + } catch (NotFoundException) { + throw new Exception($this->getParentNotFoundException()); + } + + // Add $collection and $databaseId for all documents + $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database) { + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $collection->getId()); + + $relationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + if (!\is_array($related)) { + $related = [$related]; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + ); + + foreach ($related as $relation) { + if ($relation instanceof Document) { + $processDocument($relatedCollection, $relation); + } + } + } + }; + + $processDocument($collection, $document); + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) + ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), 1); // per collection + + $response->addHeader('X-Debug-Operations', 1); + + $relationships = \array_map( + fn ($document) => $document->getAttribute('key'), + \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ) + ); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setContext('database', $database) + ->setParam($this->getParentEventsParamKey(), $collection->getId()) + ->setParam($this->getEventsParamKey(), $document->getId()) + ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection) + ->setPayload($response->output($document, $this->getResponseModel()), sensitive: $relationships); + + $response->noContent(); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Documents/Get.php new file mode 100644 index 0000000000..ddc08f4783 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Documents/Get.php @@ -0,0 +1,157 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') + ->desc('Get document') + ->groups(['api', 'database']) + ->label('scope', 'documents.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/get-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('documentId', '', new UID(), 'Document ID.') + ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForStatsUsage') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $collectionId, string $documentId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception($this->getParentNotFoundException()); + } + + try { + $queries = Query::parseQueries($queries); + $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId, $queries); + } catch (AuthorizationException) { + throw new Exception(Exception::USER_UNAUTHORIZED); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + if ($document->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + $operations = 0; + + // Add $collectionId and $databaseId for all rows + $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database, &$operations) { + if ($document->isEmpty()) { + return; + } + + $operations++; + + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $collection->getId()); + + $relationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + if (\in_array(\gettype($related), ['array', 'object'])) { + $operations++; + } + + continue; + } + + if (!\is_array($related)) { + $related = [$related]; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + ); + + foreach ($related as $relation) { + if ($relation instanceof Document) { + $processDocument($relatedCollection, $relation); + } + } + } + }; + + $processDocument($collection, $document); + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) + ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); + + $response->addHeader('X-Debug-Operations', $operations); + + $response->dynamic($document, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Documents/Logs/XList.php new file mode 100644 index 0000000000..991c43ca1c --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Documents/Logs/XList.php @@ -0,0 +1,164 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId/logs') + ->desc('List document logs') + ->groups(['api', 'database']) + ->label('scope', 'documents.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: 'logs', + name: self::getName(), + description: '/docs/references/databases/get-document-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON, + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('documentId', '', new UID(), 'Document ID.') + ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) + ->inject('response') + ->inject('dbForProject') + ->inject('locale') + ->inject('geodb') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $collectionId, string $documentId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + + if ($collection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId); + + if ($document->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + // Temp fix for logs + $queries[] = Query::or([ + Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))), + Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))), + ]); + + $audit = new Audit($dbForProject); + // getContext() => `document` or `row`. + $resource = 'database/' . $databaseId . '/collection/' . $collectionId . '/' .$this->getContext(). '/' . $document->getId(); + $logs = $audit->getLogsByResource($resource, $queries); + + $output = []; + + foreach ($logs as $i => &$log) { + $log['userAgent'] = (!empty($log['userAgent'])) ? $log['userAgent'] : 'UNKNOWN'; + + $detector = new Detector($log['userAgent']); + $detector->skipBotDetection(); // OPTIONAL: If called, bot detection will completely be skipped (bots will be detected as regular devices then) + + $os = $detector->getOS(); + $client = $detector->getClient(); + $device = $detector->getDevice(); + + $output[$i] = new Document([ + 'event' => $log['event'], + 'userId' => $log['data']['userId'], + 'userEmail' => $log['data']['userEmail'] ?? null, + 'userName' => $log['data']['userName'] ?? null, + 'mode' => $log['data']['mode'] ?? null, + 'ip' => $log['ip'], + 'time' => $log['time'], + 'osCode' => $os['osCode'], + 'osName' => $os['osName'], + 'osVersion' => $os['osVersion'], + 'clientType' => $client['clientType'], + 'clientCode' => $client['clientCode'], + 'clientName' => $client['clientName'], + 'clientVersion' => $client['clientVersion'], + 'clientEngine' => $client['clientEngine'], + 'clientEngineVersion' => $client['clientEngineVersion'], + 'deviceName' => $device['deviceName'], + 'deviceBrand' => $device['deviceBrand'], + 'deviceModel' => $device['deviceModel'] + ]); + + $record = $geodb->get($log['ip']); + + if ($record) { + $output[$i]['countryCode'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), false) ? \strtolower($record['country']['iso_code']) : '--'; + $output[$i]['countryName'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), $locale->getText('locale.country.unknown')); + } else { + $output[$i]['countryCode'] = '--'; + $output[$i]['countryName'] = $locale->getText('locale.country.unknown'); + } + } + + $response->dynamic(new Document([ + 'logs' => $output, + 'total' => $audit->countLogsByResource($resource, $queries), + ]), $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Documents/Update.php new file mode 100644 index 0000000000..e55b9bda39 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Documents/Update.php @@ -0,0 +1,305 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->desc('Update document') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].update') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'document.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}/document/{response.$id}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('documentId', '', new UID(), 'Document ID.') + ->param('data', [], new JSON(), 'Document data as JSON object. Include only attribute and value pairs to be updated.', true) + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->inject('requestTimestamp') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $collectionId, string $documentId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void + { + + $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array + + if (empty($data) && \is_null($permissions)) { + throw new Exception($this->getMissingPayloadException()); + } + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception($this->getParentNotFoundException()); + } + + // Read permission should not be required for update + /** @var Document $document */ + $document = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); + + if ($document->isEmpty()) { + throw new Exception($this->getNotFoundException()); + } + + // Map aggregate permissions into the multiple permissions they represent. + $permissions = Permission::aggregate($permissions, [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + ]); + + // Users can only manage their own roles, API keys and Admin users can manage any + $roles = Authorization::getRoles(); + if (!$isAPIKey && !$isPrivilegedUser && !\is_null($permissions)) { + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + if (!Authorization::isRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $roles) . ')'); + } + } + } + } + + if (\is_null($permissions)) { + $permissions = $document->getPermissions() ?? []; + } + + $data['$id'] = $documentId; + $data['$permissions'] = $permissions; + $newDocument = new Document($data); + + $operations = 0; + + $setCollection = (function (Document $collection, Document $document) use (&$setCollection, $dbForProject, $database, &$operations) { + + $operations++; + + $relationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + + $isList = \is_array($related) && \array_values($related) === $related; + + if ($isList) { + $relations = $related; + } else { + $relations = [$related]; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + ); + + foreach ($relations as &$relation) { + // If the relation is an array it can be either update or create a child document. + if ( + \is_array($relation) + && \array_values($relation) !== $relation + && !isset($relation['$id']) + ) { + $relation['$id'] = ID::unique(); + $relation = new Document($relation); + } + if ($relation instanceof Document) { + $oldDocument = Authorization::skip(fn () => $dbForProject->getDocument( + 'database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId(), + $relation->getId() + )); + $relation->removeAttribute('$collectionId'); + $relation->removeAttribute('$databaseId'); + // Attribute $collection is required for Utopia. + $relation->setAttribute( + '$collection', + 'database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId() + ); + + if ($oldDocument->isEmpty()) { + if (isset($relation['$id']) && $relation['$id'] === 'unique()') { + $relation['$id'] = ID::unique(); + } + } + $setCollection($relatedCollection, $relation); + } + } + + if ($isList) { + $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + } else { + $document->setAttribute($relationship->getAttribute('key'), \reset($relations)); + } + } + }); + + $setCollection($collection, $newDocument); + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) + ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); + + $response->addHeader('X-Debug-Operations', $operations); + + try { + $document = $dbForProject->withRequestTimestamp( + $requestTimestamp, + fn () => $dbForProject->updateDocument( + 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + $document->getId(), + $newDocument + ) + ); + } catch (AuthorizationException) { + throw new Exception(Exception::USER_UNAUTHORIZED); + } catch (DuplicateException) { + throw new Exception($this->getDuplicateException()); + } catch (StructureException $e) { + throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + } catch (NotFoundException) { + throw new Exception($this->getParentNotFoundException()); + } + + // Add $collectionId and $databaseId for all documents + $processDocument = function (Document $table, Document $row) use (&$processDocument, $dbForProject, $database) { + $row->setAttribute('$databaseId', $database->getId()); + $row->setAttribute('$collectionId', $table->getId()); + + $relationships = \array_filter( + $table->getAttribute('attributes', []), + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $row->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + if (!\is_array($related)) { + $related = [$related]; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + ); + + foreach ($related as $relation) { + if ($relation instanceof Document) { + $processDocument($relatedCollection, $relation); + } + } + } + }; + + $processDocument($collection, $document); + + $response->dynamic($document, $this->getResponseModel()); + + $relationships = \array_map( + fn ($row) => $document->getAttribute('key'), + \array_filter( + $collection->getAttribute('attributes', []), + fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + ) + ); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setContext('database', $database) + ->setParam($this->getEventsParamKey(), $document->getId()) + ->setParam($this->getParentEventsParamKey(), $collection->getId()) + ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection) + ->setPayload($response->getPayload(), sensitive: $relationships); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Documents/XList.php new file mode 100644 index 0000000000..48779ae71d --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Documents/XList.php @@ -0,0 +1,231 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents') + ->desc('List documents') + ->groups(['api', 'database']) + ->label('scope', 'documents.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/list-documents.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForStatsUsage') + ->callback([$this, 'action']); + } + + public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception($this->getParentNotFoundException()); + } + + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + /** + * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries + */ + $cursor = \array_filter($queries, function ($query) { + return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); + }); + + $cursor = \reset($cursor); + + if ($cursor) { + $validator = new Cursor(); + if (!$validator->isValid($cursor)) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); + } + + $documentId = $cursor->getValue(); + + $cursorDocument = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); + + if ($cursorDocument->isEmpty()) { + $type = ucfirst($this->getContext()); + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "$type '{$documentId}' for the 'cursor' value not found."); + } + + $cursor->setValue($cursorDocument); + } + try { + $documents = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries); + $total = $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries, APP_LIMIT_COUNT); + } catch (OrderException $e) { + $documents = $this->isCollectionsAPI() ? 'documents' : 'rows'; + $attribute = $this->isCollectionsAPI() ? 'attribute' : 'column'; + $message = "The order $attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all $documents order $attribute values are non-null."; + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, $message); + } + + $operations = 0; + + // Add $collectionId and $databaseId for all documents + $processDocument = (function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database, &$operations): bool { + if ($document->isEmpty()) { + return false; + } + + $operations++; + + $document->removeAttribute('$collection'); + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $collection->getId()); + + $relationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + if (\in_array(\gettype($related), ['array', 'object'])) { + $operations++; + } + + continue; + } + + if (!\is_array($related)) { + $relations = [$related]; + } else { + $relations = $related; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + // todo: Use local cache for this getDocument + $relatedCollection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId)); + + foreach ($relations as $index => $doc) { + if ($doc instanceof Document) { + if (!$processDocument($relatedCollection, $doc)) { + unset($relations[$index]); + } + } + } + + if (\is_array($related)) { + $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + } elseif (empty($relations)) { + $document->setAttribute($relationship->getAttribute('key'), null); + } + } + + return true; + }); + + foreach ($documents as $row) { + $processDocument($collection, $row); + } + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) + ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); + + $response->addHeader('X-Debug-Operations', $operations); + + $select = \array_reduce($queries, function ($result, $query) { + return $result || ($query->getMethod() === Query::TYPE_SELECT); + }, false); + + // Check if the SELECT query includes $databaseId and $collectionId + $hasDatabaseId = false; + $hasCollectionId = false; + if ($select) { + $hasDatabaseId = \array_reduce($queries, function ($result, $query) { + return $result || ($query->getMethod() === Query::TYPE_SELECT && \in_array('$databaseId', $query->getValues())); + }, false); + $hasCollectionId = \array_reduce($queries, function ($result, $query) { + return $result || ($query->getMethod() === Query::TYPE_SELECT && \in_array('$collectionId', $query->getValues())); + }, false); + } + + if ($select) { + foreach ($documents as $row) { + if (!$hasDatabaseId) { + $row->removeAttribute('$databaseId'); + } + if (!$hasCollectionId) { + $row->removeAttribute('$collectionId'); + } + } + } + + $response->dynamic(new Document([ + 'total' => $total, + // rows or documents + $this->getSdkGroup() => $documents, + ]), $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php index 87078a5d3d..fa0fca4101 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Create.php @@ -2,10 +2,9 @@ namespace Appwrite\Platform\Modules\Databases\Http\Rows; -use Appwrite\Auth\Auth; use Appwrite\Event\Event; use Appwrite\Event\StatsUsage; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Documents\Create as DocumentCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; @@ -14,21 +13,13 @@ use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; -use Utopia\Database\Exception\Duplicate as DuplicateException; -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\Helpers\Role; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\JSON; -class Create extends Action +class Create extends DocumentCreate { use HTTP; @@ -37,12 +28,18 @@ class Create extends Action return 'createRow'; } + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_ROW; + } + public function __construct() { + $this->setContext(DATABASE_ROWS_CONTEXT); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/documents') ->desc('Create row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].create') @@ -56,14 +53,14 @@ class Create extends Action ->label('sdk', [ new Method( namespace: 'databases', - group: 'rows', - name: 'createRow', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-document.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_CREATED, - model: UtopiaResponse::MODEL_ROW, + model: self::getResponseModel(), ) ], contentType: ContentType::JSON @@ -79,236 +76,8 @@ class Create extends Action ->inject('user') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $rowId, string $tableId, string|array $data, ?array $permissions, UtopiaResponse $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage): void - { - $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array - - if (empty($data)) { - throw new Exception(Exception::ROW_MISSING_DATA); - } - - if (isset($data['$id'])) { - throw new Exception(Exception::ROW_INVALID_STRUCTURE, '$id is not allowed for creating new rows, try update instead'); - } - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - $isAPIKey = Auth::isAppUser(Authorization::getRoles()); - $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); - - if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - - if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - $allowedPermissions = [ - Database::PERMISSION_READ, - Database::PERMISSION_UPDATE, - Database::PERMISSION_DELETE, - ]; - - // Map aggregate permissions to into the set of individual permissions they represent. - $permissions = Permission::aggregate($permissions, $allowedPermissions); - - // Add permissions for current the user if none were provided. - if (\is_null($permissions)) { - $permissions = []; - if (!empty($user->getId())) { - foreach ($allowedPermissions as $permission) { - $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); - } - } - } - - // Users can only manage their own roles, API keys and Admin users can manage any - if (!$isAPIKey && !$isPrivilegedUser) { - foreach (Database::PERMISSIONS as $type) { - foreach ($permissions as $permission) { - $permission = Permission::parse($permission); - if ($permission->getPermission() != $type) { - continue; - } - $role = (new Role( - $permission->getRole(), - $permission->getIdentifier(), - $permission->getDimension() - ))->toString(); - if (!Authorization::isRole($role)) { - throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', Authorization::getRoles()) . ')'); - } - } - } - } - - $data['$collection'] = $table->getId(); // Adding this param to make API easier for developers - $data['$id'] = $rowId == 'unique()' ? ID::unique() : $rowId; - $data['$permissions'] = $permissions; - $row = new Document($data); - - $operations = 0; - - $checkPermissions = function (Document $table, Document $row, string $permission) use (&$checkPermissions, $dbForProject, $database, &$operations) { - $operations++; - - $documentSecurity = $table->getAttribute('documentSecurity', false); - $validator = new Authorization($permission); - - $valid = $validator->isValid($table->getPermissionsByType($permission)); - if (($permission === Database::PERMISSION_UPDATE && !$documentSecurity) || !$valid) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } - - if ($permission === Database::PERMISSION_UPDATE) { - $valid = $valid || $validator->isValid($row->getUpdate()); - if ($documentSecurity && !$valid) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } - } - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - - $isList = \is_array($related) && \array_values($related) === $related; - - if ($isList) { - $relations = $related; - } else { - $relations = [$related]; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) - ); - - foreach ($relations as &$relation) { - if ( - \is_array($relation) - && \array_values($relation) !== $relation - && !isset($relation['$id']) - ) { - $relation['$id'] = ID::unique(); - $relation = new Document($relation); - } - if ($relation instanceof Document) { - $current = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId(), $relation->getId()) - ); - - if ($current->isEmpty()) { - $type = Database::PERMISSION_CREATE; - - if (isset($relation['$id']) && $relation['$id'] === 'unique()') { - $relation['$id'] = ID::unique(); - } - } else { - $relation->removeAttribute('$collectionId'); - $relation->removeAttribute('$databaseId'); - $relation->setAttribute('$collection', $relatedTable->getId()); - $type = Database::PERMISSION_UPDATE; - } - - $checkPermissions($relatedTable, $relation, $type); - } - } - - if ($isList) { - $row->setAttribute($relationship->getAttribute('key'), \array_values($relations)); - } else { - $row->setAttribute($relationship->getAttribute('key'), \reset($relations)); - } - } - }; - - $checkPermissions($table, $row, Database::PERMISSION_CREATE); - - try { - $row = $dbForProject->createDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $row); - } catch (StructureException $e) { - throw new Exception(Exception::ROW_INVALID_STRUCTURE, $e->getMessage()); - } catch (DuplicateException) { - throw new Exception(Exception::ROW_ALREADY_EXISTS); - } catch (NotFoundException) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - - // Add $tableId and $databaseId for all rows - $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database) { - $row->setAttribute('$databaseId', $database->getId()); - $row->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processRow($relatedTable, $relation); - } - } - } - }; - - $processRow($table, $row); - - $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); // per collection - - $response->addHeader('X-Debug-Operations', $operations); - - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_CREATED) - ->dynamic($row, UtopiaResponse::MODEL_ROW); - - $relationships = \array_map( - fn ($row) => $row->getAttribute('key'), - \array_filter( - $table->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP - ) - ); - - $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('rowId', $row->getId()) - ->setContext('table', $table) - ->setContext('database', $database) - ->setPayload($response->getPayload(), sensitive: $relationships); + ->callback(function (string $databaseId, string $rowId, string $tableId, string|array $data, ?array $permissions, UtopiaResponse $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage) { + parent::action($databaseId, $rowId, $tableId, $databaseId, $permissions, $response, $dbForProject, $user, $queueForEvents, $queueForStatsUsage); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php index 61cd4d218a..476e4b83f2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Delete.php @@ -2,25 +2,20 @@ namespace Appwrite\Platform\Modules\Databases\Http\Rows; -use Appwrite\Auth\Auth; use Appwrite\Event\Event; use Appwrite\Event\StatsUsage; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Documents\Delete as DocumentDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; -use Utopia\Database\Exception\NotFound as NotFoundException; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; -class Delete extends Action +class Delete extends DocumentDelete { use HTTP; @@ -29,12 +24,24 @@ class Delete extends Action return 'deleteRow'; } + /** + * Same explanation as the parent action. + * + * 1. `SDKResponse` uses `UtopiaResponse::MODEL_NONE`. + * 2. But we later need the actual return type for events queue below! + */ + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_ROW; + } + public function __construct() { + $this->setContext(DATABASE_ROWS_CONTEXT); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId') ->desc('Delete row') ->groups(['api', 'database']) ->label('scope', 'documents.write') @@ -47,8 +54,8 @@ class Delete extends Action ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) ->label('sdk', new Method( namespace: 'databases', - group: 'rows', - name: 'deleteRow', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/delete-document.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ @@ -67,101 +74,8 @@ class Delete extends Action ->inject('dbForProject') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, string $rowId, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void - { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - $isAPIKey = Auth::isAppUser(Authorization::getRoles()); - $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); - - if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - - if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - // Read permission should not be required for delete - $row = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); - - if ($row->isEmpty()) { - throw new Exception(Exception::ROW_NOT_FOUND); - } - - try { - $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $table, $rowId) { - $dbForProject->deleteDocument( - 'database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), - $rowId - ); + ->callback(function (string $databaseId, string $tableId, string $rowId, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage) { + parent::action($databaseId, $tableId, $rowId, $requestTimestamp, $response, $dbForProject, $queueForEvents, $queueForStatsUsage); }); - } catch (NotFoundException) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - // Add $tableId and $databaseId for all rows - $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database) { - $row->setAttribute('$databaseId', $database->getId()); - $row->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processRow($relatedTable, $relation); - } - } - } - }; - - $processRow($table, $row); - - $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), 1); // per collection - - $response->addHeader('X-Debug-Operations', 1); - - $relationships = \array_map( - fn ($row) => $row->getAttribute('key'), - \array_filter( - $table->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP - ) - ); - - $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('rowId', $row->getId()) - ->setContext('table', $table) - ->setContext('database', $database) - ->setPayload($response->output($row, UtopiaResponse::MODEL_ROW), sensitive: $relationships); - - $response->noContent(); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php index fb600f5a7f..8eb07ef94e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php @@ -2,28 +2,21 @@ namespace Appwrite\Platform\Modules\Databases\Http\Rows; -use Appwrite\Auth\Auth; use Appwrite\Event\StatsUsage; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Documents\Get as DocumentGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; -use Utopia\Database\Exception\Authorization as AuthorizationException; -use Utopia\Database\Exception\Query as QueryException; -use Utopia\Database\Query; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Text; -class Get extends Action +class Get extends DocumentGet { use HTTP; @@ -32,8 +25,15 @@ class Get extends Action return 'getRow'; } + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_ROW; + } + public function __construct() { + $this->setContext(DATABASE_ROWS_CONTEXT); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') @@ -44,14 +44,14 @@ class Get extends Action ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'rows', - name: 'getRow', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/get-document.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ROW, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -63,92 +63,8 @@ class Get extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, string $rowId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage): void - { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - $isAPIKey = Auth::isAppUser(Authorization::getRoles()); - $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); - - if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - - if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - try { - $queries = Query::parseQueries($queries); - $row = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId, $queries); - } catch (AuthorizationException) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } - - if ($row->isEmpty()) { - throw new Exception(Exception::ROW_NOT_FOUND); - } - - $operations = 0; - - // Add $tableId and $databaseId for all rows - $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database, &$operations) { - if ($row->isEmpty()) { - return; - } - - $operations++; - - $row->setAttribute('$databaseId', $database->getId()); - $row->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - if (\in_array(\gettype($related), ['array', 'object'])) { - $operations++; - } - - continue; - } - - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processRow($relatedTable, $relation); - } - } - } - }; - - $processRow($table, $row); - - $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); - - $response->addHeader('X-Debug-Operations', $operations); - - $response->dynamic($row, UtopiaResponse::MODEL_ROW); + ->callback(function (string $databaseId, string $tableId, string $rowId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage) { + parent::action($databaseId, $tableId, $rowId, $queries, $response, $dbForProject, $queueForStatsUsage); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php index 238815d849..ebf5bcca1b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Logs/XList.php @@ -2,31 +2,23 @@ namespace Appwrite\Platform\Modules\Databases\Http\Rows\Logs; -use Appwrite\Detector\Detector; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Documents\Logs\XList as DocumentLogXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use MaxMind\Db\Reader; -use Utopia\Audit\Audit; use Utopia\Database\Database; -use Utopia\Database\DateTime; -use Utopia\Database\Document; -use Utopia\Database\Exception\Query as QueryException; -use Utopia\Database\Query; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Queries; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; use Utopia\Locale\Locale; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; -class XList extends Action +class XList extends DocumentLogXList { use HTTP; @@ -37,10 +29,11 @@ class XList extends Action public function __construct() { + $this->setContext(DATABASE_ROWS_CONTEXT); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/logs') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId/logs') ->desc('List row logs') ->groups(['api', 'database']) ->label('scope', 'documents.read') @@ -48,13 +41,13 @@ class XList extends Action ->label('sdk', new Method( namespace: 'databases', group: 'logs', - name: 'listRowLogs', + name: self::getName(), description: '/docs/references/databases/get-document-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_LOG_LIST, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON, @@ -67,93 +60,8 @@ class XList extends Action ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, string $rowId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void - { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - if ($database->isEmpty()) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - $row = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId); - - if ($row->isEmpty()) { - throw new Exception(Exception::ROW_NOT_FOUND); - } - - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } - - // Temp fix for logs - $queries[] = Query::or([ - Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))), - Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))), - ]); - - $audit = new Audit($dbForProject); - $resource = 'database/' . $databaseId . '/table/' . $tableId . '/row/' . $row->getId(); - $logs = $audit->getLogsByResource($resource, $queries); - - $output = []; - - foreach ($logs as $i => &$log) { - $log['userAgent'] = (!empty($log['userAgent'])) ? $log['userAgent'] : 'UNKNOWN'; - - $detector = new Detector($log['userAgent']); - $detector->skipBotDetection(); // OPTIONAL: If called, bot detection will completely be skipped (bots will be detected as regular devices then) - - $os = $detector->getOS(); - $client = $detector->getClient(); - $device = $detector->getDevice(); - - $output[$i] = new Document([ - 'event' => $log['event'], - 'userId' => $log['data']['userId'], - 'userEmail' => $log['data']['userEmail'] ?? null, - 'userName' => $log['data']['userName'] ?? null, - 'mode' => $log['data']['mode'] ?? null, - 'ip' => $log['ip'], - 'time' => $log['time'], - 'osCode' => $os['osCode'], - 'osName' => $os['osName'], - 'osVersion' => $os['osVersion'], - 'clientType' => $client['clientType'], - 'clientCode' => $client['clientCode'], - 'clientName' => $client['clientName'], - 'clientVersion' => $client['clientVersion'], - 'clientEngine' => $client['clientEngine'], - 'clientEngineVersion' => $client['clientEngineVersion'], - 'deviceName' => $device['deviceName'], - 'deviceBrand' => $device['deviceBrand'], - 'deviceModel' => $device['deviceModel'] - ]); - - $record = $geodb->get($log['ip']); - - if ($record) { - $output[$i]['countryCode'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), false) ? \strtolower($record['country']['iso_code']) : '--'; - $output[$i]['countryName'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), $locale->getText('locale.country.unknown')); - } else { - $output[$i]['countryCode'] = '--'; - $output[$i]['countryName'] = $locale->getText('locale.country.unknown'); - } - } - - $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource, $queries), - 'logs' => $output, - ]), UtopiaResponse::MODEL_LOG_LIST); + ->callback(function (string $databaseId, string $tableId, string $rowId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb) { + parent::action($databaseId, $tableId, $rowId, $queries, $response, $dbForProject, $locale, $geodb); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php index 5590aa6c67..d29a8dcd12 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php @@ -2,33 +2,22 @@ namespace Appwrite\Platform\Modules\Databases\Http\Rows; -use Appwrite\Auth\Auth; use Appwrite\Event\Event; use Appwrite\Event\StatsUsage; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Documents\Update as DocumentUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; -use Utopia\Database\Exception\Authorization as AuthorizationException; -use Utopia\Database\Exception\Duplicate as DuplicateException; -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\Helpers\Role; -use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\JSON; -class Update extends Action +class Update extends DocumentUpdate { use HTTP; @@ -37,8 +26,15 @@ class Update extends Action return 'updateRow'; } + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_ROW; + } + public function __construct() { + $this->setContext(DATABASE_ROWS_CONTEXT); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') @@ -55,14 +51,14 @@ class Update extends Action ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) ->label('sdk', new Method( namespace: 'databases', - group: 'rows', - name: 'updateRow', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/update-document.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ROW, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -77,226 +73,8 @@ class Update extends Action ->inject('dbForProject') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, string $rowId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void - { - - $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array - - if (empty($data) && \is_null($permissions)) { - throw new Exception(Exception::ROW_MISSING_PAYLOAD); - } - - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - $isAPIKey = Auth::isAppUser(Authorization::getRoles()); - $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); - - if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - - if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - // Read permission should not be required for update - /** @var Document $row */ - $row = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); - - if ($row->isEmpty()) { - throw new Exception(Exception::ROW_NOT_FOUND); - } - - // Map aggregate permissions into the multiple permissions they represent. - $permissions = Permission::aggregate($permissions, [ - Database::PERMISSION_READ, - Database::PERMISSION_UPDATE, - Database::PERMISSION_DELETE, - ]); - - // Users can only manage their own roles, API keys and Admin users can manage any - $roles = Authorization::getRoles(); - if (!$isAPIKey && !$isPrivilegedUser && !\is_null($permissions)) { - foreach (Database::PERMISSIONS as $type) { - foreach ($permissions as $permission) { - $permission = Permission::parse($permission); - if ($permission->getPermission() != $type) { - continue; - } - $role = (new Role( - $permission->getRole(), - $permission->getIdentifier(), - $permission->getDimension() - ))->toString(); - if (!Authorization::isRole($role)) { - throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $roles) . ')'); - } - } - } - } - - if (\is_null($permissions)) { - $permissions = $row->getPermissions() ?? []; - } - - $data['$id'] = $rowId; - $data['$permissions'] = $permissions; - $newRow = new Document($data); - - $operations = 0; - - $setTable = (function (Document $table, Document $row) use (&$setTable, $dbForProject, $database, &$operations) { - - $operations++; - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - - $isList = \is_array($related) && \array_values($related) === $related; - - if ($isList) { - $relations = $related; - } else { - $relations = [$related]; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) - ); - - foreach ($relations as &$relation) { - // If the relation is an array it can be either update or create a child document. - if ( - \is_array($relation) - && \array_values($relation) !== $relation - && !isset($relation['$id']) - ) { - $relation['$id'] = ID::unique(); - $relation = new Document($relation); - } - if ($relation instanceof Document) { - $oldRow = Authorization::skip(fn () => $dbForProject->getDocument( - 'database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId(), - $relation->getId() - )); - $relation->removeAttribute('$collectionId'); - $relation->removeAttribute('$databaseId'); - // Attribute $collection is required for Utopia. - $relation->setAttribute( - '$collection', - 'database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId() - ); - - if ($oldRow->isEmpty()) { - if (isset($relation['$id']) && $relation['$id'] === 'unique()') { - $relation['$id'] = ID::unique(); - } - } - $setTable($relatedTable, $relation); - } - } - - if ($isList) { - $row->setAttribute($relationship->getAttribute('key'), \array_values($relations)); - } else { - $row->setAttribute($relationship->getAttribute('key'), \reset($relations)); - } - } - }); - - $setTable($table, $newRow); - - $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); - - $response->addHeader('X-Debug-Operations', $operations); - - try { - $row = $dbForProject->withRequestTimestamp( - $requestTimestamp, - fn () => $dbForProject->updateDocument( - 'database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), - $row->getId(), - $newRow - ) - ); - } catch (AuthorizationException) { - throw new Exception(Exception::USER_UNAUTHORIZED); - } catch (DuplicateException) { - throw new Exception(Exception::ROW_ALREADY_EXISTS); - } catch (StructureException $e) { - throw new Exception(Exception::ROW_INVALID_STRUCTURE, $e->getMessage()); - } catch (NotFoundException) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - // Add $tableId and $databaseId for all rows - $processRow = function (Document $table, Document $row) use (&$processRow, $dbForProject, $database) { - $row->setAttribute('$databaseId', $database->getId()); - $row->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processRow($relatedTable, $relation); - } - } - } - }; - - $processRow($table, $row); - - $response->dynamic($row, UtopiaResponse::MODEL_ROW); - - $relationships = \array_map( - fn ($row) => $row->getAttribute('key'), - \array_filter( - $table->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP - ) - ); - - $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('rowId', $row->getId()) - ->setContext('table', $table) - ->setContext('database', $database) - ->setPayload($response->getPayload(), sensitive: $relationships); + ->callback(function (string $databaseId, string $tableId, string $rowId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage) { + parent::action($databaseId, $tableId, $rowId, $data, $permissions, $requestTimestamp, $response, $dbForProject, $queueForEvents, $queueForStatsUsage); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php index 781c0d7c83..a954312493 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php @@ -2,29 +2,21 @@ namespace Appwrite\Platform\Modules\Databases\Http\Rows; -use Appwrite\Auth\Auth; use Appwrite\Event\StatsUsage; -use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Http\Documents\XList as DocumentXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; -use Utopia\Database\Exception\Order as OrderException; -use Utopia\Database\Exception\Query as QueryException; -use Utopia\Database\Query; -use Utopia\Database\Validator\Authorization; -use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\UID; -use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Text; -class XList extends Action +class XList extends DocumentXList { use HTTP; @@ -33,8 +25,15 @@ class XList extends Action return 'listRows'; } + protected function getResponseModel(): string + { + return UtopiaResponse::MODEL_ROW_LIST; + } + public function __construct() { + $this->setContext(DATABASE_ROWS_CONTEXT); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') @@ -45,14 +44,14 @@ class XList extends Action ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'rows', - name: 'listRows', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/list-documents.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_ROW_LIST, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON @@ -63,161 +62,8 @@ class XList extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); - } - - public function action(string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage): void - { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - $isAPIKey = Auth::isAppUser(Authorization::getRoles()); - $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); - - if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::DATABASE_NOT_FOUND); - } - - $table = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId)); - - if ($table->isEmpty() || (!$table->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { - throw new Exception(Exception::TABLE_NOT_FOUND); - } - - try { - $queries = Query::parseQueries($queries); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } - - /** - * Get cursor document if there was a cursor query, we use array_filter and reset for reference $cursor to $queries - */ - $cursor = \array_filter($queries, function ($query) { - return \in_array($query->getMethod(), [Query::TYPE_CURSOR_AFTER, Query::TYPE_CURSOR_BEFORE]); - }); - - $cursor = \reset($cursor); - - if ($cursor) { - $validator = new Cursor(); - if (!$validator->isValid($cursor)) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); - } - - $rowId = $cursor->getValue(); - - $cursorRow = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $rowId)); - - if ($cursorRow->isEmpty()) { - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "Row '{$rowId}' for the 'cursor' value not found."); - } - - $cursor->setValue($cursorRow); - } - try { - $rows = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $queries); - $total = $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $queries, APP_LIMIT_COUNT); - } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); - } - - $operations = 0; - - // Add $tableId and $databaseId for all rows - $processRow = (function (Document $table, Document $row) use (&$processRow, $dbForProject, $database, &$operations): bool { - if ($row->isEmpty()) { - return false; - } - - $operations++; - - $row->removeAttribute('$collection'); - $row->setAttribute('$databaseId', $database->getId()); - $row->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - if (\in_array(\gettype($related), ['array', 'object'])) { - $operations++; - } - - continue; - } - - if (!\is_array($related)) { - $relations = [$related]; - } else { - $relations = $related; - } - - $relatedTableId = $relationship->getAttribute('relatedCollection'); - // todo: Use local cache for this getDocument - $relatedTable = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId)); - - foreach ($relations as $index => $doc) { - if ($doc instanceof Document) { - if (!$processRow($relatedTable, $doc)) { - unset($relations[$index]); - } - } - } - - if (\is_array($related)) { - $row->setAttribute($relationship->getAttribute('key'), \array_values($relations)); - } elseif (empty($relations)) { - $row->setAttribute($relationship->getAttribute('key'), null); - } - } - - return true; - }); - - foreach ($rows as $row) { - $processRow($table, $row); - } - - $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); - - $response->addHeader('X-Debug-Operations', $operations); - - $select = \array_reduce($queries, function ($result, $query) { - return $result || ($query->getMethod() === Query::TYPE_SELECT); - }, false); - - // Check if the SELECT query includes $databaseId and $collectionId - $hasDatabaseId = false; - $hasTableId = false; - if ($select) { - $hasDatabaseId = \array_reduce($queries, function ($result, $query) { - return $result || ($query->getMethod() === Query::TYPE_SELECT && \in_array('$databaseId', $query->getValues())); - }, false); - $hasTableId = \array_reduce($queries, function ($result, $query) { - return $result || ($query->getMethod() === Query::TYPE_SELECT && \in_array('$collectionId', $query->getValues())); - }, false); - } - - if ($select) { - foreach ($rows as $row) { - if (!$hasDatabaseId) { - $row->removeAttribute('$databaseId'); - } - if (!$hasTableId) { - $row->removeAttribute('$collectionId'); - } - } - } - - $response->dynamic(new Document([ - 'total' => $total, - 'rows' => $rows, - ]), UtopiaResponse::MODEL_ROW_LIST); + ->callback(function (string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage) { + parent::action($databaseId, $tableId, $queries, $response, $dbForProject, $queueForStatsUsage); + }); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php index 9b86dcff8f..90983dc84b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Tables/Logs/XList.php @@ -27,11 +27,6 @@ class XList extends CollectionLogXList return 'listTableLogs'; } - protected function getResponseModel(): string - { - return UtopiaResponse::MODEL_LOG_LIST; - } - public function __construct() { $this->setContext(DATABASE_TABLES_CONTEXT); From 96b89693fc2a569f72ffd2b9adaddca2f3f35480 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 12:47:21 +0530 Subject: [PATCH 064/362] update: use `abstract` for `getResponseModel`. --- .../Databases/Http/Attributes/Action.php | 24 ++----------------- .../Http/Attributes/Boolean/Create.php | 22 ++++++----------- .../Http/Attributes/Boolean/Update.php | 20 ++++++---------- .../Http/Attributes/Datetime/Create.php | 21 ++++++---------- .../Http/Attributes/Datetime/Update.php | 20 ++++++---------- .../Databases/Http/Attributes/Delete.php | 22 +++++++---------- .../Http/Attributes/Email/Create.php | 21 ++++++---------- .../Http/Attributes/Email/Update.php | 20 ++++++---------- .../Databases/Http/Attributes/Enum/Create.php | 22 ++++++----------- .../Databases/Http/Attributes/Enum/Update.php | 21 ++++++---------- .../Http/Attributes/Float/Create.php | 23 ++++++------------ .../Http/Attributes/Float/Update.php | 22 ++++++----------- .../Modules/Databases/Http/Attributes/Get.php | 22 ++++++++--------- .../Databases/Http/Attributes/IP/Create.php | 21 ++++++---------- .../Databases/Http/Attributes/IP/Update.php | 20 ++++++---------- .../Http/Attributes/Integer/Create.php | 23 ++++++------------ .../Http/Attributes/Integer/Update.php | 22 ++++++----------- .../Http/Attributes/Relationship/Create.php | 23 ++++++------------ .../Http/Attributes/Relationship/Update.php | 7 ++++-- .../Http/Attributes/String/Create.php | 7 ++++-- .../Http/Attributes/String/Update.php | 7 ++++-- .../Databases/Http/Attributes/URL/Create.php | 7 ++++-- .../Databases/Http/Attributes/URL/Update.php | 7 ++++-- .../Databases/Http/Attributes/XList.php | 17 +++++++------ .../Databases/Http/Collections/Action.php | 10 ++++---- .../Databases/Http/Columns/Boolean/Create.php | 6 ++++- .../Databases/Http/Columns/Boolean/Update.php | 6 ++++- .../Http/Columns/Datetime/Create.php | 6 ++++- .../Http/Columns/Datetime/Update.php | 6 ++++- .../Modules/Databases/Http/Columns/Delete.php | 9 ++++--- .../Databases/Http/Columns/Email/Create.php | 6 ++++- .../Databases/Http/Columns/Email/Update.php | 6 ++++- .../Databases/Http/Columns/Enum/Create.php | 6 ++++- .../Databases/Http/Columns/Enum/Update.php | 6 ++++- .../Databases/Http/Columns/Float/Create.php | 6 ++++- .../Databases/Http/Columns/Float/Update.php | 6 ++++- .../Modules/Databases/Http/Columns/Get.php | 13 ++++++---- .../Databases/Http/Columns/IP/Create.php | 6 ++++- .../Databases/Http/Columns/IP/Update.php | 6 ++++- .../Databases/Http/Columns/Integer/Create.php | 6 ++++- .../Databases/Http/Columns/Integer/Update.php | 6 ++++- .../Http/Columns/Relationship/Create.php | 6 ++++- .../Http/Columns/Relationship/Update.php | 7 ++++-- .../Databases/Http/Columns/String/Create.php | 6 ++++- .../Databases/Http/Columns/String/Update.php | 6 ++++- .../Databases/Http/Columns/URL/Create.php | 6 ++++- .../Databases/Http/Columns/URL/Update.php | 7 ++++-- .../Modules/Databases/Http/Columns/XList.php | 6 ++++- .../Modules/Databases/Http/Indexes/Create.php | 2 +- .../Modules/Databases/Http/Indexes/Delete.php | 2 +- .../Modules/Databases/Http/Indexes/Get.php | 1 - .../Modules/Databases/Http/Indexes/XList.php | 1 - .../Modules/Databases/Http/Rows/Get.php | 1 - .../Modules/Databases/Http/Rows/Update.php | 1 - .../Modules/Databases/Http/Rows/XList.php | 1 - 55 files changed, 287 insertions(+), 323 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php index 3cad730b6d..0ac013fc4f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Action.php @@ -30,9 +30,9 @@ abstract class Action extends UtopiaAction private ?string $context = DATABASE_ATTRIBUTES_CONTEXT; /** - * @var string|array|null The current response model for the attribute/column type. + * Get the correct response model. */ - private string|array|null $responseModel = null; + abstract protected function getResponseModel(): string|array; /** * Set the context to either `column` or `attribute`. @@ -92,26 +92,6 @@ abstract class Action extends UtopiaAction return $this->getContext() . 'Id'; } - /** - * Set the correct response model. - */ - final protected function setResponseModel(string|array $model): void - { - $this->responseModel = $model; - } - - /** - * Get the correct response model. - */ - final protected function getResponseModel(): string|array - { - if ($this->responseModel === null) { - throw new \LogicException("Missing response model: you must call setResponseModel() before using it."); - } - - return $this->responseModel; - } - /** * Get the appropriate parent level not found exception. */ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php index 57cff8a75f..8fdbbefbcd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Create.php @@ -26,10 +26,13 @@ class Create extends Action return 'createBooleanColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/boolean') @@ -66,19 +69,8 @@ class Create extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?bool $required, - ?bool $default, - bool $array, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { - + public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?bool $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { $attribute = $this->createAttribute($databaseId, $collectionId, new Document([ 'key' => $key, 'type' => Database::VAR_BOOLEAN, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Update.php index 7a2db8e74f..b2fdc527b3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Boolean/Update.php @@ -26,10 +26,13 @@ class Update extends Action return 'updateBooleanColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/boolean/:key') @@ -66,17 +69,8 @@ class Update extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?bool $required, - ?bool $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?bool $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + { $attribute = $this->updateAttribute( databaseId: $databaseId, collectionId: $collectionId, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Create.php index 40d7aed1e9..07f7158475 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Create.php @@ -27,10 +27,13 @@ class Create extends Action return 'createDatetimeAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_DATETIME; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_DATETIME); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/datetime') @@ -67,18 +70,8 @@ class Create extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?bool $required, - ?string $default, - bool $array, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { $attribute = $this->createAttribute( $databaseId, $collectionId, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Update.php index 386d6682ad..0709415d81 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Datetime/Update.php @@ -27,10 +27,13 @@ class Update extends Action return 'updateDatetimeAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_DATETIME; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_DATETIME); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/datetime/:key') @@ -67,17 +70,8 @@ class Update extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?bool $required, - ?string $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + { $attribute = $this->updateAttribute( databaseId: $databaseId, collectionId: $collectionId, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Delete.php index da29fd09ee..bcb4d1d406 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Delete.php @@ -27,11 +27,14 @@ class Delete extends Action return 'deleteAttribute'; } - public function __construct() + protected function getResponseModel(): string|array { // we should correctly & carefully set the context later. - $this->setResponseModel(UtopiaResponse::MODEL_NONE); + return UtopiaResponse::MODEL_NONE; + } + public function __construct() + { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') @@ -44,8 +47,8 @@ class Delete extends Action ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( namespace: 'databases', - group: 'attributes', - name: 'deleteAttribute', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/delete-attribute.md', auth: [AuthType::KEY], responses: [ @@ -66,15 +69,8 @@ class Delete extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($db->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Create.php index c33ce9daeb..bd8512a271 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Create.php @@ -27,10 +27,13 @@ class Create extends Action return 'createEmailAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_EMAIL; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_EMAIL); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/email') @@ -67,18 +70,8 @@ class Create extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?bool $required, - ?string $default, - bool $array, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { $attribute = $this->createAttribute( $databaseId, $collectionId, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Update.php index 0c41961099..2c39e37b19 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Email/Update.php @@ -27,10 +27,13 @@ class Update extends Action return 'updateEmailAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_EMAIL; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_EMAIL); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/email/:key') @@ -67,17 +70,8 @@ class Update extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?bool $required, - ?string $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + { $attribute = $this->updateAttribute( databaseId: $databaseId, collectionId: $collectionId, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Create.php index 61298cbe94..fa30639bd1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Create.php @@ -29,10 +29,13 @@ class Create extends Action return 'createEnumAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_ENUM; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_ENUM); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/enum') @@ -70,19 +73,8 @@ class Create extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - array $elements, - ?bool $required, - ?string $default, - bool $array, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, array $elements, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { if (!is_null($default) && !\in_array($default, $elements, true)) { throw new Exception($this->getInvalidValueException(), 'Default value not found in elements'); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Update.php index 37d8065608..089407ad01 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Enum/Update.php @@ -28,10 +28,13 @@ class Update extends Action return 'updateEnumAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_ENUM; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_ENUM); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/enum/:key') @@ -69,18 +72,8 @@ class Update extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?array $elements, - ?bool $required, - ?string $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, ?array $elements, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + { $attribute = $this->updateAttribute( databaseId: $databaseId, collectionId: $collectionId, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Create.php index 9603cf4c9a..e1f22ffdd8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Create.php @@ -29,10 +29,13 @@ class Create extends Action return 'createFloatAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_FLOAT; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_FLOAT); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/float') @@ -71,20 +74,8 @@ class Create extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?bool $required, - ?float $min, - ?float $max, - ?float $default, - bool $array, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { $min ??= -PHP_FLOAT_MAX; $max ??= PHP_FLOAT_MAX; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Update.php index 012e8239c9..42cc5444d5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Float/Update.php @@ -27,10 +27,13 @@ class Update extends Action return 'updateFloatAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_FLOAT; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_FLOAT); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/float/:key') @@ -69,19 +72,8 @@ class Update extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?bool $required, - ?float $min, - ?float $max, - ?float $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + { $attribute = $this->updateAttribute( databaseId: $databaseId, collectionId: $collectionId, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Get.php index e782897be2..95612b45ca 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Get.php @@ -23,9 +23,9 @@ class Get extends Action return 'getColumn'; } - public function __construct() + protected function getResponseModel(): string|array { - $this->setResponseModel([ + return [ UtopiaResponse::MODEL_ATTRIBUTE_BOOLEAN, UtopiaResponse::MODEL_ATTRIBUTE_INTEGER, UtopiaResponse::MODEL_ATTRIBUTE_FLOAT, @@ -36,8 +36,11 @@ class Get extends Action UtopiaResponse::MODEL_ATTRIBUTE_DATETIME, UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP, UtopiaResponse::MODEL_ATTRIBUTE_STRING, - ]); + ]; + } + public function __construct() + { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') @@ -47,8 +50,8 @@ class Get extends Action ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'columns', - name: 'getColumn', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/get-attribute.md', auth: [AuthType::KEY], responses: [ @@ -66,13 +69,8 @@ class Get extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $tableId, - string $key, - UtopiaResponse $response, - Database $dbForProject - ): void { + public function action(string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject): void + { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Create.php index 8176b03bba..927d55c9c0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Create.php @@ -27,10 +27,13 @@ class Create extends Action return 'createIpAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_IP; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_IP); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/ip') @@ -67,18 +70,8 @@ class Create extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?bool $required, - ?string $default, - bool $array, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { $attribute = $this->createAttribute( $databaseId, $collectionId, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Update.php index 868b735bbb..a489675bd2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/IP/Update.php @@ -27,10 +27,13 @@ class Update extends Action return 'updateIpAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_IP; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_IP); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/ip/:key') @@ -67,17 +70,8 @@ class Update extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?bool $required, - ?string $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + { $attribute = $this->updateAttribute( databaseId: $databaseId, collectionId: $collectionId, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Create.php index 99371b26d9..9dd013362c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Create.php @@ -29,10 +29,13 @@ class Create extends Action return 'createIntegerAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_INTEGER; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_INTEGER); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/integer') @@ -71,20 +74,8 @@ class Create extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?bool $required, - ?int $min, - ?int $max, - ?int $default, - bool $array, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { $min ??= \PHP_INT_MIN; $max ??= \PHP_INT_MAX; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Update.php index 51c72af363..6e1379daff 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Integer/Update.php @@ -27,10 +27,13 @@ class Update extends Action return 'updateIntegerAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_INTEGER; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_INTEGER); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/integer/:key') @@ -69,19 +72,8 @@ class Update extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $key, - ?bool $required, - ?int $min, - ?int $max, - ?int $default, - ?string $newKey, - UtopiaResponse $response, - Database $dbForProject, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + { $attribute = $this->updateAttribute( databaseId: $databaseId, collectionId: $collectionId, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Create.php index cdc1861c26..49d853bed6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Create.php @@ -29,10 +29,13 @@ class Create extends Action return 'createRelationshipAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/relationship') @@ -80,20 +83,8 @@ class Create extends Action ->callback([$this, 'action']); } - public function action( - string $databaseId, - string $collectionId, - string $relatedCollectionId, - string $type, - bool $twoWay, - ?string $key, - ?string $twoWayKey, - string $onDelete, - UtopiaResponse $response, - Database $dbForProject, - EventDatabase $queueForDatabase, - Event $queueForEvents - ): void { + public function action(string $databaseId, string $collectionId, string $relatedCollectionId, string $type, bool $twoWay, ?string $key, ?string $twoWayKey, string $onDelete, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + { $key ??= $relatedCollectionId; $twoWayKey ??= $collectionId; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Update.php index 6416e7793e..9c95bd2a65 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/Relationship/Update.php @@ -25,10 +25,13 @@ class Update extends Action return 'updateRelationshipAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_RELATIONSHIP); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/:key/relationship') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Create.php index 29e3ce757d..47386f7530 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Create.php @@ -30,10 +30,13 @@ class Create extends Action return 'createStringAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_STRING; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_STRING); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/string') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Update.php index b76a34951e..08c55e6021 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/String/Update.php @@ -29,10 +29,13 @@ class Update extends Action return 'updateStringAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_STRING; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_STRING); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/string/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Create.php index 5b1906ac2b..38f5a4773a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Create.php @@ -27,10 +27,13 @@ class Create extends Action return 'createUrlAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_URL; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_URL); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/url') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Update.php index 253649f15a..45309326aa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/URL/Update.php @@ -27,10 +27,13 @@ class Update extends Action return 'updateUrlAttribute'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_URL; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_URL); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/url/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/XList.php index 072f6987d2..5a190bd671 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Attributes/XList.php @@ -28,10 +28,13 @@ class XList extends Action return 'listAttributes'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_ATTRIBUTE_LIST; + } + public function __construct() { - $this->setResponseModel(UtopiaResponse::MODEL_ATTRIBUTE_LIST); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes') @@ -67,8 +70,8 @@ class XList extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); - if ($table->isEmpty()) { + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + if ($collection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); } @@ -77,7 +80,7 @@ class XList extends Action \array_push( $queries, Query::equal('databaseInternalId', [$database->getInternalId()]), - Query::equal('collectionInternalId', [$table->getInternalId()]) + Query::equal('collectionInternalId', [$collection->getInternalId()]) ); $cursor = \array_filter( @@ -96,7 +99,7 @@ class XList extends Action $cursorDocument = Authorization::skip( fn () => $dbForProject->find('attributes', [ Query::equal('databaseInternalId', [$database->getInternalId()]), - Query::equal('collectionInternalId', [$table->getInternalId()]), + Query::equal('collectionInternalId', [$collection->getInternalId()]), Query::equal('key', [$attributeId]), Query::limit(1), ]) @@ -104,7 +107,7 @@ class XList extends Action if (empty($cursorDocument) || $cursorDocument[0]->isEmpty()) { $type = ucfirst($this->getContext()); - throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "$type '{$attributeId}' for the 'cursor' value not found."); + throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "$type '$attributeId' for the 'cursor' value not found."); } $cursor->setValue($cursorDocument[0]); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php index 2ebcdb4c3f..83500fa964 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php @@ -18,6 +18,11 @@ abstract class Action extends UtopiaAction */ private ?string $context = DATABASE_COLLECTIONS_CONTEXT; + /** + * Get the response model used in the SDK and HTTP responses. + */ + abstract protected function getResponseModel(): string; + /** * Set the current API context. * @@ -50,11 +55,6 @@ abstract class Action extends UtopiaAction return $this->getContext() . 'Id'; } - /** - * Get the response model used in the SDK and HTTP responses. - */ - abstract protected function getResponseModel(): string; - /** * Determine if the current action is for the Collections API. */ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php index 385c631493..fafed3bf8d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Create.php @@ -25,10 +25,14 @@ class Create extends BooleanCreate return 'createBooleanColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_BOOLEAN; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_BOOLEAN); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php index 7b0754ccc7..7bb9e640ad 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Boolean/Update.php @@ -26,10 +26,14 @@ class Update extends BooleanUpdate return 'updateBooleanColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_BOOLEAN; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_BOOLEAN); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php index 80031d61ab..7d9dc8dcce 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Create.php @@ -26,10 +26,14 @@ class Create extends DatetimeCreate return 'createDatetimeColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_DATETIME; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_DATETIME); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php index d7124981d1..7e1b1e196d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Datetime/Update.php @@ -27,10 +27,14 @@ class Update extends DatetimeUpdate return 'updateDatetimeColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_DATETIME; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_DATETIME); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php index eb2c6a9ccf..e712f7cdde 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Delete.php @@ -25,13 +25,16 @@ class Delete extends AttributesDelete return 'deleteColumn'; } + // parent handles multiple model types internally + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_NONE; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - // parent action handles multiple model types internally - $this->setResponseModel(UtopiaResponse::MODEL_NONE); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php index 2fdb994251..a3dfc0d6a2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Create.php @@ -26,10 +26,14 @@ class Create extends EmailCreate return 'createEmailColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_EMAIL; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_EMAIL); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php index 255e636a39..2f8494250e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Email/Update.php @@ -27,10 +27,14 @@ class Update extends EmailUpdate return 'updateEmailColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_EMAIL; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_EMAIL); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php index 2408aeeae4..06fc55891e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Create.php @@ -27,10 +27,14 @@ class Create extends EnumCreate return 'createEnumColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_ENUM; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_ENUM); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php index c47766b4dd..28a4538b66 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Enum/Update.php @@ -28,10 +28,14 @@ class Update extends EnumUpdate return 'updateEnumColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_ENUM; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_ENUM); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php index c8b9a7ec7b..4f5db64d57 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Create.php @@ -26,10 +26,14 @@ class Create extends FloatCreate return 'createFloatColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_FLOAT; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_FLOAT); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php index 1e008de2c0..c7ab1795db 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Float/Update.php @@ -27,10 +27,14 @@ class Update extends FloatUpdate return 'updateFloatColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_FLOAT; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_FLOAT); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php index d8847f0122..ff69757b6d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Get.php @@ -22,11 +22,9 @@ class Get extends AttributesGet return 'getColumn'; } - public function __construct() + protected function getResponseModel(): string|array { - $this->setContext(DATABASE_COLUMNS_CONTEXT); - - $this->setResponseModel([ + return [ UtopiaResponse::MODEL_COLUMN_BOOLEAN, UtopiaResponse::MODEL_COLUMN_INTEGER, UtopiaResponse::MODEL_COLUMN_FLOAT, @@ -37,7 +35,12 @@ class Get extends AttributesGet UtopiaResponse::MODEL_COLUMN_DATETIME, UtopiaResponse::MODEL_COLUMN_RELATIONSHIP, UtopiaResponse::MODEL_COLUMN_STRING, - ]); + ]; + } + + public function __construct() + { + $this->setContext(DATABASE_COLUMNS_CONTEXT); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php index a69cc6ccfe..b42f9aaf6b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Create.php @@ -26,10 +26,14 @@ class Create extends IPCreate return 'createIpColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_IP; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_IP); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php index d4c6db12fe..101041a790 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/IP/Update.php @@ -27,10 +27,14 @@ class Update extends IPUpdate return 'updateIpColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_IP; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_IP); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php index 2c394dd042..b0b5eb59bb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Create.php @@ -26,10 +26,14 @@ class Create extends IntegerCreate return 'createIntegerColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_INTEGER; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_INTEGER); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php index 4eacb2b0df..faa42aa3ca 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Integer/Update.php @@ -27,10 +27,14 @@ class Update extends IntegerUpdate return 'updateIntegerColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_INTEGER; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_INTEGER); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php index d0b080b237..2807041377 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Create.php @@ -26,10 +26,14 @@ class Create extends RelationshipCreate return 'createRelationshipColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_RELATIONSHIP; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_RELATIONSHIP); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php index 85e4e207a5..81040584b3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/Relationship/Update.php @@ -25,15 +25,18 @@ class Update extends RelationshipUpdate return 'updateRelationshipColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_RELATIONSHIP; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_RELATIONSHIP); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key/relationship') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/:key/relationship') ->desc('Update relationship column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php index e00bdf679e..a75563a271 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Create.php @@ -28,10 +28,14 @@ class Create extends StringCreate return 'createStringColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_STRING; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_STRING); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php index 9db47fba69..0b1f370696 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/String/Update.php @@ -29,10 +29,14 @@ class Update extends StringUpdate return 'updateStringColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_STRING; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_STRING); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php index ee770e9e4d..5c575acb56 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Create.php @@ -26,10 +26,14 @@ class Create extends URLCreate return 'createUrlColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_URL; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_URL); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php index 360445750b..c37a74198a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/URL/Update.php @@ -27,15 +27,18 @@ class Update extends URLUpdate return 'updateUrlColumn'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_URL; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_URL); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/attributes/url/:key') ->desc('Update URL column') ->groups(['api', 'database', 'schema']) ->label('scope', 'collections.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php index 06d7a57dcf..280e56fa48 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Columns/XList.php @@ -22,10 +22,14 @@ class XList extends AttributesXList return 'listColumns'; } + protected function getResponseModel(): string|array + { + return UtopiaResponse::MODEL_COLUMN_LIST; + } + public function __construct() { $this->setContext(DATABASE_COLUMNS_CONTEXT); - $this->setResponseModel(UtopiaResponse::MODEL_COLUMN_LIST); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php index 537d8e27f0..e9dd4c7092 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Create.php @@ -39,13 +39,13 @@ class Create extends Action $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/indexes') ->desc('Create index') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'index.create') + // TODO: audits table or collections, check the context type if possible, move into another module. ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Delete.php index 78e1799164..dd7c4bd5e7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Delete.php @@ -32,13 +32,13 @@ class Delete extends Action $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/indexes/:key') ->desc('Delete index') ->groups(['api', 'database']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].update') ->label('audits.event', 'index.delete') + // TODO: audits table or collections, check the context type if possible ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( namespace: 'databases', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php index b1689481ed..a89819d844 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/Get.php @@ -30,7 +30,6 @@ class Get extends Action $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/indexes/:key') ->desc('Get index') ->groups(['api', 'database']) ->label('scope', 'collections.read') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/XList.php index 53c623f9f4..b11806cfd0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Indexes/XList.php @@ -34,7 +34,6 @@ class XList extends Action $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/indexes') ->desc('List indexes') ->groups(['api', 'database']) ->label('scope', 'collections.read') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php index 8eb07ef94e..3ec0ea6213 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Get.php @@ -37,7 +37,6 @@ class Get extends DocumentGet $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId') ->desc('Get row') ->groups(['api', 'database']) ->label('scope', 'documents.read') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php index d29a8dcd12..34d947796e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/Update.php @@ -38,7 +38,6 @@ class Update extends DocumentUpdate $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/documents/:rowId') ->desc('Update row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php index a954312493..041f532840 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Rows/XList.php @@ -37,7 +37,6 @@ class XList extends DocumentXList $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') - ->httpAlias('/v1/databases/:databaseId/collections/:tableId/documents') ->desc('List rows') ->groups(['api', 'database']) ->label('scope', 'documents.read') From da70da985ba1e61ca0eda5c0f29b74b8c82c590d Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 12:55:54 +0530 Subject: [PATCH 065/362] update: use nested directory structure. --- .../Databases/Http/{ => Databases}/Collections/Action.php | 2 +- .../Http/{ => Databases/Collections}/Attributes/Action.php | 2 +- .../{ => Databases/Collections}/Attributes/Boolean/Create.php | 4 ++-- .../{ => Databases/Collections}/Attributes/Boolean/Update.php | 4 ++-- .../Collections}/Attributes/Datetime/Create.php | 4 ++-- .../Collections}/Attributes/Datetime/Update.php | 4 ++-- .../Http/{ => Databases/Collections}/Attributes/Delete.php | 2 +- .../{ => Databases/Collections}/Attributes/Email/Create.php | 4 ++-- .../{ => Databases/Collections}/Attributes/Email/Update.php | 4 ++-- .../{ => Databases/Collections}/Attributes/Enum/Create.php | 4 ++-- .../{ => Databases/Collections}/Attributes/Enum/Update.php | 4 ++-- .../{ => Databases/Collections}/Attributes/Float/Create.php | 4 ++-- .../{ => Databases/Collections}/Attributes/Float/Update.php | 4 ++-- .../Http/{ => Databases/Collections}/Attributes/Get.php | 2 +- .../Http/{ => Databases/Collections}/Attributes/IP/Create.php | 4 ++-- .../Http/{ => Databases/Collections}/Attributes/IP/Update.php | 4 ++-- .../{ => Databases/Collections}/Attributes/Integer/Create.php | 4 ++-- .../{ => Databases/Collections}/Attributes/Integer/Update.php | 4 ++-- .../Collections}/Attributes/Relationship/Create.php | 4 ++-- .../Collections}/Attributes/Relationship/Update.php | 4 ++-- .../{ => Databases/Collections}/Attributes/String/Create.php | 4 ++-- .../{ => Databases/Collections}/Attributes/String/Update.php | 4 ++-- .../{ => Databases/Collections}/Attributes/URL/Create.php | 4 ++-- .../{ => Databases/Collections}/Attributes/URL/Update.php | 4 ++-- .../Http/{ => Databases/Collections}/Attributes/XList.php | 2 +- .../Databases/Http/{ => Databases}/Collections/Create.php | 2 +- .../Databases/Http/{ => Databases}/Collections/Delete.php | 2 +- .../Http/{ => Databases/Collections}/Documents/Action.php | 2 +- .../Http/{ => Databases/Collections}/Documents/Create.php | 2 +- .../Http/{ => Databases/Collections}/Documents/Delete.php | 2 +- .../Http/{ => Databases/Collections}/Documents/Get.php | 2 +- .../Http/{ => Databases/Collections}/Documents/Logs/XList.php | 4 ++-- .../Http/{ => Databases/Collections}/Documents/Update.php | 2 +- .../Http/{ => Databases/Collections}/Documents/XList.php | 2 +- .../Databases/Http/{ => Databases}/Collections/Get.php | 2 +- .../Http/{ => Databases/Collections}/Indexes/Create.php | 0 .../Http/{ => Databases/Collections}/Indexes/Delete.php | 0 .../Http/{ => Databases/Collections}/Indexes/Get.php | 0 .../Http/{ => Databases/Collections}/Indexes/XList.php | 0 .../Databases/Http/{ => Databases}/Collections/Logs/XList.php | 4 ++-- .../Databases/Http/{ => Databases}/Collections/Update.php | 2 +- .../Databases/Http/{ => Databases}/Collections/Usage/Get.php | 4 ++-- .../Databases/Http/{ => Databases}/Collections/XList.php | 2 +- .../Http/{ => Databases/Tables}/Columns/Boolean/Create.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/Boolean/Update.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/Datetime/Create.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/Datetime/Update.php | 4 ++-- .../Databases/Http/{ => Databases/Tables}/Columns/Delete.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/Email/Create.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/Email/Update.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/Enum/Create.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/Enum/Update.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/Float/Create.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/Float/Update.php | 4 ++-- .../Databases/Http/{ => Databases/Tables}/Columns/Get.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/IP/Create.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/IP/Update.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/Integer/Create.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/Integer/Update.php | 4 ++-- .../{ => Databases/Tables}/Columns/Relationship/Create.php | 4 ++-- .../{ => Databases/Tables}/Columns/Relationship/Update.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/String/Create.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/String/Update.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/URL/Create.php | 4 ++-- .../Http/{ => Databases/Tables}/Columns/URL/Update.php | 4 ++-- .../Databases/Http/{ => Databases/Tables}/Columns/XList.php | 4 ++-- .../Modules/Databases/Http/{ => Databases}/Tables/Create.php | 4 ++-- .../Modules/Databases/Http/{ => Databases}/Tables/Delete.php | 4 ++-- .../Modules/Databases/Http/{ => Databases}/Tables/Get.php | 4 ++-- .../Databases/Http/{ => Databases}/Tables/Logs/XList.php | 4 ++-- .../Databases/Http/{ => Databases/Tables}/Rows/Create.php | 4 ++-- .../Databases/Http/{ => Databases/Tables}/Rows/Delete.php | 4 ++-- .../Databases/Http/{ => Databases/Tables}/Rows/Get.php | 4 ++-- .../Databases/Http/{ => Databases/Tables}/Rows/Logs/XList.php | 4 ++-- .../Databases/Http/{ => Databases/Tables}/Rows/Update.php | 4 ++-- .../Databases/Http/{ => Databases/Tables}/Rows/XList.php | 4 ++-- .../Modules/Databases/Http/{ => Databases}/Tables/Update.php | 4 ++-- .../Databases/Http/{ => Databases}/Tables/Usage/Get.php | 4 ++-- .../Modules/Databases/Http/{ => Databases}/Tables/XList.php | 4 ++-- 79 files changed, 134 insertions(+), 134 deletions(-) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Collections/Action.php (97%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Action.php (99%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Boolean/Create.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Boolean/Update.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Datetime/Create.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Datetime/Update.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Delete.php (98%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Email/Create.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Email/Update.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Enum/Create.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Enum/Update.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Float/Create.php (96%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Float/Update.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Get.php (97%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/IP/Create.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/IP/Update.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Integer/Create.php (96%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Integer/Update.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Relationship/Create.php (97%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/Relationship/Update.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/String/Create.php (96%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/String/Update.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/URL/Create.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/URL/Update.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Attributes/XList.php (98%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Collections/Create.php (98%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Collections/Delete.php (98%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Documents/Action.php (97%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Documents/Create.php (99%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Documents/Delete.php (98%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Documents/Get.php (98%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Documents/Logs/XList.php (97%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Documents/Update.php (99%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Documents/XList.php (99%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Collections/Get.php (97%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Indexes/Create.php (100%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Indexes/Delete.php (100%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Indexes/Get.php (100%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Collections}/Indexes/XList.php (100%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Collections/Logs/XList.php (97%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Collections/Update.php (98%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Collections/Usage/Get.php (97%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Collections/XList.php (98%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Boolean/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Boolean/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Datetime/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Datetime/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Delete.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Email/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Email/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Enum/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Enum/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Float/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Float/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Get.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/IP/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/IP/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Integer/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Integer/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Relationship/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/Relationship/Update.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/String/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/String/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/URL/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/URL/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Columns/XList.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Tables/Create.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Tables/Delete.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Tables/Get.php (92%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Tables/Logs/XList.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Rows/Create.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Rows/Delete.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Rows/Get.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Rows/Logs/XList.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Rows/Update.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases/Tables}/Rows/XList.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Tables/Update.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Tables/Usage/Get.php (92%) rename src/Appwrite/Platform/Modules/Databases/Http/{ => Databases}/Tables/XList.php (94%) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php similarity index 97% rename from src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php rename to src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php index 83500fa964..eaaa08d237 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php @@ -1,6 +1,6 @@ Date: Thu, 8 May 2025 14:15:00 +0530 Subject: [PATCH 066/362] add: indexes api to tables. --- app/config/errors.php | 27 +++ app/controllers/general.php | 8 +- app/init/constants.php | 2 + src/Appwrite/Extend/Exception.php | 7 + .../Http/Databases/Collections/Action.php | 8 - .../Collections/Attributes/Action.php | 14 +- .../Collections/Attributes/Delete.php | 2 +- .../Databases/Collections/Indexes/Action.php | 163 ++++++++++++++++++ .../Databases/Collections/Indexes/Create.php | 106 +++++++----- .../Databases/Collections/Indexes/Delete.php | 64 ++++--- .../Databases/Collections/Indexes/Get.php | 33 ++-- .../Databases/Collections/Indexes/XList.php | 38 ++-- .../Http/Databases/Tables/Indexes/Create.php | 72 ++++++++ .../Http/Databases/Tables/Indexes/Delete.php | 71 ++++++++ .../Http/Databases/Tables/Indexes/Get.php | 60 +++++++ .../Http/Databases/Tables/Indexes/XList.php | 60 +++++++ 16 files changed, 624 insertions(+), 111 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php diff --git a/app/config/errors.php b/app/config/errors.php index 182b6286e8..de26b077fc 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -903,6 +903,33 @@ return [ 'code' => 409, ], + /** Column Indexes, same as Indexes but with different type */ + Exception::COLUMN_INDEX_NOT_FOUND => [ + 'name' => Exception::COLUMN_INDEX_NOT_FOUND, + 'description' => 'Index with the requested ID could not be found.', + 'code' => 404, + ], + Exception::COLUMN_INDEX_LIMIT_EXCEEDED => [ + 'name' => Exception::COLUMN_INDEX_LIMIT_EXCEEDED, + 'description' => 'The maximum number of indexes has been reached.', + 'code' => 400, + ], + Exception::COLUMN_INDEX_ALREADY_EXISTS => [ + 'name' => Exception::COLUMN_INDEX_ALREADY_EXISTS, + 'description' => 'Index with the requested key already exists. Try again with a different key.', + 'code' => 409, + ], + Exception::COLUMN_INDEX_INVALID => [ + 'name' => Exception::COLUMN_INDEX_INVALID, + 'description' => 'Index invalid.', + 'code' => 400, + ], + Exception::COLUMN_INDEX_DEPENDENCY => [ + 'name' => Exception::COLUMN_INDEX_DEPENDENCY, + 'description' => 'Column cannot be renamed or deleted. Please remove the associated index first.', + 'code' => 409, + ], + /** Project Errors */ Exception::PROJECT_NOT_FOUND => [ 'name' => Exception::PROJECT_NOT_FOUND, diff --git a/app/controllers/general.php b/app/controllers/general.php index da68d4758c..b7ee606c69 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1216,7 +1216,13 @@ App::error() ); break; case 'Utopia\Database\Exception\Dependency': - $error = new AppwriteException(AppwriteException::INDEX_DEPENDENCY, null, previous: $error); + $error = new AppwriteException( + $isTablesAPI + ? AppwriteException::COLUMN_INDEX_DEPENDENCY + : AppwriteException::INDEX_DEPENDENCY, + null, + previous: $error + ); break; } diff --git a/app/init/constants.php b/app/init/constants.php index 29a861c45a..c3b6d4a058 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -271,7 +271,9 @@ const TOKENS_RESOURCE_TYPE_DATABASES = 'databases'; const DATABASE_ROWS_CONTEXT = 'row'; const DATABASE_TABLES_CONTEXT = 'table'; const DATABASE_COLUMNS_CONTEXT = 'column'; +const DATABASE_INDEX_CONTEXT = 'index'; const DATABASE_DOCUMENTS_CONTEXT = 'document'; const DATABASE_ATTRIBUTES_CONTEXT = 'attribute'; const DATABASE_COLLECTIONS_CONTEXT = 'collection'; +const DATABASE_COLUMN_INDEX_CONTEXT = 'columnIndex'; diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 15b964577d..38a562571c 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -253,6 +253,13 @@ class Exception extends \Exception public const INDEX_INVALID = 'index_invalid'; public const INDEX_DEPENDENCY = 'index_dependency'; + /** Column Indexes */ + public const COLUMN_INDEX_NOT_FOUND = 'column_index_not_found'; + public const COLUMN_INDEX_LIMIT_EXCEEDED = 'column_index_limit_exceeded'; + public const COLUMN_INDEX_ALREADY_EXISTS = 'column_index_already_exists'; + public const COLUMN_INDEX_INVALID = 'column_index_invalid'; + public const COLUMN_INDEX_DEPENDENCY = 'column_index_dependency'; + /** Projects */ public const PROJECT_NOT_FOUND = 'project_not_found'; public const PROJECT_PROVIDER_DISABLED = 'project_provider_disabled'; 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 eaaa08d237..abec90f1a6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php @@ -5,12 +5,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections; use Appwrite\Extend\Exception; use Utopia\Platform\Action as UtopiaAction; -/** - * Abstract base action for Collection and Table database routes. - * - * Provides shared utilities to determine API type, response model, - * SDK group, and context-specific exceptions. - */ abstract class Action extends UtopiaAction { /** @@ -39,8 +33,6 @@ abstract class Action extends UtopiaAction /** * Get the current API context. - * - * @throws \Exception if context has not been set. */ final protected function getContext(): string { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 1c779f4d3b..fff070d58f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -42,7 +42,7 @@ abstract class Action extends UtopiaAction final protected function setContext(string $context): void { if (!\in_array($context, [DATABASE_COLUMNS_CONTEXT, DATABASE_ATTRIBUTES_CONTEXT], true)) { - throw new \InvalidArgumentException("Invalid context '{$context}'. Use `DATABASE_COLUMNS_CONTEXT` or `DATABASE_ATTRIBUTES_CONTEXT`"); + throw new \InvalidArgumentException("Invalid context '$context'. Use `DATABASE_COLUMNS_CONTEXT` or `DATABASE_ATTRIBUTES_CONTEXT`"); } $this->context = $context; @@ -112,6 +112,16 @@ abstract class Action extends UtopiaAction : Exception::COLUMN_NOT_FOUND; } + /** + * Get the appropriate not found exception. + */ + final protected function getIndexDependencyException(): string + { + return $this->isCollectionsAPI() + ? Exception::INDEX_DEPENDENCY + : Exception::COLUMN_INDEX_DEPENDENCY; + } + /** * Get the appropriate already exists exception. */ @@ -275,7 +285,7 @@ abstract class Action extends UtopiaAction if (!empty($format)) { if (!Structure::hasFormat($format, $type)) { - throw new Exception($this->getFormatUnsupportedException(), "Format {$format} not available for {$type} columns."); + throw new Exception($this->getFormatUnsupportedException(), "Format $format not available for $type columns."); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 9597070be6..444fa41a7f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -91,7 +91,7 @@ class Delete extends Action $dbForProject->getAdapter()->getSupportForCastIndexArray(), ); if (!$validator->isValid($attribute)) { - throw new Exception(Exception::INDEX_DEPENDENCY); + throw new Exception($this->getIndexDependencyException()); } if ($attribute->getAttribute('status') === 'available') { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php new file mode 100644 index 0000000000..102acdb639 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php @@ -0,0 +1,163 @@ +context = $context; + } + + /** + * Get the current API's parent context. + */ + final protected function getParentContext(): string + { + return $this->getContext() === DATABASE_INDEX_CONTEXT + ? DATABASE_ATTRIBUTES_CONTEXT + : DATABASE_COLUMNS_CONTEXT; + } + + /** + * Get the current API context. + */ + final protected function getContext(): string + { + return $this->context; + } + + /** + * Get the correct grand parent param key (e.g. `tableId` or `collectionId`) + */ + final protected function getGrandParentEventsParamKey(): string + { + return $this->isCollectionsAPI() ? 'collectionId' : 'tableId'; + } + + /** + * Get the key used in event parameters. + */ + final protected function getEventsParamKey(): string + { + return 'indexId'; + } + + /** + * Determine if the current action is for the Collections API. + */ + final protected function isCollectionsAPI(): bool + { + return $this->getParentContext() === DATABASE_ATTRIBUTES_CONTEXT; + } + + /** + * Get the SDK group name for the current action. + */ + final protected function getSdkGroup(): string + { + return 'indexes'; + } + + /** + * Get the exception to throw when the parent is unknown. + */ + final protected function getParentUnknownException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_UNKNOWN + : Exception::COLUMN_UNKNOWN; + } + + /** + * Get the appropriate grandparent level not found exception. + */ + final protected function getGrantParentNotFoundException(): string + { + return $this->isCollectionsAPI() + ? Exception::COLLECTION_NOT_FOUND + : Exception::TABLE_NOT_FOUND; + } + + /** + * Get the appropriate not found exception. + */ + final protected function getNotFoundException(): string + { + return $this->isCollectionsAPI() + ? Exception::INDEX_NOT_FOUND + : Exception::COLUMN_INDEX_NOT_FOUND; + } + + /** + * Get the exception to throw when the parent type is invalid. + */ + final protected function getParentInvalidTypeException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_TYPE_INVALID + : Exception::COLUMN_TYPE_INVALID; + } + + /** + * Get the exception to throw when the index type is invalid. + */ + final protected function getInvalidTypeException(): string + { + return $this->isCollectionsAPI() + ? Exception::INDEX_INVALID + : Exception::COLUMN_INDEX_INVALID; + } + + /** + * Get the exception to throw when the resource already exists. + */ + final protected function getDuplicateException(): string + { + return $this->isCollectionsAPI() + ? Exception::INDEX_ALREADY_EXISTS + : Exception::COLUMN_INDEX_ALREADY_EXISTS; + } + + /** + * Get the exception to throw when the resource limit is exceeded. + */ + final protected function getLimitException(): string + { + return $this->isCollectionsAPI() + ? Exception::INDEX_LIMIT_EXCEEDED + : Exception::COLUMN_INDEX_LIMIT_EXCEEDED; + } + + /** + * Get the exception to throw when the parent attribute/column is not in `available` state. + */ + final protected function getParentNotAvailableException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_NOT_AVAILABLE + : Exception::COLUMN_NOT_AVAILABLE; + } +} 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 e9dd4c7092..aa4729e605 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 @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/indexes') ->desc('Create index') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') + ->label('event', 'databases.[databaseId].collections.[collectionId].indexes.[indexId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'index.create') - // TODO: audits table or collections, check the context type if possible, move into another module. - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( namespace: 'databases', - group: 'tables', - name: 'createIndex', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/create-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_ACCEPTED, - model: UtopiaResponse::MODEL_INDEX, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', null, new Key(), 'Index Key.') ->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE]), 'Index type.') - ->param('columns', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of columns to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' columns are allowed, each 32 characters long.') + ->param('attributes', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of attributes to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' attributes are allowed, each 32 characters long.') ->param('orders', [], new ArrayList(new WhiteList(['ASC', 'DESC'], false, Database::VAR_STRING), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index orders. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' orders are allowed.', true) ->inject('response') ->inject('dbForProject') @@ -74,7 +77,7 @@ class Create extends Action ->callback([$this, 'action']); } - public function action(string $databaseId, string $tableId, string $key, string $type, array $columns, array $orders, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + public function action(string $databaseId, string $collectionId, string $key, string $type, array $attributes, array $orders, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void { $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -82,27 +85,28 @@ class Create extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); + $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); + if ($collection->isEmpty()) { + // table or collection. + throw new Exception($this->getGrantParentNotFoundException()); } $count = $dbForProject->count('indexes', [ - Query::equal('collectionInternalId', [$table->getInternalId()]), + Query::equal('collectionInternalId', [$collection->getInternalId()]), Query::equal('databaseInternalId', [$db->getInternalId()]) ], 61); $limit = $dbForProject->getLimitForIndexes(); if ($count >= $limit) { - throw new Exception(Exception::INDEX_LIMIT_EXCEEDED, 'Index limit exceeded'); + throw new Exception($this->getLimitException(), 'Index limit exceeded'); } // Convert Document[] to array of attribute metadata - $oldColumns = \array_map(fn ($a) => $a->getArrayCopy(), $table->getAttribute('attributes')); + $oldAttributes = \array_map(fn ($a) => $a->getArrayCopy(), $collection->getAttribute('attributes')); - $oldColumns[] = [ + $oldAttributes[] = [ 'key' => '$id', 'type' => Database::VAR_STRING, 'status' => 'available', @@ -112,7 +116,7 @@ class Create extends Action 'size' => Database::LENGTH_KEY ]; - $oldColumns[] = [ + $oldAttributes[] = [ 'key' => '$createdAt', 'type' => Database::VAR_DATETIME, 'status' => 'available', @@ -123,7 +127,7 @@ class Create extends Action 'size' => 0 ]; - $oldColumns[] = [ + $oldAttributes[] = [ 'key' => '$updatedAt', 'type' => Database::VAR_DATETIME, 'status' => 'available', @@ -137,25 +141,27 @@ class Create extends Action // lengths hidden by default $lengths = []; - foreach ($columns as $i => $column) { + $contextType = $this->getParentContext(); + foreach ($attributes as $i => $attribute) { // find attribute metadata in collection document - $columnIndex = \array_search($column, array_column($oldColumns, 'key')); + $attributeIndex = \array_search($attribute, array_column($oldAttributes, 'key')); - if ($columnIndex === false) { - throw new Exception(Exception::COLUMN_UNKNOWN, 'Unknown column: ' . $column . '. Verify the column name or create the column.'); + if ($attributeIndex === false) { + throw new Exception($this->getParentUnknownException(), "Unknown $contextType: " . $attribute . ". Verify the $contextType name or create the $contextType."); } - $columnStatus = $oldColumns[$columnIndex]['status']; - $columnType = $oldColumns[$columnIndex]['type']; - $columnArray = $oldColumns[$columnIndex]['array'] ?? false; + $columnStatus = $oldAttributes[$attributeIndex]['status']; + $columnType = $oldAttributes[$attributeIndex]['type']; + $columnArray = $oldAttributes[$attributeIndex]['array'] ?? false; if ($columnType === Database::VAR_RELATIONSHIP) { - throw new Exception(Exception::COLUMN_TYPE_INVALID, 'Cannot create an index for a relationship column: ' . $oldColumns[$columnIndex]['key']); + throw new Exception($this->getParentInvalidTypeException(), "Cannot create an index for a relationship $contextType: " . $oldAttributes[$attributeIndex]['key']); } // ensure attribute is available if ($columnStatus !== 'available') { - throw new Exception(Exception::COLUMN_NOT_AVAILABLE, 'Column not available: ' . $oldColumns[$columnIndex]['key']); + $contextType = ucfirst($contextType); + throw new Exception($this->getParentNotAvailableException(), "$contextType not available: " . $oldAttributes[$attributeIndex]['key']); } $lengths[$i] = null; @@ -167,51 +173,59 @@ class Create extends Action } $index = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $table->getInternalId() . '_' . $key), + '$id' => ID::custom($db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key), 'key' => $key, 'status' => 'processing', // processing, available, failed, deleting, stuck 'databaseInternalId' => $db->getInternalId(), 'databaseId' => $databaseId, - 'collectionInternalId' => $table->getInternalId(), - 'collectionId' => $tableId, + 'collectionInternalId' => $collection->getInternalId(), + 'collectionId' => $collectionId, 'type' => $type, - 'attributes' => $columns, + 'attributes' => $attributes, 'lengths' => $lengths, 'orders' => $orders, ]); $validator = new IndexValidator( - $table->getAttribute('attributes'), + $collection->getAttribute('attributes'), $dbForProject->getAdapter()->getMaxIndexLength(), $dbForProject->getAdapter()->getInternalIndexesKeys(), ); if (!$validator->isValid($index)) { - throw new Exception(Exception::INDEX_INVALID, $validator->getDescription()); + throw new Exception($this->getInvalidTypeException(), $validator->getDescription()); } try { $index = $dbForProject->createDocument('indexes', $index); } catch (DuplicateException) { - throw new Exception(Exception::INDEX_ALREADY_EXISTS); + throw new Exception($this->getDuplicateException()); } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); $queueForDatabase ->setType(DATABASE_TYPE_CREATE_INDEX) - ->setDatabase($db) - ->setTable($table) - ->setRow($index); + ->setDatabase($db); + + if ($this->isCollectionsAPI()) { + $queueForDatabase + ->setCollection($collection) + ->setDocument($index); + } else { + $queueForDatabase + ->setTable($collection) + ->setRow($index); + } $queueForEvents + ->setContext('database', $db) ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('indexId', $index->getId()) - ->setContext('table', $table) - ->setContext('database', $db); + ->setParam($this->getEventsParamKey(), $index->getId()) + ->setParam($this->getGrandParentEventsParamKey(), $collection->getId()) + ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) - ->dynamic($index, UtopiaResponse::MODEL_INDEX); + ->dynamic($index, $this->getResponseModel()); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index dd7c4bd5e7..157e4ef7de 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') ->desc('Delete index') ->groups(['api', 'database']) ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].update') + ->label('event', 'databases.[databaseId].collections.[collectionId].indexes.[indexId].update') ->label('audits.event', 'index.delete') - // TODO: audits table or collections, check the context type if possible - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( namespace: 'databases', - group: 'indexes', - name: 'deleteIndex', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/delete-index.md', auth: [AuthType::KEY], responses: [ @@ -55,7 +62,7 @@ class Delete extends Action contentType: ContentType::NONE )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', '', new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') @@ -64,23 +71,24 @@ class Delete extends Action ->callback([$this, 'action']); } - public function action(string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + public function action(string $databaseId, string $collectionId, string $key, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void { $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($db->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } - $table = $dbForProject->getDocument('database_' . $db->getInternalId(), $tableId); + $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); + if ($collection->isEmpty()) { + // table or collection. + throw new Exception($this->getGrantParentNotFoundException()); } - $index = $dbForProject->getDocument('indexes', $db->getInternalId() . '_' . $table->getInternalId() . '_' . $key); + $index = $dbForProject->getDocument('indexes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); if (empty($index->getId())) { - throw new Exception(Exception::INDEX_NOT_FOUND); + throw new Exception($this->getNotFoundException()); } // Only update status if removing available index @@ -88,21 +96,29 @@ class Delete extends Action $index = $dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'deleting')); } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $tableId); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); $queueForDatabase ->setType(DATABASE_TYPE_DELETE_INDEX) - ->setDatabase($db) - ->setTable($table) - ->setRow($index); + ->setDatabase($db); + + if ($this->isCollectionsAPI()) { + $queueForDatabase + ->setCollection($collection) + ->setDocument($index); + } else { + $queueForDatabase + ->setTable($collection) + ->setRow($index); + } $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('tableId', $table->getId()) - ->setParam('indexId', $index->getId()) - ->setContext('table', $table) ->setContext('database', $db) - ->setPayload($response->output($index, UtopiaResponse::MODEL_INDEX)); + ->setParam('databaseId', $databaseId) + ->setParam($this->getEventsParamKey(), $index->getId()) + ->setPayload($response->output($index, $this->getResponseModel())) + ->setParam($this->getGrandParentEventsParamKey(), $collection->getId()) + ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); $response->noContent(); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index a89819d844..3e8a67b395 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') ->desc('Get index') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'indexes', - name: 'getIndex', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/get-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_INDEX, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('key', null, new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') ->callback([$this, 'action']); } - public function action(string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject): void + public function action(string $databaseId, string $collectionId, string $key, UtopiaResponse $response, Database $dbForProject): void { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); + if ($collection->isEmpty()) { + // table or collection. + throw new Exception($this->getGrantParentNotFoundException()); } - $index = $table->find('key', $key, 'indexes'); + $index = $collection->find('key', $key, 'indexes'); if (empty($index)) { - throw new Exception(Exception::INDEX_NOT_FOUND); + throw new Exception($this->getNotFoundException()); } - $response->dynamic($index, UtopiaResponse::MODEL_INDEX); + $response->dynamic($index, $this->getResponseModel()); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index b11806cfd0..45627654dc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -1,6 +1,6 @@ setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/indexes') ->desc('List indexes') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', - group: 'indexes', - name: 'listIndexes', + group: $this->getSdkGroup(), + name: self::getName(), description: '/docs/references/databases/list-indexes.md', auth: [AuthType::KEY], responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_INDEX_LIST, + model: $this->getResponseModel(), ) ], contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') ->param('queries', [], new Indexes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Indexes::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') ->callback([$this, 'action']); } - public function action(string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject): void + public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject): void { /** @var Document $database */ $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -69,10 +73,11 @@ class XList extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $table = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); - if ($table->isEmpty()) { - throw new Exception(Exception::TABLE_NOT_FOUND); + if ($collection->isEmpty()) { + // table or collection. + throw new Exception($this->getGrantParentNotFoundException()); } $queries = Query::parseQueries($queries); @@ -80,7 +85,7 @@ class XList extends Action \array_push( $queries, Query::equal('databaseId', [$databaseId]), - Query::equal('collectionId', [$tableId]), + Query::equal('collectionId', [$collectionId]), ); /** @@ -99,7 +104,7 @@ class XList extends Action $indexId = $cursor->getValue(); $cursorDocument = Authorization::skip(fn () => $dbForProject->find('indexes', [ - Query::equal('collectionInternalId', [$table->getInternalId()]), + Query::equal('collectionInternalId', [$collection->getInternalId()]), Query::equal('databaseInternalId', [$database->getInternalId()]), Query::equal('key', [$indexId]), Query::limit(1) @@ -117,12 +122,15 @@ class XList extends Action $total = $dbForProject->count('indexes', $filterQueries, APP_LIMIT_COUNT); $indexes = $dbForProject->find('indexes', $queries); } catch (OrderException $e) { - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); + $documents = $this->isCollectionsAPI() ? 'documents' : 'rows'; + $attribute = $this->isCollectionsAPI() ? 'attribute' : 'column'; + $message = "The order $attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all $documents order $attribute values are non-null."; + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, $message); } $response->dynamic(new Document([ 'total' => $total, 'indexes' => $indexes, - ]), UtopiaResponse::MODEL_INDEX_LIST); + ]), $this->getResponseModel()); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php new file mode 100644 index 0000000000..844a317de7 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php @@ -0,0 +1,72 @@ +setContext(DATABASE_COLUMN_INDEX_CONTEXT); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) + ->setHttpPath('/v1/databases/:databaseId/tables/:tables/indexes') + ->desc('Create index') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].tables.[tables].indexes.[indexId].create') + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'index.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/create-index.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_ACCEPTED, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', null, new Key(), 'Index Key.') + ->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE]), 'Index type.') + ->param('columns', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of columns to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' columns are allowed, each 32 characters long.') + ->param('orders', [], new ArrayList(new WhiteList(['ASC', 'DESC'], false, Database::VAR_STRING), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index orders. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' orders are allowed.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback(function (string $databaseId, string $tableId, string $key, string $type, array $columns, array $orders, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $type, $columns, $orders, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php new file mode 100644 index 0000000000..d4185cfcbe --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php @@ -0,0 +1,71 @@ +setContext(DATABASE_COLUMN_INDEX_CONTEXT); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') + ->desc('Delete index') + ->groups(['api', 'database']) + ->label('scope', 'collections.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].update') + ->label('audits.event', 'index.delete') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/delete-index.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', '', new Key(), 'Index Key.') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForDatabase') + ->inject('queueForEvents') + ->callback(function (string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { + parent::action($databaseId, $tableId, $key, $response, $dbForProject, $queueForDatabase, $queueForEvents); + }); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php new file mode 100644 index 0000000000..ee0432522c --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php @@ -0,0 +1,60 @@ +setContext(DATABASE_COLUMN_INDEX_CONTEXT); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') + ->desc('Get index') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/get-index.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('key', null, new Key(), 'Index Key.') + ->inject('response') + ->inject('dbForProject') + ->callback(function (string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject) { + parent::action($databaseId, $tableId, $key, $response, $dbForProject); + }); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php new file mode 100644 index 0000000000..50c1eb11d1 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php @@ -0,0 +1,60 @@ +setContext(DATABASE_COLUMN_INDEX_CONTEXT); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') + ->desc('List indexes') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('sdk', new Method( + namespace: 'databases', + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/list-indexes.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('queries', [], new Indexes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Indexes::ALLOWED_ATTRIBUTES), true) + ->inject('response') + ->inject('dbForProject') + ->callback(function (string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject) { + parent::action($databaseId, $tableId, $queries, $response, $dbForProject); + }); + } +} From 6fba4a5f08e3b2a7ac9258424c6bf040ee275b20 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 14:20:11 +0530 Subject: [PATCH 067/362] update: sdk namespaces. --- .../Http/Databases/Collections/Attributes/Action.php | 8 ++++++++ .../Databases/Collections/Attributes/Boolean/Create.php | 2 +- .../Databases/Collections/Attributes/Boolean/Update.php | 2 +- .../Databases/Collections/Attributes/Datetime/Create.php | 2 +- .../Databases/Collections/Attributes/Datetime/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Delete.php | 2 +- .../Databases/Collections/Attributes/Email/Create.php | 2 +- .../Databases/Collections/Attributes/Email/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Enum/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Enum/Update.php | 2 +- .../Databases/Collections/Attributes/Float/Create.php | 2 +- .../Databases/Collections/Attributes/Float/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Get.php | 2 +- .../Http/Databases/Collections/Attributes/IP/Create.php | 2 +- .../Http/Databases/Collections/Attributes/IP/Update.php | 2 +- .../Databases/Collections/Attributes/Integer/Create.php | 2 +- .../Databases/Collections/Attributes/Integer/Update.php | 2 +- .../Collections/Attributes/Relationship/Create.php | 2 +- .../Collections/Attributes/Relationship/Update.php | 2 +- .../Databases/Collections/Attributes/String/Create.php | 2 +- .../Databases/Collections/Attributes/String/Update.php | 2 +- .../Http/Databases/Collections/Attributes/URL/Create.php | 2 +- .../Http/Databases/Collections/Attributes/URL/Update.php | 2 +- .../Http/Databases/Collections/Attributes/XList.php | 2 +- .../Http/Databases/Collections/Documents/Action.php | 8 ++++++++ .../Http/Databases/Collections/Documents/Create.php | 2 +- .../Http/Databases/Collections/Documents/Delete.php | 2 +- .../Http/Databases/Collections/Documents/Get.php | 2 +- .../Http/Databases/Collections/Documents/Logs/XList.php | 2 +- .../Http/Databases/Collections/Documents/Update.php | 2 +- .../Http/Databases/Collections/Documents/XList.php | 2 +- .../Http/Databases/Collections/Indexes/Action.php | 8 ++++++++ .../Http/Databases/Collections/Indexes/Create.php | 2 +- .../Http/Databases/Collections/Indexes/Delete.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Get.php | 2 +- .../Http/Databases/Collections/Indexes/XList.php | 2 +- .../Http/Databases/Tables/Columns/Boolean/Create.php | 2 +- .../Http/Databases/Tables/Columns/Boolean/Update.php | 2 +- .../Http/Databases/Tables/Columns/Datetime/Create.php | 2 +- .../Http/Databases/Tables/Columns/Datetime/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Delete.php | 2 +- .../Http/Databases/Tables/Columns/Email/Create.php | 2 +- .../Http/Databases/Tables/Columns/Email/Update.php | 2 +- .../Http/Databases/Tables/Columns/Enum/Create.php | 2 +- .../Http/Databases/Tables/Columns/Enum/Update.php | 2 +- .../Http/Databases/Tables/Columns/Float/Create.php | 2 +- .../Http/Databases/Tables/Columns/Float/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Get.php | 2 +- .../Databases/Http/Databases/Tables/Columns/IP/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/IP/Update.php | 2 +- .../Http/Databases/Tables/Columns/Integer/Create.php | 2 +- .../Http/Databases/Tables/Columns/Integer/Update.php | 2 +- .../Http/Databases/Tables/Columns/Relationship/Create.php | 2 +- .../Http/Databases/Tables/Columns/Relationship/Update.php | 2 +- .../Http/Databases/Tables/Columns/String/Create.php | 2 +- .../Http/Databases/Tables/Columns/String/Update.php | 2 +- .../Http/Databases/Tables/Columns/URL/Create.php | 2 +- .../Http/Databases/Tables/Columns/URL/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/XList.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Create.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Delete.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Get.php | 2 +- .../Databases/Http/Databases/Tables/Indexes/Create.php | 2 +- .../Databases/Http/Databases/Tables/Indexes/Delete.php | 2 +- .../Databases/Http/Databases/Tables/Indexes/Get.php | 2 +- .../Databases/Http/Databases/Tables/Indexes/XList.php | 2 +- .../Databases/Http/Databases/Tables/Logs/XList.php | 2 +- .../Databases/Http/Databases/Tables/Rows/Create.php | 2 +- .../Databases/Http/Databases/Tables/Rows/Delete.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Get.php | 2 +- .../Databases/Http/Databases/Tables/Rows/Logs/XList.php | 2 +- .../Databases/Http/Databases/Tables/Rows/Update.php | 2 +- .../Databases/Http/Databases/Tables/Rows/XList.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Update.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Usage/Get.php | 2 +- .../Modules/Databases/Http/Databases/Tables/XList.php | 2 +- 76 files changed, 97 insertions(+), 73 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index fff070d58f..b683ebd64c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -76,6 +76,14 @@ abstract class Action extends UtopiaAction return $this->isCollectionsAPI() ? 'attributes' : 'columns'; } + /** + * Get the SDK namespace for the current action. + */ + final protected function getSdkNamespace(): string + { + return $this->isCollectionsAPI() ? 'collections' : 'tables'; + } + /** * Get the correct parent param key (e.g. `tableId` or `collectionId`) */ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php index d70188e621..56c0753f08 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php @@ -44,7 +44,7 @@ class Create extends Action ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-boolean-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php index 73739e1d91..c8aa734570 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php @@ -44,7 +44,7 @@ class Update extends Action ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-boolean-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php index 50e20a5c56..e3e0cc359b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php @@ -45,7 +45,7 @@ class Create extends Action ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-datetime-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php index afac2904ff..eac9ba278c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php @@ -45,7 +45,7 @@ class Update extends Action ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-datetime-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 444fa41a7f..2432ac5fd0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -46,7 +46,7 @@ class Delete extends Action ->label('audits.event', 'attribute.delete') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/delete-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php index 2d64c00393..80309609b8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php @@ -45,7 +45,7 @@ class Create extends Action ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-email-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php index fcf5ab7fca..5c35084508 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php @@ -45,7 +45,7 @@ class Update extends Action ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-email-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index ea7370e493..8e4ad25f75 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -47,7 +47,7 @@ class Create extends Action ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-attribute-enum.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php index b8e855de99..be04a1ef9a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php @@ -46,7 +46,7 @@ class Update extends Action ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-enum-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php index 821f3134ab..4e3a8adf75 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php @@ -47,7 +47,7 @@ class Create extends Action ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-float-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php index 3ef7f5cae4..13a90310e1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php @@ -45,7 +45,7 @@ class Update extends Action ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-float-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index 226dcefa2b..e04a89295b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -49,7 +49,7 @@ class Get extends Action ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/get-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php index cb472fc2c8..4bf5edc09d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php @@ -45,7 +45,7 @@ class Create extends Action ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-ip-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php index 233672be03..380fa01123 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php @@ -45,7 +45,7 @@ class Update extends Action ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-ip-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php index 4bd45adf48..dc28e41264 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php @@ -47,7 +47,7 @@ class Create extends Action ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-integer-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php index e8197ba0d9..9e864e8b62 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php @@ -45,7 +45,7 @@ class Update extends Action ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-integer-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php index 5d799c11c9..193e3eaa09 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php @@ -47,7 +47,7 @@ class Create extends Action ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-relationship-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php index 5375135c28..b489f92c3d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php @@ -43,7 +43,7 @@ class Update extends Action ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-relationship-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index 6c8ec7e9e1..6463d2cedf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -48,7 +48,7 @@ class Create extends Action ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-string-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php index 059ad1e28c..e746edb766 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php @@ -47,7 +47,7 @@ class Update extends Action ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-string-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php index f7c948d43e..a802bbf8af 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php @@ -45,7 +45,7 @@ class Create extends Action ->label('audits.event', 'attribute.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-url-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php index 8fa53d79b4..9ca1f372dc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php @@ -45,7 +45,7 @@ class Update extends Action ->label('audits.event', 'attribute.update') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-url-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index c89ad043f3..29e8d1d6b9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -43,7 +43,7 @@ class XList extends Action ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/list-attributes.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index 2eabd376cf..b9a3247f96 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -59,6 +59,14 @@ abstract class Action extends UtopiaAction return $this->isCollectionsAPI() ? 'documents' : 'rows'; } + /** + * Get the SDK namespace for the current action. + */ + final protected function getSdkNamespace(): string + { + return $this->isCollectionsAPI() ? 'collections' : 'tables'; + } + /** * Get the correct parent param key (e.g. `tableId` or `collectionId`) */ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 6522ff377c..6db7e802f3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -58,7 +58,7 @@ class Create extends Action ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) ->label('sdk', [ new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-document.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index dcca07eed4..2f0c4e76db 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -53,7 +53,7 @@ class Delete extends Action ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/delete-document.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index 29cfb19013..f56ab40126 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -46,7 +46,7 @@ class Get extends Action ->label('scope', 'documents.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/get-document.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index 6c37d3e238..bb24d41b30 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -50,7 +50,7 @@ class XList extends Action ->label('scope', 'documents.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: 'logs', name: self::getName(), description: '/docs/references/databases/get-document-logs.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 5f6935abcb..4ad045a998 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -57,7 +57,7 @@ class Update extends Action ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-document.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 3ddbf8df7f..7b4f5855e2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -47,7 +47,7 @@ class XList extends Action ->label('scope', 'documents.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/list-documents.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php index 102acdb639..6186139bfb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php @@ -81,6 +81,14 @@ abstract class Action extends UtopiaAction return 'indexes'; } + /** + * Get the SDK namespace for the current action. + */ + final protected function getSdkNamespace(): string + { + return $this->isCollectionsAPI() ? 'collections' : 'tables'; + } + /** * Get the exception to throw when the parent is unknown. */ 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 aa4729e605..fe21025740 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 @@ -51,7 +51,7 @@ class Create extends Action ->label('audits.event', 'index.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-index.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index 157e4ef7de..2d57a8a5f0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -48,7 +48,7 @@ class Delete extends Action ->label('audits.event', 'index.delete') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/delete-index.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index 3e8a67b395..fa10406f2a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -39,7 +39,7 @@ class Get extends Action ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/get-index.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index 45627654dc..733e6854b2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -43,7 +43,7 @@ class XList extends Action ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/list-indexes.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php index 740bd89c0b..6f48afe57f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php @@ -45,7 +45,7 @@ class Create extends BooleanCreate ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-boolean-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php index a2254a5734..485a9587e3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php @@ -46,7 +46,7 @@ class Update extends BooleanUpdate ->label('audits.event', 'column.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-boolean-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php index ef0c61e1f4..1a5f6f65e1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php @@ -46,7 +46,7 @@ class Create extends DatetimeCreate ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-datetime-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php index 14e57d6a70..1eb13852e7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php @@ -47,7 +47,7 @@ class Update extends DatetimeUpdate ->label('audits.event', 'column.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-datetime-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php index 064e277942..10604029dd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php @@ -46,7 +46,7 @@ class Delete extends AttributesDelete ->label('audits.event', 'column.delete') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/delete-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php index 635b673e03..2d7b65931f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php @@ -46,7 +46,7 @@ class Create extends EmailCreate ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-email-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php index 0162633ed9..a067334a9d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php @@ -47,7 +47,7 @@ class Update extends EmailUpdate ->label('audits.event', 'column.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-email-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php index 942d49d86a..8fdb689b46 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php @@ -47,7 +47,7 @@ class Create extends EnumCreate ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-attribute-enum.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php index 2018170105..85e1c4e5cc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php @@ -48,7 +48,7 @@ class Update extends EnumUpdate ->label('audits.event', 'column.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-enum-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php index 13d26d0331..2ad2c11572 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php @@ -46,7 +46,7 @@ class Create extends FloatCreate ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-float-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php index 55c4c13505..ef6080b86c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php @@ -47,7 +47,7 @@ class Update extends FloatUpdate ->label('audits.event', 'column.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-float-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php index db83c3ecbc..42ba23ad3a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php @@ -50,7 +50,7 @@ class Get extends AttributesGet ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/get-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php index c0d671183c..34d5ecdfca 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php @@ -46,7 +46,7 @@ class Create extends IPCreate ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-ip-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php index e9092c38c5..34cfe97343 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php @@ -47,7 +47,7 @@ class Update extends IPUpdate ->label('audits.event', 'column.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-ip-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php index 26868fa667..13aa90b6e3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php @@ -46,7 +46,7 @@ class Create extends IntegerCreate ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-integer-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php index fa50515a10..6cf3383795 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php @@ -47,7 +47,7 @@ class Update extends IntegerUpdate ->label('audits.event', 'column.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-integer-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php index 4693d494c6..2e338ae037 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php @@ -46,7 +46,7 @@ class Create extends RelationshipCreate ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-relationship-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php index e110eafc56..1afdd0c56a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php @@ -45,7 +45,7 @@ class Update extends RelationshipUpdate ->label('audits.event', 'column.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-relationship-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php index 354aef6ff9..e17ac07ccf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php @@ -48,7 +48,7 @@ class Create extends StringCreate ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-string-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php index 649d481794..f64d5408eb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php @@ -49,7 +49,7 @@ class Update extends StringUpdate ->label('audits.event', 'column.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-string-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php index ce7c5dfe9f..a0f4e2ae8f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php @@ -46,7 +46,7 @@ class Create extends URLCreate ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-url-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php index 298165b2cf..623328e249 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php @@ -47,7 +47,7 @@ class Update extends URLUpdate ->label('audits.event', 'column.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-url-attribute.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php index 2e41fe86eb..a6b43518b9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php @@ -39,7 +39,7 @@ class XList extends AttributesXList ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/list-attributes.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index 1f349b95ed..6984ff0b5d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -47,7 +47,7 @@ class Create extends CollectionCreate ->label('audits.event', 'table.create') ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-collection.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php index 338d344660..5bce6fa519 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php @@ -44,7 +44,7 @@ class Delete extends CollectionDelete ->label('audits.event', 'table.delete') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/delete-collection.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php index ffa1da443e..b4ca31dbe0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php @@ -39,7 +39,7 @@ class Get extends CollectionGet ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/get-collection.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php index 844a317de7..97ac92d559 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php @@ -42,7 +42,7 @@ class Create extends IndexCreate ->label('audits.event', 'index.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-index.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php index d4185cfcbe..6a86a4767e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php @@ -44,7 +44,7 @@ class Delete extends IndexDelete ->label('audits.event', 'index.delete') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/delete-index.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php index ee0432522c..0cc537d960 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php @@ -35,7 +35,7 @@ class Get extends IndexGet ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/get-index.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php index 50c1eb11d1..5a245cf533 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php @@ -35,7 +35,7 @@ class XList extends IndexXList ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/list-indexes.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php index 9a6d4c4e8e..8783067f69 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php @@ -39,7 +39,7 @@ class XList extends CollectionLogXList ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/get-collection-logs.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index 26e14b9ca5..1773a4c2ff 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -52,7 +52,7 @@ class Create extends DocumentCreate ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) ->label('sdk', [ new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-document.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php index c0cc4b0dd1..05a98d6096 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php @@ -53,7 +53,7 @@ class Delete extends DocumentDelete ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/delete-document.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php index 0b74f19f41..717cec3721 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php @@ -42,7 +42,7 @@ class Get extends DocumentGet ->label('scope', 'documents.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/get-document.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php index 66ac69323c..23b70ac19e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php @@ -39,7 +39,7 @@ class XList extends DocumentLogXList ->label('scope', 'documents.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: 'logs', name: self::getName(), description: '/docs/references/databases/get-document-logs.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php index 7148452c74..0a83feee38 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php @@ -49,7 +49,7 @@ class Update extends DocumentUpdate ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-document.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php index 62fe6b52b0..f4bdbaa483 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php @@ -42,7 +42,7 @@ class XList extends DocumentXList ->label('scope', 'documents.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/list-documents.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index e60fbb4ac8..88b72322c1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -46,7 +46,7 @@ class Update extends CollectionUpdate ->label('audits.event', 'table.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-collection.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index 304884cece..3b2a40584e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -40,7 +40,7 @@ class Get extends CollectionUsageGet ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: null, name: self::getName(), description: '/docs/references/databases/get-collection-usage.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php index 10913cd491..733703d05f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php @@ -41,7 +41,7 @@ class XList extends CollectionXList ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/list-collections.md', From 97d1a535df35a3b584b5dc1e28280e5f585131a8 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 15:30:52 +0530 Subject: [PATCH 068/362] fix: missing path :\ --- .../Databases/Http/Databases/Collections/Documents/Update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 4ad045a998..be009b9cd2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -41,11 +41,11 @@ class Update extends Action return UtopiaResponse::MODEL_DOCUMENT; } - public function __construct() { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') ->desc('Update document') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].update') From d7023b5a6977d7a116ef8dad3439d77504e9dbc1 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 15:33:00 +0530 Subject: [PATCH 069/362] fix: namespaces. --- .../Platform/Modules/Databases/Http/Databases/Tables/Create.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Tables/Delete.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Tables/Get.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Tables/Update.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Tables/XList.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index 6984ff0b5d..1f349b95ed 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -47,7 +47,7 @@ class Create extends CollectionCreate ->label('audits.event', 'table.create') ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') ->label('sdk', new Method( - namespace: $this->getSdkNamespace(), + namespace: 'databases', group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/create-collection.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php index 5bce6fa519..338d344660 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php @@ -44,7 +44,7 @@ class Delete extends CollectionDelete ->label('audits.event', 'table.delete') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: $this->getSdkNamespace(), + namespace: 'databases', group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/delete-collection.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php index b4ca31dbe0..ffa1da443e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php @@ -39,7 +39,7 @@ class Get extends CollectionGet ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: $this->getSdkNamespace(), + namespace: 'databases', group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/get-collection.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index 88b72322c1..e60fbb4ac8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -46,7 +46,7 @@ class Update extends CollectionUpdate ->label('audits.event', 'table.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: $this->getSdkNamespace(), + namespace: 'databases', group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/update-collection.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php index 733703d05f..10913cd491 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php @@ -41,7 +41,7 @@ class XList extends CollectionXList ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: $this->getSdkNamespace(), + namespace: 'databases', group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/list-collections.md', From eafa9bb3934671a36594e3e7bd4f9e3bbd3c6d17 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 15:33:41 +0530 Subject: [PATCH 070/362] fix: namespaces, again. --- .../Modules/Databases/Http/Databases/Tables/Logs/XList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php index 8783067f69..9a6d4c4e8e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php @@ -39,7 +39,7 @@ class XList extends CollectionLogXList ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: $this->getSdkNamespace(), + namespace: 'databases', group: $this->getSdkGroup(), name: self::getName(), description: '/docs/references/databases/get-collection-logs.md', From c4a26fbb952ac16076989294c69134923b724781 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 15:37:00 +0530 Subject: [PATCH 071/362] =?UTF-8?q?fix:=20another=20pesky=20sdk=20namespac?= =?UTF-8?q?e=20=F0=9F=A4=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Databases/Http/Databases/Tables/Usage/Get.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index 3b2a40584e..304884cece 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -40,7 +40,7 @@ class Get extends CollectionUsageGet ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: $this->getSdkNamespace(), + namespace: 'databases', group: null, name: self::getName(), description: '/docs/references/databases/get-collection-usage.md', From 4e83fc856ab2e5debe82edfab3189cd621d6aae0 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 15:38:07 +0530 Subject: [PATCH 072/362] update: split service registrations into smaller registries. --- .../Modules/Databases/Services/Http.php | 169 ++---------------- .../Databases/Services/Registry/Base.php | 24 +++ .../Services/Registry/Collections.php | 140 +++++++++++++++ .../Databases/Services/Registry/Databases.php | 31 ++++ .../Databases/Services/Registry/Tables.php | 142 +++++++++++++++ 5 files changed, 347 insertions(+), 159 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Services/Registry/Base.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Services/Registry/Databases.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Http.php b/src/Appwrite/Platform/Modules/Databases/Services/Http.php index 26a4aa0942..6c1361b0b1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Http.php @@ -2,61 +2,9 @@ namespace Appwrite\Platform\Modules\Databases\Services; -use Appwrite\Platform\Modules\Databases\Http\Collections\Create as CreateCollection; -use Appwrite\Platform\Modules\Databases\Http\Collections\Delete as DeleteCollection; -use Appwrite\Platform\Modules\Databases\Http\Collections\Get as GetCollection; -use Appwrite\Platform\Modules\Databases\Http\Collections\Logs\XList as ListCollectionLogs; -use Appwrite\Platform\Modules\Databases\Http\Collections\Update as UpdateCollection; -use Appwrite\Platform\Modules\Databases\Http\Collections\Usage\Get as GetCollectionUsage; -use Appwrite\Platform\Modules\Databases\Http\Collections\XList as ListCollections; -use Appwrite\Platform\Modules\Databases\Http\Columns\Boolean\Create as CreateBoolean; -use Appwrite\Platform\Modules\Databases\Http\Columns\Boolean\Update as UpdateBoolean; -use Appwrite\Platform\Modules\Databases\Http\Columns\Datetime\Create as CreateDatetime; -use Appwrite\Platform\Modules\Databases\Http\Columns\Datetime\Update as UpdateDatetime; -use Appwrite\Platform\Modules\Databases\Http\Columns\Delete as DeleteColumn; -use Appwrite\Platform\Modules\Databases\Http\Columns\Email\Create as CreateEmail; -use Appwrite\Platform\Modules\Databases\Http\Columns\Email\Update as UpdateEmail; -use Appwrite\Platform\Modules\Databases\Http\Columns\Enum\Create as CreateEnum; -use Appwrite\Platform\Modules\Databases\Http\Columns\Enum\Update as UpdateEnum; -use Appwrite\Platform\Modules\Databases\Http\Columns\Float\Create as CreateFloat; -use Appwrite\Platform\Modules\Databases\Http\Columns\Float\Update as UpdateFloat; -use Appwrite\Platform\Modules\Databases\Http\Columns\Get as GetColumn; -use Appwrite\Platform\Modules\Databases\Http\Columns\Integer\Create as CreateInteger; -use Appwrite\Platform\Modules\Databases\Http\Columns\Integer\Update as UpdateInteger; -use Appwrite\Platform\Modules\Databases\Http\Columns\IP\Create as CreateIP; -use Appwrite\Platform\Modules\Databases\Http\Columns\IP\Update as UpdateIP; -use Appwrite\Platform\Modules\Databases\Http\Columns\Relationship\Create as CreateRelationship; -use Appwrite\Platform\Modules\Databases\Http\Columns\Relationship\Update as UpdateRelationship; -use Appwrite\Platform\Modules\Databases\Http\Columns\String\Create as CreateString; -use Appwrite\Platform\Modules\Databases\Http\Columns\String\Update as UpdateString; -use Appwrite\Platform\Modules\Databases\Http\Columns\URL\Create as CreateURL; -use Appwrite\Platform\Modules\Databases\Http\Columns\URL\Update as UpdateURL; -use Appwrite\Platform\Modules\Databases\Http\Columns\XList as ListColumns; -use Appwrite\Platform\Modules\Databases\Http\Databases\Create as CreateDatabase; -use Appwrite\Platform\Modules\Databases\Http\Databases\Delete as DeleteDatabase; -use Appwrite\Platform\Modules\Databases\Http\Databases\Get as GetDatabase; -use Appwrite\Platform\Modules\Databases\Http\Databases\Logs\XList as ListDatabaseLogs; -use Appwrite\Platform\Modules\Databases\Http\Databases\Update as UpdateDatabase; -use Appwrite\Platform\Modules\Databases\Http\Databases\Usage\Get as GetDatabaseUsage; -use Appwrite\Platform\Modules\Databases\Http\Databases\Usage\XList as ListDatabaseUsage; -use Appwrite\Platform\Modules\Databases\Http\Databases\XList as ListDatabases; -use Appwrite\Platform\Modules\Databases\Http\Indexes\Create as CreateIndex; -use Appwrite\Platform\Modules\Databases\Http\Indexes\Delete as DeleteIndex; -use Appwrite\Platform\Modules\Databases\Http\Indexes\Get as GetIndex; -use Appwrite\Platform\Modules\Databases\Http\Indexes\XList as ListIndexes; -use Appwrite\Platform\Modules\Databases\Http\Rows\Create as CreateRow; -use Appwrite\Platform\Modules\Databases\Http\Rows\Delete as DeleteRow; -use Appwrite\Platform\Modules\Databases\Http\Rows\Get as GetRow; -use Appwrite\Platform\Modules\Databases\Http\Rows\Logs\XList as ListRowLogs; -use Appwrite\Platform\Modules\Databases\Http\Rows\Update as UpdateRow; -use Appwrite\Platform\Modules\Databases\Http\Rows\XList as ListRows; -use Appwrite\Platform\Modules\Databases\Http\Tables\Create as CreateTable; -use Appwrite\Platform\Modules\Databases\Http\Tables\Delete as DeleteTable; -use Appwrite\Platform\Modules\Databases\Http\Tables\Get as GetTable; -use Appwrite\Platform\Modules\Databases\Http\Tables\Logs\XList as ListTableLogs; -use Appwrite\Platform\Modules\Databases\Http\Tables\Update as UpdateTable; -use Appwrite\Platform\Modules\Databases\Http\Tables\Usage\Get as GetTableUsage; -use Appwrite\Platform\Modules\Databases\Http\Tables\XList as ListTables; +use Appwrite\Platform\Modules\Databases\Services\Registry\Collections as CollectionsRegistry; +use Appwrite\Platform\Modules\Databases\Services\Registry\Databases as DatabasesRegistry; +use Appwrite\Platform\Modules\Databases\Services\Registry\Tables as TablesRegistry; use Utopia\Platform\Service; class Http extends Service @@ -65,109 +13,12 @@ class Http extends Service { $this->type = Service::TYPE_HTTP; - $this->registerDatabaseActions(); - $this->registerCollectionAndTableActions(); - $this->registerColumnActions(); - $this->registerIndexActions(); - $this->registerRowActions(); - } - - private function registerDatabaseActions(): void - { - $this->addAction(CreateDatabase::getName(), new CreateDatabase()); - $this->addAction(GetDatabase::getName(), new GetDatabase()); - $this->addAction(UpdateDatabase::getName(), new UpdateDatabase()); - $this->addAction(DeleteDatabase::getName(), new DeleteDatabase()); - $this->addAction(ListDatabases::getName(), new ListDatabases()); - $this->addAction(ListDatabaseLogs::getName(), new ListDatabaseLogs()); - $this->addAction(GetDatabaseUsage::getName(), new GetDatabaseUsage()); - $this->addAction(ListDatabaseUsage::getName(), new ListDatabaseUsage()); - } - - private function registerCollectionAndTableActions(): void - { - // Collections - $this->addAction(CreateCollection::getName(), new CreateCollection()); - $this->addAction(GetCollection::getName(), new GetCollection()); - $this->addAction(UpdateCollection::getName(), new UpdateCollection()); - $this->addAction(DeleteCollection::getName(), new DeleteCollection()); - $this->addAction(ListCollections::getName(), new ListCollections()); - $this->addAction(ListCollectionLogs::getName(), new ListCollectionLogs()); - $this->addAction(GetCollectionUsage::getName(), new GetCollectionUsage()); - - // Tables - $this->addAction(CreateTable::getName(), new CreateTable()); - $this->addAction(GetTable::getName(), new GetTable()); - $this->addAction(UpdateTable::getName(), new UpdateTable()); - $this->addAction(DeleteTable::getName(), new DeleteTable()); - $this->addAction(ListTables::getName(), new ListTables()); - $this->addAction(ListTableLogs::getName(), new ListTableLogs()); - $this->addAction(GetTableUsage::getName(), new GetTableUsage()); - } - - private function registerColumnActions(): void - { - // Column top level actions - $this->addAction(GetColumn::getName(), new GetColumn()); - $this->addAction(DeleteColumn::getName(), new DeleteColumn()); - $this->addAction(ListColumns::getName(), new ListColumns()); - - // Column: Boolean - $this->addAction(CreateBoolean::getName(), new CreateBoolean()); - $this->addAction(UpdateBoolean::getName(), new UpdateBoolean()); - - // Column: Datetime - $this->addAction(CreateDatetime::getName(), new CreateDatetime()); - $this->addAction(UpdateDatetime::getName(), new UpdateDatetime()); - - // Column: Email - $this->addAction(CreateEmail::getName(), new CreateEmail()); - $this->addAction(UpdateEmail::getName(), new UpdateEmail()); - - // Column: Enum - $this->addAction(CreateEnum::getName(), new CreateEnum()); - $this->addAction(UpdateEnum::getName(), new UpdateEnum()); - - // Column: Float - $this->addAction(CreateFloat::getName(), new CreateFloat()); - $this->addAction(UpdateFloat::getName(), new UpdateFloat()); - - // Column: Integer - $this->addAction(CreateInteger::getName(), new CreateInteger()); - $this->addAction(UpdateInteger::getName(), new UpdateInteger()); - - // Column: IP - $this->addAction(CreateIP::getName(), new CreateIP()); - $this->addAction(UpdateIP::getName(), new UpdateIP()); - - // Column: Relationship - $this->addAction(CreateRelationship::getName(), new CreateRelationship()); - $this->addAction(UpdateRelationship::getName(), new UpdateRelationship()); - - // Column: String - $this->addAction(CreateString::getName(), new CreateString()); - $this->addAction(UpdateString::getName(), new UpdateString()); - - // Column: URL - $this->addAction(CreateURL::getName(), new CreateURL()); - $this->addAction(UpdateURL::getName(), new UpdateURL()); - } - - private function registerIndexActions(): void - { - $this->addAction(CreateIndex::getName(), new CreateIndex()); - $this->addAction(GetIndex::getName(), new GetIndex()); - $this->addAction(DeleteIndex::getName(), new DeleteIndex()); - $this->addAction(ListIndexes::getName(), new ListIndexes()); - } - - private function registerRowActions(): void - { - $this->addAction(CreateRow::getName(), new CreateRow()); - $this->addAction(GetRow::getName(), new GetRow()); - $this->addAction(UpdateRow::getName(), new UpdateRow()); - $this->addAction(DeleteRow::getName(), new DeleteRow()); - $this->addAction(ListRows::getName(), new ListRows()); - $this->addAction(ListRowLogs::getName(), new ListRowLogs()); + foreach ([ + DatabasesRegistry::class, + CollectionsRegistry::class, + TablesRegistry::class, + ] as $registrar) { + new $registrar($this); + } } } diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Base.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Base.php new file mode 100644 index 0000000000..43bc4b2959 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Base.php @@ -0,0 +1,24 @@ +register($service); + } + + /** + * Register all HTTP actions related to this module. + */ + abstract protected function register(Service $service): void; +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php new file mode 100644 index 0000000000..7b629bca44 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php @@ -0,0 +1,140 @@ +registerCollectionActions($service); + $this->registerDocumentActions($service); + $this->registerAttributeActions($service); + $this->registerIndexActions($service); + } + + private function registerCollectionActions(Service $service): void + { + $service->addAction(CreateCollection::getName(), new CreateCollection()); + $service->addAction(GetCollection::getName(), new GetCollection()); + $service->addAction(UpdateCollection::getName(), new UpdateCollection()); + $service->addAction(DeleteCollection::getName(), new DeleteCollection()); + $service->addAction(ListCollections::getName(), new ListCollections()); + $service->addAction(ListCollectionLogs::getName(), new ListCollectionLogs()); + $service->addAction(GetCollectionUsage::getName(), new GetCollectionUsage()); + } + + private function registerDocumentActions(Service $service): void + { + $service->addAction(CreateDocument::getName(), new CreateDocument()); + $service->addAction(GetDocument::getName(), new GetDocument()); + $service->addAction(UpdateDocument::getName(), new UpdateDocument()); + $service->addAction(DeleteDocument::getName(), new DeleteDocument()); + $service->addAction(ListDocuments::getName(), new ListDocuments()); + } + + private function registerAttributeActions(Service $service): void + { + // Attribute top-level actions + $service->addAction(GetAttribute::getName(), new GetAttribute()); + $service->addAction(DeleteAttribute::getName(), new DeleteAttribute()); + $service->addAction(ListAttributes::getName(), new ListAttributes()); + + // Attribute: Boolean + $service->addAction(CreateBooleanAttribute::getName(), new CreateBooleanAttribute()); + $service->addAction(UpdateBooleanAttribute::getName(), new UpdateBooleanAttribute()); + + // Attribute: Datetime + $service->addAction(CreateDatetimeAttribute::getName(), new CreateDatetimeAttribute()); + $service->addAction(UpdateDatetimeAttribute::getName(), new UpdateDatetimeAttribute()); + + // Attribute: Email + $service->addAction(CreateEmailAttribute::getName(), new CreateEmailAttribute()); + $service->addAction(UpdateEmailAttribute::getName(), new UpdateEmailAttribute()); + + // Attribute: Enum + $service->addAction(CreateEnumAttribute::getName(), new CreateEnumAttribute()); + $service->addAction(UpdateEnumAttribute::getName(), new UpdateEnumAttribute()); + + // Attribute: Float + $service->addAction(CreateFloatAttribute::getName(), new CreateFloatAttribute()); + $service->addAction(UpdateFloatAttribute::getName(), new UpdateFloatAttribute()); + + // Attribute: Integer + $service->addAction(CreateIntegerAttribute::getName(), new CreateIntegerAttribute()); + $service->addAction(UpdateIntegerAttribute::getName(), new UpdateIntegerAttribute()); + + // Attribute: IP + $service->addAction(CreateIPAttribute::getName(), new CreateIPAttribute()); + $service->addAction(UpdateIPAttribute::getName(), new UpdateIPAttribute()); + + // Attribute: Relationship + $service->addAction(CreateRelationshipAttribute::getName(), new CreateRelationshipAttribute()); + $service->addAction(UpdateRelationshipAttribute::getName(), new UpdateRelationshipAttribute()); + + // Attribute: String + $service->addAction(CreateStringAttribute::getName(), new CreateStringAttribute()); + $service->addAction(UpdateStringAttribute::getName(), new UpdateStringAttribute()); + + // Attribute: URL + $service->addAction(CreateURLAttribute::getName(), new CreateURLAttribute()); + $service->addAction(UpdateURLAttribute::getName(), new UpdateURLAttribute()); + } + + private function registerIndexActions(Service $service): void + { + $service->addAction(CreateIndex::getName(), new CreateIndex()); + $service->addAction(GetIndex::getName(), new GetIndex()); + $service->addAction(DeleteIndex::getName(), new DeleteIndex()); + $service->addAction(ListIndexes::getName(), new ListIndexes()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Databases.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Databases.php new file mode 100644 index 0000000000..81c9174253 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Databases.php @@ -0,0 +1,31 @@ +addAction(CreateDatabase::getName(), new CreateDatabase()); + $service->addAction(GetDatabase::getName(), new GetDatabase()); + $service->addAction(UpdateDatabase::getName(), new UpdateDatabase()); + $service->addAction(DeleteDatabase::getName(), new DeleteDatabase()); + $service->addAction(ListDatabases::getName(), new ListDatabases()); + $service->addAction(ListDatabaseLogs::getName(), new ListDatabaseLogs()); + $service->addAction(GetDatabaseUsage::getName(), new GetDatabaseUsage()); + $service->addAction(ListDatabaseUsage::getName(), new ListDatabaseUsage()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php new file mode 100644 index 0000000000..5c544a9d1f --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php @@ -0,0 +1,142 @@ +registerTableActions($service); + $this->registerColumnActions($service); + $this->registerColumnIndexActions($service); + $this->registerRowActions($service); + } + + private function registerTableActions(Service $service): void + { + $service->addAction(CreateTable::getName(), new CreateTable()); + $service->addAction(GetTable::getName(), new GetTable()); + $service->addAction(UpdateTable::getName(), new UpdateTable()); + $service->addAction(DeleteTable::getName(), new DeleteTable()); + $service->addAction(ListTables::getName(), new ListTables()); + $service->addAction(ListTableLogs::getName(), new ListTableLogs()); + $service->addAction(GetTableUsage::getName(), new GetTableUsage()); + } + + private function registerColumnActions(Service $service): void + { + // Column top level actions + $service->addAction(GetColumn::getName(), new GetColumn()); + $service->addAction(DeleteColumn::getName(), new DeleteColumn()); + $service->addAction(ListColumns::getName(), new ListColumns()); + + // Column: Boolean + $service->addAction(CreateBoolean::getName(), new CreateBoolean()); + $service->addAction(UpdateBoolean::getName(), new UpdateBoolean()); + + // Column: Datetime + $service->addAction(CreateDatetime::getName(), new CreateDatetime()); + $service->addAction(UpdateDatetime::getName(), new UpdateDatetime()); + + // Column: Email + $service->addAction(CreateEmail::getName(), new CreateEmail()); + $service->addAction(UpdateEmail::getName(), new UpdateEmail()); + + // Column: Enum + $service->addAction(CreateEnum::getName(), new CreateEnum()); + $service->addAction(UpdateEnum::getName(), new UpdateEnum()); + + // Column: Float + $service->addAction(CreateFloat::getName(), new CreateFloat()); + $service->addAction(UpdateFloat::getName(), new UpdateFloat()); + + // Column: Integer + $service->addAction(CreateInteger::getName(), new CreateInteger()); + $service->addAction(UpdateInteger::getName(), new UpdateInteger()); + + // Column: IP + $service->addAction(CreateIP::getName(), new CreateIP()); + $service->addAction(UpdateIP::getName(), new UpdateIP()); + + // Column: Relationship + $service->addAction(CreateRelationship::getName(), new CreateRelationship()); + $service->addAction(UpdateRelationship::getName(), new UpdateRelationship()); + + // Column: String + $service->addAction(CreateString::getName(), new CreateString()); + $service->addAction(UpdateString::getName(), new UpdateString()); + + // Column: URL + $service->addAction(CreateURL::getName(), new CreateURL()); + $service->addAction(UpdateURL::getName(), new UpdateURL()); + } + + private function registerColumnIndexActions(Service $service): void + { + $service->addAction(CreateColumnIndex::getName(), new CreateColumnIndex()); + $service->addAction(GetColumnIndex::getName(), new GetColumnIndex()); + $service->addAction(DeleteColumnIndex::getName(), new DeleteColumnIndex()); + $service->addAction(ListColumnIndexes::getName(), new ListColumnIndexes()); + } + + private function registerRowActions(Service $service): void + { + $service->addAction(CreateRow::getName(), new CreateRow()); + $service->addAction(GetRow::getName(), new GetRow()); + $service->addAction(UpdateRow::getName(), new UpdateRow()); + $service->addAction(DeleteRow::getName(), new DeleteRow()); + $service->addAction(ListRows::getName(), new ListRows()); + $service->addAction(ListRowLogs::getName(), new ListRowLogs()); + } +} From 44a5fef3455d84f98f2434dbd0a5c94474e0530a Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 19:17:06 +0530 Subject: [PATCH 073/362] misc: name fixes. --- .../Collections/Attributes/Boolean/Create.php | 2 +- .../Collections/Attributes/Boolean/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Get.php | 6 +++--- .../Http/Databases/Collections/Attributes/XList.php | 3 +-- .../Http/Databases/Collections/Documents/Create.php | 8 ++++---- .../Http/Databases/Collections/Documents/Get.php | 2 +- .../Http/Databases/Collections/Documents/Update.php | 6 +++--- .../Http/Databases/Collections/Documents/XList.php | 6 +++--- .../Http/Databases/Collections/Indexes/Create.php | 12 ++++++------ .../Http/Databases/Tables/Indexes/Create.php | 7 ++++++- .../Http/Databases/Tables/Indexes/Delete.php | 7 ++++++- .../Databases/Http/Databases/Tables/Indexes/Get.php | 7 ++++++- .../Http/Databases/Tables/Indexes/XList.php | 7 ++++++- .../Modules/Databases/Services/Registry/Tables.php | 4 ++-- 14 files changed, 49 insertions(+), 30 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php index 56c0753f08..7eb6a109c0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php @@ -23,7 +23,7 @@ class Create extends Action public static function getName(): string { - return 'createBooleanColumn'; + return 'createBooleanAttribute'; } protected function getResponseModel(): string|array diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php index c8aa734570..9930ebdd8a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php @@ -23,7 +23,7 @@ class Update extends Action public static function getName(): string { - return 'updateBooleanColumn'; + return 'updateBooleanAttribute'; } protected function getResponseModel(): string|array diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index e04a89295b..3175efdd91 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -20,7 +20,7 @@ class Get extends Action public static function getName(): string { - return 'getColumn'; + return 'getAttribute'; } protected function getResponseModel(): string|array @@ -44,7 +44,7 @@ class Get extends Action $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') - ->desc('Get column') + ->desc('Get attribute') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) @@ -63,7 +63,7 @@ class Get extends Action )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('tableId', '', new UID(), 'Table ID.') - ->param('key', '', new Key(), 'Column Key.') + ->param('key', '', new Key(), 'Attribute Key.') ->inject('response') ->inject('dbForProject') ->callback([$this, 'action']); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index 29e8d1d6b9..fb77626021 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -7,7 +7,6 @@ use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Attributes; -use Appwrite\Utopia\Database\Validator\Queries\Columns; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; @@ -57,7 +56,7 @@ class XList extends Action )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') - ->param('queries', [], new Columns(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Attributes::ALLOWED_ATTRIBUTES), true) + ->param('queries', [], new Attributes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Attributes::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') ->callback([$this, 'action']); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 6db7e802f3..c66f205a8c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -179,7 +179,7 @@ class Create extends Action $relationships = \array_filter( $collection->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { @@ -261,7 +261,7 @@ class Create extends Action $relationships = \array_filter( $table->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { @@ -300,10 +300,10 @@ class Create extends Action ->dynamic($document, $this->getResponseModel()); $relationships = \array_map( - fn ($row) => $document->getAttribute('key'), + fn ($document) => $document->getAttribute('key'), \array_filter( $collection->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ) ); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index f56ab40126..aa01eebcdf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -113,7 +113,7 @@ class Get extends Action $relationships = \array_filter( $collection->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index be009b9cd2..9b373c7e17 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -159,7 +159,7 @@ class Update extends Action $relationships = \array_filter( $collection->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { @@ -256,7 +256,7 @@ class Update extends Action $relationships = \array_filter( $table->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ); foreach ($relationships as $relationship) { @@ -290,7 +290,7 @@ class Update extends Action fn ($row) => $document->getAttribute('key'), \array_filter( $collection->getAttribute('attributes', []), - fn ($column) => $column->getAttribute('type') === Database::VAR_RELATIONSHIP + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP ) ); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 7b4f5855e2..57af51d908 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -212,12 +212,12 @@ class XList extends Action } if ($select) { - foreach ($documents as $row) { + foreach ($documents as $document) { if (!$hasDatabaseId) { - $row->removeAttribute('$databaseId'); + $document->removeAttribute('$databaseId'); } if (!$hasCollectionId) { - $row->removeAttribute('$collectionId'); + $document->removeAttribute('$collectionId'); } } } 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 fe21025740..6370a32a4c 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 @@ -150,23 +150,23 @@ class Create extends Action throw new Exception($this->getParentUnknownException(), "Unknown $contextType: " . $attribute . ". Verify the $contextType name or create the $contextType."); } - $columnStatus = $oldAttributes[$attributeIndex]['status']; - $columnType = $oldAttributes[$attributeIndex]['type']; - $columnArray = $oldAttributes[$attributeIndex]['array'] ?? false; + $attributeStatus = $oldAttributes[$attributeIndex]['status']; + $attributeType = $oldAttributes[$attributeIndex]['type']; + $attributeArray = $oldAttributes[$attributeIndex]['array'] ?? false; - if ($columnType === Database::VAR_RELATIONSHIP) { + if ($attributeType === Database::VAR_RELATIONSHIP) { throw new Exception($this->getParentInvalidTypeException(), "Cannot create an index for a relationship $contextType: " . $oldAttributes[$attributeIndex]['key']); } // ensure attribute is available - if ($columnStatus !== 'available') { + if ($attributeStatus !== 'available') { $contextType = ucfirst($contextType); throw new Exception($this->getParentNotAvailableException(), "$contextType not available: " . $oldAttributes[$attributeIndex]['key']); } $lengths[$i] = null; - if ($columnArray === true) { + if ($attributeArray === true) { $lengths[$i] = Database::ARRAY_INDEX_LENGTH; $orders[$i] = null; } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php index 97ac92d559..77e31f4115 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php @@ -22,6 +22,11 @@ class Create extends IndexCreate { use HTTP; + public static function getName(): string + { + return 'createColumnIndex'; + } + protected function getResponseModel(): string { return UtopiaResponse::MODEL_COLUMN_INDEX; @@ -44,7 +49,7 @@ class Create extends IndexCreate ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), - name: self::getName(), + name: 'createIndex', // getName needs to be different from parent action to avoid conflict in path name description: '/docs/references/databases/create-index.md', auth: [AuthType::KEY], responses: [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php index 6a86a4767e..7a81942e32 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php @@ -20,6 +20,11 @@ class Delete extends IndexDelete { use HTTP; + public static function getName(): string + { + return 'updateColumnIndex'; + } + /** * 1. `SDKResponse` uses `UtopiaResponse::MODEL_NONE`. * 2. But we later need the actual return type for events queue below! @@ -46,7 +51,7 @@ class Delete extends IndexDelete ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), - name: self::getName(), + name: 'deleteIndex', // getName needs to be different from parent action to avoid conflict in path name description: '/docs/references/databases/delete-index.md', auth: [AuthType::KEY], responses: [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php index 0cc537d960..a765bfb975 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php @@ -18,6 +18,11 @@ class Get extends IndexGet { use HTTP; + public static function getName(): string + { + return 'getColumnIndex'; + } + protected function getResponseModel(): string { return UtopiaResponse::MODEL_COLUMN_INDEX; @@ -37,7 +42,7 @@ class Get extends IndexGet ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), - name: self::getName(), + name: 'getIndex', // getName needs to be different from parent action to avoid conflict in path name description: '/docs/references/databases/get-index.md', auth: [AuthType::KEY], responses: [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php index 5a245cf533..afce04fcf9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php @@ -18,6 +18,11 @@ class XList extends IndexXList { use HTTP; + public static function getName(): string + { + return 'listColumnIndexes'; + } + protected function getResponseModel(): string { return UtopiaResponse::MODEL_COLUMN_INDEX_LIST; @@ -37,7 +42,7 @@ class XList extends IndexXList ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), - name: self::getName(), + name: 'listIndexes', // getName needs to be different from parent action to avoid conflict in path name description: '/docs/references/databases/list-indexes.md', auth: [AuthType::KEY], responses: [ diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php index 5c544a9d1f..d881303c1e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php @@ -59,7 +59,7 @@ class Tables extends Base { $this->registerTableActions($service); $this->registerColumnActions($service); - $this->registerColumnIndexActions($service); + $this->registerIndexActions($service); $this->registerRowActions($service); } @@ -122,7 +122,7 @@ class Tables extends Base $service->addAction(UpdateURL::getName(), new UpdateURL()); } - private function registerColumnIndexActions(Service $service): void + private function registerIndexActions(Service $service): void { $service->addAction(CreateColumnIndex::getName(), new CreateColumnIndex()); $service->addAction(GetColumnIndex::getName(), new GetColumnIndex()); From 8006c9d60b62947e226963e37dceb3f491b004a3 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 19:36:59 +0530 Subject: [PATCH 074/362] misc: fixes. --- .../Collections/Attributes/Action.php | 24 +++++++++---------- .../Databases/Collections/Attributes/Get.php | 6 ++--- .../Collections/Attributes/XList.php | 4 ++-- .../Collections/Documents/Create.php | 12 +++++----- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index b683ebd64c..fcb9bcc2df 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -308,8 +308,8 @@ abstract class Action extends UtopiaAction if ($type === Database::VAR_RELATIONSHIP) { $options['side'] = Database::RELATION_SIDE_PARENT; - $relatedTable = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection'] ?? ''); - if ($relatedTable->isEmpty()) { + $relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection'] ?? ''); + if ($relatedCollection->isEmpty()) { $parent = $this->isCollectionsAPI() ? 'collection' : 'table'; throw new Exception($this->getParentNotFoundException(), "The related $parent was not found."); } @@ -359,12 +359,12 @@ abstract class Action extends UtopiaAction try { $twoWayAttribute = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $twoWayKey), + '$id' => ID::custom($db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $twoWayKey), 'key' => $twoWayKey, 'databaseInternalId' => $db->getInternalId(), 'databaseId' => $db->getId(), - 'collectionInternalId' => $relatedTable->getInternalId(), - 'collectionId' => $relatedTable->getId(), + 'collectionInternalId' => $relatedCollection->getInternalId(), + 'collectionId' => $relatedCollection->getId(), 'type' => $type, 'status' => 'processing', // processing, available, failed, deleting, stuck 'size' => $size, @@ -378,7 +378,7 @@ abstract class Action extends UtopiaAction 'options' => $options, ]); - $dbForProject->checkAttribute($relatedTable, $twoWayAttribute); + $dbForProject->checkAttribute($relatedCollection, $twoWayAttribute); $dbForProject->createDocument('attributes', $twoWayAttribute); } catch (DuplicateException) { $dbForProject->deleteDocument('attributes', $attribute->getId()); @@ -387,13 +387,13 @@ abstract class Action extends UtopiaAction $dbForProject->deleteDocument('attributes', $attribute->getId()); throw new Exception($this->getLimitException()); } catch (Throwable $e) { - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedCollection->getId()); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedCollection->getInternalId()); throw $e; } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedTable->getId()); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedTable->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedCollection->getId()); + $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedCollection->getInternalId()); } $queueForDatabase @@ -447,11 +447,11 @@ abstract class Action extends UtopiaAction throw new Exception($this->getNotAvailableException()); } - if ($attribute->getAttribute('type') !== $type) { + if ($attribute->getAttribute(('type') !== $type)) { throw new Exception($this->getTypeInvalidException()); } - if ($attribute->getAttribute('type') === Database::VAR_STRING && $attribute->getAttribute('filter') !== $filter) { + if ($attribute->getAttribute('type') === Database::VAR_STRING && $attribute->getAttribute(('filter') !== $filter)) { throw new Exception($this->getTypeInvalidException()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index 3175efdd91..96e40c750d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -62,21 +62,21 @@ class Get extends Action ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') ->param('key', '', new Key(), 'Attribute Key.') ->inject('response') ->inject('dbForProject') ->callback([$this, 'action']); } - public function action(string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject): void + public function action(string $databaseId, string $collectionId, string $key, UtopiaResponse $response, Database $dbForProject): void { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index fb77626021..7f2f23df62 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -62,14 +62,14 @@ class XList extends Action ->callback([$this, 'action']); } - public function action(string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject): void + public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject): void { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $tableId); + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index c66f205a8c..297d0f3543 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -197,9 +197,9 @@ class Create extends Action $relations = [$related]; } - $relatedTableId = $relationship->getAttribute('relatedCollection'); - $relatedTable = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedTableId) + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) ); foreach ($relations as &$relation) { @@ -213,7 +213,7 @@ class Create extends Action } if ($relation instanceof Document) { $current = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId(), $relation->getId()) + fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId(), $relation->getId()) ); if ($current->isEmpty()) { @@ -225,11 +225,11 @@ class Create extends Action } else { $relation->removeAttribute('$collectionId'); $relation->removeAttribute('$databaseId'); - $relation->setAttribute('$collection', $relatedTable->getId()); + $relation->setAttribute('$collection', $relatedCollection->getId()); $type = Database::PERMISSION_UPDATE; } - $checkPermissions($relatedTable, $relation, $type); + $checkPermissions($relatedCollection, $relation, $type); } } From 36e66170903e181b19e54c63f7fc93f5d8240650 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 19:47:35 +0530 Subject: [PATCH 075/362] update: the usage modals. --- app/controllers/api/project.php | 1 + .../Databases/Http/Databases/Usage/Get.php | 4 +++ .../Databases/Http/Databases/Usage/XList.php | 4 +++ .../Utopia/Response/Model/UsageDatabase.php | 23 ++++++++++++++-- .../Utopia/Response/Model/UsageDatabases.php | 27 ++++++++++++++++++- .../Utopia/Response/Model/UsageProject.php | 7 ++++- 6 files changed, 62 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index 047179b888..079fabb622 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -354,6 +354,7 @@ App::get('/v1/project/usage') 'executionsMbSecondsTotal' => $total[METRIC_EXECUTIONS_MB_SECONDS], 'buildsMbSecondsTotal' => $total[METRIC_BUILDS_MB_SECONDS], 'documentsTotal' => $total[METRIC_DOCUMENTS], + 'rowsTotal' => $total[METRIC_DOCUMENTS], 'databasesTotal' => $total[METRIC_DATABASES], 'databasesStorageTotal' => $total[METRIC_DATABASES_STORAGE], 'usersTotal' => $total[METRIC_USERS], diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index c4105effa0..222201d5ed 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -124,12 +124,16 @@ class Get extends Action $response->dynamic(new Document([ 'range' => $range, 'collectionsTotal' => $usage[$metrics[0]]['total'], + 'tablesTotal' => $usage[$metrics[0]]['total'], 'documentsTotal' => $usage[$metrics[1]]['total'], + 'rowsTotal' => $usage[$metrics[1]]['total'], 'storageTotal' => $usage[$metrics[2]]['total'], 'databaseReadsTotal' => $usage[$metrics[3]]['total'], 'databaseWritesTotal' => $usage[$metrics[4]]['total'], 'collections' => $usage[$metrics[0]]['data'], + 'tables' => $usage[$metrics[0]]['data'], 'documents' => $usage[$metrics[1]]['data'], + 'rows' => $usage[$metrics[1]]['data'], 'storage' => $usage[$metrics[2]]['data'], 'databaseReads' => $usage[$metrics[3]]['data'], 'databaseWrites' => $usage[$metrics[4]]['data'], diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php index 0078d54a4b..48533935b3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -117,13 +117,17 @@ class XList extends Action 'range' => $range, 'databasesTotal' => $usage[$metrics[0]]['total'], 'collectionsTotal' => $usage[$metrics[1]]['total'], + 'tablesTotal' => $usage[$metrics[1]]['total'], 'documentsTotal' => $usage[$metrics[2]]['total'], + 'rowsTotal' => $usage[$metrics[2]]['total'], 'storageTotal' => $usage[$metrics[3]]['total'], 'databasesReadsTotal' => $usage[$metrics[4]]['total'], 'databasesWritesTotal' => $usage[$metrics[5]]['total'], 'databases' => $usage[$metrics[0]]['data'], 'collections' => $usage[$metrics[1]]['data'], + 'tables' => $usage[$metrics[1]]['data'], 'documents' => $usage[$metrics[2]]['data'], + 'rows' => $usage[$metrics[2]]['data'], 'storage' => $usage[$metrics[3]]['data'], 'databasesReads' => $usage[$metrics[4]]['data'], 'databasesWrites' => $usage[$metrics[5]]['data'], diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php index 3adabae4c1..c7dc6d15ce 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php @@ -5,7 +5,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; -// TODO: check what do we use for - collectionsTotal, documentsTotal, collections, documents class UsageDatabase extends Model { public function __construct() @@ -23,12 +22,18 @@ class UsageDatabase extends Model 'default' => 0, 'example' => 0, ]) - ->addRule('collectionsTotal', [ + ->addRule('documentsTotal', [ 'type' => self::TYPE_INTEGER, 'description' => 'Total aggregated number of documents.', 'default' => 0, 'example' => 0, ]) + ->addRule('rowsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of rows.', + 'default' => 0, + 'example' => 0, + ]) ->addRule('storageTotal', [ 'type' => self::TYPE_INTEGER, 'description' => 'Total aggregated number of total storage used in bytes.', @@ -54,6 +59,13 @@ class UsageDatabase extends Model 'example' => [], 'array' => true ]) + ->addRule('tables', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated number of tables per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) ->addRule('documents', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated number of documents per period.', @@ -61,6 +73,13 @@ class UsageDatabase extends Model 'example' => [], 'array' => true ]) + ->addRule('rows', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated number of rows per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) ->addRule('storage', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated storage used in bytes per period.', diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php index ae93182c0f..67568c858c 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabases.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabases.php @@ -5,7 +5,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; -// TODO: check what do we use for - collectionsTotal, documentsTotal, collections, documents class UsageDatabases extends Model { public function __construct() @@ -29,12 +28,24 @@ class UsageDatabases extends Model 'default' => 0, 'example' => 0, ]) + ->addRule('tablesTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of tables.', + 'default' => 0, + 'example' => 0, + ]) ->addRule('documentsTotal', [ 'type' => self::TYPE_INTEGER, 'description' => 'Total aggregated number of documents.', 'default' => 0, 'example' => 0, ]) + ->addRule('rowsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of rows.', + 'default' => 0, + 'example' => 0, + ]) ->addRule('storageTotal', [ 'type' => self::TYPE_INTEGER, 'description' => 'Total aggregated number of total databases storage in bytes.', @@ -67,6 +78,13 @@ class UsageDatabases extends Model 'example' => [], 'array' => true ]) + ->addRule('tables', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated number of tables per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) ->addRule('documents', [ 'type' => Response::MODEL_METRIC, 'description' => 'Aggregated number of documents per period.', @@ -74,6 +92,13 @@ class UsageDatabases extends Model 'example' => [], 'array' => true ]) + ->addRule('rows', [ + 'type' => Response::MODEL_METRIC, + 'description' => 'Aggregated number of rows per period.', + 'default' => [], + 'example' => [], + 'array' => true + ]) ->addRule('storage', [ 'type' => Response::MODEL_METRIC, 'description' => 'An array of the aggregated number of databases storage in bytes per period.', diff --git a/src/Appwrite/Utopia/Response/Model/UsageProject.php b/src/Appwrite/Utopia/Response/Model/UsageProject.php index 70f8003cfd..ee644aa845 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageProject.php +++ b/src/Appwrite/Utopia/Response/Model/UsageProject.php @@ -5,7 +5,6 @@ namespace Appwrite\Utopia\Response\Model; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response\Model; -// TODO: check what do we use for - documents. class UsageProject extends Model { public function __construct() @@ -23,6 +22,12 @@ class UsageProject extends Model 'default' => 0, 'example' => 0, ]) + ->addRule('rowsTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of rows.', + 'default' => 0, + 'example' => 0, + ]) ->addRule('databasesTotal', [ 'type' => self::TYPE_INTEGER, 'description' => 'Total aggregated number of databases.', From 5c0717458f00e126176787bcf0297074fbfa86b5 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 19:51:16 +0530 Subject: [PATCH 076/362] update: the usage model. --- src/Appwrite/Utopia/Response/Model/UsageDatabase.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php index c7dc6d15ce..990a2b3ee9 100644 --- a/src/Appwrite/Utopia/Response/Model/UsageDatabase.php +++ b/src/Appwrite/Utopia/Response/Model/UsageDatabase.php @@ -22,6 +22,12 @@ class UsageDatabase extends Model 'default' => 0, 'example' => 0, ]) + ->addRule('tablesTotal', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Total aggregated number of tables.', + 'default' => 0, + 'example' => 0, + ]) ->addRule('documentsTotal', [ 'type' => self::TYPE_INTEGER, 'description' => 'Total aggregated number of documents.', From c5074fd52fc9d132e706e59f22a5254c54962684 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 19:53:31 +0530 Subject: [PATCH 077/362] update: move around tests. --- .../{ => Collections}/DatabasesBase.php | 518 +++++++++--------- .../DatabasesConsoleClientTest.php | 20 +- .../DatabasesCustomClientTest.php | 70 +-- .../DatabasesCustomServerTest.php | 336 ++++++------ .../DatabasesPermissionsGuestTest.php | 24 +- .../DatabasesPermissionsMemberTest.php | 18 +- .../DatabasesPermissionsScope.php | 2 +- .../DatabasesPermissionsTeamTest.php | 14 +- 8 files changed, 500 insertions(+), 502 deletions(-) rename tests/e2e/Services/Databases/{ => Collections}/DatabasesBase.php (93%) rename tests/e2e/Services/Databases/{ => Collections}/DatabasesConsoleClientTest.php (95%) rename tests/e2e/Services/Databases/{ => Collections}/DatabasesCustomClientTest.php (94%) rename tests/e2e/Services/Databases/{ => Collections}/DatabasesCustomServerTest.php (94%) rename tests/e2e/Services/Databases/{ => Collections}/DatabasesPermissionsGuestTest.php (95%) rename tests/e2e/Services/Databases/{ => Collections}/DatabasesPermissionsMemberTest.php (96%) rename tests/e2e/Services/Databases/{ => Collections}/DatabasesPermissionsScope.php (98%) rename tests/e2e/Services/Databases/{ => Collections}/DatabasesPermissionsTeamTest.php (95%) diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/Collections/DatabasesBase.php similarity index 93% rename from tests/e2e/Services/Databases/DatabasesBase.php rename to tests/e2e/Services/Databases/Collections/DatabasesBase.php index 3c2a2c4186..9244e240f7 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Collections/DatabasesBase.php @@ -1,6 +1,6 @@ $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Movies', 'documentSecurity' => true, 'permissions' => [ @@ -67,7 +66,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Actors', 'documentSecurity' => true, 'permissions' => [ @@ -88,7 +87,7 @@ trait DatabasesBase /** * @depends testCreateCollection */ - public function testConsoleProject(array $data) + public function testConsoleProject(array $data): void { if ($this->getSide() === 'server') { // Server side can't get past the invalid key check anyway @@ -148,7 +147,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Captain America', ], @@ -275,7 +274,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $data['actorsId'], + 'relatedCollectionId' => $data['actorsId'], 'type' => 'oneToMany', 'twoWay' => true, 'key' => 'starringActors', @@ -339,7 +338,7 @@ trait DatabasesBase $this->assertEquals($relationship['headers']['status-code'], 202); $this->assertEquals($relationship['body']['key'], 'starringActors'); $this->assertEquals($relationship['body']['type'], 'relationship'); - $this->assertEquals($relationship['body']['relatedTable'], $data['actorsId']); + $this->assertEquals($relationship['body']['relatedCollection'], $data['actorsId']); $this->assertEquals($relationship['body']['relationType'], 'oneToMany'); $this->assertEquals($relationship['body']['twoWay'], true); $this->assertEquals($relationship['body']['twoWayKey'], 'movie'); @@ -360,17 +359,17 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertIsArray($movies['body']['columns']); - $this->assertCount(9, $movies['body']['columns']); - $this->assertEquals($movies['body']['columns'][0]['key'], $title['body']['key']); - $this->assertEquals($movies['body']['columns'][1]['key'], $description['body']['key']); - $this->assertEquals($movies['body']['columns'][2]['key'], $tagline['body']['key']); - $this->assertEquals($movies['body']['columns'][3]['key'], $releaseYear['body']['key']); - $this->assertEquals($movies['body']['columns'][4]['key'], $duration['body']['key']); - $this->assertEquals($movies['body']['columns'][5]['key'], $actors['body']['key']); - $this->assertEquals($movies['body']['columns'][6]['key'], $datetime['body']['key']); - $this->assertEquals($movies['body']['columns'][7]['key'], $relationship['body']['key']); - $this->assertEquals($movies['body']['columns'][8]['key'], $integers['body']['key']); + $this->assertIsArray($movies['body']['attributes']); + $this->assertCount(9, $movies['body']['attributes']); + $this->assertEquals($movies['body']['attributes'][0]['key'], $title['body']['key']); + $this->assertEquals($movies['body']['attributes'][1]['key'], $description['body']['key']); + $this->assertEquals($movies['body']['attributes'][2]['key'], $tagline['body']['key']); + $this->assertEquals($movies['body']['attributes'][3]['key'], $releaseYear['body']['key']); + $this->assertEquals($movies['body']['attributes'][4]['key'], $duration['body']['key']); + $this->assertEquals($movies['body']['attributes'][5]['key'], $actors['body']['key']); + $this->assertEquals($movies['body']['attributes'][6]['key'], $datetime['body']['key']); + $this->assertEquals($movies['body']['attributes'][7]['key'], $relationship['body']['key']); + $this->assertEquals($movies['body']['attributes'][8]['key'], $integers['body']['key']); return $data; } @@ -393,7 +392,7 @@ trait DatabasesBase ], ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(2, \count($response['body']['columns'])); + $this->assertEquals(2, \count($response['body']['attributes'])); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/attributes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -417,7 +416,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'patch', 'documentSecurity' => true, 'permissions' => [ @@ -449,7 +448,7 @@ trait DatabasesBase ]), [ 'key' => 'titleIndex', 'type' => 'key', - 'columns' => ['title'], + 'attributes' => ['title'], ]); $this->assertEquals(202, $index['headers']['status-code']); @@ -488,7 +487,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Players', 'documentSecurity' => true, 'permissions' => [ @@ -540,7 +539,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Response Models', // 'permissions' missing on purpose to make sure it's optional 'documentSecurity' => true, @@ -654,7 +653,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $data['actorsId'], + 'relatedCollectionId' => $data['actorsId'], 'type' => 'oneToMany', 'twoWay' => true, 'key' => 'relationship', @@ -763,7 +762,7 @@ trait DatabasesBase $this->assertEquals('relationship', $relationship['body']['type']); $this->assertEquals(false, $relationship['body']['required']); $this->assertEquals(false, $relationship['body']['array']); - $this->assertEquals($data['actorsId'], $relationship['body']['relatedTable']); + $this->assertEquals($data['actorsId'], $relationship['body']['relatedCollection']); $this->assertEquals('oneToMany', $relationship['body']['relationType']); $this->assertEquals(true, $relationship['body']['twoWay']); $this->assertEquals('twoWayKey', $relationship['body']['twoWayKey']); @@ -947,7 +946,7 @@ trait DatabasesBase $this->assertEquals('available', $relationshipResponse['body']['status']); $this->assertEquals($relationship['body']['required'], $relationshipResponse['body']['required']); $this->assertEquals($relationship['body']['array'], $relationshipResponse['body']['array']); - $this->assertEquals($relationship['body']['relatedTable'], $relationshipResponse['body']['relatedTable']); + $this->assertEquals($relationship['body']['relatedCollection'], $relationshipResponse['body']['relatedCollection']); $this->assertEquals($relationship['body']['relationType'], $relationshipResponse['body']['relationType']); $this->assertEquals($relationship['body']['twoWay'], $relationshipResponse['body']['twoWay']); $this->assertEquals($relationship['body']['twoWayKey'], $relationshipResponse['body']['twoWayKey']); @@ -961,7 +960,7 @@ trait DatabasesBase $this->assertEquals(200, $attributes['headers']['status-code']); $this->assertEquals(12, $attributes['body']['total']); - $attributes = $attributes['body']['columns']; + $attributes = $attributes['body']['attributes']; $this->assertIsArray($attributes); $this->assertCount(12, $attributes); @@ -1043,7 +1042,7 @@ trait DatabasesBase $this->assertEquals($relationshipResponse['body']['status'], $attributes[9]['status']); $this->assertEquals($relationshipResponse['body']['required'], $attributes[9]['required']); $this->assertEquals($relationshipResponse['body']['array'], $attributes[9]['array']); - $this->assertEquals($relationshipResponse['body']['relatedTable'], $attributes[9]['relatedTable']); + $this->assertEquals($relationshipResponse['body']['relatedCollection'], $attributes[9]['relatedCollection']); $this->assertEquals($relationshipResponse['body']['relationType'], $attributes[9]['relationType']); $this->assertEquals($relationshipResponse['body']['twoWay'], $attributes[9]['twoWay']); $this->assertEquals($relationshipResponse['body']['twoWayKey'], $attributes[9]['twoWayKey']); @@ -1072,7 +1071,7 @@ trait DatabasesBase $this->assertEquals(200, $collection['headers']['status-code']); - $attributes = $collection['body']['columns']; + $attributes = $collection['body']['attributes']; $this->assertIsArray($attributes); $this->assertCount(12, $attributes); @@ -1155,7 +1154,7 @@ trait DatabasesBase $this->assertEquals($relationshipResponse['body']['status'], $attributes[9]['status']); $this->assertEquals($relationshipResponse['body']['required'], $attributes[9]['required']); $this->assertEquals($relationshipResponse['body']['array'], $attributes[9]['array']); - $this->assertEquals($relationshipResponse['body']['relatedTable'], $attributes[9]['relatedTable']); + $this->assertEquals($relationshipResponse['body']['relatedCollection'], $attributes[9]['relatedCollection']); $this->assertEquals($relationshipResponse['body']['relationType'], $attributes[9]['relationType']); $this->assertEquals($relationshipResponse['body']['twoWay'], $attributes[9]['twoWay']); $this->assertEquals($relationshipResponse['body']['twoWayKey'], $attributes[9]['twoWayKey']); @@ -1210,14 +1209,14 @@ trait DatabasesBase ]), [ 'key' => 'titleIndex', 'type' => 'fulltext', - 'columns' => ['title'], + 'attributes' => ['title'], ]); $this->assertEquals(202, $titleIndex['headers']['status-code']); $this->assertEquals('titleIndex', $titleIndex['body']['key']); $this->assertEquals('fulltext', $titleIndex['body']['type']); - $this->assertCount(1, $titleIndex['body']['columns']); - $this->assertEquals('title', $titleIndex['body']['columns'][0]); + $this->assertCount(1, $titleIndex['body']['attributes']); + $this->assertEquals('title', $titleIndex['body']['attributes'][0]); $releaseYearIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1226,14 +1225,14 @@ trait DatabasesBase ]), [ 'key' => 'releaseYear', 'type' => 'key', - 'columns' => ['releaseYear'], + 'attributes' => ['releaseYear'], ]); $this->assertEquals(202, $releaseYearIndex['headers']['status-code']); $this->assertEquals('releaseYear', $releaseYearIndex['body']['key']); $this->assertEquals('key', $releaseYearIndex['body']['type']); - $this->assertCount(1, $releaseYearIndex['body']['columns']); - $this->assertEquals('releaseYear', $releaseYearIndex['body']['columns'][0]); + $this->assertCount(1, $releaseYearIndex['body']['attributes']); + $this->assertEquals('releaseYear', $releaseYearIndex['body']['attributes'][0]); $releaseWithDate1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1242,16 +1241,16 @@ trait DatabasesBase ]), [ 'key' => 'releaseYearDated', 'type' => 'key', - 'columns' => ['releaseYear', '$createdAt', '$updatedAt'], + 'attributes' => ['releaseYear', '$createdAt', '$updatedAt'], ]); $this->assertEquals(202, $releaseWithDate1['headers']['status-code']); $this->assertEquals('releaseYearDated', $releaseWithDate1['body']['key']); $this->assertEquals('key', $releaseWithDate1['body']['type']); - $this->assertCount(3, $releaseWithDate1['body']['columns']); - $this->assertEquals('releaseYear', $releaseWithDate1['body']['columns'][0]); - $this->assertEquals('$createdAt', $releaseWithDate1['body']['columns'][1]); - $this->assertEquals('$updatedAt', $releaseWithDate1['body']['columns'][2]); + $this->assertCount(3, $releaseWithDate1['body']['attributes']); + $this->assertEquals('releaseYear', $releaseWithDate1['body']['attributes'][0]); + $this->assertEquals('$createdAt', $releaseWithDate1['body']['attributes'][1]); + $this->assertEquals('$updatedAt', $releaseWithDate1['body']['attributes'][2]); $releaseWithDate2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1260,14 +1259,14 @@ trait DatabasesBase ]), [ 'key' => 'birthDay', 'type' => 'key', - 'columns' => ['birthDay'], + 'attributes' => ['birthDay'], ]); $this->assertEquals(202, $releaseWithDate2['headers']['status-code']); $this->assertEquals('birthDay', $releaseWithDate2['body']['key']); $this->assertEquals('key', $releaseWithDate2['body']['type']); - $this->assertCount(1, $releaseWithDate2['body']['columns']); - $this->assertEquals('birthDay', $releaseWithDate2['body']['columns'][0]); + $this->assertCount(1, $releaseWithDate2['body']['attributes']); + $this->assertEquals('birthDay', $releaseWithDate2['body']['attributes'][0]); // Test for failure $fulltextReleaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ @@ -1277,7 +1276,7 @@ trait DatabasesBase ]), [ 'key' => 'releaseYearDated', 'type' => 'fulltext', - 'columns' => ['releaseYear'], + 'attributes' => ['releaseYear'], ]); $this->assertEquals(400, $fulltextReleaseYear['headers']['status-code']); @@ -1290,7 +1289,7 @@ trait DatabasesBase ]), [ 'key' => 'none', 'type' => 'key', - 'columns' => [], + 'attributes' => [], ]); $this->assertEquals(400, $noAttributes['headers']['status-code']); @@ -1303,7 +1302,7 @@ trait DatabasesBase ]), [ 'key' => 'duplicate', 'type' => 'fulltext', - 'columns' => ['releaseYear', 'releaseYear'], + 'attributes' => ['releaseYear', 'releaseYear'], ]); $this->assertEquals(400, $duplicates['headers']['status-code']); @@ -1316,7 +1315,7 @@ trait DatabasesBase ]), [ 'key' => 'tooLong', 'type' => 'key', - 'columns' => ['description', 'tagline'], + 'attributes' => ['description', 'tagline'], ]); $this->assertEquals(400, $tooLong['headers']['status-code']); @@ -1329,7 +1328,7 @@ trait DatabasesBase ]), [ 'key' => 'ft', 'type' => 'fulltext', - 'columns' => ['actors'], + 'attributes' => ['actors'], ]); $this->assertEquals(400, $fulltextArray['headers']['status-code']); @@ -1342,7 +1341,7 @@ trait DatabasesBase ]), [ 'key' => 'index-actors', 'type' => 'key', - 'columns' => ['actors'], + 'attributes' => ['actors'], ]); $this->assertEquals(202, $actorsArray['headers']['status-code']); @@ -1354,7 +1353,7 @@ trait DatabasesBase ]), [ 'key' => 'index-ip-actors', 'type' => 'key', - 'columns' => ['releaseYear', 'actors'], // 2 levels + 'attributes' => ['releaseYear', 'actors'], // 2 levels 'orders' => ['DESC', 'DESC'], ]); @@ -1369,11 +1368,11 @@ trait DatabasesBase ]), [ 'key' => 'index-unknown', 'type' => 'key', - 'columns' => ['Unknown'], + 'attributes' => ['Unknown'], ]); $this->assertEquals(400, $unknown['headers']['status-code']); - $this->assertEquals('Unknown column: Unknown. Verify the column name or create the column.', $unknown['body']['message']); + $this->assertEquals('Unknown attribute: Unknown. Verify the attribute name or create the attribute.', $unknown['body']['message']); $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1382,7 +1381,7 @@ trait DatabasesBase ]), [ 'key' => 'integers-order', 'type' => 'key', - 'columns' => ['integers'], // array attribute + 'attributes' => ['integers'], // array attribute 'orders' => ['DESC'], // Check order is removed in API ]); $this->assertEquals(202, $index1['headers']['status-code']); @@ -1394,7 +1393,7 @@ trait DatabasesBase ]), [ 'key' => 'integers-size', 'type' => 'key', - 'columns' => ['integers'], // array attribute + 'attributes' => ['integers'], // array attribute ]); $this->assertEquals(202, $index2['headers']['status-code']); @@ -1463,7 +1462,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Captain America', 'releaseYear' => 1944, @@ -1484,7 +1483,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Spider-Man: Far From Home', 'releaseYear' => 2019, @@ -1507,7 +1506,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Spider-Man: Homecoming', 'releaseYear' => 2017, @@ -1530,7 +1529,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'releaseYear' => 2020, // Missing title, expect an 400 error ], @@ -1542,7 +1541,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $document1['headers']['status-code']); - $this->assertEquals($data['moviesId'], $document1['body']['$tableId']); + $this->assertEquals($data['moviesId'], $document1['body']['$collectionId']); $this->assertArrayNotHasKey('$collection', $document1['body']); $this->assertEquals($databaseId, $document1['body']['$databaseId']); $this->assertEquals($document1['body']['title'], 'Captain America'); @@ -1555,7 +1554,7 @@ trait DatabasesBase $this->assertEquals($document1['body']['birthDay'], '1975-06-12T12:12:55.000+00:00'); $this->assertEquals(201, $document2['headers']['status-code']); - $this->assertEquals($data['moviesId'], $document2['body']['$tableId']); + $this->assertEquals($data['moviesId'], $document2['body']['$collectionId']); $this->assertArrayNotHasKey('$collection', $document2['body']); $this->assertEquals($databaseId, $document2['body']['$databaseId']); $this->assertEquals($document2['body']['title'], 'Spider-Man: Far From Home'); @@ -1572,7 +1571,7 @@ trait DatabasesBase $this->assertEquals($document2['body']['integers'][1], 60); $this->assertEquals(201, $document3['headers']['status-code']); - $this->assertEquals($data['moviesId'], $document3['body']['$tableId']); + $this->assertEquals($data['moviesId'], $document3['body']['$collectionId']); $this->assertArrayNotHasKey('$collection', $document3['body']); $this->assertEquals($databaseId, $document3['body']['$databaseId']); $this->assertEquals($document3['body']['title'], 'Spider-Man: Homecoming'); @@ -1612,17 +1611,16 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(1944, $documents['body']['rows'][0]['releaseYear']); - $this->assertEquals(2017, $documents['body']['rows'][1]['releaseYear']); - $this->assertEquals(2019, $documents['body']['rows'][2]['releaseYear']); - $this->assertFalse(array_key_exists('$internalId', $documents['body']['rows'][0])); - $this->assertFalse(array_key_exists('$internalId', $documents['body']['rows'][1])); - $this->assertFalse(array_key_exists('$internalId', $documents['body']['rows'][2])); - $this->assertCount(3, $documents['body']['rows']); + $this->assertEquals(1944, $documents['body']['documents'][0]['releaseYear']); + $this->assertEquals(2017, $documents['body']['documents'][1]['releaseYear']); + $this->assertEquals(2019, $documents['body']['documents'][2]['releaseYear']); + $this->assertFalse(array_key_exists('$internalId', $documents['body']['documents'][0])); + $this->assertFalse(array_key_exists('$internalId', $documents['body']['documents'][1])); + $this->assertFalse(array_key_exists('$internalId', $documents['body']['documents'][2])); + $this->assertCount(3, $documents['body']['documents']); - foreach ($documents['body']['rows'] as $document) { - print_r($document); - $this->assertEquals($data['moviesId'], $document['$tableId']); + foreach ($documents['body']['documents'] as $document) { + $this->assertEquals($data['moviesId'], $document['$collectionId']); $this->assertArrayNotHasKey('$collection', $document); $this->assertEquals($databaseId, $document['$databaseId']); } @@ -1637,10 +1635,10 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(1944, $documents['body']['rows'][2]['releaseYear']); - $this->assertEquals(2017, $documents['body']['rows'][1]['releaseYear']); - $this->assertEquals(2019, $documents['body']['rows'][0]['releaseYear']); - $this->assertCount(3, $documents['body']['rows']); + $this->assertEquals(1944, $documents['body']['documents'][2]['releaseYear']); + $this->assertEquals(2017, $documents['body']['documents'][1]['releaseYear']); + $this->assertEquals(2019, $documents['body']['documents'][0]['releaseYear']); + $this->assertCount(3, $documents['body']['documents']); // changing description attribute to be null by default instead of empty string $patchNull = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/attributes/string/description', array_merge([ @@ -1656,7 +1654,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Dummy', 'releaseYear' => 1944, @@ -1686,7 +1684,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - return ['rows' => $documents['body']['rows'], 'databaseId' => $databaseId]; + return ['documents' => $documents['body']['documents'], 'databaseId' => $databaseId]; } @@ -1696,15 +1694,15 @@ trait DatabasesBase public function testGetDocument(array $data): void { $databaseId = $data['databaseId']; - foreach ($data['rows'] as $document) { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$tableId'] . '/documents/' . $document['$id'], array_merge([ + foreach ($data['documents'] as $document) { + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$collectionId'] . '/documents/' . $document['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals($response['body']['$id'], $document['$id']); - $this->assertEquals($document['$tableId'], $response['body']['$tableId']); + $this->assertEquals($document['$collectionId'], $response['body']['$collectionId']); $this->assertArrayNotHasKey('$collection', $response['body']); $this->assertEquals($document['$databaseId'], $response['body']['$databaseId']); $this->assertEquals($response['body']['title'], $document['title']); @@ -1722,9 +1720,9 @@ trait DatabasesBase public function testGetDocumentWithQueries(array $data): void { $databaseId = $data['databaseId']; - $document = $data['rows'][0]; + $document = $data['documents'][0]; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$tableId'] . '/documents/' . $document['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $document['$collectionId'] . '/documents/' . $document['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1754,36 +1752,36 @@ trait DatabasesBase ], $this->getHeaders())); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertEquals('Captain America', $base['body']['rows'][0]['title']); - $this->assertEquals('Spider-Man: Far From Home', $base['body']['rows'][1]['title']); - $this->assertEquals('Spider-Man: Homecoming', $base['body']['rows'][2]['title']); - $this->assertCount(3, $base['body']['rows']); + $this->assertEquals('Captain America', $base['body']['documents'][0]['title']); + $this->assertEquals('Spider-Man: Far From Home', $base['body']['documents'][1]['title']); + $this->assertEquals('Spider-Man: Homecoming', $base['body']['documents'][2]['title']); + $this->assertCount(3, $base['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorAfter(new Document(['$id' => $base['body']['rows'][0]['$id']]))->toString() + Query::cursorAfter(new Document(['$id' => $base['body']['documents'][0]['$id']]))->toString() ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals($base['body']['rows'][1]['$id'], $documents['body']['rows'][0]['$id']); - $this->assertEquals($base['body']['rows'][2]['$id'], $documents['body']['rows'][1]['$id']); - $this->assertCount(2, $documents['body']['rows']); + $this->assertEquals($base['body']['documents'][1]['$id'], $documents['body']['documents'][0]['$id']); + $this->assertEquals($base['body']['documents'][2]['$id'], $documents['body']['documents'][1]['$id']); + $this->assertCount(2, $documents['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorAfter(new Document(['$id' => $base['body']['rows'][2]['$id']]))->toString() + Query::cursorAfter(new Document(['$id' => $base['body']['documents'][2]['$id']]))->toString() ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEmpty($documents['body']['rows']); + $this->assertEmpty($documents['body']['documents']); /** * Test with ASC order and after. @@ -1798,24 +1796,24 @@ trait DatabasesBase ]); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertEquals(1944, $base['body']['rows'][0]['releaseYear']); - $this->assertEquals(2017, $base['body']['rows'][1]['releaseYear']); - $this->assertEquals(2019, $base['body']['rows'][2]['releaseYear']); - $this->assertCount(3, $base['body']['rows']); + $this->assertEquals(1944, $base['body']['documents'][0]['releaseYear']); + $this->assertEquals(2017, $base['body']['documents'][1]['releaseYear']); + $this->assertEquals(2019, $base['body']['documents'][2]['releaseYear']); + $this->assertCount(3, $base['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorAfter(new Document(['$id' => $base['body']['rows'][1]['$id']]))->toString(), + Query::cursorAfter(new Document(['$id' => $base['body']['documents'][1]['$id']]))->toString(), Query::orderAsc('releaseYear')->toString() ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals($base['body']['rows'][2]['$id'], $documents['body']['rows'][0]['$id']); - $this->assertCount(1, $documents['body']['rows']); + $this->assertEquals($base['body']['documents'][2]['$id'], $documents['body']['documents'][0]['$id']); + $this->assertCount(1, $documents['body']['documents']); /** * Test with DESC order and after. @@ -1830,24 +1828,24 @@ trait DatabasesBase ]); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertEquals(1944, $base['body']['rows'][2]['releaseYear']); - $this->assertEquals(2017, $base['body']['rows'][1]['releaseYear']); - $this->assertEquals(2019, $base['body']['rows'][0]['releaseYear']); - $this->assertCount(3, $base['body']['rows']); + $this->assertEquals(1944, $base['body']['documents'][2]['releaseYear']); + $this->assertEquals(2017, $base['body']['documents'][1]['releaseYear']); + $this->assertEquals(2019, $base['body']['documents'][0]['releaseYear']); + $this->assertCount(3, $base['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorAfter(new Document(['$id' => $base['body']['rows'][1]['$id']]))->toString(), + Query::cursorAfter(new Document(['$id' => $base['body']['documents'][1]['$id']]))->toString(), Query::orderDesc('releaseYear')->toString() ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals($base['body']['rows'][2]['$id'], $documents['body']['rows'][0]['$id']); - $this->assertCount(1, $documents['body']['rows']); + $this->assertEquals($base['body']['documents'][2]['$id'], $documents['body']['documents'][0]['$id']); + $this->assertCount(1, $documents['body']['documents']); /** * Test after with unknown document. @@ -1896,36 +1894,36 @@ trait DatabasesBase ], $this->getHeaders())); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertEquals('Captain America', $base['body']['rows'][0]['title']); - $this->assertEquals('Spider-Man: Far From Home', $base['body']['rows'][1]['title']); - $this->assertEquals('Spider-Man: Homecoming', $base['body']['rows'][2]['title']); - $this->assertCount(3, $base['body']['rows']); + $this->assertEquals('Captain America', $base['body']['documents'][0]['title']); + $this->assertEquals('Spider-Man: Far From Home', $base['body']['documents'][1]['title']); + $this->assertEquals('Spider-Man: Homecoming', $base['body']['documents'][2]['title']); + $this->assertCount(3, $base['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorBefore(new Document(['$id' => $base['body']['rows'][2]['$id']]))->toString(), + Query::cursorBefore(new Document(['$id' => $base['body']['documents'][2]['$id']]))->toString(), ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals($base['body']['rows'][0]['$id'], $documents['body']['rows'][0]['$id']); - $this->assertEquals($base['body']['rows'][1]['$id'], $documents['body']['rows'][1]['$id']); - $this->assertCount(2, $documents['body']['rows']); + $this->assertEquals($base['body']['documents'][0]['$id'], $documents['body']['documents'][0]['$id']); + $this->assertEquals($base['body']['documents'][1]['$id'], $documents['body']['documents'][1]['$id']); + $this->assertCount(2, $documents['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorBefore(new Document(['$id' => $base['body']['rows'][0]['$id']]))->toString(), + Query::cursorBefore(new Document(['$id' => $base['body']['documents'][0]['$id']]))->toString(), ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEmpty($documents['body']['rows']); + $this->assertEmpty($documents['body']['documents']); /** * Test with ASC order and after. @@ -1940,24 +1938,24 @@ trait DatabasesBase ]); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertEquals(1944, $base['body']['rows'][0]['releaseYear']); - $this->assertEquals(2017, $base['body']['rows'][1]['releaseYear']); - $this->assertEquals(2019, $base['body']['rows'][2]['releaseYear']); - $this->assertCount(3, $base['body']['rows']); + $this->assertEquals(1944, $base['body']['documents'][0]['releaseYear']); + $this->assertEquals(2017, $base['body']['documents'][1]['releaseYear']); + $this->assertEquals(2019, $base['body']['documents'][2]['releaseYear']); + $this->assertCount(3, $base['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorBefore(new Document(['$id' => $base['body']['rows'][1]['$id']]))->toString(), + Query::cursorBefore(new Document(['$id' => $base['body']['documents'][1]['$id']]))->toString(), Query::orderAsc('releaseYear')->toString(), ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals($base['body']['rows'][0]['$id'], $documents['body']['rows'][0]['$id']); - $this->assertCount(1, $documents['body']['rows']); + $this->assertEquals($base['body']['documents'][0]['$id'], $documents['body']['documents'][0]['$id']); + $this->assertCount(1, $documents['body']['documents']); /** * Test with DESC order and after. @@ -1972,24 +1970,24 @@ trait DatabasesBase ]); $this->assertEquals(200, $base['headers']['status-code']); - $this->assertEquals(1944, $base['body']['rows'][2]['releaseYear']); - $this->assertEquals(2017, $base['body']['rows'][1]['releaseYear']); - $this->assertEquals(2019, $base['body']['rows'][0]['releaseYear']); - $this->assertCount(3, $base['body']['rows']); + $this->assertEquals(1944, $base['body']['documents'][2]['releaseYear']); + $this->assertEquals(2017, $base['body']['documents'][1]['releaseYear']); + $this->assertEquals(2019, $base['body']['documents'][0]['releaseYear']); + $this->assertCount(3, $base['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorBefore(new Document(['$id' => $base['body']['rows'][1]['$id']]))->toString(), + Query::cursorBefore(new Document(['$id' => $base['body']['documents'][1]['$id']]))->toString(), Query::orderDesc('releaseYear')->toString(), ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals($base['body']['rows'][0]['$id'], $documents['body']['rows'][0]['$id']); - $this->assertCount(1, $documents['body']['rows']); + $this->assertEquals($base['body']['documents'][0]['$id'], $documents['body']['documents'][0]['$id']); + $this->assertCount(1, $documents['body']['documents']); return []; } @@ -2011,8 +2009,8 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(1944, $documents['body']['rows'][0]['releaseYear']); - $this->assertCount(1, $documents['body']['rows']); + $this->assertEquals(1944, $documents['body']['documents'][0]['releaseYear']); + $this->assertCount(1, $documents['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2026,9 +2024,9 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(2017, $documents['body']['rows'][0]['releaseYear']); - $this->assertEquals(2019, $documents['body']['rows'][1]['releaseYear']); - $this->assertCount(2, $documents['body']['rows']); + $this->assertEquals(2017, $documents['body']['documents'][0]['releaseYear']); + $this->assertEquals(2019, $documents['body']['documents'][1]['releaseYear']); + $this->assertCount(2, $documents['body']['documents']); return []; } @@ -2049,21 +2047,21 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(1944, $documents['body']['rows'][0]['releaseYear']); - $this->assertCount(1, $documents['body']['rows']); + $this->assertEquals(1944, $documents['body']['documents'][0]['releaseYear']); + $this->assertCount(1, $documents['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::equal('$id', [$documents['body']['rows'][0]['$id']])->toString(), + Query::equal('$id', [$documents['body']['documents'][0]['$id']])->toString(), ], ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(1944, $documents['body']['rows'][0]['releaseYear']); - $this->assertCount(1, $documents['body']['rows']); + $this->assertEquals(1944, $documents['body']['documents'][0]['releaseYear']); + $this->assertCount(1, $documents['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2075,8 +2073,8 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(2017, $documents['body']['rows'][0]['releaseYear']); - $this->assertCount(1, $documents['body']['rows']); + $this->assertEquals(2017, $documents['body']['documents'][0]['releaseYear']); + $this->assertCount(1, $documents['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2088,9 +2086,9 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(2019, $documents['body']['rows'][0]['releaseYear']); - $this->assertEquals(2017, $documents['body']['rows'][1]['releaseYear']); - $this->assertCount(2, $documents['body']['rows']); + $this->assertEquals(2019, $documents['body']['documents'][0]['releaseYear']); + $this->assertEquals(2017, $documents['body']['documents'][1]['releaseYear']); + $this->assertCount(2, $documents['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2125,8 +2123,8 @@ trait DatabasesBase ], ]); - $this->assertCount(1, $documents['body']['rows']); - $this->assertEquals('Captain America', $documents['body']['rows'][0]['title']); + $this->assertCount(1, $documents['body']['documents']); + $this->assertEquals('Captain America', $documents['body']['documents'][0]['title']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2137,9 +2135,9 @@ trait DatabasesBase ], ]); - $this->assertCount(2, $documents['body']['rows']); - $this->assertEquals('Spider-Man: Far From Home', $documents['body']['rows'][0]['title']); - $this->assertEquals('Spider-Man: Homecoming', $documents['body']['rows'][1]['title']); + $this->assertCount(2, $documents['body']['documents']); + $this->assertEquals('Spider-Man: Far From Home', $documents['body']['documents'][0]['title']); + $this->assertEquals('Spider-Man: Homecoming', $documents['body']['documents'][1]['title']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2150,7 +2148,7 @@ trait DatabasesBase ], ]); - $this->assertCount(3, $documents['body']['rows']); + $this->assertCount(3, $documents['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2161,7 +2159,7 @@ trait DatabasesBase ], ]); - $this->assertCount(0, $documents['body']['rows']); + $this->assertCount(0, $documents['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2209,9 +2207,9 @@ trait DatabasesBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals('1975-06-12T12:12:55.000+00:00', $documents['body']['rows'][0]['birthDay']); - $this->assertEquals('1975-06-12T18:12:55.000+00:00', $documents['body']['rows'][1]['birthDay']); - $this->assertCount(2, $documents['body']['rows']); + $this->assertEquals('1975-06-12T12:12:55.000+00:00', $documents['body']['documents'][0]['birthDay']); + $this->assertEquals('1975-06-12T18:12:55.000+00:00', $documents['body']['documents'][1]['birthDay']); + $this->assertCount(2, $documents['body']['documents']); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -2288,7 +2286,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Thor: Ragnaroc', 'releaseYear' => 2017, @@ -2306,7 +2304,7 @@ trait DatabasesBase $id = $document['body']['$id']; $this->assertEquals(201, $document['headers']['status-code']); - $this->assertEquals($data['moviesId'], $document['body']['$tableId']); + $this->assertEquals($data['moviesId'], $document['body']['$collectionId']); $this->assertArrayNotHasKey('$collection', $document['body']); $this->assertEquals($databaseId, $document['body']['$databaseId']); $this->assertEquals($document['body']['title'], 'Thor: Ragnaroc'); @@ -2334,7 +2332,7 @@ trait DatabasesBase $this->assertEquals(200, $document['headers']['status-code']); $this->assertEquals($document['body']['$id'], $id); - $this->assertEquals($data['moviesId'], $document['body']['$tableId']); + $this->assertEquals($data['moviesId'], $document['body']['$collectionId']); $this->assertArrayNotHasKey('$collection', $document['body']); $this->assertEquals($databaseId, $document['body']['$databaseId']); $this->assertEquals($document['body']['title'], 'Thor: Ragnarok'); @@ -2351,7 +2349,7 @@ trait DatabasesBase $id = $document['body']['$id']; $this->assertEquals(200, $document['headers']['status-code']); - $this->assertEquals($data['moviesId'], $document['body']['$tableId']); + $this->assertEquals($data['moviesId'], $document['body']['$collectionId']); $this->assertArrayNotHasKey('$collection', $document['body']); $this->assertEquals($databaseId, $document['body']['$databaseId']); $this->assertEquals($document['body']['title'], 'Thor: Ragnarok'); @@ -2399,7 +2397,7 @@ trait DatabasesBase $this->assertEquals(409, $response['headers']['status-code']); $this->assertEquals('Remote document is newer than local.', $response['body']['message']); - $this->assertEquals(Exception::ROW_UPDATE_CONFLICT, $response['body']['type']); + $this->assertEquals(Exception::DOCUMENT_UPDATE_CONFLICT, $response['body']['type']); return []; } @@ -2414,7 +2412,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Thor: Ragnarok', 'releaseYear' => 2017, @@ -2475,7 +2473,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'invalidDocumentStructure', 'permissions' => [ Permission::create(Role::any()), @@ -2672,7 +2670,7 @@ trait DatabasesBase $this->assertEquals(400, $enumDefault['headers']['status-code']); $this->assertEquals(400, $enumDefaultStrict['headers']['status-code']); $this->assertEquals('Minimum value must be lesser than maximum value', $invalidRange['body']['message']); - $this->assertEquals('Cannot set default value for array columns', $defaultArray['body']['message']); + $this->assertEquals('Cannot set default value for array attributes', $defaultArray['body']['message']); $this->assertEquals(400, $datetimeDefault['headers']['status-code']); // wait for worker to add attributes sleep(3); @@ -2683,7 +2681,7 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'], ]), []); - $this->assertCount(10, $collection['body']['columns']); + $this->assertCount(10, $collection['body']['attributes']); /** * Test for successful validation @@ -2693,7 +2691,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'email' => 'user@example.com', ], @@ -2708,7 +2706,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'enum' => 'yes', ], @@ -2723,7 +2721,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'ip' => '1.1.1.1', ], @@ -2738,7 +2736,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'url' => 'http://www.example.com', ], @@ -2753,7 +2751,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'range' => 3, ], @@ -2768,7 +2766,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'floatRange' => 1.4, ], @@ -2783,7 +2781,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'probability' => 0.99999, ], @@ -2798,7 +2796,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'upperBound' => 8, ], @@ -2813,7 +2811,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'lowerBound' => 8, ], @@ -2842,7 +2840,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'email' => 'user@@example.com', ], @@ -2857,7 +2855,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'enum' => 'badEnum', ], @@ -2872,7 +2870,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'ip' => '1.1.1.1.1', ], @@ -2887,7 +2885,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'url' => 'example...com', ], @@ -2902,7 +2900,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'range' => 11, ], @@ -2917,7 +2915,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'floatRange' => 2.5, ], @@ -2932,7 +2930,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'probability' => 1.1, ], @@ -2947,7 +2945,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'upperBound' => 11, ], @@ -2962,7 +2960,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'lowerBound' => 3, ], @@ -2977,7 +2975,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => [ 'birthDay' => '2020-10-10 27:30:10+01:00', ], @@ -3016,7 +3014,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Captain America', 'releaseYear' => 1944, @@ -3146,7 +3144,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'enforceCollectionAndDocumentPermissions', 'documentSecurity' => true, 'permissions' => [ @@ -3188,7 +3186,7 @@ trait DatabasesBase ]), [ 'key' => 'key_attribute', 'type' => 'key', - 'columns' => [$attribute['body']['key']], + 'attributes' => [$attribute['body']['key']], ]); $this->assertEquals(202, $index['headers']['status-code']); @@ -3201,7 +3199,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'attribute' => 'one', ], @@ -3218,7 +3216,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'attribute' => 'one', ], @@ -3235,7 +3233,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ], [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'attribute' => 'one', ], @@ -3254,7 +3252,7 @@ trait DatabasesBase // Current user has read permission on the collection so can get any document $this->assertEquals(3, $documentsUser1['body']['total']); - $this->assertCount(3, $documentsUser1['body']['rows']); + $this->assertCount(3, $documentsUser1['body']['documents']); $document3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $document3['body']['$id'], array_merge([ 'content-type' => 'application/json', @@ -3316,7 +3314,7 @@ trait DatabasesBase // Current user has no collection permissions but has read permission for one document $this->assertEquals(1, $documentsUser2['body']['total']); - $this->assertCount(1, $documentsUser2['body']['rows']); + $this->assertCount(1, $documentsUser2['body']['documents']); } public function testEnforceCollectionPermissions() @@ -3339,7 +3337,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'enforceCollectionPermissions', 'permissions' => [ Permission::read(Role::user($user)), @@ -3377,7 +3375,7 @@ trait DatabasesBase ]), [ 'key' => 'key_attribute', 'type' => 'key', - 'columns' => [$attribute['body']['key']], + 'attributes' => [$attribute['body']['key']], ]); $this->assertEquals(202, $index['headers']['status-code']); @@ -3389,7 +3387,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'attribute' => 'one', ], @@ -3406,7 +3404,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'attribute' => 'one', ], @@ -3423,7 +3421,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ], [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'attribute' => 'one', ], @@ -3442,7 +3440,7 @@ trait DatabasesBase // Current user has read permission on the collection so can get any document $this->assertEquals(3, $documentsUser1['body']['total']); - $this->assertCount(3, $documentsUser1['body']['rows']); + $this->assertCount(3, $documentsUser1['body']['documents']); $document3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $document3['body']['$id'], array_merge([ 'content-type' => 'application/json', @@ -3514,7 +3512,7 @@ trait DatabasesBase // Current user has no collection permissions read access to one document $this->assertEquals(1, $documentsUser2['body']['total']); - $this->assertCount(1, $documentsUser2['body']['rows']); + $this->assertCount(1, $documentsUser2['body']['documents']); } /** @@ -3530,7 +3528,7 @@ trait DatabasesBase ]), [ 'key' => 'unique_title', 'type' => 'unique', - 'columns' => ['title'], + 'attributes' => ['title'], ]); $this->assertEquals(202, $uniqueIndex['headers']['status-code']); @@ -3542,7 +3540,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Captain America', 'releaseYear' => 1944, @@ -3565,7 +3563,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Captain America 5', 'releaseYear' => 1944, @@ -3588,7 +3586,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Captain America', 'releaseYear' => 1944, @@ -3624,7 +3622,7 @@ trait DatabasesBase ]; $document = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['moviesId'] . '/documents', $headers, [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Creation Date Test', 'releaseYear' => 2000 @@ -3692,7 +3690,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ Permission::create(Role::user(ID::custom($this->getUser()['$id']))), @@ -3729,7 +3727,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Captain America', ], @@ -3803,7 +3801,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Boolean' ]); @@ -3848,7 +3846,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => 'person', + 'collectionId' => 'person', 'name' => 'person', 'permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), @@ -3866,7 +3864,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => 'library', + 'collectionId' => 'library', 'name' => 'library', 'permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), @@ -3895,7 +3893,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => 'library', + 'relatedCollectionId' => 'library', 'type' => Database::RELATION_ONE_TO_ONE, 'key' => 'library', 'twoWay' => true, @@ -3930,8 +3928,8 @@ trait DatabasesBase $this->assertEquals(200, $attributes['headers']['status-code']); $this->assertEquals(2, $attributes['body']['total']); - $attributes = $attributes['body']['columns']; - $this->assertEquals('library', $attributes[1]['relatedTable']); + $attributes = $attributes['body']['attributes']; + $this->assertEquals('library', $attributes[1]['relatedCollection']); $this->assertEquals('oneToOne', $attributes[1]['relationType']); $this->assertEquals(true, $attributes[1]['twoWay']); $this->assertEquals('person', $attributes[1]['twoWayKey']); @@ -3958,7 +3956,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'library' => [ '$id' => 'library1', @@ -3982,7 +3980,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'library' => [ 'libraryName' => 'Library 2', @@ -4001,8 +3999,8 @@ trait DatabasesBase $this->assertEquals($databaseId, $person1['body']['$databaseId']); $this->assertEquals($databaseId, $person1['body']['library']['$databaseId']); - $this->assertEquals($person['body']['$id'], $person1['body']['$tableId']); - $this->assertEquals($library['body']['$id'], $person1['body']['library']['$tableId']); + $this->assertEquals($person['body']['$id'], $person1['body']['$collectionId']); + $this->assertEquals($library['body']['$id'], $person1['body']['library']['$collectionId']); $this->assertArrayNotHasKey('$collection', $person1['body']); $this->assertArrayNotHasKey('$collection', $person1['body']['library']); @@ -4020,8 +4018,8 @@ trait DatabasesBase ]); $this->assertEquals(1, $documents['body']['total']); - $this->assertEquals('Library 1', $documents['body']['rows'][0]['library']['libraryName']); - $this->assertArrayHasKey('fullName', $documents['body']['rows'][0]); + $this->assertEquals('Library 1', $documents['body']['documents'][0]['library']['libraryName']); + $this->assertArrayHasKey('fullName', $documents['body']['documents'][0]); $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -4069,7 +4067,7 @@ trait DatabasesBase $this->assertEquals(200, $attributes['headers']['status-code']); $this->assertEquals(1, $attributes['body']['total']); - $this->assertEquals('libraryName', $attributes['body']['columns'][0]['key']); + $this->assertEquals('libraryName', $attributes['body']['attributes'][0]['key']); return [ 'databaseId' => $databaseId, @@ -4093,7 +4091,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => 'library', + 'relatedCollectionId' => 'library', 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => true, 'key' => 'libraries', @@ -4108,9 +4106,9 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertIsArray($libraryAttributesResponse['body']['columns']); + $this->assertIsArray($libraryAttributesResponse['body']['attributes']); $this->assertEquals(2, $libraryAttributesResponse['body']['total']); - $this->assertEquals('person_one_to_many', $libraryAttributesResponse['body']['columns'][1]['key']); + $this->assertEquals('person_one_to_many', $libraryAttributesResponse['body']['attributes'][1]['key']); $libraryCollectionResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $libraryCollection, array_merge([ 'content-type' => 'application/json', @@ -4118,8 +4116,8 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertIsArray($libraryCollectionResponse['body']['columns']); - $this->assertCount(2, $libraryCollectionResponse['body']['columns']); + $this->assertIsArray($libraryCollectionResponse['body']['attributes']); + $this->assertCount(2, $libraryCollectionResponse['body']['attributes']); $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/collections/{$personCollection}/attributes/libraries", array_merge([ 'content-type' => 'application/json', @@ -4142,7 +4140,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => 'person10', + 'documentId' => 'person10', 'data' => [ 'fullName' => 'Stevie Wonder', 'libraries' => [ @@ -4238,7 +4236,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Albums', 'documentSecurity' => true, 'permissions' => [ @@ -4264,7 +4262,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Artists', 'documentSecurity' => true, 'permissions' => [ @@ -4290,7 +4288,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $artists['body']['$id'], + 'relatedCollectionId' => $artists['body']['$id'], 'type' => Database::RELATION_MANY_TO_ONE, 'twoWay' => true, 'key' => 'artist', @@ -4319,7 +4317,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => 'album1', + 'documentId' => 'album1', 'permissions' => $permissions, 'data' => [ 'name' => 'Album 1', @@ -4382,7 +4380,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Sports', 'documentSecurity' => true, 'permissions' => [ @@ -4408,7 +4406,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Players', 'documentSecurity' => true, 'permissions' => [ @@ -4434,7 +4432,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $players['body']['$id'], + 'relatedCollectionId' => $players['body']['$id'], 'type' => Database::RELATION_MANY_TO_MANY, 'twoWay' => true, 'key' => 'players', @@ -4464,7 +4462,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => 'sport1', + 'documentId' => 'sport1', 'permissions' => $permissions, 'data' => [ 'name' => 'Sport 1', @@ -4542,10 +4540,10 @@ trait DatabasesBase ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(1, count($response['body']['rows'])); - $this->assertEquals('person10', $response['body']['rows'][0]['$id']); - $this->assertEquals('Stevie Wonder', $response['body']['rows'][0]['fullName']); - $this->assertEquals(2, count($response['body']['rows'][0]['libraries'])); + $this->assertEquals(1, count($response['body']['documents'])); + $this->assertEquals('person10', $response['body']['documents'][0]['$id']); + $this->assertEquals('Stevie Wonder', $response['body']['documents'][0]['fullName']); + $this->assertEquals(2, count($response['body']['documents'][0]['libraries'])); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -4559,11 +4557,11 @@ trait DatabasesBase ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(2, count($response['body']['rows'])); - $this->assertEquals(null, $response['body']['rows'][0]['fullName']); - $this->assertArrayNotHasKey("libraries", $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$tableId', $response['body']['rows'][0]); + $this->assertEquals(2, count($response['body']['documents'])); + $this->assertEquals(null, $response['body']['documents'][0]['fullName']); + $this->assertArrayNotHasKey("libraries", $response['body']['documents'][0]); + $this->assertArrayNotHasKey('$databaseId', $response['body']['documents'][0]); + $this->assertArrayNotHasKey('$collectionId', $response['body']['documents'][0]); } /** @@ -4582,9 +4580,9 @@ trait DatabasesBase ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertArrayNotHasKey('libraries', $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); - $this->assertArrayNotHasKey('$tableId', $response['body']['rows'][0]); + $this->assertArrayNotHasKey('libraries', $response['body']['documents'][0]); + $this->assertArrayNotHasKey('$databaseId', $response['body']['documents'][0]); + $this->assertArrayNotHasKey('$collectionId', $response['body']['documents'][0]); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents', array_merge([ 'content-type' => 'application/json', @@ -4594,11 +4592,11 @@ trait DatabasesBase Query::select(['libraries.*', '$id'])->toString(), ], ]); - $document = $response['body']['rows'][0]; + $document = $response['body']['documents'][0]; $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayHasKey('libraries', $document); $this->assertArrayNotHasKey('$databaseId', $document); - $this->assertArrayNotHasKey('$tableId', $document); + $this->assertArrayNotHasKey('$collectionId', $document); $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents/' . $document['$id'], array_merge([ 'content-type' => 'application/json', @@ -4642,7 +4640,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'USA Presidents', 'documentSecurity' => true, 'permissions' => [ @@ -4684,7 +4682,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'first_name' => 'Donald', 'last_name' => 'Trump', @@ -4699,7 +4697,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'first_name' => 'George', 'last_name' => 'Bush', @@ -4714,7 +4712,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'first_name' => 'Joe', 'last_name' => 'Biden', @@ -4747,7 +4745,7 @@ trait DatabasesBase ); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertCount(2, $documents['body']['rows']); + $this->assertCount(2, $documents['body']['documents']); } /** @@ -4765,7 +4763,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Collection1', 'documentSecurity' => true, 'permissions' => [ @@ -4779,7 +4777,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Collection2', 'documentSecurity' => true, 'permissions' => [ @@ -4816,7 +4814,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2, + 'relatedCollectionId' => $collection2, 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => true, 'key' => 'collection2' @@ -4828,7 +4826,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'name' => 'Document 1', 'collection2' => [ @@ -4861,7 +4859,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Slow Queries', 'documentSecurity' => true, 'permissions' => [ @@ -4894,9 +4892,9 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ - 'longtext' => file_get_contents(__DIR__ . '/../../../resources/longtext.txt'), + 'longtext' => file_get_contents(__DIR__ . '../../../../../resources/longtext.txt'), ], 'permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), diff --git a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/Collections/DatabasesConsoleClientTest.php similarity index 95% rename from tests/e2e/Services/Databases/DatabasesConsoleClientTest.php rename to tests/e2e/Services/Databases/Collections/DatabasesConsoleClientTest.php index e9dca1d674..64cade4f9d 100644 --- a/tests/e2e/Services/Databases/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/Collections/DatabasesConsoleClientTest.php @@ -1,6 +1,6 @@ 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ Permission::read(Role::any()), @@ -69,7 +69,7 @@ class DatabasesConsoleClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'TvShows', 'permissions' => [ Permission::read(Role::any()), @@ -224,12 +224,12 @@ class DatabasesConsoleClientTest extends Scope ]); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(11, count($response['body'])); + $this->assertEquals(15, count($response['body'])); $this->assertEquals('24h', $response['body']['range']); - $this->assertIsNumeric($response['body']['rowsTotal']); - $this->assertIsNumeric($response['body']['tablesTotal']); - $this->assertIsArray($response['body']['tables']); - $this->assertIsArray($response['body']['rows']); + $this->assertIsNumeric($response['body']['documentsTotal']); + $this->assertIsNumeric($response['body']['collectionsTotal']); + $this->assertIsArray($response['body']['collections']); + $this->assertIsArray($response['body']['documents']); } @@ -273,8 +273,8 @@ class DatabasesConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(3, count($response['body'])); $this->assertEquals('24h', $response['body']['range']); - $this->assertIsNumeric($response['body']['rowsTotal']); - $this->assertIsArray($response['body']['rows']); + $this->assertIsNumeric($response['body']['documentsTotal']); + $this->assertIsArray($response['body']['documents']); } /** diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/Collections/DatabasesCustomClientTest.php similarity index 94% rename from tests/e2e/Services/Databases/DatabasesCustomClientTest.php rename to tests/e2e/Services/Databases/Collections/DatabasesCustomClientTest.php index b192cd04a1..49839f83e1 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/Collections/DatabasesCustomClientTest.php @@ -1,6 +1,6 @@ $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Movies', 'documentSecurity' => true, 'permissions' => [ @@ -73,7 +73,7 @@ class DatabasesCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Captain America', ], @@ -95,7 +95,7 @@ class DatabasesCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Captain America', ], @@ -138,7 +138,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('permissionCheck'), + 'collectionId' => ID::custom('permissionCheck'), 'name' => 'permissionCheck', 'permissions' => [], 'documentSecurity' => true, @@ -166,7 +166,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => ID::custom('permissionCheckDocument'), + 'documentId' => ID::custom('permissionCheckDocument'), 'data' => [ 'name' => 'AppwriteBeginner', ], @@ -247,7 +247,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'level1', 'documentSecurity' => false, 'permissions' => [ @@ -264,7 +264,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'level2', 'documentSecurity' => false, 'permissions' => [ @@ -283,7 +283,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2['body']['$id'], + 'relatedCollectionId' => $collection2['body']['$id'], 'type' => 'oneToMany', 'twoWay' => true, 'onDelete' => 'cascade', @@ -309,11 +309,11 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $collection1RelationAttribute = $collection1Attributes['body']['columns'][0]; + $collection1RelationAttribute = $collection1Attributes['body']['attributes'][0]; $this->assertEquals($relation['body']['side'], $collection1RelationAttribute['side']); $this->assertEquals($relation['body']['twoWayKey'], $collection1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedTable'], $collection1RelationAttribute['relatedTable']); + $this->assertEquals($relation['body']['relatedCollection'], $collection1RelationAttribute['relatedCollection']); $this->assertEquals('restrict', $collection1RelationAttribute['onDelete']); } @@ -335,7 +335,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'c1', 'documentSecurity' => false, 'permissions' => [ @@ -351,7 +351,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'c2', 'documentSecurity' => false, 'permissions' => [ @@ -369,7 +369,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2['body']['$id'], + 'relatedCollectionId' => $collection2['body']['$id'], 'type' => Database::RELATION_ONE_TO_ONE, 'twoWay' => false, 'onDelete' => 'cascade', @@ -387,7 +387,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2['body']['$id'], + 'relatedCollectionId' => $collection2['body']['$id'], 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => false, 'onDelete' => 'cascade', @@ -406,7 +406,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2['body']['$id'], + 'relatedCollectionId' => $collection2['body']['$id'], 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => false, 'onDelete' => 'cascade', @@ -424,7 +424,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2['body']['$id'], + 'relatedCollectionId' => $collection2['body']['$id'], 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => false, 'onDelete' => 'cascade', @@ -442,7 +442,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2['body']['$id'], + 'relatedCollectionId' => $collection2['body']['$id'], 'type' => Database::RELATION_MANY_TO_MANY, 'twoWay' => true, 'onDelete' => 'setNull', @@ -461,7 +461,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2['body']['$id'], + 'relatedCollectionId' => $collection2['body']['$id'], 'type' => Database::RELATION_MANY_TO_MANY, 'twoWay' => true, 'onDelete' => 'setNull', @@ -472,7 +472,7 @@ class DatabasesCustomClientTest extends Scope \sleep(2); $this->assertEquals(409, $relation['body']['code']); - $this->assertEquals('Creating more than one "manyToMany" relationship on the same table is currently not permitted.', $relation['body']['message']); + $this->assertEquals('Creating more than one "manyToMany" relationship on the same collection is currently not permitted.', $relation['body']['message']); } public function testUpdateWithoutRelationPermission(): void @@ -495,7 +495,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection1'), + 'collectionId' => ID::custom('collection1'), 'name' => ID::custom('collection1'), 'documentSecurity' => false, 'permissions' => [ @@ -511,7 +511,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection2'), + 'collectionId' => ID::custom('collection2'), 'name' => ID::custom('collection2'), 'documentSecurity' => false, 'permissions' => [ @@ -524,7 +524,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection3'), + 'collectionId' => ID::custom('collection3'), 'name' => ID::custom('collection3'), 'documentSecurity' => false, 'permissions' => [ @@ -539,7 +539,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection4'), + 'collectionId' => ID::custom('collection4'), 'name' => ID::custom('collection4'), 'documentSecurity' => false, 'permissions' => [ @@ -552,7 +552,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection5'), + 'collectionId' => ID::custom('collection5'), 'name' => ID::custom('collection5'), 'documentSecurity' => false, 'permissions' => [ @@ -568,7 +568,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2['body']['$id'], + 'relatedCollectionId' => $collection2['body']['$id'], 'type' => 'oneToOne', 'twoWay' => false, 'onDelete' => 'setNull', @@ -581,7 +581,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection3['body']['$id'], + 'relatedCollectionId' => $collection3['body']['$id'], 'type' => 'oneToOne', 'twoWay' => false, 'onDelete' => 'setNull', @@ -594,7 +594,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection4['body']['$id'], + 'relatedCollectionId' => $collection4['body']['$id'], 'type' => 'oneToOne', 'twoWay' => false, 'onDelete' => 'setNull', @@ -607,7 +607,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection5['body']['$id'], + 'relatedCollectionId' => $collection5['body']['$id'], 'type' => 'oneToOne', 'twoWay' => false, 'onDelete' => 'setNull', @@ -681,7 +681,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => ID::custom($collection1['body']['$id']), + 'documentId' => ID::custom($collection1['body']['$id']), 'data' => [ 'Title' => 'Captain America', $collection2['body']['$id'] => [ @@ -709,7 +709,7 @@ class DatabasesCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::custom($collection1['body']['$id']), + 'documentId' => ID::custom($collection1['body']['$id']), 'data' => [ 'Title' => 'Captain America', $collection2['body']['$id'] => [ @@ -739,7 +739,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection3'), + 'collectionId' => ID::custom('collection3'), 'name' => ID::custom('collection3'), 'documentSecurity' => false, 'permissions' => [ @@ -814,7 +814,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection3'), + 'collectionId' => ID::custom('collection3'), 'name' => ID::custom('collection3'), 'documentSecurity' => false, 'permissions' => [ @@ -830,7 +830,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('collection2'), + 'collectionId' => ID::custom('collection2'), 'name' => ID::custom('collection2'), 'documentSecurity' => false, 'permissions' => [ @@ -847,7 +847,7 @@ class DatabasesCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => ID::custom('collection3Doc1'), + 'documentId' => ID::custom('collection3Doc1'), 'data' => [ 'Rating' => '20' ] diff --git a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Collections/DatabasesCustomServerTest.php similarity index 94% rename from tests/e2e/Services/Databases/DatabasesCustomServerTest.php rename to tests/e2e/Services/Databases/Collections/DatabasesCustomServerTest.php index 874aa5623e..e420681a2e 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Collections/DatabasesCustomServerTest.php @@ -1,6 +1,6 @@ $this->getProject()['apiKey'] ]), [ 'name' => 'Test 1', - 'tableId' => ID::custom('first'), + 'collectionId' => ID::custom('first'), 'permissions' => [ Permission::read(Role::any()), Permission::create(Role::any()), @@ -374,7 +374,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'name' => 'Test 2', - 'tableId' => ID::custom('second'), + 'collectionId' => ID::custom('second'), 'permissions' => [ Permission::read(Role::any()), Permission::create(Role::any()), @@ -390,12 +390,12 @@ class DatabasesCustomServerTest extends Scope ], $this->getHeaders())); $this->assertEquals(2, $collections['body']['total']); - $this->assertEquals($test1['body']['$id'], $collections['body']['tables'][0]['$id']); - $this->assertEquals($test1['body']['enabled'], $collections['body']['tables'][0]['enabled']); - $this->assertEquals($test2['body']['$id'], $collections['body']['tables'][1]['$id']); - $this->assertEquals($test1['body']['enabled'], $collections['body']['tables'][0]['enabled']); + $this->assertEquals($test1['body']['$id'], $collections['body']['collections'][0]['$id']); + $this->assertEquals($test1['body']['enabled'], $collections['body']['collections'][0]['enabled']); + $this->assertEquals($test2['body']['$id'], $collections['body']['collections'][1]['$id']); + $this->assertEquals($test1['body']['enabled'], $collections['body']['collections'][0]['enabled']); - $base = array_reverse($collections['body']['tables']); + $base = array_reverse($collections['body']['collections']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', @@ -407,7 +407,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collections['headers']['status-code']); - $this->assertCount(1, $collections['body']['tables']); + $this->assertCount(1, $collections['body']['collections']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', @@ -419,7 +419,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collections['headers']['status-code']); - $this->assertCount(1, $collections['body']['tables']); + $this->assertCount(1, $collections['body']['collections']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', @@ -431,7 +431,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collections['headers']['status-code']); - $this->assertCount(2, $collections['body']['tables']); + $this->assertCount(2, $collections['body']['collections']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', @@ -443,7 +443,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collections['headers']['status-code']); - $this->assertCount(0, $collections['body']['tables']); + $this->assertCount(0, $collections['body']['collections']); /** * Test for Order @@ -458,8 +458,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(2, $collections['body']['total']); - $this->assertEquals($base[0]['$id'], $collections['body']['tables'][0]['$id']); - $this->assertEquals($base[1]['$id'], $collections['body']['tables'][1]['$id']); + $this->assertEquals($base[0]['$id'], $collections['body']['collections'][0]['$id']); + $this->assertEquals($base[1]['$id'], $collections['body']['collections'][1]['$id']); /** * Test for After @@ -474,24 +474,24 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorAfter(new Document(['$id' => $base['body']['tables'][0]['$id']]))->toString(), + Query::cursorAfter(new Document(['$id' => $base['body']['collections'][0]['$id']]))->toString(), ], ]); - $this->assertCount(1, $collections['body']['tables']); - $this->assertEquals($base['body']['tables'][1]['$id'], $collections['body']['tables'][0]['$id']); + $this->assertCount(1, $collections['body']['collections']); + $this->assertEquals($base['body']['collections'][1]['$id'], $collections['body']['collections'][0]['$id']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorAfter(new Document(['$id' => $base['body']['tables'][1]['$id']]))->toString(), + Query::cursorAfter(new Document(['$id' => $base['body']['collections'][1]['$id']]))->toString(), ], ]); - $this->assertCount(0, $collections['body']['tables']); - $this->assertEmpty($collections['body']['tables']); + $this->assertCount(0, $collections['body']['collections']); + $this->assertEmpty($collections['body']['collections']); /** * Test for Before @@ -506,24 +506,24 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorBefore(new Document(['$id' => $base['body']['tables'][1]['$id']]))->toString(), + Query::cursorBefore(new Document(['$id' => $base['body']['collections'][1]['$id']]))->toString(), ], ]); - $this->assertCount(1, $collections['body']['tables']); - $this->assertEquals($base['body']['tables'][0]['$id'], $collections['body']['tables'][0]['$id']); + $this->assertCount(1, $collections['body']['collections']); + $this->assertEquals($base['body']['collections'][0]['$id'], $collections['body']['collections'][0]['$id']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::cursorBefore(new Document(['$id' => $base['body']['tables'][0]['$id']]))->toString(), + Query::cursorBefore(new Document(['$id' => $base['body']['collections'][0]['$id']]))->toString(), ], ]); - $this->assertCount(0, $collections['body']['tables']); - $this->assertEmpty($collections['body']['tables']); + $this->assertCount(0, $collections['body']['collections']); + $this->assertEmpty($collections['body']['collections']); /** * Test for Search @@ -536,7 +536,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(1, $collections['body']['total']); - $this->assertEquals('first', $collections['body']['tables'][0]['$id']); + $this->assertEquals('first', $collections['body']['collections'][0]['$id']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', @@ -546,8 +546,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(2, $collections['body']['total']); - $this->assertEquals('Test 1', $collections['body']['tables'][0]['name']); - $this->assertEquals('Test 2', $collections['body']['tables'][1]['name']); + $this->assertEquals('Test 1', $collections['body']['collections'][0]['name']); + $this->assertEquals('Test 2', $collections['body']['collections'][1]['name']); $collections = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections', array_merge([ 'content-type' => 'application/json', @@ -579,7 +579,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'name' => 'Test 1', - 'tableId' => ID::custom('first'), + 'collectionId' => ID::custom('first'), 'permissions' => [ Permission::read(Role::any()), Permission::create(Role::any()), @@ -592,7 +592,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(409, $response['headers']['status-code']); return [ 'databaseId' => $databaseId, - 'tableId' => $test1['body']['$id'], + 'collectionId' => $test1['body']['$id'], ]; } @@ -602,7 +602,7 @@ class DatabasesCustomServerTest extends Scope public function testGetCollection(array $data): void { $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $collection = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([ 'content-type' => 'application/json', @@ -622,7 +622,7 @@ class DatabasesCustomServerTest extends Scope public function testUpdateCollection(array $data) { $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $collection = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([ 'content-type' => 'application/json', @@ -657,7 +657,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Encrypted Actors Data', 'permissions' => [ Permission::read(Role::any()), @@ -719,7 +719,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'firstName' => 'Jonah', 'lastName' => 'Jameson', @@ -767,7 +767,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Actors', 'permissions' => [ Permission::read(Role::any()), @@ -820,7 +820,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'firstName' => 'lorem', 'lastName' => 'ipsum', @@ -840,7 +840,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'key_lastName', 'type' => 'key', - 'columns' => [ + 'attributes' => [ 'lastName', ], ]); @@ -857,11 +857,11 @@ class DatabasesCustomServerTest extends Scope $unneededId = $unneeded['body']['key']; $this->assertEquals(200, $collection['headers']['status-code']); - $this->assertIsArray($collection['body']['columns']); - $this->assertCount(3, $collection['body']['columns']); - $this->assertEquals($collection['body']['columns'][0]['key'], $firstName['body']['key']); - $this->assertEquals($collection['body']['columns'][1]['key'], $lastName['body']['key']); - $this->assertEquals($collection['body']['columns'][2]['key'], $unneeded['body']['key']); + $this->assertIsArray($collection['body']['attributes']); + $this->assertCount(3, $collection['body']['attributes']); + $this->assertEquals($collection['body']['attributes'][0]['key'], $firstName['body']['key']); + $this->assertEquals($collection['body']['attributes'][1]['key'], $lastName['body']['key']); + $this->assertEquals($collection['body']['attributes'][2]['key'], $unneeded['body']['key']); $this->assertCount(1, $collection['body']['indexes']); $this->assertEquals($collection['body']['indexes'][0]['key'], $index['body']['key']); @@ -892,13 +892,13 @@ class DatabasesCustomServerTest extends Scope ]), []); $this->assertEquals(200, $collection['headers']['status-code']); - $this->assertIsArray($collection['body']['columns']); - $this->assertCount(2, $collection['body']['columns']); - $this->assertEquals($collection['body']['columns'][0]['key'], $firstName['body']['key']); - $this->assertEquals($collection['body']['columns'][1]['key'], $lastName['body']['key']); + $this->assertIsArray($collection['body']['attributes']); + $this->assertCount(2, $collection['body']['attributes']); + $this->assertEquals($collection['body']['attributes'][0]['key'], $firstName['body']['key']); + $this->assertEquals($collection['body']['attributes'][1]['key'], $lastName['body']['key']); return [ - 'tableId' => $actors['body']['$id'], + 'collectionId' => $actors['body']['$id'], 'key' => $index['body']['key'], 'databaseId' => $databaseId ]; @@ -910,7 +910,7 @@ class DatabasesCustomServerTest extends Scope public function testDeleteIndex($data): array { $databaseId = $data['databaseId']; - $index = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/indexes/' . $data['key'], array_merge([ + $index = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/indexes/' . $data['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -921,7 +921,7 @@ class DatabasesCustomServerTest extends Scope // Wait for database worker to finish deleting index sleep(2); - $collection = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['tableId'], array_merge([ + $collection = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['collectionId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -938,7 +938,7 @@ class DatabasesCustomServerTest extends Scope public function testDeleteIndexOnDeleteAttribute($data) { $databaseId = $data['databaseId']; - $attribute1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/attributes/string', array_merge([ + $attribute1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -948,7 +948,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $attribute2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/attributes/string', array_merge([ + $attribute2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/attributes/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -965,25 +965,25 @@ class DatabasesCustomServerTest extends Scope sleep(2); - $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'key' => 'index1', 'type' => 'key', - 'columns' => ['attribute1', 'attribute2'], + 'attributes' => ['attribute1', 'attribute2'], 'orders' => ['ASC', 'ASC'], ]); - $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'key' => 'index2', 'type' => 'key', - 'columns' => ['attribute2'], + 'attributes' => ['attribute2'], ]); $this->assertEquals(202, $index1['headers']['status-code']); @@ -994,7 +994,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Expected behavior: deleting attribute2 will cause index2 to be dropped, and index1 rebuilt with a single key - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/attributes/' . $attribute2['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/attributes/' . $attribute2['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1005,7 +1005,7 @@ class DatabasesCustomServerTest extends Scope // wait for database worker to complete sleep(2); - $collection = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['tableId'], array_merge([ + $collection = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['collectionId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1015,12 +1015,12 @@ class DatabasesCustomServerTest extends Scope $this->assertIsArray($collection['body']['indexes']); $this->assertCount(1, $collection['body']['indexes']); $this->assertEquals($index1['body']['key'], $collection['body']['indexes'][0]['key']); - $this->assertIsArray($collection['body']['indexes'][0]['columns']); - $this->assertCount(1, $collection['body']['indexes'][0]['columns']); - $this->assertEquals($attribute1['body']['key'], $collection['body']['indexes'][0]['columns'][0]); + $this->assertIsArray($collection['body']['indexes'][0]['attributes']); + $this->assertCount(1, $collection['body']['indexes'][0]['attributes']); + $this->assertEquals($attribute1['body']['key'], $collection['body']['indexes'][0]['attributes'][0]); // Delete attribute - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['tableId'] . '/attributes/' . $attribute1['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['collectionId'] . '/attributes/' . $attribute1['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1050,7 +1050,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'TestCleanupDuplicateIndexOnDeleteAttribute', 'permissions' => [ Permission::read(Role::any()), @@ -1100,7 +1100,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'index1', 'type' => 'key', - 'columns' => ['attribute1', 'attribute2'], + 'attributes' => ['attribute1', 'attribute2'], 'orders' => ['ASC', 'ASC'], ]); @@ -1111,7 +1111,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'index2', 'type' => 'key', - 'columns' => ['attribute2'], + 'attributes' => ['attribute2'], ]); $this->assertEquals(202, $index1['headers']['status-code']); @@ -1143,9 +1143,9 @@ class DatabasesCustomServerTest extends Scope $this->assertIsArray($collection['body']['indexes']); $this->assertCount(1, $collection['body']['indexes']); $this->assertEquals($index2['body']['key'], $collection['body']['indexes'][0]['key']); - $this->assertIsArray($collection['body']['indexes'][0]['columns']); - $this->assertCount(1, $collection['body']['indexes'][0]['columns']); - $this->assertEquals($attribute2['body']['key'], $collection['body']['indexes'][0]['columns'][0]); + $this->assertIsArray($collection['body']['indexes'][0]['attributes']); + $this->assertCount(1, $collection['body']['indexes'][0]['attributes']); + $this->assertEquals($attribute2['body']['key'], $collection['body']['indexes'][0]['attributes'][0]); // Delete attribute $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/' . $attribute2['body']['key'], array_merge([ @@ -1163,14 +1163,14 @@ class DatabasesCustomServerTest extends Scope public function testDeleteCollection($data) { $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; // Add Documents to the collection $document1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'firstName' => 'Tom', 'lastName' => 'Holland', @@ -1186,7 +1186,7 @@ class DatabasesCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'firstName' => 'Samuel', 'lastName' => 'Jackson', @@ -1249,7 +1249,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Collection1', 'documentSecurity' => false, 'permissions' => [], @@ -1260,7 +1260,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Collection2', 'documentSecurity' => false, 'permissions' => [], @@ -1274,7 +1274,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ]), [ - 'relatedTableId' => $collection2, + 'relatedCollectionId' => $collection2, 'type' => Database::RELATION_MANY_TO_ONE, 'twoWay' => false, 'key' => 'collection2' @@ -1318,7 +1318,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('attributeRowWidthLimit'), + 'collectionId' => ID::custom('attributeRowWidthLimit'), 'name' => 'attributeRowWidthLimit', 'permissions' => [ Permission::read(Role::any()), @@ -1384,7 +1384,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('testLimitException'), + 'collectionId' => ID::custom('testLimitException'), 'name' => 'testLimitException', 'permissions' => [ Permission::read(Role::any()), @@ -1426,12 +1426,12 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $collection['headers']['status-code']); $this->assertEquals($collection['body']['name'], 'testLimitException'); - $this->assertIsArray($collection['body']['columns']); + $this->assertIsArray($collection['body']['attributes']); $this->assertIsArray($collection['body']['indexes']); - $this->assertCount(64, $collection['body']['columns']); + $this->assertCount(64, $collection['body']['attributes']); $this->assertCount(0, $collection['body']['indexes']); - foreach ($collection['body']['columns'] as $attribute) { + foreach ($collection['body']['attributes'] as $attribute) { $this->assertEquals('available', $attribute['status'], 'attribute: ' . $attribute['key']); } @@ -1446,7 +1446,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => "key_attribute{$i}", 'type' => 'key', - 'columns' => ["attribute{$i}"], + 'attributes' => ["attribute{$i}"], ]); $this->assertEquals(202, $index['headers']['status-code']); @@ -1463,9 +1463,9 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $collection['headers']['status-code']); $this->assertEquals($collection['body']['name'], 'testLimitException'); - $this->assertIsArray($collection['body']['columns']); + $this->assertIsArray($collection['body']['attributes']); $this->assertIsArray($collection['body']['indexes']); - $this->assertCount(64, $collection['body']['columns']); + $this->assertCount(64, $collection['body']['attributes']); $this->assertCount(58, $collection['body']['indexes']); $tooMany = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/indexes', array_merge([ @@ -1475,7 +1475,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'tooMany', 'type' => 'key', - 'columns' => ['attribute61'], + 'attributes' => ['attribute61'], ]); $this->assertEquals(400, $tooMany['headers']['status-code']); @@ -1508,7 +1508,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('updateAttributes'), + 'collectionId' => ID::custom('updateAttributes'), 'name' => 'updateAttributes' ]); @@ -1642,7 +1642,7 @@ class DatabasesCustomServerTest extends Scope return [ 'databaseId' => $databaseId, - 'tableId' => $collectionId + 'collectionId' => $collectionId ]; } @@ -1653,7 +1653,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'string'; $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/string/' . $key, array_merge([ 'content-type' => 'application/json', @@ -1681,7 +1681,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals('lorem', $attribute['default']); @@ -1785,7 +1785,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -1795,7 +1795,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'email'; $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/email/' . $key, array_merge([ 'content-type' => 'application/json', @@ -1823,7 +1823,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals('torsten@appwrite.io', $attribute['default']); @@ -1928,7 +1928,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -1938,7 +1938,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'ip'; $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/ip/' . $key, array_merge([ 'content-type' => 'application/json', @@ -1966,7 +1966,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals('127.0.0.1', $attribute['default']); @@ -2070,7 +2070,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -2080,7 +2080,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'url'; $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/url/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2108,7 +2108,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals('http://appwrite.io', $attribute['default']); @@ -2212,7 +2212,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -2222,7 +2222,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'integer'; $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/integer/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2254,7 +2254,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals(123, $attribute['default']); @@ -2430,7 +2430,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/integer/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2444,7 +2444,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/integer/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2458,7 +2458,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/integer/' . $key, array_merge([ @@ -2473,7 +2473,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); } /** @@ -2483,7 +2483,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'float'; $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/float/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2515,7 +2515,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals(123.456, $attribute['default']); @@ -2691,7 +2691,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/float/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2705,7 +2705,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/float/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2719,7 +2719,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/float/' . $key, array_merge([ @@ -2734,7 +2734,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); } /** @@ -2744,7 +2744,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'boolean'; $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/boolean/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2772,7 +2772,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals(true, $attribute['default']); @@ -2876,7 +2876,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -2886,7 +2886,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'datetime'; $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/datetime/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2914,7 +2914,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals('1975-06-12 14:12:55+02:00', $attribute['default']); @@ -3018,7 +3018,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -3028,7 +3028,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'enum'; $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/enum/' . $key, array_merge([ 'content-type' => 'application/json', @@ -3061,7 +3061,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $attribute = array_values(array_filter($new['body']['attributes'], fn (array $a) => $a['key'] === $key))[0] ?? null; $this->assertNotNull($attribute); $this->assertFalse($attribute['required']); $this->assertEquals('lorem', $attribute['default']); @@ -3133,7 +3133,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/enum/' . $key, array_merge([ 'content-type' => 'application/json', @@ -3146,7 +3146,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_VALUE_INVALID, $update['body']['type']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/enum/' . $key, array_merge([ 'content-type' => 'application/json', @@ -3234,7 +3234,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_DEFAULT_UNSUPPORTED, $update['body']['type']); } /** @@ -3244,7 +3244,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'string'; $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $document = $this->client->call( Client::METHOD_POST, @@ -3255,7 +3255,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => [ 'string' => 'string' ], @@ -3287,7 +3287,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => [ 'string' => str_repeat('a', 2048) ], @@ -3324,7 +3324,7 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(400, $attribute['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_INVALID_RESIZE, $attribute['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_INVALID_RESIZE, $attribute['body']['type']); // original documents to original size, remove new document $document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $document['body']['$id'], array_merge([ @@ -3373,7 +3373,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => [ 'string' => str_repeat('a', 10) ], @@ -3408,7 +3408,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => [ 'string' => str_repeat('a', 11) ], @@ -3417,7 +3417,7 @@ class DatabasesCustomServerTest extends Scope ); $this->assertEquals(400, $newDoc['headers']['status-code']); - $this->assertEquals(AppwriteException::ROW_INVALID_STRUCTURE, $newDoc['body']['type']); + $this->assertEquals(AppwriteException::DOCUMENT_INVALID_STRUCTURE, $newDoc['body']['type']); } /** @@ -3426,7 +3426,7 @@ class DatabasesCustomServerTest extends Scope public function testAttributeUpdateNotFound(array $data) { $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $attributes = [ 'string' => [ @@ -3491,7 +3491,7 @@ class DatabasesCustomServerTest extends Scope ]), $payload); $this->assertEquals(404, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::TABLE_NOT_FOUND, $update['body']['type']); + $this->assertEquals(AppwriteException::COLLECTION_NOT_FOUND, $update['body']['type']); /** * Check if Attribute exists @@ -3503,7 +3503,7 @@ class DatabasesCustomServerTest extends Scope ]), $payload); $this->assertEquals(404, $update['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_NOT_FOUND, $update['body']['type']); + $this->assertEquals(AppwriteException::ATTRIBUTE_NOT_FOUND, $update['body']['type']); } } @@ -3514,7 +3514,7 @@ class DatabasesCustomServerTest extends Scope { $key = 'string'; $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; // Create document to test against $document = $this->client->call( @@ -3526,7 +3526,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => [ 'string' => 'string' ], @@ -3578,7 +3578,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => [ 'new_string' => 'string' ], @@ -3600,7 +3600,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => [ 'string' => 'string' ], @@ -3630,7 +3630,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => 'collection1', + 'collectionId' => 'collection1', 'name' => 'level1', 'documentSecurity' => false, 'permissions' => [ @@ -3646,7 +3646,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => 'collection2', + 'collectionId' => 'collection2', 'name' => 'level2', 'documentSecurity' => false, 'permissions' => [ @@ -3684,7 +3684,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2Id, + 'relatedCollectionId' => $collection2Id, 'type' => 'oneToMany', 'twoWay' => true, 'onDelete' => 'cascade', @@ -3700,11 +3700,11 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $collection1RelationAttribute = $collection1Attributes['body']['columns'][0]; + $collection1RelationAttribute = $collection1Attributes['body']['attributes'][0]; $this->assertEquals($relation['body']['side'], $collection1RelationAttribute['side']); $this->assertEquals($relation['body']['twoWayKey'], $collection1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedTable'], $collection1RelationAttribute['relatedTable']); + $this->assertEquals($relation['body']['relatedCollection'], $collection1RelationAttribute['relatedCollection']); // Create a document for checking later $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1Id . '/documents', array_merge([ @@ -3712,7 +3712,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => [ 'level2' => [[ '$id' => 'unique()', @@ -3764,8 +3764,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection1Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection1Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $collection1Attributes['body']['columns'][0]['key']); + $this->assertEquals(1, count($collection1Attributes['body']['attributes'])); + $this->assertEquals('new_level_2', $collection1Attributes['body']['attributes'][0]['key']); // Check if attribute was renamed on the child's side $collection2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2Id, [ @@ -3775,8 +3775,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection2Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection2Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $collection2Attributes['body']['columns'][0]['twoWayKey']); + $this->assertEquals(1, count($collection2Attributes['body']['attributes'])); + $this->assertEquals('new_level_2', $collection2Attributes['body']['attributes'][0]['twoWayKey']); $this->cleanupRelationshipCollection(); } @@ -3794,7 +3794,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2Id, + 'relatedCollectionId' => $collection2Id, 'type' => 'oneToOne', 'twoWay' => true, 'onDelete' => 'cascade', @@ -3810,11 +3810,11 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $collection1RelationAttribute = $collection1Attributes['body']['columns'][0]; + $collection1RelationAttribute = $collection1Attributes['body']['attributes'][0]; $this->assertEquals($relation['body']['side'], $collection1RelationAttribute['side']); $this->assertEquals($relation['body']['twoWayKey'], $collection1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedTable'], $collection1RelationAttribute['relatedTable']); + $this->assertEquals($relation['body']['relatedCollection'], $collection1RelationAttribute['relatedCollection']); // Create a document for checking later $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1Id . '/documents', array_merge([ @@ -3822,7 +3822,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => [ 'level2' => [ '$id' => 'unique()', @@ -3874,8 +3874,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection1Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection1Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $collection1Attributes['body']['columns'][0]['key']); + $this->assertEquals(1, count($collection1Attributes['body']['attributes'])); + $this->assertEquals('new_level_2', $collection1Attributes['body']['attributes'][0]['key']); // Check if attribute was renamed on the child's side $collection2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2Id, [ @@ -3885,8 +3885,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection2Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection2Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $collection2Attributes['body']['columns'][0]['twoWayKey']); + $this->assertEquals(1, count($collection2Attributes['body']['attributes'])); + $this->assertEquals('new_level_2', $collection2Attributes['body']['attributes'][0]['twoWayKey']); $this->cleanupRelationshipCollection(); } @@ -3904,7 +3904,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2Id, + 'relatedCollectionId' => $collection2Id, 'type' => 'manyToOne', 'twoWay' => true, 'onDelete' => 'cascade', @@ -3920,11 +3920,11 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $collection1RelationAttribute = $collection1Attributes['body']['columns'][0]; + $collection1RelationAttribute = $collection1Attributes['body']['attributes'][0]; $this->assertEquals($relation['body']['side'], $collection1RelationAttribute['side']); $this->assertEquals($relation['body']['twoWayKey'], $collection1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedTable'], $collection1RelationAttribute['relatedTable']); + $this->assertEquals($relation['body']['relatedCollection'], $collection1RelationAttribute['relatedCollection']); // Create a document for checking later $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1Id . '/documents', array_merge([ @@ -3932,7 +3932,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => [ 'level2' => [ '$id' => 'unique()', @@ -3984,8 +3984,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection1Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection1Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $collection1Attributes['body']['columns'][0]['key']); + $this->assertEquals(1, count($collection1Attributes['body']['attributes'])); + $this->assertEquals('new_level_2', $collection1Attributes['body']['attributes'][0]['key']); // Check if attribute was renamed on the child's side $collection2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2Id, [ @@ -3995,8 +3995,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection2Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection2Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $collection2Attributes['body']['columns'][0]['twoWayKey']); + $this->assertEquals(1, count($collection2Attributes['body']['attributes'])); + $this->assertEquals('new_level_2', $collection2Attributes['body']['attributes'][0]['twoWayKey']); $this->cleanupRelationshipCollection(); } @@ -4014,7 +4014,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedTableId' => $collection2Id, + 'relatedCollectionId' => $collection2Id, 'type' => 'manyToOne', 'twoWay' => true, 'onDelete' => 'cascade', @@ -4030,11 +4030,11 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $collection1RelationAttribute = $collection1Attributes['body']['columns'][0]; + $collection1RelationAttribute = $collection1Attributes['body']['attributes'][0]; $this->assertEquals($relation['body']['side'], $collection1RelationAttribute['side']); $this->assertEquals($relation['body']['twoWayKey'], $collection1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedTable'], $collection1RelationAttribute['relatedTable']); + $this->assertEquals($relation['body']['relatedCollection'], $collection1RelationAttribute['relatedCollection']); // Create a document for checking later $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1Id . '/documents', array_merge([ @@ -4042,7 +4042,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => [ 'level2' => [ '$id' => 'unique()', @@ -4094,8 +4094,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection1Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection1Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $collection1Attributes['body']['columns'][0]['key']); + $this->assertEquals(1, count($collection1Attributes['body']['attributes'])); + $this->assertEquals('new_level_2', $collection1Attributes['body']['attributes'][0]['key']); // Check if attribute was renamed on the child's side $collection2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2Id, [ @@ -4105,8 +4105,8 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(200, $collection2Attributes['headers']['status-code']); - $this->assertEquals(1, count($collection2Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $collection2Attributes['body']['columns'][0]['twoWayKey']); + $this->assertEquals(1, count($collection2Attributes['body']['attributes'])); + $this->assertEquals('new_level_2', $collection2Attributes['body']['attributes'][0]['twoWayKey']); $this->cleanupRelationshipCollection(); } diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php b/tests/e2e/Services/Databases/Collections/DatabasesPermissionsGuestTest.php similarity index 95% rename from tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php rename to tests/e2e/Services/Databases/Collections/DatabasesPermissionsGuestTest.php index 64413c2fab..d05c944391 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/Collections/DatabasesPermissionsGuestTest.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $this->getServerHeader(), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ Permission::read(Role::any()), @@ -42,7 +42,7 @@ class DatabasesPermissionsGuestTest extends Scope ], ]); $privateMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $this->getServerHeader(), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Movies', 'permissions' => [], 'documentSecurity' => true, @@ -94,14 +94,14 @@ class DatabasesPermissionsGuestTest extends Scope $databaseId = $data['databaseId']; $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $publicCollectionId . '/documents', $this->getServerHeader(), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], 'permissions' => $permissions, ]); $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $privateCollectionId . '/documents', $this->getServerHeader(), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], @@ -124,11 +124,11 @@ class DatabasesPermissionsGuestTest extends Scope ]); $this->assertEquals(1, $publicDocuments['body']['total']); - $this->assertEquals($permissions, $publicDocuments['body']['rows'][0]['$permissions']); + $this->assertEquals($permissions, $publicDocuments['body']['documents'][0]['$permissions']); if (\in_array(Permission::read(Role::any()), $permissions)) { $this->assertEquals(1, $privateDocuments['body']['total']); - $this->assertEquals($permissions, $privateDocuments['body']['rows'][0]['$permissions']); + $this->assertEquals($permissions, $privateDocuments['body']['documents'][0]['$permissions']); } else { $this->assertEquals(0, $privateDocuments['body']['total']); } @@ -152,7 +152,7 @@ class DatabasesPermissionsGuestTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ] @@ -165,7 +165,7 @@ class DatabasesPermissionsGuestTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], @@ -175,7 +175,7 @@ class DatabasesPermissionsGuestTest extends Scope // Create a document in private collection with API key so we can test that update and delete are also not allowed $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $privateCollectionId . '/documents', $this->getServerHeader(), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], @@ -241,7 +241,7 @@ class DatabasesPermissionsGuestTest extends Scope $databaseId = $database['body']['$id']; $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $this->getServerHeader(), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ Permission::create(Role::any()), @@ -263,7 +263,7 @@ class DatabasesPermissionsGuestTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Thor: Ragnarok', ], diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php b/tests/e2e/Services/Databases/Collections/DatabasesPermissionsMemberTest.php similarity index 96% rename from tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php rename to tests/e2e/Services/Databases/Collections/DatabasesPermissionsMemberTest.php index 2b959344fe..e8065501fe 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/Collections/DatabasesPermissionsMemberTest.php @@ -1,6 +1,6 @@ client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $this->getServerHeader(), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ Permission::read(Role::any()), @@ -146,7 +146,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(202, $response['headers']['status-code']); $private = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $this->getServerHeader(), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Private Movies', 'permissions' => [ Permission::read(Role::users()), @@ -167,7 +167,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(202, $response['headers']['status-code']); $doconly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', $this->getServerHeader(), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Document Only Movies', 'permissions' => [], 'documentSecurity' => true, @@ -186,7 +186,7 @@ class DatabasesPermissionsMemberTest extends Scope return [ 'users' => $this->users, - 'tables' => $this->collections, + 'collections' => $this->collections, 'databaseId' => $databaseId ]; } @@ -199,11 +199,11 @@ class DatabasesPermissionsMemberTest extends Scope public function testReadDocuments($permissions, $anyCount, $usersCount, $docOnlyCount, $data) { $users = $data['users']; - $collections = $data['tables']; + $collections = $data['collections']; $databaseId = $data['databaseId']; $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collections['public'] . '/documents', $this->getServerHeader(), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], @@ -212,7 +212,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collections['private'] . '/documents', $this->getServerHeader(), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], @@ -221,7 +221,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collections['doconly'] . '/documents', $this->getServerHeader(), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], diff --git a/tests/e2e/Services/Databases/DatabasesPermissionsScope.php b/tests/e2e/Services/Databases/Collections/DatabasesPermissionsScope.php similarity index 98% rename from tests/e2e/Services/Databases/DatabasesPermissionsScope.php rename to tests/e2e/Services/Databases/Collections/DatabasesPermissionsScope.php index 0042d253ac..9d46dda5c6 100644 --- a/tests/e2e/Services/Databases/DatabasesPermissionsScope.php +++ b/tests/e2e/Services/Databases/Collections/DatabasesPermissionsScope.php @@ -1,6 +1,6 @@ assertEquals(201, $db['headers']['status-code']); $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/collections', $this->getServerHeader(), [ - 'tableId' => ID::custom('collection1'), + 'collectionId' => ID::custom('collection1'), 'name' => 'Collection 1', 'permissions' => [ Permission::read(Role::team($teams['team1']['$id'])), @@ -64,7 +64,7 @@ class DatabasesPermissionsTeamTest extends Scope ]); $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/collections', $this->getServerHeader(), [ - 'tableId' => ID::custom('collection2'), + 'collectionId' => ID::custom('collection2'), 'name' => 'Collection 2', 'permissions' => [ Permission::read(Role::team($teams['team2']['$id'])), @@ -141,7 +141,7 @@ class DatabasesPermissionsTeamTest extends Scope $this->createCollections($this->teams); $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/collections/' . $this->collections['collection1'] . '/documents', $this->getServerHeader(), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], @@ -149,7 +149,7 @@ class DatabasesPermissionsTeamTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/collections/' . $this->collections['collection2'] . '/documents', $this->getServerHeader(), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Ipsum', ], @@ -174,7 +174,7 @@ class DatabasesPermissionsTeamTest extends Scope ]); if ($success) { - $this->assertCount(1, $documents['body']['rows']); + $this->assertCount(1, $documents['body']['documents']); } else { $this->assertEquals(401, $documents['headers']['status-code']); } @@ -192,7 +192,7 @@ class DatabasesPermissionsTeamTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $users[$user]['session'], ], [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'title' => 'Ipsum', ], From 2d74765ba0fd68026c73e38ac1505bd728480a15 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 8 May 2025 20:00:01 +0530 Subject: [PATCH 078/362] update: fix exception. --- .github/workflows/tests.yml | 4 ++-- .../Http/Databases/Collections/Attributes/Action.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a7fc1cf0c6..4775272185 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -145,7 +145,7 @@ jobs: Account, Avatars, Console, - Databases, + Databases/Collections, Functions, FunctionsSchedule, GraphQL, @@ -213,7 +213,7 @@ jobs: Account, Avatars, Console, - Databases, + Databases/Collections, Functions, FunctionsSchedule, GraphQL, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index fcb9bcc2df..be6e3d1ff7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -494,7 +494,7 @@ abstract class Action extends UtopiaAction } if (!is_null($default) && !$validator->isValid($default)) { - throw new Exception($this->getTypeInvalidException(), $validator->getDescription()); + throw new Exception($this->getInvalidValueException(), $validator->getDescription()); } $options = [ From 0ecd97d027cb03bb8cb0bd059abecc54df182cf4 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 09:33:52 +0530 Subject: [PATCH 079/362] fix: wrong param. --- .../Http/Databases/Tables/Columns/Relationship/Create.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php index 2e338ae037..be5da989af 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php @@ -80,7 +80,7 @@ class Create extends RelationshipCreate ->inject('queueForDatabase') ->inject('queueForEvents') ->callback(function (string $databaseId, string $tableId, string $relatedTableId, string $type, bool $twoWay, ?string $key, ?string $twoWayKey, string $onDelete, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $relatedTableId, $type, $twoWayKey, $key, $twoWayKey, $onDelete, $response, $dbForProject, $queueForDatabase, $queueForEvents); + parent::action($databaseId, $tableId, $relatedTableId, $type, $twoWay, $key, $twoWayKey, $onDelete, $response, $dbForProject, $queueForDatabase, $queueForEvents); }); } } From ef30e827c75a4c1885a4dbc08af04005e5294ca1 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 09:52:04 +0530 Subject: [PATCH 080/362] misc: changes to the databases worker. --- .../Modules/Databases/Workers/Databases.php | 293 +++++++++--------- 1 file changed, 146 insertions(+), 147 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php index 2a6d1f1f28..8711d28d2c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php +++ b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php @@ -60,8 +60,8 @@ class Databases extends Action } $type = $payload['type']; - $row = new Document($payload['row'] ?? $payload['document'] ?? []); - $table = new Document($payload['table'] ?? $payload['collection'] ?? []); + $document = new Document($payload['row'] ?? $payload['document'] ?? []); + $collection = new Document($payload['table'] ?? $payload['collection'] ?? []); $database = new Document($payload['database'] ?? []); $log->addTag('projectId', $project->getId()); @@ -74,20 +74,20 @@ class Databases extends Action $log->addTag('databaseId', $database->getId()); match (\strval($type)) { - DATABASE_TYPE_DELETE_DATABASE => $this->deleteDatabase($database, $project, $dbForProject), - DATABASE_TYPE_DELETE_COLLECTION => $this->deleteTable($database, $table, $project, $dbForProject), - DATABASE_TYPE_CREATE_ATTRIBUTE => $this->createColumn($database, $table, $row, $project, $dbForPlatform, $dbForProject, $queueForRealtime), - DATABASE_TYPE_DELETE_ATTRIBUTE => $this->deleteColumn($database, $table, $row, $project, $dbForPlatform, $dbForProject, $queueForRealtime), - DATABASE_TYPE_CREATE_INDEX => $this->createIndex($database, $table, $row, $project, $dbForPlatform, $dbForProject, $queueForRealtime), - DATABASE_TYPE_DELETE_INDEX => $this->deleteIndex($database, $table, $row, $project, $dbForPlatform, $dbForProject, $queueForRealtime), + DATABASE_TYPE_DELETE_DATABASE => $this->deleteDatabase($database, $dbForProject), + DATABASE_TYPE_DELETE_COLLECTION => $this->deleteCollection($database, $collection, $dbForProject), + DATABASE_TYPE_CREATE_ATTRIBUTE => $this->createAttribute($database, $collection, $document, $project, $dbForPlatform, $dbForProject, $queueForRealtime), + DATABASE_TYPE_DELETE_ATTRIBUTE => $this->deleteAttribute($database, $collection, $document, $project, $dbForPlatform, $dbForProject, $queueForRealtime), + DATABASE_TYPE_CREATE_INDEX => $this->createIndex($database, $collection, $document, $project, $dbForPlatform, $dbForProject, $queueForRealtime), + DATABASE_TYPE_DELETE_INDEX => $this->deleteIndex($database, $collection, $document, $project, $dbForPlatform, $dbForProject, $queueForRealtime), default => throw new Exception('No database operation for type: ' . \strval($type)), }; } /** * @param Document $database - * @param Document $table - * @param Document $column + * @param Document $collection + * @param Document $attribute * @param Document $project * @param Database $dbForPlatform * @param Database $dbForProject @@ -98,20 +98,20 @@ class Databases extends Action * @throws \Exception * @throws \Throwable */ - private function createColumn( + private function createAttribute( Document $database, - Document $table, - Document $column, + Document $collection, + Document $attribute, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime ): void { - if ($table->isEmpty()) { - throw new Exception('Missing table'); + if ($collection->isEmpty()) { + throw new Exception('Missing collection/table'); } - if ($column->isEmpty()) { - throw new Exception('Missing column'); + if ($attribute->isEmpty()) { + throw new Exception('Missing attribute/column'); } $projectId = $project->getId(); @@ -123,42 +123,42 @@ class Databases extends Action * TODO @christyjacob4 verify if this is still the case * Fetch attribute from the database, since with Resque float values are loosing information. */ - $column = $dbForProject->getDocument('attributes', $column->getId()); + $attribute = $dbForProject->getDocument('attributes', $attribute->getId()); - if ($column->isEmpty()) { + if ($attribute->isEmpty()) { // Attribute was deleted before job was processed return; } - $tableId = $table->getId(); - $key = $column->getAttribute('key', ''); - $type = $column->getAttribute('type', ''); - $size = $column->getAttribute('size', 0); - $required = $column->getAttribute('required', false); - $default = $column->getAttribute('default', null); - $signed = $column->getAttribute('signed', true); - $array = $column->getAttribute('array', false); - $format = $column->getAttribute('format', ''); - $formatOptions = $column->getAttribute('formatOptions', []); - $filters = $column->getAttribute('filters', []); - $options = $column->getAttribute('options', []); + $collectionId = $collection->getId(); + $key = $attribute->getAttribute('key', ''); + $type = $attribute->getAttribute('type', ''); + $size = $attribute->getAttribute('size', 0); + $required = $attribute->getAttribute('required', false); + $default = $attribute->getAttribute('default', null); + $signed = $attribute->getAttribute('signed', true); + $array = $attribute->getAttribute('array', false); + $format = $attribute->getAttribute('format', ''); + $formatOptions = $attribute->getAttribute('formatOptions', []); + $filters = $attribute->getAttribute('filters', []); + $options = $attribute->getAttribute('options', []); $project = $dbForPlatform->getDocument('projects', $projectId); - $relatedColumn = new Document(); - $relatedTable = new Document(); + $relatedAttribute = new Document(); + $relatedCollection = new Document(); try { switch ($type) { case Database::VAR_RELATIONSHIP: - $relatedTable = $dbForProject->getDocument('database_' . $database->getInternalId(), $options['relatedCollection']); - if ($relatedTable->isEmpty()) { - throw new DatabaseException('Table not found'); + $relatedCollection = $dbForProject->getDocument('database_' . $database->getInternalId(), $options['relatedCollection']); + if ($relatedCollection->isEmpty()) { + throw new DatabaseException('Collection/Table not found'); } if ( !$dbForProject->createRelationship( - collection: 'database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), - relatedCollection: 'database_' . $database->getInternalId() . '_collection_' . $relatedTable->getInternalId(), + collection: 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + relatedCollection: 'database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId(), type: $options['relationType'], twoWay: $options['twoWay'], id: $key, @@ -166,61 +166,61 @@ class Databases extends Action onDelete: $options['onDelete'], ) ) { - throw new DatabaseException('Failed to create Column'); + throw new DatabaseException('Failed to create attribute/column'); } if ($options['twoWay']) { - $relatedColumn = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $options['twoWayKey']); - $dbForProject->updateDocument('attributes', $relatedColumn->getId(), $relatedColumn->setAttribute('status', 'available')); + $relatedAttribute = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $options['twoWayKey']); + $dbForProject->updateDocument('attributes', $relatedAttribute->getId(), $relatedAttribute->setAttribute('status', 'available')); } break; default: - if (!$dbForProject->createAttribute('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $key, $type, $size, $required, $default, $signed, $array, $format, $formatOptions, $filters)) { - throw new Exception('Failed to create Column'); + if (!$dbForProject->createAttribute('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $key, $type, $size, $required, $default, $signed, $array, $format, $formatOptions, $filters)) { + throw new Exception('Failed to create attribute/column'); } } - $dbForProject->updateDocument('attributes', $column->getId(), $column->setAttribute('status', 'available')); + $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'available')); } catch (\Throwable $e) { Console::error($e->getMessage()); if ($e instanceof DatabaseException) { - $column->setAttribute('error', $e->getMessage()); - if (! $relatedColumn->isEmpty()) { - $relatedColumn->setAttribute('error', $e->getMessage()); + $attribute->setAttribute('error', $e->getMessage()); + if (! $relatedAttribute->isEmpty()) { + $relatedAttribute->setAttribute('error', $e->getMessage()); } } $dbForProject->updateDocument( 'attributes', - $column->getId(), - $column->setAttribute('status', 'failed') + $attribute->getId(), + $attribute->setAttribute('status', 'failed') ); - if (! $relatedColumn->isEmpty()) { + if (! $relatedAttribute->isEmpty()) { $dbForProject->updateDocument( 'attributes', - $relatedColumn->getId(), - $relatedColumn->setAttribute('status', 'failed') + $relatedAttribute->getId(), + $relatedAttribute->setAttribute('status', 'failed') ); } throw $e; } finally { - $this->trigger($database, $table, $project, $events, $queueForRealtime, $column); + $this->trigger($database, $collection, $project, $events, $queueForRealtime, $attribute); - if (! $relatedTable->isEmpty()) { - $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $relatedTable->getId()); + if (! $relatedCollection->isEmpty()) { + $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $relatedCollection->getId()); } - $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $tableId); + $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collectionId); } } /** * @param Document $database - * @param Document $table - * @param Document $column + * @param Document $collection + * @param Document $attribute * @param Document $project * @param Database $dbForPlatform * @param Database $dbForProject @@ -231,13 +231,13 @@ class Databases extends Action * @throws \Exception * @throws \Throwable **/ - private function deleteColumn(Document $database, Document $table, Document $column, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime): void + private function deleteAttribute(Document $database, Document $collection, Document $attribute, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime): void { - if ($table->isEmpty()) { - throw new Exception('Missing collection'); + if ($collection->isEmpty()) { + throw new Exception('Missing collection/table'); } - if ($column->isEmpty()) { - throw new Exception('Missing attribute'); + if ($attribute->isEmpty()) { + throw new Exception('Missing attribute/column'); } $projectId = $project->getId(); @@ -245,13 +245,13 @@ class Databases extends Action 'databases.[databaseId].tables.[tableId].columns.[columnId].delete', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].delete', ]; - $tableId = $table->getId(); - $key = $column->getAttribute('key', ''); - $type = $column->getAttribute('type', ''); + $collectionId = $collection->getId(); + $key = $attribute->getAttribute('key', ''); + $type = $attribute->getAttribute('type', ''); $project = $dbForPlatform->getDocument('projects', $projectId); - $options = $column->getAttribute('options', []); - $relatedColumn = new Document(); - $relatedTable = new Document(); + $options = $attribute->getAttribute('options', []); + $relatedAttribute = new Document(); + $relatedCollection = new Document(); // possible states at this point: // - available: should not land in queue; controller flips these to 'deleting' // - processing: hasn't finished creating @@ -263,89 +263,89 @@ class Databases extends Action try { if ($type === Database::VAR_RELATIONSHIP) { if ($options['twoWay']) { - $relatedTable = $dbForProject->getDocument('database_' . $database->getInternalId(), $options['relatedCollection']); - if ($relatedTable->isEmpty()) { - throw new DatabaseException('Table not found'); + $relatedCollection = $dbForProject->getDocument('database_' . $database->getInternalId(), $options['relatedCollection']); + if ($relatedCollection->isEmpty()) { + throw new DatabaseException('Collection/Table not found'); } - $relatedColumn = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $relatedTable->getInternalId() . '_' . $options['twoWayKey']); + $relatedAttribute = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $options['twoWayKey']); } - if (!$dbForProject->deleteRelationship('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $key)) { - $dbForProject->updateDocument('attributes', $relatedColumn->getId(), $relatedColumn->setAttribute('status', 'stuck')); + if (!$dbForProject->deleteRelationship('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $key)) { + $dbForProject->updateDocument('attributes', $relatedAttribute->getId(), $relatedAttribute->setAttribute('status', 'stuck')); throw new DatabaseException('Failed to delete Relationship'); } - } elseif (!$dbForProject->deleteAttribute('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $key)) { - throw new DatabaseException('Failed to delete Column'); + } elseif (!$dbForProject->deleteAttribute('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $key)) { + throw new DatabaseException('Failed to delete attribute/column'); } - $dbForProject->deleteDocument('attributes', $column->getId()); + $dbForProject->deleteDocument('attributes', $attribute->getId()); - if (!$relatedColumn->isEmpty()) { - $dbForProject->deleteDocument('attributes', $relatedColumn->getId()); + if (!$relatedAttribute->isEmpty()) { + $dbForProject->deleteDocument('attributes', $relatedAttribute->getId()); } } catch (NotFound $e) { Console::error($e->getMessage()); - $dbForProject->deleteDocument('attributes', $column->getId()); + $dbForProject->deleteDocument('attributes', $attribute->getId()); - if (!$relatedColumn->isEmpty()) { - $dbForProject->deleteDocument('attributes', $relatedColumn->getId()); + if (!$relatedAttribute->isEmpty()) { + $dbForProject->deleteDocument('attributes', $relatedAttribute->getId()); } } catch (\Throwable $e) { Console::error($e->getMessage()); if ($e instanceof DatabaseException) { - $column->setAttribute('error', $e->getMessage()); - if (!$relatedColumn->isEmpty()) { - $relatedColumn->setAttribute('error', $e->getMessage()); + $attribute->setAttribute('error', $e->getMessage()); + if (!$relatedAttribute->isEmpty()) { + $relatedAttribute->setAttribute('error', $e->getMessage()); } } $dbForProject->updateDocument( 'attributes', - $column->getId(), - $column->setAttribute('status', 'stuck') + $attribute->getId(), + $attribute->setAttribute('status', 'stuck') ); - if (!$relatedColumn->isEmpty()) { + if (!$relatedAttribute->isEmpty()) { $dbForProject->updateDocument( 'attributes', - $relatedColumn->getId(), - $relatedColumn->setAttribute('status', 'stuck') + $relatedAttribute->getId(), + $relatedAttribute->setAttribute('status', 'stuck') ); } throw $e; } finally { - $this->trigger($database, $table, $project, $events, $queueForRealtime, $column); + $this->trigger($database, $collection, $project, $events, $queueForRealtime, $attribute); } // The underlying database removes/rebuilds indexes when attribute is removed - // Update indexes table with changes + // Update indexes collection with changes /** @var Document[] $indexes */ - $indexes = $table->getAttribute('indexes', []); + $indexes = $collection->getAttribute('indexes', []); foreach ($indexes as $index) { - /** @var string[] $columns */ - $columns = $index->getAttribute('attributes'); + /** @var string[] $attributes */ + $attributes = $index->getAttribute('attributes'); $lengths = $index->getAttribute('lengths'); $orders = $index->getAttribute('orders'); - $found = \array_search($key, $columns); + $found = \array_search($key, $attributes); if ($found !== false) { // If found, remove entry from attributes, lengths, and orders // array_values wraps array_diff to reindex array keys // when found attribute is removed from array - $columns = \array_values(\array_diff($columns, [$columns[$found]])); + $attributes = \array_values(\array_diff($attributes, [$attributes[$found]])); $lengths = \array_values(\array_diff($lengths, isset($lengths[$found]) ? [$lengths[$found]] : [])); $orders = \array_values(\array_diff($orders, isset($orders[$found]) ? [$orders[$found]] : [])); - if (empty($columns)) { + if (empty($attributes)) { $dbForProject->deleteDocument('indexes', $index->getId()); } else { $index - ->setAttribute('attributes', $columns, Document::SET_TYPE_ASSIGN) + ->setAttribute('attributes', $attributes, Document::SET_TYPE_ASSIGN) ->setAttribute('lengths', $lengths, Document::SET_TYPE_ASSIGN) ->setAttribute('orders', $orders, Document::SET_TYPE_ASSIGN); @@ -363,7 +363,7 @@ class Databases extends Action } if ($exists) { // Delete the duplicate if created, else update in db - $this->deleteIndex($database, $table, $index, $project, $dbForPlatform, $dbForProject, $queueForRealtime); + $this->deleteIndex($database, $collection, $index, $project, $dbForPlatform, $dbForProject, $queueForRealtime); } else { $dbForProject->updateDocument('indexes', $index->getId(), $index); } @@ -371,17 +371,17 @@ class Databases extends Action } } } finally { - $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $tableId); + $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collectionId); - if (! $relatedTable->isEmpty()) { - $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $relatedTable->getId()); + if (! $relatedCollection->isEmpty()) { + $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $relatedCollection->getId()); } } } /** * @param Document $database - * @param Document $table + * @param Document $collection * @param Document $index * @param Document $project * @param Database $dbForPlatform @@ -394,10 +394,10 @@ class Databases extends Action * @throws DatabaseException * @throws \Throwable */ - private function createIndex(Document $database, Document $table, Document $index, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime): void + private function createIndex(Document $database, Document $collection, Document $index, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime): void { - if ($table->isEmpty()) { - throw new Exception('Missing collection'); + if ($collection->isEmpty()) { + throw new Exception('Missing collection/table'); } if ($index->isEmpty()) { throw new Exception('Missing index'); @@ -408,7 +408,7 @@ class Databases extends Action 'databases.[databaseId].tables.[tableId].indexes.[indexId].update', 'databases.[databaseId].collections.[collectionId].indexes.[indexId].update', ]; - $collectionId = $table->getId(); + $collectionId = $collection->getId(); $key = $index->getAttribute('key', ''); $type = $index->getAttribute('type', ''); $attributes = $index->getAttribute('attributes', []); @@ -417,7 +417,7 @@ class Databases extends Action $project = $dbForPlatform->getDocument('projects', $projectId); try { - if (!$dbForProject->createIndex('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $key, $type, $attributes, $lengths, $orders)) { + if (!$dbForProject->createIndex('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $key, $type, $attributes, $lengths, $orders)) { throw new DatabaseException('Failed to create Index'); } $dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'available')); @@ -434,14 +434,14 @@ class Databases extends Action throw $e; } finally { - $this->trigger($database, $table, $project, $events, $queueForRealtime, null, $index); + $this->trigger($database, $collection, $project, $events, $queueForRealtime, null, $index); $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collectionId); } } /** * @param Document $database - * @param Document $table + * @param Document $collection * @param Document $index * @param Document $project * @param Database $dbForPlatform @@ -454,10 +454,10 @@ class Databases extends Action * @throws DatabaseException * @throws \Throwable */ - private function deleteIndex(Document $database, Document $table, Document $index, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime): void + private function deleteIndex(Document $database, Document $collection, Document $index, Document $project, Database $dbForPlatform, Database $dbForProject, Realtime $queueForRealtime): void { - if ($table->isEmpty()) { - throw new Exception('Missing collection'); + if ($collection->isEmpty()) { + throw new Exception('Missing collection/table'); } if ($index->isEmpty()) { throw new Exception('Missing index'); @@ -473,7 +473,7 @@ class Databases extends Action $project = $dbForPlatform->getDocument('projects', $projectId); try { - if ($status !== 'failed' && !$dbForProject->deleteIndex('database_' . $database->getInternalId() . '_collection_' . $table->getInternalId(), $key)) { + if ($status !== 'failed' && !$dbForProject->deleteIndex('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $key)) { throw new DatabaseException('Failed to delete index'); } $dbForProject->deleteDocument('indexes', $index->getId()); @@ -493,22 +493,21 @@ class Databases extends Action throw $e; } finally { - $this->trigger($database, $table, $project, $events, $queueForRealtime, null, $index); - $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $table->getId()); + $this->trigger($database, $collection, $project, $events, $queueForRealtime, null, $index); + $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collection->getId()); } } /** * @param Document $database - * @param Document $project * @param $dbForProject * @return void * @throws Exception */ - protected function deleteDatabase(Document $database, Document $project, $dbForProject): void + protected function deleteDatabase(Document $database, $dbForProject): void { - $this->deleteByGroup('database_' . $database->getInternalId(), [], $dbForProject, function ($collection) use ($database, $project, $dbForProject) { - $this->deleteTable($database, $collection, $project, $dbForProject); + $this->deleteByGroup('database_' . $database->getInternalId(), [], $dbForProject, function ($collection) use ($database, $dbForProject) { + $this->deleteCollection($database, $collection, $dbForProject); }); $dbForProject->deleteCollection('database_' . $database->getInternalId()); @@ -516,7 +515,7 @@ class Databases extends Action /** * @param Document $database - * @param Document $table + * @param Document $collection * @param Document $project * @param Database $dbForProject * @return void @@ -527,17 +526,17 @@ class Databases extends Action * @throws Structure * @throws Exception */ - protected function deleteTable(Document $database, Document $table, Document $project, Database $dbForProject): void + protected function deleteCollection(Document $database, Document $collection, Database $dbForProject): void { - if ($table->isEmpty()) { - throw new Exception('Missing table'); + if ($collection->isEmpty()) { + throw new Exception('Missing collection/table'); } - $collectionId = $table->getId(); - $collectionInternalId = $table->getInternalId(); + $collectionId = $collection->getId(); + $collectionInternalId = $collection->getInternalId(); $databaseInternalId = $database->getInternalId(); - $dbForProject->deleteCollection('database_' . $databaseInternalId . '_collection_' . $table->getInternalId()); + $dbForProject->deleteCollection('database_' . $databaseInternalId . '_collection_' . $collection->getInternalId()); /** * Related collections relating to current collection @@ -551,9 +550,9 @@ class Databases extends Action Query::contains('options', ['"relatedCollection":"'. $collectionId .'"']), ], $dbForProject, - function ($column) use ($dbForProject, $databaseInternalId) { - $dbForProject->purgeCachedDocument('database_' . $databaseInternalId, $column->getAttribute('collectionId')); - $dbForProject->purgeCachedCollection('database_' . $databaseInternalId . '_collection_' . $column->getAttribute('collectionInternalId')); + function ($attribute) use ($dbForProject, $databaseInternalId) { + $dbForProject->purgeCachedDocument('database_' . $databaseInternalId, $attribute->getAttribute('collectionId')); + $dbForProject->purgeCachedCollection('database_' . $databaseInternalId . '_collection_' . $attribute->getAttribute('collectionInternalId')); } ); @@ -570,52 +569,52 @@ class Databases extends Action /** - * @param string $tableId + * @param string $collectionId * @param array $queries * @param Database $database * @param callable|null $callback * @return void * @throws Exception */ - protected function deleteByGroup(string $tableId, array $queries, Database $database, callable $callback = null): void + protected function deleteByGroup(string $collectionId, array $queries, Database $database, callable $callback = null): void { $start = \microtime(true); try { $count = $database->deleteDocuments( - $tableId, + $collectionId, $queries, Database::DELETE_BATCH_SIZE, $callback ); } catch (\Throwable $th) { $tenant = $database->getSharedTables() ? 'Tenant:'.$database->getTenant() : ''; - Console::error("Failed to delete rows for table:{$database->getNamespace()}_{$tableId} {$tenant} :{$th->getMessage()}"); + Console::error("Failed to delete documents/rows for collection/table: {$database->getNamespace()}_{$collectionId} {$tenant} :{$th->getMessage()}"); return; } $end = \microtime(true); - Console::info("Deleted {$count} rows by group in " . ($end - $start) . " seconds"); + Console::info("Deleted {$count} documents/rows by group in " . ($end - $start) . " seconds"); } /** * @param Document $database - * @param Document $table + * @param Document $collection * @param Document $project * @param string[] $events * @param Realtime $queueForRealtime - * @param Document|null $column + * @param Document|null $attribute * @param Document|null $index * @return void * @throws DatabaseException */ protected function trigger( Document $database, - Document $table, + Document $collection, Document $project, array $events, Realtime $queueForRealtime, - Document|null $column = null, + Document|null $attribute = null, Document|null $index = null, ): void { // table and collection @@ -624,15 +623,15 @@ class Databases extends Action ->setProject($project) ->setSubscribers(['console']) ->setEvent($event) - ->setParam('tableId', $table->getId()) - ->setParam('collectionId', $table->getId()) + ->setParam('tableId', $collection->getId()) + ->setParam('collectionId', $collection->getId()) ->setParam('databaseId', $database->getId()); - if (! empty($column)) { + if (! empty($attribute)) { $queueForRealtime - ->setParam('columnId', $column->getId()) - ->setParam('attributeId', $column->getId()) - ->setPayload($column->getArrayCopy()); + ->setParam('columnId', $attribute->getId()) + ->setParam('attributeId', $attribute->getId()) + ->setPayload($attribute->getArrayCopy()); } if (! empty($index)) { From 938b376f3c811591b5f405123a0838e19908d3fd Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 10:02:14 +0530 Subject: [PATCH 081/362] fix: var ref. --- .../Databases/Http/Databases/Collections/Documents/Update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 9b373c7e17..eaaa2bb63f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -287,7 +287,7 @@ class Update extends Action $response->dynamic($document, $this->getResponseModel()); $relationships = \array_map( - fn ($row) => $document->getAttribute('key'), + fn ($document) => $document->getAttribute('key'), \array_filter( $collection->getAttribute('attributes', []), fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP From 65dbebd103467027f7118dc84cb5896d639f43fd Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 11:09:58 +0530 Subject: [PATCH 082/362] misc: fix error types. --- .../Collections/Attributes/Action.php | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index be6e3d1ff7..d1047e671d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -150,6 +150,16 @@ abstract class Action extends UtopiaAction : Exception::COLUMN_LIMIT_EXCEEDED; } + /** + * Get the appropriate index invalid exception. + */ + final protected function getInvalidIndexException(): string + { + return $this->isCollectionsAPI() + ? Exception::INDEX_INVALID + : Exception::COLUMN_INDEX_INVALID; + } + /** * Get the correct default unsupported message. */ @@ -480,7 +490,7 @@ abstract class Action extends UtopiaAction $max ??= $attribute->getAttribute('formatOptions')['max']; if ($min > $max) { - throw new Exception($this->getTypeInvalidException(), 'Minimum value must be lesser than maximum value'); + throw new Exception($this->getInvalidValueException(), 'Minimum value must be lesser than maximum value'); } if ($attribute->getAttribute('format') === APP_DATABASE_ATTRIBUTE_INT_RANGE) { @@ -506,17 +516,17 @@ abstract class Action extends UtopiaAction break; case APP_DATABASE_ATTRIBUTE_ENUM: if (empty($elements)) { - throw new Exception($this->getTypeInvalidException(), 'Enum elements must not be empty'); + throw new Exception($this->getInvalidValueException(), 'Enum elements must not be empty'); } foreach ($elements as $element) { if (\strlen($element) === 0) { - throw new Exception($this->getTypeInvalidException(), 'Each enum element must not be empty'); + throw new Exception($this->getInvalidValueException(), 'Each enum element must not be empty'); } } if (!is_null($default) && !in_array($default, $elements)) { - throw new Exception($this->getTypeInvalidException(), 'Default value not found in elements'); + throw new Exception($this->getInvalidValueException(), 'Default value not found in elements'); } $options = [ @@ -575,7 +585,7 @@ abstract class Action extends UtopiaAction } catch (LimitException) { throw new Exception($this->getLimitException()); } catch (IndexException $e) { - throw new Exception(Exception::INDEX_INVALID, $e->getMessage()); + throw new Exception($this->getInvalidIndexException(), $e->getMessage()); } } From a8dc5c3797532e8a50412574a3e0cd0f103a2eec Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 11:10:53 +0530 Subject: [PATCH 083/362] add: table tests to usage. --- tests/e2e/General/UsageTest.php | 296 +++++++++++++++++++++++++++++--- 1 file changed, 273 insertions(+), 23 deletions(-) diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 54b8597204..1cdd2070d0 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -411,13 +411,13 @@ class UsageTest extends Scope } /** @depends testStorageStats */ - public function testPrepareDatabaseStats(array $data): array + public function testPrepareDatabaseStatsCollectionsAPI(array $data): array { $requestsTotal = $data['requestsTotal']; $databasesTotal = 0; - $tablesTotal = 0; - $rowsTotal = 0; + $collectionsTotal = 0; + $documentsTotal = 0; for ($i = 0; $i < self::CREATE; $i++) { $name = uniqid() . ' database'; @@ -470,7 +470,7 @@ class UsageTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ - 'tableId' => 'unique()', + 'collectionId' => 'unique()', 'name' => $name, 'documentSecurity' => false, 'permissions' => [ @@ -486,7 +486,7 @@ class UsageTest extends Scope $this->assertNotEmpty($response['body']['$id']); $requestsTotal += 1; - $tablesTotal += 1; + $collectionsTotal += 1; $collectionId = $response['body']['$id']; @@ -501,7 +501,7 @@ class UsageTest extends Scope $this->assertEmpty($response['body']); - $tablesTotal -= 1; + $collectionsTotal -= 1; $requestsTotal += 1; } } @@ -537,7 +537,7 @@ class UsageTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ - 'rowId' => 'unique()', + 'documentId' => 'unique()', 'data' => ['name' => $name] ] ); @@ -546,7 +546,7 @@ class UsageTest extends Scope $this->assertNotEmpty($response['body']['$id']); $requestsTotal += 1; - $rowsTotal += 1; + $documentsTotal += 1; $documentId = $response['body']['$id']; @@ -561,31 +561,31 @@ class UsageTest extends Scope $this->assertEmpty($response['body']); - $rowsTotal -= 1; + $documentsTotal -= 1; $requestsTotal += 1; } } return array_merge($data, [ 'databaseId' => $databaseId, - 'tableId' => $collectionId, + 'collectionId' => $collectionId, 'requestsTotal' => $requestsTotal, 'databasesTotal' => $databasesTotal, - 'tablesTotal' => $tablesTotal, - 'rowsTotal' => $rowsTotal, + 'collectionsTotal' => $collectionsTotal, + 'documentsTotal' => $documentsTotal, ]); } - /** @depends testPrepareDatabaseStats */ + /** @depends testPrepareDatabaseStatsCollectionsAPI */ #[Retry(count: 1)] - public function testDatabaseStats(array $data): array + public function testDatabaseStatsCollectionsAPI(array $data): array { $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $requestsTotal = $data['requestsTotal']; $databasesTotal = $data['databasesTotal']; - $tablesTotal = $data['tablesTotal']; - $rowsTotal = $data['rowsTotal']; + $collectionsTotal = $data['collectionsTotal']; + $documentsTotal = $data['documentsTotal']; sleep(self::WAIT); @@ -606,7 +606,7 @@ class UsageTest extends Scope $this->assertEquals($requestsTotal, $response['body']['requests'][array_key_last($response['body']['requests'])]['value']); $this->validateDates($response['body']['requests']); $this->assertEquals($databasesTotal, $response['body']['databasesTotal']); - $this->assertEquals($rowsTotal, $response['body']['rowsTotal']); + $this->assertEquals($documentsTotal, $response['body']['documentsTotal']); $response = $this->client->call( Client::METHOD_GET, @@ -616,9 +616,260 @@ class UsageTest extends Scope $this->assertEquals($databasesTotal, $response['body']['databases'][array_key_last($response['body']['databases'])]['value']); $this->validateDates($response['body']['databases']); - $this->assertEquals($tablesTotal, $response['body']['tables'][array_key_last($response['body']['tables'])]['value']); + $this->assertEquals($collectionsTotal, $response['body']['collections'][array_key_last($response['body']['collections'])]['value']); + $this->validateDates($response['body']['collections']); + $this->assertEquals($documentsTotal, $response['body']['documents'][array_key_last($response['body']['documents'])]['value']); + $this->validateDates($response['body']['documents']); + + $response = $this->client->call( + Client::METHOD_GET, + '/databases/' . $databaseId . '/usage?range=30d', + $this->getConsoleHeaders() + ); + + $this->assertEquals($collectionsTotal, $response['body']['collections'][array_key_last($response['body']['collections'])]['value']); + $this->validateDates($response['body']['collections']); + + $this->assertEquals($documentsTotal, $response['body']['documents'][array_key_last($response['body']['documents'])]['value']); + $this->validateDates($response['body']['documents']); + + $response = $this->client->call( + Client::METHOD_GET, + '/databases/' . $databaseId . '/collections/' . $collectionId . '/usage?range=30d', + $this->getConsoleHeaders() + ); + + $this->assertEquals($documentsTotal, $response['body']['documents'][array_key_last($response['body']['documents'])]['value']); + $this->validateDates($response['body']['documents']); + + return $data; + } + + /** @depends testDatabaseStatsCollectionsAPI */ + public function testPrepareDatabaseStatsTablesAPI(array $data): array + { + $rowsTotal = 0; + $tablesTotal = 0; + $databasesTotal = $data['databasesTotal']; + $documentsTotal = $data['documentsTotal']; + $collectionsTotal = $data['collectionsTotal']; + + $requestsTotal = $data['requestsTotal']; + + for ($i = 0; $i < self::CREATE; $i++) { + $name = uniqid() . ' database'; + + $response = $this->client->call( + Client::METHOD_POST, + '/databases', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), + [ + 'databaseId' => 'unique()', + 'name' => $name, + ] + ); + + $this->assertEquals($name, $response['body']['name']); + $this->assertNotEmpty($response['body']['$id']); + + $requestsTotal += 1; + $databasesTotal += 1; + + $databaseId = $response['body']['$id']; + + if ($i < (self::CREATE / 2)) { + $response = $this->client->call( + Client::METHOD_DELETE, + '/databases/' . $databaseId, + array_merge([ + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), + ); + + $this->assertEmpty($response['body']); + + $databasesTotal -= 1; + $requestsTotal += 1; + } + } + + for ($i = 0; $i < self::CREATE; $i++) { + $name = uniqid() . ' table'; + + $response = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/tables', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), + [ + 'tableId' => 'unique()', + 'name' => $name, + 'documentSecurity' => false, + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ] + ); + + $this->assertEquals($name, $response['body']['name']); + $this->assertNotEmpty($response['body']['$id']); + + $requestsTotal += 1; + $tablesTotal += 1; + + $tableId = $response['body']['$id']; + + if ($i < (self::CREATE / 2)) { + $response = $this->client->call( + Client::METHOD_DELETE, + '/databases/' . $databaseId . '/tables/' . $tableId, + array_merge([ + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), + ); + + $this->assertEmpty($response['body']); + + $tablesTotal -= 1; + $requestsTotal += 1; + } + } + + $response = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/tables/' . $tableId . '/columns' . '/string', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), + [ + 'key' => 'name', + 'size' => 255, + 'required' => true, + ] + ); + + $this->assertEquals('name', $response['body']['key']); + + sleep(self::WAIT); + + $requestsTotal += 1; + + for ($i = 0; $i < self::CREATE; $i++) { + $name = uniqid() . ' table'; + + $response = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), + [ + 'rowId' => 'unique()', + 'data' => ['name' => $name] + ] + ); + + $this->assertEquals($name, $response['body']['name']); + $this->assertNotEmpty($response['body']['$id']); + + $requestsTotal += 1; + $rowsTotal += 1; + + $rowId = $response['body']['$id']; + + if ($i < (self::CREATE / 2)) { + $response = $this->client->call( + Client::METHOD_DELETE, + '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, + array_merge([ + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), + ); + + $this->assertEmpty($response['body']); + + $rowsTotal -= 1; + $requestsTotal += 1; + } + } + + return array_merge($data, [ + 'databaseId' => $databaseId, + 'tableId' => $tableId, + 'requestsTotal' => $requestsTotal, + 'databasesTotal' => $databasesTotal, + 'tablesTotal' => $tablesTotal, + 'rowsTotal' => $rowsTotal, + + // For clarity + 'absoluteRowsTotal' => $rowsTotal + $data['documentsTotal'], + 'absoluteTablesTotal' => $tablesTotal + $data['collectionsTotal'], + ]); + } + + /** @depends testPrepareDatabaseStatsTablesAPI */ + #[Retry(count: 1)] + public function testDatabaseStatsTablesAPI(array $data): array + { + $tableId = $data['tableId']; + $databaseId = $data['databaseId']; + $requestsTotal = $data['requestsTotal']; + + $absoluteRowsTotal = $data['absoluteRowsTotal']; + $absoluteTablesTotal = $data['absoluteTablesTotal']; + + $rowsTotal = $data['rowsTotal']; + $tablesTotal = $data['tablesTotal']; + $databasesTotal = $data['databasesTotal']; + + sleep(self::WAIT); + + $response = $this->client->call( + Client::METHOD_GET, + '/project/usage', + $this->getConsoleHeaders(), + [ + 'period' => '1d', + 'startDate' => self::getToday(), + 'endDate' => self::getTomorrow(), + ] + ); + + $this->assertGreaterThanOrEqual(31, count($response['body'])); + $this->assertCount(1, $response['body']['requests']); + $this->assertCount(1, $response['body']['network']); + $this->assertEquals($requestsTotal, $response['body']['requests'][array_key_last($response['body']['requests'])]['value']); + $this->validateDates($response['body']['requests']); + $this->assertEquals($databasesTotal, $response['body']['databasesTotal']); + + // project level includes all i.e. documents + rows total. + $this->assertEquals($absoluteRowsTotal, $response['body']['rowsTotal']); + + $response = $this->client->call( + Client::METHOD_GET, + '/databases/usage?range=30d', + $this->getConsoleHeaders() + ); + + $this->assertEquals($databasesTotal, $response['body']['databases'][array_key_last($response['body']['databases'])]['value']); + $this->validateDates($response['body']['databases']); + + // database level includes all i.e. collections + tables total. + $this->assertEquals($absoluteTablesTotal, $response['body']['tables'][array_key_last($response['body']['tables'])]['value']); // database level $this->validateDates($response['body']['tables']); - $this->assertEquals($rowsTotal, $response['body']['rows'][array_key_last($response['body']['rows'])]['value']); + + // database level includes all i.e. documents + rows total. + $this->assertEquals($absoluteRowsTotal, $response['body']['rows'][array_key_last($response['body']['rows'])]['value']); $this->validateDates($response['body']['rows']); $response = $this->client->call( @@ -635,7 +886,7 @@ class UsageTest extends Scope $response = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/collections/' . $collectionId . '/usage?range=30d', + '/databases/' . $databaseId . '/tables/' . $tableId . '/usage?range=30d', $this->getConsoleHeaders() ); @@ -645,7 +896,7 @@ class UsageTest extends Scope return $data; } - /** @depends testDatabaseStats */ + /** @depends testDatabaseStatsTablesAPI */ public function testPrepareFunctionsStats(array $data): array { $executionTime = 0; @@ -859,7 +1110,6 @@ class UsageTest extends Scope return $data; } - public function testPrepareSitesStats(): array { $siteId = $this->setupSite([ From a807dd97d9e5e7c47618dfb70a89b08911a25b0d Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 14:47:01 +0530 Subject: [PATCH 084/362] fix: realtime events. --- src/Appwrite/Event/Realtime.php | 33 +++++++- src/Appwrite/Messaging/Adapter/Realtime.php | 12 +-- .../Collections/Attributes/Action.php | 30 ++------ .../Collections/Attributes/Delete.php | 7 +- .../Collections/Documents/Action.php | 16 ---- .../Collections/Documents/Create.php | 6 +- .../Collections/Documents/Delete.php | 6 +- .../Collections/Documents/Update.php | 6 +- .../Databases/Collections/Indexes/Action.php | 16 ---- .../Databases/Collections/Indexes/Create.php | 5 +- .../Databases/Collections/Indexes/Delete.php | 5 +- .../Modules/Databases/Workers/Databases.php | 76 ++++++++----------- 12 files changed, 95 insertions(+), 123 deletions(-) diff --git a/src/Appwrite/Event/Realtime.php b/src/Appwrite/Event/Realtime.php index 67d51e5c52..f45b6548d8 100644 --- a/src/Appwrite/Event/Realtime.php +++ b/src/Appwrite/Event/Realtime.php @@ -73,21 +73,46 @@ class Realtime extends Event } $allEvents = Event::generateEvents($this->getEvent(), $this->getParams()); + $firstEvent = $allEvents[0]; // most verbose event pattern + + // generate and merge all collection and tables api events. + if (str_contains($this->getEvent(), 'databases.') && str_contains($firstEvent, 'collections')) { + $tableEventMap = [ + 'collections' => 'tables', 'attributes' => 'columns', + 'attributeId' => 'columnId', 'documents' => 'rows', 'documentId' => 'rowId', + ]; + + // replace params! + $tableEvent = str_replace( + array_keys($tableEventMap), + array_values($tableEventMap), + $this->getEvent() + ); + + // generate new events + $tableEvents = Event::generateEvents($tableEvent, $this->getParams()); + + // merge all of the api events + $allEvents = array_merge($allEvents, $tableEvents); + + // remove duplicates + $allEvents = array_values(array_unique($allEvents)); + } + $payload = new Document($this->getPayload()); $db = $this->getContext('database'); $bucket = $this->getContext('bucket'); - // can be Tables API or Collections API, generated channels include both! + // Can be Tables API or Collections API; generated channels include both! $tableOrCollection = $this->getContext('table') ?? $this->getContext('collection'); $target = RealtimeAdapter::fromPayload( - // Pass first, most verbose event pattern - event: $allEvents[0], + event: $firstEvent, payload: $payload, project: $this->getProject(), database: $db, - table: $tableOrCollection, + collection: $tableOrCollection, bucket: $bucket, ); diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index 4980618ab1..bfe87c49db 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -252,12 +252,12 @@ class Realtime extends Adapter * @param Document $payload * @param Document|null $project * @param Document|null $database - * @param Document|null $table + * @param Document|null $collection * @param Document|null $bucket * @return array * @throws \Exception */ - public static function fromPayload(string $event, Document $payload, Document $project = null, Document $database = null, Document $table = null, Document $bucket = null): array + public static function fromPayload(string $event, Document $payload, Document $project = null, Document $database = null, Document $collection = null, Document $bucket = null): array { $channels = []; $roles = []; @@ -308,7 +308,7 @@ class Realtime extends Adapter if ($database->isEmpty()) { throw new \Exception('Database needs to be passed to Realtime for Document/Row events in the Database.'); } - if ($table->isEmpty()) { + if ($collection->isEmpty()) { throw new \Exception('Collection or the Table needs to be passed to Realtime for Document/Row events in the Database.'); } @@ -322,9 +322,9 @@ class Realtime extends Adapter $channels[] = 'databases.' . $database->getId() . '.collections.' . $payload->getAttribute('$collectionId') . '.documents'; $channels[] = 'databases.' . $database->getId() . '.collections.' . $payload->getAttribute('$collectionId') . '.documents.' . $payload->getId(); - $roles = $table->getAttribute('documentSecurity', false) - ? \array_merge($table->getRead(), $payload->getRead()) - : $table->getRead(); + $roles = $collection->getAttribute('documentSecurity', false) + ? \array_merge($collection->getRead(), $payload->getRead()) + : $collection->getRead(); } break; case 'buckets': diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index d1047e671d..954e997872 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -84,22 +84,6 @@ abstract class Action extends UtopiaAction return $this->isCollectionsAPI() ? 'collections' : 'tables'; } - /** - * Get the correct parent param key (e.g. `tableId` or `collectionId`) - */ - final protected function getParentEventsParamKey(): string - { - return $this->isCollectionsAPI() ? 'collectionId' : 'tableId'; - } - - /** - * Get the correct param key (e.g. `attributeId` or `columnId`) - */ - final protected function getEventsParamKey(): string - { - return $this->getContext() . 'Id'; - } - /** * Get the appropriate parent level not found exception. */ @@ -423,9 +407,10 @@ abstract class Action extends UtopiaAction $queueForEvents ->setContext('database', $db) ->setParam('databaseId', $databaseId) - ->setParam($this->getEventsParamKey(), $attribute->getId()) - // tableId or columnId - ->setParam($this->getParentEventsParamKey(), $collection->getId()) + ->setParam('attributeId', $attribute->getId()) + ->setParam('columnId', $attribute->getId()) + ->setParam('tableId', $collection->getId()) + ->setParam('collectionId', $collection->getId()) ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); $response->setStatusCode(SwooleResponse::STATUS_CODE_CREATED); @@ -623,9 +608,10 @@ abstract class Action extends UtopiaAction $queueForEvents ->setContext('database', $db) ->setParam('databaseId', $databaseId) - ->setParam($this->getEventsParamKey(), $attribute->getId()) - // tableId or columnId - ->setParam($this->getParentEventsParamKey(), $collection->getId()) + ->setParam('attributeId', $attribute->getId()) + ->setParam('columnId', $attribute->getId()) + ->setParam('tableId', $collection->getId()) + ->setParam('collectionId', $collection->getId()) ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); return $attribute; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 2432ac5fd0..81bc77a9ba 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -146,9 +146,10 @@ class Delete extends Action ->setContext('database', $db) ->setParam('databaseId', $databaseId) ->setPayload($response->output($attribute, $model)) - ->setParam($this->getEventsParamKey(), $attribute->getId()) - // tableId or columnId - ->setParam($this->getParentEventsParamKey(), $collection->getId()) + ->setParam('attributeId', $attribute->getId()) + ->setParam('columnId', $attribute->getId()) + ->setParam('collectionId', $collection->getId()) + ->setParam('tableId', $collection->getId()) // set proper context ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index b9a3247f96..a5b8fc5805 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -67,22 +67,6 @@ abstract class Action extends UtopiaAction return $this->isCollectionsAPI() ? 'collections' : 'tables'; } - /** - * Get the correct parent param key (e.g. `tableId` or `collectionId`) - */ - final protected function getParentEventsParamKey(): string - { - return $this->isCollectionsAPI() ? 'collectionId' : 'tableId'; - } - - /** - * Get the correct param key (e.g. `documentId` or `rowId`) - */ - final protected function getEventsParamKey(): string - { - return $this->getContext() . 'Id'; - } - /** * Get the appropriate parent level not found exception. */ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 297d0f3543..4c63837d57 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -310,9 +310,11 @@ class Create extends Action $queueForEvents ->setParam('databaseId', $databaseId) ->setContext('database', $database) - ->setParam($this->getEventsParamKey(), $document->getId()) + ->setParam('rowId', $document->getId()) + ->setParam('documentId', $document->getId()) + ->setParam('tableId', $collection->getId()) + ->setParam('collectionId', $collection->getId()) ->setPayload($response->getPayload(), sensitive: $relationships) - ->setParam($this->getParentEventsParamKey(), $collection->getId()) ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index 2f0c4e76db..66e1b37320 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -164,8 +164,10 @@ class Delete extends Action $queueForEvents ->setParam('databaseId', $databaseId) ->setContext('database', $database) - ->setParam($this->getParentEventsParamKey(), $collection->getId()) - ->setParam($this->getEventsParamKey(), $document->getId()) + ->setParam('rowId', $document->getId()) + ->setParam('documentId', $document->getId()) + ->setParam('tableId', $collection->getId()) + ->setParam('collectionId', $collection->getId()) ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection) ->setPayload($response->output($document, $this->getResponseModel()), sensitive: $relationships); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index eaaa2bb63f..5bee2ee761 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -297,8 +297,10 @@ class Update extends Action $queueForEvents ->setParam('databaseId', $databaseId) ->setContext('database', $database) - ->setParam($this->getEventsParamKey(), $document->getId()) - ->setParam($this->getParentEventsParamKey(), $collection->getId()) + ->setParam('rowId', $document->getId()) + ->setParam('documentId', $document->getId()) + ->setParam('tableId', $collection->getId()) + ->setParam('collectionId', $collection->getId()) ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection) ->setPayload($response->getPayload(), sensitive: $relationships); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php index 6186139bfb..93459440f0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php @@ -49,22 +49,6 @@ abstract class Action extends UtopiaAction return $this->context; } - /** - * Get the correct grand parent param key (e.g. `tableId` or `collectionId`) - */ - final protected function getGrandParentEventsParamKey(): string - { - return $this->isCollectionsAPI() ? 'collectionId' : 'tableId'; - } - - /** - * Get the key used in event parameters. - */ - final protected function getEventsParamKey(): string - { - return 'indexId'; - } - /** * Determine if the current action is for the Collections API. */ 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 6370a32a4c..014627e0a8 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 @@ -220,8 +220,9 @@ class Create extends Action $queueForEvents ->setContext('database', $db) ->setParam('databaseId', $databaseId) - ->setParam($this->getEventsParamKey(), $index->getId()) - ->setParam($this->getGrandParentEventsParamKey(), $collection->getId()) + ->setParam('indexId', $index->getId()) + ->setParam('tableId', $collection->getId()) + ->setParam('collectionId', $collection->getId()) ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); $response diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index 2d57a8a5f0..f86cf7b11f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -115,9 +115,10 @@ class Delete extends Action $queueForEvents ->setContext('database', $db) ->setParam('databaseId', $databaseId) - ->setParam($this->getEventsParamKey(), $index->getId()) + ->setParam('indexId', $index->getId()) + ->setParam('tableId', $collection->getId()) + ->setParam('collectionId', $collection->getId()) ->setPayload($response->output($index, $this->getResponseModel())) - ->setParam($this->getGrandParentEventsParamKey(), $collection->getId()) ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); $response->noContent(); diff --git a/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php index 8711d28d2c..35334de266 100644 --- a/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php +++ b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php @@ -115,10 +115,8 @@ class Databases extends Action } $projectId = $project->getId(); - $events = [ - "databases.[databaseId].tables.[tableId].columns.[columnId].update", - "databases.[databaseId].collections.[collectionId].attributes.[attributeId].update", - ]; + $event = "databases.[databaseId].collections.[collectionId].attributes.[attributeId].update"; + /** * TODO @christyjacob4 verify if this is still the case * Fetch attribute from the database, since with Resque float values are loosing information. @@ -207,7 +205,7 @@ class Databases extends Action throw $e; } finally { - $this->trigger($database, $collection, $project, $events, $queueForRealtime, $attribute); + $this->trigger($database, $collection, $project, $event, $queueForRealtime, $attribute); if (! $relatedCollection->isEmpty()) { $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $relatedCollection->getId()); @@ -241,10 +239,7 @@ class Databases extends Action } $projectId = $project->getId(); - $events = [ - 'databases.[databaseId].tables.[tableId].columns.[columnId].delete', - 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].delete', - ]; + $event = 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].delete'; $collectionId = $collection->getId(); $key = $attribute->getAttribute('key', ''); $type = $attribute->getAttribute('type', ''); @@ -317,7 +312,7 @@ class Databases extends Action throw $e; } finally { - $this->trigger($database, $collection, $project, $events, $queueForRealtime, $attribute); + $this->trigger($database, $collection, $project, $event, $queueForRealtime, $attribute); } // The underlying database removes/rebuilds indexes when attribute is removed @@ -404,10 +399,7 @@ class Databases extends Action } $projectId = $project->getId(); - $events = [ - 'databases.[databaseId].tables.[tableId].indexes.[indexId].update', - 'databases.[databaseId].collections.[collectionId].indexes.[indexId].update', - ]; + $event = 'databases.[databaseId].collections.[collectionId].indexes.[indexId].update'; $collectionId = $collection->getId(); $key = $index->getAttribute('key', ''); $type = $index->getAttribute('type', ''); @@ -434,7 +426,7 @@ class Databases extends Action throw $e; } finally { - $this->trigger($database, $collection, $project, $events, $queueForRealtime, null, $index); + $this->trigger($database, $collection, $project, $event, $queueForRealtime, null, $index); $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collectionId); } } @@ -464,10 +456,7 @@ class Databases extends Action } $projectId = $project->getId(); - $events = [ - 'databases.[databaseId].tables.[tableId].indexes.[indexId].delete', - 'databases.[databaseId].collections.[collectionId].indexes.[indexId].delete', - ]; + $event = 'databases.[databaseId].collections.[collectionId].indexes.[indexId].delete'; $key = $index->getAttribute('key'); $status = $index->getAttribute('status', ''); $project = $dbForPlatform->getDocument('projects', $projectId); @@ -493,7 +482,7 @@ class Databases extends Action throw $e; } finally { - $this->trigger($database, $collection, $project, $events, $queueForRealtime, null, $index); + $this->trigger($database, $collection, $project, $event, $queueForRealtime, null, $index); $dbForProject->purgeCachedDocument('database_' . $database->getInternalId(), $collection->getId()); } } @@ -516,7 +505,6 @@ class Databases extends Action /** * @param Document $database * @param Document $collection - * @param Document $project * @param Database $dbForProject * @return void * @throws Authorization @@ -601,7 +589,7 @@ class Databases extends Action * @param Document $database * @param Document $collection * @param Document $project - * @param string[] $events + * @param string $event * @param Realtime $queueForRealtime * @param Document|null $attribute * @param Document|null $index @@ -612,35 +600,31 @@ class Databases extends Action Document $database, Document $collection, Document $project, - array $events, + string $event, Realtime $queueForRealtime, Document|null $attribute = null, Document|null $index = null, ): void { - // table and collection - foreach ($events as $event) { + $queueForRealtime + ->setProject($project) + ->setSubscribers(['console']) + ->setEvent($event) + ->setParam('databaseId', $database->getId()) + ->setParam('tableId', $collection->getId()) + ->setParam('collectionId', $collection->getId()); + + if (! empty($attribute)) { $queueForRealtime - ->setProject($project) - ->setSubscribers(['console']) - ->setEvent($event) - ->setParam('tableId', $collection->getId()) - ->setParam('collectionId', $collection->getId()) - ->setParam('databaseId', $database->getId()); - - if (! empty($attribute)) { - $queueForRealtime - ->setParam('columnId', $attribute->getId()) - ->setParam('attributeId', $attribute->getId()) - ->setPayload($attribute->getArrayCopy()); - } - - if (! empty($index)) { - $queueForRealtime - ->setParam('indexId', $index->getId()) - ->setPayload($index->getArrayCopy()); - } - - $queueForRealtime->trigger(); + ->setParam('columnId', $attribute->getId()) + ->setParam('attributeId', $attribute->getId()) + ->setPayload($attribute->getArrayCopy()); } + if (! empty($index)) { + $queueForRealtime + ->setParam('indexId', $index->getId()) + ->setPayload($index->getArrayCopy()); + } + + $queueForRealtime->trigger(); } } From f10be55f92c1615ec8e73a4a0aa1f1cedeffb8de Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 14:49:44 +0530 Subject: [PATCH 085/362] update: short the callbacks. --- .../Http/Databases/Tables/Columns/Boolean/Create.php | 7 +------ .../Http/Databases/Tables/Columns/Boolean/Update.php | 6 +----- .../Http/Databases/Tables/Columns/Datetime/Create.php | 6 +----- .../Http/Databases/Tables/Columns/Datetime/Update.php | 5 +---- .../Databases/Http/Databases/Tables/Columns/Delete.php | 7 +------ .../Http/Databases/Tables/Columns/Email/Create.php | 7 +------ .../Http/Databases/Tables/Columns/Email/Update.php | 6 +----- .../Http/Databases/Tables/Columns/Enum/Create.php | 6 +----- .../Http/Databases/Tables/Columns/Enum/Update.php | 5 +---- .../Http/Databases/Tables/Columns/Float/Create.php | 7 +------ .../Http/Databases/Tables/Columns/Float/Update.php | 6 +----- .../Databases/Http/Databases/Tables/Columns/Get.php | 5 +---- .../Http/Databases/Tables/Columns/IP/Create.php | 7 +------ .../Http/Databases/Tables/Columns/IP/Update.php | 6 +----- .../Http/Databases/Tables/Columns/Integer/Create.php | 7 +------ .../Http/Databases/Tables/Columns/Integer/Update.php | 6 +----- .../Databases/Tables/Columns/Relationship/Create.php | 6 +----- .../Databases/Tables/Columns/Relationship/Update.php | 5 +---- .../Http/Databases/Tables/Columns/String/Create.php | 7 +------ .../Http/Databases/Tables/Columns/String/Update.php | 6 +----- .../Http/Databases/Tables/Columns/URL/Create.php | 7 +------ .../Http/Databases/Tables/Columns/URL/Update.php | 6 +----- .../Databases/Http/Databases/Tables/Columns/XList.php | 5 +---- .../Modules/Databases/Http/Databases/Tables/Create.php | 6 +----- .../Modules/Databases/Http/Databases/Tables/Delete.php | 7 +------ .../Modules/Databases/Http/Databases/Tables/Get.php | 5 +---- .../Databases/Http/Databases/Tables/Indexes/Create.php | 10 +++------- .../Databases/Http/Databases/Tables/Indexes/Delete.php | 7 +------ .../Databases/Http/Databases/Tables/Indexes/Get.php | 5 +---- .../Databases/Http/Databases/Tables/Indexes/XList.php | 5 +---- .../Databases/Http/Databases/Tables/Logs/XList.php | 8 +------- .../Databases/Http/Databases/Tables/Rows/Create.php | 7 +------ .../Databases/Http/Databases/Tables/Rows/Delete.php | 7 +------ .../Databases/Http/Databases/Tables/Rows/Get.php | 6 +----- .../Http/Databases/Tables/Rows/Logs/XList.php | 8 +------- .../Databases/Http/Databases/Tables/Rows/Update.php | 6 +----- .../Databases/Http/Databases/Tables/Rows/XList.php | 6 +----- .../Modules/Databases/Http/Databases/Tables/Update.php | 6 +----- .../Databases/Http/Databases/Tables/Usage/Get.php | 5 +---- .../Modules/Databases/Http/Databases/Tables/XList.php | 5 +---- 40 files changed, 42 insertions(+), 208 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php index 6f48afe57f..ada1d83424 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php @@ -2,14 +2,11 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Create as BooleanCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -67,8 +64,6 @@ class Create extends BooleanCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php index 485a9587e3..5316677adc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php @@ -2,14 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Update as BooleanUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -68,8 +66,6 @@ class Update extends BooleanUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $default, $newKey, $response, $dbForProject, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php index 1a5f6f65e1..a0731f0767 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php @@ -2,8 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Create as DatetimeCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -68,8 +66,6 @@ class Create extends DatetimeCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php index 1eb13852e7..495e96f025 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Update as DatetimeUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -69,8 +68,6 @@ class Update extends DatetimeUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $default, $newKey, $response, $dbForProject, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php index 10604029dd..68cb00e18b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php @@ -2,15 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Delete as AttributesDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -66,8 +63,6 @@ class Delete extends AttributesDelete ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php index 2d7b65931f..569d641118 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php @@ -2,15 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Network\Validator\Email; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Create as EmailCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -68,8 +65,6 @@ class Create extends EmailCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php index a067334a9d..bb3abb10d3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email; -use Appwrite\Event\Event; use Appwrite\Network\Validator\Email; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Update as EmailUpdate; use Appwrite\SDK\AuthType; @@ -10,7 +9,6 @@ use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -69,8 +67,6 @@ class Update extends EmailUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?bool $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $default, $newKey, $response, $dbForProject, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php index 8fdb689b46..47d06d4a53 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php @@ -2,8 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Create as EnumCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -70,8 +68,6 @@ class Create extends EnumCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, array $elements, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $elements, $required, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php index 85e1c4e5cc..18c1db0683 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Update as EnumUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -71,8 +70,6 @@ class Update extends EnumUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, array $elements, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $elements, $required, $default, $newKey, $response, $dbForProject, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php index 2ad2c11572..217378e274 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php @@ -2,14 +2,11 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Create as FloatCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -70,8 +67,6 @@ class Create extends FloatCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $min, $max, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php index ef6080b86c..be9e2f6b09 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php @@ -2,14 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Update as FloatUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -71,8 +69,6 @@ class Update extends FloatUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $min, $max, $default, $newKey, $response, $dbForProject, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php index 42ba23ad3a..630ac01e0f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php @@ -7,7 +7,6 @@ use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -67,8 +66,6 @@ class Get extends AttributesGet ->param('key', '', new Key(), 'Column Key.') ->inject('response') ->inject('dbForProject') - ->callback(function (string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject) { - parent::action($databaseId, $tableId, $key, $response, $dbForProject); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php index 34d5ecdfca..4da949dd74 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php @@ -2,14 +2,11 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Create as IPCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -68,8 +65,6 @@ class Create extends IPCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php index 34cfe97343..7adda8a4d5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php @@ -2,14 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Update as IPUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -69,8 +67,6 @@ class Update extends IPUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $default, $newKey, $response, $dbForProject, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php index 13aa90b6e3..2172b5067b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php @@ -2,14 +2,11 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Create as IntegerCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -70,8 +67,6 @@ class Create extends IntegerCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $min, $max, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php index 6cf3383795..26f7e8625c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php @@ -2,14 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Update as IntegerUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -71,8 +69,6 @@ class Update extends IntegerUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $min, $max, $default, $newKey, $response, $dbForProject, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php index be5da989af..76dd80cec9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php @@ -2,8 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Create as RelationshipCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -79,8 +77,6 @@ class Create extends RelationshipCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $relatedTableId, string $type, bool $twoWay, ?string $key, ?string $twoWayKey, string $onDelete, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $relatedTableId, $type, $twoWay, $key, $twoWayKey, $onDelete, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php index 1afdd0c56a..b2229bb32d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Update as RelationshipUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -70,8 +69,6 @@ class Update extends RelationshipUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?string $onDelete, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $onDelete, $newKey, $response, $dbForProject, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php index e17ac07ccf..cf12e6582d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php @@ -2,14 +2,11 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Create as StringCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -72,8 +69,6 @@ class Create extends StringCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, bool $encrypt, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $size, $required, $default, $array, $encrypt, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php index f64d5408eb..968b15bbef 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php @@ -2,14 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Update as StringUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -72,8 +70,6 @@ class Update extends StringUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?int $size, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $default, $size, $newKey, $response, $dbForProject, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php index a0f4e2ae8f..8c9865cde0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php @@ -2,14 +2,11 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Create as URLCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -68,8 +65,6 @@ class Create extends URLCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $default, $array, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php index 623328e249..e461befe0b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php @@ -2,14 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Update as URLUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -69,8 +67,6 @@ class Update extends URLUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $required, $default, $newKey, $response, $dbForProject, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php index a6b43518b9..3dde78441d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php @@ -8,7 +8,6 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Columns; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; @@ -56,8 +55,6 @@ class XList extends AttributesXList ->param('queries', [], new Columns(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Columns::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') - ->callback(function (string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject) { - parent::action($databaseId, $tableId, $queries, $response, $dbForProject); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index 1f349b95ed..0ca46f66e0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Create as CollectionCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -10,7 +9,6 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -69,8 +67,6 @@ class Create extends CollectionCreate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { - parent::action($databaseId, $tableId, $name, $permissions, $documentSecurity, $enabled, $response, $dbForProject, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php index 338d344660..c24fad28ef 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php @@ -2,15 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Delete as CollectionDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; @@ -63,8 +60,6 @@ class Delete extends CollectionDelete ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php index ffa1da443e..e277db6d3d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php @@ -8,7 +8,6 @@ use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; @@ -56,8 +55,6 @@ class Get extends CollectionGet ->param('tableId', '', new UID(), 'Table ID.') ->inject('response') ->inject('dbForProject') - ->callback(function (string $databaseId, string $tableId, UtopiaResponse $response, Database $dbForProject) { - parent::action($databaseId, $tableId, $response, $dbForProject); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php index 77e31f4115..b8e22cec71 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php @@ -2,8 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Create as IndexCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -38,10 +36,10 @@ class Create extends IndexCreate $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tables/indexes') + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') ->desc('Create index') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].tables.[tables].indexes.[indexId].create') + ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') ->label('scope', 'collections.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'index.create') @@ -70,8 +68,6 @@ class Create extends IndexCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, string $type, array $columns, array $orders, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $type, $columns, $orders, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php index 7a81942e32..ed8c355075 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php @@ -2,15 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; -use Appwrite\Event\Database as EventDatabase; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Delete as IndexDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -69,8 +66,6 @@ class Delete extends IndexDelete ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) { - parent::action($databaseId, $tableId, $key, $response, $dbForProject, $queueForDatabase, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php index a765bfb975..cd689316e6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php @@ -8,7 +8,6 @@ use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -58,8 +57,6 @@ class Get extends IndexGet ->param('key', null, new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') - ->callback(function (string $databaseId, string $tableId, string $key, UtopiaResponse $response, Database $dbForProject) { - parent::action($databaseId, $tableId, $key, $response, $dbForProject); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php index afce04fcf9..3d0e7d5139 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php @@ -9,7 +9,6 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Indexes; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; @@ -58,8 +57,6 @@ class XList extends IndexXList ->param('queries', [], new Indexes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Indexes::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') - ->callback(function (string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject) { - parent::action($databaseId, $tableId, $queries, $response, $dbForProject); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php index 9a6d4c4e8e..967e53539c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php @@ -7,14 +7,10 @@ use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; -use Appwrite\Utopia\Response as UtopiaResponse; -use MaxMind\Db\Reader; -use Utopia\Database\Database; use Utopia\Database\Validator\Queries; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; -use Utopia\Locale\Locale; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; @@ -59,8 +55,6 @@ class XList extends CollectionLogXList ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->callback(function (string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb) { - parent::action($databaseId, $tableId, $queries, $response, $dbForProject, $locale, $geodb); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index 1773a4c2ff..d041630894 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -2,8 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; -use Appwrite\Event\Event; -use Appwrite\Event\StatsUsage; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Create as DocumentCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -12,7 +10,6 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -76,8 +73,6 @@ class Create extends DocumentCreate ->inject('user') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback(function (string $databaseId, string $rowId, string $tableId, string|array $data, ?array $permissions, UtopiaResponse $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage) { - parent::action($databaseId, $rowId, $tableId, $databaseId, $permissions, $response, $dbForProject, $user, $queueForEvents, $queueForStatsUsage); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php index 05a98d6096..e40046bdf9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php @@ -2,15 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; -use Appwrite\Event\Event; -use Appwrite\Event\StatsUsage; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Delete as DocumentDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; @@ -74,8 +71,6 @@ class Delete extends DocumentDelete ->inject('dbForProject') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback(function (string $databaseId, string $tableId, string $rowId, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage) { - parent::action($databaseId, $tableId, $rowId, $requestTimestamp, $response, $dbForProject, $queueForEvents, $queueForStatsUsage); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php index 717cec3721..5ff02e96e8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php @@ -2,14 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; -use Appwrite\Event\StatsUsage; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Get as DocumentGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; @@ -62,8 +60,6 @@ class Get extends DocumentGet ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->callback(function (string $databaseId, string $tableId, string $rowId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage) { - parent::action($databaseId, $tableId, $rowId, $queries, $response, $dbForProject, $queueForStatsUsage); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php index 23b70ac19e..29a92413f9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php @@ -7,14 +7,10 @@ use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; -use Appwrite\Utopia\Response as UtopiaResponse; -use MaxMind\Db\Reader; -use Utopia\Database\Database; use Utopia\Database\Validator\Queries; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; -use Utopia\Locale\Locale; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; @@ -60,8 +56,6 @@ class XList extends DocumentLogXList ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->callback(function (string $databaseId, string $tableId, string $rowId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb) { - parent::action($databaseId, $tableId, $rowId, $queries, $response, $dbForProject, $locale, $geodb); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php index 0a83feee38..3c98d3c499 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php @@ -2,8 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; -use Appwrite\Event\Event; -use Appwrite\Event\StatsUsage; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Update as DocumentUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -72,8 +70,6 @@ class Update extends DocumentUpdate ->inject('dbForProject') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback(function (string $databaseId, string $tableId, string $rowId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage) { - parent::action($databaseId, $tableId, $rowId, $data, $permissions, $requestTimestamp, $response, $dbForProject, $queueForEvents, $queueForStatsUsage); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php index f4bdbaa483..c74a87c842 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php @@ -2,14 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; -use Appwrite\Event\StatsUsage; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\XList as DocumentXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; @@ -61,8 +59,6 @@ class XList extends DocumentXList ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->callback(function (string $databaseId, string $tableId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage) { - parent::action($databaseId, $tableId, $queries, $response, $dbForProject, $queueForStatsUsage); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index e60fbb4ac8..85024e4008 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -2,14 +2,12 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; -use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Update as CollectionUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -68,8 +66,6 @@ class Update extends CollectionUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback(function (string $databaseId, string $tableId, string $name, ?array $permissions, bool $documentSecurity, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents) { - parent::action($databaseId, $tableId, $name, $permissions, $documentSecurity, $enabled, $response, $dbForProject, $queueForEvents); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index 304884cece..e67850e361 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -8,7 +8,6 @@ use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; @@ -58,8 +57,6 @@ class Get extends CollectionUsageGet ->param('tableId', '', new UID(), 'Collection ID.') ->inject('response') ->inject('dbForProject') - ->callback(function (string $databaseId, string $range, string $tableId, UtopiaResponse $response, Database $dbForProject) { - parent::action($databaseId, $range, $tableId, $response, $dbForProject); - }); + ->callback([$this, 'action']); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php index 10913cd491..b2f102cc55 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php @@ -9,7 +9,6 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Tables; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Database; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; @@ -59,8 +58,6 @@ class XList extends CollectionXList ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForProject') - ->callback(function (string $databaseId, array $queries, string $search, UtopiaResponse $response, Database $dbForProject) { - parent::action($databaseId, $queries, $search, $response, $dbForProject); - }); + ->callback([$this, 'action']); } } From d3f1c4f8526914bcd63afb26a8ebff010e7457c0 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 15:10:44 +0530 Subject: [PATCH 086/362] revert: tests to `collections` API. --- .../Services/Migrations/MigrationsBase.php | 16 +-- tests/e2e/Services/Webhooks/WebhooksBase.php | 104 +++++++++--------- .../Webhooks/WebhooksCustomServerTest.php | 44 ++++---- tests/unit/Messaging/MessagingTest.php | 38 +++---- 4 files changed, 101 insertions(+), 101 deletions(-) diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index a40a2156ea..c241b38e3d 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -445,7 +445,7 @@ trait MigrationsBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ], [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Test Collection', ]); @@ -536,7 +536,7 @@ trait MigrationsBase return [ 'databaseId' => $databaseId, - 'tableId' => $collectionId, + 'collectionId' => $collectionId, ]; } @@ -546,14 +546,14 @@ trait MigrationsBase public function testAppwriteMigrationDatabasesDocument(array $data): void { $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ], [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'name' => 'Test Document', ] @@ -927,7 +927,7 @@ trait MigrationsBase 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'name' => 'Test collection', - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), ]); $this->assertEquals(201, $response['headers']['status-code']); @@ -1131,7 +1131,7 @@ trait MigrationsBase return [ 'databaseId' => $databaseId, - 'tableId' => $collectionId, + 'collectionId' => $collectionId, 'migrationId' => $migration['body']['$id'], ]; } @@ -1142,7 +1142,7 @@ trait MigrationsBase public function testImportSuccessful(array $response): void { $databaseId = $response['databaseId']; - $collectionId = $response['tableId']; + $collectionId = $response['collectionId']; $migrationId = $response['migrationId']; $documentsCountInCSV = 100; @@ -1176,7 +1176,7 @@ trait MigrationsBase ]); $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertIsArray($documents['body']['rows']); + $this->assertIsArray($documents['body']['documents']); $this->assertIsNumeric($documents['body']['total']); $this->assertEquals($documentsCountInCSV, $documents['body']['total']); } diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index feb43d17ab..c743810feb 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -61,7 +61,7 @@ trait WebhooksBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Actors', 'permissions' => [ Permission::read(Role::any()), @@ -83,10 +83,10 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -155,12 +155,12 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.columns.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.columns.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.columns.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.columns.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.attributes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.attributes.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.attributes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.attributes.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -181,12 +181,12 @@ trait WebhooksBase // $this->assertEquals($webhook['method'], 'DELETE'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.columns.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.columns.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.columns.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.columns.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.attributes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.attributes.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.attributes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.attributes.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -211,7 +211,7 @@ trait WebhooksBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'firstName' => 'Chris', 'lastName' => 'Evans', @@ -234,16 +234,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.documents.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.documents.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.*.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.*.documents.{$documentId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -254,7 +254,7 @@ trait WebhooksBase $this->assertIsArray($webhook['data']['$permissions']); $this->assertCount(3, $webhook['data']['$permissions']); - $data['rowId'] = $document['body']['$id']; + $data['documentId'] = $document['body']['$id']; return $data; } @@ -270,7 +270,7 @@ trait WebhooksBase /** * Test for SUCCESS */ - $document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $actorsId . '/documents/' . $data['rowId'], array_merge([ + $document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $actorsId . '/documents/' . $data['documentId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -296,16 +296,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.documents.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.documents.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.*.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.*.documents.{$documentId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -335,7 +335,7 @@ trait WebhooksBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'firstName' => 'Bradly', 'lastName' => 'Cooper', @@ -366,16 +366,16 @@ trait WebhooksBase $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.documents.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.documents.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.*.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.*.documents.{$documentId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -1119,7 +1119,7 @@ trait WebhooksBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'newCollection' . $i, 'permissions' => [ Permission::read(Role::any()), diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index 83a29b741f..d2f132e960 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -48,10 +48,10 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -79,7 +79,7 @@ class WebhooksCustomServerTest extends Scope ]), [ 'key' => 'fullname', 'type' => 'key', - 'columns' => ['lastName', 'firstName'], + 'attributes' => ['lastName', 'firstName'], 'orders' => ['ASC', 'ASC'], ]); @@ -96,12 +96,12 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.indexes.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.indexes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.indexes.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.indexes.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.indexes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.indexes.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -121,12 +121,12 @@ class WebhooksCustomServerTest extends Scope // $this->assertEquals($webhook['method'], 'DELETE'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.indexes.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.indexes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.indexes.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.indexes.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.indexes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$actorsId}.indexes.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -159,7 +159,7 @@ class WebhooksCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Demo', 'permissions' => [ Permission::read(Role::any()), @@ -189,10 +189,10 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['method'], 'POST'); $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); - $this->assertStringContainsString("databases.{$databaseId}.tables.{$id}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.collections.{$id}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); diff --git a/tests/unit/Messaging/MessagingTest.php b/tests/unit/Messaging/MessagingTest.php index 2cb15c5750..c2b6490869 100644 --- a/tests/unit/Messaging/MessagingTest.php +++ b/tests/unit/Messaging/MessagingTest.php @@ -35,7 +35,7 @@ class MessagingTest extends TestCase Role::team(ID::custom('def'))->toString(), Role::team(ID::custom('def'), 'guest')->toString(), ], - ['files' => 0, 'rows' => 0, 'rows.789' => 0, 'account.123' => 0] + ['files' => 0, 'documents' => 0, 'documents.789' => 0, 'account.123' => 0] ); $event = [ @@ -115,13 +115,13 @@ class MessagingTest extends TestCase $this->assertEmpty($receivers); $event['roles'] = [Role::any()->toString()]; - $event['data']['channels'] = ['rows.123']; + $event['data']['channels'] = ['documents.123']; $receivers = $realtime->getSubscribers($event); $this->assertEmpty($receivers); - $event['data']['channels'] = ['rows.789']; + $event['data']['channels'] = ['documents.789']; $receivers = $realtime->getSubscribers($event); @@ -153,8 +153,8 @@ class MessagingTest extends TestCase $channels = [ 0 => 'files', - 1 => 'rows', - 2 => 'rows.789', + 1 => 'documents', + 2 => 'documents.789', 3 => 'account', 4 => 'account.456' ]; @@ -162,8 +162,8 @@ class MessagingTest extends TestCase $channels = Realtime::convertChannels($channels, $user->getId()); $this->assertCount(4, $channels); $this->assertArrayHasKey('files', $channels); - $this->assertArrayHasKey('rows', $channels); - $this->assertArrayHasKey('rows.789', $channels); + $this->assertArrayHasKey('documents', $channels); + $this->assertArrayHasKey('documents.789', $channels); $this->assertArrayHasKey('account', $channels); $this->assertArrayNotHasKey('account.456', $channels); } @@ -190,8 +190,8 @@ class MessagingTest extends TestCase ]); $channels = [ 0 => 'files', - 1 => 'rows', - 2 => 'rows.789', + 1 => 'documents', + 2 => 'documents.789', 3 => 'account', 4 => 'account.456' ]; @@ -200,8 +200,8 @@ class MessagingTest extends TestCase $this->assertCount(5, $channels); $this->assertArrayHasKey('files', $channels); - $this->assertArrayHasKey('rows', $channels); - $this->assertArrayHasKey('rows.789', $channels); + $this->assertArrayHasKey('documents', $channels); + $this->assertArrayHasKey('documents.789', $channels); $this->assertArrayHasKey('account.123', $channels); $this->assertArrayHasKey('account', $channels); $this->assertArrayNotHasKey('account.456', $channels); @@ -213,10 +213,10 @@ class MessagingTest extends TestCase * Test Collection Level Permissions */ $result = Realtime::fromPayload( - event: 'databases.database_id.tables.collection_id.rows.document_id.create', + event: 'databases.database_id.collections.collection_id.documents.document_id.create', payload: new Document([ '$id' => ID::custom('test'), - '$collection' => ID::custom('table'), + '$collection' => ID::custom('collection'), '$permissions' => [ Permission::read(Role::team('123abc')), Permission::update(Role::team('123abc')), @@ -226,8 +226,8 @@ class MessagingTest extends TestCase database: new Document([ '$id' => ID::custom('database'), ]), - table: new Document([ - '$id' => ID::custom('table'), + collection: new Document([ + '$id' => ID::custom('collection'), '$permissions' => [ Permission::read(Role::any()), Permission::update(Role::any()), @@ -243,10 +243,10 @@ class MessagingTest extends TestCase * Test Document Level Permissions */ $result = Realtime::fromPayload( - event: 'databases.database_id.tables.collection_id.rows.document_id.create', + event: 'databases.database_id.collections.collection_id.documents.document_id.create', payload: new Document([ '$id' => ID::custom('test'), - '$collection' => ID::custom('table'), + '$collection' => ID::custom('collection'), '$permissions' => [ Permission::read(Role::any()), Permission::update(Role::any()), @@ -256,8 +256,8 @@ class MessagingTest extends TestCase database: new Document([ '$id' => ID::custom('database'), ]), - table: new Document([ - '$id' => ID::custom('table'), + collection: new Document([ + '$id' => ID::custom('collection'), '$permissions' => [ Permission::read(Role::team('123abc')), Permission::update(Role::team('123abc')), From 94fbf19e546b30b0154eefd7907486d1e301c73b Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 15:11:14 +0530 Subject: [PATCH 087/362] fix|add: tables api tests to realtime. --- .../Realtime/RealtimeConsoleClientTest.php | 398 +++++++++++++++++- .../Realtime/RealtimeCustomClientTest.php | 276 ++++++------ 2 files changed, 513 insertions(+), 161 deletions(-) diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index bb21ef8619..a81baf5aaa 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -123,9 +123,8 @@ class RealtimeConsoleClientTest extends Scope $client->close(); } - public function testAttributes(): array + public function testAttributesCollectionsAPI(): array { - $user = $this->getUser(); $projectId = 'console'; $client = $this->getWebsocket(['console'], [ @@ -162,7 +161,7 @@ class RealtimeConsoleClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Actors', 'permissions' => [ Permission::read(Role::any()), @@ -184,13 +183,128 @@ class RealtimeConsoleClientTest extends Scope ]); $projectId = $this->getProject()['$id']; - $attributeKey = $name['body']['key']; - $this->assertEquals($name['headers']['status-code'], 202); - $this->assertEquals($name['body']['key'], 'name'); - $this->assertEquals($name['body']['type'], 'string'); - $this->assertEquals($name['body']['size'], 256); - $this->assertEquals($name['body']['required'], true); + $this->assertEquals(202, $name['headers']['status-code']); + $this->assertEquals('name', $name['body']['key']); + $this->assertEquals('string', $name['body']['type']); + $this->assertEquals(256, $name['body']['size']); + $this->assertTrue($name['body']['required']); + + $response = json_decode($client->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(2, $response['data']['channels']); + $this->assertContains('console', $response['data']['channels']); + $this->assertContains("projects.{$projectId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.attributes.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.attributes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}", $response['data']['events']); + $this->assertContains("databases.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + $this->assertEquals('processing', $response['data']['payload']['status']); + + $response = json_decode($client->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(2, $response['data']['channels']); + $this->assertContains('console', $response['data']['channels']); + $this->assertContains("projects.{$projectId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.attributes.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.attributes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}", $response['data']['events']); + $this->assertContains("databases.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + $this->assertEquals('available', $response['data']['payload']['status']); + + $client->close(); + + return ['actorsId' => $actorsId, 'databaseId' => $databaseId]; + } + + public function testAttributesTablesAPI(): array + { + $projectId = 'console'; + + $client = $this->getWebsocket(['console'], [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + ], $projectId); + + $response = json_decode($client->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('connected', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertCount(1, $response['data']['channels']); + $this->assertContains('console', $response['data']['channels']); + $this->assertNotEmpty($response['data']['user']); + + /** + * Create database + */ + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'databaseId' => ID::unique(), + 'name' => 'Actors DB', + ]); + + $databaseId = $database['body']['$id']; + + /** + * Test Attributes + */ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'tableId' => ID::unique(), + 'name' => 'Actors', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $actorsId = $actors['body']['$id']; + + $name = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + $projectId = $this->getProject()['$id']; + + $this->assertEquals(202, $name['headers']['status-code']); + $this->assertEquals('name', $name['body']['key']); + $this->assertEquals('string', $name['body']['type']); + $this->assertEquals(256, $name['body']['size']); + $this->assertTrue($name['body']['required']); + $response = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $response); @@ -235,15 +349,13 @@ class RealtimeConsoleClientTest extends Scope $client->close(); - $data = ['actorsId' => $actorsId, 'databaseId' => $databaseId]; - - return $data; + return ['actorsId' => $actorsId, 'databaseId' => $databaseId]; } /** - * @depends testAttributes + * @depends testAttributesCollectionsAPI */ - public function testIndexes(array $data) + public function testIndexesCollectionAPI(array $data) { $projectId = 'console'; $actorsId = $data['actorsId']; @@ -269,6 +381,90 @@ class RealtimeConsoleClientTest extends Scope $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $actorsId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'key' => 'key_name', + 'type' => 'key', + 'attributes' => [ + 'name', + ], + ]); + + $this->assertEquals(202, $index['headers']['status-code']); + + $projectId = $this->getProject()['$id']; + + $response = json_decode($client->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(2, $response['data']['channels']); + $this->assertContains('console', $response['data']['channels']); + $this->assertContains("projects.{$projectId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.indexes.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + $this->assertEquals('processing', $response['data']['payload']['status']); + + $response = json_decode($client->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(2, $response['data']['channels']); + $this->assertContains('console', $response['data']['channels']); + $this->assertContains("projects.{$projectId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.indexes.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + $this->assertEquals('available', $response['data']['payload']['status']); + + $client->close(); + + return $data; + } + + /** + * @depends testAttributesTablesAPI + */ + public function testIndexesTablesAPI(array $data) + { + $projectId = 'console'; + $actorsId = $data['actorsId']; + $databaseId = $data['databaseId']; + $client = $this->getWebsocket(['console'], [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + ], $projectId); + + $response = json_decode($client->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('connected', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertCount(1, $response['data']['channels']); + $this->assertContains('console', $response['data']['channels']); + $this->assertNotEmpty($response['data']['user']); + + /** + * Test Indexes + */ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'key' => 'key_name', 'type' => 'key', @@ -277,10 +473,9 @@ class RealtimeConsoleClientTest extends Scope ], ]); - $this->assertEquals($index['headers']['status-code'], 202); + $this->assertEquals(202, $index['headers']['status-code']); $projectId = $this->getProject()['$id']; - $indexKey = $index['body']['key']; $response = json_decode($client->receive(), true); @@ -326,9 +521,9 @@ class RealtimeConsoleClientTest extends Scope } /** - * @depends testIndexes + * @depends testIndexesCollectionAPI */ - public function testDeleteIndex(array $data) + public function testDeleteIndexCollectionsAPI(array $data) { $actorsId = $data['actorsId']; $projectId = 'console'; @@ -360,7 +555,88 @@ class RealtimeConsoleClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals($attribute['headers']['status-code'], 204); + $this->assertEquals(204, $attribute['headers']['status-code']); + + $response = json_decode($client->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(2, $response['data']['channels']); + $this->assertContains('console', $response['data']['channels']); + $this->assertContains("projects.{$projectId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.indexes.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + + /** Delete index generates two events. One from the API and one from the database worker */ + $response = json_decode($client->receive(), true); + + + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(2, $response['data']['channels']); + $this->assertContains('console', $response['data']['channels']); + $this->assertContains("projects.{$projectId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.indexes.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.indexes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + + $client->close(); + + return $data; + } + + /** + * @depends testIndexesTablesAPI + */ + public function testDeleteIndexTablesAPI(array $data) + { + $projectId = 'console'; + $actorsId = $data['actorsId']; + $databaseId = $data['databaseId']; + + $client = $this->getWebsocket(['console'], [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + ], $projectId); + + $response = json_decode($client->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('connected', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertCount(1, $response['data']['channels']); + $this->assertContains('console', $response['data']['channels']); + $this->assertNotEmpty($response['data']['user']); + + $projectId = $this->getProject()['$id']; + + /** + * Test Delete Index + */ + $indexKey = 'key_name'; + $attribute = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $actorsId . '/indexes/' . $indexKey, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(204, $attribute['headers']['status-code']); $response = json_decode($client->receive(), true); @@ -382,6 +658,7 @@ class RealtimeConsoleClientTest extends Scope /** Delete index generates two events. One from the API and one from the database worker */ $response = json_decode($client->receive(), true); + $this->assertArrayHasKey('type', $response); $this->assertArrayHasKey('data', $response); $this->assertEquals('event', $response['type']); @@ -404,12 +681,12 @@ class RealtimeConsoleClientTest extends Scope } /** - * @depends testDeleteIndex + * @depends testDeleteIndexCollectionsAPI */ - public function testDeleteAttribute(array $data) + public function testDeleteAttributeCollectionsAPI(array $data) { - $actorsId = $data['actorsId']; $projectId = 'console'; + $actorsId = $data['actorsId']; $databaseId = $data['databaseId']; $client = $this->getWebsocket(['console'], [ @@ -438,7 +715,82 @@ class RealtimeConsoleClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals($attribute['headers']['status-code'], 204); + $this->assertEquals(204, $attribute['headers']['status-code']); + $response = json_decode($client->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(2, $response['data']['channels']); + $this->assertContains('console', $response['data']['channels']); + $this->assertContains("projects.{$projectId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.attributes.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.attributes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + + $response = json_decode($client->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(2, $response['data']['channels']); + $this->assertContains('console', $response['data']['channels']); + $this->assertContains("projects.{$projectId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.attributes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.attributes.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.attributes.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + + $client->close(); + } + + /** + * @depends testDeleteIndexTablesAPI + */ + public function testDeleteAttributeTablesAPI(array $data) + { + $projectId = 'console'; + $actorsId = $data['actorsId']; + $databaseId = $data['databaseId']; + + $client = $this->getWebsocket(['console'], [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + ], $projectId); + + $response = json_decode($client->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('connected', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertCount(1, $response['data']['channels']); + $this->assertContains('console', $response['data']['channels']); + $this->assertNotEmpty($response['data']['user']); + + $attributeKey = 'name'; + $projectId = $this->getProject()['$id']; + + /** + * Test Delete Attribute + */ + $attribute = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['actorsId'] . '/columns/' . $attributeKey, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(204, $attribute['headers']['status-code']); $response = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $response); diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index eef7978a0e..dab096c316 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -31,7 +31,7 @@ class RealtimeCustomClientTest extends Scope 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session ]; - $client = $this->getWebsocket(['rows'], $headers); + $client = $this->getWebsocket(['documents'], $headers); $response = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $response); @@ -40,7 +40,7 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($response['data']); $this->assertNotEmpty($response['data']['user']); $this->assertCount(1, $response['data']['channels']); - $this->assertContains('rows', $response['data']['channels']); + $this->assertContains('documents', $response['data']['channels']); $this->assertEquals($userId, $response['data']['user']['$id']); $client->close(); @@ -60,7 +60,7 @@ class RealtimeCustomClientTest extends Scope $client->close(); - $client = $this->getWebsocket(['account', 'rows', 'account.123'], $headers); + $client = $this->getWebsocket(['account', 'documents', 'account.123'], $headers); $response = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $response); @@ -69,7 +69,7 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($response['data']); $this->assertNotEmpty($response['data']['user']); $this->assertCount(3, $response['data']['channels']); - $this->assertContains('rows', $response['data']['channels']); + $this->assertContains('documents', $response['data']['channels']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); $this->assertEquals($userId, $response['data']['user']['$id']); @@ -80,12 +80,12 @@ class RealtimeCustomClientTest extends Scope 'account', 'files', 'files.1', - 'tables', - 'tables.1.rows', - 'tables.2.rows', - 'rows', - 'tables.1.rows.1', - 'tables.2.rows.2', + 'collections', + 'collections.1.documents', + 'collections.2.documents', + 'documents', + 'collections.1.documents.1', + 'collections.2.documents.2', ], $headers); $response = json_decode($client->receive(), true); @@ -100,12 +100,12 @@ class RealtimeCustomClientTest extends Scope $this->assertContains('account.' . $userId, $response['data']['channels']); $this->assertContains('files', $response['data']['channels']); $this->assertContains('files.1', $response['data']['channels']); - $this->assertContains('tables', $response['data']['channels']); - $this->assertContains('tables.1.rows', $response['data']['channels']); - $this->assertContains('tables.2.rows', $response['data']['channels']); - $this->assertContains('rows', $response['data']['channels']); - $this->assertContains('tables.1.rows.1', $response['data']['channels']); - $this->assertContains('tables.2.rows.2', $response['data']['channels']); + $this->assertContains('collections', $response['data']['channels']); + $this->assertContains('collections.1.documents', $response['data']['channels']); + $this->assertContains('collections.2.documents', $response['data']['channels']); + $this->assertContains('documents', $response['data']['channels']); + $this->assertContains('collections.1.documents.1', $response['data']['channels']); + $this->assertContains('collections.2.documents.2', $response['data']['channels']); $this->assertEquals($userId, $response['data']['user']['$id']); $client->close(); @@ -245,7 +245,7 @@ class RealtimeCustomClientTest extends Scope /** * Test for FAILURE */ - $client = $this->getWebsocket(['rows'], ['origin' => 'http://appwrite.unknown']); + $client = $this->getWebsocket(['documents'], ['origin' => 'http://appwrite.unknown']); $payload = json_decode($client->receive(), true); $this->assertArrayHasKey('type', $payload); @@ -675,7 +675,7 @@ class RealtimeCustomClientTest extends Scope $session = $user['session'] ?? ''; $projectId = $this->getProject()['$id']; - $client = $this->getWebsocket(['rows', 'tables'], [ + $client = $this->getWebsocket(['documents', 'collections'], [ 'origin' => 'http://localhost', 'cookie' => 'a_session_' . $projectId . '=' . $session ]); @@ -687,8 +687,8 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('connected', $response['type']); $this->assertNotEmpty($response['data']); $this->assertCount(2, $response['data']['channels']); - $this->assertContains('rows', $response['data']['channels']); - $this->assertContains('tables', $response['data']['channels']); + $this->assertContains('documents', $response['data']['channels']); + $this->assertContains('collections', $response['data']['channels']); $this->assertNotEmpty($response['data']['user']); $this->assertEquals($user['$id'], $response['data']['user']['$id']); @@ -714,7 +714,7 @@ class RealtimeCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Actors', 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), @@ -734,11 +734,11 @@ class RealtimeCustomClientTest extends Scope 'required' => true, ]); - $this->assertEquals($name['headers']['status-code'], 202); - $this->assertEquals($name['body']['key'], 'name'); - $this->assertEquals($name['body']['type'], 'string'); - $this->assertEquals($name['body']['size'], 256); - $this->assertEquals($name['body']['required'], true); + $this->assertEquals(202, $name['headers']['status-code']); + $this->assertEquals('name', $name['body']['key']); + $this->assertEquals('string', $name['body']['type']); + $this->assertEquals(256, $name['body']['size']); + $this->assertTrue($name['body']['required']); sleep(2); @@ -749,7 +749,7 @@ class RealtimeCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'name' => 'Chris Evans' ], @@ -769,24 +769,24 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(6, $response['data']['channels']); // includes old and new channels - $this->assertContains('rows', $response['data']['channels']); - $this->assertContains('databases.' . $databaseId . '.tables.' . $actorsId . '.rows.' . $documentId, $response['data']['channels']); - $this->assertContains('databases.' . $databaseId . '.tables.' . $actorsId . '.rows', $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.*.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); + $this->assertCount(3, $response['data']['channels']); + $this->assertContains('documents', $response['data']['channels']); + $this->assertContains('databases.' . $databaseId . '.collections.' . $actorsId . '.documents.' . $documentId, $response['data']['channels']); + $this->assertContains('databases.' . $databaseId . '.collections.' . $actorsId . '.documents', $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); - $this->assertEquals($response['data']['payload']['name'], 'Chris Evans'); + $this->assertEquals('Chris Evans', $response['data']['payload']['name']); /** * Test Document Update @@ -795,7 +795,7 @@ class RealtimeCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'name' => 'Chris Evans 2' ], @@ -813,25 +813,25 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(6, $response['data']['channels']); // includes old and new channels - $this->assertContains('rows', $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); + $this->assertCount(3, $response['data']['channels']); + $this->assertContains('documents', $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); - $this->assertEquals($response['data']['payload']['name'], 'Chris Evans 2'); + $this->assertEquals('Chris Evans 2', $response['data']['payload']['name']); /** * Test Document Delete @@ -840,7 +840,7 @@ class RealtimeCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'name' => 'Bradley Cooper' ], @@ -867,24 +867,24 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(6, $response['data']['channels']); // includes old and new channels - $this->assertContains('rows', $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.*.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); + $this->assertCount(3, $response['data']['channels']); + $this->assertContains('documents', $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); - $this->assertEquals($response['data']['payload']['name'], 'Bradley Cooper'); + $this->assertEquals('Bradley Cooper', $response['data']['payload']['name']); $client->close(); } @@ -895,7 +895,7 @@ class RealtimeCustomClientTest extends Scope $session = $user['session'] ?? ''; $projectId = $this->getProject()['$id']; - $client = $this->getWebsocket(['rows', 'tables'], [ + $client = $this->getWebsocket(['documents', 'collections'], [ 'origin' => 'http://localhost', 'cookie' => 'a_session_' . $projectId . '=' . $session ]); @@ -907,8 +907,8 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('connected', $response['type']); $this->assertNotEmpty($response['data']); $this->assertCount(2, $response['data']['channels']); - $this->assertContains('rows', $response['data']['channels']); - $this->assertContains('tables', $response['data']['channels']); + $this->assertContains('documents', $response['data']['channels']); + $this->assertContains('collections', $response['data']['channels']); $this->assertNotEmpty($response['data']['user']); $this->assertEquals($user['$id'], $response['data']['user']['$id']); @@ -934,7 +934,7 @@ class RealtimeCustomClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Actors', 'permissions' => [ Permission::read(Role::any()), @@ -956,11 +956,11 @@ class RealtimeCustomClientTest extends Scope 'required' => true, ]); - $this->assertEquals($name['headers']['status-code'], 202); - $this->assertEquals($name['body']['key'], 'name'); - $this->assertEquals($name['body']['type'], 'string'); - $this->assertEquals($name['body']['size'], 256); - $this->assertEquals($name['body']['required'], true); + $this->assertEquals(202, $name['headers']['status-code']); + $this->assertEquals('name', $name['body']['key']); + $this->assertEquals('string', $name['body']['type']); + $this->assertEquals(256, $name['body']['size']); + $this->assertTrue($name['body']['required']); sleep(2); @@ -971,7 +971,7 @@ class RealtimeCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'name' => 'Chris Evans' ], @@ -987,24 +987,24 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(6, $response['data']['channels']); // includes old and new channels - $this->assertContains('rows', $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.*.create", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); + $this->assertCount(3, $response['data']['channels']); + $this->assertContains('documents', $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); - $this->assertEquals($response['data']['payload']['name'], 'Chris Evans'); + $this->assertEquals('Chris Evans', $response['data']['payload']['name']); /** * Test Document Update @@ -1026,25 +1026,25 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(6, $response['data']['channels']); // includes old and new channels - $this->assertContains('rows', $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.*.update", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); + $this->assertCount(3, $response['data']['channels']); + $this->assertContains('documents', $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); - $this->assertEquals($response['data']['payload']['name'], 'Chris Evans 2'); + $this->assertEquals('Chris Evans 2', $response['data']['payload']['name']); /** * Test Document Delete @@ -1053,7 +1053,7 @@ class RealtimeCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rowId' => ID::unique(), + 'documentId' => ID::unique(), 'data' => [ 'name' => 'Bradley Cooper' ], @@ -1076,24 +1076,24 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(6, $response['data']['channels']); // includes old and new channels - $this->assertContains('rows', $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows", $response['data']['channels']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}.rows.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.{$actorsId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.{$documentId}", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.*.delete", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*.rows.*", $response['data']['events']); - $this->assertContains("databases.{$databaseId}.tables.*", $response['data']['events']); + $this->assertCount(3, $response['data']['channels']); + $this->assertContains('documents', $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.{$documentId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); $this->assertContains("databases.{$databaseId}", $response['data']['events']); $this->assertContains("databases.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); - $this->assertEquals($response['data']['payload']['name'], 'Bradley Cooper'); + $this->assertEquals('Bradley Cooper', $response['data']['payload']['name']); $client->close(); } @@ -1293,7 +1293,7 @@ class RealtimeCustomClientTest extends Scope $functionId = $function['body']['$id'] ?? ''; - $this->assertEquals($function['headers']['status-code'], 201); + $this->assertEquals(201, $function['headers']['status-code']); $this->assertNotEmpty($function['body']['$id']); $deployment = $this->client->call(Client::METHOD_POST, '/functions/' . $functionId . '/deployments', array_merge([ @@ -1308,7 +1308,7 @@ class RealtimeCustomClientTest extends Scope $deploymentId = $deployment['body']['$id'] ?? ''; - $this->assertEquals($deployment['headers']['status-code'], 202); + $this->assertEquals(202, $deployment['headers']['status-code']); $this->assertNotEmpty($deployment['body']['$id']); // Poll until deployment is built @@ -1468,7 +1468,7 @@ class RealtimeCustomClientTest extends Scope 'name' => 'Manchester' ]); - $this->assertEquals($team['headers']['status-code'], 200); + $this->assertEquals(200, $team['headers']['status-code']); $this->assertNotEmpty($team['body']['$id']); $response = json_decode($client->receive(), true); @@ -1500,9 +1500,9 @@ class RealtimeCustomClientTest extends Scope ] ]); - $this->assertEquals($team['headers']['status-code'], 200); - $this->assertEquals($team['body']['funcKey1'], 'funcValue1'); - $this->assertEquals($team['body']['funcKey2'], 'funcValue2'); + $this->assertEquals(200, $team['headers']['status-code']); + $this->assertEquals('funcValue1', $team['body']['funcKey1']); + $this->assertEquals('funcValue2', $team['body']['funcKey2']); $response = json_decode($client->receive(), true); @@ -1521,8 +1521,8 @@ class RealtimeCustomClientTest extends Scope $this->assertContains("teams.*.update", $response['data']['events']); $this->assertContains("teams.*", $response['data']['events']); $this->assertNotEmpty($response['data']['payload']); - $this->assertEquals($response['data']['payload']['funcKey1'], 'funcValue1'); - $this->assertEquals($response['data']['payload']['funcKey2'], 'funcValue2'); + $this->assertEquals('funcValue1', $response['data']['payload']['funcKey1']); + $this->assertEquals('funcValue2', $response['data']['payload']['funcKey2']); $client->close(); From 1756acd89cac2301b888da421812710608034607 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 15:16:10 +0530 Subject: [PATCH 088/362] fix: realtime channel count. --- .../Services/Realtime/RealtimeCustomClientTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index dab096c316..1106c74ee0 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -769,7 +769,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(3, $response['data']['channels']); + $this->assertCount(6, $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); $this->assertContains('databases.' . $databaseId . '.collections.' . $actorsId . '.documents.' . $documentId, $response['data']['channels']); $this->assertContains('databases.' . $databaseId . '.collections.' . $actorsId . '.documents', $response['data']['channels']); @@ -813,7 +813,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(3, $response['data']['channels']); + $this->assertCount(6, $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); @@ -867,7 +867,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(3, $response['data']['channels']); + $this->assertCount(6, $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); @@ -987,7 +987,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(3, $response['data']['channels']); + $this->assertCount(6, $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); @@ -1026,7 +1026,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(3, $response['data']['channels']); + $this->assertCount(6, $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); @@ -1076,7 +1076,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('event', $response['type']); $this->assertNotEmpty($response['data']); $this->assertArrayHasKey('timestamp', $response['data']); - $this->assertCount(3, $response['data']['channels']); + $this->assertCount(6, $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$documentId}", $response['data']['channels']); $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents", $response['data']['channels']); From f16ba8dee3d8c0e3924b9f13c25ee574d59693d3 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 17:25:36 +0530 Subject: [PATCH 089/362] add: table api tests. --- .github/workflows/tests.yml | 2 + .../Collections/Documents/Create.php | 1 - .../Databases/Tables/DatabasesBase.php | 4919 +++++++++++++++++ .../Tables/DatabasesConsoleClientTest.php | 336 ++ .../Tables/DatabasesCustomClientTest.php | 893 +++ .../Tables/DatabasesCustomServerTest.php | 4113 ++++++++++++++ .../Tables/DatabasesPermissionsGuestTest.php | 278 + .../Tables/DatabasesPermissionsMemberTest.php | 271 + .../Tables/DatabasesPermissionsScope.php | 87 + .../Tables/DatabasesPermissionsTeamTest.php | 208 + 10 files changed, 11107 insertions(+), 1 deletion(-) create mode 100644 tests/e2e/Services/Databases/Tables/DatabasesBase.php create mode 100644 tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php create mode 100644 tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php create mode 100644 tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php create mode 100644 tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php create mode 100644 tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php create mode 100644 tests/e2e/Services/Databases/Tables/DatabasesPermissionsScope.php create mode 100644 tests/e2e/Services/Databases/Tables/DatabasesPermissionsTeamTest.php diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4775272185..335e46c16b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -146,6 +146,7 @@ jobs: Avatars, Console, Databases/Collections, + Databases/Tables, Functions, FunctionsSchedule, GraphQL, @@ -214,6 +215,7 @@ jobs: Avatars, Console, Databases/Collections, + Databases/Tables, Functions, FunctionsSchedule, GraphQL, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 4c63837d57..a8f1561f84 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -253,7 +253,6 @@ class Create extends Action throw new Exception($this->getParentNotFoundException()); } - // Add $collectionId and $databaseId for all documents $processDocument = function (Document $table, Document $document) use (&$processDocument, $dbForProject, $database) { $document->setAttribute('$databaseId', $database->getId()); diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Tables/DatabasesBase.php new file mode 100644 index 0000000000..5532bbac46 --- /dev/null +++ b/tests/e2e/Services/Databases/Tables/DatabasesBase.php @@ -0,0 +1,4919 @@ +client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database' + ]); + + $this->assertNotEmpty($database['body']['$id']); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('Test Database', $database['body']['name']); + + return ['databaseId' => $database['body']['$id']]; + } + + /** + * @depends testCreateDatabase + */ + public function testCreateCollection(array $data): array + { + $databaseId = $data['databaseId']; + /** + * Test for SUCCESS + */ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Movies', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + ], + ]); + + $this->assertEquals(201, $movies['headers']['status-code']); + $this->assertEquals($movies['body']['name'], 'Movies'); + + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Actors', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + ], + ]); + + $this->assertEquals(201, $actors['headers']['status-code']); + $this->assertEquals($actors['body']['name'], 'Actors'); + + return [ + 'databaseId' => $databaseId, + 'moviesId' => $movies['body']['$id'], + 'actorsId' => $actors['body']['$id'], + ]; + } + + /** + * @depends testCreateCollection + */ + public function testConsoleProject(array $data) + { + if ($this->getSide() === 'server') { + // Server side can't get past the invalid key check anyway + $this->expectNotToPerformAssertions(); + return; + } + + $response = $this->client->call( + Client::METHOD_GET, + '/databases/console/tables/' . $data['moviesId'] . '/rows', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'console', + ], $this->getHeaders()) + ); + + $this->assertEquals(401, $response['headers']['status-code']); + $this->assertEquals('general_access_forbidden', $response['body']['type']); + $this->assertEquals('This endpoint is not available for the console project. The Appwrite Console is a reserved project ID and cannot be used with the Appwrite SDKs and APIs. Please check if your project ID is correct.', $response['body']['message']); + + $response = $this->client->call( + Client::METHOD_GET, + '/databases/console/tables/' . $data['moviesId'] . '/rows', + array_merge([ + 'content-type' => 'application/json', + // 'x-appwrite-project' => '', empty header + ], $this->getHeaders()) + ); + $this->assertEquals(401, $response['headers']['status-code']); + $this->assertEquals('No Appwrite project was specified. Please specify your project ID when initializing your Appwrite SDK.', $response['body']['message']); + } + + /** + * @depends testCreateCollection + */ + public function testDisableCollection(array $data): void + { + $databaseId = $data['databaseId']; + /** + * Test for SUCCESS + */ + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'name' => 'Movies', + 'enabled' => false, + 'documentSecurity' => true, + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertFalse($response['body']['enabled']); + + if ($this->getSide() === 'client') { + $responseCreateDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Captain America', + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], + ]); + + $this->assertEquals(404, $responseCreateDocument['headers']['status-code']); + + $responseListDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(404, $responseListDocument['headers']['status-code']); + + $responseGetDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/someID', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(404, $responseGetDocument['headers']['status-code']); + } + + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'name' => 'Movies', + 'enabled' => true, + 'documentSecurity' => true, + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertTrue($response['body']['enabled']); + } + + /** + * @depends testCreateCollection + */ + public function testCreateAttributes(array $data): array + { + $databaseId = $data['databaseId']; + + $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + + $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'description', + 'size' => 512, + 'required' => false, + 'default' => '', + ]); + + $tagline = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'tagline', + 'size' => 512, + 'required' => false, + 'default' => '', + ]); + + $releaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'releaseYear', + 'required' => true, + 'min' => 1900, + 'max' => 2200, + ]); + + $duration = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'duration', + 'required' => false, + 'min' => 60, + ]); + + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'actors', + 'size' => 256, + 'required' => false, + 'array' => true, + ]); + + $datetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/datetime', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'birthDay', + 'required' => false, + ]); + + $relationship = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $data['actorsId'], + 'type' => 'oneToMany', + 'twoWay' => true, + 'key' => 'starringActors', + 'twoWayKey' => 'movie' + ]); + + $integers = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'integers', + 'required' => false, + 'array' => true, + 'min' => 10, + 'max' => 99, + ]); + + $this->assertEquals(202, $title['headers']['status-code']); + $this->assertEquals($title['body']['key'], 'title'); + $this->assertEquals($title['body']['type'], 'string'); + $this->assertEquals($title['body']['size'], 256); + $this->assertEquals($title['body']['required'], true); + + $this->assertEquals(202, $description['headers']['status-code']); + $this->assertEquals($description['body']['key'], 'description'); + $this->assertEquals($description['body']['type'], 'string'); + $this->assertEquals($description['body']['size'], 512); + $this->assertEquals($description['body']['required'], false); + $this->assertEquals($description['body']['default'], ''); + + $this->assertEquals(202, $tagline['headers']['status-code']); + $this->assertEquals($tagline['body']['key'], 'tagline'); + $this->assertEquals($tagline['body']['type'], 'string'); + $this->assertEquals($tagline['body']['size'], 512); + $this->assertEquals($tagline['body']['required'], false); + $this->assertEquals($tagline['body']['default'], ''); + + $this->assertEquals(202, $releaseYear['headers']['status-code']); + $this->assertEquals($releaseYear['body']['key'], 'releaseYear'); + $this->assertEquals($releaseYear['body']['type'], 'integer'); + $this->assertEquals($releaseYear['body']['required'], true); + + $this->assertEquals(202, $duration['headers']['status-code']); + $this->assertEquals($duration['body']['key'], 'duration'); + $this->assertEquals($duration['body']['type'], 'integer'); + $this->assertEquals($duration['body']['required'], false); + + $this->assertEquals(202, $actors['headers']['status-code']); + $this->assertEquals($actors['body']['key'], 'actors'); + $this->assertEquals($actors['body']['type'], 'string'); + $this->assertEquals($actors['body']['size'], 256); + $this->assertEquals($actors['body']['required'], false); + $this->assertEquals($actors['body']['array'], true); + + $this->assertEquals($datetime['headers']['status-code'], 202); + $this->assertEquals($datetime['body']['key'], 'birthDay'); + $this->assertEquals($datetime['body']['type'], 'datetime'); + $this->assertEquals($datetime['body']['required'], false); + + $this->assertEquals($relationship['headers']['status-code'], 202); + $this->assertEquals($relationship['body']['key'], 'starringActors'); + $this->assertEquals($relationship['body']['type'], 'relationship'); + $this->assertEquals($relationship['body']['relatedTable'], $data['actorsId']); + $this->assertEquals($relationship['body']['relationType'], 'oneToMany'); + $this->assertEquals($relationship['body']['twoWay'], true); + $this->assertEquals($relationship['body']['twoWayKey'], 'movie'); + + $this->assertEquals(202, $integers['headers']['status-code']); + $this->assertEquals($integers['body']['key'], 'integers'); + $this->assertEquals($integers['body']['type'], 'integer'); + $this->assertArrayNotHasKey('size', $integers['body']); + $this->assertEquals($integers['body']['required'], false); + $this->assertEquals($integers['body']['array'], true); + + // wait for database worker to create attributes + sleep(2); + + $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertIsArray($movies['body']['columns']); + $this->assertCount(9, $movies['body']['columns']); + $this->assertEquals($movies['body']['columns'][0]['key'], $title['body']['key']); + $this->assertEquals($movies['body']['columns'][1]['key'], $description['body']['key']); + $this->assertEquals($movies['body']['columns'][2]['key'], $tagline['body']['key']); + $this->assertEquals($movies['body']['columns'][3]['key'], $releaseYear['body']['key']); + $this->assertEquals($movies['body']['columns'][4]['key'], $duration['body']['key']); + $this->assertEquals($movies['body']['columns'][5]['key'], $actors['body']['key']); + $this->assertEquals($movies['body']['columns'][6]['key'], $datetime['body']['key']); + $this->assertEquals($movies['body']['columns'][7]['key'], $relationship['body']['key']); + $this->assertEquals($movies['body']['columns'][8]['key'], $integers['body']['key']); + + return $data; + } + + /** + * @depends testCreateAttributes + */ + public function testListAttributes(array $data): void + { + $databaseId = $data['databaseId']; + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'queries' => [ + Query::equal('type', ['string'])->toString(), + Query::limit(2)->toString(), + Query::cursorAfter(new Document(['$id' => 'title']))->toString() + ], + ]); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(2, \count($response['body']['columns'])); + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'queries' => [Query::select(['key'])->toString()], + ]); + $this->assertEquals(Exception::GENERAL_ARGUMENT_INVALID, $response['body']['type']); + $this->assertEquals(400, $response['headers']['status-code']); + } + + /** + * @depends testCreateDatabase + */ + public function testPatchAttribute(array $data): void + { + $databaseId = $data['databaseId']; + + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'patch', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + ], + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + $this->assertEquals($table['body']['name'], 'patch'); + + $attribute = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/tables/'.$table['body']['$id'].'/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'title', + 'required' => true, + 'size' => 100, + ]); + $this->assertEquals(202, $attribute['headers']['status-code']); + $this->assertEquals($attribute['body']['size'], 100); + + sleep(1); + + $index = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/tables/'.$table['body']['$id'].'/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'titleIndex', + 'type' => 'key', + 'columns' => ['title'], + ]); + $this->assertEquals(202, $index['headers']['status-code']); + + sleep(1); + + /** + * Update attribute size to exceed Index maximum length + */ + $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/'.$databaseId.'/tables/'.$table['body']['$id'].'/columns/string/'.$attribute['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'size' => 1000, + 'required' => true, + 'default' => null, + ]); + + $this->assertEquals(400, $attribute['headers']['status-code']); + $this->assertStringContainsString('Index length is longer than the maximum: 76', $attribute['body']['message']); + } + + public function testUpdateAttributeEnum(): void + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database 2' + ]); + + $players = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Players', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + ], + ]); + + // Create enum attribute + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/tables/' . $players['body']['$id'] . '/columns/enum', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'key' => 'position', + 'elements' => ['goalkeeper', 'defender', 'midfielder', 'forward'], + 'required' => true, + 'array' => false, + ]); + + $this->assertEquals(202, $attribute['headers']['status-code']); + $this->assertEquals($attribute['body']['key'], 'position'); + $this->assertEquals($attribute['body']['elements'], ['goalkeeper', 'defender', 'midfielder', 'forward']); + + \sleep(2); + + // Update enum attribute + $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $database['body']['$id'] . '/tables/' . $players['body']['$id'] . '/columns/enum/' . $attribute['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'elements' => ['goalkeeper', 'defender', 'midfielder', 'forward', 'coach'], + 'required' => true, + 'default' => null + ]); + + $this->assertEquals(200, $attribute['headers']['status-code']); + $this->assertEquals($attribute['body']['elements'], ['goalkeeper', 'defender', 'midfielder', 'forward', 'coach']); + } + + /** + * @depends testCreateAttributes + */ + public function testAttributeResponseModels(array $data): array + { + $databaseId = $data['databaseId']; + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Response Models', + // 'permissions' missing on purpose to make sure it's optional + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + $this->assertEquals($table['body']['name'], 'Response Models'); + + $tableId = $table['body']['$id']; + + $columnsPath = "/databases/" . $databaseId . "/tables/{$tableId}/columns"; + + $string = $this->client->call(Client::METHOD_POST, $columnsPath . '/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'string', + 'size' => 16, + 'required' => false, + 'default' => 'default', + ]); + + $email = $this->client->call(Client::METHOD_POST, $columnsPath . '/email', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'email', + 'required' => false, + 'default' => 'default@example.com', + ]); + + $enum = $this->client->call(Client::METHOD_POST, $columnsPath . '/enum', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'enum', + 'elements' => ['yes', 'no', 'maybe'], + 'required' => false, + 'default' => 'maybe', + ]); + + $ip = $this->client->call(Client::METHOD_POST, $columnsPath . '/ip', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'ip', + 'required' => false, + 'default' => '192.0.2.0', + ]); + + $url = $this->client->call(Client::METHOD_POST, $columnsPath . '/url', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'url', + 'required' => false, + 'default' => 'http://example.com', + ]); + + $integer = $this->client->call(Client::METHOD_POST, $columnsPath . '/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'integer', + 'required' => false, + 'min' => 1, + 'max' => 5, + 'default' => 3 + ]); + + $float = $this->client->call(Client::METHOD_POST, $columnsPath . '/float', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'float', + 'required' => false, + 'min' => 1.5, + 'max' => 5.5, + 'default' => 3.5 + ]); + + $boolean = $this->client->call(Client::METHOD_POST, $columnsPath . '/boolean', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'boolean', + 'required' => false, + 'default' => true, + ]); + + $datetime = $this->client->call(Client::METHOD_POST, $columnsPath . '/datetime', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'datetime', + 'required' => false, + 'default' => null, + ]); + + $relationship = $this->client->call(Client::METHOD_POST, $columnsPath . '/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $data['actorsId'], + 'type' => 'oneToMany', + 'twoWay' => true, + 'key' => 'relationship', + 'twoWayKey' => 'twoWayKey' + ]); + + $strings = $this->client->call(Client::METHOD_POST, $columnsPath . '/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'names', + 'size' => 512, + 'required' => false, + 'array' => true, + ]); + + $integers = $this->client->call(Client::METHOD_POST, $columnsPath . '/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'numbers', + 'required' => false, + 'array' => true, + 'min' => 1, + 'max' => 999, + ]); + + $this->assertEquals(202, $string['headers']['status-code']); + $this->assertEquals('string', $string['body']['key']); + $this->assertEquals('string', $string['body']['type']); + $this->assertEquals(false, $string['body']['required']); + $this->assertEquals(false, $string['body']['array']); + $this->assertEquals(16, $string['body']['size']); + $this->assertEquals('default', $string['body']['default']); + + $this->assertEquals(202, $email['headers']['status-code']); + $this->assertEquals('email', $email['body']['key']); + $this->assertEquals('string', $email['body']['type']); + $this->assertEquals(false, $email['body']['required']); + $this->assertEquals(false, $email['body']['array']); + $this->assertEquals('email', $email['body']['format']); + $this->assertEquals('default@example.com', $email['body']['default']); + + $this->assertEquals(202, $enum['headers']['status-code']); + $this->assertEquals('enum', $enum['body']['key']); + $this->assertEquals('string', $enum['body']['type']); + $this->assertEquals(false, $enum['body']['required']); + $this->assertEquals(false, $enum['body']['array']); + $this->assertEquals('enum', $enum['body']['format']); + $this->assertEquals('maybe', $enum['body']['default']); + $this->assertIsArray($enum['body']['elements']); + $this->assertEquals(['yes', 'no', 'maybe'], $enum['body']['elements']); + + $this->assertEquals(202, $ip['headers']['status-code']); + $this->assertEquals('ip', $ip['body']['key']); + $this->assertEquals('string', $ip['body']['type']); + $this->assertEquals(false, $ip['body']['required']); + $this->assertEquals(false, $ip['body']['array']); + $this->assertEquals('ip', $ip['body']['format']); + $this->assertEquals('192.0.2.0', $ip['body']['default']); + + $this->assertEquals(202, $url['headers']['status-code']); + $this->assertEquals('url', $url['body']['key']); + $this->assertEquals('string', $url['body']['type']); + $this->assertEquals(false, $url['body']['required']); + $this->assertEquals(false, $url['body']['array']); + $this->assertEquals('url', $url['body']['format']); + $this->assertEquals('http://example.com', $url['body']['default']); + + $this->assertEquals(202, $integer['headers']['status-code']); + $this->assertEquals('integer', $integer['body']['key']); + $this->assertEquals('integer', $integer['body']['type']); + $this->assertEquals(false, $integer['body']['required']); + $this->assertEquals(false, $integer['body']['array']); + $this->assertEquals(1, $integer['body']['min']); + $this->assertEquals(5, $integer['body']['max']); + $this->assertEquals(3, $integer['body']['default']); + + $this->assertEquals(202, $float['headers']['status-code']); + $this->assertEquals('float', $float['body']['key']); + $this->assertEquals('double', $float['body']['type']); + $this->assertEquals(false, $float['body']['required']); + $this->assertEquals(false, $float['body']['array']); + $this->assertEquals(1.5, $float['body']['min']); + $this->assertEquals(5.5, $float['body']['max']); + $this->assertEquals(3.5, $float['body']['default']); + + $this->assertEquals(202, $boolean['headers']['status-code']); + $this->assertEquals('boolean', $boolean['body']['key']); + $this->assertEquals('boolean', $boolean['body']['type']); + $this->assertEquals(false, $boolean['body']['required']); + $this->assertEquals(false, $boolean['body']['array']); + $this->assertEquals(true, $boolean['body']['default']); + + $this->assertEquals(202, $datetime['headers']['status-code']); + $this->assertEquals('datetime', $datetime['body']['key']); + $this->assertEquals('datetime', $datetime['body']['type']); + $this->assertEquals(false, $datetime['body']['required']); + $this->assertEquals(false, $datetime['body']['array']); + $this->assertEquals(null, $datetime['body']['default']); + + $this->assertEquals(202, $relationship['headers']['status-code']); + $this->assertEquals('relationship', $relationship['body']['key']); + $this->assertEquals('relationship', $relationship['body']['type']); + $this->assertEquals(false, $relationship['body']['required']); + $this->assertEquals(false, $relationship['body']['array']); + $this->assertEquals($data['actorsId'], $relationship['body']['relatedTable']); + $this->assertEquals('oneToMany', $relationship['body']['relationType']); + $this->assertEquals(true, $relationship['body']['twoWay']); + $this->assertEquals('twoWayKey', $relationship['body']['twoWayKey']); + + $this->assertEquals(202, $strings['headers']['status-code']); + $this->assertEquals('names', $strings['body']['key']); + $this->assertEquals('string', $strings['body']['type']); + $this->assertEquals(false, $strings['body']['required']); + $this->assertEquals(true, $strings['body']['array']); + $this->assertEquals(null, $strings['body']['default']); + + $this->assertEquals(202, $integers['headers']['status-code']); + $this->assertEquals('numbers', $integers['body']['key']); + $this->assertEquals('integer', $integers['body']['type']); + $this->assertEquals(false, $integers['body']['required']); + $this->assertEquals(true, $integers['body']['array']); + $this->assertEquals(1, $integers['body']['min']); + $this->assertEquals(999, $integers['body']['max']); + $this->assertEquals(null, $integers['body']['default']); + + // Wait for database worker to create attributes + sleep(5); + + $stringResponse = $this->client->call(Client::METHOD_GET, $columnsPath . '/' . $string['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $emailResponse = $this->client->call(Client::METHOD_GET, $columnsPath . '/' . $email['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $enumResponse = $this->client->call(Client::METHOD_GET, $columnsPath . '/' . $enum['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $ipResponse = $this->client->call(Client::METHOD_GET, $columnsPath . '/' . $ip['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $urlResponse = $this->client->call(Client::METHOD_GET, $columnsPath . '/' . $url['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $integerResponse = $this->client->call(Client::METHOD_GET, $columnsPath . '/' . $integer['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $floatResponse = $this->client->call(Client::METHOD_GET, $columnsPath . '/' . $float['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $booleanResponse = $this->client->call(Client::METHOD_GET, $columnsPath . '/' . $boolean['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $datetimeResponse = $this->client->call(Client::METHOD_GET, $columnsPath . '/' . $datetime['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $relationshipResponse = $this->client->call(Client::METHOD_GET, $columnsPath . '/' . $relationship['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $stringsResponse = $this->client->call(Client::METHOD_GET, $columnsPath . '/' . $strings['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $integersResponse = $this->client->call(Client::METHOD_GET, $columnsPath . '/' . $integers['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $stringResponse['headers']['status-code']); + $this->assertEquals($string['body']['key'], $stringResponse['body']['key']); + $this->assertEquals($string['body']['type'], $stringResponse['body']['type']); + $this->assertEquals('available', $stringResponse['body']['status']); + $this->assertEquals($string['body']['required'], $stringResponse['body']['required']); + $this->assertEquals($string['body']['array'], $stringResponse['body']['array']); + $this->assertEquals(16, $stringResponse['body']['size']); + $this->assertEquals($string['body']['default'], $stringResponse['body']['default']); + + $this->assertEquals(200, $emailResponse['headers']['status-code']); + $this->assertEquals($email['body']['key'], $emailResponse['body']['key']); + $this->assertEquals($email['body']['type'], $emailResponse['body']['type']); + $this->assertEquals('available', $emailResponse['body']['status']); + $this->assertEquals($email['body']['required'], $emailResponse['body']['required']); + $this->assertEquals($email['body']['array'], $emailResponse['body']['array']); + $this->assertEquals($email['body']['format'], $emailResponse['body']['format']); + $this->assertEquals($email['body']['default'], $emailResponse['body']['default']); + + $this->assertEquals(200, $enumResponse['headers']['status-code']); + $this->assertEquals($enum['body']['key'], $enumResponse['body']['key']); + $this->assertEquals($enum['body']['type'], $enumResponse['body']['type']); + $this->assertEquals('available', $enumResponse['body']['status']); + $this->assertEquals($enum['body']['required'], $enumResponse['body']['required']); + $this->assertEquals($enum['body']['array'], $enumResponse['body']['array']); + $this->assertEquals($enum['body']['format'], $enumResponse['body']['format']); + $this->assertEquals($enum['body']['default'], $enumResponse['body']['default']); + $this->assertEquals($enum['body']['elements'], $enumResponse['body']['elements']); + + $this->assertEquals(200, $ipResponse['headers']['status-code']); + $this->assertEquals($ip['body']['key'], $ipResponse['body']['key']); + $this->assertEquals($ip['body']['type'], $ipResponse['body']['type']); + $this->assertEquals('available', $ipResponse['body']['status']); + $this->assertEquals($ip['body']['required'], $ipResponse['body']['required']); + $this->assertEquals($ip['body']['array'], $ipResponse['body']['array']); + $this->assertEquals($ip['body']['format'], $ipResponse['body']['format']); + $this->assertEquals($ip['body']['default'], $ipResponse['body']['default']); + + $this->assertEquals(200, $urlResponse['headers']['status-code']); + $this->assertEquals($url['body']['key'], $urlResponse['body']['key']); + $this->assertEquals($url['body']['type'], $urlResponse['body']['type']); + $this->assertEquals('available', $urlResponse['body']['status']); + $this->assertEquals($url['body']['required'], $urlResponse['body']['required']); + $this->assertEquals($url['body']['array'], $urlResponse['body']['array']); + $this->assertEquals($url['body']['format'], $urlResponse['body']['format']); + $this->assertEquals($url['body']['default'], $urlResponse['body']['default']); + + $this->assertEquals(200, $integerResponse['headers']['status-code']); + $this->assertEquals($integer['body']['key'], $integerResponse['body']['key']); + $this->assertEquals($integer['body']['type'], $integerResponse['body']['type']); + $this->assertEquals('available', $integerResponse['body']['status']); + $this->assertEquals($integer['body']['required'], $integerResponse['body']['required']); + $this->assertEquals($integer['body']['array'], $integerResponse['body']['array']); + $this->assertEquals($integer['body']['min'], $integerResponse['body']['min']); + $this->assertEquals($integer['body']['max'], $integerResponse['body']['max']); + $this->assertEquals($integer['body']['default'], $integerResponse['body']['default']); + + $this->assertEquals(200, $floatResponse['headers']['status-code']); + $this->assertEquals($float['body']['key'], $floatResponse['body']['key']); + $this->assertEquals($float['body']['type'], $floatResponse['body']['type']); + $this->assertEquals('available', $floatResponse['body']['status']); + $this->assertEquals($float['body']['required'], $floatResponse['body']['required']); + $this->assertEquals($float['body']['array'], $floatResponse['body']['array']); + $this->assertEquals($float['body']['min'], $floatResponse['body']['min']); + $this->assertEquals($float['body']['max'], $floatResponse['body']['max']); + $this->assertEquals($float['body']['default'], $floatResponse['body']['default']); + + $this->assertEquals(200, $booleanResponse['headers']['status-code']); + $this->assertEquals($boolean['body']['key'], $booleanResponse['body']['key']); + $this->assertEquals($boolean['body']['type'], $booleanResponse['body']['type']); + $this->assertEquals('available', $booleanResponse['body']['status']); + $this->assertEquals($boolean['body']['required'], $booleanResponse['body']['required']); + $this->assertEquals($boolean['body']['array'], $booleanResponse['body']['array']); + $this->assertEquals($boolean['body']['default'], $booleanResponse['body']['default']); + + $this->assertEquals(200, $datetimeResponse['headers']['status-code']); + $this->assertEquals($datetime['body']['key'], $datetimeResponse['body']['key']); + $this->assertEquals($datetime['body']['type'], $datetimeResponse['body']['type']); + $this->assertEquals('available', $datetimeResponse['body']['status']); + $this->assertEquals($datetime['body']['required'], $datetimeResponse['body']['required']); + $this->assertEquals($datetime['body']['array'], $datetimeResponse['body']['array']); + $this->assertEquals($datetime['body']['default'], $datetimeResponse['body']['default']); + + $this->assertEquals(200, $relationshipResponse['headers']['status-code']); + $this->assertEquals($relationship['body']['key'], $relationshipResponse['body']['key']); + $this->assertEquals($relationship['body']['type'], $relationshipResponse['body']['type']); + $this->assertEquals('available', $relationshipResponse['body']['status']); + $this->assertEquals($relationship['body']['required'], $relationshipResponse['body']['required']); + $this->assertEquals($relationship['body']['array'], $relationshipResponse['body']['array']); + $this->assertEquals($relationship['body']['relatedTable'], $relationshipResponse['body']['relatedTable']); + $this->assertEquals($relationship['body']['relationType'], $relationshipResponse['body']['relationType']); + $this->assertEquals($relationship['body']['twoWay'], $relationshipResponse['body']['twoWay']); + $this->assertEquals($relationship['body']['twoWayKey'], $relationshipResponse['body']['twoWayKey']); + + $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $columns['headers']['status-code']); + $this->assertEquals(12, $columns['body']['total']); + + $columns = $columns['body']['columns']; + $this->assertIsArray($columns); + $this->assertCount(12, $columns); + + $this->assertEquals($stringResponse['body']['key'], $columns[0]['key']); + $this->assertEquals($stringResponse['body']['type'], $columns[0]['type']); + $this->assertEquals($stringResponse['body']['status'], $columns[0]['status']); + $this->assertEquals($stringResponse['body']['required'], $columns[0]['required']); + $this->assertEquals($stringResponse['body']['array'], $columns[0]['array']); + $this->assertEquals($stringResponse['body']['size'], $columns[0]['size']); + $this->assertEquals($stringResponse['body']['default'], $columns[0]['default']); + + $this->assertEquals($emailResponse['body']['key'], $columns[1]['key']); + $this->assertEquals($emailResponse['body']['type'], $columns[1]['type']); + $this->assertEquals($emailResponse['body']['status'], $columns[1]['status']); + $this->assertEquals($emailResponse['body']['required'], $columns[1]['required']); + $this->assertEquals($emailResponse['body']['array'], $columns[1]['array']); + $this->assertEquals($emailResponse['body']['default'], $columns[1]['default']); + $this->assertEquals($emailResponse['body']['format'], $columns[1]['format']); + + $this->assertEquals($enumResponse['body']['key'], $columns[2]['key']); + $this->assertEquals($enumResponse['body']['type'], $columns[2]['type']); + $this->assertEquals($enumResponse['body']['status'], $columns[2]['status']); + $this->assertEquals($enumResponse['body']['required'], $columns[2]['required']); + $this->assertEquals($enumResponse['body']['array'], $columns[2]['array']); + $this->assertEquals($enumResponse['body']['default'], $columns[2]['default']); + $this->assertEquals($enumResponse['body']['format'], $columns[2]['format']); + $this->assertEquals($enumResponse['body']['elements'], $columns[2]['elements']); + + $this->assertEquals($ipResponse['body']['key'], $columns[3]['key']); + $this->assertEquals($ipResponse['body']['type'], $columns[3]['type']); + $this->assertEquals($ipResponse['body']['status'], $columns[3]['status']); + $this->assertEquals($ipResponse['body']['required'], $columns[3]['required']); + $this->assertEquals($ipResponse['body']['array'], $columns[3]['array']); + $this->assertEquals($ipResponse['body']['default'], $columns[3]['default']); + $this->assertEquals($ipResponse['body']['format'], $columns[3]['format']); + + $this->assertEquals($urlResponse['body']['key'], $columns[4]['key']); + $this->assertEquals($urlResponse['body']['type'], $columns[4]['type']); + $this->assertEquals($urlResponse['body']['status'], $columns[4]['status']); + $this->assertEquals($urlResponse['body']['required'], $columns[4]['required']); + $this->assertEquals($urlResponse['body']['array'], $columns[4]['array']); + $this->assertEquals($urlResponse['body']['default'], $columns[4]['default']); + $this->assertEquals($urlResponse['body']['format'], $columns[4]['format']); + + $this->assertEquals($integerResponse['body']['key'], $columns[5]['key']); + $this->assertEquals($integerResponse['body']['type'], $columns[5]['type']); + $this->assertEquals($integerResponse['body']['status'], $columns[5]['status']); + $this->assertEquals($integerResponse['body']['required'], $columns[5]['required']); + $this->assertEquals($integerResponse['body']['array'], $columns[5]['array']); + $this->assertEquals($integerResponse['body']['default'], $columns[5]['default']); + $this->assertEquals($integerResponse['body']['min'], $columns[5]['min']); + $this->assertEquals($integerResponse['body']['max'], $columns[5]['max']); + + $this->assertEquals($floatResponse['body']['key'], $columns[6]['key']); + $this->assertEquals($floatResponse['body']['type'], $columns[6]['type']); + $this->assertEquals($floatResponse['body']['status'], $columns[6]['status']); + $this->assertEquals($floatResponse['body']['required'], $columns[6]['required']); + $this->assertEquals($floatResponse['body']['array'], $columns[6]['array']); + $this->assertEquals($floatResponse['body']['default'], $columns[6]['default']); + $this->assertEquals($floatResponse['body']['min'], $columns[6]['min']); + $this->assertEquals($floatResponse['body']['max'], $columns[6]['max']); + + $this->assertEquals($booleanResponse['body']['key'], $columns[7]['key']); + $this->assertEquals($booleanResponse['body']['type'], $columns[7]['type']); + $this->assertEquals($booleanResponse['body']['status'], $columns[7]['status']); + $this->assertEquals($booleanResponse['body']['required'], $columns[7]['required']); + $this->assertEquals($booleanResponse['body']['array'], $columns[7]['array']); + $this->assertEquals($booleanResponse['body']['default'], $columns[7]['default']); + + $this->assertEquals($datetimeResponse['body']['key'], $columns[8]['key']); + $this->assertEquals($datetimeResponse['body']['type'], $columns[8]['type']); + $this->assertEquals($datetimeResponse['body']['status'], $columns[8]['status']); + $this->assertEquals($datetimeResponse['body']['required'], $columns[8]['required']); + $this->assertEquals($datetimeResponse['body']['array'], $columns[8]['array']); + $this->assertEquals($datetimeResponse['body']['default'], $columns[8]['default']); + + $this->assertEquals($relationshipResponse['body']['key'], $columns[9]['key']); + $this->assertEquals($relationshipResponse['body']['type'], $columns[9]['type']); + $this->assertEquals($relationshipResponse['body']['status'], $columns[9]['status']); + $this->assertEquals($relationshipResponse['body']['required'], $columns[9]['required']); + $this->assertEquals($relationshipResponse['body']['array'], $columns[9]['array']); + $this->assertEquals($relationshipResponse['body']['relatedTable'], $columns[9]['relatedTable']); + $this->assertEquals($relationshipResponse['body']['relationType'], $columns[9]['relationType']); + $this->assertEquals($relationshipResponse['body']['twoWay'], $columns[9]['twoWay']); + $this->assertEquals($relationshipResponse['body']['twoWayKey'], $columns[9]['twoWayKey']); + + $this->assertEquals($stringsResponse['body']['key'], $columns[10]['key']); + $this->assertEquals($stringsResponse['body']['type'], $columns[10]['type']); + $this->assertEquals($stringsResponse['body']['status'], $columns[10]['status']); + $this->assertEquals($stringsResponse['body']['required'], $columns[10]['required']); + $this->assertEquals($stringsResponse['body']['array'], $columns[10]['array']); + $this->assertEquals($stringsResponse['body']['default'], $columns[10]['default']); + + $this->assertEquals($integersResponse['body']['key'], $columns[11]['key']); + $this->assertEquals($integersResponse['body']['type'], $columns[11]['type']); + $this->assertEquals($integersResponse['body']['status'], $columns[11]['status']); + $this->assertEquals($integersResponse['body']['required'], $columns[11]['required']); + $this->assertEquals($integersResponse['body']['array'], $columns[11]['array']); + $this->assertEquals($integersResponse['body']['default'], $columns[11]['default']); + $this->assertEquals($integersResponse['body']['min'], $columns[11]['min']); + $this->assertEquals($integersResponse['body']['max'], $columns[11]['max']); + + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $table['headers']['status-code']); + + $columns = $table['body']['columns']; + + $this->assertIsArray($columns); + $this->assertCount(12, $columns); + + $this->assertEquals($stringResponse['body']['key'], $columns[0]['key']); + $this->assertEquals($stringResponse['body']['type'], $columns[0]['type']); + $this->assertEquals($stringResponse['body']['status'], $columns[0]['status']); + $this->assertEquals($stringResponse['body']['required'], $columns[0]['required']); + $this->assertEquals($stringResponse['body']['array'], $columns[0]['array']); + $this->assertEquals($stringResponse['body']['size'], $columns[0]['size']); + $this->assertEquals($stringResponse['body']['default'], $columns[0]['default']); + + $this->assertEquals($emailResponse['body']['key'], $columns[1]['key']); + $this->assertEquals($emailResponse['body']['type'], $columns[1]['type']); + $this->assertEquals($emailResponse['body']['status'], $columns[1]['status']); + $this->assertEquals($emailResponse['body']['required'], $columns[1]['required']); + $this->assertEquals($emailResponse['body']['array'], $columns[1]['array']); + $this->assertEquals($emailResponse['body']['default'], $columns[1]['default']); + $this->assertEquals($emailResponse['body']['format'], $columns[1]['format']); + + $this->assertEquals($enumResponse['body']['key'], $columns[2]['key']); + $this->assertEquals($enumResponse['body']['type'], $columns[2]['type']); + $this->assertEquals($enumResponse['body']['status'], $columns[2]['status']); + $this->assertEquals($enumResponse['body']['required'], $columns[2]['required']); + $this->assertEquals($enumResponse['body']['array'], $columns[2]['array']); + $this->assertEquals($enumResponse['body']['default'], $columns[2]['default']); + $this->assertEquals($enumResponse['body']['format'], $columns[2]['format']); + $this->assertEquals($enumResponse['body']['elements'], $columns[2]['elements']); + + $this->assertEquals($ipResponse['body']['key'], $columns[3]['key']); + $this->assertEquals($ipResponse['body']['type'], $columns[3]['type']); + $this->assertEquals($ipResponse['body']['status'], $columns[3]['status']); + $this->assertEquals($ipResponse['body']['required'], $columns[3]['required']); + $this->assertEquals($ipResponse['body']['array'], $columns[3]['array']); + $this->assertEquals($ipResponse['body']['default'], $columns[3]['default']); + $this->assertEquals($ipResponse['body']['format'], $columns[3]['format']); + + $this->assertEquals($urlResponse['body']['key'], $columns[4]['key']); + $this->assertEquals($urlResponse['body']['type'], $columns[4]['type']); + $this->assertEquals($urlResponse['body']['status'], $columns[4]['status']); + $this->assertEquals($urlResponse['body']['required'], $columns[4]['required']); + $this->assertEquals($urlResponse['body']['array'], $columns[4]['array']); + $this->assertEquals($urlResponse['body']['default'], $columns[4]['default']); + $this->assertEquals($urlResponse['body']['format'], $columns[4]['format']); + + $this->assertEquals($integerResponse['body']['key'], $columns[5]['key']); + $this->assertEquals($integerResponse['body']['type'], $columns[5]['type']); + $this->assertEquals($integerResponse['body']['status'], $columns[5]['status']); + $this->assertEquals($integerResponse['body']['required'], $columns[5]['required']); + $this->assertEquals($integerResponse['body']['array'], $columns[5]['array']); + $this->assertEquals($integerResponse['body']['default'], $columns[5]['default']); + $this->assertEquals($integerResponse['body']['min'], $columns[5]['min']); + $this->assertEquals($integerResponse['body']['max'], $columns[5]['max']); + + $this->assertEquals($floatResponse['body']['key'], $columns[6]['key']); + $this->assertEquals($floatResponse['body']['type'], $columns[6]['type']); + $this->assertEquals($floatResponse['body']['status'], $columns[6]['status']); + $this->assertEquals($floatResponse['body']['required'], $columns[6]['required']); + $this->assertEquals($floatResponse['body']['array'], $columns[6]['array']); + $this->assertEquals($floatResponse['body']['default'], $columns[6]['default']); + $this->assertEquals($floatResponse['body']['min'], $columns[6]['min']); + $this->assertEquals($floatResponse['body']['max'], $columns[6]['max']); + + $this->assertEquals($booleanResponse['body']['key'], $columns[7]['key']); + $this->assertEquals($booleanResponse['body']['type'], $columns[7]['type']); + $this->assertEquals($booleanResponse['body']['status'], $columns[7]['status']); + $this->assertEquals($booleanResponse['body']['required'], $columns[7]['required']); + $this->assertEquals($booleanResponse['body']['array'], $columns[7]['array']); + $this->assertEquals($booleanResponse['body']['default'], $columns[7]['default']); + + $this->assertEquals($datetimeResponse['body']['key'], $columns[8]['key']); + $this->assertEquals($datetimeResponse['body']['type'], $columns[8]['type']); + $this->assertEquals($datetimeResponse['body']['status'], $columns[8]['status']); + $this->assertEquals($datetimeResponse['body']['required'], $columns[8]['required']); + $this->assertEquals($datetimeResponse['body']['array'], $columns[8]['array']); + $this->assertEquals($datetimeResponse['body']['default'], $columns[8]['default']); + + $this->assertEquals($relationshipResponse['body']['key'], $columns[9]['key']); + $this->assertEquals($relationshipResponse['body']['type'], $columns[9]['type']); + $this->assertEquals($relationshipResponse['body']['status'], $columns[9]['status']); + $this->assertEquals($relationshipResponse['body']['required'], $columns[9]['required']); + $this->assertEquals($relationshipResponse['body']['array'], $columns[9]['array']); + $this->assertEquals($relationshipResponse['body']['relatedTable'], $columns[9]['relatedTable']); + $this->assertEquals($relationshipResponse['body']['relationType'], $columns[9]['relationType']); + $this->assertEquals($relationshipResponse['body']['twoWay'], $columns[9]['twoWay']); + $this->assertEquals($relationshipResponse['body']['twoWayKey'], $columns[9]['twoWayKey']); + + $this->assertEquals($stringsResponse['body']['key'], $columns[10]['key']); + $this->assertEquals($stringsResponse['body']['type'], $columns[10]['type']); + $this->assertEquals($stringsResponse['body']['status'], $columns[10]['status']); + $this->assertEquals($stringsResponse['body']['required'], $columns[10]['required']); + $this->assertEquals($stringsResponse['body']['array'], $columns[10]['array']); + $this->assertEquals($stringsResponse['body']['default'], $columns[10]['default']); + + $this->assertEquals($integersResponse['body']['key'], $columns[11]['key']); + $this->assertEquals($integersResponse['body']['type'], $columns[11]['type']); + $this->assertEquals($integersResponse['body']['status'], $columns[11]['status']); + $this->assertEquals($integersResponse['body']['required'], $columns[11]['required']); + $this->assertEquals($integersResponse['body']['array'], $columns[11]['array']); + $this->assertEquals($integersResponse['body']['default'], $columns[11]['default']); + $this->assertEquals($integersResponse['body']['min'], $columns[11]['min']); + $this->assertEquals($integersResponse['body']['max'], $columns[11]['max']); + + /** + * Test for FAILURE + */ + $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'enum', + 'elements' => ['yes', 'no', ''], + 'required' => false, + 'default' => 'maybe', + ]); + + $this->assertEquals(400, $badEnum['headers']['status-code']); + $this->assertEquals('Invalid `elements` param: Value must a valid array no longer than 100 items and Value must be a valid string and at least 1 chars and no longer than 255 chars', $badEnum['body']['message']); + + return $data; + } + + /** + * @depends testCreateAttributes + */ + public function testCreateIndexes(array $data): array + { + $databaseId = $data['databaseId']; + + $titleIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'titleIndex', + 'type' => 'fulltext', + 'columns' => ['title'], + ]); + + $this->assertEquals(202, $titleIndex['headers']['status-code']); + $this->assertEquals('titleIndex', $titleIndex['body']['key']); + $this->assertEquals('fulltext', $titleIndex['body']['type']); + $this->assertCount(1, $titleIndex['body']['columns']); + $this->assertEquals('title', $titleIndex['body']['columns'][0]); + + $releaseYearIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'releaseYear', + 'type' => 'key', + 'columns' => ['releaseYear'], + ]); + + $this->assertEquals(202, $releaseYearIndex['headers']['status-code']); + $this->assertEquals('releaseYear', $releaseYearIndex['body']['key']); + $this->assertEquals('key', $releaseYearIndex['body']['type']); + $this->assertCount(1, $releaseYearIndex['body']['columns']); + $this->assertEquals('releaseYear', $releaseYearIndex['body']['columns'][0]); + + $releaseWithDate1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'releaseYearDated', + 'type' => 'key', + 'columns' => ['releaseYear', '$createdAt', '$updatedAt'], + ]); + + $this->assertEquals(202, $releaseWithDate1['headers']['status-code']); + $this->assertEquals('releaseYearDated', $releaseWithDate1['body']['key']); + $this->assertEquals('key', $releaseWithDate1['body']['type']); + $this->assertCount(3, $releaseWithDate1['body']['columns']); + $this->assertEquals('releaseYear', $releaseWithDate1['body']['columns'][0]); + $this->assertEquals('$createdAt', $releaseWithDate1['body']['columns'][1]); + $this->assertEquals('$updatedAt', $releaseWithDate1['body']['columns'][2]); + + $releaseWithDate2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'birthDay', + 'type' => 'key', + 'columns' => ['birthDay'], + ]); + + $this->assertEquals(202, $releaseWithDate2['headers']['status-code']); + $this->assertEquals('birthDay', $releaseWithDate2['body']['key']); + $this->assertEquals('key', $releaseWithDate2['body']['type']); + $this->assertCount(1, $releaseWithDate2['body']['columns']); + $this->assertEquals('birthDay', $releaseWithDate2['body']['columns'][0]); + + // Test for failure + $fulltextReleaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'releaseYearDated', + 'type' => 'fulltext', + 'columns' => ['releaseYear'], + ]); + + $this->assertEquals(400, $fulltextReleaseYear['headers']['status-code']); + $this->assertEquals($fulltextReleaseYear['body']['message'], 'Attribute "releaseYear" cannot be part of a FULLTEXT index, must be of type string'); + + $noAttributes = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'none', + 'type' => 'key', + 'columns' => [], + ]); + + $this->assertEquals(400, $noAttributes['headers']['status-code']); + $this->assertEquals($noAttributes['body']['message'], 'No attributes provided for index'); + + $duplicates = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'duplicate', + 'type' => 'fulltext', + 'columns' => ['releaseYear', 'releaseYear'], + ]); + + $this->assertEquals(400, $duplicates['headers']['status-code']); + $this->assertEquals($duplicates['body']['message'], 'Duplicate attributes provided'); + + $tooLong = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'key' => 'tooLong', + 'type' => 'key', + 'columns' => ['description', 'tagline'], + ]); + + $this->assertEquals(400, $tooLong['headers']['status-code']); + $this->assertStringContainsString('Index length is longer than the maximum', $tooLong['body']['message']); + + $fulltextArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'key' => 'ft', + 'type' => 'fulltext', + 'columns' => ['actors'], + ]); + + $this->assertEquals(400, $fulltextArray['headers']['status-code']); + $this->assertEquals('"Fulltext" index is forbidden on array attributes', $fulltextArray['body']['message']); + + $actorsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'key' => 'index-actors', + 'type' => 'key', + 'columns' => ['actors'], + ]); + + $this->assertEquals(202, $actorsArray['headers']['status-code']); + + $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'key' => 'index-ip-actors', + 'type' => 'key', + 'columns' => ['releaseYear', 'actors'], // 2 levels + 'orders' => ['DESC', 'DESC'], + ]); + + $this->assertEquals(202, $twoLevelsArray['headers']['status-code']); + $this->assertEquals('DESC', $twoLevelsArray['body']['orders'][0]); + $this->assertEquals(null, $twoLevelsArray['body']['orders'][1]); // Overwrite by API (array) + + $unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'key' => 'index-unknown', + 'type' => 'key', + 'columns' => ['Unknown'], + ]); + + $this->assertEquals(400, $unknown['headers']['status-code']); + $this->assertEquals('Unknown column: Unknown. Verify the column name or create the column.', $unknown['body']['message']); + + $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'key' => 'integers-order', + 'type' => 'key', + 'columns' => ['integers'], // array attribute + 'orders' => ['DESC'], // Check order is removed in API + ]); + $this->assertEquals(202, $index1['headers']['status-code']); + + $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'key' => 'integers-size', + 'type' => 'key', + 'columns' => ['integers'], // array attribute + ]); + $this->assertEquals(202, $index2['headers']['status-code']); + + /** + * Create Indexes by worker + */ + sleep(2); + + $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), []); + + $this->assertIsArray($movies['body']['indexes']); + $this->assertCount(8, $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']); + $this->assertEquals($releaseWithDate2['body']['key'], $movies['body']['indexes'][3]['key']); + foreach ($movies['body']['indexes'] as $index) { + $this->assertEquals('available', $index['status']); + } + + return $data; + } + + /** + * @depends testCreateIndexes + */ + public function testListIndexes(array $data): void + { + $databaseId = $data['databaseId']; + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'queries' => [ + Query::equal('type', ['key'])->toString(), + Query::limit(2)->toString() + ], + ]); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(2, \count($response['body']['indexes'])); + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'queries' => [ + Query::select(['key'])->toString(), + ], + ]); + $this->assertEquals(Exception::GENERAL_ARGUMENT_INVALID, $response['body']['type']); + $this->assertEquals(400, $response['headers']['status-code']); + } + + /** + * @depends testCreateIndexes + */ + public function testCreateDocument(array $data): array + { + $databaseId = $data['databaseId']; + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Captain America', + 'releaseYear' => 1944, + 'birthDay' => '1975-06-12 14:12:55+02:00', + 'actors' => [ + 'Chris Evans', + 'Samuel Jackson', + ] + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Spider-Man: Far From Home', + 'releaseYear' => 2019, + 'birthDay' => null, + 'actors' => [ + 'Tom Holland', + 'Zendaya Maree Stoermer', + 'Samuel Jackson', + ], + 'integers' => [50,60] + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Spider-Man: Homecoming', + 'releaseYear' => 2017, + 'birthDay' => '1975-06-12 14:12:55 America/New_York', + 'duration' => 65, + 'actors' => [ + 'Tom Holland', + 'Zendaya Maree Stoermer', + ], + 'integers' => [50] + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + $row4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'releaseYear' => 2020, // Missing title, expect an 400 error + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + $this->assertEquals(201, $row1['headers']['status-code']); + $this->assertEquals($data['moviesId'], $row1['body']['$tableId']); + $this->assertArrayNotHasKey('$table', $row1['body']); + $this->assertEquals($databaseId, $row1['body']['$databaseId']); + $this->assertEquals($row1['body']['title'], 'Captain America'); + $this->assertEquals($row1['body']['releaseYear'], 1944); + $this->assertIsArray($row1['body']['$permissions']); + $this->assertCount(3, $row1['body']['$permissions']); + $this->assertCount(2, $row1['body']['actors']); + $this->assertEquals($row1['body']['actors'][0], 'Chris Evans'); + $this->assertEquals($row1['body']['actors'][1], 'Samuel Jackson'); + $this->assertEquals($row1['body']['birthDay'], '1975-06-12T12:12:55.000+00:00'); + + $this->assertEquals(201, $row2['headers']['status-code']); + $this->assertEquals($data['moviesId'], $row2['body']['$tableId']); + $this->assertArrayNotHasKey('$table', $row2['body']); + $this->assertEquals($databaseId, $row2['body']['$databaseId']); + $this->assertEquals($row2['body']['title'], 'Spider-Man: Far From Home'); + $this->assertEquals($row2['body']['releaseYear'], 2019); + $this->assertEquals($row2['body']['duration'], null); + $this->assertIsArray($row2['body']['$permissions']); + $this->assertCount(3, $row2['body']['$permissions']); + $this->assertCount(3, $row2['body']['actors']); + $this->assertEquals($row2['body']['actors'][0], 'Tom Holland'); + $this->assertEquals($row2['body']['actors'][1], 'Zendaya Maree Stoermer'); + $this->assertEquals($row2['body']['actors'][2], 'Samuel Jackson'); + $this->assertEquals($row2['body']['birthDay'], null); + $this->assertEquals($row2['body']['integers'][0], 50); + $this->assertEquals($row2['body']['integers'][1], 60); + + $this->assertEquals(201, $row3['headers']['status-code']); + $this->assertEquals($data['moviesId'], $row3['body']['$tableId']); + $this->assertArrayNotHasKey('$table', $row3['body']); + $this->assertEquals($databaseId, $row3['body']['$databaseId']); + $this->assertEquals($row3['body']['title'], 'Spider-Man: Homecoming'); + $this->assertEquals($row3['body']['releaseYear'], 2017); + $this->assertEquals($row3['body']['duration'], 65); + $this->assertIsArray($row3['body']['$permissions']); + $this->assertCount(3, $row3['body']['$permissions']); + $this->assertCount(2, $row3['body']['actors']); + $this->assertEquals($row3['body']['actors'][0], 'Tom Holland'); + $this->assertEquals($row3['body']['actors'][1], 'Zendaya Maree Stoermer'); + $this->assertEquals($row3['body']['birthDay'], '1975-06-12T18:12:55.000+00:00'); // UTC for NY + + $this->assertEquals(400, $row4['headers']['status-code']); + + // Delete document 4 with incomplete path + $this->assertEquals(404, $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()))['headers']['status-code']); + + return $data; + } + + /** + * @depends testCreateDocument + */ + public function testListDocuments(array $data): array + { + $databaseId = $data['databaseId']; + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderAsc('releaseYear')->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(1944, $rows['body']['rows'][0]['releaseYear']); + $this->assertEquals(2017, $rows['body']['rows'][1]['releaseYear']); + $this->assertEquals(2019, $rows['body']['rows'][2]['releaseYear']); + $this->assertFalse(array_key_exists('$internalId', $rows['body']['rows'][0])); + $this->assertFalse(array_key_exists('$internalId', $rows['body']['rows'][1])); + $this->assertFalse(array_key_exists('$internalId', $rows['body']['rows'][2])); + $this->assertCount(3, $rows['body']['rows']); + + foreach ($rows['body']['rows'] as $row) { + $this->assertArrayNotHasKey('$table', $row); + $this->assertEquals($databaseId, $row['$databaseId']); + $this->assertEquals($data['moviesId'], $row['$tableId']); + } + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderDesc('releaseYear')->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(1944, $rows['body']['rows'][2]['releaseYear']); + $this->assertEquals(2017, $rows['body']['rows'][1]['releaseYear']); + $this->assertEquals(2019, $rows['body']['rows'][0]['releaseYear']); + $this->assertCount(3, $rows['body']['rows']); + + // changing description attribute to be null by default instead of empty string + $patchNull = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string/description', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'default' => null, + 'required' => false, + ]); + // creating a dummy doc with null description + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Dummy', + 'releaseYear' => 1944, + 'birthDay' => '1975-06-12 14:12:55+02:00', + 'actors' => [ + 'Dummy', + ], + ] + ]); + + $this->assertEquals(201, $row1['headers']['status-code']); + // fetching docs with cursor after the dummy doc with order attr description which is null + $rowsPaginated = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderAsc('dummy')->toString(), + Query::cursorAfter(new Document(['$id' => $row1['body']['$id']]))->toString() + ], + ]); + // should throw 400 as the order attr description of the selected doc is null + $this->assertEquals(400, $rowsPaginated['headers']['status-code']); + + // deleting the dummy doc created + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $row1['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + return ['rows' => $rows['body']['rows'], 'databaseId' => $databaseId]; + } + + + /** + * @depends testListDocuments + */ + public function testGetDocument(array $data): void + { + $databaseId = $data['databaseId']; + foreach ($data['rows'] as $row) { + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals($response['body']['$id'], $row['$id']); + $this->assertEquals($row['$tableId'], $response['body']['$tableId']); + $this->assertArrayNotHasKey('$table', $response['body']); + $this->assertEquals($row['$databaseId'], $response['body']['$databaseId']); + $this->assertEquals($response['body']['title'], $row['title']); + $this->assertEquals($response['body']['releaseYear'], $row['releaseYear']); + $this->assertEquals($response['body']['$permissions'], $row['$permissions']); + $this->assertEquals($response['body']['birthDay'], $row['birthDay']); + $this->assertFalse(array_key_exists('$internalId', $response['body'])); + $this->assertFalse(array_key_exists('$tenant', $response['body'])); + } + } + + /** + * @depends testListDocuments + */ + public function testGetDocumentWithQueries(array $data): void + { + $databaseId = $data['databaseId']; + $row = $data['rows'][0]; + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['title', 'releaseYear', '$id'])->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals($row['title'], $response['body']['title']); + $this->assertEquals($row['releaseYear'], $response['body']['releaseYear']); + $this->assertArrayNotHasKey('birthDay', $response['body']); + } + + /** + * @depends testCreateDocument + */ + public function testListDocumentsAfterPagination(array $data): array + { + $databaseId = $data['databaseId']; + /** + * Test after without order. + */ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $base['headers']['status-code']); + $this->assertEquals('Captain America', $base['body']['rows'][0]['title']); + $this->assertEquals('Spider-Man: Far From Home', $base['body']['rows'][1]['title']); + $this->assertEquals('Spider-Man: Homecoming', $base['body']['rows'][2]['title']); + $this->assertCount(3, $base['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorAfter(new Document(['$id' => $base['body']['rows'][0]['$id']]))->toString() + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals($base['body']['rows'][1]['$id'], $rows['body']['rows'][0]['$id']); + $this->assertEquals($base['body']['rows'][2]['$id'], $rows['body']['rows'][1]['$id']); + $this->assertCount(2, $rows['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorAfter(new Document(['$id' => $base['body']['rows'][2]['$id']]))->toString() + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEmpty($rows['body']['rows']); + + /** + * Test with ASC order and after. + */ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderAsc('releaseYear')->toString() + ], + ]); + + $this->assertEquals(200, $base['headers']['status-code']); + $this->assertEquals(1944, $base['body']['rows'][0]['releaseYear']); + $this->assertEquals(2017, $base['body']['rows'][1]['releaseYear']); + $this->assertEquals(2019, $base['body']['rows'][2]['releaseYear']); + $this->assertCount(3, $base['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorAfter(new Document(['$id' => $base['body']['rows'][1]['$id']]))->toString(), + Query::orderAsc('releaseYear')->toString() + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals($base['body']['rows'][2]['$id'], $rows['body']['rows'][0]['$id']); + $this->assertCount(1, $rows['body']['rows']); + + /** + * Test with DESC order and after. + */ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderDesc('releaseYear')->toString() + ], + ]); + + $this->assertEquals(200, $base['headers']['status-code']); + $this->assertEquals(1944, $base['body']['rows'][2]['releaseYear']); + $this->assertEquals(2017, $base['body']['rows'][1]['releaseYear']); + $this->assertEquals(2019, $base['body']['rows'][0]['releaseYear']); + $this->assertCount(3, $base['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorAfter(new Document(['$id' => $base['body']['rows'][1]['$id']]))->toString(), + Query::orderDesc('releaseYear')->toString() + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals($base['body']['rows'][2]['$id'], $rows['body']['rows'][0]['$id']); + $this->assertCount(1, $rows['body']['rows']); + + /** + * Test after with unknown document. + */ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorAfter(new Document(['$id' => 'unknown']))->toString(), + ], + ]); + + $this->assertEquals(400, $rows['headers']['status-code']); + + /** + * Test null value for cursor + */ + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + '{"method":"cursorAfter","values":[null]}', + ], + ]); + + $this->assertEquals(400, $rows['headers']['status-code']); + + return []; + } + + /** + * @depends testCreateDocument + */ + public function testListDocumentsBeforePagination(array $data): array + { + $databaseId = $data['databaseId']; + /** + * Test before without order. + */ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $base['headers']['status-code']); + $this->assertEquals('Captain America', $base['body']['rows'][0]['title']); + $this->assertEquals('Spider-Man: Far From Home', $base['body']['rows'][1]['title']); + $this->assertEquals('Spider-Man: Homecoming', $base['body']['rows'][2]['title']); + $this->assertCount(3, $base['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorBefore(new Document(['$id' => $base['body']['rows'][2]['$id']]))->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals($base['body']['rows'][0]['$id'], $rows['body']['rows'][0]['$id']); + $this->assertEquals($base['body']['rows'][1]['$id'], $rows['body']['rows'][1]['$id']); + $this->assertCount(2, $rows['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorBefore(new Document(['$id' => $base['body']['rows'][0]['$id']]))->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEmpty($rows['body']['rows']); + + /** + * Test with ASC order and after. + */ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderAsc('releaseYear')->toString(), + ], + ]); + + $this->assertEquals(200, $base['headers']['status-code']); + $this->assertEquals(1944, $base['body']['rows'][0]['releaseYear']); + $this->assertEquals(2017, $base['body']['rows'][1]['releaseYear']); + $this->assertEquals(2019, $base['body']['rows'][2]['releaseYear']); + $this->assertCount(3, $base['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorBefore(new Document(['$id' => $base['body']['rows'][1]['$id']]))->toString(), + Query::orderAsc('releaseYear')->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals($base['body']['rows'][0]['$id'], $rows['body']['rows'][0]['$id']); + $this->assertCount(1, $rows['body']['rows']); + + /** + * Test with DESC order and after. + */ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderDesc('releaseYear')->toString(), + ], + ]); + + $this->assertEquals(200, $base['headers']['status-code']); + $this->assertEquals(1944, $base['body']['rows'][2]['releaseYear']); + $this->assertEquals(2017, $base['body']['rows'][1]['releaseYear']); + $this->assertEquals(2019, $base['body']['rows'][0]['releaseYear']); + $this->assertCount(3, $base['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorBefore(new Document(['$id' => $base['body']['rows'][1]['$id']]))->toString(), + Query::orderDesc('releaseYear')->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals($base['body']['rows'][0]['$id'], $rows['body']['rows'][0]['$id']); + $this->assertCount(1, $rows['body']['rows']); + + return []; + } + + /** + * @depends testCreateDocument + */ + public function testListDocumentsLimitAndOffset(array $data): array + { + $databaseId = $data['databaseId']; + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderAsc('releaseYear')->toString(), + Query::limit(1)->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(1944, $rows['body']['rows'][0]['releaseYear']); + $this->assertCount(1, $rows['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderAsc('releaseYear')->toString(), + Query::limit(2)->toString(), + Query::offset(1)->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(2017, $rows['body']['rows'][0]['releaseYear']); + $this->assertEquals(2019, $rows['body']['rows'][1]['releaseYear']); + $this->assertCount(2, $rows['body']['rows']); + + return []; + } + + /** + * @depends testCreateDocument + */ + public function testDocumentsListQueries(array $data): array + { + $databaseId = $data['databaseId']; + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::search('title', 'Captain America')->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(1944, $rows['body']['rows'][0]['releaseYear']); + $this->assertCount(1, $rows['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('$id', [$rows['body']['rows'][0]['$id']])->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(1944, $rows['body']['rows'][0]['releaseYear']); + $this->assertCount(1, $rows['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::search('title', 'Homecoming')->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(2017, $rows['body']['rows'][0]['releaseYear']); + $this->assertCount(1, $rows['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::search('title', 'spider')->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(2019, $rows['body']['rows'][0]['releaseYear']); + $this->assertEquals(2017, $rows['body']['rows'][1]['releaseYear']); + $this->assertCount(2, $rows['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + '{"method":"contains","attribute":"title","values":[bad]}' + ], + ]); + + $this->assertEquals(400, $rows['headers']['status-code']); + $this->assertEquals('Invalid query: Syntax error', $rows['body']['message']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::contains('title', ['spi'])->toString(), // like query + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(2, $rows['body']['total']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('releaseYear', [1944])->toString(), + ], + ]); + + $this->assertCount(1, $rows['body']['rows']); + $this->assertEquals('Captain America', $rows['body']['rows'][0]['title']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::notEqual('releaseYear', 1944)->toString(), + ], + ]); + + $this->assertCount(2, $rows['body']['rows']); + $this->assertEquals('Spider-Man: Far From Home', $rows['body']['rows'][0]['title']); + $this->assertEquals('Spider-Man: Homecoming', $rows['body']['rows'][1]['title']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::greaterThan('$createdAt', '1976-06-12')->toString(), + ], + ]); + + $this->assertCount(3, $rows['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::lessThan('$createdAt', '1976-06-12')->toString(), + ], + ]); + + $this->assertCount(0, $rows['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::contains('actors', ['Tom Holland', 'Samuel Jackson'])->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(3, $rows['body']['total']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::contains('actors', ['Tom'])->toString(), // Full-match not like + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(0, $rows['body']['total']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::greaterThan('birthDay', '16/01/2024 12:00:00AM')->toString(), + ], + ]); + + $this->assertEquals(400, $rows['headers']['status-code']); + $this->assertEquals('Invalid query: Query value is invalid for attribute "birthDay"', $rows['body']['message']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::greaterThan('birthDay', '1960-01-01 10:10:10+02:30')->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals('1975-06-12T12:12:55.000+00:00', $rows['body']['rows'][0]['birthDay']); + $this->assertEquals('1975-06-12T18:12:55.000+00:00', $rows['body']['rows'][1]['birthDay']); + $this->assertCount(2, $rows['body']['rows']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::isNull('integers')->toString(), + ], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(1, $rows['body']['total']); + + /** + * Test for Failure + */ + $conditions = []; + + for ($i = 0; $i < APP_DATABASE_QUERY_MAX_VALUES + 1; $i++) { + $conditions[] = $i; + } + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('releaseYear', $conditions)->toString(), + ], + ]); + $this->assertEquals(400, $rows['headers']['status-code']); + $this->assertEquals('Invalid query: Query on attribute has greater than '.APP_DATABASE_QUERY_MAX_VALUES.' values: releaseYear', $rows['body']['message']); + + $value = ''; + + for ($i = 0; $i < 101; $i++) { + $value .= "[" . $i . "] Too long title to cross 2k chars query limit "; + } + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::search('title', $value)->toString(), + ], + ]); + + // Todo: Not sure what to do we with Query length Test VS old? JSON validator will fails if query string will be truncated? + //$this->assertEquals(400, $rows['headers']['status-code']); + + // Todo: Disabled for CL - Uncomment after ProxyDatabase cleanup for find method + // $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + // 'content-type' => 'application/json', + // 'x-appwrite-project' => $this->getProject()['$id'], + // ], $this->getHeaders()), [ + // 'queries' => [ + // Query::search('actors', 'Tom')->toString(), + // ], + // ]); + // $this->assertEquals(400, $rows['headers']['status-code']); + // $this->assertEquals('Invalid query: Cannot query search on attribute "actors" because it is an array.', $rows['body']['message']); + + return []; + } + + /** + * @depends testCreateDocument + */ + public function testUpdateDocument(array $data): array + { + $databaseId = $data['databaseId']; + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Thor: Ragnaroc', + 'releaseYear' => 2017, + 'birthDay' => '1976-06-12 14:12:55', + 'actors' => [], + '$createdAt' => 5 // Should be ignored + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], + ]); + + $id = $row['body']['$id']; + + $this->assertEquals(201, $row['headers']['status-code']); + $this->assertEquals($data['moviesId'], $row['body']['$tableId']); + $this->assertArrayNotHasKey('$table', $row['body']); + $this->assertEquals($databaseId, $row['body']['$databaseId']); + $this->assertEquals($row['body']['title'], 'Thor: Ragnaroc'); + $this->assertEquals($row['body']['releaseYear'], 2017); + $dateValidator = new DatetimeValidator(); + $this->assertEquals(true, $dateValidator->isValid($row['body']['$createdAt'])); + $this->assertEquals(true, $dateValidator->isValid($row['body']['birthDay'])); + $this->assertContains(Permission::read(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); + $this->assertContains(Permission::update(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); + $this->assertContains(Permission::delete(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); + + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ]); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($row['body']['$id'], $id); + $this->assertEquals($data['moviesId'], $row['body']['$tableId']); + $this->assertArrayNotHasKey('$table', $row['body']); + $this->assertEquals($databaseId, $row['body']['$databaseId']); + $this->assertEquals($row['body']['title'], 'Thor: Ragnarok'); + $this->assertEquals($row['body']['releaseYear'], 2017); + $this->assertContains(Permission::read(Role::users()), $row['body']['$permissions']); + $this->assertContains(Permission::update(Role::users()), $row['body']['$permissions']); + $this->assertContains(Permission::delete(Role::users()), $row['body']['$permissions']); + + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $id = $row['body']['$id']; + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($data['moviesId'], $row['body']['$tableId']); + $this->assertArrayNotHasKey('$table', $row['body']); + $this->assertEquals($databaseId, $row['body']['$databaseId']); + $this->assertEquals($row['body']['title'], 'Thor: Ragnarok'); + $this->assertEquals($row['body']['releaseYear'], 2017); + + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-timestamp' => DateTime::formatTz(DateTime::now()), + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + /** + * Test for failure + */ + + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-timestamp' => 'invalid', + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + $this->assertEquals('Invalid X-Appwrite-Timestamp header value', $response['body']['message']); + $this->assertEquals(Exception::GENERAL_ARGUMENT_INVALID, $response['body']['type']); + + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-timestamp' => DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -1000)), + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + ], + ]); + + $this->assertEquals(409, $response['headers']['status-code']); + $this->assertEquals('Remote row is newer than local.', $response['body']['message']); + $this->assertEquals(Exception::ROW_UPDATE_CONFLICT, $response['body']['type']); + + return []; + } + + /** + * @depends testCreateDocument + */ + public function testDeleteDocument(array $data): array + { + $databaseId = $data['databaseId']; + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2017, + 'birthDay' => '1975-06-12 14:12:55', + 'actors' => [], + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + $id = $row['body']['$id']; + + $this->assertEquals(201, $row['headers']['status-code']); + + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + + $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(204, $row['headers']['status-code']); + + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(404, $row['headers']['status-code']); + + return $data; + } + + public function testInvalidDocumentStructure() + { + $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' => 'InvalidDocumentDatabase', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('InvalidDocumentDatabase', $database['body']['name']); + + $databaseId = $database['body']['$id']; + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'invalidDocumentStructure', + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + $this->assertEquals('invalidDocumentStructure', $table['body']['name']); + + $tableId = $table['body']['$id']; + + $email = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'email', + 'required' => false, + ]); + + $enum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'enum', + 'elements' => ['yes', 'no', 'maybe'], + 'required' => false, + ]); + + $ip = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'ip', + 'required' => false, + ]); + + $url = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'url', + 'size' => 256, + 'required' => false, + ]); + + $range = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'range', + 'required' => false, + 'min' => 1, + 'max' => 10, + ]); + + // TODO@kodumbeats min and max are rounded in error message + $floatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'floatRange', + 'required' => false, + 'min' => 1.1, + 'max' => 1.4, + ]); + + $probability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'probability', + 'required' => false, + 'default' => 0, + 'min' => 0, + 'max' => 1, + ]); + + $upperBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'upperBound', + 'required' => false, + 'max' => 10, + ]); + + $lowerBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'lowerBound', + 'required' => false, + 'min' => 5, + ]); + + /** + * Test for failure + */ + + $invalidRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'invalidRange', + 'required' => false, + 'min' => 4, + 'max' => 3, + ]); + + $defaultArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'defaultArray', + 'required' => false, + 'default' => 42, + 'array' => true, + ]); + + $defaultRequired = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'attributeId' => ID::custom('defaultRequired'), + 'required' => true, + 'default' => 12 + ]); + + $enumDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'attributeId' => ID::custom('enumDefault'), + 'elements' => ['north', 'west'], + 'default' => 'south' + ]); + + $enumDefaultStrict = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'attributeId' => ID::custom('enumDefault'), + 'elements' => ['north', 'west'], + 'default' => 'NORTH' + ]); + + $goodDatetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'birthDay', + 'required' => false, + 'default' => null + ]); + + $datetimeDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'badBirthDay', + 'required' => false, + 'default' => 'bad' + ]); + + $this->assertEquals(202, $email['headers']['status-code']); + $this->assertEquals(202, $ip['headers']['status-code']); + $this->assertEquals(202, $url['headers']['status-code']); + $this->assertEquals(202, $range['headers']['status-code']); + $this->assertEquals(202, $floatRange['headers']['status-code']); + $this->assertEquals(202, $probability['headers']['status-code']); + $this->assertEquals(202, $upperBound['headers']['status-code']); + $this->assertEquals(202, $lowerBound['headers']['status-code']); + $this->assertEquals(202, $enum['headers']['status-code']); + $this->assertEquals(202, $goodDatetime['headers']['status-code']); + $this->assertEquals(400, $invalidRange['headers']['status-code']); + $this->assertEquals(400, $defaultArray['headers']['status-code']); + $this->assertEquals(400, $defaultRequired['headers']['status-code']); + $this->assertEquals(400, $enumDefault['headers']['status-code']); + $this->assertEquals(400, $enumDefaultStrict['headers']['status-code']); + $this->assertEquals('Minimum value must be lesser than maximum value', $invalidRange['body']['message']); + $this->assertEquals('Cannot set default value for array columns', $defaultArray['body']['message']); + $this->assertEquals(400, $datetimeDefault['headers']['status-code']); + // wait for worker to add attributes + sleep(3); + + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), []); + + $this->assertCount(10, $table['body']['columns']); + + /** + * Test for successful validation + */ + + $goodEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'email' => 'user@example.com', + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $goodEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'enum' => 'yes', + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $goodIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'ip' => '1.1.1.1', + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $goodUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'url' => 'http://www.example.com', + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $goodRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'range' => 3, + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $goodFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'floatRange' => 1.4, + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $goodProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'probability' => 0.99999, + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $notTooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'upperBound' => 8, + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $notTooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'lowerBound' => 8, + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $this->assertEquals(201, $goodEmail['headers']['status-code']); + $this->assertEquals(201, $goodEnum['headers']['status-code']); + $this->assertEquals(201, $goodIp['headers']['status-code']); + $this->assertEquals(201, $goodUrl['headers']['status-code']); + $this->assertEquals(201, $goodRange['headers']['status-code']); + $this->assertEquals(201, $goodFloatRange['headers']['status-code']); + $this->assertEquals(201, $goodProbability['headers']['status-code']); + $this->assertEquals(201, $notTooHigh['headers']['status-code']); + $this->assertEquals(201, $notTooLow['headers']['status-code']); + + /* + * Test that custom validators reject documents + */ + + $badEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'email' => 'user@@example.com', + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'enum' => 'badEnum', + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $badIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'ip' => '1.1.1.1.1', + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $badUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'url' => 'example...com', + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $badRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'range' => 11, + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $badFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'floatRange' => 2.5, + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $badProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'probability' => 1.1, + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $tooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'upperBound' => 11, + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $tooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'lowerBound' => 3, + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $badTime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => 'unique()', + 'data' => [ + 'birthDay' => '2020-10-10 27:30:10+01:00', + ], + 'read' => ['user:' . $this->getUser()['$id']], + 'write' => ['user:' . $this->getUser()['$id']], + ]); + + $this->assertEquals(400, $badEmail['headers']['status-code']); + $this->assertEquals(400, $badEnum['headers']['status-code']); + $this->assertEquals(400, $badIp['headers']['status-code']); + $this->assertEquals(400, $badUrl['headers']['status-code']); + $this->assertEquals(400, $badRange['headers']['status-code']); + $this->assertEquals(400, $badFloatRange['headers']['status-code']); + $this->assertEquals(400, $badProbability['headers']['status-code']); + $this->assertEquals(400, $tooHigh['headers']['status-code']); + $this->assertEquals(400, $tooLow['headers']['status-code']); + $this->assertEquals(400, $badTime['headers']['status-code']); + $this->assertEquals('Invalid document structure: Attribute "email" has invalid format. Value must be a valid email address', $badEmail['body']['message']); + $this->assertEquals('Invalid document structure: Attribute "enum" has invalid format. Value must be one of (yes, no, maybe)', $badEnum['body']['message']); + $this->assertEquals('Invalid document structure: Attribute "ip" has invalid format. Value must be a valid IP address', $badIp['body']['message']); + $this->assertEquals('Invalid document structure: Attribute "url" has invalid format. Value must be a valid URL', $badUrl['body']['message']); + $this->assertEquals('Invalid document structure: Attribute "range" has invalid format. Value must be a valid range between 1 and 10', $badRange['body']['message']); + $this->assertEquals('Invalid document structure: Attribute "floatRange" has invalid format. Value must be a valid range between 1 and 1', $badFloatRange['body']['message']); + $this->assertEquals('Invalid document structure: Attribute "probability" has invalid format. Value must be a valid range between 0 and 1', $badProbability['body']['message']); + $this->assertEquals('Invalid document structure: Attribute "upperBound" has invalid format. Value must be a valid range between -9,223,372,036,854,775,808 and 10', $tooHigh['body']['message']); + $this->assertEquals('Invalid document structure: Attribute "lowerBound" has invalid format. Value must be a valid range between 5 and 9,223,372,036,854,775,807', $tooLow['body']['message']); + } + + /** + * @depends testDeleteDocument + */ + public function testDefaultPermissions(array $data): array + { + $databaseId = $data['databaseId']; + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Captain America', + 'releaseYear' => 1944, + 'actors' => [], + ], + ]); + + $id = $row['body']['$id']; + + $this->assertEquals(201, $row['headers']['status-code']); + $this->assertEquals($row['body']['title'], 'Captain America'); + $this->assertEquals($row['body']['releaseYear'], 1944); + $this->assertIsArray($row['body']['$permissions']); + + if ($this->getSide() == 'client') { + $this->assertCount(3, $row['body']['$permissions']); + $this->assertContains(Permission::read(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); + $this->assertContains(Permission::update(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); + $this->assertContains(Permission::delete(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); + } + + if ($this->getSide() == 'server') { + $this->assertCount(0, $row['body']['$permissions']); + $this->assertEquals([], $row['body']['$permissions']); + } + + // Updated Permissions + + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Captain America 2', + 'releaseYear' => 1945, + 'actors' => [], + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])) + ], + ]); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($row['body']['title'], 'Captain America 2'); + $this->assertEquals($row['body']['releaseYear'], 1945); + + // This differs from the old permissions model because we don't inherit + // existing document permissions on update, unless none were supplied, + // so that specific types can be removed if wanted. + $this->assertCount(2, $row['body']['$permissions']); + $this->assertEquals([ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + ], $row['body']['$permissions']); + + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($row['body']['title'], 'Captain America 2'); + $this->assertEquals($row['body']['releaseYear'], 1945); + + $this->assertCount(2, $row['body']['$permissions']); + $this->assertEquals([ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + ], $row['body']['$permissions']); + + // Reset Permissions + + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Captain America 3', + 'releaseYear' => 1946, + 'actors' => [], + ], + 'permissions' => [], + ]); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($row['body']['title'], 'Captain America 3'); + $this->assertEquals($row['body']['releaseYear'], 1946); + $this->assertCount(0, $row['body']['$permissions']); + $this->assertEquals([], $row['body']['$permissions']); + + // Check client side can no longer read the document. + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + switch ($this->getSide()) { + case 'client': + $this->assertEquals(404, $row['headers']['status-code']); + break; + case 'server': + $this->assertEquals(200, $row['headers']['status-code']); + break; + } + + return $data; + } + + public function testEnforceCollectionAndDocumentPermissions(): void + { + $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' => 'EnforceCollectionAndDocumentPermissions', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('EnforceCollectionAndDocumentPermissions', $database['body']['name']); + + $databaseId = $database['body']['$id']; + $user = $this->getUser()['$id']; + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'enforceCollectionAndDocumentPermissions', + 'documentSecurity' => true, + 'permissions' => [ + Permission::read(Role::user($user)), + Permission::create(Role::user($user)), + Permission::update(Role::user($user)), + Permission::delete(Role::user($user)), + ], + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + $this->assertEquals($table['body']['name'], 'enforceCollectionAndDocumentPermissions'); + $this->assertEquals($table['body']['documentSecurity'], true); + + $tableId = $table['body']['$id']; + + sleep(2); + + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'attribute', + 'size' => 64, + 'required' => true, + ]); + + $this->assertEquals(202, $attribute['headers']['status-code'], 202); + $this->assertEquals('attribute', $attribute['body']['key']); + + // wait for db to add attribute + sleep(2); + + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'key_attribute', + 'type' => 'key', + 'columns' => [$attribute['body']['key']], + ]); + + $this->assertEquals(202, $index['headers']['status-code']); + $this->assertEquals('key_attribute', $index['body']['key']); + + // wait for db to add attribute + sleep(2); + + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'attribute' => 'one', + ], + 'permissions' => [ + Permission::read(Role::user($user)), + Permission::update(Role::user($user)), + Permission::delete(Role::user($user)), + ] + ]); + + $this->assertEquals(201, $row1['headers']['status-code']); + + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'attribute' => 'one', + ], + 'permissions' => [ + Permission::update(Role::user($user)), + Permission::delete(Role::user($user)), + ] + ]); + + $this->assertEquals(201, $row2['headers']['status-code']); + + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'rowId' => ID::unique(), + 'data' => [ + 'attribute' => 'one', + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom('other'))), + Permission::update(Role::user(ID::custom('other'))), + ], + ]); + + $this->assertEquals(201, $row3['headers']['status-code']); + + $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + // Current user has read permission on the collection so can get any document + $this->assertEquals(3, $rowsUser1['body']['total']); + $this->assertCount(3, $rowsUser1['body']['rows']); + + $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + // Current user has read permission on the collection so can get any document + $this->assertEquals(200, $row3GetWithCollectionRead['headers']['status-code']); + + $email = uniqid() . 'user@localhost.test'; + $password = 'password'; + $name = 'User Name'; + $this->client->call(Client::METHOD_POST, '/account', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'userId' => ID::custom('other'), + 'email' => $email, + 'password' => $password, + 'name' => $name, + ]); + $session2 = $this->client->call(Client::METHOD_POST, '/account/sessions/email', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'email' => $email, + 'password' => $password, + ]); + $session2 = $session2['cookies']['a_session_' . $this->getProject()['$id']]; + + $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, + ]); + + // Current user has no collection permissions but has read permission for this document + $this->assertEquals(200, $row3GetWithDocumentRead['headers']['status-code']); + + $row2GetFailure = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row2['body']['$id'], [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, + ]); + + // Current user has no collection or document permissions for this document + $this->assertEquals(404, $row2GetFailure['headers']['status-code']); + + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, + ]); + + // Current user has no collection permissions but has read permission for one document + $this->assertEquals(1, $rowsUser2['body']['total']); + $this->assertCount(1, $rowsUser2['body']['rows']); + } + + public function testEnforceCollectionPermissions() + { + $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' => 'EnforceCollectionPermissions', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('EnforceCollectionPermissions', $database['body']['name']); + + $databaseId = $database['body']['$id']; + $user = $this->getUser()['$id']; + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'enforceCollectionPermissions', + 'permissions' => [ + Permission::read(Role::user($user)), + Permission::create(Role::user($user)), + Permission::update(Role::user($user)), + Permission::delete(Role::user($user)), + ], + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + $this->assertEquals($table['body']['name'], 'enforceCollectionPermissions'); + $this->assertEquals($table['body']['documentSecurity'], false); + + $tableId = $table['body']['$id']; + + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'attribute', + 'size' => 64, + 'required' => true, + ]); + + $this->assertEquals(202, $attribute['headers']['status-code'], 202); + $this->assertEquals('attribute', $attribute['body']['key']); + + \sleep(2); + + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'key_attribute', + 'type' => 'key', + 'columns' => [$attribute['body']['key']], + ]); + + $this->assertEquals(202, $index['headers']['status-code']); + $this->assertEquals('key_attribute', $index['body']['key']); + + \sleep(2); + + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'attribute' => 'one', + ], + 'permissions' => [ + Permission::read(Role::user($user)), + Permission::update(Role::user($user)), + Permission::delete(Role::user($user)), + ] + ]); + + $this->assertEquals(201, $row1['headers']['status-code']); + + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'attribute' => 'one', + ], + 'permissions' => [ + Permission::update(Role::user($user)), + Permission::delete(Role::user($user)), + ] + ]); + + $this->assertEquals(201, $row2['headers']['status-code']); + + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'rowId' => ID::unique(), + 'data' => [ + 'attribute' => 'one', + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom('other2'))), + Permission::update(Role::user(ID::custom('other2'))), + ], + ]); + + $this->assertEquals(201, $row3['headers']['status-code']); + + $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + // Current user has read permission on the collection so can get any document + $this->assertEquals(3, $rowsUser1['body']['total']); + $this->assertCount(3, $rowsUser1['body']['rows']); + + $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + // Current user has read permission on the collection so can get any document + $this->assertEquals(200, $row3GetWithCollectionRead['headers']['status-code']); + + $email = uniqid() . 'user2@localhost.test'; + $password = 'password'; + $name = 'User Name'; + $this->client->call(Client::METHOD_POST, '/account', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'userId' => ID::custom('other2'), + 'email' => $email, + 'password' => $password, + 'name' => $name, + ]); + $session2 = $this->client->call(Client::METHOD_POST, '/account/sessions/email', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'email' => $email, + 'password' => $password, + ]); + $session2 = $session2['cookies']['a_session_' . $this->getProject()['$id']]; + + $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, + ]); + + // other2 has no collection permissions and document permissions are disabled + $this->assertEquals(404, $row3GetWithDocumentRead['headers']['status-code']); + + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, + ]); + + // other2 has no collection permissions and document permissions are disabled + $this->assertEquals(401, $rowsUser2['headers']['status-code']); + + // Enable document permissions + $table = $this->client->call(CLient::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $tableId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'name' => $table['body']['name'], + 'documentSecurity' => true, + ]); + + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, + ]); + + // Current user has no collection permissions read access to one document + $this->assertEquals(1, $rowsUser2['body']['total']); + $this->assertCount(1, $rowsUser2['body']['rows']); + } + + /** + * @depends testDefaultPermissions + */ + public function testUniqueIndexDuplicate(array $data): array + { + $databaseId = $data['databaseId']; + $uniqueIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'unique_title', + 'type' => 'unique', + 'columns' => ['title'], + ]); + + $this->assertEquals(202, $uniqueIndex['headers']['status-code']); + + sleep(2); + + // test for failure + $duplicate = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Captain America', + 'releaseYear' => 1944, + 'actors' => [ + 'Chris Evans', + 'Samuel Jackson', + ] + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $this->assertEquals(409, $duplicate['headers']['status-code']); + + // Test for exception when updating document to conflict + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Captain America 5', + 'releaseYear' => 1944, + 'actors' => [ + 'Chris Evans', + 'Samuel Jackson', + ] + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $this->assertEquals(201, $row['headers']['status-code']); + + // Test for exception when updating document to conflict + $duplicate = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $row['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Captain America', + 'releaseYear' => 1944, + 'actors' => [ + 'Chris Evans', + 'Samuel Jackson', + ] + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $this->assertEquals(409, $duplicate['headers']['status-code']); + + return $data; + } + + /** + * @depends testUniqueIndexDuplicate + */ + public function testPersistantCreatedAt(array $data): array + { + $headers = $this->getSide() === 'client' ? array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()) : [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]; + + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows', $headers, [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Creation Date Test', + 'releaseYear' => 2000 + ] + ]); + + $this->assertEquals($row['body']['title'], 'Creation Date Test'); + + $rowId = $row['body']['$id']; + $createdAt = $row['body']['$createdAt']; + $updatedAt = $row['body']['$updatedAt']; + + \sleep(1); + + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ + 'data' => [ + 'title' => 'Updated Date Test', + ] + ]); + + $updatedAtSecond = $row['body']['$updatedAt']; + + $this->assertEquals($row['body']['title'], 'Updated Date Test'); + $this->assertEquals($row['body']['$createdAt'], $createdAt); + $this->assertNotEquals($row['body']['$updatedAt'], $updatedAt); + + \sleep(1); + + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ + 'data' => [ + 'title' => 'Again Updated Date Test', + '$createdAt' => '2022-08-01 13:09:23.040', // $createdAt is not updatable + '$updatedAt' => '2022-08-01 13:09:23.050' // system will update it not api + ] + ]); + + $this->assertEquals($row['body']['title'], 'Again Updated Date Test'); + $this->assertEquals($row['body']['$createdAt'], $createdAt); + $this->assertNotEquals($row['body']['$createdAt'], '2022-08-01 13:09:23.040'); + $this->assertNotEquals($row['body']['$updatedAt'], $updatedAt); + $this->assertNotEquals($row['body']['$updatedAt'], $updatedAtSecond); + $this->assertNotEquals($row['body']['$updatedAt'], '2022-08-01 13:09:23.050'); + + return $data; + } + + public function testUpdatePermissionsWithEmptyPayload(): array + { + // 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' => 'Empty Permissions', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + + $databaseId = $database['body']['$id']; + + // Create collection + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Movies', + 'permissions' => [ + Permission::create(Role::user(ID::custom($this->getUser()['$id']))), + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $movies['headers']['status-code']); + $this->assertEquals($movies['body']['name'], 'Movies'); + + $moviesId = $movies['body']['$id']; + + // create attribute + $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + + $this->assertEquals(202, $title['headers']['status-code']); + + // wait for database worker to create attributes + sleep(2); + + // add document + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Captain America', + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $id = $row['body']['$id']; + + $this->assertEquals(201, $row['headers']['status-code']); + $this->assertCount(3, $row['body']['$permissions']); + $this->assertContains(Permission::read(Role::any()), $row['body']['$permissions']); + $this->assertContains(Permission::update(Role::any()), $row['body']['$permissions']); + $this->assertContains(Permission::delete(Role::any()), $row['body']['$permissions']); + + // Send only read permission + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'permissions' => [ + Permission::read(Role::user(ID::custom($this->getUser()['$id']))), + ] + ]); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertCount(1, $row['body']['$permissions']); + + // Send only mutation permissions + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'permissions' => [ + Permission::update(Role::user(ID::custom($this->getUser()['$id']))), + Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), + ], + ]); + + if ($this->getSide() == 'server') { + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertCount(2, $row['body']['$permissions']); + $this->assertContains(Permission::update(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); + $this->assertContains(Permission::delete(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); + } + + // remove collection + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $moviesId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + return []; + } + + /** + * @depends testCreateDatabase + */ + public function testAttributeBooleanDefault(array $data): void + { + $databaseId = $data['databaseId']; + + /** + * Test for SUCCESS + */ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Boolean' + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + + $tableId = $table['body']['$id']; + + $true = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'true', + 'required' => false, + 'default' => true + ]); + + $this->assertEquals(202, $true['headers']['status-code']); + + $false = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'false', + 'required' => false, + 'default' => false + ]); + + $this->assertEquals(202, $false['headers']['status-code']); + } + + /** + * @depends testCreateDatabase + */ + public function testOneToOneRelationship(array $data): array + { + $databaseId = $data['databaseId']; + + $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => 'person', + 'name' => 'person', + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + Permission::create(Role::user($this->getUser()['$id'])), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $person['headers']['status-code']); + + $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => 'library', + 'name' => 'library', + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::create(Role::user($this->getUser()['$id'])), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $library['headers']['status-code']); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'fullName', + 'size' => 255, + 'required' => false, + ]); + + sleep(1); // Wait for worker + + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => 'library', + 'type' => Database::RELATION_ONE_TO_ONE, + 'key' => 'library', + 'twoWay' => true, + 'onDelete' => Database::RELATION_MUTATE_CASCADE, + ]); + + sleep(1); // Wait for worker + + $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'libraryName', + 'size' => 255, + 'required' => true, + ]); + + sleep(1); // Wait for worker + + $this->assertEquals(202, $libraryName['headers']['status-code']); + $this->assertEquals(202, $relation['headers']['status-code']); + $this->assertEquals('library', $relation['body']['key']); + $this->assertEquals('relationship', $relation['body']['type']); + $this->assertEquals('processing', $relation['body']['status']); + + $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $columns['headers']['status-code']); + $this->assertEquals(2, $columns['body']['total']); + $columns = $columns['body']['columns']; + $this->assertEquals('library', $columns[1]['relatedTable']); + $this->assertEquals('oneToOne', $columns[1]['relationType']); + $this->assertEquals(true, $columns[1]['twoWay']); + $this->assertEquals('person', $columns[1]['twoWayKey']); + $this->assertEquals(Database::RELATION_MUTATE_CASCADE, $columns[1]['onDelete']); + + $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$person['body']['$id']}/columns/library", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $attribute['headers']['status-code']); + $this->assertEquals('available', $attribute['body']['status']); + $this->assertEquals('library', $attribute['body']['key']); + $this->assertEquals('relationship', $attribute['body']['type']); + $this->assertEquals(false, $attribute['body']['required']); + $this->assertEquals(false, $attribute['body']['array']); + $this->assertEquals('oneToOne', $attribute['body']['relationType']); + $this->assertEquals(true, $attribute['body']['twoWay']); + $this->assertEquals('person', $attribute['body']['twoWayKey']); + $this->assertEquals(Database::RELATION_MUTATE_CASCADE, $attribute['body']['onDelete']); + + $person1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'library' => [ + '$id' => 'library1', + '$permissions' => [ + Permission::read(Role::any()), + ], + 'libraryName' => 'Library 1', + ], + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + $this->assertEquals('Library 1', $person1['body']['library']['libraryName']); + + // Create without nested ID + $person2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'library' => [ + 'libraryName' => 'Library 2', + ], + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + $this->assertEquals('Library 2', $person2['body']['library']['libraryName']); + + // Ensure IDs were set and internal IDs removed + $this->assertEquals($databaseId, $person1['body']['$databaseId']); + $this->assertEquals($databaseId, $person1['body']['library']['$databaseId']); + + $this->assertEquals($person['body']['$id'], $person1['body']['$tableId']); + $this->assertEquals($library['body']['$id'], $person1['body']['library']['$tableId']); + + $this->assertArrayNotHasKey('$table', $person1['body']); + $this->assertArrayNotHasKey('$table', $person1['body']['library']); + $this->assertArrayNotHasKey('$internalId', $person1['body']); + $this->assertArrayNotHasKey('$internalId', $person1['body']['library']); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['fullName', 'library.*'])->toString(), + Query::equal('library', ['library1'])->toString(), + ], + ]); + + $this->assertEquals(1, $rows['body']['total']); + $this->assertEquals('Library 1', $rows['body']['rows'][0]['library']['libraryName']); + $this->assertArrayHasKey('fullName', $rows['body']['rows'][0]); + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('library.libraryName', ['Library 1'])->toString(), + ], + ]); + + $this->assertEquals(400, $rows['headers']['status-code']); + $this->assertEquals('Invalid query: Cannot query nested attribute on: library', $rows['body']['message']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/library', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + sleep(2); + + $this->assertEquals(204, $response['headers']['status-code']); + + $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$person['body']['$id']}/columns/library", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(404, $attribute['headers']['status-code']); + + $person1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/' . $person1['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertArrayNotHasKey('library', $person1['body']); + + //Test Deletion of related twoKey + $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $columns['headers']['status-code']); + $this->assertEquals(1, $columns['body']['total']); + $this->assertEquals('libraryName', $columns['body']['columns'][0]['key']); + + return [ + 'databaseId' => $databaseId, + 'personCollection' => $person['body']['$id'], + 'libraryCollection' => $library['body']['$id'], + ]; + } + + /** + * @depends testOneToOneRelationship + */ + public function testOneToManyRelationship(array $data): array + { + $databaseId = $data['databaseId']; + $personCollection = $data['personCollection']; + $libraryCollection = $data['libraryCollection']; + + // One person can own several libraries + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $personCollection . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => 'library', + 'type' => Database::RELATION_ONE_TO_MANY, + 'twoWay' => true, + 'key' => 'libraries', + 'twoWayKey' => 'person_one_to_many', + ]); + + sleep(1); + + $libraryAttributesResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $libraryCollection . '/columns', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertIsArray($libraryAttributesResponse['body']['columns']); + $this->assertEquals(2, $libraryAttributesResponse['body']['total']); + $this->assertEquals('person_one_to_many', $libraryAttributesResponse['body']['columns'][1]['key']); + + $libraryCollectionResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $libraryCollection, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertIsArray($libraryCollectionResponse['body']['columns']); + $this->assertCount(2, $libraryCollectionResponse['body']['columns']); + + $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$personCollection}/columns/libraries", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $attribute['headers']['status-code']); + $this->assertEquals('available', $attribute['body']['status']); + $this->assertEquals('libraries', $attribute['body']['key']); + $this->assertEquals('relationship', $attribute['body']['type']); + $this->assertEquals(false, $attribute['body']['required']); + $this->assertEquals(false, $attribute['body']['array']); + $this->assertEquals('oneToMany', $attribute['body']['relationType']); + $this->assertEquals(true, $attribute['body']['twoWay']); + $this->assertEquals('person_one_to_many', $attribute['body']['twoWayKey']); + $this->assertEquals('restrict', $attribute['body']['onDelete']); + + $person2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $personCollection . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => 'person10', + 'data' => [ + 'fullName' => 'Stevie Wonder', + 'libraries' => [ + [ + '$id' => 'library10', + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'libraryName' => 'Library 10', + ], + [ + '$id' => 'library11', + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'libraryName' => 'Library 11', + ] + ], + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ] + ]); + + $this->assertEquals(201, $person2['headers']['status-code']); + $this->assertArrayHasKey('libraries', $person2['body']); + $this->assertEquals(2, count($person2['body']['libraries'])); + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $personCollection . '/rows/' . $person2['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertArrayNotHasKey('$table', $response['body']); + $this->assertArrayHasKey('libraries', $response['body']); + $this->assertEquals(2, count($response['body']['libraries'])); + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $libraryCollection . '/rows/library11', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertArrayHasKey('person_one_to_many', $response['body']); + $this->assertEquals('person10', $response['body']['person_one_to_many']['$id']); + + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $personCollection . '/columns/libraries/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'onDelete' => Database::RELATION_MUTATE_CASCADE, + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$personCollection}/columns/libraries", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $attribute['headers']['status-code']); + $this->assertEquals('available', $attribute['body']['status']); + $this->assertEquals('libraries', $attribute['body']['key']); + $this->assertEquals('relationship', $attribute['body']['type']); + $this->assertEquals(false, $attribute['body']['required']); + $this->assertEquals(false, $attribute['body']['array']); + $this->assertEquals('oneToMany', $attribute['body']['relationType']); + $this->assertEquals(true, $attribute['body']['twoWay']); + $this->assertEquals(Database::RELATION_MUTATE_CASCADE, $attribute['body']['onDelete']); + + return ['databaseId' => $databaseId, 'personCollection' => $personCollection]; + } + + /** + * @depends testCreateDatabase + */ + public function testManyToOneRelationship(array $data): array + { + $databaseId = $data['databaseId']; + + // Create album collection + $albums = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Albums', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + ], + ]); + + // Create album name attribute + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 255, + 'required' => true, + ]); + + // Create artist collection + $artists = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Artists', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + ], + ]); + + // Create artist name attribute + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $artists['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 255, + 'required' => true, + ]); + + // Create relationship + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $artists['body']['$id'], + 'type' => Database::RELATION_MANY_TO_ONE, + 'twoWay' => true, + 'key' => 'artist', + 'twoWayKey' => 'albums', + ]); + $this->assertEquals(202, $response['headers']['status-code']); + $this->assertEquals('artist', $response['body']['key']); + $this->assertEquals('relationship', $response['body']['type']); + $this->assertEquals(false, $response['body']['required']); + $this->assertEquals(false, $response['body']['array']); + $this->assertEquals('manyToOne', $response['body']['relationType']); + $this->assertEquals(true, $response['body']['twoWay']); + $this->assertEquals('albums', $response['body']['twoWayKey']); + $this->assertEquals('restrict', $response['body']['onDelete']); + + sleep(1); // Wait for worker + + $permissions = [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ]; + + // Create album + $album = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => 'album1', + 'permissions' => $permissions, + 'data' => [ + 'name' => 'Album 1', + 'artist' => [ + '$id' => ID::unique(), + 'name' => 'Artist 1', + ], + ], + ]); + + $this->assertEquals(201, $album['headers']['status-code']); + $this->assertEquals('album1', $album['body']['$id']); + $this->assertEquals('Album 1', $album['body']['name']); + $this->assertEquals('Artist 1', $album['body']['artist']['name']); + $this->assertEquals($permissions, $album['body']['$permissions']); + $this->assertEquals($permissions, $album['body']['artist']['$permissions']); + + $album = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/rows/album1', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $album['headers']['status-code']); + $this->assertEquals('album1', $album['body']['$id']); + $this->assertEquals('Album 1', $album['body']['name']); + $this->assertEquals('Artist 1', $album['body']['artist']['name']); + $this->assertEquals($permissions, $album['body']['$permissions']); + $this->assertEquals($permissions, $album['body']['artist']['$permissions']); + + $artist = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $artists['body']['$id'] . '/rows/' . $album['body']['artist']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $artist['headers']['status-code']); + $this->assertEquals('Artist 1', $artist['body']['name']); + $this->assertEquals($permissions, $artist['body']['$permissions']); + $this->assertEquals(1, count($artist['body']['albums'])); + $this->assertEquals('album1', $artist['body']['albums'][0]['$id']); + $this->assertEquals('Album 1', $artist['body']['albums'][0]['name']); + $this->assertEquals($permissions, $artist['body']['albums'][0]['$permissions']); + + return [ + 'databaseId' => $databaseId, + 'albumsCollection' => $albums['body']['$id'], + 'artistsCollection' => $artists['body']['$id'], + ]; + } + + /** + * @depends testCreateDatabase + */ + public function testManyToManyRelationship(array $data): array + { + $databaseId = $data['databaseId']; + + // Create sports collection + $sports = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Sports', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + ], + ]); + + // Create sport name attribute + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 255, + 'required' => true, + ]); + + // Create player collection + $players = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Players', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + ], + ]); + + // Create player name attribute + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $players['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 255, + 'required' => true, + ]); + + // Create relationship + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $players['body']['$id'], + 'type' => Database::RELATION_MANY_TO_MANY, + 'twoWay' => true, + 'key' => 'players', + 'twoWayKey' => 'sports', + 'onDelete' => Database::RELATION_MUTATE_SET_NULL, + ]); + + $this->assertEquals(202, $response['headers']['status-code']); + $this->assertEquals('players', $response['body']['key']); + $this->assertEquals('relationship', $response['body']['type']); + $this->assertEquals(false, $response['body']['required']); + $this->assertEquals(false, $response['body']['array']); + $this->assertEquals('manyToMany', $response['body']['relationType']); + $this->assertEquals(true, $response['body']['twoWay']); + $this->assertEquals('sports', $response['body']['twoWayKey']); + $this->assertEquals('setNull', $response['body']['onDelete']); + + sleep(1); // Wait for worker + + $permissions = [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + ]; + + // Create sport + $sport = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => 'sport1', + 'permissions' => $permissions, + 'data' => [ + 'name' => 'Sport 1', + 'players' => [ + [ + '$id' => 'player1', + 'name' => 'Player 1', + ], + [ + '$id' => 'player2', + 'name' => 'Player 2', + ] + ], + ], + ]); + + $this->assertEquals(201, $sport['headers']['status-code']); + $this->assertEquals('sport1', $sport['body']['$id']); + $this->assertEquals('Sport 1', $sport['body']['name']); + $this->assertEquals('Player 1', $sport['body']['players'][0]['name']); + $this->assertEquals('Player 2', $sport['body']['players'][1]['name']); + $this->assertEquals($permissions, $sport['body']['$permissions']); + $this->assertEquals($permissions, $sport['body']['players'][0]['$permissions']); + $this->assertEquals($permissions, $sport['body']['players'][1]['$permissions']); + + $sport = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/rows/sport1', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $sport['headers']['status-code']); + $this->assertEquals('sport1', $sport['body']['$id']); + $this->assertEquals('Sport 1', $sport['body']['name']); + $this->assertEquals('Player 1', $sport['body']['players'][0]['name']); + $this->assertEquals('Player 2', $sport['body']['players'][1]['name']); + $this->assertEquals($permissions, $sport['body']['$permissions']); + $this->assertEquals($permissions, $sport['body']['players'][0]['$permissions']); + $this->assertEquals($permissions, $sport['body']['players'][1]['$permissions']); + + $player = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $players['body']['$id'] . '/rows/' . $sport['body']['players'][0]['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $player['headers']['status-code']); + $this->assertEquals('Player 1', $player['body']['name']); + $this->assertEquals($permissions, $player['body']['$permissions']); + $this->assertEquals(1, count($player['body']['sports'])); + $this->assertEquals('sport1', $player['body']['sports'][0]['$id']); + $this->assertEquals('Sport 1', $player['body']['sports'][0]['name']); + $this->assertEquals($permissions, $player['body']['sports'][0]['$permissions']); + + return [ + 'databaseId' => $databaseId, + 'sportsCollection' => $sports['body']['$id'], + 'playersCollection' => $players['body']['$id'], + ]; + } + + /** + * @depends testOneToManyRelationship + */ + public function testValidateOperators(array $data): void + { + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::isNotNull('$id')->toString(), + Query::startsWith('fullName', 'Stevie')->toString(), + Query::endsWith('fullName', 'Wonder')->toString(), + Query::between('$createdAt', '1975-12-06', '2050-12-01')->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(1, count($response['body']['rows'])); + $this->assertEquals('person10', $response['body']['rows'][0]['$id']); + $this->assertEquals('Stevie Wonder', $response['body']['rows'][0]['fullName']); + $this->assertEquals(2, count($response['body']['rows'][0]['libraries'])); + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::isNotNull('$id')->toString(), + Query::isNull('fullName')->toString(), + Query::select(['fullName'])->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(2, count($response['body']['rows'])); + $this->assertEquals(null, $response['body']['rows'][0]['fullName']); + $this->assertArrayNotHasKey("libraries", $response['body']['rows'][0]); + $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); + $this->assertArrayNotHasKey('$tableId', $response['body']['rows'][0]); + } + + /** + * @depends testOneToManyRelationship + */ + public function testSelectQueries(array $data): void + { + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('fullName', ['Stevie Wonder'])->toString(), + Query::select(['fullName'])->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertArrayNotHasKey('libraries', $response['body']['rows'][0]); + $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); + $this->assertArrayNotHasKey('$tableId', $response['body']['rows'][0]); + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['libraries.*', '$id'])->toString(), + ], + ]); + $row = $response['body']['rows'][0]; + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertArrayHasKey('libraries', $row); + $this->assertArrayNotHasKey('$databaseId', $row); + $this->assertArrayNotHasKey('$tableId', $row); + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows/' . $row['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['fullName', '$id'])->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertArrayHasKey('fullName', $response['body']); + $this->assertArrayNotHasKey('libraries', $response['body']); + } + + /** + * @throws \Utopia\Database\Exception + * @throws \Utopia\Database\Exception\Query + */ + public function testOrQueries(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Or queries' + ]); + + $this->assertNotEmpty($database['body']['$id']); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('Or queries', $database['body']['name']); + + $databaseId = $database['body']['$id']; + + // Create Collection + $presidents = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'USA Presidents', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + ], + ]); + + $this->assertEquals(201, $presidents['headers']['status-code']); + $this->assertEquals($presidents['body']['name'], 'USA Presidents'); + + // Create Attributes + $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'first_name', + 'size' => 256, + 'required' => true, + ]); + $this->assertEquals(202, $firstName['headers']['status-code']); + + $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'last_name', + 'size' => 256, + 'required' => true, + ]); + + $this->assertEquals(202, $lastName['headers']['status-code']); + + // Wait for worker + sleep(2); + + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'first_name' => 'Donald', + 'last_name' => 'Trump', + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $row1['headers']['status-code']); + + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'first_name' => 'George', + 'last_name' => 'Bush', + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + ] + ]); + $this->assertEquals(201, $row2['headers']['status-code']); + + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'first_name' => 'Joe', + 'last_name' => 'Biden', + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + ] + ]); + + $this->assertEquals(201, $row3['headers']['status-code']); + + $rows = $this->client->call( + Client::METHOD_GET, + '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), + [ + 'queries' => [ + Query::select(['first_name', 'last_name'])->toString(), + Query::or([ + Query::equal('first_name', ['Donald']), + Query::equal('last_name', ['Bush']) + ])->toString(), + Query::limit(999)->toString(), + Query::offset(0)->toString() + ], + ] + ); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertCount(2, $rows['body']['rows']); + } + + /** + * @depends testCreateDatabase + * @param array $data + * @return void + * @throws \Exception + */ + public function testUpdateWithExistingRelationships(array $data): void + { + $databaseId = $data['databaseId']; + + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Collection1', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + ], + ]); + + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Collection2', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + ], + ]); + + $table1 = $table1['body']['$id']; + $table2 = $table2['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1 . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => '49', + 'required' => true, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table2 . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => '49', + 'required' => true, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1 . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2, + 'type' => Database::RELATION_ONE_TO_MANY, + 'twoWay' => true, + 'key' => 'collection2' + ]); + + sleep(1); + + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1 . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'name' => 'Document 1', + 'collection2' => [ + [ + 'name' => 'Document 2', + ], + ], + ], + ]); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1 . '/rows/' . $row['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'data' => [ + 'name' => 'Document 1 Updated', + ], + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + } + + /** + * @depends testCreateDatabase + */ + public function testTimeout(array $data): void + { + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Slow Queries', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + ], + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + + $data = [ + '$id' => $table['body']['$id'], + 'databaseId' => $table['body']['databaseId'] + ]; + + $longtext = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'longtext', + 'size' => 100000000, + 'required' => false, + 'default' => null, + ]); + + $this->assertEquals($longtext['headers']['status-code'], 202); + + for ($i = 0; $i < 10; $i++) { + $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'longtext' => file_get_contents(__DIR__ . '../../../../../resources/longtext.txt'), + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + } + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-timeout' => 1, + ], $this->getHeaders()), [ + 'queries' => [ + Query::notEqual('longtext', 'appwrite')->toString(), + ], + ]); + + $this->assertEquals(408, $response['headers']['status-code']); + } +} diff --git a/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php new file mode 100644 index 0000000000..48707d444b --- /dev/null +++ b/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php @@ -0,0 +1,336 @@ +client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'databaseId' => ID::unique(), + 'name' => 'invalidDocumentDatabase', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('invalidDocumentDatabase', $database['body']['name']); + $this->assertTrue($database['body']['enabled']); + + $databaseId = $database['body']['$id']; + + /** + * Test for SUCCESS + */ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'tableId' => ID::unique(), + 'name' => 'Movies', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $movies['headers']['status-code']); + $this->assertEquals($movies['body']['name'], 'Movies'); + + /** + * Test when database is disabled but can still create collections + */ + $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'name' => 'invalidDocumentDatabase Updated', + 'enabled' => false, + ]); + + $this->assertFalse($database['body']['enabled']); + + $tvShows = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'tableId' => ID::unique(), + 'name' => 'TvShows', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + ]); + + /** + * Test when collection is disabled but can still modify collections + */ + $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $movies['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'name' => 'Movies', + 'enabled' => false, + ]); + + $this->assertEquals(201, $tvShows['headers']['status-code']); + $this->assertEquals($tvShows['body']['name'], 'TvShows'); + + return ['moviesId' => $movies['body']['$id'], 'databaseId' => $databaseId, 'tvShowsId' => $tvShows['body']['$id']]; + } + + /** + * @depends testCreateCollection + * @param array $data + * @throws \Exception + */ + public function testListCollection(array $data) + { + /** + * Test when database is disabled but can still call list collections + */ + $databaseId = $data['databaseId']; + + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $tables['headers']['status-code']); + $this->assertEquals(2, $tables['body']['total']); + } + + /** + * @depends testCreateCollection + * @param array $data + * @throws \Exception + */ + public function testGetCollection(array $data) + { + $databaseId = $data['databaseId']; + $moviesCollectionId = $data['moviesId']; + + /** + * Test when database and collection are disabled but can still call get collection + */ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $moviesCollectionId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $table['headers']['status-code']); + $this->assertEquals('Movies', $table['body']['name']); + $this->assertEquals($moviesCollectionId, $table['body']['$id']); + $this->assertFalse($table['body']['enabled']); + } + + /** + * @depends testCreateCollection + * @param array $data + * @throws \Exception + * @throws \Exception + */ + public function testUpdateCollection(array $data) + { + $databaseId = $data['databaseId']; + $moviesCollectionId = $data['moviesId']; + + /** + * Test When database and collection are disabled but can still call update collection + */ + $table = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $moviesCollectionId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'name' => 'Movies Updated', + 'enabled' => false + ]); + + $this->assertEquals(200, $table['headers']['status-code']); + $this->assertEquals('Movies Updated', $table['body']['name']); + $this->assertEquals($moviesCollectionId, $table['body']['$id']); + $this->assertFalse($table['body']['enabled']); + } + + /** + * @depends testCreateCollection + * @param array $data + * @throws \Exception + * @throws \Exception + */ + public function testDeleteCollection(array $data) + { + $databaseId = $data['databaseId']; + $tvShowsId = $data['tvShowsId']; + + /** + * Test when database and collection are disabled but can still call delete collection + */ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tvShowsId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(204, $response['headers']['status-code']); + $this->assertEquals($response['body'], ""); + } + + /** + * @depends testCreateCollection + */ + public function testGetDatabaseUsage(array $data) + { + $databaseId = $data['databaseId']; + /** + * Test for FAILURE + */ + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'range' => '32h' + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + /** + * Test for SUCCESS + */ + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/usage', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'range' => '24h' + ]); + + + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(15, count($response['body'])); + $this->assertEquals('24h', $response['body']['range']); + $this->assertIsNumeric($response['body']['rowsTotal']); + $this->assertIsNumeric($response['body']['tablesTotal']); + $this->assertIsArray($response['body']['tables']); + $this->assertIsArray($response['body']['rows']); + } + + + /** + * @depends testCreateCollection + */ + public function testGetCollectionUsage(array $data) + { + $databaseId = $data['databaseId']; + /** + * Test for FAILURE + */ + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/usage', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'range' => '32h' + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/randomCollectionId/usage', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'range' => '24h' + ]); + + $this->assertEquals(404, $response['headers']['status-code']); + + /** + * Test for SUCCESS + */ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/usage', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'range' => '24h' + ]); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(3, count($response['body'])); + $this->assertEquals('24h', $response['body']['range']); + $this->assertIsNumeric($response['body']['rowsTotal']); + $this->assertIsArray($response['body']['rows']); + } + + /** + * @depends testCreateCollection + * @throws \Utopia\Database\Exception\Query + */ + public function testGetCollectionLogs(array $data) + { + $databaseId = $data['databaseId']; + /** + * Test for SUCCESS + */ + $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/logs', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $logs['headers']['status-code']); + $this->assertIsArray($logs['body']['logs']); + $this->assertIsNumeric($logs['body']['total']); + + $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/logs', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [Query::limit(1)->toString()] + ]); + + $this->assertEquals(200, $logs['headers']['status-code']); + $this->assertIsArray($logs['body']['logs']); + $this->assertLessThanOrEqual(1, count($logs['body']['logs'])); + $this->assertIsNumeric($logs['body']['total']); + + $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/logs', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [Query::offset(1)->toString()] + ]); + + $this->assertEquals(200, $logs['headers']['status-code']); + $this->assertIsArray($logs['body']['logs']); + $this->assertIsNumeric($logs['body']['total']); + + $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/logs', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [Query::offset(1)->toString(), Query::limit(1)->toString()] + ]); + + $this->assertEquals(200, $logs['headers']['status-code']); + $this->assertIsArray($logs['body']['logs']); + $this->assertLessThanOrEqual(1, count($logs['body']['logs'])); + $this->assertIsNumeric($logs['body']['total']); + } +} diff --git a/tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php new file mode 100644 index 0000000000..ca8ae08ca0 --- /dev/null +++ b/tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php @@ -0,0 +1,893 @@ +client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database' + ]); + + $databaseId = $database['body']['$id']; + + // Collection aliases write to create, update, delete + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Movies', + 'documentSecurity' => true, + 'permissions' => [ + Permission::write(Role::user($this->getUser()['$id'])), + ], + ]); + + $moviesId = $movies['body']['$id']; + + $this->assertContains(Permission::create(Role::user($this->getUser()['$id'])), $movies['body']['$permissions']); + $this->assertContains(Permission::update(Role::user($this->getUser()['$id'])), $movies['body']['$permissions']); + $this->assertContains(Permission::delete(Role::user($this->getUser()['$id'])), $movies['body']['$permissions']); + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + + sleep(1); + + $this->assertEquals(202, $response['headers']['status-code']); + + // Document aliases write to update, delete + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Captain America', + ], + 'permissions' => [ + Permission::write(Role::user($this->getUser()['$id'])), + ] + ]); + + $this->assertNotContains(Permission::create(Role::user($this->getUser()['$id'])), $row1['body']['$permissions']); + $this->assertContains(Permission::update(Role::user($this->getUser()['$id'])), $row1['body']['$permissions']); + $this->assertContains(Permission::delete(Role::user($this->getUser()['$id'])), $row1['body']['$permissions']); + + /** + * Test for FAILURE + */ + + // Document does not allow create permission + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Captain America', + ], + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + ] + ]); + + $this->assertEquals(400, $row2['headers']['status-code']); + } + + public function testUpdateWithoutPermission(): array + { + // If document has been created by server and client tried to update it without adjusting permissions, permission validation should be skipped + + // As a part of preparation, we get ID of currently logged-in user + $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + $this->assertEquals(200, $response['headers']['status-code']); + + $userId = $response['body']['$id']; + + $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::custom('permissionCheckDatabase'), + 'name' => 'Test Database', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('Test Database', $database['body']['name']); + + $databaseId = $database['body']['$id']; + // Create collection + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::custom('permissionCheck'), + 'name' => 'permissionCheck', + 'permissions' => [], + 'documentSecurity' => true, + ]); + $this->assertEquals(201, $response['headers']['status-code']); + + // Add attribute to collection + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/permissionCheck/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 255, + 'required' => true, + ]); + $this->assertEquals(202, $response['headers']['status-code']); + + // Wait for database worker to finish creating attributes + sleep(2); + + // Creating document by server, give read permission to our user + some other user + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/permissionCheck/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => ID::custom('permissionCheckDocument'), + 'data' => [ + 'name' => 'AppwriteBeginner', + ], + 'permissions' => [ + Permission::read(Role::user(ID::custom('user2'))), + Permission::read(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::delete(Role::user($userId)), + ], + ]); + + $this->assertEquals(201, $response['headers']['status-code']); + + // Update document + // This is the point of this test. We should be allowed to do this action, and it should not fail on permission check + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'name' => 'AppwriteExpert', + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + // Get name of the document, should be the new one + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals("AppwriteExpert", $response['body']['name']); + + // Cleanup to prevent collision with other tests + // Delete collection + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/permissionCheck', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(204, $response['headers']['status-code']); + + + // Wait for database worker to finish deleting collection + sleep(2); + + // Make sure collection has been deleted + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/permissionCheck', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + $this->assertEquals(404, $response['headers']['status-code']); + + return []; + } + + public function testUpdateTwoWayRelationship(): void + { + + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database' + ]); + + $databaseId = $database['body']['$id']; + + + // Creating collection 1 + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'level1', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + // Creating collection 2 + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'level2', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + \sleep(2); + + // Creating two way relationship between collection 1 and collection 2 from collection 1 + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2['body']['$id'], + 'type' => 'oneToMany', + 'twoWay' => true, + 'onDelete' => 'cascade', + 'key' => $table2['body']['$id'], + 'twoWayKey' => $table1['body']['$id'] + ]); + + \sleep(3); + + // Update relation from collection 2 to on delete restrict + $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/columns/' . $table1['body']['$id'] . '/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'onDelete' => 'restrict', + ]); + + // Fetching attributes after updating relation to compare + $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'], [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $table1RelationAttribute = $table1Attributes['body']['columns'][0]; + + $this->assertEquals($relation['body']['side'], $table1RelationAttribute['side']); + $this->assertEquals($relation['body']['twoWayKey'], $table1RelationAttribute['twoWayKey']); + $this->assertEquals($relation['body']['relatedTable'], $table1RelationAttribute['relatedTable']); + $this->assertEquals('restrict', $table1RelationAttribute['onDelete']); + } + + public function testRelationshipSameTwoWayKey(): void + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Same two way key' + ]); + + $databaseId = $database['body']['$id']; + + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'c1', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'c2', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + \sleep(2); + + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2['body']['$id'], + 'type' => Database::RELATION_ONE_TO_ONE, + 'twoWay' => false, + 'onDelete' => 'cascade', + 'key' => 'attr1', + 'twoWayKey' => 'same_key' + ]); + + \sleep(2); + + $this->assertEquals(202, $relation['headers']['status-code']); + $this->assertEquals('same_key', $relation['body']['twoWayKey']); + + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2['body']['$id'], + 'type' => Database::RELATION_ONE_TO_MANY, + 'twoWay' => false, + 'onDelete' => 'cascade', + 'key' => 'attr2', + 'twoWayKey' => 'same_key' + ]); + + \sleep(2); + + $this->assertEquals(409, $relation['body']['code']); + $this->assertEquals('Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.', $relation['body']['message']); + + // twoWayKey is null TwoWayKey is default + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2['body']['$id'], + 'type' => Database::RELATION_ONE_TO_MANY, + 'twoWay' => false, + 'onDelete' => 'cascade', + 'key' => 'attr3', + ]); + + \sleep(2); + + $this->assertEquals(202, $relation['headers']['status-code']); + $this->assertArrayHasKey('twoWayKey', $relation['body']); + + // twoWayKey is null, TwoWayKey is default, second POST + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2['body']['$id'], + 'type' => Database::RELATION_ONE_TO_MANY, + 'twoWay' => false, + 'onDelete' => 'cascade', + 'key' => 'attr4', + ]); + + \sleep(2); + + $this->assertEquals('Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.', $relation['body']['message']); + $this->assertEquals(409, $relation['body']['code']); + + // RelationshipManyToMany + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2['body']['$id'], + 'type' => Database::RELATION_MANY_TO_MANY, + 'twoWay' => true, + 'onDelete' => 'setNull', + 'key' => 'songs', + 'twoWayKey' => 'playlist', + ]); + + \sleep(2); + + $this->assertEquals(202, $relation['headers']['status-code']); + $this->assertArrayHasKey('twoWayKey', $relation['body']); + + // Second RelationshipManyToMany on Same collections + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2['body']['$id'], + 'type' => Database::RELATION_MANY_TO_MANY, + 'twoWay' => true, + 'onDelete' => 'setNull', + 'key' => 'songs2', + 'twoWayKey' => 'playlist2', + ]); + + \sleep(2); + + $this->assertEquals(409, $relation['body']['code']); + $this->assertEquals('Creating more than one "manyToMany" relationship on the same table is currently not permitted.', $relation['body']['message']); + } + + public function testUpdateWithoutRelationPermission(): void + { + $userId = $this->getUser()['$id']; + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => ID::unique(), + ]); + + $databaseId = $database['body']['$id']; + + // Creating collection 1 + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::custom('collection1'), + 'name' => ID::custom('collection1'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($userId)), + Permission::read(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ]); + + // Creating collection 2 + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::custom('collection2'), + 'name' => ID::custom('collection2'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::read(Role::user($userId)), + ] + ]); + + $table3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::custom('collection3'), + 'name' => ID::custom('collection3'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($userId)), + Permission::read(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ]); + + $table4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::custom('collection4'), + 'name' => ID::custom('collection4'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::read(Role::user($userId)), + ] + ]); + + $table5 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::custom('collection5'), + 'name' => ID::custom('collection5'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($userId)), + Permission::read(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ]); + + // Creating one to one relationship from collection 1 to colletion 2 + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2['body']['$id'], + 'type' => 'oneToOne', + 'twoWay' => false, + 'onDelete' => 'setNull', + 'key' => $table2['body']['$id'] + ]); + + // Creating one to one relationship from collection 2 to colletion 3 + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table3['body']['$id'], + 'type' => 'oneToOne', + 'twoWay' => false, + 'onDelete' => 'setNull', + 'key' => $table3['body']['$id'] + ]); + + // Creating one to one relationship from collection 3 to colletion 4 + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table3['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table4['body']['$id'], + 'type' => 'oneToOne', + 'twoWay' => false, + 'onDelete' => 'setNull', + 'key' => $table4['body']['$id'] + ]); + + // Creating one to one relationship from collection 4 to colletion 5 + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table4['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table5['body']['$id'], + 'type' => 'oneToOne', + 'twoWay' => false, + 'onDelete' => 'setNull', + 'key' => $table5['body']['$id'] + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "Title", + 'size' => 100, + 'required' => false, + 'array' => false, + 'default' => null, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "Rating", + 'size' => 100, + 'required' => false, + 'array' => false, + 'default' => null, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table3['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "Rating", + 'size' => 100, + 'required' => false, + 'array' => false, + 'default' => null, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table4['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "Rating", + 'size' => 100, + 'required' => false, + 'array' => false, + 'default' => null, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table5['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "Rating", + 'size' => 100, + 'required' => false, + 'array' => false, + 'default' => null, + ]); + + \sleep(2); + // Creating parent document with a child reference to test the permissions + $parentDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => ID::custom($table1['body']['$id']), + 'data' => [ + 'Title' => 'Captain America', + $table2['body']['$id'] => [ + '$id' => ID::custom($table2['body']['$id']), + 'Rating' => '10', + $table3['body']['$id'] => [ + '$id' => ID::custom($table3['body']['$id']), + 'Rating' => '10', + $table4['body']['$id'] => [ + '$id' => ID::custom($table4['body']['$id']), + 'Rating' => '10', + $table5['body']['$id'] => [ + '$id' => ID::custom($table5['body']['$id']), + 'Rating' => '10' + ] + ] + ] + ] + ] + ]); + + $this->assertEquals(201, $parentDocument['headers']['status-code']); + // This is the point of the test. We should not need any authorization permission to update the document with same data. + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::custom($table1['body']['$id']), + 'data' => [ + 'Title' => 'Captain America', + $table2['body']['$id'] => [ + '$id' => $table2['body']['$id'], + 'Rating' => '10', + $table3['body']['$id'] => [ + '$id' => $table3['body']['$id'], + 'Rating' => '10', + $table4['body']['$id'] => [ + '$id' => $table4['body']['$id'], + 'Rating' => '10', + $table5['body']['$id'] => [ + '$id' => $table5['body']['$id'], + 'Rating' => '10' + ] + ] + ] + ] + ] + ]); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals($parentDocument['body'], $response['body']); + + // Giving update permission of collection 3 to user. + $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/collection3', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::custom('collection3'), + 'name' => ID::custom('collection3'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($userId)), + Permission::read(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ]); + + // This is the point of this test. We should be allowed to do this action, and it should not fail on permission check + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'Title' => 'Captain America', + $table2['body']['$id'] => [ + '$id' => ID::custom($table2['body']['$id']), + 'Rating' => '10', + $table3['body']['$id'] => [ + '$id' => ID::custom($table3['body']['$id']), + 'Rating' => '11', + $table4['body']['$id'] => [ + '$id' => ID::custom($table4['body']['$id']), + 'Rating' => '10', + $table5['body']['$id'] => [ + '$id' => ID::custom($table5['body']['$id']), + 'Rating' => '11' + ] + ] + ] + ] + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(11, $response['body'][$table2['body']['$id']]['collection3']['Rating']); + + // We should not be allowed to update the document as we do not have permission for collection 2. + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'Title' => 'Captain America', + $table2['body']['$id'] => [ + '$id' => ID::custom($table2['body']['$id']), + 'Rating' => '11', + $table3['body']['$id'] => null, + ] + ] + ]); + + $this->assertEquals(401, $response['headers']['status-code']); + + // We should not be allowed to update the document as we do not have permission for collection 2. + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/rows/' . $table2['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'Rating' => '11', + ] + ]); + + $this->assertEquals(401, $response['headers']['status-code']); + + // Removing update permission from collection 3. + $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/collection3', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::custom('collection3'), + 'name' => ID::custom('collection3'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($userId)), + Permission::read(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ]); + + // Giving update permission to collection 2. + $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/collection2', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::custom('collection2'), + 'name' => ID::custom('collection2'), + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::read(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ]); + + // Creating collection 3 new document + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table3['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => ID::custom('collection3Doc1'), + 'data' => [ + 'Rating' => '20' + ] + ]); + + $this->assertEquals(201, $response['headers']['status-code']); + + // We should be allowed to link a new document from collection 3 to collection 2. + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'Title' => 'Captain America', + $table2['body']['$id'] => [ + '$id' => ID::custom($table2['body']['$id']), + $table3['body']['$id'] => 'collection3Doc1', + ] + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + + // We should be allowed to link and create a new document from collection 3 to collection 2. + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'Title' => 'Captain America', + $table2['body']['$id'] => [ + '$id' => ID::custom($table2['body']['$id']), + $table3['body']['$id'] => [ + '$id' => ID::custom('collection3Doc2') + ], + ] + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + } +} diff --git a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php new file mode 100644 index 0000000000..dca8a16363 --- /dev/null +++ b/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php @@ -0,0 +1,4113 @@ +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::custom('first'), + 'name' => 'Test 1', + ]); + + $this->assertEquals(201, $test1['headers']['status-code']); + $this->assertEquals('Test 1', $test1['body']['name']); + + $test2 = $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::custom('second'), + 'name' => 'Test 2', + ]); + $this->assertEquals(201, $test2['headers']['status-code']); + $this->assertEquals('Test 2', $test2['body']['name']); + + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(2, $databases['body']['total']); + $this->assertEquals($test1['body']['$id'], $databases['body']['databases'][0]['$id']); + $this->assertEquals($test2['body']['$id'], $databases['body']['databases'][1]['$id']); + + $base = array_reverse($databases['body']['databases']); + + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::limit(1)->toString(), + ], + ]); + $this->assertEquals(200, $databases['headers']['status-code']); + $this->assertCount(1, $databases['body']['databases']); + + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::offset(1)->toString(), + ], + ]); + $this->assertEquals(200, $databases['headers']['status-code']); + $this->assertCount(1, $databases['body']['databases']); + + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('name', ['Test 1', 'Test 2'])->toString(), + ], + ]); + $this->assertEquals(200, $databases['headers']['status-code']); + $this->assertCount(2, $databases['body']['databases']); + + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('name', ['Test 2'])->toString(), + ], + ]); + $this->assertEquals(200, $databases['headers']['status-code']); + $this->assertCount(1, $databases['body']['databases']); + + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('$id', ['first'])->toString(), + ], + ]); + $this->assertEquals(200, $databases['headers']['status-code']); + $this->assertCount(1, $databases['body']['databases']); + + /** + * Test for Order + */ + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderDesc()->toString(), + ], + ]); + + $this->assertEquals(2, $databases['body']['total']); + $this->assertEquals($base[0]['$id'], $databases['body']['databases'][0]['$id']); + $this->assertEquals($base[1]['$id'], $databases['body']['databases'][1]['$id']); + + /** + * Test for After + */ + $base = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorAfter(new Document(['$id' => $base['body']['databases'][0]['$id']]))->toString(), + ], + ]); + + $this->assertCount(1, $databases['body']['databases']); + $this->assertEquals($base['body']['databases'][1]['$id'], $databases['body']['databases'][0]['$id']); + + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorAfter(new Document(['$id' => $base['body']['databases'][1]['$id']]))->toString(), + ], + ]); + + $this->assertCount(0, $databases['body']['databases']); + $this->assertEmpty($databases['body']['databases']); + + /** + * Test for Before + */ + $base = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorBefore(new Document(['$id' => $base['body']['databases'][1]['$id']]))->toString(), + ], + ]); + + $this->assertCount(1, $databases['body']['databases']); + $this->assertEquals($base['body']['databases'][0]['$id'], $databases['body']['databases'][0]['$id']); + + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorBefore(new Document(['$id' => $base['body']['databases'][0]['$id']]))->toString(), + ], + ]); + + $this->assertCount(0, $databases['body']['databases']); + $this->assertEmpty($databases['body']['databases']); + + /** + * Test for Search + */ + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'search' => 'first' + ]); + + $this->assertEquals(1, $databases['body']['total']); + $this->assertEquals('first', $databases['body']['databases'][0]['$id']); + + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'search' => 'Test' + ]); + + $this->assertEquals(2, $databases['body']['total']); + $this->assertEquals('Test 1', $databases['body']['databases'][0]['name']); + $this->assertEquals('Test 2', $databases['body']['databases'][1]['name']); + + $databases = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'search' => 'Nonexistent' + ]); + + $this->assertEquals(0, $databases['body']['total']); + + /** + * Test for FAILURE + */ + $response = $this->client->call(Client::METHOD_GET, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorAfter(new Document(['$id' => 'unknown']))->toString(), + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // This collection already exists + $response = $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'] + ]), [ + 'name' => 'Test 1', + 'databaseId' => ID::custom('first'), + ]); + + $this->assertEquals(409, $response['headers']['status-code']); + return ['databaseId' => $test1['body']['$id']]; + } + + /** + * @depends testListDatabases + */ + public function testGetDatabase(array $data): array + { + $databaseId = $data['databaseId']; + /** + * Test for SUCCESS + */ + $database = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $this->assertEquals(200, $database['headers']['status-code']); + $this->assertEquals($databaseId, $database['body']['$id']); + $this->assertEquals('Test 1', $database['body']['name']); + $this->assertEquals(true, $database['body']['enabled']); + return ['databaseId' => $database['body']['$id']]; + } + + /** + * @depends testListDatabases + */ + public function testUpdateDatabase(array $data) + { + $databaseId = $data['databaseId']; + + $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'name' => 'Test 1 Updated', + 'enabled' => false, + ]); + + $this->assertEquals(200, $database['headers']['status-code']); + $this->assertEquals('Test 1 Updated', $database['body']['name']); + $this->assertFalse($database['body']['enabled']); + + // Now update the database without the passing the enabled parameter + $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'name' => 'Test 1' + ]); + + $this->assertEquals(200, $database['headers']['status-code']); + $this->assertEquals('Test 1', $database['body']['name']); + $this->assertTrue($database['body']['enabled']); + } + + /** + * @depends testListDatabases + */ + public function testDeleteDatabase($data) + { + $databaseId = $data['databaseId']; + + $response = $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'] + ], $this->getHeaders())); + + $this->assertEquals(204, $response['headers']['status-code']); + $this->assertEquals("", $response['body']); + + // Try to get the collection and check if it has been deleted + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(404, $response['headers']['status-code']); + } + + public function testListCollections(): array + { + $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' => 'invalidDocumentDatabase', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('invalidDocumentDatabase', $database['body']['name']); + $this->assertTrue($database['body']['enabled']); + + $databaseId = $database['body']['$id']; + /** + * Test for SUCCESS + */ + $test1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'name' => 'Test 1', + 'tableId' => ID::custom('first'), + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + ]); + + $test2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'name' => 'Test 2', + 'tableId' => ID::custom('second'), + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + ]); + + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(2, $tables['body']['total']); + $this->assertEquals($test1['body']['$id'], $tables['body']['tables'][0]['$id']); + $this->assertEquals($test1['body']['enabled'], $tables['body']['tables'][0]['enabled']); + $this->assertEquals($test2['body']['$id'], $tables['body']['tables'][1]['$id']); + $this->assertEquals($test1['body']['enabled'], $tables['body']['tables'][0]['enabled']); + + $base = array_reverse($tables['body']['tables']); + + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::limit(1)->toString(), + ], + ]); + + $this->assertEquals(200, $tables['headers']['status-code']); + $this->assertCount(1, $tables['body']['tables']); + + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::offset(1)->toString(), + ], + ]); + + $this->assertEquals(200, $tables['headers']['status-code']); + $this->assertCount(1, $tables['body']['tables']); + + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('enabled', [true])->toString(), + ], + ]); + + $this->assertEquals(200, $tables['headers']['status-code']); + $this->assertCount(2, $tables['body']['tables']); + + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::equal('enabled', [false])->toString(), + ], + ]); + + $this->assertEquals(200, $tables['headers']['status-code']); + $this->assertCount(0, $tables['body']['tables']); + + /** + * Test for Order + */ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderDesc()->toString(), + ], + ]); + + $this->assertEquals(2, $tables['body']['total']); + $this->assertEquals($base[0]['$id'], $tables['body']['tables'][0]['$id']); + $this->assertEquals($base[1]['$id'], $tables['body']['tables'][1]['$id']); + + /** + * Test for After + */ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorAfter(new Document(['$id' => $base['body']['tables'][0]['$id']]))->toString(), + ], + ]); + + $this->assertCount(1, $tables['body']['tables']); + $this->assertEquals($base['body']['tables'][1]['$id'], $tables['body']['tables'][0]['$id']); + + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorAfter(new Document(['$id' => $base['body']['tables'][1]['$id']]))->toString(), + ], + ]); + + $this->assertCount(0, $tables['body']['tables']); + $this->assertEmpty($tables['body']['tables']); + + /** + * Test for Before + */ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorBefore(new Document(['$id' => $base['body']['tables'][1]['$id']]))->toString(), + ], + ]); + + $this->assertCount(1, $tables['body']['tables']); + $this->assertEquals($base['body']['tables'][0]['$id'], $tables['body']['tables'][0]['$id']); + + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorBefore(new Document(['$id' => $base['body']['tables'][0]['$id']]))->toString(), + ], + ]); + + $this->assertCount(0, $tables['body']['tables']); + $this->assertEmpty($tables['body']['tables']); + + /** + * Test for Search + */ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'search' => 'first' + ]); + + $this->assertEquals(1, $tables['body']['total']); + $this->assertEquals('first', $tables['body']['tables'][0]['$id']); + + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'search' => 'Test' + ]); + + $this->assertEquals(2, $tables['body']['total']); + $this->assertEquals('Test 1', $tables['body']['tables'][0]['name']); + $this->assertEquals('Test 2', $tables['body']['tables'][1]['name']); + + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'search' => 'Nonexistent' + ]); + + $this->assertEquals(0, $tables['body']['total']); + + /** + * Test for FAILURE + */ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::cursorAfter(new Document(['$id' => 'unknown']))->toString(), + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // This collection already exists + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'name' => 'Test 1', + 'tableId' => ID::custom('first'), + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(409, $response['headers']['status-code']); + return [ + 'databaseId' => $databaseId, + 'tableId' => $test1['body']['$id'], + ]; + } + + /** + * @depends testListCollections + */ + public function testGetCollection(array $data): void + { + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], $this->getHeaders())); + + $this->assertEquals(200, $table['headers']['status-code']); + $this->assertEquals('Test 1', $table['body']['name']); + $this->assertEquals('first', $table['body']['$id']); + $this->assertTrue($table['body']['enabled']); + } + + /** + * @depends testListCollections + */ + public function testUpdateCollection(array $data) + { + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $table = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'name' => 'Test 1 Updated', + 'enabled' => false + ]); + + $this->assertEquals(200, $table['headers']['status-code']); + $this->assertEquals('Test 1 Updated', $table['body']['name']); + $this->assertEquals('first', $table['body']['$id']); + $this->assertFalse($table['body']['enabled']); + } + + /** + * @depends testListCollections + */ + public function testCreateEncryptedAttribute(array $data): void + { + + $databaseId = $data['databaseId']; + + /** + * Test for SUCCESS + */ + + // Create collection + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Encrypted Actors Data', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $actors['headers']['status-code']); + $this->assertEquals($actors['body']['name'], 'Encrypted Actors Data'); + + /** + * Test for creating encrypted attributes + */ + + $columnsPath = '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns'; + + $firstName = $this->client->call(Client::METHOD_POST, $columnsPath . '/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'firstName', + 'size' => 256, + 'required' => true, + ]); + + $lastName = $this->client->call(Client::METHOD_POST, $columnsPath . '/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'lastName', + 'size' => 256, + 'required' => true, + 'encrypt' => true, + ]); + + + /** + * Check status of every attribute + */ + $this->assertEquals(202, $firstName['headers']['status-code']); + $this->assertEquals('firstName', $firstName['body']['key']); + $this->assertEquals('string', $firstName['body']['type']); + + $this->assertEquals(202, $lastName['headers']['status-code']); + $this->assertEquals('lastName', $lastName['body']['key']); + $this->assertEquals('string', $lastName['body']['type']); + + // Wait for database worker to finish creating attributes + sleep(2); + + // Creating document to ensure cache is purged on schema change + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => ID::unique(), + 'data' => [ + 'firstName' => 'Jonah', + 'lastName' => 'Jameson', + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + // Check document to ensure cache is purged on schema change + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('Jonah', $row['body']['firstName']); + $this->assertEquals('Jameson', $row['body']['lastName']); + } + + public function testDeleteAttribute(): array + { + $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' => 'invalidDocumentDatabase', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('invalidDocumentDatabase', $database['body']['name']); + + $databaseId = $database['body']['$id']; + /** + * Test for SUCCESS + */ + + // Create collection + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Actors', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $actors['headers']['status-code']); + $this->assertEquals($actors['body']['name'], 'Actors'); + + $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'firstName', + 'size' => 256, + 'required' => true, + ]); + + $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'lastName', + 'size' => 256, + 'required' => true, + ]); + + $unneeded = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'unneeded', + 'size' => 256, + 'required' => true, + ]); + + // Wait for database worker to finish creating attributes + sleep(2); + + // Creating document to ensure cache is purged on schema change + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => ID::unique(), + 'data' => [ + 'firstName' => 'lorem', + 'lastName' => 'ipsum', + 'unneeded' => 'dolor' + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'key_lastName', + 'type' => 'key', + 'columns' => [ + 'lastName', + ], + ]); + + // Wait for database worker to finish creating index + sleep(2); + + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), []); + + $unneededId = $unneeded['body']['key']; + + $this->assertEquals(200, $table['headers']['status-code']); + $this->assertIsArray($table['body']['columns']); + $this->assertCount(3, $table['body']['columns']); + $this->assertEquals($table['body']['columns'][0]['key'], $firstName['body']['key']); + $this->assertEquals($table['body']['columns'][1]['key'], $lastName['body']['key']); + $this->assertEquals($table['body']['columns'][2]['key'], $unneeded['body']['key']); + $this->assertCount(1, $table['body']['indexes']); + $this->assertEquals($table['body']['indexes'][0]['key'], $index['body']['key']); + + // Delete attribute + $attribute = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/' . $unneededId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(204, $attribute['headers']['status-code']); + + sleep(2); + + // Check document to ensure cache is purged on schema change + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertNotContains($unneededId, $row['body']); + + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), []); + + $this->assertEquals(200, $table['headers']['status-code']); + $this->assertIsArray($table['body']['columns']); + $this->assertCount(2, $table['body']['columns']); + $this->assertEquals($table['body']['columns'][0]['key'], $firstName['body']['key']); + $this->assertEquals($table['body']['columns'][1]['key'], $lastName['body']['key']); + + return [ + 'tableId' => $actors['body']['$id'], + 'key' => $index['body']['key'], + 'databaseId' => $databaseId + ]; + } + + /** + * @depends testDeleteAttribute + */ + public function testDeleteIndex($data): array + { + $databaseId = $data['databaseId']; + $index = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/indexes/' . $data['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(204, $index['headers']['status-code']); + + // Wait for database worker to finish deleting index + sleep(2); + + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['tableId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), []); + + $this->assertCount(0, $table['body']['indexes']); + + return $data; + } + + /** + * @depends testDeleteIndex + */ + public function testDeleteIndexOnDeleteAttribute($data) + { + $databaseId = $data['databaseId']; + $attribute1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'attribute1', + 'size' => 16, + 'required' => true, + ]); + + $attribute2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'attribute2', + 'size' => 16, + 'required' => true, + ]); + + $this->assertEquals(202, $attribute1['headers']['status-code']); + $this->assertEquals(202, $attribute2['headers']['status-code']); + $this->assertEquals('attribute1', $attribute1['body']['key']); + $this->assertEquals('attribute2', $attribute2['body']['key']); + + sleep(2); + + $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'index1', + 'type' => 'key', + 'columns' => ['attribute1', 'attribute2'], + 'orders' => ['ASC', 'ASC'], + ]); + + $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'index2', + 'type' => 'key', + 'columns' => ['attribute2'], + ]); + + $this->assertEquals(202, $index1['headers']['status-code']); + $this->assertEquals(202, $index2['headers']['status-code']); + $this->assertEquals('index1', $index1['body']['key']); + $this->assertEquals('index2', $index2['body']['key']); + + sleep(2); + + // Expected behavior: deleting attribute2 will cause index2 to be dropped, and index1 rebuilt with a single key + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/' . $attribute2['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(204, $deleted['headers']['status-code']); + + // wait for database worker to complete + sleep(2); + + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['tableId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $table['headers']['status-code']); + $this->assertIsArray($table['body']['indexes']); + $this->assertCount(1, $table['body']['indexes']); + $this->assertEquals($index1['body']['key'], $table['body']['indexes'][0]['key']); + $this->assertIsArray($table['body']['indexes'][0]['columns']); + $this->assertCount(1, $table['body']['indexes'][0]['columns']); + $this->assertEquals($attribute1['body']['key'], $table['body']['indexes'][0]['columns'][0]); + + // Delete attribute + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/' . $attribute1['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(204, $deleted['headers']['status-code']); + + return $data; + } + + public function testCleanupDuplicateIndexOnDeleteAttribute() + { + $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' => 'invalidDocumentDatabase', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('invalidDocumentDatabase', $database['body']['name']); + + $databaseId = $database['body']['$id']; + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'TestCleanupDuplicateIndexOnDeleteAttribute', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + $this->assertNotEmpty($table['body']['$id']); + + $tableId = $table['body']['$id']; + + $attribute1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'attribute1', + 'size' => 16, + 'required' => true, + ]); + + $attribute2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'attribute2', + 'size' => 16, + 'required' => true, + ]); + + $this->assertEquals(202, $attribute1['headers']['status-code']); + $this->assertEquals(202, $attribute2['headers']['status-code']); + $this->assertEquals('attribute1', $attribute1['body']['key']); + $this->assertEquals('attribute2', $attribute2['body']['key']); + + sleep(2); + + $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'index1', + 'type' => 'key', + 'columns' => ['attribute1', 'attribute2'], + 'orders' => ['ASC', 'ASC'], + ]); + + $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'index2', + 'type' => 'key', + 'columns' => ['attribute2'], + ]); + + $this->assertEquals(202, $index1['headers']['status-code']); + $this->assertEquals(202, $index2['headers']['status-code']); + $this->assertEquals('index1', $index1['body']['key']); + $this->assertEquals('index2', $index2['body']['key']); + + sleep(2); + + // Expected behavior: deleting attribute1 would cause index1 to be a duplicate of index2 and automatically removed + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $attribute1['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(204, $deleted['headers']['status-code']); + + // wait for database worker to complete + sleep(2); + + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $table['headers']['status-code']); + $this->assertIsArray($table['body']['indexes']); + $this->assertCount(1, $table['body']['indexes']); + $this->assertEquals($index2['body']['key'], $table['body']['indexes'][0]['key']); + $this->assertIsArray($table['body']['indexes'][0]['columns']); + $this->assertCount(1, $table['body']['indexes'][0]['columns']); + $this->assertEquals($attribute2['body']['key'], $table['body']['indexes'][0]['columns'][0]); + + // Delete attribute + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $attribute2['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(204, $deleted['headers']['status-code']); + } + + /** + * @depends testDeleteIndexOnDeleteAttribute + */ + public function testDeleteCollection($data) + { + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + // Add Documents to the collection + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'firstName' => 'Tom', + 'lastName' => 'Holland', + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], + ]); + + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'firstName' => 'Samuel', + 'lastName' => 'Jackson', + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], + ]); + + $this->assertEquals(201, $row1['headers']['status-code']); + $this->assertIsArray($row1['body']['$permissions']); + $this->assertCount(3, $row1['body']['$permissions']); + $this->assertEquals($row1['body']['firstName'], 'Tom'); + $this->assertEquals($row1['body']['lastName'], 'Holland'); + + $this->assertEquals(201, $row2['headers']['status-code']); + $this->assertIsArray($row2['body']['$permissions']); + $this->assertCount(3, $row2['body']['$permissions']); + $this->assertEquals($row2['body']['firstName'], 'Samuel'); + $this->assertEquals($row2['body']['lastName'], 'Jackson'); + + // Delete the actors collection + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], $this->getHeaders())); + + $this->assertEquals(204, $response['headers']['status-code']); + $this->assertEquals($response['body'], ""); + + // Try to get the collection and check if it has been deleted + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(404, $response['headers']['status-code']); + } + + /** + * @throws Exception + */ + public function testDeleteCollectionDeletesRelatedAttributes(): void + { + $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'databaseId' => ID::unique(), + 'name' => 'TestDeleteCollectionDeletesRelatedAttributes', + ]); + + $databaseId = $database['body']['$id']; + + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Collection1', + 'documentSecurity' => false, + 'permissions' => [], + ]); + + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Collection2', + 'documentSecurity' => false, + 'permissions' => [], + ]); + + $table1 = $table1['body']['$id']; + $table2 = $table2['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1 . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), [ + 'relatedTableId' => $table2, + 'type' => Database::RELATION_MANY_TO_ONE, + 'twoWay' => false, + 'key' => 'collection2' + ]); + + sleep(2); + + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $table2, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $this->getHeaders())); + + sleep(2); + + $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1 . '/columns', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $this->getHeaders())); + + $this->assertEquals(0, $columns['body']['total']); + } + + public function testAttributeRowWidthLimit() + { + $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' => 'invalidDocumentDatabase', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('invalidDocumentDatabase', $database['body']['name']); + + $databaseId = $database['body']['$id']; + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::custom('attributeRowWidthLimit'), + 'name' => 'attributeRowWidthLimit', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + $this->assertEquals($table['body']['name'], 'attributeRowWidthLimit'); + + $tableId = $table['body']['$id']; + + // Add wide string attributes to approach row width limit + for ($i = 0; $i < 15; $i++) { + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "attribute{$i}", + 'size' => 1024, + 'required' => true, + ]); + + $this->assertEquals(202, $attribute['headers']['status-code']); + } + + sleep(5); + + $tooWide = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'tooWide', + 'size' => 1024, + 'required' => true, + ]); + + $this->assertEquals(400, $tooWide['headers']['status-code']); + $this->assertEquals('column_limit_exceeded', $tooWide['body']['type']); + } + + public function testIndexLimitException() + { + $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' => 'invalidDocumentDatabase', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('invalidDocumentDatabase', $database['body']['name']); + + $databaseId = $database['body']['$id']; + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::custom('testLimitException'), + 'name' => 'testLimitException', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + $this->assertEquals('testLimitException', $table['body']['name']); + + $tableId = $table['body']['$id']; + + // add unique attributes for indexing + for ($i = 0; $i < 64; $i++) { + // $this->assertEquals(true, static::getDatabase()->createAttribute('indexLimit', "test{$i}", Database::VAR_STRING, 16, true)); + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "attribute{$i}", + 'size' => 64, + 'required' => true, + ]); + + $this->assertEquals(202, $attribute['headers']['status-code']); + } + + sleep(10); + + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $table['headers']['status-code']); + $this->assertEquals($table['body']['name'], 'testLimitException'); + $this->assertIsArray($table['body']['columns']); + $this->assertIsArray($table['body']['indexes']); + $this->assertCount(64, $table['body']['columns']); + $this->assertCount(0, $table['body']['indexes']); + + foreach ($table['body']['columns'] as $attribute) { + $this->assertEquals('available', $attribute['status'], 'attribute: ' . $attribute['key']); + } + + // Test indexLimit = 64 + // MariaDB, MySQL, and MongoDB create 6 indexes per new collection + // Add up to the limit, then check if the next index throws IndexLimitException + for ($i = 0; $i < 58; $i++) { + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => "key_attribute{$i}", + 'type' => 'key', + 'columns' => ["attribute{$i}"], + ]); + + $this->assertEquals(202, $index['headers']['status-code']); + $this->assertEquals("key_attribute{$i}", $index['body']['key']); + } + + sleep(5); + + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $table['headers']['status-code']); + $this->assertEquals($table['body']['name'], 'testLimitException'); + $this->assertIsArray($table['body']['columns']); + $this->assertIsArray($table['body']['indexes']); + $this->assertCount(64, $table['body']['columns']); + $this->assertCount(58, $table['body']['indexes']); + + $tooMany = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'tooMany', + 'type' => 'key', + 'columns' => ['attribute61'], + ]); + + $this->assertEquals(400, $tooMany['headers']['status-code']); + $this->assertEquals('Index limit exceeded', $tooMany['body']['message']); + + $table = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(204, $table['headers']['status-code']); + } + + public function testAttributeUpdate(): array + { + $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' => 'updateAttributes', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + + $databaseId = $database['body']['$id']; + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::custom('updateAttributes'), + 'name' => 'updateAttributes' + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + + $tableId = $table['body']['$id']; + + /** + * Create String Attribute + */ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'string', + 'size' => 1024, + 'required' => false + ]); + + $this->assertEquals(202, $attribute['headers']['status-code']); + + /** + * Create Email Attribute + */ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'email', + 'required' => false + ]); + + $this->assertEquals(202, $attribute['headers']['status-code']); + + /** + * Create IP Attribute + */ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'ip', + 'required' => false + ]); + + $this->assertEquals(202, $attribute['headers']['status-code']); + + /** + * Create URL Attribute + */ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'url', + 'required' => false + ]); + + $this->assertEquals(202, $attribute['headers']['status-code']); + + /** + * Create Integer Attribute + */ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'integer', + 'required' => false + ]); + + $this->assertEquals(202, $attribute['headers']['status-code']); + + /** + * Create Float Attribute + */ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'float', + 'required' => false + ]); + + /** + * Create Boolean Attribute + */ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'boolean', + 'required' => false + ]); + + /** + * Create Datetime Attribute + */ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'datetime', + 'required' => false + ]); + + /** + * Create Enum Attribute + */ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'enum', + 'required' => false, + 'elements' => ['lorem', 'ipsum'] + ]); + + $this->assertEquals(202, $attribute['headers']['status-code']); + + sleep(5); + + return [ + 'databaseId' => $databaseId, + 'tableId' => $tableId + ]; + } + + /** + * @depends testAttributeUpdate + */ + public function testAttributeUpdateString(array $data) + { + $key = 'string'; + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'lorem' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals('lorem', $new['body']['default']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($attribute); + $this->assertFalse($attribute['required']); + $this->assertEquals('lorem', $attribute['default']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertNull($new['body']['default']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'ipsum' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals('ipsum', $new['body']['default']); + + /** + * Test against failure + */ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => 'i am no boolean', + 'default' => 'dolor' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 123 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'default' => 'ipsum' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + 'default' => 'ipsum' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + } + + /** + * @depends testAttributeUpdate + */ + public function testAttributeUpdateEmail(array $data) + { + $key = 'email'; + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'torsten@appwrite.io' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals('torsten@appwrite.io', $new['body']['default']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($attribute); + $this->assertFalse($attribute['required']); + $this->assertEquals('torsten@appwrite.io', $attribute['default']); + + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertNull($new['body']['default']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'eldad@appwrite.io' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals('eldad@appwrite.io', $new['body']['default']); + + /** + * Test against failure + */ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => 'no boolean', + 'default' => 'torsten@appwrite.io' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'i am no email' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'default' => 'ipsum' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + 'default' => 'torsten@appwrite.io' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + } + + /** + * @depends testAttributeUpdate + */ + public function testAttributeUpdateIp(array $data) + { + $key = 'ip'; + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => '127.0.0.1' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals('127.0.0.1', $new['body']['default']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($attribute); + $this->assertFalse($attribute['required']); + $this->assertEquals('127.0.0.1', $attribute['default']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertNull($new['body']['default']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => '192.168.0.1' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals('192.168.0.1', $new['body']['default']); + + /** + * Test against failure + */ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => 'no boolean', + 'default' => '127.0.0.1' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'i am no ip' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'default' => '127.0.0.1' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + 'default' => '127.0.0.1' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + } + + /** + * @depends testAttributeUpdate + */ + public function testAttributeUpdateUrl(array $data) + { + $key = 'url'; + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'http://appwrite.io' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals('http://appwrite.io', $new['body']['default']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($attribute); + $this->assertFalse($attribute['required']); + $this->assertEquals('http://appwrite.io', $attribute['default']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertNull($new['body']['default']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'https://appwrite.io' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals('https://appwrite.io', $new['body']['default']); + + /** + * Test against failure + */ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => 'no boolean', + 'default' => 'https://appwrite.io' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'i am no url' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'default' => 'https://appwrite.io' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + 'default' => 'https://appwrite.io' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + } + + /** + * @depends testAttributeUpdate + */ + public function testAttributeUpdateInteger(array $data) + { + $key = 'integer'; + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 123, + 'min' => 0, + 'max' => 1000 + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals(123, $new['body']['default']); + $this->assertEquals(0, $new['body']['min']); + $this->assertEquals(1000, $new['body']['max']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($attribute); + $this->assertFalse($attribute['required']); + $this->assertEquals(123, $attribute['default']); + $this->assertEquals(0, $attribute['min']); + $this->assertEquals(1000, $attribute['max']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => null, + 'min' => 0, + 'max' => 1000 + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertNull($new['body']['default']); + $this->assertEquals(0, $new['body']['min']); + $this->assertEquals(1000, $new['body']['max']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 456, + 'min' => 100, + 'max' => 2000 + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals(456, $new['body']['default']); + $this->assertEquals(100, $new['body']['min']); + $this->assertEquals(2000, $new['body']['max']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 100, + 'min' => 0, + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 10, + 'max' => 100, + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + /** + * Test against failure + */ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => 'no boolean', + 'default' => 123, + 'min' => 0, + 'max' => 500 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'i am no integer', + 'min' => 0, + 'max' => 500 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 100, + 'min' => 'i am no integer', + 'max' => 500 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 100, + 'min' => 0, + 'max' => 'i am no integer' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'min' => 0, + 'max' => 100, + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'default' => 50, + 'min' => 0, + 'max' => 100, + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + 'default' => 50, + 'min' => 0, + 'max' => 100 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 50, + 'min' => 55, + 'max' => 100 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 105, + 'min' => 50, + 'max' => 100 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 50, + 'min' => 200, + 'max' => 100 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + } + + /** + * @depends testAttributeUpdate + */ + public function testAttributeUpdateFloat(array $data) + { + $key = 'float'; + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 123.456, + 'min' => 0.0, + 'max' => 1000.0 + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals(123.456, $new['body']['default']); + $this->assertEquals(0, $new['body']['min']); + $this->assertEquals(1000, $new['body']['max']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($attribute); + $this->assertFalse($attribute['required']); + $this->assertEquals(123.456, $attribute['default']); + $this->assertEquals(0, $attribute['min']); + $this->assertEquals(1000, $attribute['max']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => null, + 'min' => 0.0, + 'max' => 1000.0 + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertNull($new['body']['default']); + $this->assertEquals(0, $new['body']['min']); + $this->assertEquals(1000, $new['body']['max']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 456.789, + 'min' => 123.456, + 'max' => 2000.0 + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals(456.789, $new['body']['default']); + $this->assertEquals(123.456, $new['body']['min']); + $this->assertEquals(2000, $new['body']['max']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 123.456, + 'min' => 0.0, + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 23.456, + 'max' => 100.0, + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + /** + * Test against failure + */ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => 'no boolean', + 'default' => 123.456, + 'min' => 0.0, + 'max' => 1000.0 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'i am no integer', + 'min' => 0.0, + 'max' => 500.0 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 123.456, + 'min' => 'i am no integer', + 'max' => 500.0 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 123.456, + 'min' => 0.0, + 'max' => 'i am no integer' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'min' => 0.0, + 'max' => 100.0, + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'default' => 123.456, + 'min' => 0.0, + 'max' => 100.0, + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + 'default' => 123.456, + 'min' => 0.0, + 'max' => 100.0 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 123.456, + 'min' => 200.0, + 'max' => 300.0 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 123.456, + 'min' => 0.0, + 'max' => 100.0 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 50.0, + 'min' => 200.0, + 'max' => 100.0 + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + } + + /** + * @depends testAttributeUpdate + */ + public function testAttributeUpdateBoolean(array $data) + { + $key = 'boolean'; + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => true + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals(true, $new['body']['default']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($attribute); + $this->assertFalse($attribute['required']); + $this->assertEquals(true, $attribute['default']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertNull($new['body']['default']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => false + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals(false, $new['body']['default']); + + /** + * Test against failure + */ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => 'no boolean', + 'default' => true + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'i am no boolean' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'default' => false + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + 'default' => true + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + } + + /** + * @depends testAttributeUpdate + */ + public function testAttributeUpdateDatetime(array $data) + { + $key = 'datetime'; + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => '1975-06-12 14:12:55+02:00' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals('1975-06-12 14:12:55+02:00', $new['body']['default']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($attribute); + $this->assertFalse($attribute['required']); + $this->assertEquals('1975-06-12 14:12:55+02:00', $attribute['default']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertNull($new['body']['default']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => '1965-06-12 14:12:55+02:00' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals('1965-06-12 14:12:55+02:00', $new['body']['default']); + + /** + * Test against failure + */ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => 'no boolean', + 'default' => '1975-06-12 14:12:55+02:00' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'i am no datetime' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'default' => '1975-06-12 14:12:55+02:00' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + 'default' => '1975-06-12 14:12:55+02:00' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + } + + /** + * @depends testAttributeUpdate + */ + public function testAttributeUpdateEnum(array $data) + { + $key = 'enum'; + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'elements' => ['lorem', 'ipsum', 'dolor'], + 'required' => false, + 'default' => 'lorem' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals('lorem', $new['body']['default']); + $this->assertCount(3, $new['body']['elements']); + $this->assertContains('lorem', $new['body']['elements']); + $this->assertContains('ipsum', $new['body']['elements']); + $this->assertContains('dolor', $new['body']['elements']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($attribute); + $this->assertFalse($attribute['required']); + $this->assertEquals('lorem', $attribute['default']); + $this->assertCount(3, $attribute['elements']); + $this->assertContains('lorem', $attribute['elements']); + $this->assertContains('ipsum', $attribute['elements']); + $this->assertContains('dolor', $attribute['elements']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'elements' => ['lorem', 'ipsum', 'dolor'], + 'required' => false, + 'default' => null + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertNull($new['body']['default']); + $this->assertCount(3, $new['body']['elements']); + $this->assertContains('lorem', $new['body']['elements']); + $this->assertContains('ipsum', $new['body']['elements']); + $this->assertContains('dolor', $new['body']['elements']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'elements' => ['ipsum', 'dolor'], + 'required' => false, + 'default' => 'dolor' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertFalse($new['body']['required']); + $this->assertEquals('dolor', $new['body']['default']); + $this->assertCount(2, $new['body']['elements']); + $this->assertContains('ipsum', $new['body']['elements']); + $this->assertContains('dolor', $new['body']['elements']); + + /** + * Test against failure + */ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'elements' => [], + 'required' => false, + 'default' => 'lorem' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'elements' => ['ipsum', 'dolor'], + 'required' => false, + 'default' => 'lorem' + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => 'no boolean', + 'default' => 'lorem', + 'elements' => ['lorem', 'ipsum', 'dolor'], + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 123, + 'elements' => ['lorem', 'ipsum', 'dolor'], + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'lorem', + 'elements' => 'i am no array', + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'lorem', + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + 'elements' => ['lorem', 'ipsum', 'dolor'], + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'default' => 'lorem', + 'elements' => ['lorem', 'ipsum', 'dolor'], + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => true, + 'default' => 'lorem', + 'elements' => ['lorem', 'ipsum', 'dolor'], + ]); + + $this->assertEquals(400, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); + } + + /** + * @depends testAttributeUpdate + */ + public function testAttributeUpdateStringResize(array $data) + { + $key = 'string'; + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $row = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), + [ + 'rowId' => 'unique()', + 'data' => [ + 'string' => 'string' + ], + "permissions" => ["read(\"any\")"] + ] + ); + + // Test Resize Up + $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'size' => 2048, + 'default' => '', + 'required' => false + ]); + + $this->assertEquals(200, $attribute['headers']['status-code']); + $this->assertEquals(2048, $attribute['body']['size']); + + // Test create new document with new size + $newDoc = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), + [ + 'rowId' => 'unique()', + 'data' => [ + 'string' => str_repeat('a', 2048) + ], + "permissions" => ["read(\"any\")"] + ] + ); + + $this->assertEquals(201, $newDoc['headers']['status-code']); + $this->assertEquals(2048, strlen($newDoc['body']['string'])); + + // Test update document with new size + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => str_repeat('a', 2048) + ] + ]); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals(2048, strlen($row['body']['string'])); + + // Test Exception on resize down with data that is too large + $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'size' => 10, + 'default' => '', + 'required' => false + ]); + + $this->assertEquals(400, $attribute['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_INVALID_RESIZE, $attribute['body']['type']); + + // original documents to original size, remove new document + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'string' + ] + ]); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('string', $row['body']['string']); + + $deleteDoc = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $newDoc['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(204, $deleteDoc['headers']['status-code']); + + + // Test Resize Down + $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'size' => 10, + 'default' => '', + 'required' => false + ]); + + $this->assertEquals(200, $attribute['headers']['status-code']); + $this->assertEquals(10, $attribute['body']['size']); + + // Test create new document with new size + $newDoc = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), + [ + 'rowId' => 'unique()', + 'data' => [ + 'string' => str_repeat('a', 10) + ], + "permissions" => ["read(\"any\")"] + ] + ); + + $this->assertEquals(201, $newDoc['headers']['status-code']); + $this->assertEquals(10, strlen($newDoc['body']['string'])); + + // Test update document with new size + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => str_repeat('a', 10) + ] + ]); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals(10, strlen($row['body']['string'])); + + // Try create document with string that is too large + $newDoc = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), + [ + 'rowId' => 'unique()', + 'data' => [ + 'string' => str_repeat('a', 11) + ], + "permissions" => ["read(\"any\")"] + ] + ); + + $this->assertEquals(400, $newDoc['headers']['status-code']); + $this->assertEquals(AppwriteException::ROW_INVALID_STRUCTURE, $newDoc['body']['type']); + } + + /** + * @depends testAttributeUpdate + */ + public function testAttributeUpdateNotFound(array $data) + { + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + $columns = [ + 'string' => [ + 'required' => false, + 'default' => 'ipsum' + ], + 'email' => [ + 'required' => false, + 'default' => 'eldad@appwrite.io' + ], + 'ip' => [ + 'required' => false, + 'default' => '127.0.0.1' + ], + 'url' => [ + 'required' => false, + 'default' => 'https://appwrite.io' + ], + 'integer' => [ + 'required' => false, + 'default' => 5, + 'min' => 0, + 'max' => 10 + ], + 'float' => [ + 'required' => false, + 'default' => 5.5, + 'min' => 0.0, + 'max' => 10.0 + ], + 'datetime' => [ + 'required' => false, + 'default' => '1975-06-12 14:12:55+02:00' + ], + 'enum' => [ + 'elements' => ['lorem', 'ipsum', 'dolor'], + 'required' => false, + 'default' => 'lorem' + ] + ]; + + foreach ($columns as $key => $payload) { + /** + * Check if Database exists + */ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/i_dont_exist/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), $payload); + + $this->assertEquals(404, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::DATABASE_NOT_FOUND, $update['body']['type']); + + /** + * Check if Collection exists + */ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/i_dont_exist/columns/' . $key . '/unknown_' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), $payload); + + $this->assertEquals(404, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::TABLE_NOT_FOUND, $update['body']['type']); + + /** + * Check if Attribute exists + */ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), $payload); + + $this->assertEquals(404, $update['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_NOT_FOUND, $update['body']['type']); + } + } + + /** + * @depends testAttributeUpdate + */ + public function testAttributeRename(array $data) + { + $key = 'string'; + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + + // Create document to test against + $row = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), + [ + 'rowId' => 'unique()', + 'data' => [ + 'string' => 'string' + ], + "permissions" => ["read(\"any\")"] + ] + ); + + $this->assertEquals(201, $row['headers']['status-code']); + + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'required' => false, + 'default' => 'lorum', + 'newKey' => 'new_string', + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + $key = 'new_string'; + + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals('new_string', $new['body']['key']); + + $doc1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertArrayHasKey('new_string', $doc1['body']); + $this->assertEquals('string', $doc1['body']['new_string']); + $this->assertArrayNotHasKey('string', $doc1['body']); + + // Try and create a new document with the new attribute + $doc2 = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), + [ + 'rowId' => 'unique()', + 'data' => [ + 'new_string' => 'string' + ], + "permissions" => ["read(\"any\")"] + ] + ); + + $this->assertEquals(201, $doc2['headers']['status-code']); + $this->assertArrayHasKey('new_string', $doc2['body']); + $this->assertEquals('string', $doc2['body']['new_string']); + + // Expect fail, try and create a new document with the old attribute + $doc3 = $this->client->call( + Client::METHOD_POST, + '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), + [ + 'rowId' => 'unique()', + 'data' => [ + 'string' => 'string' + ], + "permissions" => ["read(\"any\")"] + ] + ); + + $this->assertEquals(400, $doc3['headers']['status-code']); + } + + public function createRelationshipCollections() + { + // Prepare the database with collections and relationships + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => 'database1', + 'name' => 'Test Database' + ]); + + $databaseId = $database['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => 'collection1', + 'name' => 'level1', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => 'collection2', + 'name' => 'level2', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + \sleep(2); + } + + public function cleanupRelationshipCollection() + { + $this->client->call(Client::METHOD_DELETE, '/databases/database1', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + \sleep(2); + } + + public function testAttributeRenameRelationshipOneToMany() + { + $databaseId = 'database1'; + $table1Id = 'collection1'; + $table2Id = 'collection2'; + + $this->createRelationshipCollections(); + + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2Id, + 'type' => 'oneToMany', + 'twoWay' => true, + 'onDelete' => 'cascade', + 'key' => 'level2', + 'twoWayKey' => 'level1' + ]); + + \sleep(3); + + $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $table1RelationAttribute = $table1Attributes['body']['columns'][0]; + + $this->assertEquals($relation['body']['side'], $table1RelationAttribute['side']); + $this->assertEquals($relation['body']['twoWayKey'], $table1RelationAttribute['twoWayKey']); + $this->assertEquals($relation['body']['relatedTable'], $table1RelationAttribute['relatedTable']); + + // Create a document for checking later + $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'unique()', + 'data' => [ + 'level2' => [[ + '$id' => 'unique()', + '$permissions' => ["read(\"any\")"] + ]], + ], + "permissions" => ["read(\"any\")"] + ]); + + $this->assertEquals(201, $originalDocument['headers']['status-code']); + + // Rename the attribute + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'newKey' => 'new_level_2' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + // Check the document's key has been renamed + $newDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalDocument['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertArrayHasKey('new_level_2', $newDocument['body']); + $this->assertEquals(1, count($newDocument['body']['new_level_2'])); + $this->assertArrayNotHasKey('level2', $newDocument['body']); + + // Check level2 document has been renamed + $level2Document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newDocument['body']['new_level_2'][0]['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertArrayHasKey('level1', $level2Document['body']); + $this->assertNotEmpty($level2Document['body']['level1']); + + // Check if attribute was renamed on the parent's side + $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $this->assertEquals(200, $table1Attributes['headers']['status-code']); + $this->assertEquals(1, count($table1Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $table1Attributes['body']['columns'][0]['key']); + + // Check if attribute was renamed on the child's side + $table2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $this->assertEquals(200, $table2Attributes['headers']['status-code']); + $this->assertEquals(1, count($table2Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $table2Attributes['body']['columns'][0]['twoWayKey']); + + $this->cleanupRelationshipCollection(); + } + + public function testAttributeRenameRelationshipOneToOne() + { + $databaseId = 'database1'; + $table1Id = 'collection1'; + $table2Id = 'collection2'; + + $this->createRelationshipCollections(); + + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2Id, + 'type' => 'oneToOne', + 'twoWay' => true, + 'onDelete' => 'cascade', + 'key' => 'level2', + 'twoWayKey' => 'level1' + ]); + + \sleep(3); + + $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $table1RelationAttribute = $table1Attributes['body']['columns'][0]; + + $this->assertEquals($relation['body']['side'], $table1RelationAttribute['side']); + $this->assertEquals($relation['body']['twoWayKey'], $table1RelationAttribute['twoWayKey']); + $this->assertEquals($relation['body']['relatedTable'], $table1RelationAttribute['relatedTable']); + + // Create a document for checking later + $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'unique()', + 'data' => [ + 'level2' => [ + '$id' => 'unique()', + '$permissions' => ["read(\"any\")"] + ], + ], + "permissions" => ["read(\"any\")"] + ]); + + $this->assertEquals(201, $originalDocument['headers']['status-code']); + + // Rename the attribute + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'newKey' => 'new_level_2' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + // Check the document's key has been renamed + $newDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalDocument['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertArrayHasKey('new_level_2', $newDocument['body']); + $this->assertNotEmpty($newDocument['body']['new_level_2']); + $this->assertArrayNotHasKey('level2', $newDocument['body']); + + // Check level2 document has been renamed + $level2Document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newDocument['body']['new_level_2']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertArrayHasKey('level1', $level2Document['body']); + $this->assertNotEmpty($level2Document['body']['level1']); + + // Check if attribute was renamed on the parent's side + $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $this->assertEquals(200, $table1Attributes['headers']['status-code']); + $this->assertEquals(1, count($table1Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $table1Attributes['body']['columns'][0]['key']); + + // Check if attribute was renamed on the child's side + $table2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $this->assertEquals(200, $table2Attributes['headers']['status-code']); + $this->assertEquals(1, count($table2Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $table2Attributes['body']['columns'][0]['twoWayKey']); + + $this->cleanupRelationshipCollection(); + } + + public function testAttributeRenameRelationshipManyToOne() + { + $databaseId = 'database1'; + $table1Id = 'collection1'; + $table2Id = 'collection2'; + + $this->createRelationshipCollections(); + + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2Id, + 'type' => 'manyToOne', + 'twoWay' => true, + 'onDelete' => 'cascade', + 'key' => 'level2', + 'twoWayKey' => 'level1' + ]); + + \sleep(3); + + $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $table1RelationAttribute = $table1Attributes['body']['columns'][0]; + + $this->assertEquals($relation['body']['side'], $table1RelationAttribute['side']); + $this->assertEquals($relation['body']['twoWayKey'], $table1RelationAttribute['twoWayKey']); + $this->assertEquals($relation['body']['relatedTable'], $table1RelationAttribute['relatedTable']); + + // Create a document for checking later + $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'unique()', + 'data' => [ + 'level2' => [ + '$id' => 'unique()', + '$permissions' => ["read(\"any\")"] + ], + ], + "permissions" => ["read(\"any\")"] + ]); + + $this->assertEquals(201, $originalDocument['headers']['status-code']); + + // Rename the attribute + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'newKey' => 'new_level_2' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + // Check the document's key has been renamed + $newDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalDocument['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertArrayHasKey('new_level_2', $newDocument['body']); + $this->assertNotEmpty($newDocument['body']['new_level_2']); + $this->assertArrayNotHasKey('level2', $newDocument['body']); + + // Check level2 document has been renamed + $level2Document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newDocument['body']['new_level_2']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertArrayHasKey('level1', $level2Document['body']); + $this->assertNotEmpty($level2Document['body']['level1']); + + // Check if attribute was renamed on the parent's side + $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $this->assertEquals(200, $table1Attributes['headers']['status-code']); + $this->assertEquals(1, count($table1Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $table1Attributes['body']['columns'][0]['key']); + + // Check if attribute was renamed on the child's side + $table2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $this->assertEquals(200, $table2Attributes['headers']['status-code']); + $this->assertEquals(1, count($table2Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $table2Attributes['body']['columns'][0]['twoWayKey']); + + $this->cleanupRelationshipCollection(); + } + + public function testAttributeRenameRelationshipManyToMany() + { + $databaseId = 'database1'; + $table1Id = 'collection1'; + $table2Id = 'collection2'; + + $this->createRelationshipCollections(); + + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedTableId' => $table2Id, + 'type' => 'manyToOne', + 'twoWay' => true, + 'onDelete' => 'cascade', + 'key' => 'level2', + 'twoWayKey' => 'level1' + ]); + + \sleep(3); + + $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $table1RelationAttribute = $table1Attributes['body']['columns'][0]; + + $this->assertEquals($relation['body']['side'], $table1RelationAttribute['side']); + $this->assertEquals($relation['body']['twoWayKey'], $table1RelationAttribute['twoWayKey']); + $this->assertEquals($relation['body']['relatedTable'], $table1RelationAttribute['relatedTable']); + + // Create a document for checking later + $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'unique()', + 'data' => [ + 'level2' => [ + '$id' => 'unique()', + '$permissions' => ["read(\"any\")"] + ], + ], + "permissions" => ["read(\"any\")"] + ]); + + $this->assertEquals(201, $originalDocument['headers']['status-code']); + + // Rename the attribute + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'newKey' => 'new_level_2' + ]); + + $this->assertEquals(200, $update['headers']['status-code']); + + // Check the document's key has been renamed + $newDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalDocument['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertArrayHasKey('new_level_2', $newDocument['body']); + $this->assertNotEmpty($newDocument['body']['new_level_2']); + $this->assertArrayNotHasKey('level2', $newDocument['body']); + + // Check level2 document has been renamed + $level2Document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newDocument['body']['new_level_2']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertArrayHasKey('level1', $level2Document['body']); + $this->assertNotEmpty($level2Document['body']['level1']); + + // Check if attribute was renamed on the parent's side + $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $this->assertEquals(200, $table1Attributes['headers']['status-code']); + $this->assertEquals(1, count($table1Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $table1Attributes['body']['columns'][0]['key']); + + // Check if attribute was renamed on the child's side + $table2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $this->assertEquals(200, $table2Attributes['headers']['status-code']); + $this->assertEquals(1, count($table2Attributes['body']['columns'])); + $this->assertEquals('new_level_2', $table2Attributes['body']['columns'][0]['twoWayKey']); + + $this->cleanupRelationshipCollection(); + } +} diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php new file mode 100644 index 0000000000..fa04ba04aa --- /dev/null +++ b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php @@ -0,0 +1,278 @@ +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' => 'InvalidDocumentDatabase', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('InvalidDocumentDatabase', $database['body']['name']); + + $databaseId = $database['body']['$id']; + $publicMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + 'tableId' => ID::unique(), + 'name' => 'Movies', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]); + $privateMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + 'tableId' => ID::unique(), + 'name' => 'Movies', + 'permissions' => [], + 'documentSecurity' => true, + ]); + + $publicCollection = ['id' => $publicMovies['body']['$id']]; + $privateCollection = ['id' => $privateMovies['body']['$id']]; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $publicCollection['id'] . '/columns/string', $this->getServerHeader(), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateCollection['id'] . '/columns/string', $this->getServerHeader(), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + + sleep(2); + + return [ + 'databaseId' => $databaseId, + 'publicCollectionId' => $publicCollection['id'], + 'privateCollectionId' => $privateCollection['id'], + ]; + } + + public function permissionsProvider(): array + { + return [ + [[Permission::read(Role::any())]], + [[Permission::read(Role::users())]], + [[Permission::update(Role::any()), Permission::delete(Role::any())]], + [[Permission::read(Role::any()), Permission::update(Role::any()), Permission::delete(Role::any())]], + [[Permission::read(Role::users()), Permission::update(Role::users()), Permission::delete(Role::users())]], + [[Permission::read(Role::any()), Permission::update(Role::users()), Permission::delete(Role::users())]], + ]; + } + + /** + * @dataProvider permissionsProvider + */ + public function testReadDocuments($permissions) + { + $data = $this->createCollection(); + $publicCollectionId = $data['publicCollectionId']; + $privateCollectionId = $data['privateCollectionId']; + $databaseId = $data['databaseId']; + + $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $publicCollectionId . '/rows', $this->getServerHeader(), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Lorem', + ], + 'permissions' => $permissions, + ]); + $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateCollectionId . '/rows', $this->getServerHeader(), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Lorem', + ], + 'permissions' => $permissions, + ]); + + $this->assertEquals(201, $publicResponse['headers']['status-code']); + $this->assertEquals(201, $privateResponse['headers']['status-code']); + + $roles = Authorization::getRoles(); + Authorization::cleanRoles(); + + $publicDocuments = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $publicCollectionId . '/rows', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]); + $privateDocuments = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $privateCollectionId . '/rows', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]); + + $this->assertEquals(1, $publicDocuments['body']['total']); + $this->assertEquals($permissions, $publicDocuments['body']['rows'][0]['$permissions']); + + if (\in_array(Permission::read(Role::any()), $permissions)) { + $this->assertEquals(1, $privateDocuments['body']['total']); + $this->assertEquals($permissions, $privateDocuments['body']['rows'][0]['$permissions']); + } else { + $this->assertEquals(0, $privateDocuments['body']['total']); + } + + foreach ($roles as $role) { + Authorization::setRole($role); + } + } + + public function testWriteDocument() + { + $data = $this->createCollection(); + $publicCollectionId = $data['publicCollectionId']; + $privateCollectionId = $data['privateCollectionId']; + $databaseId = $data['databaseId']; + + $roles = Authorization::getRoles(); + Authorization::cleanRoles(); + + $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $publicCollectionId . '/rows', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Lorem', + ] + ]); + + $publicDocumentId = $publicResponse['body']['$id']; + $this->assertEquals(201, $publicResponse['headers']['status-code']); + + $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateCollectionId . '/rows', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Lorem', + ], + ]); + + $this->assertEquals(401, $privateResponse['headers']['status-code']); + + // Create a document in private collection with API key so we can test that update and delete are also not allowed + $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateCollectionId . '/rows', $this->getServerHeader(), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Lorem', + ], + ]); + + $this->assertEquals(201, $privateResponse['headers']['status-code']); + $privateDocumentId = $privateResponse['body']['$id']; + + $publicDocument = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $publicCollectionId . '/rows/' . $publicDocumentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + ], + ]); + + $this->assertEquals(200, $publicDocument['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $publicDocument['body']['title']); + + $privateDocument = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $privateCollectionId . '/rows/' . $privateDocumentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + ], + ]); + + $this->assertEquals(401, $privateDocument['headers']['status-code']); + + $publicDocument = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $publicCollectionId . '/rows/' . $publicDocumentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]); + + $this->assertEquals(204, $publicDocument['headers']['status-code']); + + $privateDocument = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $privateCollectionId . '/rows/' . $privateDocumentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]); + + $this->assertEquals(401, $privateDocument['headers']['status-code']); + + foreach ($roles as $role) { + Authorization::setRole($role); + } + } + + public function testWriteDocumentWithPermissions() + { + $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' => 'GuestPermissionsWrite', + ]); + $this->assertEquals(201, $database['headers']['status-code']); + $this->assertEquals('GuestPermissionsWrite', $database['body']['name']); + + $databaseId = $database['body']['$id']; + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + 'tableId' => ID::unique(), + 'name' => 'Movies', + 'permissions' => [ + Permission::create(Role::any()), + ], + 'documentSecurity' => true + ]); + + $moviesId = $movies['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/columns/string', $this->getServerHeader(), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + + sleep(1); + + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Thor: Ragnarok', + ], + 'permissions' => [ + Permission::read(Role::any()), + ] + ]); + + $this->assertEquals(201, $row['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $row['body']['title']); + } +} diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php new file mode 100644 index 0000000000..8da1d9e1ed --- /dev/null +++ b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php @@ -0,0 +1,271 @@ + $this->createUser('user1', 'lorem@ipsum.com'), + 'user2' => $this->createUser('user2', 'dolor@ipsum.com'), + ]; + } + + public function permissionsProvider(): array + { + return [ + [ + 'permissions' => [Permission::read(Role::any())], + 'any' => 1, + 'users' => 1, + 'doconly' => 1, + ], + [ + 'permissions' => [Permission::read(Role::users())], + 'any' => 2, + 'users' => 2, + 'doconly' => 2, + ], + [ + 'permissions' => [Permission::read(Role::user(ID::custom('random')))], + 'any' => 3, + 'users' => 3, + 'doconly' => 2, + ], + [ + 'permissions' => [Permission::read(Role::user(ID::custom('lorem'))), Permission::update(Role::user('lorem')), Permission::delete(Role::user('lorem'))], + 'any' => 4, + 'users' => 4, + 'doconly' => 2, + ], + [ + 'permissions' => [Permission::read(Role::user(ID::custom('dolor'))), Permission::update(Role::user('dolor')), Permission::delete(Role::user('dolor'))], + 'any' => 5, + 'users' => 5, + 'doconly' => 2, + ], + [ + 'permissions' => [Permission::read(Role::user(ID::custom('dolor'))), Permission::read(Role::user('lorem')), Permission::update(Role::user('dolor')), Permission::delete(Role::user('dolor'))], + 'any' => 6, + 'users' => 6, + 'doconly' => 2, + ], + [ + 'permissions' => [Permission::update(Role::any()), Permission::delete(Role::any())], + 'any' => 7, + 'users' => 7, + 'doconly' => 2, + ], + [ + 'permissions' => [Permission::read(Role::any()), Permission::update(Role::any()), Permission::delete(Role::any())], + 'any' => 8, + 'users' => 8, + 'doconly' => 3, + ], + [ + 'permissions' => [Permission::read(Role::any()), Permission::update(Role::users()), Permission::delete(Role::users())], + 'any' => 9, + 'users' => 9, + 'doconly' => 4, + ], + [ + 'permissions' => [Permission::read(Role::user(ID::custom('user1')))], + 'any' => 10, + 'users' => 10, + 'doconly' => 5, + ], + [ + 'permissions' => [Permission::read(Role::user(ID::custom('user1'))), Permission::read(Role::user(ID::custom('user1')))], + 'any' => 11, + 'users' => 11, + 'doconly' => 6, + ], + [ + 'permissions' => [Permission::read(Role::users()), Permission::update(Role::users()), Permission::delete(Role::users())], + 'any' => 12, + 'users' => 12, + 'doconly' => 7, + ], + ]; + } + + /** + * Setup database + * + * Data providers lose object state so explicitly pass [$users, $tables] to each iteration + * + * @return array + * @throws \Exception + */ + public function testSetupDatabase(): array + { + $this->createUsers(); + + $db = $this->client->call(Client::METHOD_POST, '/databases', $this->getServerHeader(), [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database', + ]); + $this->assertEquals(201, $db['headers']['status-code']); + + $databaseId = $db['body']['$id']; + + $public = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + 'tableId' => ID::unique(), + 'name' => 'Movies', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'documentSecurity' => true, + ]); + $this->assertEquals(201, $public['headers']['status-code']); + $this->collections = ['public' => $public['body']['$id']]; + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $this->collections['public'] . '/columns/string', $this->getServerHeader(), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + $this->assertEquals(202, $response['headers']['status-code']); + + $private = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + 'tableId' => ID::unique(), + 'name' => 'Private Movies', + 'permissions' => [ + Permission::read(Role::users()), + Permission::create(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + 'documentSecurity' => true, + ]); + $this->assertEquals(201, $private['headers']['status-code']); + $this->collections['private'] = $private['body']['$id']; + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $this->collections['private'] . '/columns/string', $this->getServerHeader(), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + $this->assertEquals(202, $response['headers']['status-code']); + + $doconly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + 'tableId' => ID::unique(), + 'name' => 'Document Only Movies', + 'permissions' => [], + 'documentSecurity' => true, + ]); + $this->assertEquals(201, $private['headers']['status-code']); + $this->collections['doconly'] = $doconly['body']['$id']; + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $this->collections['doconly'] . '/columns/string', $this->getServerHeader(), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + $this->assertEquals(202, $response['headers']['status-code']); + + sleep(2); + + return [ + 'users' => $this->users, + 'tables' => $this->collections, + 'databaseId' => $databaseId + ]; + } + + /** + * Data provider params are passed before test dependencies + * @dataProvider permissionsProvider + * @depends testSetupDatabase + */ + public function testReadDocuments($permissions, $anyCount, $usersCount, $docOnlyCount, $data) + { + $users = $data['users']; + $tables = $data['tables']; + $databaseId = $data['databaseId']; + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tables['public'] . '/rows', $this->getServerHeader(), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Lorem', + ], + 'permissions' => $permissions + ]); + $this->assertEquals(201, $response['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tables['private'] . '/rows', $this->getServerHeader(), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Lorem', + ], + 'permissions' => $permissions + ]); + $this->assertEquals(201, $response['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tables['doconly'] . '/rows', $this->getServerHeader(), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Lorem', + ], + 'permissions' => $permissions + ]); + $this->assertEquals(201, $response['headers']['status-code']); + + /** + * Check "any" permission collection + */ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tables['public'] . '/rows', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $users['user1']['session'], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals($anyCount, $rows['body']['total']); + + /** + * Check "users" permission collection + */ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tables['private'] . '/rows', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $users['user1']['session'], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals($usersCount, $rows['body']['total']); + + /** + * Check "user:user1" document only permission collection + */ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tables['doconly'] . '/rows', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $users['user1']['session'], + ]); + + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals($docOnlyCount, $rows['body']['total']); + } +} diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsScope.php b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsScope.php new file mode 100644 index 0000000000..a2bc227c8f --- /dev/null +++ b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsScope.php @@ -0,0 +1,87 @@ +client->call(Client::METHOD_POST, '/account', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-dev-key' => $this->getProject()['devKey'] ?? '', + ], [ + 'userId' => $id, + 'email' => $email, + 'password' => $password + ]); + + $this->assertEquals(201, $user['headers']['status-code']); + + $session = $this->client->call(Client::METHOD_POST, '/account/sessions/email', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'email' => $email, + 'password' => $password, + ]); + + $session = $session['cookies']['a_session_' . $this->getProject()['$id']]; + + $user = [ + '$id' => $user['body']['$id'], + 'email' => $user['body']['email'], + 'session' => $session, + ]; + $this->users[$id] = $user; + + return $user; + } + + public function getCreatedUser(string $id): array + { + return $this->users[$id] ?? []; + } + + public function createTeam(string $id, string $name): array + { + $team = $this->client->call(Client::METHOD_POST, '/teams', $this->getServerHeader(), [ + 'teamId' => $id, + 'name' => $name + ]); + $this->teams[$id] = $team['body']; + + return $team['body']; + } + + public function addToTeam(string $user, string $team, array $roles = []): array + { + $membership = $this->client->call(Client::METHOD_POST, '/teams/' . $team . '/memberships', $this->getServerHeader(), [ + 'teamId' => $team, + 'email' => $this->getCreatedUser($user)['email'], + 'roles' => $roles, + 'url' => 'http://localhost:5000/join-us#title' + ]); + + return [ + 'user' => $membership['body']['userId'], + 'membership' => $membership['body']['$id'] + ]; + } + + public function getServerHeader(): array + { + return [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]; + } +} diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsTeamTest.php b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsTeamTest.php new file mode 100644 index 0000000000..c62583f76c --- /dev/null +++ b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsTeamTest.php @@ -0,0 +1,208 @@ + $this->createTeam('team1', 'Team 1'), + 'team2' => $this->createTeam('team2', 'Team 2'), + ]; + } + + public function createUsers(): array + { + return [ + 'user1' => $this->createUser('user1', 'lorem@ipsum.com'), + 'user2' => $this->createUser('user2', 'dolor@ipsum.com'), + 'user3' => $this->createUser('user3', 'sit@ipsum.com'), + ]; + } + + public function createCollections($teams) + { + $db = $this->client->call(Client::METHOD_POST, '/databases', $this->getServerHeader(), [ + 'databaseId' => $this->databaseId, + 'name' => 'Test Database', + ]); + $this->assertEquals(201, $db['headers']['status-code']); + + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables', $this->getServerHeader(), [ + 'tableId' => ID::custom('collection1'), + 'name' => 'Collection 1', + 'permissions' => [ + Permission::read(Role::team($teams['team1']['$id'])), + Permission::create(Role::team($teams['team1']['$id'], 'admin')), + Permission::update(Role::team($teams['team1']['$id'], 'admin')), + Permission::delete(Role::team($teams['team1']['$id'], 'admin')), + ], + ]); + + $this->collections['collection1'] = $table1['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->collections['collection1'] . '/columns/string', $this->getServerHeader(), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables', $this->getServerHeader(), [ + 'tableId' => ID::custom('collection2'), + 'name' => 'Collection 2', + 'permissions' => [ + Permission::read(Role::team($teams['team2']['$id'])), + Permission::create(Role::team($teams['team2']['$id'], 'owner')), + Permission::update(Role::team($teams['team2']['$id'], 'owner')), + Permission::delete(Role::team($teams['team2']['$id'], 'owner')), + ] + ]); + + $this->collections['collection2'] = $table2['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->collections['collection2'] . '/columns/string', $this->getServerHeader(), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + + sleep(2); + + return $this->collections; + } + + /* + * $success = can $user read from $table + * [$user, $table, $success] + */ + public function readDocumentsProvider(): array + { + return [ + ['user1', 'collection1', true], + ['user2', 'collection1', false], + ['user3', 'collection1', true], + ['user1', 'collection2', false], + ['user2', 'collection2', true], + ['user3', 'collection2', true], + ]; + } + + /* + * $success = can $user write to $table + * [$user, $table, $success] + */ + public function writeDocumentsProvider(): array + { + return [ + ['user1', 'collection1', true], + ['user2', 'collection1', false], + ['user3', 'collection1', false], + ['user1', 'collection2', false], + ['user2', 'collection2', true], + ['user3', 'collection2', false], + ]; + } + + /** + * Setup database + * + * Data providers lose object state + * so explicitly pass $users to each iteration + * @return array $users + */ + public function testSetupDatabase(): array + { + $this->createUsers(); + $this->createTeams(); + + $this->addToTeam('user1', 'team1', ['admin']); + $this->addToTeam('user2', 'team2', ['owner']); + + // user3 in both teams but with no roles + $this->addToTeam('user3', 'team1'); + $this->addToTeam('user3', 'team2'); + + $this->createCollections($this->teams); + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->collections['collection1'] . '/rows', $this->getServerHeader(), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Lorem', + ], + ]); + $this->assertEquals(201, $response['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->collections['collection2'] . '/rows', $this->getServerHeader(), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Ipsum', + ], + ]); + $this->assertEquals(201, $response['headers']['status-code']); + + return $this->users; + } + + /** + * Data provider params are passed before test dependencies + * @depends testSetupDatabase + * @dataProvider readDocumentsProvider + */ + public function testReadDocuments($user, $table, $success, $users) + { + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $this->databaseId . '/tables/' . $table . '/rows', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $users[$user]['session'], + ]); + + if ($success) { + $this->assertCount(1, $rows['body']['rows']); + } else { + $this->assertEquals(401, $rows['headers']['status-code']); + } + } + + /** + * @depends testSetupDatabase + * @dataProvider writeDocumentsProvider + */ + public function testWriteDocuments($user, $table, $success, $users) + { + $rows = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $table . '/rows', [ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $users[$user]['session'], + ], [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Ipsum', + ], + ]); + + if ($success) { + $this->assertEquals(201, $rows['headers']['status-code']); + } else { + // 401 if user is a part of team, 404 otherwise + $this->assertContains($rows['headers']['status-code'], [401, 404]); + } + } +} From 241779e0463fea3b5de80debb48ed3b79fb24c8c Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 17:34:41 +0530 Subject: [PATCH 090/362] add: table api tests to abuse. --- tests/e2e/General/AbuseTest.php | 136 ++++++++++++++++++++++++++++---- 1 file changed, 119 insertions(+), 17 deletions(-) diff --git a/tests/e2e/General/AbuseTest.php b/tests/e2e/General/AbuseTest.php index 2ef351f43e..217f9f93ed 100644 --- a/tests/e2e/General/AbuseTest.php +++ b/tests/e2e/General/AbuseTest.php @@ -26,17 +26,115 @@ class AbuseTest extends Scope } } - public function testAbuseCreateDocument() + public function testAbuseCreateDocumentCollectionsAPI() { - $data = $this->createCollection(); + $data = $this->createCollectionOrTable(); $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $max = 120; for ($i = 0; $i <= $max + 1; $i++) { $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'The Hulk ' . $i, + ], + ]); + + if ($i < $max) { + $this->assertEquals(201, $response['headers']['status-code']); + } else { + $this->assertEquals(429, $response['headers']['status-code']); + } + } + } + + public function testAbuseUpdateDocumentCollectionsAPI() + { + $data = $this->createCollectionOrTable(); + $databaseId = $data['databaseId']; + $collectionId = $data['collectionId']; + $max = 120; + + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'The Hulk', + ], + ]); + + $documentId = $document['body']['$id']; + + for ($i = 0; $i <= $max + 1; $i++) { + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], [ + 'data' => [ + 'title' => 'The Hulk ' . $i, + ], + ]); + + if ($i < $max) { + $this->assertEquals(200, $response['headers']['status-code']); + } else { + $this->assertEquals(429, $response['headers']['status-code']); + } + } + } + + public function testAbuseDeleteDocumentCollectionsAPI() + { + $data = $this->createCollectionOrTable(); + $databaseId = $data['databaseId']; + $collectionId = $data['collectionId']; + $max = 60; + + for ($i = 0; $i <= $max + 1; $i++) { + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'The Hulk', + ], + ]); + + $documentId = $document['body']['$id']; + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]); + + if ($i < $max) { + $this->assertEquals(204, $response['headers']['status-code']); + } else { + $this->assertEquals(429, $response['headers']['status-code']); + } + } + } + + public function testAbuseCreateDocumentTablesAPI() + { + $data = $this->createCollectionOrTable(false); + $databaseId = $data['databaseId']; + $collectionId = $data['collectionId']; + $max = 120; + + for ($i = 0; $i <= $max + 1; $i++) { + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $collectionId . '/rows', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], ], [ 'rowId' => ID::unique(), 'data' => [ @@ -52,14 +150,14 @@ class AbuseTest extends Scope } } - public function testAbuseUpdateDocument() + public function testAbuseUpdateDocumentTablesAPI() { - $data = $this->createCollection(); + $data = $this->createCollectionOrTable(false); $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $max = 120; - $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', [ + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $collectionId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -90,15 +188,15 @@ class AbuseTest extends Scope } } - public function testAbuseDeleteDocument() + public function testAbuseDeleteDocumentTablesAPI() { - $data = $this->createCollection(); + $data = $this->createCollectionOrTable(false); $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $max = 60; for ($i = 0; $i <= $max + 1; $i++) { - $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', [ + $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $collectionId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -111,7 +209,7 @@ class AbuseTest extends Scope $documentId = $document['body']['$id']; - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, [ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $collectionId . '/rows/' . $documentId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); @@ -211,7 +309,7 @@ class AbuseTest extends Scope } } - private function createCollection(): array + private function createCollectionOrTable(bool $isCollection = true): array { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -227,12 +325,16 @@ class AbuseTest extends Scope $databaseId = $database['body']['$id']; - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', [ + $endpoint = $isCollection ? 'collections' : 'tables'; + $idParam = $isCollection ? 'collectionId' : 'tableId'; + $attributePath = $isCollection ? 'attributes' : 'columns'; + + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . "/$endpoint", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ], [ - 'tableId' => ID::unique(), + $idParam => ID::unique(), 'name' => 'Movies', 'permissions' => [ Permission::read(Role::any()), @@ -244,7 +346,7 @@ class AbuseTest extends Scope $collectionId = $movies['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/string', [ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . "/$endpoint/" . $collectionId . "/$attributePath/string", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -258,7 +360,7 @@ class AbuseTest extends Scope return [ 'databaseId' => $databaseId, - 'tableId' => $collectionId, + 'collectionId' => $collectionId, ]; } From d5e94a57be176ffa9dfe3e7fe551c2c9f9c90797 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 17:38:02 +0530 Subject: [PATCH 091/362] revert: graphql tests for collections api. --- tests/e2e/Services/GraphQL/AbuseTest.php | 20 +- tests/e2e/Services/GraphQL/AuthTest.php | 59 ++- tests/e2e/Services/GraphQL/Base.php | 348 +++++++++--------- .../Services/GraphQL/DatabaseClientTest.php | 68 ++-- .../Services/GraphQL/DatabaseServerTest.php | 287 +++++++-------- 5 files changed, 390 insertions(+), 392 deletions(-) diff --git a/tests/e2e/Services/GraphQL/AbuseTest.php b/tests/e2e/Services/GraphQL/AbuseTest.php index 10b8421b04..ea97492c2b 100644 --- a/tests/e2e/Services/GraphQL/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/AbuseTest.php @@ -30,9 +30,9 @@ class AbuseTest extends Scope { $data = $this->createCollection(); $databaseId = $data['databaseId']; - $collectionId = $data['tableId']; + $collectionId = $data['collectionId']; $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::$CREATE_DOCUMENT); $max = 120; for ($i = 0; $i <= $max + 1; $i++) { @@ -40,8 +40,8 @@ class AbuseTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $databaseId, - 'tableId' => $collectionId, - 'rowId' => ID::unique(), + 'collectionId' => $collectionId, + 'documentId' => ID::unique(), 'data' => [ 'name' => 'John Doe', ], @@ -73,7 +73,7 @@ class AbuseTest extends Scope 'password' => 'password', 'databaseId' => 'database', 'databaseName' => 'database', - 'tableId' => 'collection', + 'collectionId' => 'collection', 'collectionName' => 'collection', 'collectionPermissions' => [ Permission::read(Role::users()), @@ -133,12 +133,12 @@ class AbuseTest extends Scope $databaseId = $response['body']['data']['databasesCreate']['_id']; - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::$CREATE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $databaseId, - 'tableId' => 'actors', + 'collectionId' => 'actors', 'name' => 'Actors', 'documentSecurity' => false, 'permissions' => [ @@ -156,12 +156,12 @@ class AbuseTest extends Scope $collectionId = $response['body']['data']['databasesCreateCollection']['_id']; - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $databaseId, - 'tableId' => $collectionId, + 'collectionId' => $collectionId, 'key' => 'name', 'size' => 256, 'required' => true, @@ -178,7 +178,7 @@ class AbuseTest extends Scope return [ 'databaseId' => $databaseId, - 'tableId' => $collectionId, + 'collectionId' => $collectionId, ]; } } diff --git a/tests/e2e/Services/GraphQL/AuthTest.php b/tests/e2e/Services/GraphQL/AuthTest.php index 48a2f475e6..ecce29f2b3 100644 --- a/tests/e2e/Services/GraphQL/AuthTest.php +++ b/tests/e2e/Services/GraphQL/AuthTest.php @@ -23,7 +23,7 @@ class AuthTest extends Scope private string $token2; private array $database; - private array $table; + private array $collection; public function setUp(): void { @@ -101,13 +101,13 @@ class AuthTest extends Scope ], $gqlPayload); // Create collection - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::$CREATE_COLLECTION); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => ID::unique(), + 'collectionId' => ID::unique(), 'name' => 'Actors', 'documentSecurity' => true, 'permissions' => [ @@ -115,19 +115,19 @@ class AuthTest extends Scope ] ] ]; - $this->table = $this->client->call(Client::METHOD_POST, '/graphql', [ + $this->collection = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'x-appwrite-key' => $this->getProject()['apiKey'], ], $gqlPayload); // Create string attribute - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], 'key' => 'name', 'size' => 256, 'required' => true, @@ -147,14 +147,14 @@ class AuthTest extends Scope $projectId = $this->getProject()['$id']; // Create document as account 1 - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::$CREATE_DOCUMENT); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], - 'rowId' => ID::unique(), + 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], + 'documentId' => ID::unique(), 'data' => [ 'name' => 'John Doe', ], @@ -165,41 +165,40 @@ class AuthTest extends Scope ] ] ]; - - $row = $this->client->call(Client::METHOD_POST, '/graphql', [ + $document = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, ], $gqlPayload); // Try to read as account 1 - $query = $this->getQuery(self::$GET_ROW); + $query = $this->getQuery(self::$GET_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], - 'rowId' => $row['body']['data']['databasesCreateRow']['_id'], + 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], + 'documentId' => $document['body']['data']['databasesCreateDocument']['_id'], ] ]; - $row = $this->client->call(Client::METHOD_POST, '/graphql', [ + $document = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, ], $gqlPayload); - $this->assertIsArray($row['body']['data']['databasesGetRow']); - $this->assertArrayNotHasKey('errors', $row['body']); + $this->assertIsArray($document['body']['data']['databasesGetDocument']); + $this->assertArrayNotHasKey('errors', $document['body']); // Try to read as account 2 - $row = $this->client->call(Client::METHOD_POST, '/graphql', [ + $document = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'cookie' => 'a_session_' . $projectId . '=' . $this->token2, ], $gqlPayload); - $this->assertArrayHasKey('errors', $row['body']); - $this->assertEquals('Document with the requested ID could not be found.', $row['body']['errors'][0]['message']); + $this->assertArrayHasKey('errors', $document['body']); + $this->assertEquals('Document with the requested ID could not be found.', $document['body']['errors'][0]['message']); } public function testValidAuth() @@ -207,14 +206,14 @@ class AuthTest extends Scope $projectId = $this->getProject()['$id']; // Create document as account 1 - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::$CREATE_DOCUMENT); $userId = $this->account1['body']['data']['accountCreate']['_id']; $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], - 'rowId' => ID::unique(), + 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], + 'documentId' => ID::unique(), 'data' => [ 'name' => 'John Doe', ], @@ -225,29 +224,29 @@ class AuthTest extends Scope ], ] ]; - $row = $this->client->call(Client::METHOD_POST, '/graphql', [ + $document = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, ], $gqlPayload); // Try to delete as account 1 - $query = $this->getQuery(self::$DELETE_ROW); + $query = $this->getQuery(self::$DELETE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], - 'rowId' => $row['body']['data']['databasesCreateRow']['_id'], + 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], + 'documentId' => $document['body']['data']['databasesCreateDocument']['_id'], ] ]; - $row = $this->client->call(Client::METHOD_POST, '/graphql', [ + $document = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, ], $gqlPayload); - $this->assertIsNotArray($row['body']); - $this->assertEquals(204, $row['headers']['status-code']); + $this->assertIsNotArray($document['body']); + $this->assertEquals(204, $document['headers']['status-code']); } } diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 22112d2e12..121d40156e 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -13,49 +13,49 @@ trait Base public static string $GET_DATABASE = 'get_database'; public static string $UPDATE_DATABASE = 'update_database'; public static string $DELETE_DATABASE = 'delete_database'; - // Tables - public static string $CREATE_TABLE = 'create_table'; - public static string $GET_TABLE = 'get_table'; - public static string $GET_TABLES = 'list_tables'; - public static string $UPDATE_TABLE = 'update_table'; - public static string $DELETE_TABLE = 'delete_table'; - // Columns - public static string $CREATE_STRING_COLUMN = 'create_string_column'; - public static string $CREATE_INTEGER_COLUMN = 'create_integer_column'; - public static string $CREATE_FLOAT_COLUMN = 'create_float_column'; - public static string $CREATE_BOOLEAN_COLUMN = 'create_boolean_column'; - public static string $CREATE_URL_COLUMN = 'create_url_column'; - public static string $CREATE_EMAIL_COLUMN = 'create_email_column'; - public static string $CREATE_IP_COLUMN = 'create_ip_column'; - public static string $CREATE_ENUM_COLUMN = 'create_enum_column'; - public static string $CREATE_DATETIME_COLUMN = 'create_datetime_column'; + // Collections + public static string $CREATE_COLLECTION = 'create_collection'; + public static string $GET_COLLECTION = 'get_collection'; + public static string $GET_COLLECTIONS = 'list_collections'; + public static string $UPDATE_COLLECTION = 'update_collection'; + public static string $DELETE_COLLECTION = 'delete_collection'; + // Attributes + public static string $CREATE_STRING_ATTRIBUTE = 'create_string_attribute'; + public static string $CREATE_INTEGER_ATTRIBUTE = 'create_integer_attribute'; + public static string $CREATE_FLOAT_ATTRIBUTE = 'create_float_attribute'; + public static string $CREATE_BOOLEAN_ATTRIBUTE = 'create_boolean_attribute'; + public static string $CREATE_URL_ATTRIBUTE = 'create_url_attribute'; + public static string $CREATE_EMAIL_ATTRIBUTE = 'create_email_attribute'; + public static string $CREATE_IP_ATTRIBUTE = 'create_ip_attribute'; + public static string $CREATE_ENUM_ATTRIBUTE = 'create_enum_attribute'; + public static string $CREATE_DATETIME_ATTRIBUTE = 'create_datetime_attribute'; - public static string $CREATE_RELATIONSHIP_COLUMN = 'create_relationship_column'; - public static string $UPDATE_STRING_COLUMN = 'update_string_column'; - public static string $UPDATE_INTEGER_COLUMN = 'update_integer_column'; - public static string $UPDATE_FLOAT_COLUMN = 'update_float_column'; - public static string $UPDATE_BOOLEAN_COLUMN = 'update_boolean_column'; - public static string $UPDATE_URL_COLUMN = 'update_url_column'; - public static string $UPDATE_EMAIL_COLUMN = 'update_email_column'; - public static string $UPDATE_IP_COLUMN = 'update_ip_column'; - public static string $UPDATE_ENUM_COLUMN = 'update_enum_column'; - public static string $UPDATE_DATETIME_COLUMN = 'update_datetime_column'; + public static string $CREATE_RELATIONSHIP_ATTRIBUTE = 'create_relationship_attribute'; + public static string $UPDATE_STRING_ATTRIBUTE = 'update_string_attribute'; + public static string $UPDATE_INTEGER_ATTRIBUTE = 'update_integer_attribute'; + public static string $UPDATE_FLOAT_ATTRIBUTE = 'update_float_attribute'; + public static string $UPDATE_BOOLEAN_ATTRIBUTE = 'update_boolean_attribute'; + public static string $UPDATE_URL_ATTRIBUTE = 'update_url_attribute'; + public static string $UPDATE_EMAIL_ATTRIBUTE = 'update_email_attribute'; + public static string $UPDATE_IP_ATTRIBUTE = 'update_ip_attribute'; + public static string $UPDATE_ENUM_ATTRIBUTE = 'update_enum_attribute'; + public static string $UPDATE_DATETIME_ATTRIBUTE = 'update_datetime_attribute'; - public static string $UPDATE_RELATIONSHIP_COLUMN = 'update_relationship_column'; - public static string $GET_COLUMNS = 'get_columns'; - public static string $GET_COLUMN = 'get_column'; - public static string $DELETE_COLUMN = 'delete_column'; + public static string $UPDATE_RELATIONSHIP_ATTRIBUTE = 'update_relationship_attribute'; + public static string $GET_ATTRIBUTES = 'get_attributes'; + public static string $GET_ATTRIBUTE = 'get_attribute'; + public static string $DELETE_ATTRIBUTE = 'delete_attribute'; // Indexes public static string $CREATE_INDEX = 'create_index'; public static string $GET_INDEXES = 'get_indexes'; public static string $GET_INDEX = 'get_index'; public static string $DELETE_INDEX = 'delete_index'; // Documents - public static string $CREATE_ROW = 'create_row_rest'; - public static string $GET_ROWS = 'list_rows'; - public static string $GET_ROW = 'get_row'; - public static string $UPDATE_ROW = 'update_row'; - public static string $DELETE_ROW = 'delete_row'; + public static string $CREATE_DOCUMENT = 'create_document_rest'; + public static string $GET_DOCUMENTS = 'list_documents'; + public static string $GET_DOCUMENT = 'get_document'; + public static string $UPDATE_DOCUMENT = 'update_document'; + public static string $DELETE_DOCUMENT = 'delete_document'; // Custom Entities public static string $CREATE_CUSTOM_ENTITY = 'create_custom_entity'; @@ -258,9 +258,9 @@ trait Base public static string $COMPLEX_QUERY = 'complex_query'; // Fragments - public static string $FRAGMENT_COLUMNS = ' - fragment columnProperties on Columns { - ... on ColumnString { + public static string $FRAGMENT_ATTRIBUTES = ' + fragment attributeProperties on Attributes { + ... on AttributeString { key required array @@ -268,7 +268,7 @@ trait Base default size } - ... on ColumnInteger { + ... on AttributeInteger { key required array @@ -277,7 +277,7 @@ trait Base intMin: min intMax: max } - ... on ColumnFloat { + ... on AttributeFloat { key required array @@ -286,35 +286,35 @@ trait Base floatMin: min floatMax: max } - ... on ColumnBoolean { + ... on AttributeBoolean { key required array status boolDefault:default } - ... on ColumnUrl { + ... on AttributeUrl { key required array status default } - ... on ColumnEmail { + ... on AttributeEmail { key required array status default } - ... on ColumnIp { + ... on AttributeIp { key required array status default } - ... on ColumnEnum { + ... on AttributeEnum { key required array @@ -322,7 +322,7 @@ trait Base default elements } - ... on ColumnDatetime { + ... on AttributeDatetime { key required array @@ -393,20 +393,20 @@ trait Base status } }'; - case self::$GET_TABLE: - return 'query getTable($databaseId: String!, $tableId: String!) { - databasesGetTable(databaseId: $databaseId, tableId: $tableId) { + case self::$GET_COLLECTION: + return 'query getCollection($databaseId: String!, $collectionId: String!) { + databasesGetCollection(databaseId: $databaseId, collectionId: $collectionId) { _id _permissions documentSecurity name } }'; - case self::$GET_TABLES: - return 'query listTables($databaseId: String!) { - databasesListTables(databaseId: $databaseId) { + case self::$GET_COLLECTIONS: + return 'query listCollections($databaseId: String!) { + databasesListCollections(databaseId: $databaseId) { total - tables { + collections { _id _permissions documentSecurity @@ -414,42 +414,42 @@ trait Base } } }'; - case self::$CREATE_TABLE: - return 'mutation createTable($databaseId: String!, $tableId: String!, $name: String!, $documentSecurity: Boolean!, $permissions: [String!]!) { - databasesCreateTable(databaseId: $databaseId, tableId: $tableId, name: $name, documentSecurity: $documentSecurity, permissions: $permissions) { + case self::$CREATE_COLLECTION: + return 'mutation createCollection($databaseId: String!, $collectionId: String!, $name: String!, $documentSecurity: Boolean!, $permissions: [String!]!) { + databasesCreateCollection(databaseId: $databaseId, collectionId: $collectionId, name: $name, documentSecurity: $documentSecurity, permissions: $permissions) { _id _permissions documentSecurity name } }'; - case self::$UPDATE_TABLE: - return 'mutation updateTable($databaseId: String!, $tableId: String!, $name: String!, $documentSecurity: Boolean!, $permissions: [String!], $enabled: Boolean){ - databasesUpdateTable(databaseId: $databaseId, tableId: $tableId, name: $name, documentSecurity: $documentSecurity, permissions: $permissions, enabled: $enabled) { + case self::$UPDATE_COLLECTION: + return 'mutation updateCollection($databaseId: String!, $collectionId: String!, $name: String!, $documentSecurity: Boolean!, $permissions: [String!], $enabled: Boolean){ + databasesUpdateCollection(databaseId: $databaseId, collectionId: $collectionId, name: $name, documentSecurity: $documentSecurity, permissions: $permissions, enabled: $enabled) { _id _permissions documentSecurity name } }'; - case self::$DELETE_TABLE: - return 'mutation deleteTable($databaseId: String!, $tableId: String!){ - databasesDeleteTable(databaseId: $databaseId, tableId: $tableId) { + case self::$DELETE_COLLECTION: + return 'mutation deleteCollection($databaseId: String!, $collectionId: String!){ + databasesDeleteCollection(databaseId: $databaseId, collectionId: $collectionId) { status } }'; - case self::$CREATE_STRING_COLUMN: - return 'mutation createStringColumn($databaseId: String!, $tableId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, size: $size, required: $required, default: $default, array: $array) { + case self::$CREATE_STRING_ATTRIBUTE: + return 'mutation createStringAttribute($databaseId: String!, $collectionId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ + databasesCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, size: $size, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_INTEGER_COLUMN: - return 'mutation createIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int, $max: Int, $default: Int, $array: Boolean){ - databasesCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + case self::$CREATE_INTEGER_ATTRIBUTE: + return 'mutation createIntegerAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Int, $max: Int, $default: Int, $array: Boolean){ + databasesCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -458,9 +458,9 @@ trait Base array } }'; - case self::$CREATE_FLOAT_COLUMN: - return 'mutation createFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float, $max: Float, $default: Float, $array: Boolean){ - databasesCreateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + case self::$CREATE_FLOAT_ATTRIBUTE: + return 'mutation createFloatAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Float, $max: Float, $default: Float, $array: Boolean){ + databasesCreateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -469,45 +469,45 @@ trait Base array } }'; - case self::$CREATE_BOOLEAN_COLUMN: - return 'mutation createBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean, $array: Boolean){ - databasesCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + case self::$CREATE_BOOLEAN_ATTRIBUTE: + return 'mutation createBooleanAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: Boolean, $array: Boolean){ + databasesCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_URL_COLUMN: - return 'mutation createUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + case self::$CREATE_URL_ATTRIBUTE: + return 'mutation createUrlAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ + databasesCreateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_EMAIL_COLUMN: - return 'mutation createEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + case self::$CREATE_EMAIL_ATTRIBUTE: + return 'mutation createEmailAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ + databasesCreateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_IP_COLUMN: - return 'mutation createIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + case self::$CREATE_IP_ATTRIBUTE: + return 'mutation createIpAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ + databasesCreateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_ENUM_COLUMN: - return 'mutation createEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { + case self::$CREATE_ENUM_ATTRIBUTE: + return 'mutation createEnumAttribute($databaseId: String!, $collectionId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String, $array: Boolean){ + databasesCreateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { key elements required @@ -515,19 +515,19 @@ trait Base array } }'; - case self::$CREATE_DATETIME_COLUMN: - return 'mutation createDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + case self::$CREATE_DATETIME_ATTRIBUTE: + return 'mutation createDatetimeAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ + databasesCreateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default array } }'; - case self::$CREATE_RELATIONSHIP_COLUMN: - return 'mutation createRelationshipColumn($databaseId: String!, $tableId: String!, $relatedTableId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ - databasesCreateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, relatedTableId: $relatedTableId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { - relatedTable + case self::$CREATE_RELATIONSHIP_ATTRIBUTE: + return 'mutation createRelationshipAttribute($databaseId: String!, $collectionId: String!, $relatedCollectionId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ + databasesCreateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, relatedCollectionId: $relatedCollectionId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { + relatedCollection relationType twoWay key @@ -535,78 +535,78 @@ trait Base onDelete } }'; - case self::$UPDATE_STRING_COLUMN: - return 'mutation updateStringColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + case self::$UPDATE_STRING_ATTRIBUTE: + return 'mutation updateStringAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ + databasesUpdateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_INTEGER_COLUMN: - return 'mutation updateIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int!, $max: Int!, $default: Int){ - databasesUpdateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, min: $min, max: $max, default: $default) { + case self::$UPDATE_INTEGER_ATTRIBUTE: + return 'mutation updateIntegerAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Int!, $max: Int!, $default: Int){ + databasesUpdateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, min: $min, max: $max, default: $default) { required min max default } }'; - case self::$UPDATE_FLOAT_COLUMN: - return 'mutation updateFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float!, $max: Float!, $default: Float){ - databasesUpdateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default) { + case self::$UPDATE_FLOAT_ATTRIBUTE: + return 'mutation updateFloatAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Float!, $max: Float!, $default: Float){ + databasesUpdateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default) { required min max default } }'; - case self::$UPDATE_BOOLEAN_COLUMN: - return 'mutation updateBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean){ - databasesUpdateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + case self::$UPDATE_BOOLEAN_ATTRIBUTE: + return 'mutation updateBooleanAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: Boolean){ + databasesUpdateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_URL_COLUMN: - return 'mutation updateUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + case self::$UPDATE_URL_ATTRIBUTE: + return 'mutation updateUrlAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ + databasesUpdateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_EMAIL_COLUMN: - return 'mutation updateEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + case self::$UPDATE_EMAIL_ATTRIBUTE: + return 'mutation updateEmailAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ + databasesUpdateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_IP_COLUMN: - return 'mutation updateIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + case self::$UPDATE_IP_ATTRIBUTE: + return 'mutation updateIpAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ + databasesUpdateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_ENUM_COLUMN: - return 'mutation updateEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String){ - databasesUpdateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default) { + case self::$UPDATE_ENUM_ATTRIBUTE: + return 'mutation updateEnumAttribute($databaseId: String!, $collectionId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String){ + databasesUpdateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default) { elements required default } }'; - case self::$UPDATE_DATETIME_COLUMN: - return 'mutation updateDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + case self::$UPDATE_DATETIME_ATTRIBUTE: + return 'mutation updateDatetimeAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ + databasesUpdateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; - case self::$UPDATE_RELATIONSHIP_COLUMN: - return 'mutation updateRelationshipColumn($databaseId: String!, $tableId: String!, $key: String!, $onDelete: String){ - databasesUpdateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, key: $key, onDelete: $onDelete) { - relatedTable + case self::$UPDATE_RELATIONSHIP_ATTRIBUTE: + return 'mutation updateRelationshipAttribute($databaseId: String!, $collectionId: String!, $key: String!, $onDelete: String){ + databasesUpdateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, onDelete: $onDelete) { + relatedCollection relationType twoWay key @@ -615,16 +615,16 @@ trait Base } }'; case self::$CREATE_INDEX: - return 'mutation createIndex($databaseId: String!, $tableId: String!, $key: String!, $type: String!, $columns: [String!]!, $orders: [String!]){ - databasesCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, columns: $columns, orders: $orders) { + return 'mutation createIndex($databaseId: String!, $collectionId: String!, $key: String!, $type: String!, $attributes: [String!]!, $orders: [String!]){ + databasesCreateIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key, type: $type, attributes: $attributes, orders: $orders) { key type status } }'; case self::$GET_INDEXES: - return 'query listIndexes($databaseId: String!, $tableId: String!) { - databasesListIndexes(databaseId: $databaseId, tableId: $tableId) { + return 'query listIndexes($databaseId: String!, $collectionId: String!) { + databasesListIndexes(databaseId: $databaseId, collectionId: $collectionId) { total indexes { key @@ -634,66 +634,66 @@ trait Base } }'; case self::$GET_INDEX: - return 'query getIndex($databaseId: String!, $tableId: String!, $key: String!) { - databasesGetIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { + return 'query getIndex($databaseId: String!, $collectionId: String!, $key: String!) { + databasesGetIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { key type status } }'; case self::$DELETE_INDEX: - return 'mutation deleteIndex($databaseId: String!, $tableId: String!, $key: String!) { - databasesDeleteIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { + return 'mutation deleteIndex($databaseId: String!, $collectionId: String!, $key: String!) { + databasesDeleteIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { status } }'; - case self::$GET_COLUMNS: - return 'query listColumns($databaseId: String!, $tableId: String!) { - databasesListColumns(databaseId: $databaseId, tableId: $tableId) { + case self::$GET_ATTRIBUTES: + return 'query listAttributes($databaseId: String!, $collectionId: String!) { + databasesListAttributes(databaseId: $databaseId, collectionId: $collectionId) { total - columns { - ...columnProperties + attributes { + ...attributeProperties } } - }' . PHP_EOL . self::$FRAGMENT_COLUMNS; - case self::$GET_COLUMN: - return 'query getColumn($databaseId: String!, $tableId: String!, $key: String!) { - databasesGetColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { - ...columnProperties + }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; + case self::$GET_ATTRIBUTE: + return 'query getAttribute($databaseId: String!, $collectionId: String!, $key: String!) { + databasesGetAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + ...attributeProperties } - }' . PHP_EOL . self::$FRAGMENT_COLUMNS; - case self::$DELETE_COLUMN: - return 'mutation deleteColumn($databaseId: String!, $tableId: String!, $key: String!) { - databasesDeleteColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { + }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; + case self::$DELETE_ATTRIBUTE: + return 'mutation deleteAttribute($databaseId: String!, $collectionId: String!, $key: String!) { + databasesDeleteAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { status } }'; - case self::$GET_ROW: - return 'query getRow($databaseId: String!, $tableId: String!, $rowId: String!) { - databasesGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { + case self::$GET_DOCUMENT: + return 'query getDocument($databaseId: String!, $collectionId: String!, $documentId: String!) { + databasesGetDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { _id - _tableId + _collectionId _permissions data } }'; - case self::$GET_ROWS: - return 'query listRows($databaseId: String!, $tableId: String!){ - databasesListRows(databaseId: $databaseId, tableId: $tableId) { + case self::$GET_DOCUMENTS: + return 'query listDocuments($databaseId: String!, $collectionId: String!){ + databasesListDocuments(databaseId: $databaseId, collectionId: $collectionId) { total - rows { + documents { _id - _tableId + _collectionId _permissions data } } }'; - case self::$CREATE_ROW: - return 'mutation createRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]){ - databasesCreateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + case self::$CREATE_DOCUMENT: + return 'mutation createDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!]){ + databasesCreateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { _id - _tableId + _collectionId _permissions } }'; @@ -756,17 +756,17 @@ trait Base return 'mutation deleteCustomEntity($id: String!){ actorsDelete(id: $id) }'; - case self::$UPDATE_ROW: - return 'mutation updateRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]){ - databasesUpdateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + case self::$UPDATE_DOCUMENT: + return 'mutation updateDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!]){ + databasesUpdateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { _id - _tableId + _collectionId data } }'; - case self::$DELETE_ROW: - return 'mutation deleteRow($databaseId: String!, $tableId: String!, $rowId: String!){ - databasesDeleteRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { + case self::$DELETE_DOCUMENT: + return 'mutation deleteDocument($databaseId: String!, $collectionId: String!, $documentId: String!){ + databasesDeleteDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { status } }'; @@ -2246,12 +2246,12 @@ trait Base } }'; case self::$COMPLEX_QUERY: - return 'mutation complex($databaseId: String!, $databaseName: String!, $tableId: String!, $collectionName: String!, $documentSecurity: Boolean!, $collectionPermissions: [String!]!) { + return 'mutation complex($databaseId: String!, $databaseName: String!, $collectionId: String!, $collectionName: String!, $documentSecurity: Boolean!, $collectionPermissions: [String!]!) { databasesCreate(databaseId: $databaseId, name: $databaseName) { _id name } - databasesCreateTable(databaseId: $databaseId, tableId: $tableId, name: $collectionName, documentSecurity: $documentSecurity, permissions: $collectionPermissions) { + databasesCreateCollection(databaseId: $databaseId, collectionId: $collectionId, name: $collectionName, documentSecurity: $documentSecurity, permissions: $collectionPermissions) { _id _createdAt _updatedAt @@ -2259,8 +2259,8 @@ trait Base _databaseId name documentSecurity - columns { - ...columnProperties + attributes { + ...attributeProperties } indexes { key @@ -2268,7 +2268,7 @@ trait Base status } } - databasesCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: "name", size: 255, required: true) { + databasesCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "name", size: 255, required: true) { key type status @@ -2277,7 +2277,7 @@ trait Base default array } - databasesCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: "age", min: 0, max: 150, required: true) { + databasesCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "age", min: 0, max: 150, required: true) { key type status @@ -2287,7 +2287,7 @@ trait Base default array } - databasesCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: "alive", required: false, default: true) { + databasesCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "alive", required: false, default: true) { key type status @@ -2487,7 +2487,7 @@ trait Base data } } - }' . PHP_EOL . self::$FRAGMENT_COLUMNS; + }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; } throw new \InvalidArgumentException('Invalid query type'); diff --git a/tests/e2e/Services/GraphQL/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/DatabaseClientTest.php index efd2430629..3853a3fc17 100644 --- a/tests/e2e/Services/GraphQL/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/DatabaseClientTest.php @@ -48,12 +48,12 @@ class DatabaseClientTest extends Scope public function testCreateCollection($database): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::$CREATE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $database['_id'], - 'tableId' => 'actors', + 'collectionId' => 'actors', 'name' => 'Actors', 'documentSecurity' => false, 'permissions' => [ @@ -65,20 +65,20 @@ class DatabaseClientTest extends Scope ] ]; - $table = $this->client->call(Client::METHOD_POST, '/graphql', [ + $collection = $this->client->call(Client::METHOD_POST, '/graphql', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, 'x-appwrite-key' => $this->getProject()['apiKey'], ], $gqlPayload); - $this->assertIsArray($table['body']['data']); - $this->assertArrayNotHasKey('errors', $table['body']); - $table = $table['body']['data']['databasesCreateTable']; - $this->assertEquals('Actors', $table['name']); + $this->assertIsArray($collection['body']['data']); + $this->assertArrayNotHasKey('errors', $collection['body']); + $collection = $collection['body']['data']['databasesCreateCollection']; + $this->assertEquals('Actors', $collection['name']); return [ 'database' => $database, - 'table' => $table, + 'collection' => $collection, ]; } @@ -88,12 +88,12 @@ class DatabaseClientTest extends Scope public function testCreateStringAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'name', 'size' => 256, 'required' => true, @@ -108,7 +108,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateStringColumn']); + $this->assertIsArray($attribute['body']['data']['databasesCreateStringAttribute']); return $data; } @@ -119,12 +119,12 @@ class DatabaseClientTest extends Scope public function testCreateIntegerAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INTEGER_COLUMN); + $query = $this->getQuery(self::$CREATE_INTEGER_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'age', 'min' => 18, 'max' => 150, @@ -140,7 +140,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateIntegerColumn']); + $this->assertIsArray($attribute['body']['data']['databasesCreateIntegerAttribute']); return $data; } @@ -154,13 +154,13 @@ class DatabaseClientTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::$CREATE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], - 'rowId' => ID::unique(), + 'collectionId' => $data['collection']['_id'], + 'documentId' => ID::unique(), 'data' => [ 'name' => 'John Doe', 'age' => 35, @@ -181,13 +181,13 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['databasesCreateRow']; + $document = $document['body']['data']['databasesCreateDocument']; $this->assertIsArray($document); return [ 'database' => $data['database'], - 'table' => $data['table'], - 'row' => $document, + 'collection' => $data['collection'], + 'document' => $document, ]; } @@ -198,12 +198,12 @@ class DatabaseClientTest extends Scope public function testGetDocuments($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::$GET_DOCUMENTS); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], ] ]; @@ -214,7 +214,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $documents['body']); $this->assertIsArray($documents['body']['data']); - $this->assertIsArray($documents['body']['data']['databasesListRows']); + $this->assertIsArray($documents['body']['data']['databasesListDocuments']); } /** @@ -224,13 +224,13 @@ class DatabaseClientTest extends Scope public function testGetDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ROW); + $query = $this->getQuery(self::$GET_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], - 'rowId' => $data['row']['_id'], + 'collectionId' => $data['collection']['_id'], + 'documentId' => $data['document']['_id'], ] ]; @@ -241,7 +241,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $this->assertIsArray($document['body']['data']['databasesGetRow']); + $this->assertIsArray($document['body']['data']['databasesGetDocument']); } /** @@ -251,13 +251,13 @@ class DatabaseClientTest extends Scope public function testUpdateDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ROW); + $query = $this->getQuery(self::$UPDATE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], - 'rowId' => $data['row']['_id'], + 'collectionId' => $data['collection']['_id'], + 'documentId' => $data['document']['_id'], 'data' => [ 'name' => 'New Document Name', ], @@ -271,7 +271,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['databasesUpdateRow']; + $document = $document['body']['data']['databasesUpdateDocument']; $this->assertIsArray($document); $this->assertStringContainsString('New Document Name', $document['data']); @@ -284,13 +284,13 @@ class DatabaseClientTest extends Scope public function testDeleteDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ROW); + $query = $this->getQuery(self::$DELETE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], - 'rowId' => $data['row']['_id'], + 'collectionId' => $data['collection']['_id'], + 'documentId' => $data['document']['_id'], ] ]; diff --git a/tests/e2e/Services/GraphQL/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/DatabaseServerTest.php index 0ea86c03cf..87006a1bea 100644 --- a/tests/e2e/Services/GraphQL/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/DatabaseServerTest.php @@ -49,12 +49,12 @@ class DatabaseServerTest extends Scope public function testCreateCollection($database): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_TABLE); + $query = $this->getQuery(self::$CREATE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $database['_id'], - 'tableId' => 'actors', + 'collectionId' => 'actors', 'name' => 'Actors', 'documentSecurity' => false, 'permissions' => [ @@ -73,14 +73,14 @@ class DatabaseServerTest extends Scope $this->assertIsArray($collection['body']['data']); $this->assertArrayNotHasKey('errors', $collection['body']); - $collection = $collection['body']['data']['databasesCreateTable']; + $collection = $collection['body']['data']['databasesCreateCollection']; $this->assertEquals('Actors', $collection['name']); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $database['_id'], - 'tableId' => 'movies', + 'collectionId' => 'movies', 'name' => 'Movies', 'documentSecurity' => false, 'permissions' => [ @@ -92,20 +92,20 @@ class DatabaseServerTest extends Scope ] ]; - $table2 = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + $collection2 = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, ], $this->getHeaders()), $gqlPayload); - $this->assertIsArray($table2['body']['data']); - $this->assertArrayNotHasKey('errors', $table2['body']); - $table2 = $table2['body']['data']['databasesCreateTable']; - $this->assertEquals('Movies', $table2['name']); + $this->assertIsArray($collection2['body']['data']); + $this->assertArrayNotHasKey('errors', $collection2['body']); + $collection2 = $collection2['body']['data']['databasesCreateCollection']; + $this->assertEquals('Movies', $collection2['name']); return [ 'database' => $database, - 'table' => $collection, - 'table2' => $table2, + 'collection' => $collection, + 'collection2' => $collection2, ]; } @@ -116,12 +116,12 @@ class DatabaseServerTest extends Scope public function testCreateStringAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'name', 'size' => 256, 'required' => true, @@ -135,7 +135,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateStringColumn']); + $this->assertIsArray($attribute['body']['data']['databasesCreateStringAttribute']); return $data; } @@ -150,12 +150,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_STRING_COLUMN); + $query = $this->getQuery(self::$UPDATE_STRING_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'name', 'required' => false, 'default' => 'Default Value', @@ -168,9 +168,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateStringColumn']); - $this->assertFalse($attribute['body']['data']['databasesUpdateStringColumn']['required']); - $this->assertEquals('Default Value', $attribute['body']['data']['databasesUpdateStringColumn']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateStringAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateStringAttribute']['required']); + $this->assertEquals('Default Value', $attribute['body']['data']['databasesUpdateStringAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -183,12 +183,12 @@ class DatabaseServerTest extends Scope public function testCreateIntegerAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INTEGER_COLUMN); + $query = $this->getQuery(self::$CREATE_INTEGER_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'age', 'min' => 18, 'max' => 150, @@ -203,7 +203,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateIntegerColumn']); + $this->assertIsArray($attribute['body']['data']['databasesCreateIntegerAttribute']); return $data; } @@ -218,12 +218,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_INTEGER_COLUMN); + $query = $this->getQuery(self::$UPDATE_INTEGER_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'age', 'required' => false, 'min' => 12, @@ -238,11 +238,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateIntegerColumn']); - $this->assertFalse($attribute['body']['data']['databasesUpdateIntegerColumn']['required']); - $this->assertEquals(12, $attribute['body']['data']['databasesUpdateIntegerColumn']['min']); - $this->assertEquals(160, $attribute['body']['data']['databasesUpdateIntegerColumn']['max']); - $this->assertEquals(50, $attribute['body']['data']['databasesUpdateIntegerColumn']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateIntegerAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateIntegerAttribute']['required']); + $this->assertEquals(12, $attribute['body']['data']['databasesUpdateIntegerAttribute']['min']); + $this->assertEquals(160, $attribute['body']['data']['databasesUpdateIntegerAttribute']['max']); + $this->assertEquals(50, $attribute['body']['data']['databasesUpdateIntegerAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -255,12 +255,12 @@ class DatabaseServerTest extends Scope public function testCreateBooleanAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_BOOLEAN_COLUMN); + $query = $this->getQuery(self::$CREATE_BOOLEAN_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'alive', 'required' => true, ] @@ -273,7 +273,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateBooleanColumn']); + $this->assertIsArray($attribute['body']['data']['databasesCreateBooleanAttribute']); return $data; } @@ -288,12 +288,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_BOOLEAN_COLUMN); + $query = $this->getQuery(self::$UPDATE_BOOLEAN_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'alive', 'required' => false, 'default' => true @@ -306,9 +306,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateBooleanColumn']); - $this->assertFalse($attribute['body']['data']['databasesUpdateBooleanColumn']['required']); - $this->assertTrue($attribute['body']['data']['databasesUpdateBooleanColumn']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateBooleanAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateBooleanAttribute']['required']); + $this->assertTrue($attribute['body']['data']['databasesUpdateBooleanAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -321,12 +321,12 @@ class DatabaseServerTest extends Scope public function testCreateFloatAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FLOAT_COLUMN); + $query = $this->getQuery(self::$CREATE_FLOAT_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'salary', 'min' => 1000.0, 'max' => 999999.99, @@ -342,7 +342,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateFloatColumn']); + $this->assertIsArray($attribute['body']['data']['databasesCreateFloatAttribute']); return $data; } @@ -357,12 +357,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FLOAT_COLUMN); + $query = $this->getQuery(self::$UPDATE_FLOAT_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'salary', 'required' => false, 'min' => 100.0, @@ -377,11 +377,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateFloatColumn']); - $this->assertFalse($attribute['body']['data']['databasesUpdateFloatColumn']['required']); - $this->assertEquals(100.0, $attribute['body']['data']['databasesUpdateFloatColumn']['min']); - $this->assertEquals(1000000.0, $attribute['body']['data']['databasesUpdateFloatColumn']['max']); - $this->assertEquals(2500.0, $attribute['body']['data']['databasesUpdateFloatColumn']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateFloatAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateFloatAttribute']['required']); + $this->assertEquals(100.0, $attribute['body']['data']['databasesUpdateFloatAttribute']['min']); + $this->assertEquals(1000000.0, $attribute['body']['data']['databasesUpdateFloatAttribute']['max']); + $this->assertEquals(2500.0, $attribute['body']['data']['databasesUpdateFloatAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -394,12 +394,12 @@ class DatabaseServerTest extends Scope public function testCreateEmailAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_EMAIL_COLUMN); + $query = $this->getQuery(self::$CREATE_EMAIL_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'email', 'required' => true, ] @@ -412,7 +412,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateEmailColumn']); + $this->assertIsArray($attribute['body']['data']['databasesCreateEmailAttribute']); return $data; } @@ -427,12 +427,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_EMAIL_COLUMN); + $query = $this->getQuery(self::$UPDATE_EMAIL_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'email', 'required' => false, 'default' => 'torsten@appwrite.io', @@ -445,9 +445,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateEmailColumn']); - $this->assertFalse($attribute['body']['data']['databasesUpdateEmailColumn']['required']); - $this->assertEquals('torsten@appwrite.io', $attribute['body']['data']['databasesUpdateEmailColumn']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateEmailAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateEmailAttribute']['required']); + $this->assertEquals('torsten@appwrite.io', $attribute['body']['data']['databasesUpdateEmailAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -460,12 +460,12 @@ class DatabaseServerTest extends Scope public function testCreateEnumAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ENUM_COLUMN); + $query = $this->getQuery(self::$CREATE_ENUM_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'role', 'elements' => [ 'crew', @@ -483,7 +483,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateEnumColumn']); + $this->assertIsArray($attribute['body']['data']['databasesCreateEnumAttribute']); return $data; } @@ -499,12 +499,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ENUM_COLUMN); + $query = $this->getQuery(self::$UPDATE_ENUM_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'role', 'required' => false, 'elements' => [ @@ -522,11 +522,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateEnumColumn']); - $this->assertFalse($attribute['body']['data']['databasesUpdateEnumColumn']['required']); - $this->assertEquals('tech', $attribute['body']['data']['databasesUpdateEnumColumn']['default']); - $this->assertContains('tech', $attribute['body']['data']['databasesUpdateEnumColumn']['elements']); - $this->assertNotContains('guest', $attribute['body']['data']['databasesUpdateEnumColumn']['elements']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateEnumAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateEnumAttribute']['required']); + $this->assertEquals('tech', $attribute['body']['data']['databasesUpdateEnumAttribute']['default']); + $this->assertContains('tech', $attribute['body']['data']['databasesUpdateEnumAttribute']['elements']); + $this->assertNotContains('guest', $attribute['body']['data']['databasesUpdateEnumAttribute']['elements']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -539,12 +539,12 @@ class DatabaseServerTest extends Scope public function testCreateDatetimeAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATETIME_COLUMN); + $query = $this->getQuery(self::$CREATE_DATETIME_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'dob', 'required' => true, ] @@ -557,7 +557,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateDatetimeColumn']); + $this->assertIsArray($attribute['body']['data']['databasesCreateDatetimeAttribute']); return $data; } @@ -572,12 +572,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DATETIME_COLUMN); + $query = $this->getQuery(self::$UPDATE_DATETIME_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'dob', 'required' => false, 'default' => '2000-01-01T00:00:00Z' @@ -590,9 +590,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateDatetimeColumn']); - $this->assertFalse($attribute['body']['data']['databasesUpdateDatetimeColumn']['required']); - $this->assertEquals('2000-01-01T00:00:00Z', $attribute['body']['data']['databasesUpdateDatetimeColumn']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateDatetimeAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateDatetimeAttribute']['required']); + $this->assertEquals('2000-01-01T00:00:00Z', $attribute['body']['data']['databasesUpdateDatetimeAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -604,13 +604,13 @@ class DatabaseServerTest extends Scope public function testCreateRelationshipAttribute(array $data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_RELATIONSHIP_COLUMN); + $query = $this->getQuery(self::$CREATE_RELATIONSHIP_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table2']['_id'], // Movies - 'relatedTableId' => $data['table']['_id'], // Actors + 'collectionId' => $data['collection2']['_id'], // Movies + 'relatedCollectionId' => $data['collection']['_id'], // Actors 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => true, 'key' => 'actors', @@ -623,10 +623,9 @@ class DatabaseServerTest extends Scope 'x-appwrite-project' => $projectId, ], $this->getHeaders()), $gqlPayload); - $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateRelationshipColumn']); + $this->assertIsArray($attribute['body']['data']['databasesCreateRelationshipAttribute']); return $data; } @@ -639,12 +638,12 @@ class DatabaseServerTest extends Scope sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_RELATIONSHIP_COLUMN); + $query = $this->getQuery(self::$UPDATE_RELATIONSHIP_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table2']['_id'], + 'collectionId' => $data['collection2']['_id'], 'key' => 'actors', 'onDelete' => Database::RELATION_MUTATE_CASCADE, ] @@ -657,7 +656,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateRelationshipColumn']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateRelationshipAttribute']); return $data; } @@ -669,12 +668,12 @@ class DatabaseServerTest extends Scope public function testCreateIPAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_IP_COLUMN); + $query = $this->getQuery(self::$CREATE_IP_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'ip', 'required' => false, 'default' => '::1', @@ -688,7 +687,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateIpColumn']); + $this->assertIsArray($attribute['body']['data']['databasesCreateIpAttribute']); return $data; } @@ -703,12 +702,12 @@ class DatabaseServerTest extends Scope sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_IP_COLUMN); + $query = $this->getQuery(self::$UPDATE_IP_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'ip', 'required' => false, 'default' => '127.0.0.1' @@ -721,9 +720,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateIpColumn']); - $this->assertFalse($attribute['body']['data']['databasesUpdateIpColumn']['required']); - $this->assertEquals('127.0.0.1', $attribute['body']['data']['databasesUpdateIpColumn']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateIpAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateIpAttribute']['required']); + $this->assertEquals('127.0.0.1', $attribute['body']['data']['databasesUpdateIpAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -736,12 +735,12 @@ class DatabaseServerTest extends Scope public function testCreateURLAttribute($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_URL_COLUMN); + $query = $this->getQuery(self::$CREATE_URL_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'url', 'required' => false, 'default' => 'https://appwrite.io', @@ -755,7 +754,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateUrlColumn']); + $this->assertIsArray($attribute['body']['data']['databasesCreateUrlAttribute']); return $data; } @@ -770,12 +769,12 @@ class DatabaseServerTest extends Scope sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_URL_COLUMN); + $query = $this->getQuery(self::$UPDATE_URL_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'url', 'required' => false, 'default' => 'https://cloud.appwrite.io' @@ -788,9 +787,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateUrlColumn']); - $this->assertFalse($attribute['body']['data']['databasesUpdateUrlColumn']['required']); - $this->assertEquals('https://cloud.appwrite.io', $attribute['body']['data']['databasesUpdateUrlColumn']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateUrlAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateUrlAttribute']['required']); + $this->assertEquals('https://cloud.appwrite.io', $attribute['body']['data']['databasesUpdateUrlAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); } @@ -807,10 +806,10 @@ class DatabaseServerTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'index', 'type' => 'key', - 'columns' => [ + 'attributes' => [ 'name', 'age', ], @@ -828,7 +827,7 @@ class DatabaseServerTest extends Scope return [ 'database' => $data['database'], - 'table' => $data['table'], + 'collection' => $data['collection'], 'index' => $index['body']['data']['databasesCreateIndex'], ]; } @@ -843,13 +842,13 @@ class DatabaseServerTest extends Scope public function testCreateDocument($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ROW); + $query = $this->getQuery(self::$CREATE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], - 'rowId' => ID::unique(), + 'collectionId' => $data['collection']['_id'], + 'documentId' => ID::unique(), 'data' => [ 'name' => 'John Doe', 'email' => 'example@appwrite.io', @@ -867,21 +866,21 @@ class DatabaseServerTest extends Scope ] ]; - $row = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + $document = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, ], $this->getHeaders()), $gqlPayload); - $this->assertArrayNotHasKey('errors', $row['body']); - $this->assertIsArray($row['body']['data']); + $this->assertArrayNotHasKey('errors', $document['body']); + $this->assertIsArray($document['body']['data']); - $row = $row['body']['data']['databasesCreateRow']; - $this->assertIsArray($row); + $document = $document['body']['data']['databasesCreateDocument']; + $this->assertIsArray($document); return [ 'database' => $data['database'], - 'table' => $data['table'], - 'row' => $row, + 'collection' => $data['collection'], + 'document' => $document, ]; } @@ -975,7 +974,7 @@ class DatabaseServerTest extends Scope public function testGetCollections($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TABLES); + $query = $this->getQuery(self::$GET_COLLECTIONS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -990,7 +989,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $collections['body']); $this->assertIsArray($collections['body']['data']); - $this->assertIsArray($collections['body']['data']['databasesListTables']); + $this->assertIsArray($collections['body']['data']['databasesListCollections']); } /** @@ -1000,12 +999,12 @@ class DatabaseServerTest extends Scope public function testGetCollection($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_TABLE); + $query = $this->getQuery(self::$GET_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], ] ]; @@ -1016,7 +1015,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $collection['body']); $this->assertIsArray($collection['body']['data']); - $this->assertIsArray($collection['body']['data']['databasesGetTable']); + $this->assertIsArray($collection['body']['data']['databasesGetCollection']); } /** @@ -1027,12 +1026,12 @@ class DatabaseServerTest extends Scope public function testGetAttributes($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLUMNS); + $query = $this->getQuery(self::$GET_ATTRIBUTES); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], ] ]; @@ -1043,7 +1042,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attributes['body']); $this->assertIsArray($attributes['body']['data']); - $this->assertIsArray($attributes['body']['data']['databasesListColumns']); + $this->assertIsArray($attributes['body']['data']['databasesListAttributes']); } /** @@ -1053,12 +1052,12 @@ class DatabaseServerTest extends Scope public function testGetAttribute($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLUMN); + $query = $this->getQuery(self::$GET_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'name', ] ]; @@ -1070,7 +1069,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesGetColumn']); + $this->assertIsArray($attribute['body']['data']['databasesGetAttribute']); } /** @@ -1085,7 +1084,7 @@ class DatabaseServerTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], ] ]; @@ -1111,7 +1110,7 @@ class DatabaseServerTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => $data['index']['key'], ] ]; @@ -1133,12 +1132,12 @@ class DatabaseServerTest extends Scope public function testGetDocuments($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ROWS); + $query = $this->getQuery(self::$GET_DOCUMENTS); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], ] ]; @@ -1149,7 +1148,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $documents['body']); $this->assertIsArray($documents['body']['data']); - $this->assertIsArray($documents['body']['data']['databasesListRows']); + $this->assertIsArray($documents['body']['data']['databasesListDocuments']); } /** @@ -1159,13 +1158,13 @@ class DatabaseServerTest extends Scope public function testGetDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ROW); + $query = $this->getQuery(self::$GET_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], - 'rowId' => $data['row']['_id'], + 'collectionId' => $data['collection']['_id'], + 'documentId' => $data['document']['_id'], ] ]; @@ -1176,7 +1175,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $this->assertIsArray($document['body']['data']['databasesGetRow']); + $this->assertIsArray($document['body']['data']['databasesGetDocument']); } // /** @@ -1259,12 +1258,12 @@ class DatabaseServerTest extends Scope public function testUpdateCollection($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_TABLE); + $query = $this->getQuery(self::$UPDATE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'name' => 'New Collection Name', 'documentSecurity' => false, ] @@ -1277,7 +1276,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $collection['body']); $this->assertIsArray($collection['body']['data']); - $this->assertIsArray($collection['body']['data']['databasesUpdateTable']); + $this->assertIsArray($collection['body']['data']['databasesUpdateCollection']); } /** @@ -1287,13 +1286,13 @@ class DatabaseServerTest extends Scope public function testUpdateDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ROW); + $query = $this->getQuery(self::$UPDATE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], - 'rowId' => $data['row']['_id'], + 'collectionId' => $data['collection']['_id'], + 'documentId' => $data['document']['_id'], 'data' => [ 'name' => 'New Document Name', ], @@ -1307,7 +1306,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['databasesUpdateRow']; + $document = $document['body']['data']['databasesUpdateDocument']; $this->assertIsArray($document); $this->assertStringContainsString('New Document Name', $document['data']); } @@ -1347,13 +1346,13 @@ class DatabaseServerTest extends Scope public function testDeleteDocument($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ROW); + $query = $this->getQuery(self::$DELETE_DOCUMENT); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], - 'rowId' => $data['row']['_id'], + 'collectionId' => $data['collection']['_id'], + 'documentId' => $data['document']['_id'], ] ]; @@ -1397,12 +1396,12 @@ class DatabaseServerTest extends Scope public function testDeleteAttribute($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_COLUMN); + $query = $this->getQuery(self::$DELETE_ATTRIBUTE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], 'key' => 'name', ] ]; @@ -1423,12 +1422,12 @@ class DatabaseServerTest extends Scope public function testDeleteCollection($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_TABLE); + $query = $this->getQuery(self::$DELETE_COLLECTION); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['table']['_id'], + 'collectionId' => $data['collection']['_id'], ] ]; From c542ba033f259e8f5c9ff06897666a37d8ba79a6 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 18:15:17 +0530 Subject: [PATCH 092/362] patch: graphql tests <> collections. --- tests/e2e/Services/GraphQL/AuthTest.php | 6 +- tests/e2e/Services/GraphQL/Base.php | 64 +++++------ .../Services/GraphQL/DatabaseClientTest.php | 12 +- .../Services/GraphQL/DatabaseServerTest.php | 108 +++++++++--------- 4 files changed, 95 insertions(+), 95 deletions(-) diff --git a/tests/e2e/Services/GraphQL/AuthTest.php b/tests/e2e/Services/GraphQL/AuthTest.php index ecce29f2b3..db56537999 100644 --- a/tests/e2e/Services/GraphQL/AuthTest.php +++ b/tests/e2e/Services/GraphQL/AuthTest.php @@ -178,7 +178,7 @@ class AuthTest extends Scope 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], - 'documentId' => $document['body']['data']['databasesCreateDocument']['_id'], + 'documentId' => $document['body']['data']['collectionsCreateDocument']['_id'], ] ]; $document = $this->client->call(Client::METHOD_POST, '/graphql', [ @@ -187,7 +187,7 @@ class AuthTest extends Scope 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, ], $gqlPayload); - $this->assertIsArray($document['body']['data']['databasesGetDocument']); + $this->assertIsArray($document['body']['data']['collectionsGetDocument']); $this->assertArrayNotHasKey('errors', $document['body']); // Try to read as account 2 @@ -237,7 +237,7 @@ class AuthTest extends Scope 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], - 'documentId' => $document['body']['data']['databasesCreateDocument']['_id'], + 'documentId' => $document['body']['data']['collectionsCreateDocument']['_id'], ] ]; $document = $this->client->call(Client::METHOD_POST, '/graphql', [ diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 121d40156e..f7ee14f7e1 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -440,7 +440,7 @@ trait Base }'; case self::$CREATE_STRING_ATTRIBUTE: return 'mutation createStringAttribute($databaseId: String!, $collectionId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, size: $size, required: $required, default: $default, array: $array) { + collectionsCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, size: $size, required: $required, default: $default, array: $array) { key required default @@ -449,7 +449,7 @@ trait Base }'; case self::$CREATE_INTEGER_ATTRIBUTE: return 'mutation createIntegerAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Int, $max: Int, $default: Int, $array: Boolean){ - databasesCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + collectionsCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -460,7 +460,7 @@ trait Base }'; case self::$CREATE_FLOAT_ATTRIBUTE: return 'mutation createFloatAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Float, $max: Float, $default: Float, $array: Boolean){ - databasesCreateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + collectionsCreateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -471,7 +471,7 @@ trait Base }'; case self::$CREATE_BOOLEAN_ATTRIBUTE: return 'mutation createBooleanAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: Boolean, $array: Boolean){ - databasesCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + collectionsCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -480,7 +480,7 @@ trait Base }'; case self::$CREATE_URL_ATTRIBUTE: return 'mutation createUrlAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + collectionsCreateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -489,7 +489,7 @@ trait Base }'; case self::$CREATE_EMAIL_ATTRIBUTE: return 'mutation createEmailAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + collectionsCreateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -498,7 +498,7 @@ trait Base }'; case self::$CREATE_IP_ATTRIBUTE: return 'mutation createIpAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + collectionsCreateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -507,7 +507,7 @@ trait Base }'; case self::$CREATE_ENUM_ATTRIBUTE: return 'mutation createEnumAttribute($databaseId: String!, $collectionId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { + collectionsCreateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { key elements required @@ -517,7 +517,7 @@ trait Base }'; case self::$CREATE_DATETIME_ATTRIBUTE: return 'mutation createDatetimeAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - databasesCreateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + collectionsCreateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -526,7 +526,7 @@ trait Base }'; case self::$CREATE_RELATIONSHIP_ATTRIBUTE: return 'mutation createRelationshipAttribute($databaseId: String!, $collectionId: String!, $relatedCollectionId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ - databasesCreateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, relatedCollectionId: $relatedCollectionId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { + collectionsCreateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, relatedCollectionId: $relatedCollectionId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { relatedCollection relationType twoWay @@ -537,14 +537,14 @@ trait Base }'; case self::$UPDATE_STRING_ATTRIBUTE: return 'mutation updateStringAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + collectionsUpdateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_INTEGER_ATTRIBUTE: return 'mutation updateIntegerAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Int!, $max: Int!, $default: Int){ - databasesUpdateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, min: $min, max: $max, default: $default) { + collectionsUpdateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, min: $min, max: $max, default: $default) { required min max @@ -553,7 +553,7 @@ trait Base }'; case self::$UPDATE_FLOAT_ATTRIBUTE: return 'mutation updateFloatAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Float!, $max: Float!, $default: Float){ - databasesUpdateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default) { + collectionsUpdateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default) { required min max @@ -562,35 +562,35 @@ trait Base }'; case self::$UPDATE_BOOLEAN_ATTRIBUTE: return 'mutation updateBooleanAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: Boolean){ - databasesUpdateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + collectionsUpdateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_URL_ATTRIBUTE: return 'mutation updateUrlAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + collectionsUpdateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_EMAIL_ATTRIBUTE: return 'mutation updateEmailAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + collectionsUpdateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_IP_ATTRIBUTE: return 'mutation updateIpAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + collectionsUpdateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_ENUM_ATTRIBUTE: return 'mutation updateEnumAttribute($databaseId: String!, $collectionId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String){ - databasesUpdateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default) { + collectionsUpdateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default) { elements required default @@ -598,14 +598,14 @@ trait Base }'; case self::$UPDATE_DATETIME_ATTRIBUTE: return 'mutation updateDatetimeAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - databasesUpdateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + collectionsUpdateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_RELATIONSHIP_ATTRIBUTE: return 'mutation updateRelationshipAttribute($databaseId: String!, $collectionId: String!, $key: String!, $onDelete: String){ - databasesUpdateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, onDelete: $onDelete) { + collectionsUpdateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, onDelete: $onDelete) { relatedCollection relationType twoWay @@ -616,7 +616,7 @@ trait Base }'; case self::$CREATE_INDEX: return 'mutation createIndex($databaseId: String!, $collectionId: String!, $key: String!, $type: String!, $attributes: [String!]!, $orders: [String!]){ - databasesCreateIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key, type: $type, attributes: $attributes, orders: $orders) { + collectionsCreateIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key, type: $type, attributes: $attributes, orders: $orders) { key type status @@ -624,7 +624,7 @@ trait Base }'; case self::$GET_INDEXES: return 'query listIndexes($databaseId: String!, $collectionId: String!) { - databasesListIndexes(databaseId: $databaseId, collectionId: $collectionId) { + collectionsListIndexes(databaseId: $databaseId, collectionId: $collectionId) { total indexes { key @@ -635,7 +635,7 @@ trait Base }'; case self::$GET_INDEX: return 'query getIndex($databaseId: String!, $collectionId: String!, $key: String!) { - databasesGetIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + collectionsGetIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { key type status @@ -643,13 +643,13 @@ trait Base }'; case self::$DELETE_INDEX: return 'mutation deleteIndex($databaseId: String!, $collectionId: String!, $key: String!) { - databasesDeleteIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + collectionsDeleteIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { status } }'; case self::$GET_ATTRIBUTES: return 'query listAttributes($databaseId: String!, $collectionId: String!) { - databasesListAttributes(databaseId: $databaseId, collectionId: $collectionId) { + collectionsListAttributes(databaseId: $databaseId, collectionId: $collectionId) { total attributes { ...attributeProperties @@ -658,19 +658,19 @@ trait Base }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; case self::$GET_ATTRIBUTE: return 'query getAttribute($databaseId: String!, $collectionId: String!, $key: String!) { - databasesGetAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + collectionsGetAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { ...attributeProperties } }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; case self::$DELETE_ATTRIBUTE: return 'mutation deleteAttribute($databaseId: String!, $collectionId: String!, $key: String!) { - databasesDeleteAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + collectionsDeleteAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { status } }'; case self::$GET_DOCUMENT: return 'query getDocument($databaseId: String!, $collectionId: String!, $documentId: String!) { - databasesGetDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { + collectionsGetDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { _id _collectionId _permissions @@ -679,7 +679,7 @@ trait Base }'; case self::$GET_DOCUMENTS: return 'query listDocuments($databaseId: String!, $collectionId: String!){ - databasesListDocuments(databaseId: $databaseId, collectionId: $collectionId) { + collectionsListDocuments(databaseId: $databaseId, collectionId: $collectionId) { total documents { _id @@ -691,7 +691,7 @@ trait Base }'; case self::$CREATE_DOCUMENT: return 'mutation createDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!]){ - databasesCreateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { + collectionsCreateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { _id _collectionId _permissions @@ -758,7 +758,7 @@ trait Base }'; case self::$UPDATE_DOCUMENT: return 'mutation updateDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!]){ - databasesUpdateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { + collectionsUpdateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { _id _collectionId data @@ -766,7 +766,7 @@ trait Base }'; case self::$DELETE_DOCUMENT: return 'mutation deleteDocument($databaseId: String!, $collectionId: String!, $documentId: String!){ - databasesDeleteDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { + collectionsDeleteDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { status } }'; diff --git a/tests/e2e/Services/GraphQL/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/DatabaseClientTest.php index 3853a3fc17..f3029d60b4 100644 --- a/tests/e2e/Services/GraphQL/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/DatabaseClientTest.php @@ -108,7 +108,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateStringAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsCreateStringAttribute']); return $data; } @@ -140,7 +140,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateIntegerAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsCreateIntegerAttribute']); return $data; } @@ -181,7 +181,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['databasesCreateDocument']; + $document = $document['body']['data']['collectionsCreateDocument']; $this->assertIsArray($document); return [ @@ -214,7 +214,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $documents['body']); $this->assertIsArray($documents['body']['data']); - $this->assertIsArray($documents['body']['data']['databasesListDocuments']); + $this->assertIsArray($documents['body']['data']['collectionsListDocuments']); } /** @@ -241,7 +241,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $this->assertIsArray($document['body']['data']['databasesGetDocument']); + $this->assertIsArray($document['body']['data']['collectionsGetDocument']); } /** @@ -271,7 +271,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['databasesUpdateDocument']; + $document = $document['body']['data']['collectionsUpdateDocument']; $this->assertIsArray($document); $this->assertStringContainsString('New Document Name', $document['data']); diff --git a/tests/e2e/Services/GraphQL/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/DatabaseServerTest.php index 87006a1bea..cdd2f4d69a 100644 --- a/tests/e2e/Services/GraphQL/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/DatabaseServerTest.php @@ -135,7 +135,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateStringAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsCreateStringAttribute']); return $data; } @@ -168,9 +168,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateStringAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateStringAttribute']['required']); - $this->assertEquals('Default Value', $attribute['body']['data']['databasesUpdateStringAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['collectionsUpdateStringAttribute']); + $this->assertFalse($attribute['body']['data']['collectionsUpdateStringAttribute']['required']); + $this->assertEquals('Default Value', $attribute['body']['data']['collectionsUpdateStringAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -203,7 +203,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateIntegerAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsCreateIntegerAttribute']); return $data; } @@ -238,11 +238,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateIntegerAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateIntegerAttribute']['required']); - $this->assertEquals(12, $attribute['body']['data']['databasesUpdateIntegerAttribute']['min']); - $this->assertEquals(160, $attribute['body']['data']['databasesUpdateIntegerAttribute']['max']); - $this->assertEquals(50, $attribute['body']['data']['databasesUpdateIntegerAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['collectionsUpdateIntegerAttribute']); + $this->assertFalse($attribute['body']['data']['collectionsUpdateIntegerAttribute']['required']); + $this->assertEquals(12, $attribute['body']['data']['collectionsUpdateIntegerAttribute']['min']); + $this->assertEquals(160, $attribute['body']['data']['collectionsUpdateIntegerAttribute']['max']); + $this->assertEquals(50, $attribute['body']['data']['collectionsUpdateIntegerAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -273,7 +273,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateBooleanAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsCreateBooleanAttribute']); return $data; } @@ -306,9 +306,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateBooleanAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateBooleanAttribute']['required']); - $this->assertTrue($attribute['body']['data']['databasesUpdateBooleanAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['collectionsUpdateBooleanAttribute']); + $this->assertFalse($attribute['body']['data']['collectionsUpdateBooleanAttribute']['required']); + $this->assertTrue($attribute['body']['data']['collectionsUpdateBooleanAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -342,7 +342,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateFloatAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsCreateFloatAttribute']); return $data; } @@ -377,11 +377,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateFloatAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateFloatAttribute']['required']); - $this->assertEquals(100.0, $attribute['body']['data']['databasesUpdateFloatAttribute']['min']); - $this->assertEquals(1000000.0, $attribute['body']['data']['databasesUpdateFloatAttribute']['max']); - $this->assertEquals(2500.0, $attribute['body']['data']['databasesUpdateFloatAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['collectionsUpdateFloatAttribute']); + $this->assertFalse($attribute['body']['data']['collectionsUpdateFloatAttribute']['required']); + $this->assertEquals(100.0, $attribute['body']['data']['collectionsUpdateFloatAttribute']['min']); + $this->assertEquals(1000000.0, $attribute['body']['data']['collectionsUpdateFloatAttribute']['max']); + $this->assertEquals(2500.0, $attribute['body']['data']['collectionsUpdateFloatAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -412,7 +412,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateEmailAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsCreateEmailAttribute']); return $data; } @@ -445,9 +445,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateEmailAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateEmailAttribute']['required']); - $this->assertEquals('torsten@appwrite.io', $attribute['body']['data']['databasesUpdateEmailAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['collectionsUpdateEmailAttribute']); + $this->assertFalse($attribute['body']['data']['collectionsUpdateEmailAttribute']['required']); + $this->assertEquals('torsten@appwrite.io', $attribute['body']['data']['collectionsUpdateEmailAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -483,7 +483,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateEnumAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsCreateEnumAttribute']); return $data; } @@ -522,11 +522,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateEnumAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateEnumAttribute']['required']); - $this->assertEquals('tech', $attribute['body']['data']['databasesUpdateEnumAttribute']['default']); - $this->assertContains('tech', $attribute['body']['data']['databasesUpdateEnumAttribute']['elements']); - $this->assertNotContains('guest', $attribute['body']['data']['databasesUpdateEnumAttribute']['elements']); + $this->assertIsArray($attribute['body']['data']['collectionsUpdateEnumAttribute']); + $this->assertFalse($attribute['body']['data']['collectionsUpdateEnumAttribute']['required']); + $this->assertEquals('tech', $attribute['body']['data']['collectionsUpdateEnumAttribute']['default']); + $this->assertContains('tech', $attribute['body']['data']['collectionsUpdateEnumAttribute']['elements']); + $this->assertNotContains('guest', $attribute['body']['data']['collectionsUpdateEnumAttribute']['elements']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -557,7 +557,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateDatetimeAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsCreateDatetimeAttribute']); return $data; } @@ -590,9 +590,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateDatetimeAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateDatetimeAttribute']['required']); - $this->assertEquals('2000-01-01T00:00:00Z', $attribute['body']['data']['databasesUpdateDatetimeAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['collectionsUpdateDatetimeAttribute']); + $this->assertFalse($attribute['body']['data']['collectionsUpdateDatetimeAttribute']['required']); + $this->assertEquals('2000-01-01T00:00:00Z', $attribute['body']['data']['collectionsUpdateDatetimeAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -625,7 +625,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateRelationshipAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsCreateRelationshipAttribute']); return $data; } @@ -656,7 +656,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateRelationshipAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsUpdateRelationshipAttribute']); return $data; } @@ -687,7 +687,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateIpAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsCreateIpAttribute']); return $data; } @@ -720,9 +720,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateIpAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateIpAttribute']['required']); - $this->assertEquals('127.0.0.1', $attribute['body']['data']['databasesUpdateIpAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['collectionsUpdateIpAttribute']); + $this->assertFalse($attribute['body']['data']['collectionsUpdateIpAttribute']['required']); + $this->assertEquals('127.0.0.1', $attribute['body']['data']['collectionsUpdateIpAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -754,7 +754,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesCreateUrlAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsCreateUrlAttribute']); return $data; } @@ -787,9 +787,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesUpdateUrlAttribute']); - $this->assertFalse($attribute['body']['data']['databasesUpdateUrlAttribute']['required']); - $this->assertEquals('https://cloud.appwrite.io', $attribute['body']['data']['databasesUpdateUrlAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['collectionsUpdateUrlAttribute']); + $this->assertFalse($attribute['body']['data']['collectionsUpdateUrlAttribute']['required']); + $this->assertEquals('https://cloud.appwrite.io', $attribute['body']['data']['collectionsUpdateUrlAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); } @@ -823,12 +823,12 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['databasesCreateIndex']); + $this->assertIsArray($index['body']['data']['collectionsCreateIndex']); return [ 'database' => $data['database'], 'collection' => $data['collection'], - 'index' => $index['body']['data']['databasesCreateIndex'], + 'index' => $index['body']['data']['collectionsCreateIndex'], ]; } @@ -874,7 +874,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['databasesCreateDocument']; + $document = $document['body']['data']['collectionsCreateDocument']; $this->assertIsArray($document); return [ @@ -1042,7 +1042,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attributes['body']); $this->assertIsArray($attributes['body']['data']); - $this->assertIsArray($attributes['body']['data']['databasesListAttributes']); + $this->assertIsArray($attributes['body']['data']['collectionsListAttributes']); } /** @@ -1069,7 +1069,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['databasesGetAttribute']); + $this->assertIsArray($attribute['body']['data']['collectionsGetAttribute']); } /** @@ -1095,7 +1095,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $indices['body']); $this->assertIsArray($indices['body']['data']); - $this->assertIsArray($indices['body']['data']['databasesListIndexes']); + $this->assertIsArray($indices['body']['data']['collectionsListIndexes']); } /** @@ -1122,7 +1122,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['databasesGetIndex']); + $this->assertIsArray($index['body']['data']['collectionsGetIndex']); } /** @@ -1148,7 +1148,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $documents['body']); $this->assertIsArray($documents['body']['data']); - $this->assertIsArray($documents['body']['data']['databasesListDocuments']); + $this->assertIsArray($documents['body']['data']['collectionsListDocuments']); } /** @@ -1175,7 +1175,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $this->assertIsArray($document['body']['data']['databasesGetDocument']); + $this->assertIsArray($document['body']['data']['collectionsGetDocument']); } // /** @@ -1306,7 +1306,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['databasesUpdateDocument']; + $document = $document['body']['data']['collectionsUpdateDocument']; $this->assertIsArray($document); $this->assertStringContainsString('New Document Name', $document['data']); } From a067b77e90d737dfb2cc9644052e18b6cdfb5b55 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 9 May 2025 20:04:02 +0530 Subject: [PATCH 093/362] update: model; add|update: graphql tests [wip]. --- .../Http/Databases/Tables/Create.php | 2 +- .../Http/Databases/Tables/Update.php | 4 +- src/Appwrite/Utopia/Response/Model/Table.php | 8 +- .../Databases/Tables/DatabasesBase.php | 46 +- .../Tables/DatabasesConsoleClientTest.php | 4 +- .../Tables/DatabasesCustomClientTest.php | 28 +- .../Tables/DatabasesCustomServerTest.php | 24 +- .../Tables/DatabasesPermissionsGuestTest.php | 4 +- .../Tables/DatabasesPermissionsMemberTest.php | 6 +- tests/e2e/Services/GraphQL/Base.php | 450 ++++- .../GraphQL/{ => Collections}/AbuseTest.php | 5 +- .../GraphQL/{ => Collections}/AuthTest.php | 3 +- .../{ => Collections}/DatabaseClientTest.php | 3 +- .../{ => Collections}/DatabaseServerTest.php | 3 +- .../e2e/Services/GraphQL/Tables/AbuseTest.php | 185 +++ .../e2e/Services/GraphQL/Tables/AuthTest.php | 253 +++ .../GraphQL/Tables/DatabaseClientTest.php | 306 ++++ .../GraphQL/Tables/DatabaseServerTest.php | 1467 +++++++++++++++++ 18 files changed, 2732 insertions(+), 69 deletions(-) rename tests/e2e/Services/GraphQL/{ => Collections}/AbuseTest.php (97%) rename tests/e2e/Services/GraphQL/{ => Collections}/AuthTest.php (99%) rename tests/e2e/Services/GraphQL/{ => Collections}/DatabaseClientTest.php (99%) rename tests/e2e/Services/GraphQL/{ => Collections}/DatabaseServerTest.php (99%) create mode 100644 tests/e2e/Services/GraphQL/Tables/AbuseTest.php create mode 100644 tests/e2e/Services/GraphQL/Tables/AuthTest.php create mode 100644 tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php create mode 100644 tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index 0ca46f66e0..fcd52d4854 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -62,7 +62,7 @@ class Create extends CollectionCreate ->param('tableId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Table name. Max length: 128 chars.') ->param('permissions', null, 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 table level permissions to access a document. [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 document. [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) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index 85024e4008..70ac9d7b7c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -61,8 +61,8 @@ class Update extends CollectionUpdate ->param('tableId', '', new UID(), 'Table ID.') ->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.') ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, the current permissions are inherited. [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('rowSecurity', false, new Boolean(true), 'Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [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) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') diff --git a/src/Appwrite/Utopia/Response/Model/Table.php b/src/Appwrite/Utopia/Response/Model/Table.php index 1b890d9e60..722edcd4cf 100644 --- a/src/Appwrite/Utopia/Response/Model/Table.php +++ b/src/Appwrite/Utopia/Response/Model/Table.php @@ -54,9 +54,9 @@ class Table extends Model 'default' => true, 'example' => false, ]) - ->addRule('documentSecurity', [ + ->addRule('rowSecurity', [ 'type' => self::TYPE_BOOLEAN, - 'description' => 'Whether document-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions).', + 'description' => 'Whether row-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions).', 'default' => '', 'example' => true, ]) @@ -125,9 +125,13 @@ class Table extends Model $document->setAttribute('relatedTable', $related); } + $documentSecurity = $document->getAttribute('documentSecurity'); + $document->setAttribute('rowSecurity', $documentSecurity); + // remove anyways as they are already copied above. $document ->removeAttribute('attributes') + ->removeAttribute('documentSecurity') ->removeAttribute('relatedCollection'); return $document; diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Tables/DatabasesBase.php index 5532bbac46..ef35d3c962 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesBase.php @@ -52,7 +52,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'Movies', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), ], @@ -68,7 +68,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'Actors', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), ], @@ -136,7 +136,7 @@ trait DatabasesBase ]), [ 'name' => 'Movies', 'enabled' => false, - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(200, $response['headers']['status-code']); @@ -182,7 +182,7 @@ trait DatabasesBase ]), [ 'name' => 'Movies', 'enabled' => true, - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(200, $response['headers']['status-code']); @@ -418,7 +418,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'patch', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), ], @@ -489,7 +489,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'Players', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), ], @@ -542,7 +542,7 @@ trait DatabasesBase 'tableId' => ID::unique(), 'name' => 'Response Models', // 'permissions' missing on purpose to make sure it's optional - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $table['headers']['status-code']); @@ -2479,7 +2479,7 @@ trait DatabasesBase Permission::create(Role::any()), Permission::read(Role::any()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $table['headers']['status-code']); @@ -3146,7 +3146,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'enforceCollectionAndDocumentPermissions', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::read(Role::user($user)), Permission::create(Role::user($user)), @@ -3157,7 +3157,7 @@ trait DatabasesBase $this->assertEquals(201, $table['headers']['status-code']); $this->assertEquals($table['body']['name'], 'enforceCollectionAndDocumentPermissions'); - $this->assertEquals($table['body']['documentSecurity'], true); + $this->assertEquals($table['body']['rowSecurity'], true); $tableId = $table['body']['$id']; @@ -3349,7 +3349,7 @@ trait DatabasesBase $this->assertEquals(201, $table['headers']['status-code']); $this->assertEquals($table['body']['name'], 'enforceCollectionPermissions'); - $this->assertEquals($table['body']['documentSecurity'], false); + $this->assertEquals($table['body']['rowSecurity'], false); $tableId = $table['body']['$id']; @@ -3500,7 +3500,7 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ], [ 'name' => $table['body']['name'], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ @@ -3698,7 +3698,7 @@ trait DatabasesBase Permission::update(Role::user(ID::custom($this->getUser()['$id']))), Permission::delete(Role::user(ID::custom($this->getUser()['$id']))), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $movies['headers']['status-code']); @@ -3854,7 +3854,7 @@ trait DatabasesBase Permission::delete(Role::user($this->getUser()['$id'])), Permission::create(Role::user($this->getUser()['$id'])), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $person['headers']['status-code']); @@ -3871,7 +3871,7 @@ trait DatabasesBase Permission::update(Role::user($this->getUser()['$id'])), Permission::create(Role::user($this->getUser()['$id'])), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $library['headers']['status-code']); @@ -4238,7 +4238,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'Albums', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), @@ -4264,7 +4264,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'Artists', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), @@ -4382,7 +4382,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'Sports', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), @@ -4408,7 +4408,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'Players', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), @@ -4642,7 +4642,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'USA Presidents', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), ], @@ -4765,7 +4765,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'Collection1', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), @@ -4779,7 +4779,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'Collection2', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), @@ -4861,7 +4861,7 @@ trait DatabasesBase ]), [ 'tableId' => ID::unique(), 'name' => 'Slow Queries', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), ], diff --git a/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php index 48707d444b..087ece167f 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php @@ -46,7 +46,7 @@ class DatabasesConsoleClientTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $movies['headers']['status-code']); @@ -77,7 +77,7 @@ class DatabasesConsoleClientTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); /** diff --git a/tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php index ca8ae08ca0..6893588934 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php @@ -42,7 +42,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::unique(), 'name' => 'Movies', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::write(Role::user($this->getUser()['$id'])), ], @@ -141,7 +141,7 @@ class DatabasesCustomClientTest extends Scope 'tableId' => ID::custom('permissionCheck'), 'name' => 'permissionCheck', 'permissions' => [], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $response['headers']['status-code']); @@ -249,7 +249,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::unique(), 'name' => 'level1', - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), @@ -266,7 +266,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::unique(), 'name' => 'level2', - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), @@ -337,7 +337,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::unique(), 'name' => 'c1', - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), @@ -353,7 +353,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::unique(), 'name' => 'c2', - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), @@ -497,7 +497,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::custom('collection1'), 'name' => ID::custom('collection1'), - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), Permission::read(Role::user($userId)), @@ -513,7 +513,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::custom('collection2'), 'name' => ID::custom('collection2'), - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::read(Role::user($userId)), ] @@ -526,7 +526,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::custom('collection3'), 'name' => ID::custom('collection3'), - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), Permission::read(Role::user($userId)), @@ -541,7 +541,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::custom('collection4'), 'name' => ID::custom('collection4'), - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::read(Role::user($userId)), ] @@ -554,7 +554,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::custom('collection5'), 'name' => ID::custom('collection5'), - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), Permission::read(Role::user($userId)), @@ -741,7 +741,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::custom('collection3'), 'name' => ID::custom('collection3'), - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), Permission::read(Role::user($userId)), @@ -816,7 +816,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::custom('collection3'), 'name' => ID::custom('collection3'), - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), Permission::read(Role::user($userId)), @@ -832,7 +832,7 @@ class DatabasesCustomClientTest extends Scope ]), [ 'tableId' => ID::custom('collection2'), 'name' => ID::custom('collection2'), - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($userId)), Permission::update(Role::user($userId)), diff --git a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php index dca8a16363..a92f1decf1 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php @@ -365,7 +365,7 @@ class DatabasesCustomServerTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $test2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ @@ -381,7 +381,7 @@ class DatabasesCustomServerTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ @@ -586,7 +586,7 @@ class DatabasesCustomServerTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(409, $response['headers']['status-code']); @@ -665,7 +665,7 @@ class DatabasesCustomServerTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $actors['headers']['status-code']); @@ -775,7 +775,7 @@ class DatabasesCustomServerTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $actors['headers']['status-code']); @@ -1058,7 +1058,7 @@ class DatabasesCustomServerTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $table['headers']['status-code']); @@ -1251,7 +1251,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'tableId' => ID::unique(), 'name' => 'Collection1', - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [], ]); @@ -1262,7 +1262,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'tableId' => ID::unique(), 'name' => 'Collection2', - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [], ]); @@ -1326,7 +1326,7 @@ class DatabasesCustomServerTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $table['headers']['status-code']); @@ -1392,7 +1392,7 @@ class DatabasesCustomServerTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $table['headers']['status-code']); @@ -3632,7 +3632,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'tableId' => 'collection1', 'name' => 'level1', - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), @@ -3648,7 +3648,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'tableId' => 'collection2', 'name' => 'level2', - 'documentSecurity' => false, + 'rowSecurity' => false, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php index fa04ba04aa..fde6041219 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php @@ -45,7 +45,7 @@ class DatabasesPermissionsGuestTest extends Scope 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $publicCollection = ['id' => $publicMovies['body']['$id']]; @@ -246,7 +246,7 @@ class DatabasesPermissionsGuestTest extends Scope 'permissions' => [ Permission::create(Role::any()), ], - 'documentSecurity' => true + 'rowSecurity' => true ]); $moviesId = $movies['body']['$id']; diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php index 8da1d9e1ed..7b0e9d8a64 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php @@ -133,7 +133,7 @@ class DatabasesPermissionsMemberTest extends Scope Permission::update(Role::any()), Permission::delete(Role::any()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $public['headers']['status-code']); $this->collections = ['public' => $public['body']['$id']]; @@ -154,7 +154,7 @@ class DatabasesPermissionsMemberTest extends Scope Permission::update(Role::users()), Permission::delete(Role::users()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $private['headers']['status-code']); $this->collections['private'] = $private['body']['$id']; @@ -170,7 +170,7 @@ class DatabasesPermissionsMemberTest extends Scope 'tableId' => ID::unique(), 'name' => 'Document Only Movies', 'permissions' => [], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $private['headers']['status-code']); $this->collections['doconly'] = $doconly['body']['$id']; diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index f7ee14f7e1..65154e2f93 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -13,12 +13,21 @@ trait Base public static string $GET_DATABASE = 'get_database'; public static string $UPDATE_DATABASE = 'update_database'; public static string $DELETE_DATABASE = 'delete_database'; + // Collections public static string $CREATE_COLLECTION = 'create_collection'; public static string $GET_COLLECTION = 'get_collection'; public static string $GET_COLLECTIONS = 'list_collections'; public static string $UPDATE_COLLECTION = 'update_collection'; public static string $DELETE_COLLECTION = 'delete_collection'; + + // Tables + public static string $CREATE_TABLE = 'create_table'; + public static string $GET_TABLE = 'get_table'; + public static string $GET_TABLES = 'list_tables'; + public static string $UPDATE_TABLE = 'update_tables'; + public static string $DELETE_TABLE = 'delete_tables'; + // Attributes public static string $CREATE_STRING_ATTRIBUTE = 'create_string_attribute'; public static string $CREATE_INTEGER_ATTRIBUTE = 'create_integer_attribute'; @@ -45,11 +54,46 @@ trait Base public static string $GET_ATTRIBUTES = 'get_attributes'; public static string $GET_ATTRIBUTE = 'get_attribute'; public static string $DELETE_ATTRIBUTE = 'delete_attribute'; - // Indexes + + // Columns + public static string $CREATE_STRING_COLUMN = 'create_string_column'; + public static string $CREATE_INTEGER_COLUMN = 'create_integer_column'; + public static string $CREATE_FLOAT_COLUMN = 'create_float_column'; + public static string $CREATE_BOOLEAN_COLUMN = 'create_boolean_column'; + public static string $CREATE_URL_COLUMN = 'create_url_column'; + public static string $CREATE_EMAIL_COLUMN = 'create_email_column'; + public static string $CREATE_IP_COLUMN = 'create_ip_column'; + public static string $CREATE_ENUM_COLUMN = 'create_enum_column'; + public static string $CREATE_DATETIME_COLUMN = 'create_datetime_column'; + + public static string $CREATE_RELATIONSHIP_COLUMN = 'create_relationship_column'; + public static string $UPDATE_STRING_COLUMN = 'update_string_column'; + public static string $UPDATE_INTEGER_COLUMN = 'update_integer_column'; + public static string $UPDATE_FLOAT_COLUMN = 'update_float_column'; + public static string $UPDATE_BOOLEAN_COLUMN = 'update_boolean_column'; + public static string $UPDATE_URL_COLUMN = 'update_url_column'; + public static string $UPDATE_EMAIL_COLUMN = 'update_email_column'; + public static string $UPDATE_IP_COLUMN = 'update_ip_column'; + public static string $UPDATE_ENUM_COLUMN = 'update_enum_column'; + public static string $UPDATE_DATETIME_COLUMN = 'update_datetime_column'; + + public static string $UPDATE_RELATIONSHIP_COLUMN = 'update_relationship_column'; + public static string $GET_COLUMNS = 'get_columns'; + public static string $GET_COLUMN = 'get_column'; + public static string $DELETE_COLUMN = 'delete_column'; + + // Collection Indexes public static string $CREATE_INDEX = 'create_index'; public static string $GET_INDEXES = 'get_indexes'; public static string $GET_INDEX = 'get_index'; public static string $DELETE_INDEX = 'delete_index'; + + // Column Indexes + public static string $CREATE_COLUMN_INDEX = 'create_index'; + public static string $GET_COLUMN_INDEXES = 'get_indexes'; + public static string $GET_COLUMN_INDEX = 'get_index'; + public static string $DELETE_COLUMN_INDEX = 'delete_index'; + // Documents public static string $CREATE_DOCUMENT = 'create_document_rest'; public static string $GET_DOCUMENTS = 'list_documents'; @@ -57,6 +101,13 @@ trait Base public static string $UPDATE_DOCUMENT = 'update_document'; public static string $DELETE_DOCUMENT = 'delete_document'; + // Rows + public static string $CREATE_ROW = 'create_row_rest'; + public static string $GET_ROWS = 'list_rows'; + public static string $GET_ROW = 'get_row'; + public static string $UPDATE_ROW = 'update_row'; + public static string $DELETE_ROW = 'delete_row'; + // Custom Entities public static string $CREATE_CUSTOM_ENTITY = 'create_custom_entity'; public static string $GET_CUSTOM_ENTITIES = 'get_custom_entities'; @@ -257,7 +308,7 @@ trait Base // Complex queries public static string $COMPLEX_QUERY = 'complex_query'; - // Fragments + // Attribute Fragments public static string $FRAGMENT_ATTRIBUTES = ' fragment attributeProperties on Attributes { ... on AttributeString { @@ -332,6 +383,81 @@ trait Base } '; + // Column Fragments + public static string $FRAGMENT_COLUMNS = ' + fragment columnProperties on Columns { + ... on ColumnString { + key + required + array + status + default + size + } + ... on ColumnInteger { + key + required + array + status + intDefault: default + intMin: min + intMax: max + } + ... on ColumnFloat { + key + required + array + status + floatDefault: default + floatMin: min + floatMax: max + } + ... on ColumnBoolean { + key + required + array + status + boolDefault: default + } + ... on ColumnUrl { + key + required + array + status + default + } + ... on ColumnEmail { + key + required + array + status + default + } + ... on ColumnIp { + key + required + array + status + default + } + ... on ColumnEnum { + key + required + array + status + default + elements + } + ... on ColumnDatetime { + key + required + array + status + default + } + } + '; + public static string $FRAGMENT_HASH_OPTIONS = ' fragment options on HashOptions { ... on AlgoArgon2 { @@ -438,6 +564,51 @@ trait Base status } }'; + case self::$GET_TABLE: + return 'query getTable($databaseId: String!, $tableId: String!) { + databasesGetTable(databaseId: $databaseId, tableId: $tableId) { + _id + _permissions + rowSecurity + name + } + }'; + case self::$GET_TABLES: + return 'query listTables($databaseId: String!) { + databasesListTables(databaseId: $databaseId) { + total + tables { + _id + _permissions + rowSecurity + name + } + } + }'; + case self::$CREATE_TABLE: + return 'mutation createTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!]!) { + databasesCreateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions) { + _id + _permissions + rowSecurity + name + } + }'; + case self::$UPDATE_TABLE: + return 'mutation updateTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!], $enabled: Boolean) { + databasesUpdateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions, enabled: $enabled) { + _id + _permissions + rowSecurity + name + } + }'; + case self::$DELETE_TABLE: + return 'mutation deleteTable($databaseId: String!, $tableId: String!) { + databasesDeleteTable(databaseId: $databaseId, tableId: $tableId) { + status + } + }'; case self::$CREATE_STRING_ATTRIBUTE: return 'mutation createStringAttribute($databaseId: String!, $collectionId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ collectionsCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, size: $size, required: $required, default: $default, array: $array) { @@ -614,6 +785,182 @@ trait Base onDelete } }'; + case self::$CREATE_STRING_COLUMN: + return 'mutation createStringColumn($databaseId: String!, $tableId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ + tablesCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, size: $size, required: $required, default: $default, array: $array) { + key + required + default + array + } + }'; + case self::$CREATE_INTEGER_COLUMN: + return 'mutation createIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int, $max: Int, $default: Int, $array: Boolean){ + tablesCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + key + required + min + max + default + array + } + }'; + case self::$CREATE_FLOAT_COLUMN: + return 'mutation createFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float, $max: Float, $default: Float, $array: Boolean){ + tablesCreateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + key + required + min + max + default + array + } + }'; + case self::$CREATE_BOOLEAN_COLUMN: + return 'mutation createBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean, $array: Boolean){ + tablesCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + key + required + default + array + } + }'; + case self::$CREATE_URL_COLUMN: + return 'mutation createUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ + tablesCreateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + key + required + default + array + } + }'; + case self::$CREATE_EMAIL_COLUMN: + return 'mutation createEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ + tablesCreateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + key + required + default + array + } + }'; + case self::$CREATE_IP_COLUMN: + return 'mutation createIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ + tablesCreateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + key + required + default + array + } + }'; + case self::$CREATE_ENUM_COLUMN: + return 'mutation createEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String, $array: Boolean){ + tablesCreateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { + key + elements + required + default + array + } + }'; + case self::$CREATE_DATETIME_COLUMN: + return 'mutation createDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ + tablesCreateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + key + required + default + array + } + }'; + case self::$CREATE_RELATIONSHIP_COLUMN: + return 'mutation createRelationshipColumn($databaseId: String!, $tableId: String!, $relatedTableId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ + tablesCreateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, relatedTableId: $relatedTableId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { + relatedTable + relationType + twoWay + key + twoWayKey + onDelete + } + }'; + case self::$UPDATE_STRING_COLUMN: + return 'mutation updateStringColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ + tablesUpdateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + required + default + } + }'; + case self::$UPDATE_INTEGER_COLUMN: + return 'mutation updateIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int!, $max: Int!, $default: Int){ + tablesUpdateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, min: $min, max: $max, default: $default) { + required + min + max + default + } + }'; + case self::$UPDATE_FLOAT_COLUMN: + return 'mutation updateFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float!, $max: Float!, $default: Float){ + tablesUpdateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default) { + required + min + max + default + } + }'; + case self::$UPDATE_BOOLEAN_COLUMN: + return 'mutation updateBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean){ + tablesUpdateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + required + default + } + }'; + case self::$UPDATE_URL_COLUMN: + return 'mutation updateUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ + tablesUpdateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + required + default + } + }'; + case self::$UPDATE_EMAIL_COLUMN: + return 'mutation updateEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ + tablesUpdateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + required + default + } + }'; + case self::$UPDATE_IP_COLUMN: + return 'mutation updateIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ + tablesUpdateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + required + default + } + }'; + case self::$UPDATE_ENUM_COLUMN: + return 'mutation updateEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String){ + tablesUpdateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default) { + elements + required + default + } + }'; + case self::$UPDATE_DATETIME_COLUMN: + return 'mutation updateDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ + tablesUpdateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + required + default + } + }'; + case self::$UPDATE_RELATIONSHIP_COLUMN: + return 'mutation updateRelationshipColumn($databaseId: String!, $tableId: String!, $key: String!, $onDelete: String){ + tablesUpdateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, key: $key, onDelete: $onDelete) { + relatedTable + relationType + twoWay + key + twoWayKey + onDelete + } + }'; case self::$CREATE_INDEX: return 'mutation createIndex($databaseId: String!, $collectionId: String!, $key: String!, $type: String!, $attributes: [String!]!, $orders: [String!]){ collectionsCreateIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key, type: $type, attributes: $attributes, orders: $orders) { @@ -647,6 +994,39 @@ trait Base status } }'; + case self::$CREATE_COLUMN_INDEX: + return 'mutation createIndex($databaseId: String!, $tableId: String!, $key: String!, $type: String!, $attributes: [String!]!, $orders: [String!]){ + tablesCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, attributes: $attributes, orders: $orders) { + key + type + status + } + }'; + case self::$GET_COLUMN_INDEXES: + return 'query listIndexes($databaseId: String!, $tableId: String!) { + tablesListIndexes(databaseId: $databaseId, tableId: $tableId) { + total + indexes { + key + type + status + } + } + }'; + case self::$GET_COLUMN_INDEX: + return 'query getIndex($databaseId: String!, $tableId: String!, $key: String!) { + tablesGetIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { + key + type + status + } + }'; + case self::$DELETE_COLUMN_INDEX: + return 'mutation deleteIndex($databaseId: String!, $tableId: String!, $key: String!) { + tablesDeleteIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { + status + } + }'; case self::$GET_ATTRIBUTES: return 'query listAttributes($databaseId: String!, $collectionId: String!) { collectionsListAttributes(databaseId: $databaseId, collectionId: $collectionId) { @@ -668,6 +1048,28 @@ trait Base status } }'; + case self::$GET_COLUMNS: + return 'query listColumns($databaseId: String!, $tableId: String!) { + tablesListColumns(databaseId: $databaseId, tableId: $tableId) { + total + columns { + ...columnProperties + } + } + }' . PHP_EOL . self::$FRAGMENT_COLUMNS; + case self::$GET_COLUMN: + return 'query getColumn($databaseId: String!, $tableId: String!, $key: String!) { + tablesGetColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { + ...columnProperties + } + }' . PHP_EOL . self::$FRAGMENT_COLUMNS; + case self::$DELETE_COLUMN: + return 'mutation deleteColumn($databaseId: String!, $tableId: String!, $key: String!) { + tablesDeleteColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { + status + } + }'; + case self::$GET_DOCUMENT: return 'query getDocument($databaseId: String!, $collectionId: String!, $documentId: String!) { collectionsGetDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { @@ -697,6 +1099,35 @@ trait Base _permissions } }'; + case self::$GET_ROW: + return 'query getRow($databaseId: String!, $tableId: String!, $rowId: String!) { + tablesGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { + _id + _tableId + _permissions + data + } + }'; + case self::$GET_ROWS: + return 'query listRows($databaseId: String!, $tableId: String!) { + tablesListRows(databaseId: $databaseId, tableId: $tableId) { + total + rows { + _id + _tableId + _permissions + data + } + } + }'; + case self::$CREATE_ROW: + return 'mutation createRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]) { + tablesCreateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + _id + _tableId + _permissions + } + }'; case self::$CREATE_CUSTOM_ENTITY: return 'mutation createActor($name: String!, $age: Int!, $alive: Boolean!, $salary: Float, $email: String!, $role: String!, $dob: String!, $ip: String, $url: String){ actorsCreate(name: $name, age: $age, alive: $alive, salary: $salary, email: $email, role: $role, dob: $dob, ip: $ip, url: $url) { @@ -770,7 +1201,20 @@ trait Base status } }'; - + case self::$UPDATE_ROW: + return 'mutation updateRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]) { + tablesUpdateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + _id + _tableId + data + } + }'; + case self::$DELETE_ROW: + return 'mutation deleteRow($databaseId: String!, $tableId: String!, $rowId: String!) { + tablesDeleteRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { + status + } + }'; case self::$GET_USER: return 'query getUser($userId : String!) { usersGet(userId : $userId) { diff --git a/tests/e2e/Services/GraphQL/AbuseTest.php b/tests/e2e/Services/GraphQL/Collections/AbuseTest.php similarity index 97% rename from tests/e2e/Services/GraphQL/AbuseTest.php rename to tests/e2e/Services/GraphQL/Collections/AbuseTest.php index ea97492c2b..a45bebd714 100644 --- a/tests/e2e/Services/GraphQL/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/Collections/AbuseTest.php @@ -1,11 +1,12 @@ assertEquals('Too many queries.', $response['body']['message']); } - private function createCollection() + private function createCollection(): array { $projectId = $this->getProject()['$id']; $query = $this->getQuery(self::$CREATE_DATABASE); diff --git a/tests/e2e/Services/GraphQL/AuthTest.php b/tests/e2e/Services/GraphQL/Collections/AuthTest.php similarity index 99% rename from tests/e2e/Services/GraphQL/AuthTest.php rename to tests/e2e/Services/GraphQL/Collections/AuthTest.php index db56537999..288987a719 100644 --- a/tests/e2e/Services/GraphQL/AuthTest.php +++ b/tests/e2e/Services/GraphQL/Collections/AuthTest.php @@ -1,11 +1,12 @@ markTestSkipped('Abuse is not enabled.'); + } + } + + public function testRateLimitEnforced() + { + $data = $this->createCollection(); + $databaseId = $data['databaseId']; + $tableId = $data['tableId']; + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_ROW); + $max = 120; + + for ($i = 0; $i <= $max + 1; $i++) { + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $databaseId, + 'tableId' => $tableId, + 'rowId' => ID::unique(), + 'data' => [ + 'name' => 'John Doe', + ], + ], + ]; + + $response = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $gqlPayload); + + if ($i < $max) { + $this->assertArrayNotHasKey('errors', $response['body']); + } else { + $this->assertArrayHasKey('errors', $response['body']); + } + } + } + + public function testComplexQueryBlocked() + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$COMPLEX_QUERY); + $graphQLPayload = [ + 'query' => $query, + 'variables' => [ + 'userId' => 'user', + 'email' => 'user@appwrite.io', + 'password' => 'password', + 'databaseId' => 'database', + 'databaseName' => 'database', + 'tableId' => 'table', + 'collectionName' => 'table', + 'collectionPermissions' => [ + Permission::read(Role::users()), + Permission::create(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + 'rowSecurity' => false, + ], + ]; + + $response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $graphQLPayload); + + $max = System::getEnv('_APP_GRAPHQL_MAX_QUERY_COMPLEXITY', 250); + + $this->assertEquals('Max query complexity should be ' . $max . ' but got 259.', $response['body']['errors'][0]['message']); + } + + public function testTooManyQueriesBlocked() + { + $projectId = $this->getProject()['$id']; + $maxQueries = System::getEnv('_APP_GRAPHQL_MAX_QUERIES', 10); + + $query = []; + for ($i = 0; $i <= $maxQueries + 1; $i++) { + $query[] = ['query' => $this->getQuery(self::$LIST_COUNTRIES)]; + } + + $response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $query); + + $this->assertEquals('Too many queries.', $response['body']['message']); + } + + private function createCollection(): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_DATABASE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => 'actors', + 'name' => 'AbuseDatabase', + ] + ]; + + $response = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $gqlPayload); + + $databaseId = $response['body']['data']['databasesCreate']['_id']; + + $query = $this->getQuery(self::$CREATE_TABLE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $databaseId, + 'tableId' => 'actors', + 'name' => 'Actors', + 'rowSecurity' => false, + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + ], + ] + ]; + + $response = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $gqlPayload); + + $tableId = $response['body']['data']['databasesCreateTable']['_id']; + + $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $databaseId, + 'tableId' => $tableId, + 'key' => 'name', + 'size' => 256, + 'required' => true, + ] + ]; + + $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $gqlPayload); + + sleep(2); + + return [ + 'databaseId' => $databaseId, + 'tableId' => $tableId, + ]; + } +} diff --git a/tests/e2e/Services/GraphQL/Tables/AuthTest.php b/tests/e2e/Services/GraphQL/Tables/AuthTest.php new file mode 100644 index 0000000000..681607d599 --- /dev/null +++ b/tests/e2e/Services/GraphQL/Tables/AuthTest.php @@ -0,0 +1,253 @@ +getProject()['$id']; + $query = $this->getQuery(self::$CREATE_ACCOUNT); + + $email1 = 'test' . \rand() . '@test.com'; + $email2 = 'test' . \rand() . '@test.com'; + + // Create account 1 + $graphQLPayload = [ + 'query' => $query, + 'variables' => [ + 'userId' => ID::unique(), + 'name' => 'User Name', + 'email' => $email1, + 'password' => 'password', + ], + ]; + $this->account1 = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $graphQLPayload); + + // Create account 2 + $graphQLPayload['variables']['userId'] = ID::unique(); + $graphQLPayload['variables']['email'] = $email2; + + $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $graphQLPayload); + + // Create session 1 + $query = $this->getQuery(self::$CREATE_ACCOUNT_SESSION); + $graphQLPayload = [ + 'query' => $query, + 'variables' => [ + 'email' => $email1, + 'password' => 'password', + ] + ]; + $session1 = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $graphQLPayload); + + $this->token1 = $session1['cookies']['a_session_' . $projectId]; + + // Create session 2 + $graphQLPayload['variables']['email'] = $email2; + + $session2 = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $graphQLPayload); + + $this->token2 = $session2['cookies']['a_session_' . $projectId]; + + // Create database + $query = $this->getQuery(self::$CREATE_DATABASE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => ID::unique(), + 'name' => 'Actors', + ] + ]; + $this->database = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $gqlPayload); + + // Create table + $query = $this->getQuery(self::$CREATE_TABLE); + $userId = $this->account1['body']['data']['accountCreate']['_id']; + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], + 'tableId' => ID::unique(), + 'name' => 'Actors', + 'rowSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($userId)) + ] + ] + ]; + $this->table = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $gqlPayload); + + // Create string attribute + $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], + 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'key' => 'name', + 'size' => 256, + 'required' => true, + ] + ]; + $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $gqlPayload); + + sleep(1); + } + + public function testInvalidAuth() + { + $projectId = $this->getProject()['$id']; + + // Create row as account 1 + $query = $this->getQuery(self::$CREATE_ROW); + $userId = $this->account1['body']['data']['accountCreate']['_id']; + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], + 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'rowId' => ID::unique(), + 'data' => [ + 'name' => 'John Doe', + ], + 'permissions' => [ + Permission::read(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::delete(Role::user($userId)), + ] + ] + ]; + $row = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, + ], $gqlPayload); + + // Try to read as account 1 + $query = $this->getQuery(self::$GET_ROW); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], + 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'rowId' => $row['body']['data']['tablesCreateRow']['_id'], + ] + ]; + $row = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, + ], $gqlPayload); + + $this->assertIsArray($row['body']['data']['tablesGetRow']); + $this->assertArrayNotHasKey('errors', $row['body']); + + // Try to read as account 2 + $row = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'cookie' => 'a_session_' . $projectId . '=' . $this->token2, + ], $gqlPayload); + + $this->assertArrayHasKey('errors', $row['body']); + $this->assertEquals('Row with the requested ID could not be found.', $row['body']['errors'][0]['message']); + } + + public function testValidAuth() + { + $projectId = $this->getProject()['$id']; + + // Create row as account 1 + $query = $this->getQuery(self::$CREATE_ROW); + $userId = $this->account1['body']['data']['accountCreate']['_id']; + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], + 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'rowId' => ID::unique(), + 'data' => [ + 'name' => 'John Doe', + ], + 'permissions' => [ + Permission::read(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::delete(Role::user($userId)), + ], + ] + ]; + $row = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, + ], $gqlPayload); + + // Try to delete as account 1 + $query = $this->getQuery(self::$DELETE_ROW); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], + 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'rowId' => $row['body']['data']['tablesCreateRow']['_id'], + ] + ]; + $row = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, + ], $gqlPayload); + + $this->assertIsNotArray($row['body']); + $this->assertEquals(204, $row['headers']['status-code']); + } +} diff --git a/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php new file mode 100644 index 0000000000..3296f2d622 --- /dev/null +++ b/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php @@ -0,0 +1,306 @@ +getProject()['$id']; + $query = $this->getQuery(self::$CREATE_DATABASE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => ID::unique(), + 'name' => 'Actors', + ] + ]; + + $database = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $gqlPayload); + + $this->assertIsArray($database['body']['data']); + $this->assertArrayNotHasKey('errors', $database['body']); + $database = $database['body']['data']['databasesCreate']; + $this->assertEquals('Actors', $database['name']); + + return $database; + } + + /** + * @depends testCreateDatabase + */ + public function testCreateTable($database): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_TABLE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $database['_id'], + 'tableId' => 'actors', + 'name' => 'Actors', + 'rowSecurity' => false, + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ] + ]; + + $table = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $gqlPayload); + + $this->assertIsArray($table['body']['data']); + $this->assertArrayNotHasKey('errors', $table['body']); + $table = $table['body']['data']['databasesCreateTable']; + $this->assertEquals('Actors', $table['name']); + + return [ + 'table' => $table, + 'database' => $database, + ]; + } + + /** + * @depends testCreateTable + */ + public function testCreateStringColumn($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'name', + 'size' => 256, + 'required' => true, + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['tablesCreateStringColumn']); + + return $data; + } + + /** + * @depends testCreateTable + */ + public function testCreateIntegerColumn($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_INTEGER_COLUMN); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'age', + 'min' => 18, + 'max' => 150, + 'required' => true, + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['tablesCreateIntegerColumn']); + + return $data; + } + + /** + * @depends testCreateStringColumn + * @depends testCreateIntegerColumn + */ + public function testCreateRow($data): array + { + sleep(1); + + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_ROW); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => ID::unique(), + 'data' => [ + 'name' => 'John Doe', + 'age' => 35, + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ] + ]; + + $row = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $row['body']); + $this->assertIsArray($row['body']['data']); + + $row = $row['body']['data']['tablesCreateRow']; + $this->assertIsArray($row); + + return [ + 'database' => $data['database'], + 'table' => $data['table'], + 'row' => $row, + ]; + } + + /** + * @depends testCreateTable + * @throws \Exception + */ + public function testGetRows($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$GET_ROWS); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + ] + ]; + + $rows = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $rows['body']); + $this->assertIsArray($rows['body']['data']); + $this->assertIsArray($rows['body']['data']['tablesListRows']); + } + + /** + * @depends testCreateRow + * @throws \Exception + */ + public function testGetDocument($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$GET_ROW); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => $data['row']['_id'], + ] + ]; + + $row = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $row['body']); + $this->assertIsArray($row['body']['data']); + $this->assertIsArray($row['body']['data']['tablesGetRow']); + } + + /** + * @depends testCreateRow + * @throws \Exception + */ + public function testUpdateRow($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_ROW); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => $data['row']['_id'], + 'data' => [ + 'name' => 'New Row Name', + ], + ] + ]; + + $row = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $row['body']); + $this->assertIsArray($row['body']['data']); + $row = $row['body']['data']['tablesUpdateRow']; + $this->assertIsArray($row); + + $this->assertStringContainsString('New Row Name', $row['data']); + } + + /** + * @depends testCreateRow + * @throws \Exception + */ + public function testDeleteRow($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$DELETE_ROW); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => $data['row']['_id'], + ] + ]; + + $row = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsNotArray($row['body']); + $this->assertEquals(204, $row['headers']['status-code']); + } +} diff --git a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php new file mode 100644 index 0000000000..d5980a4096 --- /dev/null +++ b/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php @@ -0,0 +1,1467 @@ +getProject()['$id']; + $query = $this->getQuery(self::$CREATE_DATABASE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => 'actors', + 'name' => 'Actors', + ] + ]; + + $database = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($database['body']['data']); + $this->assertArrayNotHasKey('errors', $database['body']); + $database = $database['body']['data']['databasesCreate']; + $this->assertEquals('Actors', $database['name']); + + return $database; + } + + /** + * @depends testCreateDatabase + */ + public function testCreateCollection($database): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_COLLECTION); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $database['_id'], + 'tableId' => 'actors', + 'name' => 'Actors', + 'rowSecurity' => false, + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ] + ]; + + $table = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($table['body']['data']); + $this->assertArrayNotHasKey('errors', $table['body']); + $table = $table['body']['data']['databasesCreateCollection']; + $this->assertEquals('Actors', $table['name']); + + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $database['_id'], + 'tableId' => 'movies', + 'name' => 'Movies', + 'rowSecurity' => false, + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ] + ]; + + $table2 = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($table2['body']['data']); + $this->assertArrayNotHasKey('errors', $table2['body']); + $table2 = $table2['body']['data']['databasesCreateCollection']; + $this->assertEquals('Movies', $table2['name']); + + return [ + 'database' => $database, + 'table' => $table, + 'collection2' => $table2, + ]; + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testCreateStringAttribute($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'name', + 'size' => 256, + 'required' => true, + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsCreateStringAttribute']); + + return $data; + } + + /** + * @depends testCreateStringAttribute + * @throws Exception + */ + public function testUpdateStringAttribute($data): array + { + // Wait for attributes to be available + sleep(1); + + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_STRING_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'name', + 'required' => false, + 'default' => 'Default Value', + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsUpdateStringAttribute']); + $this->assertFalse($column['body']['data']['collectionsUpdateStringAttribute']['required']); + $this->assertEquals('Default Value', $column['body']['data']['collectionsUpdateStringAttribute']['default']); + $this->assertEquals(200, $column['headers']['status-code']); + + return $data; + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testCreateIntegerAttribute($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_INTEGER_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'age', + 'min' => 18, + 'max' => 150, + 'required' => true, + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsCreateIntegerAttribute']); + + return $data; + } + + /** + * @depends testCreateIntegerAttribute + * @throws Exception + */ + public function testUpdateIntegerAttribute($data): array + { + // Wait for attributes to be available + sleep(1); + + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_INTEGER_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'age', + 'required' => false, + 'min' => 12, + 'max' => 160, + 'default' => 50 + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsUpdateIntegerAttribute']); + $this->assertFalse($column['body']['data']['collectionsUpdateIntegerAttribute']['required']); + $this->assertEquals(12, $column['body']['data']['collectionsUpdateIntegerAttribute']['min']); + $this->assertEquals(160, $column['body']['data']['collectionsUpdateIntegerAttribute']['max']); + $this->assertEquals(50, $column['body']['data']['collectionsUpdateIntegerAttribute']['default']); + $this->assertEquals(200, $column['headers']['status-code']); + + return $data; + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testCreateBooleanAttribute($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_BOOLEAN_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'alive', + 'required' => true, + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsCreateBooleanAttribute']); + + return $data; + } + + /** + * @depends testCreateBooleanAttribute + * @throws Exception + */ + public function testUpdateBooleanAttribute($data): array + { + // Wait for attributes to be available + sleep(1); + + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_BOOLEAN_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'alive', + 'required' => false, + 'default' => true + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsUpdateBooleanAttribute']); + $this->assertFalse($column['body']['data']['collectionsUpdateBooleanAttribute']['required']); + $this->assertTrue($column['body']['data']['collectionsUpdateBooleanAttribute']['default']); + $this->assertEquals(200, $column['headers']['status-code']); + + return $data; + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testCreateFloatAttribute($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_FLOAT_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'salary', + 'min' => 1000.0, + 'max' => 999999.99, + 'default' => 1000.0, + 'required' => false, + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsCreateFloatAttribute']); + + return $data; + } + + /** + * @depends testCreateFloatAttribute + * @throws Exception + */ + public function testUpdateFloatAttribute($data): array + { + // Wait for attributes to be available + sleep(1); + + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_FLOAT_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'salary', + 'required' => false, + 'min' => 100.0, + 'max' => 1000000.0, + 'default' => 2500.0 + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsUpdateFloatAttribute']); + $this->assertFalse($column['body']['data']['collectionsUpdateFloatAttribute']['required']); + $this->assertEquals(100.0, $column['body']['data']['collectionsUpdateFloatAttribute']['min']); + $this->assertEquals(1000000.0, $column['body']['data']['collectionsUpdateFloatAttribute']['max']); + $this->assertEquals(2500.0, $column['body']['data']['collectionsUpdateFloatAttribute']['default']); + $this->assertEquals(200, $column['headers']['status-code']); + + return $data; + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testCreateEmailAttribute($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_EMAIL_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'email', + 'required' => true, + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsCreateEmailAttribute']); + + return $data; + } + + /** + * @depends testCreateEmailAttribute + * @throws Exception + */ + public function testUpdateEmailAttribute($data): array + { + // Wait for attributes to be available + sleep(1); + + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_EMAIL_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'email', + 'required' => false, + 'default' => 'torsten@appwrite.io', + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsUpdateEmailAttribute']); + $this->assertFalse($column['body']['data']['collectionsUpdateEmailAttribute']['required']); + $this->assertEquals('torsten@appwrite.io', $column['body']['data']['collectionsUpdateEmailAttribute']['default']); + $this->assertEquals(200, $column['headers']['status-code']); + + return $data; + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testCreateEnumAttribute($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_ENUM_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'role', + 'elements' => [ + 'crew', + 'actor', + 'guest', + ], + 'required' => true, + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsCreateEnumAttribute']); + + return $data; + } + + + /** + * @depends testCreateEnumAttribute + * @throws Exception + */ + public function testUpdateEnumAttribute($data): array + { + // Wait for attributes to be available + sleep(1); + + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_ENUM_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'role', + 'required' => false, + 'elements' => [ + 'crew', + 'tech', + 'actor' + ], + 'default' => 'tech' + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsUpdateEnumAttribute']); + $this->assertFalse($column['body']['data']['collectionsUpdateEnumAttribute']['required']); + $this->assertEquals('tech', $column['body']['data']['collectionsUpdateEnumAttribute']['default']); + $this->assertContains('tech', $column['body']['data']['collectionsUpdateEnumAttribute']['elements']); + $this->assertNotContains('guest', $column['body']['data']['collectionsUpdateEnumAttribute']['elements']); + $this->assertEquals(200, $column['headers']['status-code']); + + return $data; + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testCreateDatetimeAttribute($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_DATETIME_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'dob', + 'required' => true, + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsCreateDatetimeAttribute']); + + return $data; + } + + /** + * @depends testCreateDatetimeAttribute + * @throws Exception + */ + public function testUpdateDatetimeAttribute($data): array + { + // Wait for attributes to be available + sleep(1); + + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_DATETIME_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'dob', + 'required' => false, + 'default' => '2000-01-01T00:00:00Z' + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsUpdateDatetimeAttribute']); + $this->assertFalse($column['body']['data']['collectionsUpdateDatetimeAttribute']['required']); + $this->assertEquals('2000-01-01T00:00:00Z', $column['body']['data']['collectionsUpdateDatetimeAttribute']['default']); + $this->assertEquals(200, $column['headers']['status-code']); + + return $data; + } + + /** + * @depends testCreateCollection + */ + public function testCreateRelationshipAttribute(array $data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_RELATIONSHIP_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['collection2']['_id'], // Movies + 'relatedCollectionId' => $data['table']['_id'], // Actors + 'type' => Database::RELATION_ONE_TO_MANY, + 'twoWay' => true, + 'key' => 'actors', + 'twoWayKey' => 'movie' + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsCreateRelationshipAttribute']); + + return $data; + } + + /** + * @depends testCreateRelationshipAttribute + */ + public function testUpdateRelationshipAttribute(array $data): array + { + sleep(1); + + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_RELATIONSHIP_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['collection2']['_id'], + 'key' => 'actors', + 'onDelete' => Database::RELATION_MUTATE_CASCADE, + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsUpdateRelationshipAttribute']); + + return $data; + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testCreateIPAttribute($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_IP_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'ip', + 'required' => false, + 'default' => '::1', + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsCreateIpAttribute']); + + return $data; + } + + /** + * @depends testCreateIPAttribute + * @throws Exception + */ + public function testUpdateIPAttribute($data): array + { + // Wait for attributes to be available + sleep(3); + + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_IP_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'ip', + 'required' => false, + 'default' => '127.0.0.1' + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsUpdateIpAttribute']); + $this->assertFalse($column['body']['data']['collectionsUpdateIpAttribute']['required']); + $this->assertEquals('127.0.0.1', $column['body']['data']['collectionsUpdateIpAttribute']['default']); + $this->assertEquals(200, $column['headers']['status-code']); + + return $data; + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testCreateURLAttribute($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_URL_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'url', + 'required' => false, + 'default' => 'https://appwrite.io', + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsCreateUrlAttribute']); + + return $data; + } + + /** + * @depends testCreateURLAttribute + * @throws Exception + */ + public function testUpdateURLAttribute($data): void + { + // Wait for attributes to be available + sleep(3); + + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_URL_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'url', + 'required' => false, + 'default' => 'https://cloud.appwrite.io' + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsUpdateUrlAttribute']); + $this->assertFalse($column['body']['data']['collectionsUpdateUrlAttribute']['required']); + $this->assertEquals('https://cloud.appwrite.io', $column['body']['data']['collectionsUpdateUrlAttribute']['default']); + $this->assertEquals(200, $column['headers']['status-code']); + } + + /** + * @depends testUpdateStringAttribute + * @depends testUpdateIntegerAttribute + * @throws Exception + */ + public function testCreateIndex($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_INDEX); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'index', + 'type' => 'key', + 'attributes' => [ + 'name', + 'age', + ], + ] + ]; + + $index = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $index['body']); + $this->assertIsArray($index['body']['data']); + $this->assertIsArray($index['body']['data']['collectionsCreateIndex']); + + return [ + 'database' => $data['database'], + 'table' => $data['table'], + 'index' => $index['body']['data']['collectionsCreateIndex'], + ]; + } + + /** + * @depends testUpdateStringAttribute + * @depends testUpdateIntegerAttribute + * @depends testUpdateBooleanAttribute + * @depends testUpdateEnumAttribute + * @throws Exception + */ + public function testCreateDocument($data): array + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$CREATE_DOCUMENT); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => ID::unique(), + 'data' => [ + 'name' => 'John Doe', + 'email' => 'example@appwrite.io', + 'age' => 30, + 'alive' => true, + 'salary' => 9999.9, + 'role' => 'crew', + 'dob' => '2000-01-01T00:00:00Z', + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ] + ]; + + $row = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $row['body']); + $this->assertIsArray($row['body']['data']); + + $row = $row['body']['data']['collectionsCreateDocument']; + $this->assertIsArray($row); + + return [ + 'database' => $data['database'], + 'table' => $data['table'], + 'row' => $row, + ]; + } + + // /** + // * @depends testCreateStringAttribute + // * @depends testCreateIntegerAttribute + // * @depends testCreateBooleanAttribute + // * @depends testCreateFloatAttribute + // * @depends testCreateEmailAttribute + // * @depends testCreateEnumAttribute + // * @depends testCreateDatetimeAttribute + // * @throws Exception + // */ + // public function testCreateCustomEntity(): array + // { + // $projectId = $this->getProject()['$id']; + // $query = $this->getQuery(self::$CREATE_CUSTOM_ENTITY); + // $gqlPayload = [ + // 'query' => $query, + // 'variables' => [ + // 'name' => 'John Doe', + // 'age' => 35, + // 'alive' => true, + // 'salary' => 9999.9, + // 'email' => 'johndoe@appwrite.io', + // 'role' => 'crew', + // 'dob' => '2000-01-01T00:00:00Z', + // ] + // ]; + // + // $actor = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + // 'content-type' => 'application/json', + // 'x-appwrite-project' => $projectId, + // ], $this->getHeaders()), $gqlPayload); + // + // $this->assertArrayNotHasKey('errors', $actor['body']); + // $this->assertIsArray($actor['body']['data']); + // $actor = $actor['body']['data']['actorsCreate']; + // $this->assertIsArray($actor); + // + // return $actor; + // } + + public function testGetDatabases(): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$GET_DATABASES); + $gqlPayload = [ + 'query' => $query, + ]; + + $databases = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $databases['body']); + $this->assertIsArray($databases['body']['data']); + $this->assertIsArray($databases['body']['data']['databasesList']); + } + + /** + * @depends testCreateDatabase + * @throws Exception + */ + public function testGetDatabase($database): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$GET_DATABASE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $database['_id'], + ] + ]; + + $database = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $database['body']); + $this->assertIsArray($database['body']['data']); + $this->assertIsArray($database['body']['data']['databasesGet']); + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testGetCollections($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$GET_COLLECTIONS); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + ] + ]; + + $tables = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $tables['body']); + $this->assertIsArray($tables['body']['data']); + $this->assertIsArray($tables['body']['data']['databasesListCollections']); + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testGetCollection($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$GET_COLLECTION); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + ] + ]; + + $table = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $table['body']); + $this->assertIsArray($table['body']['data']); + $this->assertIsArray($table['body']['data']['databasesGetCollection']); + } + + /** + * @depends testUpdateStringAttribute + * @depends testUpdateIntegerAttribute + * @throws Exception + */ + public function testGetAttributes($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$GET_ATTRIBUTES); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + ] + ]; + + $columns = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $columns['body']); + $this->assertIsArray($columns['body']['data']); + $this->assertIsArray($columns['body']['data']['collectionsListAttributes']); + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testGetAttribute($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$GET_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'name', + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $column['body']); + $this->assertIsArray($column['body']['data']); + $this->assertIsArray($column['body']['data']['collectionsGetAttribute']); + } + + /** + * @depends testCreateIndex + * @throws Exception + */ + public function testGetIndexes($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$GET_INDEXES); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + ] + ]; + + $indices = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $indices['body']); + $this->assertIsArray($indices['body']['data']); + $this->assertIsArray($indices['body']['data']['collectionsListIndexes']); + } + + /** + * @depends testCreateIndex + * @throws Exception + */ + public function testGetIndex($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$GET_INDEX); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => $data['index']['key'], + ] + ]; + + $index = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $index['body']); + $this->assertIsArray($index['body']['data']); + $this->assertIsArray($index['body']['data']['collectionsGetIndex']); + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testGetDocuments($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$GET_DOCUMENTS); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + ] + ]; + + $rows = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $rows['body']); + $this->assertIsArray($rows['body']['data']); + $this->assertIsArray($rows['body']['data']['collectionsListDocuments']); + } + + /** + * @depends testCreateDocument + * @throws Exception + */ + public function testGetDocument($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$GET_DOCUMENT); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => $data['row']['_id'], + ] + ]; + + $row = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $row['body']); + $this->assertIsArray($row['body']['data']); + $this->assertIsArray($row['body']['data']['collectionsGetDocument']); + } + + // /** + // * @depends testCreateCustomEntity + // * @throws Exception + // */ + // public function testGetCustomEntities($data) + // { + // $projectId = $this->getProject()['$id']; + // $query = $this->getQuery(self::$GET_CUSTOM_ENTITIES); + // $gqlPayload = [ + // 'query' => $query, + // ]; + // + // $customEntities = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + // 'content-type' => 'application/json', + // 'x-appwrite-project' => $projectId, + // ], $this->getHeaders()), $gqlPayload); + // + // $this->assertArrayNotHasKey('errors', $customEntities['body']); + // $this->assertIsArray($customEntities['body']['data']); + // $this->assertIsArray($customEntities['body']['data']['actorsList']); + // } + // + // /** + // * @depends testCreateCustomEntity + // * @throws Exception + // */ + // public function testGetCustomEntity($data) + // { + // $projectId = $this->getProject()['$id']; + // $query = $this->getQuery(self::$GET_CUSTOM_ENTITY); + // $gqlPayload = [ + // 'query' => $query, + // 'variables' => [ + // 'id' => $data['id'], + // ] + // ]; + // + // $entity = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + // 'content-type' => 'application/json', + // 'x-appwrite-project' => $projectId, + // ], $this->getHeaders()), $gqlPayload); + // + // $this->assertArrayNotHasKey('errors', $entity['body']); + // $this->assertIsArray($entity['body']['data']); + // $this->assertIsArray($entity['body']['data']['actorsGet']); + // } + + /** + * @depends testCreateDatabase + * @throws Exception + */ + public function testUpdateDatabase($database) + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_DATABASE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $database['_id'], + 'name' => 'New Database Name', + ] + ]; + + $database = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $database['body']); + $this->assertIsArray($database['body']['data']); + $this->assertIsArray($database['body']['data']['databasesUpdate']); + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testUpdateCollection($data) + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_COLLECTION); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'name' => 'New Collection Name', + 'rowSecurity' => false, + ] + ]; + + $table = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $table['body']); + $this->assertIsArray($table['body']['data']); + $this->assertIsArray($table['body']['data']['databasesUpdateCollection']); + } + + /** + * @depends testCreateDocument + * @throws Exception + */ + public function testUpdateDocument($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$UPDATE_DOCUMENT); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => $data['row']['_id'], + 'data' => [ + 'name' => 'New Document Name', + ], + ] + ]; + + $row = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $row['body']); + $this->assertIsArray($row['body']['data']); + $row = $row['body']['data']['collectionsUpdateDocument']; + $this->assertIsArray($row); + $this->assertStringContainsString('New Document Name', $row['data']); + } + + // /** + // * @depends testCreateCustomEntity + // * @throws Exception + // */ + // public function testUpdateCustomEntity(array $data) + // { + // $projectId = $this->getProject()['$id']; + // $query = $this->getQuery(self::$UPDATE_CUSTOM_ENTITY); + // $gqlPayload = [ + // 'query' => $query, + // 'variables' => [ + // 'id' => $data['id'], + // 'name' => 'New Custom Entity Name', + // ] + // ]; + // + // $entity = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + // 'content-type' => 'application/json', + // 'x-appwrite-project' => $projectId, + // ], $this->getHeaders()), $gqlPayload); + // + // $this->assertArrayNotHasKey('errors', $entity['body']); + // $this->assertIsArray($entity['body']['data']); + // $entity = $entity['body']['data']['actorsUpdate']; + // $this->assertIsArray($entity); + // $this->assertStringContainsString('New Custom Entity Name', $entity['name']); + // } + + /** + * @depends testCreateDocument + * @throws Exception + */ + public function testDeleteDocument($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$DELETE_DOCUMENT); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'rowId' => $data['row']['_id'], + ] + ]; + + $row = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsNotArray($row['body']); + $this->assertEquals(204, $row['headers']['status-code']); + } + + // /** + // * @depends testCreateCustomEntity + // * @throws Exception + // */ + // public function testDeleteCustomEntity(array $data) + // { + // $projectId = $this->getProject()['$id']; + // $query = $this->getQuery(self::$DELETE_CUSTOM_ENTITY); + // $gqlPayload = [ + // 'query' => $query, + // 'variables' => [ + // 'id' => $data['id'], + // ] + // ]; + // + // $entity = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + // 'content-type' => 'application/json', + // 'x-appwrite-project' => $projectId, + // ], $this->getHeaders()), $gqlPayload); + // + // $this->assertIsNotArray($entity['body']); + // $this->assertEquals(204, $entity['headers']['status-code']); + // } + + /** + * @depends testUpdateStringAttribute + * @throws Exception + */ + public function testDeleteAttribute($data): void + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$DELETE_ATTRIBUTE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + 'key' => 'name', + ] + ]; + + $column = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsNotArray($column['body']); + $this->assertEquals(204, $column['headers']['status-code']); + } + + /** + * @depends testCreateCollection + * @throws Exception + */ + public function testDeleteCollection($data) + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$DELETE_COLLECTION); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['database']['_id'], + 'tableId' => $data['table']['_id'], + ] + ]; + + $table = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsNotArray($table['body']); + $this->assertEquals(204, $table['headers']['status-code']); + } + + /** + * @depends testCreateDatabase + * @throws Exception + */ + public function testDeleteDatabase($database) + { + $projectId = $this->getProject()['$id']; + $query = $this->getQuery(self::$DELETE_DATABASE); + $gqlPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $database['_id'], + ] + ]; + + $database = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $gqlPayload); + + $this->assertIsNotArray($database['body']); + $this->assertEquals(204, $database['headers']['status-code']); + } +} From d1ae06550fe317109672d50888d39bd460be042e Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 10:09:43 +0530 Subject: [PATCH 094/362] update: realtime events logic. --- src/Appwrite/Event/Realtime.php | 70 +++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 25 deletions(-) diff --git a/src/Appwrite/Event/Realtime.php b/src/Appwrite/Event/Realtime.php index f45b6548d8..016006ae73 100644 --- a/src/Appwrite/Event/Realtime.php +++ b/src/Appwrite/Event/Realtime.php @@ -72,32 +72,11 @@ class Realtime extends Event return false; } - $allEvents = Event::generateEvents($this->getEvent(), $this->getParams()); - $firstEvent = $allEvents[0]; // most verbose event pattern + $events = Event::generateEvents($this->getEvent(), $this->getParams()); + $firstEvent = $events[0]; // most verbose event pattern // generate and merge all collection and tables api events. - if (str_contains($this->getEvent(), 'databases.') && str_contains($firstEvent, 'collections')) { - $tableEventMap = [ - 'collections' => 'tables', 'attributes' => 'columns', - 'attributeId' => 'columnId', 'documents' => 'rows', 'documentId' => 'rowId', - ]; - - // replace params! - $tableEvent = str_replace( - array_keys($tableEventMap), - array_values($tableEventMap), - $this->getEvent() - ); - - // generate new events - $tableEvents = Event::generateEvents($tableEvent, $this->getParams()); - - // merge all of the api events - $allEvents = array_merge($allEvents, $tableEvents); - - // remove duplicates - $allEvents = array_values(array_unique($allEvents)); - } + $events = $this->mirrorCollectionEvents($firstEvent, $events); $payload = new Document($this->getPayload()); @@ -124,7 +103,7 @@ class Realtime extends Event $this->realtime->send( projectId: $projectId, payload: $this->getRealtimePayload(), - events: $allEvents, + events: $events, channels: $target['channels'], roles: $target['roles'], options: [ @@ -136,4 +115,45 @@ class Realtime extends Event return true; } + + /** + * Adds `table` events for `collection` events. + * + * Example: + * + * `databases.*.collections.*.documents.*.update` →\ + * `[databases.*.collections.*.documents.*.update, databases.*.tables.*.rows.*.update]` + */ + private function mirrorCollectionEvents(string $firstEvent, array $events): array + { + $tableEventMap = [ + 'documents' => 'rows', + 'collections' => 'tables', + 'attributes' => 'columns', + ]; + + if ( + str_contains($this->getEvent(), 'databases.') && + str_contains($firstEvent, 'collections') + ) { + $pairedEvents = []; + + foreach ($events as $event) { + $pairedEvents[] = $event; + + if (str_contains($event, 'collections')) { + $tableSideEvent = str_replace( + array_keys($tableEventMap), + array_values($tableEventMap), + $event + ); + $pairedEvents[] = $tableSideEvent; + } + } + + $events = $pairedEvents; + } + + return $events; + } } From 02af05b409e0e4dbdeb51d9b0ed86cc462ebde42 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 10:10:03 +0530 Subject: [PATCH 095/362] fix: endpoint in abuse test. --- tests/e2e/General/AbuseTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/General/AbuseTest.php b/tests/e2e/General/AbuseTest.php index 217f9f93ed..cfd12b0e9f 100644 --- a/tests/e2e/General/AbuseTest.php +++ b/tests/e2e/General/AbuseTest.php @@ -157,7 +157,7 @@ class AbuseTest extends Scope $collectionId = $data['collectionId']; $max = 120; - $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $collectionId . '/rows', [ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $collectionId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -168,10 +168,10 @@ class AbuseTest extends Scope ], ]); - $documentId = $document['body']['$id']; + $rowId = $row['body']['$id']; for ($i = 0; $i <= $max + 1; $i++) { - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, [ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $collectionId . '/rows/' . $rowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ From 594f8595aea8d701913f4dc2a748304c5b39b007 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 10:10:23 +0530 Subject: [PATCH 096/362] update: database server test for graphql <> tables api. --- .../GraphQL/Tables/DatabaseServerTest.php | 380 +++++++++--------- 1 file changed, 190 insertions(+), 190 deletions(-) diff --git a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php index d5980a4096..4f711148e3 100644 --- a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php @@ -47,10 +47,10 @@ class DatabaseServerTest extends Scope /** * @depends testCreateDatabase */ - public function testCreateCollection($database): array + public function testCreateTable($database): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_COLLECTION); + $query = $this->getQuery(self::$CREATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -74,7 +74,7 @@ class DatabaseServerTest extends Scope $this->assertIsArray($table['body']['data']); $this->assertArrayNotHasKey('errors', $table['body']); - $table = $table['body']['data']['databasesCreateCollection']; + $table = $table['body']['data']['databasesCreateTable']; $this->assertEquals('Actors', $table['name']); $gqlPayload = [ @@ -100,24 +100,24 @@ class DatabaseServerTest extends Scope $this->assertIsArray($table2['body']['data']); $this->assertArrayNotHasKey('errors', $table2['body']); - $table2 = $table2['body']['data']['databasesCreateCollection']; + $table2 = $table2['body']['data']['databasesCreateTable']; $this->assertEquals('Movies', $table2['name']); return [ 'database' => $database, 'table' => $table, - 'collection2' => $table2, + 'table2' => $table2, ]; } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testCreateStringAttribute($data): array + public function testCreateStringColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -136,22 +136,22 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsCreateStringAttribute']); + $this->assertIsArray($column['body']['data']['tablesCreateStringColumn']); return $data; } /** - * @depends testCreateStringAttribute + * @depends testCreateStringColumn * @throws Exception */ - public function testUpdateStringAttribute($data): array + public function testUpdateStringColumn($data): array { - // Wait for attributes to be available + // Wait for columns to be available sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -169,22 +169,22 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsUpdateStringAttribute']); - $this->assertFalse($column['body']['data']['collectionsUpdateStringAttribute']['required']); - $this->assertEquals('Default Value', $column['body']['data']['collectionsUpdateStringAttribute']['default']); + $this->assertIsArray($column['body']['data']['tablesUpdateStringColumn']); + $this->assertFalse($column['body']['data']['tablesUpdateStringColumn']['required']); + $this->assertEquals('Default Value', $column['body']['data']['tablesUpdateStringColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testCreateIntegerAttribute($data): array + public function testCreateIntegerColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INTEGER_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_INTEGER_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -204,22 +204,22 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsCreateIntegerAttribute']); + $this->assertIsArray($column['body']['data']['tablesCreateIntegerColumn']); return $data; } /** - * @depends testCreateIntegerAttribute + * @depends testCreateIntegerColumn * @throws Exception */ - public function testUpdateIntegerAttribute($data): array + public function testUpdateIntegerColumn($data): array { - // Wait for attributes to be available + // Wait for columns to be available sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_INTEGER_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_INTEGER_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -239,24 +239,24 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsUpdateIntegerAttribute']); - $this->assertFalse($column['body']['data']['collectionsUpdateIntegerAttribute']['required']); - $this->assertEquals(12, $column['body']['data']['collectionsUpdateIntegerAttribute']['min']); - $this->assertEquals(160, $column['body']['data']['collectionsUpdateIntegerAttribute']['max']); - $this->assertEquals(50, $column['body']['data']['collectionsUpdateIntegerAttribute']['default']); + $this->assertIsArray($column['body']['data']['tablesUpdateIntegerColumn']); + $this->assertFalse($column['body']['data']['tablesUpdateIntegerColumn']['required']); + $this->assertEquals(12, $column['body']['data']['tablesUpdateIntegerColumn']['min']); + $this->assertEquals(160, $column['body']['data']['tablesUpdateIntegerColumn']['max']); + $this->assertEquals(50, $column['body']['data']['tablesUpdateIntegerColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testCreateBooleanAttribute($data): array + public function testCreateBooleanColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_BOOLEAN_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_BOOLEAN_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -274,22 +274,22 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsCreateBooleanAttribute']); + $this->assertIsArray($column['body']['data']['tablesCreateBooleanColumn']); return $data; } /** - * @depends testCreateBooleanAttribute + * @depends testCreateBooleanColumn * @throws Exception */ - public function testUpdateBooleanAttribute($data): array + public function testUpdateBooleanColumn($data): array { - // Wait for attributes to be available + // Wait for columns to be available sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_BOOLEAN_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_BOOLEAN_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -307,22 +307,22 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsUpdateBooleanAttribute']); - $this->assertFalse($column['body']['data']['collectionsUpdateBooleanAttribute']['required']); - $this->assertTrue($column['body']['data']['collectionsUpdateBooleanAttribute']['default']); + $this->assertIsArray($column['body']['data']['tablesUpdateBooleanColumn']); + $this->assertFalse($column['body']['data']['tablesUpdateBooleanColumn']['required']); + $this->assertTrue($column['body']['data']['tablesUpdateBooleanColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testCreateFloatAttribute($data): array + public function testCreateFloatColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_FLOAT_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_FLOAT_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -343,22 +343,22 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsCreateFloatAttribute']); + $this->assertIsArray($column['body']['data']['tablesCreateFloatColumn']); return $data; } /** - * @depends testCreateFloatAttribute + * @depends testCreateFloatColumn * @throws Exception */ - public function testUpdateFloatAttribute($data): array + public function testUpdateFloatColumn($data): array { - // Wait for attributes to be available + // Wait for columns to be available sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_FLOAT_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_FLOAT_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -378,24 +378,24 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsUpdateFloatAttribute']); - $this->assertFalse($column['body']['data']['collectionsUpdateFloatAttribute']['required']); - $this->assertEquals(100.0, $column['body']['data']['collectionsUpdateFloatAttribute']['min']); - $this->assertEquals(1000000.0, $column['body']['data']['collectionsUpdateFloatAttribute']['max']); - $this->assertEquals(2500.0, $column['body']['data']['collectionsUpdateFloatAttribute']['default']); + $this->assertIsArray($column['body']['data']['tablesUpdateFloatColumn']); + $this->assertFalse($column['body']['data']['tablesUpdateFloatColumn']['required']); + $this->assertEquals(100.0, $column['body']['data']['tablesUpdateFloatColumn']['min']); + $this->assertEquals(1000000.0, $column['body']['data']['tablesUpdateFloatColumn']['max']); + $this->assertEquals(2500.0, $column['body']['data']['tablesUpdateFloatColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testCreateEmailAttribute($data): array + public function testCreateEmailColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_EMAIL_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_EMAIL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -413,22 +413,22 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsCreateEmailAttribute']); + $this->assertIsArray($column['body']['data']['tablesCreateEmailColumn']); return $data; } /** - * @depends testCreateEmailAttribute + * @depends testCreateEmailColumn * @throws Exception */ - public function testUpdateEmailAttribute($data): array + public function testUpdateEmailColumn($data): array { - // Wait for attributes to be available + // Wait for columns to be available sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_EMAIL_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_EMAIL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -446,22 +446,22 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsUpdateEmailAttribute']); - $this->assertFalse($column['body']['data']['collectionsUpdateEmailAttribute']['required']); - $this->assertEquals('torsten@appwrite.io', $column['body']['data']['collectionsUpdateEmailAttribute']['default']); + $this->assertIsArray($column['body']['data']['tablesUpdateEmailColumn']); + $this->assertFalse($column['body']['data']['tablesUpdateEmailColumn']['required']); + $this->assertEquals('torsten@appwrite.io', $column['body']['data']['tablesUpdateEmailColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testCreateEnumAttribute($data): array + public function testCreateEnumColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_ENUM_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_ENUM_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -484,23 +484,23 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsCreateEnumAttribute']); + $this->assertIsArray($column['body']['data']['tablesCreateEnumColumn']); return $data; } /** - * @depends testCreateEnumAttribute + * @depends testCreateEnumColumn * @throws Exception */ - public function testUpdateEnumAttribute($data): array + public function testUpdateEnumColumn($data): array { - // Wait for attributes to be available + // Wait for columns to be available sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_ENUM_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_ENUM_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -523,24 +523,24 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsUpdateEnumAttribute']); - $this->assertFalse($column['body']['data']['collectionsUpdateEnumAttribute']['required']); - $this->assertEquals('tech', $column['body']['data']['collectionsUpdateEnumAttribute']['default']); - $this->assertContains('tech', $column['body']['data']['collectionsUpdateEnumAttribute']['elements']); - $this->assertNotContains('guest', $column['body']['data']['collectionsUpdateEnumAttribute']['elements']); + $this->assertIsArray($column['body']['data']['tablesUpdateEnumColumn']); + $this->assertFalse($column['body']['data']['tablesUpdateEnumColumn']['required']); + $this->assertEquals('tech', $column['body']['data']['tablesUpdateEnumColumn']['default']); + $this->assertContains('tech', $column['body']['data']['tablesUpdateEnumColumn']['elements']); + $this->assertNotContains('guest', $column['body']['data']['tablesUpdateEnumColumn']['elements']); $this->assertEquals(200, $column['headers']['status-code']); return $data; } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testCreateDatetimeAttribute($data): array + public function testCreateDatetimeColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATETIME_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_DATETIME_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -558,22 +558,22 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsCreateDatetimeAttribute']); + $this->assertIsArray($column['body']['data']['tablesCreateDatetimeColumn']); return $data; } /** - * @depends testCreateDatetimeAttribute + * @depends testCreateDatetimeColumn * @throws Exception */ - public function testUpdateDatetimeAttribute($data): array + public function testUpdateDatetimeColumn($data): array { - // Wait for attributes to be available + // Wait for columns to be available sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DATETIME_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_DATETIME_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -591,27 +591,27 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsUpdateDatetimeAttribute']); - $this->assertFalse($column['body']['data']['collectionsUpdateDatetimeAttribute']['required']); - $this->assertEquals('2000-01-01T00:00:00Z', $column['body']['data']['collectionsUpdateDatetimeAttribute']['default']); + $this->assertIsArray($column['body']['data']['tablesUpdateDatetimeColumn']); + $this->assertFalse($column['body']['data']['tablesUpdateDatetimeColumn']['required']); + $this->assertEquals('2000-01-01T00:00:00Z', $column['body']['data']['tablesUpdateDatetimeColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; } /** - * @depends testCreateCollection + * @depends testCreateTable */ - public function testCreateRelationshipAttribute(array $data): array + public function testCreateRelationshipColumn(array $data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_RELATIONSHIP_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_RELATIONSHIP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['collection2']['_id'], // Movies - 'relatedCollectionId' => $data['table']['_id'], // Actors + 'tableId' => $data['table2']['_id'], // Movies + 'relatedTableId' => $data['table']['_id'], // Actors 'type' => Database::RELATION_ONE_TO_MANY, 'twoWay' => true, 'key' => 'actors', @@ -626,25 +626,25 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsCreateRelationshipAttribute']); + $this->assertIsArray($column['body']['data']['tablesCreateRelationshipColumn']); return $data; } /** - * @depends testCreateRelationshipAttribute + * @depends testCreateRelationshipColumn */ - public function testUpdateRelationshipAttribute(array $data): array + public function testUpdateRelationshipColumn(array $data): array { sleep(1); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_RELATIONSHIP_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_RELATIONSHIP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], - 'tableId' => $data['collection2']['_id'], + 'tableId' => $data['table2']['_id'], 'key' => 'actors', 'onDelete' => Database::RELATION_MUTATE_CASCADE, ] @@ -657,19 +657,19 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsUpdateRelationshipAttribute']); + $this->assertIsArray($column['body']['data']['tablesUpdateRelationshipColumn']); return $data; } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testCreateIPAttribute($data): array + public function testCreateIPColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_IP_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_IP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -688,22 +688,22 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsCreateIpAttribute']); + $this->assertIsArray($column['body']['data']['tablesCreateIpColumn']); return $data; } /** - * @depends testCreateIPAttribute + * @depends testCreateIPColumn * @throws Exception */ - public function testUpdateIPAttribute($data): array + public function testUpdateIPColumn($data): array { - // Wait for attributes to be available + // Wait for columns to be available sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_IP_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_IP_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -721,22 +721,22 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsUpdateIpAttribute']); - $this->assertFalse($column['body']['data']['collectionsUpdateIpAttribute']['required']); - $this->assertEquals('127.0.0.1', $column['body']['data']['collectionsUpdateIpAttribute']['default']); + $this->assertIsArray($column['body']['data']['tablesUpdateIpColumn']); + $this->assertFalse($column['body']['data']['tablesUpdateIpColumn']['required']); + $this->assertEquals('127.0.0.1', $column['body']['data']['tablesUpdateIpColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testCreateURLAttribute($data): array + public function testCreateURLColumn($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_URL_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_URL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -755,22 +755,22 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsCreateUrlAttribute']); + $this->assertIsArray($column['body']['data']['tablesCreateUrlColumn']); return $data; } /** - * @depends testCreateURLAttribute + * @depends testCreateURLColumn * @throws Exception */ - public function testUpdateURLAttribute($data): void + public function testUpdateURLColumn($data): void { - // Wait for attributes to be available + // Wait for columns to be available sleep(3); $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_URL_ATTRIBUTE); + $query = $this->getQuery(self::$UPDATE_URL_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -788,21 +788,21 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsUpdateUrlAttribute']); - $this->assertFalse($column['body']['data']['collectionsUpdateUrlAttribute']['required']); - $this->assertEquals('https://cloud.appwrite.io', $column['body']['data']['collectionsUpdateUrlAttribute']['default']); + $this->assertIsArray($column['body']['data']['tablesUpdateUrlColumn']); + $this->assertFalse($column['body']['data']['tablesUpdateUrlColumn']['required']); + $this->assertEquals('https://cloud.appwrite.io', $column['body']['data']['tablesUpdateUrlColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); } /** - * @depends testUpdateStringAttribute - * @depends testUpdateIntegerAttribute + * @depends testUpdateStringColumn + * @depends testUpdateIntegerColumn * @throws Exception */ public function testCreateIndex($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_INDEX); + $query = $this->getQuery(self::$CREATE_COLUMN_INDEX); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -810,7 +810,7 @@ class DatabaseServerTest extends Scope 'tableId' => $data['table']['_id'], 'key' => 'index', 'type' => 'key', - 'attributes' => [ + 'columns' => [ 'name', 'age', ], @@ -824,26 +824,26 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['collectionsCreateIndex']); + $this->assertIsArray($index['body']['data']['tablesCreateIndex']); return [ 'database' => $data['database'], 'table' => $data['table'], - 'index' => $index['body']['data']['collectionsCreateIndex'], + 'index' => $index['body']['data']['tablesCreateIndex'], ]; } /** - * @depends testUpdateStringAttribute - * @depends testUpdateIntegerAttribute - * @depends testUpdateBooleanAttribute - * @depends testUpdateEnumAttribute + * @depends testUpdateStringColumn + * @depends testUpdateIntegerColumn + * @depends testUpdateBooleanColumn + * @depends testUpdateEnumColumn * @throws Exception */ - public function testCreateDocument($data): array + public function testCreateRow($data): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DOCUMENT); + $query = $this->getQuery(self::$CREATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -875,7 +875,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['collectionsCreateDocument']; + $row = $row['body']['data']['tablesCreateRow']; $this->assertIsArray($row); return [ @@ -886,13 +886,13 @@ class DatabaseServerTest extends Scope } // /** - // * @depends testCreateStringAttribute - // * @depends testCreateIntegerAttribute - // * @depends testCreateBooleanAttribute - // * @depends testCreateFloatAttribute - // * @depends testCreateEmailAttribute - // * @depends testCreateEnumAttribute - // * @depends testCreateDatetimeAttribute + // * @depends testCreateStringColumn + // * @depends testCreateIntegerColumn + // * @depends testCreateBooleanColumn + // * @depends testCreateFloatColumn + // * @depends testCreateEmailColumn + // * @depends testCreateEnumColumn + // * @depends testCreateDatetimeColumn // * @throws Exception // */ // public function testCreateCustomEntity(): array @@ -969,13 +969,13 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testGetCollections($data): void + public function testGetTables($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLLECTIONS); + $query = $this->getQuery(self::$GET_TABLES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -990,17 +990,17 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $tables['body']); $this->assertIsArray($tables['body']['data']); - $this->assertIsArray($tables['body']['data']['databasesListCollections']); + $this->assertIsArray($tables['body']['data']['databasesListTables']); } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testGetCollection($data): void + public function testGetTable($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_COLLECTION); + $query = $this->getQuery(self::$GET_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1016,18 +1016,18 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $table['body']); $this->assertIsArray($table['body']['data']); - $this->assertIsArray($table['body']['data']['databasesGetCollection']); + $this->assertIsArray($table['body']['data']['databasesGetTable']); } /** - * @depends testUpdateStringAttribute - * @depends testUpdateIntegerAttribute + * @depends testUpdateStringColumn + * @depends testUpdateIntegerColumn * @throws Exception */ - public function testGetAttributes($data): void + public function testGetColumns($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ATTRIBUTES); + $query = $this->getQuery(self::$GET_COLUMNS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1043,17 +1043,17 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $columns['body']); $this->assertIsArray($columns['body']['data']); - $this->assertIsArray($columns['body']['data']['collectionsListAttributes']); + $this->assertIsArray($columns['body']['data']['tablesListColumns']); } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testGetAttribute($data): void + public function testGetColumn($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_ATTRIBUTE); + $query = $this->getQuery(self::$GET_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1070,7 +1070,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['collectionsGetAttribute']); + $this->assertIsArray($column['body']['data']['tablesGetColumn']); } /** @@ -1080,7 +1080,7 @@ class DatabaseServerTest extends Scope public function testGetIndexes($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_INDEXES); + $query = $this->getQuery(self::$GET_COLUMN_INDEXES); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1096,7 +1096,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $indices['body']); $this->assertIsArray($indices['body']['data']); - $this->assertIsArray($indices['body']['data']['collectionsListIndexes']); + $this->assertIsArray($indices['body']['data']['tablesListIndexes']); } /** @@ -1106,7 +1106,7 @@ class DatabaseServerTest extends Scope public function testGetIndex($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_INDEX); + $query = $this->getQuery(self::$GET_COLUMN_INDEX); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1123,17 +1123,17 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['collectionsGetIndex']); + $this->assertIsArray($index['body']['data']['tablesGetIndex']); } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testGetDocuments($data): void + public function testGetRows($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENTS); + $query = $this->getQuery(self::$GET_ROWS); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1149,17 +1149,17 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $rows['body']); $this->assertIsArray($rows['body']['data']); - $this->assertIsArray($rows['body']['data']['collectionsListDocuments']); + $this->assertIsArray($rows['body']['data']['tablesListRows']); } /** - * @depends testCreateDocument + * @depends testCreateRow * @throws Exception */ - public function testGetDocument($data): void + public function testGetRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DOCUMENT); + $query = $this->getQuery(self::$GET_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1176,7 +1176,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $this->assertIsArray($row['body']['data']['collectionsGetDocument']); + $this->assertIsArray($row['body']['data']['tablesGetRow']); } // /** @@ -1253,19 +1253,19 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testUpdateCollection($data) + public function testUpdateTable($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_COLLECTION); + $query = $this->getQuery(self::$UPDATE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ 'databaseId' => $data['database']['_id'], 'tableId' => $data['table']['_id'], - 'name' => 'New Collection Name', + 'name' => 'New Table Name', 'rowSecurity' => false, ] ]; @@ -1277,17 +1277,17 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $table['body']); $this->assertIsArray($table['body']['data']); - $this->assertIsArray($table['body']['data']['databasesUpdateCollection']); + $this->assertIsArray($table['body']['data']['databasesUpdateTable']); } /** - * @depends testCreateDocument + * @depends testCreateRow * @throws Exception */ - public function testUpdateDocument($data): void + public function testUpdateRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DOCUMENT); + $query = $this->getQuery(self::$UPDATE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1295,7 +1295,7 @@ class DatabaseServerTest extends Scope 'tableId' => $data['table']['_id'], 'rowId' => $data['row']['_id'], 'data' => [ - 'name' => 'New Document Name', + 'name' => 'New Row Name', ], ] ]; @@ -1307,9 +1307,9 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['collectionsUpdateDocument']; + $row = $row['body']['data']['tablesUpdateRow']; $this->assertIsArray($row); - $this->assertStringContainsString('New Document Name', $row['data']); + $this->assertStringContainsString('New Row Name', $row['data']); } // /** @@ -1341,13 +1341,13 @@ class DatabaseServerTest extends Scope // } /** - * @depends testCreateDocument + * @depends testCreateRow * @throws Exception */ - public function testDeleteDocument($data): void + public function testDeleteRow($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DOCUMENT); + $query = $this->getQuery(self::$DELETE_ROW); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1391,13 +1391,13 @@ class DatabaseServerTest extends Scope // } /** - * @depends testUpdateStringAttribute + * @depends testUpdateStringColumn * @throws Exception */ - public function testDeleteAttribute($data): void + public function testDeleteColumn($data): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_ATTRIBUTE); + $query = $this->getQuery(self::$DELETE_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1417,13 +1417,13 @@ class DatabaseServerTest extends Scope } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws Exception */ - public function testDeleteCollection($data) + public function testDeleteTable($data) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_COLLECTION); + $query = $this->getQuery(self::$DELETE_TABLE); $gqlPayload = [ 'query' => $query, 'variables' => [ From 68994f263490e129ceeacda491be42f9e57331e2 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 10:19:01 +0530 Subject: [PATCH 097/362] fix: graphql tests. --- tests/e2e/Services/GraphQL/Base.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 65154e2f93..8cad67b909 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -82,17 +82,17 @@ trait Base public static string $GET_COLUMN = 'get_column'; public static string $DELETE_COLUMN = 'delete_column'; - // Collection Indexes - public static string $CREATE_INDEX = 'create_index'; - public static string $GET_INDEXES = 'get_indexes'; - public static string $GET_INDEX = 'get_index'; - public static string $DELETE_INDEX = 'delete_index'; + // Attribute Indexes + public static string $CREATE_INDEX = 'create_attribute_index'; + public static string $GET_INDEXES = 'get_attribute_indexes'; + public static string $GET_INDEX = 'get_attribute_index'; + public static string $DELETE_INDEX = 'delete_attribute_index'; // Column Indexes - public static string $CREATE_COLUMN_INDEX = 'create_index'; - public static string $GET_COLUMN_INDEXES = 'get_indexes'; - public static string $GET_COLUMN_INDEX = 'get_index'; - public static string $DELETE_COLUMN_INDEX = 'delete_index'; + public static string $CREATE_COLUMN_INDEX = 'create_column_index'; + public static string $GET_COLUMN_INDEXES = 'get_column_indexes'; + public static string $GET_COLUMN_INDEX = 'get_column_index'; + public static string $DELETE_COLUMN_INDEX = 'delete_column_index'; // Documents public static string $CREATE_DOCUMENT = 'create_document_rest'; @@ -995,8 +995,8 @@ trait Base } }'; case self::$CREATE_COLUMN_INDEX: - return 'mutation createIndex($databaseId: String!, $tableId: String!, $key: String!, $type: String!, $attributes: [String!]!, $orders: [String!]){ - tablesCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, attributes: $attributes, orders: $orders) { + return 'mutation createIndex($databaseId: String!, $tableId: String!, $key: String!, $type: String!, $columns: [String!]!, $orders: [String!]){ + tablesCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, columns: $columns, orders: $orders) { key type status From 5022a052ce10ed4db669a2cf687615718bc48b7e Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 10:20:23 +0530 Subject: [PATCH 098/362] update: test coverage for databases. --- .github/workflows/tests.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 335e46c16b..a7fc1cf0c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -145,8 +145,7 @@ jobs: Account, Avatars, Console, - Databases/Collections, - Databases/Tables, + Databases, Functions, FunctionsSchedule, GraphQL, @@ -214,8 +213,7 @@ jobs: Account, Avatars, Console, - Databases/Collections, - Databases/Tables, + Databases, Functions, FunctionsSchedule, GraphQL, From fbe2609f7b9561b207ba96f8fa1721e6a6da763d Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 10:34:44 +0530 Subject: [PATCH 099/362] update: simplify setting events context param. --- .../Collections/Attributes/Action.php | 20 +++++++++++++------ .../Collections/Attributes/Delete.php | 9 ++++----- .../Collections/Documents/Action.php | 8 ++++++++ .../Collections/Documents/Create.php | 8 ++++---- .../Collections/Documents/Delete.php | 8 ++++---- .../Collections/Documents/Update.php | 8 ++++---- .../Databases/Collections/Indexes/Action.php | 8 ++++++++ .../Databases/Collections/Indexes/Create.php | 4 ++-- .../Databases/Collections/Indexes/Delete.php | 4 ++-- 9 files changed, 50 insertions(+), 27 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 954e997872..095b679223 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -204,6 +204,14 @@ abstract class Action extends UtopiaAction : Exception::COLUMN_NOT_AVAILABLE; } + /** + * Get the correct collections context for Events queue. + */ + final protected function getCollectionsEventsContext(): string + { + return $this->isCollectionsAPI() ? 'collection' : 'table'; + } + /** * Get the proper column/attribute type based on set context. */ @@ -407,11 +415,11 @@ abstract class Action extends UtopiaAction $queueForEvents ->setContext('database', $db) ->setParam('databaseId', $databaseId) + ->setParam('collectionId', $collection->getId()) + ->setParam('tableId', $collection->getId()) ->setParam('attributeId', $attribute->getId()) ->setParam('columnId', $attribute->getId()) - ->setParam('tableId', $collection->getId()) - ->setParam('collectionId', $collection->getId()) - ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); + ->setContext($this->getCollectionsEventsContext(), $collection); $response->setStatusCode(SwooleResponse::STATUS_CODE_CREATED); @@ -608,11 +616,11 @@ abstract class Action extends UtopiaAction $queueForEvents ->setContext('database', $db) ->setParam('databaseId', $databaseId) + ->setParam('collectionId', $collection->getId()) + ->setParam('tableId', $collection->getId()) ->setParam('attributeId', $attribute->getId()) ->setParam('columnId', $attribute->getId()) - ->setParam('tableId', $collection->getId()) - ->setParam('collectionId', $collection->getId()) - ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); + ->setContext($this->getCollectionsEventsContext(), $collection); return $attribute; } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 81bc77a9ba..cf5b7766b3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -145,13 +145,12 @@ class Delete extends Action $queueForEvents ->setContext('database', $db) ->setParam('databaseId', $databaseId) - ->setPayload($response->output($attribute, $model)) - ->setParam('attributeId', $attribute->getId()) - ->setParam('columnId', $attribute->getId()) ->setParam('collectionId', $collection->getId()) ->setParam('tableId', $collection->getId()) - // set proper context - ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); + ->setParam('attributeId', $attribute->getId()) + ->setParam('columnId', $attribute->getId()) + ->setPayload($response->output($attribute, $model)) + ->setContext($this->getCollectionsEventsContext(), $collection); $response->noContent(); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index a5b8fc5805..01ee2d9f84 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -127,4 +127,12 @@ abstract class Action extends UtopiaAction ? Exception::DOCUMENT_MISSING_PAYLOAD : Exception::ROW_MISSING_PAYLOAD; } + + /** + * Get the correct collections context for Events queue. + */ + final protected function getCollectionsEventsContext(): string + { + return $this->isCollectionsAPI() ? 'collection' : 'table'; + } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index a8f1561f84..bd59c9ee35 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -309,11 +309,11 @@ class Create extends Action $queueForEvents ->setParam('databaseId', $databaseId) ->setContext('database', $database) - ->setParam('rowId', $document->getId()) - ->setParam('documentId', $document->getId()) - ->setParam('tableId', $collection->getId()) ->setParam('collectionId', $collection->getId()) + ->setParam('tableId', $collection->getId()) + ->setParam('documentId', $document->getId()) + ->setParam('rowId', $document->getId()) ->setPayload($response->getPayload(), sensitive: $relationships) - ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); + ->setContext($this->getCollectionsEventsContext(), $collection); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index 66e1b37320..c218e713bf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -164,11 +164,11 @@ class Delete extends Action $queueForEvents ->setParam('databaseId', $databaseId) ->setContext('database', $database) - ->setParam('rowId', $document->getId()) - ->setParam('documentId', $document->getId()) - ->setParam('tableId', $collection->getId()) ->setParam('collectionId', $collection->getId()) - ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection) + ->setParam('tableId', $collection->getId()) + ->setParam('documentId', $document->getId()) + ->setParam('rowId', $document->getId()) + ->setContext($this->getCollectionsEventsContext(), $collection) ->setPayload($response->output($document, $this->getResponseModel()), sensitive: $relationships); $response->noContent(); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 5bee2ee761..17da8e552d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -297,11 +297,11 @@ class Update extends Action $queueForEvents ->setParam('databaseId', $databaseId) ->setContext('database', $database) - ->setParam('rowId', $document->getId()) - ->setParam('documentId', $document->getId()) - ->setParam('tableId', $collection->getId()) ->setParam('collectionId', $collection->getId()) - ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection) + ->setParam('tableId', $collection->getId()) + ->setParam('documentId', $document->getId()) + ->setParam('rowId', $document->getId()) + ->setContext($this->getCollectionsEventsContext(), $collection) ->setPayload($response->getPayload(), sensitive: $relationships); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php index 93459440f0..c1e3f61114 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php @@ -152,4 +152,12 @@ abstract class Action extends UtopiaAction ? Exception::ATTRIBUTE_NOT_AVAILABLE : Exception::COLUMN_NOT_AVAILABLE; } + + /** + * Get the correct collections context for Events queue. + */ + final protected function getCollectionsEventsContext(): string + { + return $this->isCollectionsAPI() ? 'collection' : 'table'; + } } 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 014627e0a8..c18ab69b10 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 @@ -221,9 +221,9 @@ class Create extends Action ->setContext('database', $db) ->setParam('databaseId', $databaseId) ->setParam('indexId', $index->getId()) - ->setParam('tableId', $collection->getId()) ->setParam('collectionId', $collection->getId()) - ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); + ->setParam('tableId', $collection->getId()) + ->setContext($this->getCollectionsEventsContext(), $collection); $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index f86cf7b11f..a208e059f6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -118,8 +118,8 @@ class Delete extends Action ->setParam('indexId', $index->getId()) ->setParam('tableId', $collection->getId()) ->setParam('collectionId', $collection->getId()) - ->setPayload($response->output($index, $this->getResponseModel())) - ->setContext($this->isCollectionsAPI() ? 'collection' : 'table', $collection); + ->setContext($this->getCollectionsEventsContext(), $collection) + ->setPayload($response->output($index, $this->getResponseModel())); $response->noContent(); } From 5dca1ff0d624b5b9378fef397269190a28238e81 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 10:36:16 +0530 Subject: [PATCH 100/362] update: fix test variable. --- .../Tables/DatabasesPermissionsMemberTest.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php index 7b0e9d8a64..32a97aeadf 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php @@ -136,9 +136,9 @@ class DatabasesPermissionsMemberTest extends Scope 'rowSecurity' => true, ]); $this->assertEquals(201, $public['headers']['status-code']); - $this->collections = ['public' => $public['body']['$id']]; + $this->tables = ['public' => $public['body']['$id']]; - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $this->collections['public'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $this->tables['public'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -157,9 +157,9 @@ class DatabasesPermissionsMemberTest extends Scope 'rowSecurity' => true, ]); $this->assertEquals(201, $private['headers']['status-code']); - $this->collections['private'] = $private['body']['$id']; + $this->tables['private'] = $private['body']['$id']; - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $this->collections['private'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $this->tables['private'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -173,9 +173,9 @@ class DatabasesPermissionsMemberTest extends Scope 'rowSecurity' => true, ]); $this->assertEquals(201, $private['headers']['status-code']); - $this->collections['doconly'] = $doconly['body']['$id']; + $this->tables['doconly'] = $doconly['body']['$id']; - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $this->collections['doconly'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $this->tables['doconly'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -186,7 +186,7 @@ class DatabasesPermissionsMemberTest extends Scope return [ 'users' => $this->users, - 'tables' => $this->collections, + 'tables' => $this->tables, 'databaseId' => $databaseId ]; } From 45370f91c3b93e0373d8982ae481de90bfafd638 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 10:52:43 +0530 Subject: [PATCH 101/362] add: table apis to webhook tests. --- tests/e2e/Services/Webhooks/WebhooksBase.php | 352 ++++++++++++++++++- 1 file changed, 351 insertions(+), 1 deletion(-) diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index c743810feb..b26f964479 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -36,7 +36,7 @@ trait WebhooksBase return base64_encode(hash_hmac('sha1', $url . $payload, $signatureKey, true)); } - + // Collection APIs public function testCreateCollection(): array { /** @@ -389,6 +389,356 @@ trait WebhooksBase return $data; } + // Table APIs + public function testCreateTable(): array + { + /** + * 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' => 'Actors DB', + ]); + + $databaseId = $database['body']['$id']; + + /** + * Test for SUCCESS + */ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Actors', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'rowSecurity' => true, + ]); + + $actorsId = $actors['body']['$id']; + + $this->assertEquals($actors['headers']['status-code'], 201); + $this->assertNotEmpty($actors['body']['$id']); + + $webhook = $this->getLastRequest(); + $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); + + $this->assertEquals($webhook['method'], 'POST'); + $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); + $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); + $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), true); + $this->assertNotEmpty($webhook['data']['$id']); + $this->assertEquals($webhook['data']['name'], 'Actors'); + $this->assertIsArray($webhook['data']['$permissions']); + $this->assertCount(4, $webhook['data']['$permissions']); + + return array_merge(['actorsId' => $actorsId, 'databaseId' => $databaseId]); + } + + /** + * @depends testCreateTable + */ + public function testCreateColumns(array $data): array + { + $actorsId = $data['actorsId']; + $databaseId = $data['databaseId']; + + $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'firstName', + 'size' => 256, + 'required' => true, + ]); + + $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'lastName', + 'size' => 256, + 'required' => true, + ]); + + $extra = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'extra', + 'size' => 64, + 'required' => false, + ]); + + $this->assertEquals($firstName['headers']['status-code'], 202); + $this->assertEquals($firstName['body']['key'], 'firstName'); + $this->assertEquals($lastName['headers']['status-code'], 202); + $this->assertEquals($lastName['body']['key'], 'lastName'); + $this->assertEquals($extra['headers']['status-code'], 202); + $this->assertEquals($extra['body']['key'], 'extra'); + + // wait for database worker to kick in + sleep(10); + + $webhook = $this->getLastRequest(); + $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); + + $this->assertEquals($webhook['method'], 'POST'); + $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); + $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.columns.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.columns.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.columns.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.columns.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); + $this->assertNotEmpty($webhook['data']['key']); + $this->assertEquals($webhook['data']['key'], 'extra'); + + $removed = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['actorsId'] . '/columns/' . $extra['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(204, $removed['headers']['status-code']); + + $webhook = $this->getLastRequest(); + $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); + + // $this->assertEquals($webhook['method'], 'DELETE'); + $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); + $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.columns.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.columns.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.columns.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.columns.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); + $this->assertNotEmpty($webhook['data']['key']); + $this->assertEquals($webhook['data']['key'], 'extra'); + + return $data; + } + + /** + * @depends testCreateColumns + */ + public function testCreateRow(array $data): array + { + $actorsId = $data['actorsId']; + $databaseId = $data['databaseId']; + + /** + * Test for SUCCESS + */ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'firstName' => 'Chris', + 'lastName' => 'Evans', + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $documentId = $row['body']['$id']; + + $this->assertEquals($row['headers']['status-code'], 201); + $this->assertNotEmpty($row['body']['$id']); + + $webhook = $this->getLastRequest(); + $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); + + $this->assertEquals($webhook['method'], 'POST'); + $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); + $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$documentId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$documentId}.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); + $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); + $this->assertNotEmpty($webhook['data']['$id']); + $this->assertEquals($webhook['data']['firstName'], 'Chris'); + $this->assertEquals($webhook['data']['lastName'], 'Evans'); + $this->assertIsArray($webhook['data']['$permissions']); + $this->assertCount(3, $webhook['data']['$permissions']); + + $data['rowId'] = $row['body']['$id']; + + return $data; + } + + /** + * @depends testCreateRow + */ + public function testUpdateRow(array $data): array + { + $actorsId = $data['actorsId']; + $databaseId = $data['databaseId']; + + /** + * Test for SUCCESS + */ + $document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $actorsId . '/rows/' . $data['rowId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'firstName' => 'Chris1', + 'lastName' => 'Evans2', + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $rowId = $document['body']['$id']; + + $this->assertEquals($document['headers']['status-code'], 200); + $this->assertNotEmpty($document['body']['$id']); + + $webhook = $this->getLastRequest(); + $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); + + $this->assertEquals($webhook['method'], 'POST'); + $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); + $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$rowId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$rowId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$rowId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$rowId}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); + $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); + $this->assertNotEmpty($webhook['data']['$id']); + $this->assertEquals($webhook['data']['firstName'], 'Chris1'); + $this->assertEquals($webhook['data']['lastName'], 'Evans2'); + $this->assertIsArray($webhook['data']['$permissions']); + $this->assertCount(3, $webhook['data']['$permissions']); + + return $data; + } + + /** + * @depends testCreateTable + */ + #[Retry(count: 1)] + public function testDeleteRow(array $data): array + { + $actorsId = $data['actorsId']; + $databaseId = $data['databaseId']; + + /** + * Test for SUCCESS + */ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'firstName' => 'Bradly', + 'lastName' => 'Cooper', + + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $rowId = $row['body']['$id']; + + $this->assertEquals($row['headers']['status-code'], 201); + $this->assertNotEmpty($row['body']['$id']); + + $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $actorsId . '/rows/' . $row['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals($row['headers']['status-code'], 204); + + $webhook = $this->getLastRequest(); + $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); + + $this->assertEquals($webhook['method'], 'POST'); + $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); + $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.rows.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$rowId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.*.rows.{$rowId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.*.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$rowId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.rows.{$rowId}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); + $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); + $this->assertNotEmpty($webhook['data']['$id']); + $this->assertEquals($webhook['data']['firstName'], 'Bradly'); + $this->assertEquals($webhook['data']['lastName'], 'Cooper'); + $this->assertIsArray($webhook['data']['$permissions']); + $this->assertCount(3, $webhook['data']['$permissions']); + + return $data; + } public function testCreateStorageBucket(): array { From afa8341f9584cf347da93ac2f817e78af6a35a94 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 11:01:36 +0530 Subject: [PATCH 102/362] add: table apis to webhook custom server tests. --- .../Webhooks/WebhooksCustomServerTest.php | 351 ++++++++++++++---- 1 file changed, 269 insertions(+), 82 deletions(-) diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index d2f132e960..6fe184b03f 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -19,6 +19,7 @@ class WebhooksCustomServerTest extends Scope use ProjectCustom; use SideServer; + // Collection APIs /** * @depends testCreateAttributes */ @@ -39,15 +40,15 @@ class WebhooksCustomServerTest extends Scope 'documentSecurity' => true, ]); - $this->assertEquals($actors['headers']['status-code'], 200); + $this->assertEquals(200, $actors['headers']['status-code']); $this->assertNotEmpty($actors['body']['$id']); $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString("databases.{$databaseId}.collections.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -55,9 +56,9 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); - $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), true); + $this->assertTrue(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? '')); $this->assertNotEmpty($webhook['data']['$id']); - $this->assertEquals($webhook['data']['name'], 'Actors1'); + $this->assertEquals('Actors1', $webhook['data']['name']); $this->assertIsArray($webhook['data']['$permissions']); $this->assertCount(4, $webhook['data']['$permissions']); @@ -84,8 +85,8 @@ class WebhooksCustomServerTest extends Scope ]); $indexKey = $index['body']['key']; - $this->assertEquals($index['headers']['status-code'], 202); - $this->assertEquals($index['body']['key'], 'fullname'); + $this->assertEquals(202, $index['headers']['status-code']); + $this->assertEquals('fullname', $index['body']['key']); // wait for database worker to create index sleep(5); @@ -93,9 +94,9 @@ class WebhooksCustomServerTest extends Scope $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.indexes.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -105,7 +106,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); - $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), true); + $this->assertTrue(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? '')); // Remove index $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['actorsId'] . '/indexes/' . $index['body']['key'], array_merge([ @@ -119,8 +120,8 @@ class WebhooksCustomServerTest extends Scope $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); // $this->assertEquals($webhook['method'], 'DELETE'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.indexes.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -130,7 +131,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); - $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), true); + $this->assertTrue(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? '')); return $data; } @@ -172,7 +173,7 @@ class WebhooksCustomServerTest extends Scope $id = $actors['body']['$id']; - $this->assertEquals($actors['headers']['status-code'], 201); + $this->assertEquals(201, $actors['headers']['status-code']); $this->assertNotEmpty($actors['body']['$id']); $actors = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $actors['body']['$id'], array_merge([ @@ -181,14 +182,14 @@ class WebhooksCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), []); - $this->assertEquals($actors['headers']['status-code'], 204); + $this->assertEquals(204, $actors['headers']['status-code']); $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); $this->assertStringContainsString('databases.' . $databaseId . '.collections.*', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString('databases.' . $databaseId . '.collections.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString("databases.{$databaseId}.collections.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -196,9 +197,195 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); - $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), true); + $this->assertTrue(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? '')); $this->assertNotEmpty($webhook['data']['$id']); - $this->assertEquals($webhook['data']['name'], 'Demo'); + $this->assertEquals('Demo', $webhook['data']['name']); + $this->assertIsArray($webhook['data']['$permissions']); + $this->assertCount(4, $webhook['data']['$permissions']); + + return []; + } + + // Table APIs + /** + * @depends testCreateColumns + */ + public function testUpdateTable($data): array + { + $id = $data['actorsId']; + $databaseId = $data['databaseId']; + + /** + * Test for SUCCESS + */ + $actors = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'name' => 'Actors1', + 'rowSecurity' => true, + ]); + + $this->assertEquals(200, $actors['headers']['status-code']); + $this->assertNotEmpty($actors['body']['$id']); + + $webhook = $this->getLastRequest(); + $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); + + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$id}.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); + $this->assertEmpty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''); + $this->assertNotEmpty($webhook['data']['$id']); + $this->assertEquals('Actors1', $webhook['data']['name']); + $this->assertIsArray($webhook['data']['$permissions']); + $this->assertCount(4, $webhook['data']['$permissions']); + + return array_merge(['actorsId' => $actors['body']['$id']]); + } + + /** + * @depends testCreateColumns + */ + public function testCreateDeleteColumnIndexes($data): array + { + $actorsId = $data['actorsId']; + $databaseId = $data['databaseId']; + + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['actorsId'] . '/indexes', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'fullname', + 'type' => 'key', + 'columns' => ['lastName', 'firstName'], + 'orders' => ['ASC', 'ASC'], + ]); + + $this->assertEquals(202, $index['headers']['status-code']); + $this->assertEquals('fullname', $index['body']['key']); + + // wait for database worker to create index + sleep(5); + + $webhook = $this->getLastRequest(); + $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); + + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.indexes.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.indexes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.indexes.*.create", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); + $this->assertTrue(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? '')); + + // Remove index + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['actorsId'] . '/indexes/' . $index['body']['key'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + // // wait for database worker to remove index + $webhook = $this->getLastRequest(); + $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); + + // $this->assertEquals($webhook['method'], 'DELETE'); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.indexes.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.indexes.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.indexes.*", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$actorsId}.indexes.*.update", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); + $this->assertTrue(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? '')); + + return $data; + } + + public function testDeleteTable(): array + { + /** + * 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'] + ], $this->getHeaders()), [ + 'databaseId' => ID::unique(), + 'name' => 'Actors DB', + ]); + + $databaseId = $database['body']['$id']; + + /** + * Test for SUCCESS + */ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Demo', + 'permissions' => [ + Permission::read(Role::any()), + Permission::create(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + 'rowSecurity' => true, + ]); + + $id = $actors['body']['$id']; + + $this->assertEquals(201, $actors['headers']['status-code']); + $this->assertNotEmpty($actors['body']['$id']); + + $actors = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(204, $actors['headers']['status-code']); + + $webhook = $this->getLastRequest(); + $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); + + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString('databases.' . $databaseId . '.tables.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertStringContainsString("databases.{$databaseId}.tables.{$id}.delete", $webhook['headers']['X-Appwrite-Webhook-Events']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); + $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); + $this->assertEmpty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''); + $this->assertNotEmpty($webhook['data']['$id']); + $this->assertEquals('Demo', $webhook['data']['name']); $this->assertIsArray($webhook['data']['$permissions']); $this->assertCount(4, $webhook['data']['$permissions']); @@ -224,7 +411,7 @@ class WebhooksCustomServerTest extends Scope 'name' => $name, ]); - $this->assertEquals($user['headers']['status-code'], 201); + $this->assertEquals(201, $user['headers']['status-code']); $this->assertNotEmpty($user['body']['$id']); $id = $user['body']['$id']; @@ -232,9 +419,9 @@ class WebhooksCustomServerTest extends Scope $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString('users.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -245,11 +432,11 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); $this->assertNotEmpty($webhook['data']['$id']); $this->assertEquals($webhook['data']['name'], $name); - $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['registration'])); - $this->assertEquals($webhook['data']['status'], true); + $this->assertTrue((new DatetimeValidator())->isValid($webhook['data']['registration'])); + $this->assertTrue($webhook['data']['status']); $this->assertEquals($webhook['data']['email'], $email); - $this->assertEquals($webhook['data']['emailVerification'], false); - $this->assertEquals($webhook['data']['prefs'], []); + $this->assertFalse($webhook['data']['emailVerification']); + $this->assertEquals([], $webhook['data']['prefs']); /** * Test for FAILURE @@ -274,15 +461,15 @@ class WebhooksCustomServerTest extends Scope 'prefs' => ['a' => 'b'] ]); - $this->assertEquals($user['headers']['status-code'], 200); - $this->assertEquals($user['body']['a'], 'b'); + $this->assertEquals(200, $user['headers']['status-code']); + $this->assertEquals('b', $user['body']['a']); $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString('users.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString('users.*.update.prefs', $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -293,7 +480,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); - $this->assertEquals($webhook['data']['a'], 'b'); + $this->assertEquals('b', $webhook['data']['a']); return $data; } @@ -315,15 +502,15 @@ class WebhooksCustomServerTest extends Scope 'status' => false, ]); - $this->assertEquals($user['headers']['status-code'], 200); + $this->assertEquals(200, $user['headers']['status-code']); $this->assertNotEmpty($user['body']['$id']); $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString('users.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString('users.*.update.status', $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -336,11 +523,11 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); $this->assertNotEmpty($webhook['data']['$id']); $this->assertEquals($webhook['data']['name'], $data['name']); - $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['registration'])); - $this->assertEquals($webhook['data']['status'], false); + $this->assertTrue((new DatetimeValidator())->isValid($webhook['data']['registration'])); + $this->assertFalse($webhook['data']['status']); $this->assertEquals($webhook['data']['email'], $data['email']); - $this->assertEquals($webhook['data']['emailVerification'], false); - $this->assertEquals($webhook['data']['prefs']['a'], 'b'); + $this->assertFalse($webhook['data']['emailVerification']); + $this->assertEquals('b', $webhook['data']['prefs']['a']); return $data; } @@ -360,14 +547,14 @@ class WebhooksCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals($user['headers']['status-code'], 204); + $this->assertEquals(204, $user['headers']['status-code']); $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); $this->assertStringContainsString('users.*', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString('users.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); $this->assertStringContainsString("users.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -378,11 +565,11 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide())); $this->assertNotEmpty($webhook['data']['$id']); $this->assertEquals($webhook['data']['name'], $data['name']); - $this->assertEquals(true, (new DatetimeValidator())->isValid($webhook['data']['registration'])); - $this->assertEquals($webhook['data']['status'], false); + $this->assertTrue((new DatetimeValidator())->isValid($webhook['data']['registration'])); + $this->assertFalse($webhook['data']['status']); $this->assertEquals($webhook['data']['email'], $data['email']); - $this->assertEquals($webhook['data']['emailVerification'], false); - $this->assertEquals($webhook['data']['prefs']['a'], 'b'); + $this->assertFalse($webhook['data']['emailVerification']); + $this->assertEquals('b', $webhook['data']['prefs']['a']); return $data; } @@ -406,15 +593,15 @@ class WebhooksCustomServerTest extends Scope $id = $function['body']['$id'] ?? ''; - $this->assertEquals($function['headers']['status-code'], 201); + $this->assertEquals(201, $function['headers']['status-code']); $this->assertNotEmpty($function['body']['$id']); $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Signature'], $signatureExpected); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); @@ -447,7 +634,7 @@ class WebhooksCustomServerTest extends Scope ] ]); - $this->assertEquals($function['headers']['status-code'], 200); + $this->assertEquals(200, $function['headers']['status-code']); $this->assertEquals($function['body']['$id'], $data['functionId']); // Create variable @@ -464,9 +651,9 @@ class WebhooksCustomServerTest extends Scope $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); // $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString('functions.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString("functions.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -504,15 +691,15 @@ class WebhooksCustomServerTest extends Scope $functionId = $data['functionId'] ?? ''; $deploymentId = $deployment['body']['$id'] ?? ''; - $this->assertEquals($deployment['headers']['status-code'], 202); + $this->assertEquals(202, $deployment['headers']['status-code']); $this->assertNotEmpty($deployment['body']['$id']); $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); // $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString('functions.*.deployments.*', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString("functions.*.deployments.{$deploymentId}", $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -544,7 +731,7 @@ class WebhooksCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), []); - $this->assertEquals($response['headers']['status-code'], 200); + $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['$id']); // Wait for deployment to be built. @@ -553,9 +740,9 @@ class WebhooksCustomServerTest extends Scope $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); // $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString('functions.*.deployments.*', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString('functions.*.deployments.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -596,14 +783,14 @@ class WebhooksCustomServerTest extends Scope $executionId = $execution['body']['$id'] ?? ''; - $this->assertEquals($execution['headers']['status-code'], 202); + $this->assertEquals(202, $execution['headers']['status-code']); $this->assertNotEmpty($execution['body']['$id']); $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); // $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString('functions.*.executions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString('functions.*.executions.*.create', $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -624,9 +811,9 @@ class WebhooksCustomServerTest extends Scope $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); // $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString('functions.*.executions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString('functions.*.executions.*.update', $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -663,15 +850,15 @@ class WebhooksCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals($deployment['headers']['status-code'], 204); + $this->assertEquals(204, $deployment['headers']['status-code']); $this->assertEmpty($deployment['body']); $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); // $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString('functions.*.deployments.*', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString('functions.*.deployments.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); @@ -714,9 +901,9 @@ class WebhooksCustomServerTest extends Scope $webhook = $this->getLastRequest(); $signatureExpected = self::getWebhookSignature($webhook, $this->getProject()['signatureKey']); - $this->assertEquals($webhook['method'], 'POST'); - $this->assertEquals($webhook['headers']['Content-Type'], 'application/json'); - $this->assertEquals($webhook['headers']['User-Agent'], 'Appwrite-Server vdev. Please report abuse at security@appwrite.io'); + $this->assertEquals('POST', $webhook['method']); + $this->assertEquals('application/json', $webhook['headers']['Content-Type']); + $this->assertEquals('Appwrite-Server vdev. Please report abuse at security@appwrite.io', $webhook['headers']['User-Agent']); // $this->assertStringContainsString('functions.*', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString('functions.*.delete', $webhook['headers']['X-Appwrite-Webhook-Events']); // $this->assertStringContainsString("functions.{$id}", $webhook['headers']['X-Appwrite-Webhook-Events']); From 6bdfe3b8955dfac773fab926619c32fe9ef1654b Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 11:34:20 +0530 Subject: [PATCH 103/362] address naming comments. --- .../Tables/DatabasesConsoleClientTest.php | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php index 087ece167f..8a8d8de170 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php @@ -16,7 +16,7 @@ class DatabasesConsoleClientTest extends Scope use ProjectCustom; use SideConsole; - public function testCreateCollection(): array + public function testCreateTable(): array { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -50,10 +50,10 @@ class DatabasesConsoleClientTest extends Scope ]); $this->assertEquals(201, $movies['headers']['status-code']); - $this->assertEquals($movies['body']['name'], 'Movies'); + $this->assertEquals('Movies', $movies['body']['name']); /** - * Test when database is disabled but can still create collections + * Test when database is disabled but can still create tables */ $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId, array_merge([ 'content-type' => 'application/json', @@ -81,7 +81,7 @@ class DatabasesConsoleClientTest extends Scope ]); /** - * Test when collection is disabled but can still modify collections + * Test when table is disabled but can still modify tables */ $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $movies['body']['$id'], array_merge([ 'content-type' => 'application/json', @@ -92,20 +92,20 @@ class DatabasesConsoleClientTest extends Scope ]); $this->assertEquals(201, $tvShows['headers']['status-code']); - $this->assertEquals($tvShows['body']['name'], 'TvShows'); + $this->assertEquals('TvShows', $tvShows['body']['name']); return ['moviesId' => $movies['body']['$id'], 'databaseId' => $databaseId, 'tvShowsId' => $tvShows['body']['$id']]; } /** - * @depends testCreateCollection + * @depends testCreateTable * @param array $data * @throws \Exception */ - public function testListCollection(array $data) + public function testListTable(array $data) { /** - * Test when database is disabled but can still call list collections + * Test when database is disabled but can still call list tables */ $databaseId = $data['databaseId']; @@ -119,17 +119,17 @@ class DatabasesConsoleClientTest extends Scope } /** - * @depends testCreateCollection + * @depends testCreateTable * @param array $data * @throws \Exception */ - public function testGetCollection(array $data) + public function testGetTable(array $data) { $databaseId = $data['databaseId']; $moviesCollectionId = $data['moviesId']; /** - * Test when database and collection are disabled but can still call get collection + * Test when database and table are disabled but can still call get table */ $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $moviesCollectionId, array_merge([ 'content-type' => 'application/json', @@ -143,18 +143,18 @@ class DatabasesConsoleClientTest extends Scope } /** - * @depends testCreateCollection + * @depends testCreateTable * @param array $data * @throws \Exception * @throws \Exception */ - public function testUpdateCollection(array $data) + public function testUpdateTable(array $data) { $databaseId = $data['databaseId']; $moviesCollectionId = $data['moviesId']; /** - * Test When database and collection are disabled but can still call update collection + * Test When database and table are disabled but can still call update table */ $table = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $moviesCollectionId, array_merge([ 'content-type' => 'application/json', @@ -171,18 +171,18 @@ class DatabasesConsoleClientTest extends Scope } /** - * @depends testCreateCollection + * @depends testCreateTable * @param array $data * @throws \Exception * @throws \Exception */ - public function testDeleteCollection(array $data) + public function testDeleteTable(array $data) { $databaseId = $data['databaseId']; $tvShowsId = $data['tvShowsId']; /** - * Test when database and collection are disabled but can still call delete collection + * Test when database and table are disabled but can still call delete table */ $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tvShowsId, array_merge([ 'content-type' => 'application/json', @@ -190,11 +190,11 @@ class DatabasesConsoleClientTest extends Scope ], $this->getHeaders())); $this->assertEquals(204, $response['headers']['status-code']); - $this->assertEquals($response['body'], ""); + $this->assertEquals("", $response['body']); } /** - * @depends testCreateCollection + * @depends testCreateTable */ public function testGetDatabaseUsage(array $data) { @@ -226,7 +226,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); - $this->assertEquals(15, count($response['body'])); + $this->assertCount(15, $response['body']); $this->assertEquals('24h', $response['body']['range']); $this->assertIsNumeric($response['body']['rowsTotal']); $this->assertIsNumeric($response['body']['tablesTotal']); @@ -236,9 +236,9 @@ class DatabasesConsoleClientTest extends Scope /** - * @depends testCreateCollection + * @depends testCreateTable */ - public function testGetCollectionUsage(array $data) + public function testGetTableUsage(array $data) { $databaseId = $data['databaseId']; /** @@ -280,10 +280,10 @@ class DatabasesConsoleClientTest extends Scope } /** - * @depends testCreateCollection + * @depends testCreateTable * @throws \Utopia\Database\Exception\Query */ - public function testGetCollectionLogs(array $data) + public function testGetTableLogs(array $data) { $databaseId = $data['databaseId']; /** From 15e0385723f7e7d3a11dd07065cf7ae181cb7435 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 11:36:13 +0530 Subject: [PATCH 104/362] update: exception name. --- .../Databases/Http/Databases/Collections/Indexes/Action.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Create.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Delete.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Get.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/XList.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php index c1e3f61114..07a32ce122 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php @@ -86,7 +86,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate grandparent level not found exception. */ - final protected function getGrantParentNotFoundException(): string + final protected function getGrandParentNotFoundException(): string { return $this->isCollectionsAPI() ? Exception::COLLECTION_NOT_FOUND 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 c18ab69b10..a963640597 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 @@ -89,7 +89,7 @@ class Create extends Action if ($collection->isEmpty()) { // table or collection. - throw new Exception($this->getGrantParentNotFoundException()); + throw new Exception($this->getGrandParentNotFoundException()); } $count = $dbForProject->count('indexes', [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index a208e059f6..70df7c4f7a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -82,7 +82,7 @@ class Delete extends Action if ($collection->isEmpty()) { // table or collection. - throw new Exception($this->getGrantParentNotFoundException()); + throw new Exception($this->getGrandParentNotFoundException()); } $index = $dbForProject->getDocument('indexes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index fa10406f2a..466d6fa99e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -71,7 +71,7 @@ class Get extends Action if ($collection->isEmpty()) { // table or collection. - throw new Exception($this->getGrantParentNotFoundException()); + throw new Exception($this->getGrandParentNotFoundException()); } $index = $collection->find('key', $key, 'indexes'); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index 733e6854b2..d44c80b393 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -77,7 +77,7 @@ class XList extends Action if ($collection->isEmpty()) { // table or collection. - throw new Exception($this->getGrantParentNotFoundException()); + throw new Exception($this->getGrandParentNotFoundException()); } $queries = Query::parseQueries($queries); From 9ba29d47799f10902e5ae8074fcfbdfd26d6aecb Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 11:36:55 +0530 Subject: [PATCH 105/362] update: var name. --- tests/e2e/Services/GraphQL/Base.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 8cad67b909..aa90502163 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -25,8 +25,8 @@ trait Base public static string $CREATE_TABLE = 'create_table'; public static string $GET_TABLE = 'get_table'; public static string $GET_TABLES = 'list_tables'; - public static string $UPDATE_TABLE = 'update_tables'; - public static string $DELETE_TABLE = 'delete_tables'; + public static string $UPDATE_TABLE = 'update_table'; + public static string $DELETE_TABLE = 'delete_table'; // Attributes public static string $CREATE_STRING_ATTRIBUTE = 'create_string_attribute'; From e50d7df56ca8616c3d464b59a3045c70e316d28d Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 11:38:28 +0530 Subject: [PATCH 106/362] fix: audits event. --- .../Databases/Http/Databases/Collections/Documents/Create.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index bd59c9ee35..d6c9960a5b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -51,7 +51,7 @@ class Create extends Action ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].create') ->label('scope', 'documents.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'row.create') + ->label('audits.event', 'document.create') ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) From 63d591e7664ee8ba0921ae3b46c72a69d4f3d37a Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 11:39:46 +0530 Subject: [PATCH 107/362] fix: method name. --- tests/e2e/Services/GraphQL/Tables/AbuseTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/GraphQL/Tables/AbuseTest.php b/tests/e2e/Services/GraphQL/Tables/AbuseTest.php index 80bde907f9..623d4ff783 100644 --- a/tests/e2e/Services/GraphQL/Tables/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/Tables/AbuseTest.php @@ -29,7 +29,7 @@ class AbuseTest extends Scope public function testRateLimitEnforced() { - $data = $this->createCollection(); + $data = $this->createTable(); $databaseId = $data['databaseId']; $tableId = $data['tableId']; $projectId = $this->getProject()['$id']; @@ -114,7 +114,7 @@ class AbuseTest extends Scope $this->assertEquals('Too many queries.', $response['body']['message']); } - private function createCollection(): array + private function createTable(): array { $projectId = $this->getProject()['$id']; $query = $this->getQuery(self::$CREATE_DATABASE); From b0d9215ea5ba68e1b20bf28b59950dfc16fb3393 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 11:57:32 +0530 Subject: [PATCH 108/362] fix: abuse tests! --- tests/e2e/Services/GraphQL/Base.php | 256 +++++++++++++++++- .../GraphQL/Collections/AbuseTest.php | 2 +- .../e2e/Services/GraphQL/Tables/AbuseTest.php | 8 +- 3 files changed, 255 insertions(+), 11 deletions(-) diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index aa90502163..f050fa9638 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -306,7 +306,8 @@ trait Base public static string $UPDATE_PUSH_NOTIFICATION = 'update_push_notification'; // Complex queries - public static string $COMPLEX_QUERY = 'complex_query'; + public static string $COMPLEX_QUERY_TABLE = 'complex_query_table'; + public static string $COMPLEX_QUERY_COLLECTION = 'complex_query_collection'; // Attribute Fragments public static string $FRAGMENT_ATTRIBUTES = ' @@ -2689,7 +2690,7 @@ trait Base status } }'; - case self::$COMPLEX_QUERY: + case self::$COMPLEX_QUERY_COLLECTION: return 'mutation complex($databaseId: String!, $databaseName: String!, $collectionId: String!, $collectionName: String!, $documentSecurity: Boolean!, $collectionPermissions: [String!]!) { databasesCreate(databaseId: $databaseId, name: $databaseName) { _id @@ -2700,7 +2701,7 @@ trait Base _createdAt _updatedAt _permissions - _databaseId + databaseId name documentSecurity attributes { @@ -2712,7 +2713,7 @@ trait Base status } } - databasesCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "name", size: 255, required: true) { + collectionsCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "name", size: 255, required: true) { key type status @@ -2721,7 +2722,7 @@ trait Base default array } - databasesCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "age", min: 0, max: 150, required: true) { + collectionsCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "age", min: 0, max: 150, required: true) { key type status @@ -2731,7 +2732,7 @@ trait Base default array } - databasesCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "alive", required: false, default: true) { + collectionsCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "alive", required: false, default: true) { key type status @@ -2932,6 +2933,249 @@ trait Base } } }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; + case self::$COMPLEX_QUERY_TABLE: + return 'mutation complex($databaseId: String!, $databaseName: String!, $tableId: String!, $tableName: String!, $rowSecurity: Boolean!, $tablePermissions: [String!]!) { + databasesCreate(databaseId: $databaseId, name: $databaseName) { + _id + name + } + databasesCreateTable(databaseId: $databaseId, tableId: $tableId, name: $tableName, rowSecurity: $rowSecurity, permissions: $tablePermissions) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + rowSecurity + columns { + ...columnProperties + } + indexes { + key + type + status + } + } + tablesCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: "name", size: 255, required: true) { + key + type + status + size + required + default + array + } + tablesCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: "age", min: 0, max: 150, required: true) { + key + type + status + required + min + max + default + array + } + tablesCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: "alive", required: false, default: true) { + key + type + status + required + default + array + } + user1: usersCreate(userId: "unique()", email: "test1@appwrite.io", password: "password", name: "Tester 1") { + _id + _createdAt + _updatedAt + name + phone + email + status + registration + passwordUpdate + emailVerification + phoneVerification + prefs { + data + } + } + user2: usersCreate(userId: "unique()", email: "test2@appwrite.io", password: "password", name: "Tester 2") { + _id + _createdAt + _updatedAt + name + phone + email + status + registration + passwordUpdate + emailVerification + phoneVerification + prefs { + data + } + } + user3: usersCreate(userId: "unique()", email: "test3@appwrite.io", password: "password", name: "Tester 3") { + _id + _createdAt + _updatedAt + name + phone + email + status + registration + passwordUpdate + emailVerification + phoneVerification + prefs { + data + } + } + user4: usersCreate(userId: "unique()", email: "test4@appwrite.io", password: "password", name: "Tester 4") { + _id + _createdAt + _updatedAt + name + phone + email + status + registration + passwordUpdate + emailVerification + phoneVerification + prefs { + data + } + } + user5: usersCreate(userId: "unique()", email: "test5@appwrite.io", password: "password", name: "Tester 5") { + _id + _createdAt + _updatedAt + name + phone + email + status + registration + passwordUpdate + emailVerification + phoneVerification + prefs { + data + } + } + user6: usersCreate(userId: "unique()", email: "test6@appwrite.io", password: "password", name: "Tester 6") { + _id + _createdAt + _updatedAt + name + phone + email + status + registration + passwordUpdate + emailVerification + phoneVerification + prefs { + data + } + } + user7: usersCreate(userId: "unique()", email: "test7@appwrite.io", password: "password", name: "Tester 7") { + _id + _createdAt + _updatedAt + name + phone + email + status + registration + passwordUpdate + emailVerification + phoneVerification + prefs { + data + } + } + user8: usersCreate(userId: "unique()", email: "test8@appwrite.io", password: "password", name: "Tester 8") { + _id + _createdAt + _updatedAt + name + phone + email + status + registration + passwordUpdate + emailVerification + phoneVerification + prefs { + data + } + } + user9: usersCreate(userId: "unique()", email: "test9@appwrite.io", password: "password", name: "Tester 9") { + _id + _createdAt + _updatedAt + name + phone + email + status + registration + passwordUpdate + emailVerification + phoneVerification + prefs { + data + } + } + user10: usersCreate(userId: "unique()", email: "test10@appwrite.io", password: "password", name: "Tester 10") { + _id + _createdAt + _updatedAt + name + phone + email + status + registration + passwordUpdate + emailVerification + phoneVerification + prefs { + data + } + } + user11: usersCreate(userId: "unique()", email: "test11@appwrite.io", password: "password", name: "Tester 11") { + _id + _createdAt + _updatedAt + name + phone + email + status + registration + passwordUpdate + emailVerification + phoneVerification + prefs { + data + } + } + user12: usersCreate(userId: "unique()", email: "test12@appwrite.io", password: "password", name: "Tester 5") { + _id + _createdAt + _updatedAt + name + phone + email + status + registration + passwordUpdate + emailVerification + phoneVerification + prefs { + data + } + } + }' . PHP_EOL . self::$FRAGMENT_COLUMNS; } throw new \InvalidArgumentException('Invalid query type'); diff --git a/tests/e2e/Services/GraphQL/Collections/AbuseTest.php b/tests/e2e/Services/GraphQL/Collections/AbuseTest.php index a45bebd714..a58a57ec5a 100644 --- a/tests/e2e/Services/GraphQL/Collections/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/Collections/AbuseTest.php @@ -65,7 +65,7 @@ class AbuseTest extends Scope public function testComplexQueryBlocked() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$COMPLEX_QUERY); + $query = $this->getQuery(self::$COMPLEX_QUERY_COLLECTION); $graphQLPayload = [ 'query' => $query, 'variables' => [ diff --git a/tests/e2e/Services/GraphQL/Tables/AbuseTest.php b/tests/e2e/Services/GraphQL/Tables/AbuseTest.php index 623d4ff783..abb5019d55 100644 --- a/tests/e2e/Services/GraphQL/Tables/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/Tables/AbuseTest.php @@ -65,7 +65,7 @@ class AbuseTest extends Scope public function testComplexQueryBlocked() { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$COMPLEX_QUERY); + $query = $this->getQuery(self::$COMPLEX_QUERY_TABLE); $graphQLPayload = [ 'query' => $query, 'variables' => [ @@ -75,8 +75,8 @@ class AbuseTest extends Scope 'databaseId' => 'database', 'databaseName' => 'database', 'tableId' => 'table', - 'collectionName' => 'table', - 'collectionPermissions' => [ + 'tableName' => 'table', + 'tablePermissions' => [ Permission::read(Role::users()), Permission::create(Role::users()), Permission::update(Role::users()), @@ -157,7 +157,7 @@ class AbuseTest extends Scope $tableId = $response['body']['data']['databasesCreateTable']['_id']; - $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $query = $this->getQuery(self::$CREATE_STRING_COLUMN); $gqlPayload = [ 'query' => $query, 'variables' => [ From 087ccfe347c03e7148c80045dc527e48e112c9bc Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 12:06:17 +0530 Subject: [PATCH 109/362] remove: todo. --- app/config/scopes.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/config/scopes.php b/app/config/scopes.php index d459ffb2fc..7dea7b1cd5 100644 --- a/app/config/scopes.php +++ b/app/config/scopes.php @@ -1,6 +1,5 @@ [ 'description' => 'Access to create, update, and delete user sessions', From fcdddf7bf0511e696b3906012d72916a34a1c616 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 11 Jun 2025 12:21:48 +0530 Subject: [PATCH 110/362] address comments. --- app/config/errors.php | 13 +++-- app/config/events.php | 2 +- app/init/constants.php | 12 ----- src/Appwrite/Event/Event.php | 48 ++++++++++++++++- src/Appwrite/Event/Realtime.php | 51 ++----------------- src/Appwrite/Extend/Exception.php | 45 ++++++++-------- src/Appwrite/Messaging/Adapter/Realtime.php | 2 - .../Platform/Modules/Databases/Constants.php | 23 +++++++++ 8 files changed, 106 insertions(+), 90 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Constants.php diff --git a/app/config/errors.php b/app/config/errors.php index de26b077fc..f7e8f194ab 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -69,9 +69,14 @@ return [ 'description' => 'The request contains one or more invalid arguments. Please refer to the endpoint documentation.', 'code' => 400, ], - Exception::GENERAL_QUERY_LIMIT_EXCEEDED => [ - 'name' => Exception::GENERAL_QUERY_LIMIT_EXCEEDED, - 'description' => 'Query limit exceeded for the current attribute/column. Usage of more than 100 query values on a single attribute/column is prohibited.', + Exception::GENERAL_ATTRIBUTE_QUERY_LIMIT_EXCEEDED => [ + 'name' => Exception::GENERAL_ATTRIBUTE_QUERY_LIMIT_EXCEEDED, + 'description' => 'Query limit exceeded for the current attribute.', + 'code' => 400, + ], + Exception::GENERAL_COLUMN_QUERY_LIMIT_EXCEEDED => [ + 'name' => Exception::GENERAL_COLUMN_QUERY_LIMIT_EXCEEDED, + 'description' => 'Query limit exceeded for the current column.', 'code' => 400, ], Exception::GENERAL_QUERY_INVALID => [ @@ -813,7 +818,7 @@ return [ ], Exception::ATTRIBUTE_INVALID_RESIZE => [ 'name' => Exception::ATTRIBUTE_INVALID_RESIZE, - 'description' => "Existing data is too large for new size, truncate your existing data then try again.", + 'description' => 'Existing data is too large for new size, truncate your existing data then try again.', 'code' => 400, ], diff --git a/app/config/events.php b/app/config/events.php index b0e6b9f5fc..8e759aaf56 100644 --- a/app/config/events.php +++ b/app/config/events.php @@ -129,7 +129,7 @@ return [ '$resource' => true, '$description' => 'This event triggers on any columns event.', 'create' => [ - '$description' => 'This event triggers when an column is created.', + '$description' => 'This event triggers when a column is created.', ], 'delete' => [ '$description' => 'This event triggers when an column is deleted.' diff --git a/app/init/constants.php b/app/init/constants.php index c3b6d4a058..143bba29bd 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -265,15 +265,3 @@ const TOKENS_RESOURCE_TYPE_FILES = 'files'; const TOKENS_RESOURCE_TYPE_SITES = 'sites'; const TOKENS_RESOURCE_TYPE_FUNCTIONS = 'functions'; const TOKENS_RESOURCE_TYPE_DATABASES = 'databases'; - -// Context constants for database - -const DATABASE_ROWS_CONTEXT = 'row'; -const DATABASE_TABLES_CONTEXT = 'table'; -const DATABASE_COLUMNS_CONTEXT = 'column'; -const DATABASE_INDEX_CONTEXT = 'index'; - -const DATABASE_DOCUMENTS_CONTEXT = 'document'; -const DATABASE_ATTRIBUTES_CONTEXT = 'attribute'; -const DATABASE_COLLECTIONS_CONTEXT = 'collection'; -const DATABASE_COLUMN_INDEX_CONTEXT = 'columnIndex'; diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index d699a45417..73ca8126a0 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -576,7 +576,12 @@ class Event /** * Force a non-assoc array. */ - return \array_values($events); + $eventValues = \array_values($events); + + /** + * Return a combined list of table, collection events. + */ + return Event::mirrorCollectionEvents($pattern, $eventValues[0], $eventValues); } /** @@ -597,4 +602,45 @@ class Event $this->context = $event->context; return $this; } + + /** + * Adds `table` events for `collection` events. + * + * Example: + * + * `databases.*.collections.*.documents.*.update` →\ + * `[databases.*.collections.*.documents.*.update, databases.*.tables.*.rows.*.update]` + */ + private static function mirrorCollectionEvents(string $pattern, string $firstEvent, array $events): array + { + $tableEventMap = [ + 'documents' => 'rows', + 'collections' => 'tables', + 'attributes' => 'columns', + ]; + + if ( + str_contains($pattern, 'databases.') && + str_contains($firstEvent, 'collections') + ) { + $pairedEvents = []; + + foreach ($events as $event) { + $pairedEvents[] = $event; + + if (str_contains($event, 'collections')) { + $tableSideEvent = str_replace( + array_keys($tableEventMap), + array_values($tableEventMap), + $event + ); + $pairedEvents[] = $tableSideEvent; + } + } + + $events = $pairedEvents; + } + + return $events; + } } diff --git a/src/Appwrite/Event/Realtime.php b/src/Appwrite/Event/Realtime.php index 016006ae73..6cb51ffa14 100644 --- a/src/Appwrite/Event/Realtime.php +++ b/src/Appwrite/Event/Realtime.php @@ -72,11 +72,7 @@ class Realtime extends Event return false; } - $events = Event::generateEvents($this->getEvent(), $this->getParams()); - $firstEvent = $events[0]; // most verbose event pattern - - // generate and merge all collection and tables api events. - $events = $this->mirrorCollectionEvents($firstEvent, $events); + $allEvents = Event::generateEvents($this->getEvent(), $this->getParams()); $payload = new Document($this->getPayload()); @@ -87,7 +83,7 @@ class Realtime extends Event $tableOrCollection = $this->getContext('table') ?? $this->getContext('collection'); $target = RealtimeAdapter::fromPayload( - event: $firstEvent, + event: $allEvents[0], payload: $payload, project: $this->getProject(), database: $db, @@ -103,7 +99,7 @@ class Realtime extends Event $this->realtime->send( projectId: $projectId, payload: $this->getRealtimePayload(), - events: $events, + events: $allEvents, channels: $target['channels'], roles: $target['roles'], options: [ @@ -115,45 +111,4 @@ class Realtime extends Event return true; } - - /** - * Adds `table` events for `collection` events. - * - * Example: - * - * `databases.*.collections.*.documents.*.update` →\ - * `[databases.*.collections.*.documents.*.update, databases.*.tables.*.rows.*.update]` - */ - private function mirrorCollectionEvents(string $firstEvent, array $events): array - { - $tableEventMap = [ - 'documents' => 'rows', - 'collections' => 'tables', - 'attributes' => 'columns', - ]; - - if ( - str_contains($this->getEvent(), 'databases.') && - str_contains($firstEvent, 'collections') - ) { - $pairedEvents = []; - - foreach ($events as $event) { - $pairedEvents[] = $event; - - if (str_contains($event, 'collections')) { - $tableSideEvent = str_replace( - array_keys($tableEventMap), - array_values($tableEventMap), - $event - ); - $pairedEvents[] = $tableSideEvent; - } - } - - $events = $pairedEvents; - } - - return $events; - } } diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 38a562571c..29880a03b1 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -48,7 +48,8 @@ class Exception extends \Exception public const GENERAL_SMTP_DISABLED = 'general_smtp_disabled'; public const GENERAL_PHONE_DISABLED = 'general_phone_disabled'; public const GENERAL_ARGUMENT_INVALID = 'general_argument_invalid'; - public const GENERAL_QUERY_LIMIT_EXCEEDED = 'general_query_limit_exceeded'; + public const GENERAL_COLUMN_QUERY_LIMIT_EXCEEDED = 'general_column_query_limit_exceeded'; + public const GENERAL_ATTRIBUTE_QUERY_LIMIT_EXCEEDED = 'general_attribute_query_limit_exceeded'; public const GENERAL_QUERY_INVALID = 'general_query_invalid'; public const GENERAL_ROUTE_NOT_FOUND = 'general_route_not_found'; public const GENERAL_CURSOR_NOT_FOUND = 'general_cursor_not_found'; @@ -197,9 +198,9 @@ class Exception extends \Exception public const COLLECTION_LIMIT_EXCEEDED = 'collection_limit_exceeded'; /** Tables */ - public const TABLE_NOT_FOUND = 'table_not_found'; - public const TABLE_ALREADY_EXISTS = 'table_already_exists'; - public const TABLE_LIMIT_EXCEEDED = 'table_limit_exceeded'; + public const TABLE_NOT_FOUND = 'table_not_found'; + public const TABLE_ALREADY_EXISTS = 'table_already_exists'; + public const TABLE_LIMIT_EXCEEDED = 'table_limit_exceeded'; /** Documents */ public const DOCUMENT_NOT_FOUND = 'document_not_found'; @@ -211,13 +212,13 @@ class Exception extends \Exception public const DOCUMENT_DELETE_RESTRICTED = 'document_delete_restricted'; /** Rows */ - public const ROW_NOT_FOUND = 'row_not_found'; - public const ROW_INVALID_STRUCTURE = 'row_invalid_structure'; - public const ROW_MISSING_DATA = 'row_missing_data'; - public const ROW_MISSING_PAYLOAD = 'row_missing_payload'; - public const ROW_ALREADY_EXISTS = 'row_already_exists'; - public const ROW_UPDATE_CONFLICT = 'row_update_conflict'; - public const ROW_DELETE_RESTRICTED = 'row_delete_restricted'; + public const ROW_NOT_FOUND = 'row_not_found'; + public const ROW_INVALID_STRUCTURE = 'row_invalid_structure'; + public const ROW_MISSING_DATA = 'row_missing_data'; + public const ROW_MISSING_PAYLOAD = 'row_missing_payload'; + public const ROW_ALREADY_EXISTS = 'row_already_exists'; + public const ROW_UPDATE_CONFLICT = 'row_update_conflict'; + public const ROW_DELETE_RESTRICTED = 'row_delete_restricted'; /** Attributes */ public const ATTRIBUTE_NOT_FOUND = 'attribute_not_found'; @@ -232,16 +233,16 @@ class Exception extends \Exception public const ATTRIBUTE_INVALID_RESIZE = 'attribute_invalid_resize'; /** Columns */ - public const COLUMN_NOT_FOUND = 'column_not_found'; - public const COLUMN_UNKNOWN = 'column_unknown'; - public const COLUMN_NOT_AVAILABLE = 'column_not_available'; - public const COLUMN_FORMAT_UNSUPPORTED = 'column_format_unsupported'; - public const COLUMN_DEFAULT_UNSUPPORTED = 'column_default_unsupported'; - public const COLUMN_ALREADY_EXISTS = 'column_already_exists'; - public const COLUMN_LIMIT_EXCEEDED = 'column_limit_exceeded'; - public const COLUMN_VALUE_INVALID = 'column_value_invalid'; - public const COLUMN_TYPE_INVALID = 'column_type_invalid'; - public const COLUMN_INVALID_RESIZE = 'column_invalid_resize'; + public const COLUMN_NOT_FOUND = 'column_not_found'; + public const COLUMN_UNKNOWN = 'column_unknown'; + public const COLUMN_NOT_AVAILABLE = 'column_not_available'; + public const COLUMN_FORMAT_UNSUPPORTED = 'column_format_unsupported'; + public const COLUMN_DEFAULT_UNSUPPORTED = 'column_default_unsupported'; + public const COLUMN_ALREADY_EXISTS = 'column_already_exists'; + public const COLUMN_LIMIT_EXCEEDED = 'column_limit_exceeded'; + public const COLUMN_VALUE_INVALID = 'column_value_invalid'; + public const COLUMN_TYPE_INVALID = 'column_type_invalid'; + public const COLUMN_INVALID_RESIZE = 'column_invalid_resize'; /** Relationship */ public const RELATIONSHIP_VALUE_INVALID = 'relationship_value_invalid'; @@ -347,7 +348,7 @@ class Exception extends \Exception public const MESSAGE_MISSING_SCHEDULE = 'message_missing_schedule'; /** Targets */ - public const TARGET_PROVIDER_INVALID_TYPE = 'target_provider_invalid_type'; + public const TARGET_PROVIDER_INVALID_TYPE = 'target_provider_invalid_type'; /** Schedules */ public const SCHEDULE_NOT_FOUND = 'schedule_not_found'; diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index bfe87c49db..aff4e400ce 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -312,12 +312,10 @@ class Realtime extends Adapter throw new \Exception('Collection or the Table needs to be passed to Realtime for Document/Row events in the Database.'); } - // 1.7.x - Tables API $channels[] = 'rows'; $channels[] = 'databases.' . $database->getId() . '.tables.' . $payload->getAttribute('$tableId') . '.rows'; $channels[] = 'databases.' . $database->getId() . '.tables.' . $payload->getAttribute('$tableId') . '.rows.' . $payload->getId(); - // 1.6.x - Collections API $channels[] = 'documents'; $channels[] = 'databases.' . $database->getId() . '.collections.' . $payload->getAttribute('$collectionId') . '.documents'; $channels[] = 'databases.' . $database->getId() . '.collections.' . $payload->getAttribute('$collectionId') . '.documents.' . $payload->getId(); diff --git a/src/Appwrite/Platform/Modules/Databases/Constants.php b/src/Appwrite/Platform/Modules/Databases/Constants.php new file mode 100644 index 0000000000..b17248bf4d --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Constants.php @@ -0,0 +1,23 @@ + Date: Wed, 11 Jun 2025 12:51:31 +0530 Subject: [PATCH 111/362] update: `getInternalId()` -> `getSequence()` --- .../Collections/Attributes/Action.php | 52 +++++++++---------- .../Collections/Attributes/Delete.php | 16 +++--- .../Databases/Collections/Attributes/Get.php | 4 +- .../Attributes/Relationship/Create.php | 8 +-- .../Collections/Attributes/XList.php | 10 ++-- .../Http/Databases/Collections/Create.php | 6 +-- .../Http/Databases/Collections/Delete.php | 6 +-- .../Collections/Documents/Create.php | 12 ++--- .../Collections/Documents/Delete.php | 10 ++-- .../Databases/Collections/Documents/Get.php | 8 +-- .../Collections/Documents/Logs/XList.php | 4 +- .../Collections/Documents/Update.php | 16 +++--- .../Databases/Collections/Documents/XList.php | 12 ++--- .../Http/Databases/Collections/Get.php | 2 +- .../Databases/Collections/Indexes/Create.php | 14 ++--- .../Databases/Collections/Indexes/Delete.php | 6 +-- .../Databases/Collections/Indexes/Get.php | 2 +- .../Databases/Collections/Indexes/XList.php | 6 +-- .../Http/Databases/Collections/Logs/XList.php | 4 +- .../Http/Databases/Collections/Update.php | 6 +-- .../Http/Databases/Collections/Usage/Get.php | 6 +-- .../Http/Databases/Collections/XList.php | 6 +-- .../Databases/Http/Databases/Create.php | 2 +- .../Databases/Http/Databases/Delete.php | 2 +- .../Databases/Http/Databases/Usage/Get.php | 10 ++-- 25 files changed, 115 insertions(+), 115 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 095b679223..2e0e598695 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -287,7 +287,7 @@ abstract class Action extends UtopiaAction throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $db->getSequence(), $collectionId); if ($collection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); @@ -310,7 +310,7 @@ abstract class Action extends UtopiaAction if ($type === Database::VAR_RELATIONSHIP) { $options['side'] = Database::RELATION_SIDE_PARENT; - $relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection'] ?? ''); + $relatedCollection = $dbForProject->getDocument('database_' . $db->getSequence(), $options['relatedCollection'] ?? ''); if ($relatedCollection->isEmpty()) { $parent = $this->isCollectionsAPI() ? 'collection' : 'table'; throw new Exception($this->getParentNotFoundException(), "The related $parent was not found."); @@ -319,11 +319,11 @@ abstract class Action extends UtopiaAction try { $attribute = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key), + '$id' => ID::custom($db->getSequence() . '_' . $collection->getSequence() . '_' . $key), 'key' => $key, - 'databaseInternalId' => $db->getInternalId(), + 'databaseInternalId' => $db->getSequence(), 'databaseId' => $db->getId(), - 'collectionInternalId' => $collection->getInternalId(), + 'collectionInternalId' => $collection->getSequence(), 'collectionId' => $collectionId, 'type' => $type, 'status' => 'processing', // processing, available, failed, deleting, stuck @@ -345,13 +345,13 @@ abstract class Action extends UtopiaAction } catch (LimitException) { throw new Exception($this->getLimitException()); } catch (Throwable $e) { - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $collectionId); + $dbForProject->purgeCachedCollection('database_' . $db->getSequence() . '_collection_' . $collection->getSequence()); throw $e; } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $collectionId); + $dbForProject->purgeCachedCollection('database_' . $db->getSequence() . '_collection_' . $collection->getSequence()); if ($type === Database::VAR_RELATIONSHIP && $options['twoWay']) { $twoWayKey = $options['twoWayKey']; @@ -361,11 +361,11 @@ abstract class Action extends UtopiaAction try { $twoWayAttribute = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $twoWayKey), + '$id' => ID::custom($db->getSequence() . '_' . $relatedCollection->getSequence() . '_' . $twoWayKey), 'key' => $twoWayKey, - 'databaseInternalId' => $db->getInternalId(), + 'databaseInternalId' => $db->getSequence(), 'databaseId' => $db->getId(), - 'collectionInternalId' => $relatedCollection->getInternalId(), + 'collectionInternalId' => $relatedCollection->getSequence(), 'collectionId' => $relatedCollection->getId(), 'type' => $type, 'status' => 'processing', // processing, available, failed, deleting, stuck @@ -389,13 +389,13 @@ abstract class Action extends UtopiaAction $dbForProject->deleteDocument('attributes', $attribute->getId()); throw new Exception($this->getLimitException()); } catch (Throwable $e) { - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedCollection->getId()); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedCollection->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $relatedCollection->getId()); + $dbForProject->purgeCachedCollection('database_' . $db->getSequence() . '_collection_' . $relatedCollection->getSequence()); throw $e; } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedCollection->getId()); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedCollection->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $relatedCollection->getId()); + $dbForProject->purgeCachedCollection('database_' . $db->getSequence() . '_collection_' . $relatedCollection->getSequence()); } $queueForDatabase @@ -434,13 +434,13 @@ abstract class Action extends UtopiaAction throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $db->getSequence(), $collectionId); if ($collection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); } - $attribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); + $attribute = $dbForProject->getDocument('attributes', $db->getSequence() . '_' . $collection->getSequence() . '_' . $key); if ($attribute->isEmpty()) { throw new Exception($this->getNotFoundException()); @@ -466,7 +466,7 @@ abstract class Action extends UtopiaAction throw new Exception($this->getDefaultUnsupportedException(), 'Cannot set default value for array ' . $this->getContext() . 's'); } - $collectionId = 'database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId(); + $collectionId = 'database_' . $db->getSequence() . '_collection_' . $collection->getSequence(); $attribute ->setAttribute('default', $default) @@ -546,9 +546,9 @@ abstract class Action extends UtopiaAction } if ($primaryDocumentOptions['twoWay']) { - $relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $primaryDocumentOptions['relatedCollection']); + $relatedCollection = $dbForProject->getDocument('database_' . $db->getSequence(), $primaryDocumentOptions['relatedCollection']); - $relatedAttribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $primaryDocumentOptions['twoWayKey']); + $relatedAttribute = $dbForProject->getDocument('attributes', $db->getSequence() . '_' . $relatedCollection->getSequence() . '_' . $primaryDocumentOptions['twoWayKey']); if (!empty($newKey) && $newKey !== $key) { $options['twoWayKey'] = $newKey; @@ -556,9 +556,9 @@ abstract class Action extends UtopiaAction $relatedOptions = \array_merge($relatedAttribute->getAttribute('options'), $options); $relatedAttribute->setAttribute('options', $relatedOptions); - $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $primaryDocumentOptions['twoWayKey'], $relatedAttribute); + $dbForProject->updateDocument('attributes', $db->getSequence() . '_' . $relatedCollection->getSequence() . '_' . $primaryDocumentOptions['twoWayKey'], $relatedAttribute); - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $relatedCollection->getId()); + $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $relatedCollection->getId()); } } else { try { @@ -586,7 +586,7 @@ abstract class Action extends UtopiaAction $originalUid = $attribute->getId(); $attribute - ->setAttribute('$id', ID::custom($db->getInternalId() . '_' . $collection->getInternalId() . '_' . $newKey)) + ->setAttribute('$id', ID::custom($db->getSequence() . '_' . $collection->getSequence() . '_' . $newKey)) ->setAttribute('key', $newKey); $dbForProject->updateDocument('attributes', $originalUid, $attribute); @@ -608,10 +608,10 @@ abstract class Action extends UtopiaAction } } } else { - $attribute = $dbForProject->updateDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key, $attribute); + $attribute = $dbForProject->updateDocument('attributes', $db->getSequence() . '_' . $collection->getSequence() . '_' . $key, $attribute); } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collection->getId()); + $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $collection->getId()); $queueForEvents ->setContext('database', $db) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index cf5b7766b3..1f31097caf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -76,12 +76,12 @@ class Delete extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $db->getSequence(), $collectionId); if ($collection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); } - $attribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); + $attribute = $dbForProject->getDocument('attributes', $db->getSequence() . '_' . $collection->getSequence() . '_' . $key); if ($attribute->isEmpty()) { throw new Exception($this->getNotFoundException()); } @@ -98,18 +98,18 @@ class Delete extends Action $attribute = $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'deleting')); } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $collectionId); + $dbForProject->purgeCachedCollection('database_' . $db->getSequence() . '_collection_' . $collection->getSequence()); if ($attribute->getAttribute('type') === Database::VAR_RELATIONSHIP) { $options = $attribute->getAttribute('options'); if ($options['twoWay']) { - $relatedCollection = $dbForProject->getDocument('database_' . $db->getInternalId(), $options['relatedCollection']); + $relatedCollection = $dbForProject->getDocument('database_' . $db->getSequence(), $options['relatedCollection']); if ($relatedCollection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); } - $relatedAttribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $relatedCollection->getInternalId() . '_' . $options['twoWayKey']); + $relatedAttribute = $dbForProject->getDocument('attributes', $db->getSequence() . '_' . $relatedCollection->getSequence() . '_' . $options['twoWayKey']); if ($relatedAttribute->isEmpty()) { throw new Exception($this->getNotFoundException()); } @@ -118,8 +118,8 @@ class Delete extends Action $dbForProject->updateDocument('attributes', $relatedAttribute->getId(), $relatedAttribute->setAttribute('status', 'deleting')); } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $options['relatedCollection']); - $dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $relatedCollection->getInternalId()); + $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $options['relatedCollection']); + $dbForProject->purgeCachedCollection('database_' . $db->getSequence() . '_collection_' . $relatedCollection->getSequence()); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index 96e40c750d..ba91af54a2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -76,12 +76,12 @@ class Get extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); if ($collection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); } - $attribute = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); + $attribute = $dbForProject->getDocument('attributes', $database->getSequence() . '_' . $collection->getSequence() . '_' . $key); if ($attribute->isEmpty()) { throw new Exception($this->getNotFoundException()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php index 193e3eaa09..0bbb3faa67 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php @@ -93,14 +93,14 @@ class Create extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); - $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId()); + $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); + $collection = $dbForProject->getCollection('database_' . $database->getSequence() . '_collection_' . $collection->getSequence()); if ($collection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); } - $relatedCollectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId); - $relatedCollection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $relatedCollectionDocument->getInternalId()); + $relatedCollectionDocument = $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId); + $relatedCollection = $dbForProject->getCollection('database_' . $database->getSequence() . '_collection_' . $relatedCollectionDocument->getSequence()); if ($relatedCollection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index 7f2f23df62..dac7d94ab5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -69,7 +69,7 @@ class XList extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); if ($collection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); } @@ -78,8 +78,8 @@ class XList extends Action \array_push( $queries, - Query::equal('databaseInternalId', [$database->getInternalId()]), - Query::equal('collectionInternalId', [$collection->getInternalId()]) + Query::equal('databaseInternalId', [$database->getSequence()]), + Query::equal('collectionInternalId', [$collection->getSequence()]) ); $cursor = \array_filter( @@ -97,8 +97,8 @@ class XList extends Action $attributeId = $cursor->getValue(); $cursorDocument = Authorization::skip( fn () => $dbForProject->find('attributes', [ - Query::equal('databaseInternalId', [$database->getInternalId()]), - Query::equal('collectionInternalId', [$collection->getInternalId()]), + Query::equal('databaseInternalId', [$database->getSequence()]), + Query::equal('collectionInternalId', [$collection->getSequence()]), Query::equal('key', [$attributeId]), Query::limit(1), ]) 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 a65bf9c311..6b80901e05 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -89,9 +89,9 @@ class Create extends Action $permissions = Permission::aggregate($permissions) ?? []; try { - $collection = $dbForProject->createDocument('database_' . $database->getInternalId(), new Document([ + $collection = $dbForProject->createDocument('database_' . $database->getSequence(), new Document([ '$id' => $collectionId, - 'databaseInternalId' => $database->getInternalId(), + 'databaseInternalId' => $database->getSequence(), 'databaseId' => $databaseId, '$permissions' => $permissions, 'documentSecurity' => $documentSecurity, @@ -100,7 +100,7 @@ class Create extends Action 'search' => \implode(' ', [$collectionId, $name]), ])); - $dbForProject->createCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), permissions: $permissions, documentSecurity: $documentSecurity); + $dbForProject->createCollection('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), permissions: $permissions, documentSecurity: $documentSecurity); } catch (DuplicateException) { throw new Exception($this->getDuplicateException()); } catch (LimitException) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php index d838d16b94..67bddbc9ff 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php @@ -72,17 +72,17 @@ class Delete extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); if ($collection->isEmpty()) { throw new Exception($this->getNotFoundException()); } - if (!$dbForProject->deleteDocument('database_' . $database->getInternalId(), $collectionId)) { + if (!$dbForProject->deleteDocument('database_' . $database->getSequence(), $collectionId)) { $type = $this->getContext(); throw new Exception(Exception::GENERAL_SERVER_ERROR, "Failed to remove $type from DB"); } - $dbForProject->purgeCachedCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId()); + $dbForProject->purgeCachedCollection('database_' . $database->getSequence() . '_collection_' . $collection->getSequence()); $queueForDatabase ->setType(DATABASE_TYPE_DELETE_COLLECTION) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index d6c9960a5b..23883c9ff4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -107,7 +107,7 @@ class Create extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId)); if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception($this->getParentNotFoundException()); @@ -199,7 +199,7 @@ class Create extends Action $relatedCollectionId = $relationship->getAttribute('relatedCollection'); $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) ); foreach ($relations as &$relation) { @@ -213,7 +213,7 @@ class Create extends Action } if ($relation instanceof Document) { $current = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId(), $relation->getId()) + fn () => $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $relatedCollection->getSequence(), $relation->getId()) ); if ($current->isEmpty()) { @@ -244,7 +244,7 @@ class Create extends Action $checkPermissions($collection, $document, Database::PERMISSION_CREATE); try { - $document = $dbForProject->createDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $document); + $document = $dbForProject->createDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $document); } catch (StructureException $e) { throw new Exception($this->getInvalidStructureException(), $e->getMessage()); } catch (DuplicateException) { @@ -275,7 +275,7 @@ class Create extends Action $relatedCollectionId = $relationship->getAttribute('relatedCollection'); $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) ); foreach ($related as $relation) { @@ -290,7 +290,7 @@ class Create extends Action $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); // per collection + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); // per collection $response->addHeader('X-Debug-Operations', $operations); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index c218e713bf..32af5b0127 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -88,14 +88,14 @@ class Delete extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId)); if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception($this->getParentNotFoundException()); } // Read permission should not be required for delete - $document = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); + $document = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId)); if ($document->isEmpty()) { throw new Exception($this->getNotFoundException()); @@ -104,7 +104,7 @@ class Delete extends Action try { $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $collection, $documentId) { $dbForProject->deleteDocument( - 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId ); }); @@ -134,7 +134,7 @@ class Delete extends Action $relatedCollectionId = $relationship->getAttribute('relatedCollection'); $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) ); foreach ($related as $relation) { @@ -149,7 +149,7 @@ class Delete extends Action $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), 1); // per collection + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), 1); // per collection $response->addHeader('X-Debug-Operations', 1); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index aa01eebcdf..f8fd749dc2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -79,7 +79,7 @@ class Get extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId)); if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception($this->getParentNotFoundException()); @@ -87,7 +87,7 @@ class Get extends Action try { $queries = Query::parseQueries($queries); - $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId, $queries); + $document = $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId, $queries); } catch (AuthorizationException) { throw new Exception(Exception::USER_UNAUTHORIZED); } catch (QueryException $e) { @@ -133,7 +133,7 @@ class Get extends Action $relatedCollectionId = $relationship->getAttribute('relatedCollection'); $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) ); foreach ($related as $relation) { @@ -148,7 +148,7 @@ class Get extends Action $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); $response->addHeader('X-Debug-Operations', $operations); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index bb24d41b30..1053c00ff9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -82,13 +82,13 @@ class XList extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); if ($collection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); } - $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId); + $document = $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId); if ($document->isEmpty()) { throw new Exception($this->getNotFoundException()); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 17da8e552d..58408ae4ab 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -101,7 +101,7 @@ class Update extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId)); if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception($this->getParentNotFoundException()); @@ -109,7 +109,7 @@ class Update extends Action // Read permission should not be required for update /** @var Document $document */ - $document = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); + $document = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId)); if ($document->isEmpty()) { throw new Exception($this->getNotFoundException()); @@ -179,7 +179,7 @@ class Update extends Action $relatedCollectionId = $relationship->getAttribute('relatedCollection'); $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) ); foreach ($relations as &$relation) { @@ -194,7 +194,7 @@ class Update extends Action } if ($relation instanceof Document) { $oldDocument = Authorization::skip(fn () => $dbForProject->getDocument( - 'database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId(), + 'database_' . $database->getSequence() . '_collection_' . $relatedCollection->getSequence(), $relation->getId() )); $relation->removeAttribute('$collectionId'); @@ -202,7 +202,7 @@ class Update extends Action // Attribute $collection is required for Utopia. $relation->setAttribute( '$collection', - 'database_' . $database->getInternalId() . '_collection_' . $relatedCollection->getInternalId() + 'database_' . $database->getSequence() . '_collection_' . $relatedCollection->getSequence() ); if ($oldDocument->isEmpty()) { @@ -226,7 +226,7 @@ class Update extends Action $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); $response->addHeader('X-Debug-Operations', $operations); @@ -234,7 +234,7 @@ class Update extends Action $document = $dbForProject->withRequestTimestamp( $requestTimestamp, fn () => $dbForProject->updateDocument( - 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $document->getId(), $newDocument ) @@ -271,7 +271,7 @@ class Update extends Action $relatedCollectionId = $relationship->getAttribute('relatedCollection'); $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) ); foreach ($related as $relation) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 57af51d908..d11128ed7b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -79,7 +79,7 @@ class XList extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId)); if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception($this->getParentNotFoundException()); @@ -108,7 +108,7 @@ class XList extends Action $documentId = $cursor->getValue(); - $cursorDocument = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); + $cursorDocument = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId)); if ($cursorDocument->isEmpty()) { $type = ucfirst($this->getContext()); @@ -118,8 +118,8 @@ class XList extends Action $cursor->setValue($cursorDocument); } try { - $documents = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries); - $total = $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries, APP_LIMIT_COUNT); + $documents = $dbForProject->find('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $queries); + $total = $dbForProject->count('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $queries, APP_LIMIT_COUNT); } catch (OrderException $e) { $documents = $this->isCollectionsAPI() ? 'documents' : 'rows'; $attribute = $this->isCollectionsAPI() ? 'attribute' : 'column'; @@ -165,7 +165,7 @@ class XList extends Action $relatedCollectionId = $relationship->getAttribute('relatedCollection'); // todo: Use local cache for this getDocument - $relatedCollection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId)); + $relatedCollection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId)); foreach ($relations as $index => $doc) { if ($doc instanceof Document) { @@ -191,7 +191,7 @@ class XList extends Action $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); $response->addHeader('X-Debug-Operations', $operations); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php index bf06e29e26..9ff9e3e442 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php @@ -66,7 +66,7 @@ class Get extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); if ($collection->isEmpty()) { throw new Exception($this->getNotFoundException()); 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 a963640597..e688088640 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 @@ -85,7 +85,7 @@ class Create extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $db->getSequence(), $collectionId); if ($collection->isEmpty()) { // table or collection. @@ -93,8 +93,8 @@ class Create extends Action } $count = $dbForProject->count('indexes', [ - Query::equal('collectionInternalId', [$collection->getInternalId()]), - Query::equal('databaseInternalId', [$db->getInternalId()]) + Query::equal('collectionInternalId', [$collection->getSequence()]), + Query::equal('databaseInternalId', [$db->getSequence()]) ], 61); $limit = $dbForProject->getLimitForIndexes(); @@ -173,12 +173,12 @@ class Create extends Action } $index = new Document([ - '$id' => ID::custom($db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key), + '$id' => ID::custom($db->getSequence() . '_' . $collection->getSequence() . '_' . $key), 'key' => $key, 'status' => 'processing', // processing, available, failed, deleting, stuck - 'databaseInternalId' => $db->getInternalId(), + 'databaseInternalId' => $db->getSequence(), 'databaseId' => $databaseId, - 'collectionInternalId' => $collection->getInternalId(), + 'collectionInternalId' => $collection->getSequence(), 'collectionId' => $collectionId, 'type' => $type, 'attributes' => $attributes, @@ -201,7 +201,7 @@ class Create extends Action throw new Exception($this->getDuplicateException()); } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); + $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $collectionId); $queueForDatabase ->setType(DATABASE_TYPE_CREATE_INDEX) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index 70df7c4f7a..6fe3e3f42c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -78,14 +78,14 @@ class Delete extends Action if ($db->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $db->getSequence(), $collectionId); if ($collection->isEmpty()) { // table or collection. throw new Exception($this->getGrandParentNotFoundException()); } - $index = $dbForProject->getDocument('indexes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); + $index = $dbForProject->getDocument('indexes', $db->getSequence() . '_' . $collection->getSequence() . '_' . $key); if (empty($index->getId())) { throw new Exception($this->getNotFoundException()); @@ -96,7 +96,7 @@ class Delete extends Action $index = $dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'deleting')); } - $dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId); + $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $collectionId); $queueForDatabase ->setType(DATABASE_TYPE_DELETE_INDEX) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index 466d6fa99e..8d5513e1c0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -67,7 +67,7 @@ class Get extends Action if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); if ($collection->isEmpty()) { // table or collection. diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index d44c80b393..5929d56a91 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -73,7 +73,7 @@ class XList extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); if ($collection->isEmpty()) { // table or collection. @@ -104,8 +104,8 @@ class XList extends Action $indexId = $cursor->getValue(); $cursorDocument = Authorization::skip(fn () => $dbForProject->find('indexes', [ - Query::equal('collectionInternalId', [$collection->getInternalId()]), - Query::equal('databaseInternalId', [$database->getInternalId()]), + Query::equal('collectionInternalId', [$collection->getSequence()]), + Query::equal('databaseInternalId', [$database->getSequence()]), Query::equal('key', [$indexId]), Query::limit(1) ])); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 7785ec2890..6e9f86260c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -81,8 +81,8 @@ class XList extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); - $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); + $collectionDocument = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); + $collection = $dbForProject->getCollection('database_' . $database->getSequence() . '_collection_' . $collectionDocument->getSequence()); if ($collection->isEmpty()) { throw new Exception($this->getNotFoundException()); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index d7a2751166..e1e8da7017 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -78,7 +78,7 @@ class Update extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); if ($collection->isEmpty()) { throw new Exception($this->getNotFoundException()); } @@ -91,7 +91,7 @@ class Update extends Action $enabled ??= $collection->getAttribute('enabled', true); $collection = $dbForProject->updateDocument( - 'database_' . $database->getInternalId(), + 'database_' . $database->getSequence(), $collectionId, $collection ->setAttribute('name', $name) @@ -101,7 +101,7 @@ class Update extends Action ->setAttribute('search', \implode(' ', [$collectionId, $name])) ); - $dbForProject->updateCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $permissions, $documentSecurity); + $dbForProject->updateCollection('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $permissions, $documentSecurity); $queueForEvents ->setContext('database', $database) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php index 995200fcc7..5d49be7723 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php @@ -67,8 +67,8 @@ class Get extends Action public function action(string $databaseId, string $range, string $collectionId, UtopiaResponse $response, Database $dbForProject): void { $database = $dbForProject->getDocument('databases', $databaseId); - $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); - $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); + $collectionDocument = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); + $collection = $dbForProject->getCollection('database_' . $database->getSequence() . '_collection_' . $collectionDocument->getSequence()); if ($collection->isEmpty()) { throw new Exception($this->getNotFoundException()); @@ -78,7 +78,7 @@ class Get extends Action $stats = $usage = []; $days = $periods[$range]; $metrics = [ - str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getInternalId(), $collectionDocument->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), + str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getSequence(), $collectionDocument->getSequence()], METRIC_DATABASE_ID_COLLECTION_ID_DOCUMENTS), ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index 1b50c3f090..e9df7db598 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -94,7 +94,7 @@ class XList extends Action } $collectionIdId = $cursor->getValue(); - $cursorDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionIdId); + $cursorDocument = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionIdId); if ($cursorDocument->isEmpty()) { throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, ucfirst($this->getContext()) . " '$collectionIdId' for the 'cursor' value not found."); @@ -106,8 +106,8 @@ class XList extends Action $filterQueries = Query::groupByType($queries)['filters']; try { - $collections = $dbForProject->find('database_' . $database->getInternalId(), $queries); - $total = $dbForProject->count('database_' . $database->getInternalId(), $filterQueries, APP_LIMIT_COUNT); + $collections = $dbForProject->find('database_' . $database->getSequence(), $queries); + $total = $dbForProject->count('database_' . $database->getSequence(), $filterQueries, APP_LIMIT_COUNT); } catch (OrderException $e) { $documents = $this->isCollectionsAPI() ? 'documents' : 'rows'; $attribute = $this->isCollectionsAPI() ? 'attribute' : 'column'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index a734cbdd22..1f368ec77a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -109,7 +109,7 @@ class Create extends Action 'orders' => $index['orders'], ]); } - $dbForProject->createCollection('database_' . $database->getInternalId(), $attributes, $indexes); + $dbForProject->createCollection('database_' . $database->getSequence(), $attributes, $indexes); } catch (DuplicateException) { throw new Exception(Exception::DATABASE_ALREADY_EXISTS); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php index e0651b5e5b..60df83bb77 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php @@ -73,7 +73,7 @@ class Delete extends Action } $dbForProject->purgeCachedDocument('databases', $database->getId()); - $dbForProject->purgeCachedCollection('databases_' . $database->getInternalId()); + $dbForProject->purgeCachedCollection('databases_' . $database->getSequence()); $queueForDatabase ->setType(DATABASE_TYPE_DELETE_DATABASE) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index 222201d5ed..fab12a9735 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -70,11 +70,11 @@ class Get extends Action $stats = $usage = []; $days = $periods[$range]; $metrics = [ - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS), - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS), - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_STORAGE), - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASES_OPERATIONS_READS), - str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASES_OPERATIONS_WRITES) + str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_COLLECTIONS), + str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_DOCUMENTS), + str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_STORAGE), + str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASES_OPERATIONS_READS), + str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASES_OPERATIONS_WRITES) ]; Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) { From e07a1817ab57d9175f9be29d0785fd3429b29ff5 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 11 Jun 2025 13:42:55 +0530 Subject: [PATCH 112/362] update: remove conflict, restrict and relationship exceptions from global handler. --- app/controllers/general.php | 19 ---------------- .../Collections/Attributes/Action.php | 22 +++++++++++++++++-- .../Collections/Documents/Action.php | 19 ++++++++++++++++ .../Collections/Documents/Delete.php | 9 +++++--- .../Collections/Documents/Update.php | 12 +++++----- 5 files changed, 51 insertions(+), 30 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 46bc367d63..5aed7c21ea 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1174,14 +1174,6 @@ App::error() break; } break; - case 'Utopia\Database\Exception\Conflict': - $error = new AppwriteException( - $isTablesAPI - ? AppwriteException::ROW_UPDATE_CONFLICT - : AppwriteException::DOCUMENT_UPDATE_CONFLICT, - previous: $error - ); - break; case 'Utopia\Database\Exception\Timeout': $error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error); break; @@ -1203,20 +1195,9 @@ App::error() ? AppwriteException::ROW_ALREADY_EXISTS : AppwriteException::DOCUMENT_ALREADY_EXISTS ); - break; - case 'Utopia\Database\Exception\Restricted': - $error = new AppwriteException( - $isTablesAPI - ? AppwriteException::ROW_DELETE_RESTRICTED - : AppwriteException::DOCUMENT_DELETE_RESTRICTED - ); - break; case 'Utopia\Database\Exception\Authorization': $error = new AppwriteException(AppwriteException::USER_UNAUTHORIZED); break; - case 'Utopia\Database\Exception\Relationship': - $error = new AppwriteException(AppwriteException::RELATIONSHIP_VALUE_INVALID, $error->getMessage(), previous: $error); - break; case 'Utopia\Database\Exception\NotFound': $error = new AppwriteException( $isTablesAPI diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 2e0e598695..92751bcbe4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -14,6 +14,8 @@ 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\Relationship as RelationshipException; +use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Exception\Truncate as TruncateException; use Utopia\Database\Helpers\ID; use Utopia\Database\Validator\Authorization; @@ -124,6 +126,16 @@ abstract class Action extends UtopiaAction : Exception::COLUMN_ALREADY_EXISTS; } + /** + * Get the correct invalid structure message. + */ + final protected function getInvalidStructureException(): string + { + return $this->isCollectionsAPI() + ? Exception::DOCUMENT_INVALID_STRUCTURE + : Exception::ROW_INVALID_STRUCTURE; + } + /** * Get the appropriate limit exceeded exception. */ @@ -541,8 +553,14 @@ abstract class Action extends UtopiaAction newKey: $newKey, onDelete: $primaryDocumentOptions['onDelete'], ); - } catch (NotFoundException) { - throw new Exception($this->getNotFoundException()); + } catch (IndexException) { + throw new Exception(Exception::INDEX_INVALID); + } catch (LimitException) { + throw new Exception($this->getLimitException()); + } catch (RelationshipException $e) { + throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); + } catch (StructureException $e) { + throw new Exception($this->getInvalidStructureException(), $e->getMessage()); } if ($primaryDocumentOptions['twoWay']) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index 01ee2d9f84..32bb314cd2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -97,6 +97,25 @@ abstract class Action extends UtopiaAction : Exception::ROW_ALREADY_EXISTS; } + /** + * Get the appropriate conflict exception. + */ + final protected function getConflictException(): string + { + return $this->isCollectionsAPI() + ? Exception::DOCUMENT_UPDATE_CONFLICT + : Exception::ROW_UPDATE_CONFLICT; + } + + /** + * Get the appropriate delete restricted exception. + */ + final protected function getRestrictedException(): string + { + return $this->isCollectionsAPI() + ? Exception::DOCUMENT_DELETE_RESTRICTED + : Exception::ROW_DELETE_RESTRICTED; + } /** * Get the correct invalid structure message. diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index 32af5b0127..9944de4e36 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -13,7 +13,8 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; -use Utopia\Database\Exception\NotFound as NotFoundException; +use Utopia\Database\Exception\Conflict as ConflictException; +use Utopia\Database\Exception\Restricted as RestrictedException; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; @@ -108,8 +109,10 @@ class Delete extends Action $documentId ); }); - } catch (NotFoundException) { - throw new Exception($this->getParentNotFoundException()); + } catch (ConflictException) { + throw new Exception($this->getConflictException()); + } catch (RestrictedException) { + throw new Exception($this->getRestrictedException()); } // Add $collection and $databaseId for all documents diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 58408ae4ab..c3a2fe6df3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -13,9 +13,9 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; -use Utopia\Database\Exception\Authorization as AuthorizationException; +use Utopia\Database\Exception\Conflict as ConflictException; use Utopia\Database\Exception\Duplicate as DuplicateException; -use Utopia\Database\Exception\NotFound as NotFoundException; +use Utopia\Database\Exception\Relationship as RelationshipException; use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; @@ -239,14 +239,14 @@ class Update extends Action $newDocument ) ); - } catch (AuthorizationException) { - throw new Exception(Exception::USER_UNAUTHORIZED); + } catch (ConflictException) { + throw new Exception($this->getConflictException()); } catch (DuplicateException) { throw new Exception($this->getDuplicateException()); + } catch (RelationshipException $e) { + throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); } catch (StructureException $e) { throw new Exception($this->getInvalidStructureException(), $e->getMessage()); - } catch (NotFoundException) { - throw new Exception($this->getParentNotFoundException()); } // Add $collectionId and $databaseId for all documents From e6268fe5a64a3d8cd01d23b8af84bbbea4ad2055 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 11 Jun 2025 15:58:22 +0530 Subject: [PATCH 113/362] update: remove query exceptions from global handler. --- app/controllers/general.php | 4 +-- .../Collections/Attributes/XList.php | 35 +++++++++++++------ .../Databases/Collections/Documents/Get.php | 10 +++--- .../Collections/Documents/Logs/XList.php | 3 -- .../Databases/Collections/Documents/XList.php | 2 ++ .../Databases/Collections/Indexes/XList.php | 9 ++++- .../Http/Databases/Collections/XList.php | 16 +++++---- .../Databases/Http/Databases/XList.php | 4 +++ 8 files changed, 56 insertions(+), 27 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 5aed7c21ea..9d9a03db92 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1177,9 +1177,6 @@ App::error() case 'Utopia\Database\Exception\Timeout': $error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error); break; - case 'Utopia\Database\Exception\Query': - $error = new AppwriteException(AppwriteException::GENERAL_QUERY_INVALID, $error->getMessage(), previous: $error); - break; case 'Utopia\Database\Exception\Structure': $error = new AppwriteException( $isTablesAPI @@ -1195,6 +1192,7 @@ App::error() ? AppwriteException::ROW_ALREADY_EXISTS : AppwriteException::DOCUMENT_ALREADY_EXISTS ); + // no break case 'Utopia\Database\Exception\Authorization': $error = new AppwriteException(AppwriteException::USER_UNAUTHORIZED); break; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index dac7d94ab5..307cb98eff 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -11,6 +11,7 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Exception\Order as OrderException; +use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Query\Cursor; @@ -74,7 +75,11 @@ class XList extends Action throw new Exception($this->getParentNotFoundException()); } - $queries = Query::parseQueries($queries); + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } \array_push( $queries, @@ -95,33 +100,43 @@ class XList extends Action } $attributeId = $cursor->getValue(); - $cursorDocument = Authorization::skip( - fn () => $dbForProject->find('attributes', [ + try { + $cursorDocument = $dbForProject->findOne('attributes', [ Query::equal('databaseInternalId', [$database->getSequence()]), Query::equal('collectionInternalId', [$collection->getSequence()]), Query::equal('key', [$attributeId]), - Query::limit(1), - ]) - ); + ]); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } - if (empty($cursorDocument) || $cursorDocument[0]->isEmpty()) { + if ($cursorDocument->isEmpty()) { $type = ucfirst($this->getContext()); throw new Exception(Exception::GENERAL_CURSOR_NOT_FOUND, "$type '$attributeId' for the 'cursor' value not found."); } - $cursor->setValue($cursorDocument[0]); + $cursor->setValue($cursorDocument); } - $filters = Query::groupByType($queries)['filters']; + $filterQueries = Query::groupByType($queries)['filters']; try { $attributes = $dbForProject->find('attributes', $queries); - $total = $dbForProject->count('attributes', $filters, APP_LIMIT_COUNT); + $total = $dbForProject->count('attributes', $filterQueries, APP_LIMIT_COUNT); } catch (OrderException $e) { $documents = $this->isCollectionsAPI() ? 'documents' : 'rows'; $attribute = $this->isCollectionsAPI() ? 'attribute' : 'column'; $message = "The order $attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all $documents order $attribute values are non-null."; throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, $message); + } catch (QueryException) { + throw new Exception(Exception::GENERAL_QUERY_INVALID); + } + + foreach ($attributes as $attribute) { + if ($attribute->getAttribute('type') === Database::VAR_STRING) { + $filters = $attribute->getAttribute('filters', []); + $attribute->setAttribute('encrypt', in_array('encrypt', $filters)); + } } $response->dynamic(new Document([ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index f8fd749dc2..da730246bf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -12,7 +12,6 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; -use Utopia\Database\Exception\Authorization as AuthorizationException; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; @@ -71,10 +70,10 @@ class Get extends Action public function action(string $databaseId, string $collectionId, string $documentId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage): void { - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); $isAPIKey = Auth::isAppUser(Authorization::getRoles()); $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::DATABASE_NOT_FOUND); } @@ -87,9 +86,12 @@ class Get extends Action try { $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + try { $document = $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId, $queries); - } catch (AuthorizationException) { - throw new Exception(Exception::USER_UNAUTHORIZED); } catch (QueryException $e) { throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index 1053c00ff9..2856d9ddd0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -77,19 +77,16 @@ class XList extends Action public function action(string $databaseId, string $collectionId, string $documentId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void { $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - if ($database->isEmpty()) { throw new Exception(Exception::DATABASE_NOT_FOUND); } $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); - if ($collection->isEmpty()) { throw new Exception($this->getParentNotFoundException()); } $document = $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId); - if ($document->isEmpty()) { throw new Exception($this->getNotFoundException()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index d11128ed7b..02e2900ac8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -125,6 +125,8 @@ class XList extends Action $attribute = $this->isCollectionsAPI() ? 'attribute' : 'column'; $message = "The order $attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all $documents order $attribute values are non-null."; throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, $message); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } $operations = 0; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index 5929d56a91..caf6c72559 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -12,6 +12,7 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Exception\Order as OrderException; +use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Query\Cursor; @@ -80,7 +81,11 @@ class XList extends Action throw new Exception($this->getGrandParentNotFoundException()); } - $queries = Query::parseQueries($queries); + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } \array_push( $queries, @@ -126,6 +131,8 @@ class XList extends Action $attribute = $this->isCollectionsAPI() ? 'attribute' : 'column'; $message = "The order $attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all $documents order $attribute values are non-null."; throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, $message); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } $response->dynamic(new Document([ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index e9df7db598..15705e835e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -12,6 +12,7 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Exception\Order as OrderException; +use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Query\Cursor; @@ -73,7 +74,11 @@ class XList extends Action throw new Exception(Exception::DATABASE_NOT_FOUND); } - $queries = Query::parseQueries($queries); + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } if (!empty($search)) { $queries[] = Query::search('search', $search); @@ -108,11 +113,10 @@ class XList extends Action try { $collections = $dbForProject->find('database_' . $database->getSequence(), $queries); $total = $dbForProject->count('database_' . $database->getSequence(), $filterQueries, APP_LIMIT_COUNT); - } catch (OrderException $e) { - $documents = $this->isCollectionsAPI() ? 'documents' : 'rows'; - $attribute = $this->isCollectionsAPI() ? 'attribute' : 'column'; - $message = "The order $attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all $documents order $attribute values are non-null."; - throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, $message); + } catch (OrderException) { + throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL); + } catch (QueryException) { + throw new Exception(Exception::GENERAL_QUERY_INVALID); } $response->dynamic(new Document([ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php index 1fd0967b37..8bb9184baa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -12,6 +12,7 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Exception\Order as OrderException; +use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; use Utopia\Database\Validator\Query\Cursor; use Utopia\Platform\Action; @@ -98,7 +99,10 @@ class XList extends Action $total = $dbForProject->count('databases', $filterQueries, APP_LIMIT_COUNT); } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); + } catch (QueryException) { + throw new Exception(Exception::GENERAL_QUERY_INVALID); } + $response->dynamic(new Document([ 'databases' => $databases, 'total' => $total, From 3a88c74109a1a1fea51dd8e3ea4b902d9259264e Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 11 Jun 2025 16:18:06 +0530 Subject: [PATCH 114/362] update: remove structure exceptions from global handler. --- app/controllers/general.php | 9 --- .../Collections/Attributes/Action.php | 11 ++-- .../Collections/Documents/Update.php | 2 - .../Databases/Http/Databases/Create.php | 60 ++++++++++--------- 4 files changed, 38 insertions(+), 44 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 9d9a03db92..0d0a253661 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1177,15 +1177,6 @@ App::error() case 'Utopia\Database\Exception\Timeout': $error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error); break; - case 'Utopia\Database\Exception\Structure': - $error = new AppwriteException( - $isTablesAPI - ? AppwriteException::ROW_INVALID_STRUCTURE - : AppwriteException::DOCUMENT_INVALID_STRUCTURE, - $error->getMessage(), - previous: $error - ); - break; case 'Utopia\Database\Exception\Duplicate': $error = new AppwriteException( $isTablesAPI diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 92751bcbe4..3939a0370c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -395,17 +395,20 @@ abstract class Action extends UtopiaAction $dbForProject->checkAttribute($relatedCollection, $twoWayAttribute); $dbForProject->createDocument('attributes', $twoWayAttribute); } catch (DuplicateException) { - $dbForProject->deleteDocument('attributes', $attribute->getId()); throw new Exception($this->getDuplicateException()); } catch (LimitException) { - $dbForProject->deleteDocument('attributes', $attribute->getId()); throw new Exception($this->getLimitException()); + } catch (StructureException) { + throw new Exception($this->getInvalidStructureException()); } catch (Throwable $e) { - $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $relatedCollection->getId()); - $dbForProject->purgeCachedCollection('database_' . $db->getSequence() . '_collection_' . $relatedCollection->getSequence()); + $dbForProject->deleteDocument('attributes', $attribute->getId()); throw $e; + } finally { + $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $collectionId); + $dbForProject->purgeCachedCollection('database_' . $db->getSequence() . '_collection_' . $collection->getSequence()); } + // If operation succeeded, purge the cache for the related collection too $dbForProject->purgeCachedDocument('database_' . $db->getSequence(), $relatedCollection->getId()); $dbForProject->purgeCachedCollection('database_' . $db->getSequence() . '_collection_' . $relatedCollection->getSequence()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index c3a2fe6df3..f69dfb3f98 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -228,8 +228,6 @@ class Update extends Action ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); - $response->addHeader('X-Debug-Operations', $operations); - try { $document = $dbForProject->withRequestTimestamp( $requestTimestamp, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index 1f368ec77a..6e4dc5e136 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -14,6 +14,9 @@ use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\Document; 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\Structure as StructureException; use Utopia\Database\Helpers\ID; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; @@ -76,42 +79,41 @@ class Create extends Action 'enabled' => $enabled, 'search' => implode(' ', [$databaseId, $name]), ])); - $database = $dbForProject->getDocument('databases', $databaseId); + } catch (DuplicateException) { + throw new Exception(Exception::DATABASE_ALREADY_EXISTS); + } catch (StructureException $e) { + // TODO: @Jake, how do we handle this document/row? + // there's no context awareness at this level on what the api is. + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); + } - $collections = (Config::getParam('collections', [])['databases'] ?? [])['collections'] ?? []; - if (empty($collections)) { - throw new Exception(Exception::GENERAL_SERVER_ERROR, 'The "collections" collection is not configured.'); - } + $database = $dbForProject->getDocument('databases', $databaseId); - $attributes = []; - $indexes = []; + $collections = (Config::getParam('collections', [])['databases'] ?? [])['collections'] ?? []; + if (empty($collections)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'The "collections" collection is not configured.'); + } - foreach ($collections['attributes'] as $attribute) { - $attributes[] = new Document([ - '$id' => $attribute['$id'], - 'type' => $attribute['type'], - 'size' => $attribute['size'], - 'required' => $attribute['required'], - 'signed' => $attribute['signed'], - 'array' => $attribute['array'], - 'filters' => $attribute['filters'], - 'default' => $attribute['default'] ?? null, - 'format' => $attribute['format'] ?? '' - ]); - } + $attributes = []; + foreach ($collections['attributes'] as $attribute) { + $attributes[] = new Document($attribute); + } - foreach ($collections['indexes'] as $index) { - $indexes[] = new Document([ - '$id' => $index['$id'], - 'type' => $index['type'], - 'attributes' => $index['attributes'], - 'lengths' => $index['lengths'], - 'orders' => $index['orders'], - ]); - } + $indexes = []; + foreach ($collections['indexes'] as $index) { + $indexes[] = new Document($index); + } + + try { $dbForProject->createCollection('database_' . $database->getSequence(), $attributes, $indexes); } catch (DuplicateException) { throw new Exception(Exception::DATABASE_ALREADY_EXISTS); + } catch (IndexException) { + throw new Exception(Exception::INDEX_INVALID); + } catch (LimitException) { + // TODO: @Jake, how do we handle this collection/table? + // there's no context awareness at this level on what the api is. + throw new Exception(Exception::COLLECTION_LIMIT_EXCEEDED); } $queueForEvents->setParam('databaseId', $database->getId()); From 6b53337a23be7a29c8faafe248f1600a20d2ee04 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 11 Jun 2025 16:44:32 +0530 Subject: [PATCH 115/362] update: remove duplicate exceptions from global handler. --- app/controllers/general.php | 7 ------- .../Http/Databases/Collections/Action.php | 10 ++++++++++ .../Collections/Attributes/Action.php | 19 +++++++++++-------- .../Http/Databases/Collections/Create.php | 19 +++++++++++++++++++ .../Collections/Documents/Create.php | 7 +++++-- 5 files changed, 45 insertions(+), 17 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 0d0a253661..6602198c0b 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1177,13 +1177,6 @@ App::error() case 'Utopia\Database\Exception\Timeout': $error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error); break; - case 'Utopia\Database\Exception\Duplicate': - $error = new AppwriteException( - $isTablesAPI - ? AppwriteException::ROW_ALREADY_EXISTS - : AppwriteException::DOCUMENT_ALREADY_EXISTS - ); - // no break case 'Utopia\Database\Exception\Authorization': $error = new AppwriteException(AppwriteException::USER_UNAUTHORIZED); break; 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 abec90f1a6..1028f4ea7f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php @@ -73,6 +73,16 @@ abstract class Action extends UtopiaAction : Exception::TABLE_ALREADY_EXISTS; } + /** + * Get the appropriate index invalid exception. + */ + final protected function getInvalidIndexException(): string + { + return $this->isCollectionsAPI() + ? Exception::INDEX_INVALID + : Exception::COLUMN_INDEX_INVALID; + } + /** * Get the exception to throw when the resource is not found. */ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 3939a0370c..088490ad02 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -13,7 +13,6 @@ use Utopia\Database\Document; 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\Relationship as RelationshipException; use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Exception\Truncate as TruncateException; @@ -592,14 +591,14 @@ abstract class Action extends UtopiaAction formatOptions: $options, newKey: $newKey ?? null ); - } catch (TruncateException) { - throw new Exception($this->getInvalidResizeException()); - } catch (NotFoundException) { - throw new Exception($this->getNotFoundException()); - } catch (LimitException) { - throw new Exception($this->getLimitException()); + } catch (DuplicateException) { + throw new Exception($this->getDuplicateException()); } catch (IndexException $e) { throw new Exception($this->getInvalidIndexException(), $e->getMessage()); + } catch (LimitException) { + throw new Exception($this->getLimitException()); + } catch (TruncateException) { + throw new Exception($this->getInvalidResizeException()); } } @@ -610,7 +609,11 @@ abstract class Action extends UtopiaAction ->setAttribute('$id', ID::custom($db->getSequence() . '_' . $collection->getSequence() . '_' . $newKey)) ->setAttribute('key', $newKey); - $dbForProject->updateDocument('attributes', $originalUid, $attribute); + try { + $dbForProject->updateDocument('attributes', $originalUid, $attribute); + } catch (DuplicateException) { + throw new Exception($this->getDuplicateException()); + } /** * @var Document $index 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 6b80901e05..b5e7bf5415 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -13,7 +13,9 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; 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\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Validator\Authorization; @@ -86,6 +88,7 @@ class Create extends Action $collectionId = $collectionId === 'unique()' ? ID::unique() : $collectionId; + // Map aggregate permissions into the multiple permissions they represent. $permissions = Permission::aggregate($permissions) ?? []; try { @@ -105,6 +108,22 @@ class Create extends Action throw new Exception($this->getDuplicateException()); } catch (LimitException) { throw new Exception($this->getLimitException()); + } catch (NotFoundException) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + try { + $dbForProject->createCollection( + id: 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + permissions: $permissions, + documentSecurity: $documentSecurity + ); + } catch (DuplicateException) { + throw new Exception($this->getDuplicateException()); + } catch (IndexException) { + throw new Exception($this->getInvalidIndexException()); + } catch (LimitException) { + throw new Exception($this->getLimitException()); } $queueForEvents diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 23883c9ff4..aef2ef4ace 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -16,6 +16,7 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Exception\NotFound as NotFoundException; +use Utopia\Database\Exception\Relationship as RelationshipException; use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; @@ -245,12 +246,14 @@ class Create extends Action try { $document = $dbForProject->createDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $document); - } catch (StructureException $e) { - throw new Exception($this->getInvalidStructureException(), $e->getMessage()); } catch (DuplicateException) { throw new Exception($this->getDuplicateException()); } catch (NotFoundException) { throw new Exception($this->getParentNotFoundException()); + } catch (RelationshipException $e) { + throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); + } catch (StructureException $e) { + throw new Exception($this->getInvalidStructureException(), $e->getMessage()); } // Add $collectionId and $databaseId for all documents From dc439d1a1670f9a61bcb24ae5106f282f167f744 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 11 Jun 2025 16:46:21 +0530 Subject: [PATCH 116/362] update: remove authorization from global handler. --- app/controllers/general.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 6602198c0b..3a2a4c9d16 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1177,9 +1177,6 @@ App::error() case 'Utopia\Database\Exception\Timeout': $error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error); break; - case 'Utopia\Database\Exception\Authorization': - $error = new AppwriteException(AppwriteException::USER_UNAUTHORIZED); - break; case 'Utopia\Database\Exception\NotFound': $error = new AppwriteException( $isTablesAPI From 86a9598a5154188d2c11e3afc7ed26fec804049b Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 11 Jun 2025 16:51:09 +0530 Subject: [PATCH 117/362] update: remove not-found and index dependency exceptions from global handler. --- app/controllers/general.php | 18 ------------------ .../Collections/Attributes/Delete.php | 1 + 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 3a2a4c9d16..138e96f88a 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1177,24 +1177,6 @@ App::error() case 'Utopia\Database\Exception\Timeout': $error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error); break; - case 'Utopia\Database\Exception\NotFound': - $error = new AppwriteException( - $isTablesAPI - ? AppwriteException::TABLE_NOT_FOUND - : AppwriteException::COLLECTION_NOT_FOUND, - $error->getMessage(), - previous: $error - ); - break; - case 'Utopia\Database\Exception\Dependency': - $error = new AppwriteException( - $isTablesAPI - ? AppwriteException::COLUMN_INDEX_DEPENDENCY - : AppwriteException::INDEX_DEPENDENCY, - null, - previous: $error - ); - break; } $code = $error->getCode(); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 1f31097caf..242f6a4ea0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -90,6 +90,7 @@ class Delete extends Action $collection->getAttribute('indexes'), $dbForProject->getAdapter()->getSupportForCastIndexArray(), ); + if (!$validator->isValid($attribute)) { throw new Exception($this->getIndexDependencyException()); } From 3e1adc600409620c9bab9b03dc23a712aafdadbe Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 11 Jun 2025 16:51:27 +0530 Subject: [PATCH 118/362] remove: `$isTablesAPI` var. --- app/controllers/general.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 138e96f88a..416e6b1e86 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1159,9 +1159,6 @@ App::error() Console::error('[Error] Line: ' . $line); } - // routes like /tables, /tables/:tableId, etc. - $isTablesAPI = str_contains($route->getPath(), '/databases/:databaseId/tables'); - switch ($class) { case 'Utopia\Exception': $error = new AppwriteException(AppwriteException::GENERAL_UNKNOWN, $message, $code, $error); From 8e2eff7894dabc8d55fd96c79c94adc0932d90d7 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 11 Jun 2025 16:53:14 +0530 Subject: [PATCH 119/362] rollback: auth exception as per `1.8.x` source. --- app/controllers/general.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/general.php b/app/controllers/general.php index 416e6b1e86..0b64f30631 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1171,6 +1171,9 @@ App::error() break; } break; + case 'Utopia\Database\Exception\Authorization': + $error = new AppwriteException(AppwriteException::USER_UNAUTHORIZED); + break; case 'Utopia\Database\Exception\Timeout': $error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error); break; From 7169e672459468c3ec5d3f9043cd6a7147f5c574 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 11 Jun 2025 20:05:09 +0530 Subject: [PATCH 120/362] add/update: `createDocuments` on module structure. --- .../Collections/Documents/Action.php | 25 +- .../Collections/Documents/Create.php | 269 +++++++++++++----- .../Http/Databases/Tables/Rows/Create.php | 38 ++- 3 files changed, 257 insertions(+), 75 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index 32bb314cd2..c4e41d415f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -17,6 +17,11 @@ abstract class Action extends UtopiaAction */ abstract protected function getResponseModel(): string; + /** + * Get the response model used in the SDK and HTTP responses for bulk action. + */ + abstract protected function getBulkResponseModel(): string; + /** * Set the context to either `row` or `document`. * @@ -25,12 +30,22 @@ abstract class Action extends UtopiaAction final protected function setContext(string $context): void { if (!\in_array($context, [DATABASE_ROWS_CONTEXT, DATABASE_DOCUMENTS_CONTEXT], true)) { - throw new \InvalidArgumentException("Invalid context '{$context}'. Use `DATABASE_ROWS_CONTEXT` or `DATABASE_DOCUMENTS_CONTEXT`"); + throw new \InvalidArgumentException("Invalid context '$context'. Use `DATABASE_ROWS_CONTEXT` or `DATABASE_DOCUMENTS_CONTEXT`"); } $this->context = $context; } + /** + * Get the plural of the given name. + * + * Used for endpoints with multiple sdk methods. + */ + final protected function getBulkActionName(string $name): string + { + return "{$name}s"; + } + /** * Get the current context. */ @@ -67,6 +82,14 @@ abstract class Action extends UtopiaAction return $this->isCollectionsAPI() ? 'collections' : 'tables'; } + /** + * Get the correct attribute/column structure context for errors. + */ + final protected function getStructureContext(): string + { + return $this->isCollectionsAPI() ? 'attributes' : 'columns'; + } + /** * Get the appropriate parent level not found exception. */ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index aef2ef4ace..b55731a4f2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -9,6 +9,7 @@ use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; +use Appwrite\SDK\Parameter; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Response as UtopiaResponse; @@ -26,6 +27,7 @@ use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; +use Utopia\Validator\ArrayList; use Utopia\Validator\JSON; class Create extends Action @@ -42,6 +44,11 @@ class Create extends Action return UtopiaResponse::MODEL_DOCUMENT; } + protected function getBulkResponseModel(): string + { + return UtopiaResponse::MODEL_DOCUMENT_LIST; + } + public function __construct() { $this @@ -70,14 +77,41 @@ class Create extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + parameters: [ + new Parameter('databaseId', optional: false), + new Parameter('collectionId', optional: false), + new Parameter('documentId', optional: false), + new Parameter('data', optional: false), + new Parameter('permissions', optional: true), + ] + ), + new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: $this->getBulkActionName(self::getName()), + description: '/docs/references/databases/create-documents.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: $this->getBulkResponseModel(), + ) + ], + contentType: ContentType::JSON, + parameters: [ + new Parameter('databaseId', optional: false), + new Parameter('collectionId', optional: false), + new Parameter('documents', optional: false), + ] ) ]) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('documentId', '', new CustomId(), 'Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('documentId', '', new CustomId(), 'Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.', true) ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.') - ->param('data', [], new JSON(), 'Document data as JSON object.') + ->param('data', [], new JSON(), 'Document data as JSON object.', true) ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->param('documents', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of documents data as JSON objects.', true, ['plan']) ->inject('response') ->inject('dbForProject') ->inject('user') @@ -86,77 +120,128 @@ class Create extends Action ->callback([$this, 'action']); } - public function action(string $databaseId, string $documentId, string $collectionId, string|array $data, ?array $permissions, UtopiaResponse $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage): void + public function action(string $databaseId, string $documentId, string $collectionId, string|array $data, ?array $permissions, ?array $documents, UtopiaResponse $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage): void { - $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array + $data = \is_string($data) + ? \json_decode($data, true) + : $data; - if (empty($data)) { + /** + * Determine which internal path to call, single or bulk + */ + if (empty($data) && empty($documents)) { + // No single or bulk documents provided throw new Exception($this->getMissingDataException()); } - - if (isset($data['$id'])) { - // `rows` or `documents` in message. - throw new Exception($this->getInvalidStructureException(), '$id is not allowed for creating new ' . $this->getContext() . 's, try update instead'); + if (!empty($data) && !empty($documents)) { + // Both single and bulk documents provided + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'You can only send one of the following parameters: data, ' . $this->getSdkGroup()); + } + if (!empty($data) && empty($documentId)) { + // Single document provided without document ID + $document = $this->isCollectionsAPI() ? 'Document' : 'Row'; + $message = "$document ID is required when creating a single " . strtolower($document) . '.'; + throw new Exception($this->getMissingDataException(), $message); + } + if (!empty($documents) && !empty($documentId)) { + // Bulk documents provided with document ID + $documentId = $this->isCollectionsAPI() ? 'documentId' : 'rowId'; + throw new Exception( + Exception::GENERAL_BAD_REQUEST, + "Param \"$documentId\" is not allowed when creating multiple " . $this->getSdkGroup() . ', set "$id" on each instead.' + ); + } + if (!empty($documents) && !empty($permissions)) { + // Bulk documents provided with permissions + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Param "permissions" is disallowed when creating multiple ' . $this->getSdkGroup() . ', set "$permissions" on each instead'); } - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + $isBulk = true; + if (!empty($data)) { + // Single document provided, convert to single item array + // But remember that it was single to respond with a single document + $isBulk = false; + $documents = [$data]; + } $isAPIKey = Auth::isAppUser(Authorization::getRoles()); $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + if ($isBulk && !$isAPIKey && !$isPrivilegedUser) { + throw new Exception(Exception::GENERAL_UNAUTHORIZED_SCOPE); + } + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception(Exception::DATABASE_NOT_FOUND); } $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId)); - if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { throw new Exception($this->getParentNotFoundException()); } - $allowedPermissions = [ - Database::PERMISSION_READ, - Database::PERMISSION_UPDATE, - Database::PERMISSION_DELETE, - ]; + $hasRelationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); - // Map aggregate permissions to into the set of individual permissions they represent. - $permissions = Permission::aggregate($permissions, $allowedPermissions); - - // Add permissions for current the user if none were provided. - if (\is_null($permissions)) { - $permissions = []; - if (!empty($user->getId())) { - foreach ($allowedPermissions as $permission) { - $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); - } - } + if ($isBulk && $hasRelationships) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Bulk create is not supported for ' . $this->getSdkNamespace() .' with relationship ' . $this->getStructureContext()); } - // Users can only manage their own roles, API keys and Admin users can manage any - if (!$isAPIKey && !$isPrivilegedUser) { - foreach (Database::PERMISSIONS as $type) { - foreach ($permissions as $permission) { - $permission = Permission::parse($permission); - if ($permission->getPermission() != $type) { - continue; - } - $role = (new Role( - $permission->getRole(), - $permission->getIdentifier(), - $permission->getDimension() - ))->toString(); - if (!Authorization::isRole($role)) { - throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', Authorization::getRoles()) . ')'); + $setPermissions = function (Document $document, ?array $permissions) use ($user, $isAPIKey, $isPrivilegedUser, $isBulk) { + $allowedPermissions = [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + ]; + + // If bulk, we need to validate permissions explicitly per document + if ($isBulk) { + $permissions = $document['$permissions'] ?? null; + if (!empty($permissions)) { + $validator = new Permissions(); + if (!$validator->isValid($permissions)) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, $validator->getDescription()); } } } - } - $data['$collection'] = $collection->getId(); // Adding this param to make API easier for developers - $data['$id'] = $documentId == 'unique()' ? ID::unique() : $documentId; - $data['$permissions'] = $permissions; - $document = new Document($data); + $permissions = Permission::aggregate($permissions, $allowedPermissions); + + // Add permissions for current the user if none were provided. + if (\is_null($permissions)) { + $permissions = []; + if (!empty($user->getId())) { + foreach ($allowedPermissions as $permission) { + $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); + } + } + } + + // Users can only manage their own roles, API keys and Admin users can manage any + if (!$isAPIKey && !$isPrivilegedUser) { + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + if (!Authorization::isRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', Authorization::getRoles()) . ')'); + } + } + } + } + + $document->setAttribute('$permissions', $permissions); + }; $operations = 0; @@ -242,10 +327,36 @@ class Create extends Action } }; - $checkPermissions($collection, $document, Database::PERMISSION_CREATE); + $documents = \array_map(function ($document) use ($collection, $permissions, $checkPermissions, $isBulk, $documentId, $setPermissions) { + $document['$collection'] = $collection->getId(); + + // Determine the source ID depending on whether it's a bulk operation. + $sourceId = $isBulk + ? ($document['$id'] ?? ID::unique()) + : $documentId; + + // If bulk, we need to validate ID explicitly + if ($isBulk) { + $validator = new CustomId(); + if (!$validator->isValid($sourceId)) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, $validator->getDescription()); + } + } + + // Assign a unique ID if needed, otherwise use the provided ID. + $document['$id'] = $sourceId === 'unique()' ? ID::unique() : $sourceId; + $document = new Document($document); + $setPermissions($document, $permissions); + $checkPermissions($collection, $document, Database::PERMISSION_CREATE); + + return $document; + }, $documents); try { - $document = $dbForProject->createDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $document); + $dbForProject->createDocuments( + 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + $documents + ); } catch (DuplicateException) { throw new Exception($this->getDuplicateException()); } catch (NotFoundException) { @@ -256,8 +367,22 @@ class Create extends Action throw new Exception($this->getInvalidStructureException(), $e->getMessage()); } + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setParam('collectionId', $collection->getId()) + ->setContext('collection', $collection) + ->setContext('database', $database); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setContext('database', $database) + ->setParam('collectionId', $collection->getId()) + ->setParam('tableId', $collection->getId()) + ->setContext($this->getCollectionsEventsContext(), $collection); + // Add $collectionId and $databaseId for all documents $processDocument = function (Document $table, Document $document) use (&$processDocument, $dbForProject, $database) { + $document->removeAttribute('$collection'); $document->setAttribute('$databaseId', $database->getId()); $document->setAttribute('$collectionId', $table->getId()); @@ -289,34 +414,34 @@ class Create extends Action } }; - $processDocument($collection, $document); + foreach ($documents as $document) { + $processDocument($collection, $document); + } $queueForStatsUsage - ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, max($operations, 1)) - ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations); // per collection + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, \max(1, $operations)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), \max(1, $operations)); // per collection - $response->addHeader('X-Debug-Operations', $operations); + $response->setStatusCode(SwooleResponse::STATUS_CODE_CREATED); - $response - ->setStatusCode(SwooleResponse::STATUS_CODE_CREATED) - ->dynamic($document, $this->getResponseModel()); + if ($isBulk) { + $response->dynamic(new Document([ + 'total' => count($documents), + $this->getSdkGroup() => $documents + ]), $this->getBulkResponseModel()); - $relationships = \array_map( - fn ($document) => $document->getAttribute('key'), - \array_filter( - $collection->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ) - ); + return; + } $queueForEvents - ->setParam('databaseId', $databaseId) - ->setContext('database', $database) - ->setParam('collectionId', $collection->getId()) - ->setParam('tableId', $collection->getId()) - ->setParam('documentId', $document->getId()) - ->setParam('rowId', $document->getId()) - ->setPayload($response->getPayload(), sensitive: $relationships) - ->setContext($this->getCollectionsEventsContext(), $collection); + ->setParam('documentId', $documents[0]->getId()) + ->setParam('rowId', $documents[0]->getId()) + // TODO: @itznotabug - check if the events mirroring works here! + ->setEvent('databases.[databaseId].collections.[collectionId].documents.[documentId].create'); + + $response->dynamic( + $documents[0], + $this->getResponseModel() + ); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index d041630894..881e562c10 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -6,6 +6,7 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Cre use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Method; +use Appwrite\SDK\Parameter; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Response as UtopiaResponse; @@ -14,6 +15,7 @@ use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; +use Utopia\Validator\ArrayList; use Utopia\Validator\JSON; class Create extends DocumentCreate @@ -30,6 +32,11 @@ class Create extends DocumentCreate return UtopiaResponse::MODEL_ROW; } + protected function getBulkResponseModel(): string + { + return UtopiaResponse::MODEL_ROW_LIST; + } + public function __construct() { $this->setContext(DATABASE_ROWS_CONTEXT); @@ -57,10 +64,36 @@ class Create extends DocumentCreate responses: [ new SDKResponse( code: SwooleResponse::STATUS_CODE_CREATED, - model: self::getResponseModel(), + model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + parameters: [ + new Parameter('databaseId', optional: false), + new Parameter('tableId', optional: false), + new Parameter('rowId', optional: false), + new Parameter('data', optional: false), + new Parameter('permissions', optional: true), + ] + ), + new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: $this->getBulkActionName(self::getName()), + description: '/docs/references/databases/create-documents.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: $this->getBulkResponseModel(), + ) + ], + contentType: ContentType::JSON, + parameters: [ + new Parameter('databaseId', optional: false), + new Parameter('tableId', optional: false), + new Parameter('rows', optional: false), + ] ) ]) ->param('databaseId', '', new UID(), 'Database ID.') @@ -68,6 +101,7 @@ class Create extends DocumentCreate ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define columns before creating rows.') ->param('data', [], new JSON(), 'Row data as JSON object.') ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->param('rows', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of documents data as JSON objects.', true, ['plan']) ->inject('response') ->inject('dbForProject') ->inject('user') From 7beae215352fcab2f8d1623cfde1ac833735b903 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 14:20:22 +0530 Subject: [PATCH 121/362] fix: missing context! --- .../Platform/Modules/Databases/Constants.php | 23 ---------------- .../Platform/Modules/Databases/Context.php | 26 +++++++++++++++++++ .../Http/Databases/Collections/Action.php | 11 ++++---- .../Collections/Attributes/Action.php | 9 ++++--- .../Collections/Documents/Action.php | 14 ++++------ .../Databases/Collections/Indexes/Action.php | 17 ++++++------ .../Tables/Columns/Boolean/Create.php | 3 ++- .../Tables/Columns/Boolean/Update.php | 3 ++- .../Tables/Columns/Datetime/Create.php | 3 ++- .../Tables/Columns/Datetime/Update.php | 3 ++- .../Http/Databases/Tables/Columns/Delete.php | 3 ++- .../Databases/Tables/Columns/Email/Create.php | 3 ++- .../Databases/Tables/Columns/Email/Update.php | 3 ++- .../Databases/Tables/Columns/Enum/Create.php | 3 ++- .../Databases/Tables/Columns/Enum/Update.php | 3 ++- .../Databases/Tables/Columns/Float/Create.php | 3 ++- .../Databases/Tables/Columns/Float/Update.php | 3 ++- .../Http/Databases/Tables/Columns/Get.php | 3 ++- .../Databases/Tables/Columns/IP/Create.php | 3 ++- .../Databases/Tables/Columns/IP/Update.php | 3 ++- .../Tables/Columns/Integer/Create.php | 3 ++- .../Tables/Columns/Integer/Update.php | 3 ++- .../Tables/Columns/Relationship/Create.php | 3 ++- .../Tables/Columns/Relationship/Update.php | 3 ++- .../Tables/Columns/String/Create.php | 3 ++- .../Tables/Columns/String/Update.php | 3 ++- .../Databases/Tables/Columns/URL/Create.php | 3 ++- .../Databases/Tables/Columns/URL/Update.php | 3 ++- .../Http/Databases/Tables/Columns/XList.php | 3 ++- .../Http/Databases/Tables/Create.php | 3 ++- .../Http/Databases/Tables/Delete.php | 3 ++- .../Databases/Http/Databases/Tables/Get.php | 3 ++- .../Http/Databases/Tables/Indexes/Create.php | 3 ++- .../Http/Databases/Tables/Indexes/Delete.php | 3 ++- .../Http/Databases/Tables/Indexes/Get.php | 3 ++- .../Http/Databases/Tables/Indexes/XList.php | 3 ++- .../Http/Databases/Tables/Logs/XList.php | 3 ++- .../Http/Databases/Tables/Rows/Create.php | 3 ++- .../Http/Databases/Tables/Rows/Delete.php | 3 ++- .../Http/Databases/Tables/Rows/Get.php | 3 ++- .../Http/Databases/Tables/Rows/Logs/XList.php | 3 ++- .../Http/Databases/Tables/Rows/Update.php | 3 ++- .../Http/Databases/Tables/Rows/XList.php | 3 ++- .../Http/Databases/Tables/Update.php | 3 ++- .../Http/Databases/Tables/Usage/Get.php | 3 ++- .../Databases/Http/Databases/Tables/XList.php | 3 ++- 46 files changed, 131 insertions(+), 89 deletions(-) delete mode 100644 src/Appwrite/Platform/Modules/Databases/Constants.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Context.php diff --git a/src/Appwrite/Platform/Modules/Databases/Constants.php b/src/Appwrite/Platform/Modules/Databases/Constants.php deleted file mode 100644 index b17248bf4d..0000000000 --- a/src/Appwrite/Platform/Modules/Databases/Constants.php +++ /dev/null @@ -1,23 +0,0 @@ -context = $context; @@ -52,7 +53,7 @@ abstract class Action extends UtopiaAction */ final protected function isCollectionsAPI(): bool { - return $this->getContext() === DATABASE_COLLECTIONS_CONTEXT; + return $this->getContext() === Context::DATABASE_COLLECTIONS; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 088490ad02..2ee265a18d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attribu use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response as UtopiaResponse; use Throwable; @@ -28,7 +29,7 @@ abstract class Action extends UtopiaAction /** * @var string|null The current context (either 'column' or 'attribute') */ - private ?string $context = DATABASE_ATTRIBUTES_CONTEXT; + private ?string $context = Context::DATABASE_ATTRIBUTES; /** * Get the correct response model. @@ -42,8 +43,8 @@ abstract class Action extends UtopiaAction */ final protected function setContext(string $context): void { - if (!\in_array($context, [DATABASE_COLUMNS_CONTEXT, DATABASE_ATTRIBUTES_CONTEXT], true)) { - throw new \InvalidArgumentException("Invalid context '$context'. Use `DATABASE_COLUMNS_CONTEXT` or `DATABASE_ATTRIBUTES_CONTEXT`"); + if (!\in_array($context, [Context::DATABASE_COLUMNS, Context::DATABASE_ATTRIBUTES], true)) { + throw new \InvalidArgumentException("Invalid context '$context'. Use `Context::DATABASE_COLUMNS` or `Context::DATABASE_ATTRIBUTES`"); } $this->context = $context; @@ -64,7 +65,7 @@ abstract class Action extends UtopiaAction { // columns in tables context // attributes in collections context - return $this->getContext() === DATABASE_ATTRIBUTES_CONTEXT; + return $this->getContext() === Context::DATABASE_ATTRIBUTES; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index c4e41d415f..341302f779 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -3,6 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Context; use Utopia\Platform\Action as UtopiaAction; abstract class Action extends UtopiaAction @@ -10,18 +11,13 @@ abstract class Action extends UtopiaAction /** * @var string|null The current context (either 'row' or 'document') */ - private ?string $context = DATABASE_DOCUMENTS_CONTEXT; + private ?string $context = Context::DATABASE_DOCUMENTS; /** * Get the response model used in the SDK and HTTP responses. */ abstract protected function getResponseModel(): string; - /** - * Get the response model used in the SDK and HTTP responses for bulk action. - */ - abstract protected function getBulkResponseModel(): string; - /** * Set the context to either `row` or `document`. * @@ -29,8 +25,8 @@ abstract class Action extends UtopiaAction */ final protected function setContext(string $context): void { - if (!\in_array($context, [DATABASE_ROWS_CONTEXT, DATABASE_DOCUMENTS_CONTEXT], true)) { - throw new \InvalidArgumentException("Invalid context '$context'. Use `DATABASE_ROWS_CONTEXT` or `DATABASE_DOCUMENTS_CONTEXT`"); + if (!\in_array($context, [Context::DATABASE_ROWS, Context::DATABASE_DOCUMENTS], true)) { + throw new \InvalidArgumentException("Invalid context '$context'. Use `Context::DATABASE_ROWS` or `Context::DATABASE_DOCUMENTS`"); } $this->context = $context; @@ -61,7 +57,7 @@ abstract class Action extends UtopiaAction { // rows in tables api context // documents in collections api context - return $this->getContext() === DATABASE_DOCUMENTS_CONTEXT; + return $this->getContext() === Context::DATABASE_DOCUMENTS; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php index 07a32ce122..4a40ea6b5f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php @@ -3,6 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\Context; use Utopia\Platform\Action as UtopiaAction; abstract class Action extends UtopiaAction @@ -10,7 +11,7 @@ abstract class Action extends UtopiaAction /** * The current API context (either 'columnIndex' or 'index'). */ - private ?string $context = DATABASE_INDEX_CONTEXT; + private ?string $context = Context::DATABASE_INDEX; /** * Get the response model used in the SDK and HTTP responses. @@ -20,12 +21,12 @@ abstract class Action extends UtopiaAction /** * Set the current API context. * - * @param string $context Must be either `DATABASE_INDEX_CONTEXT` or `DATABASE_COLUMN_INDEX_CONTEXT`. + * @param string $context Must be either `DATABASE_INDEX` or `DATABASE_COLUMN_INDEX`. */ final protected function setContext(string $context): void { - if (!\in_array($context, [DATABASE_INDEX_CONTEXT, DATABASE_COLUMN_INDEX_CONTEXT], true)) { - throw new \InvalidArgumentException("Invalid context '$context'. Must be either `DATABASE_COLUMN_INDEX_CONTEXT` or `DATABASE_INDEX_CONTEXT`."); + if (!\in_array($context, [Context::DATABASE_INDEX, Context::DATABASE_COLUMN_INDEX], true)) { + throw new \InvalidArgumentException("Invalid context '$context'. Must be either `Context::DATABASE_COLUMN_INDEX` or `Context::DATABASE_INDEX`."); } $this->context = $context; @@ -36,9 +37,9 @@ abstract class Action extends UtopiaAction */ final protected function getParentContext(): string { - return $this->getContext() === DATABASE_INDEX_CONTEXT - ? DATABASE_ATTRIBUTES_CONTEXT - : DATABASE_COLUMNS_CONTEXT; + return $this->getContext() === Context::DATABASE_INDEX + ? Context::DATABASE_ATTRIBUTES + : Context::DATABASE_COLUMNS; } /** @@ -54,7 +55,7 @@ abstract class Action extends UtopiaAction */ final protected function isCollectionsAPI(): bool { - return $this->getParentContext() === DATABASE_ATTRIBUTES_CONTEXT; + return $this->getParentContext() === Context::DATABASE_ATTRIBUTES; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php index ada1d83424..e1633da062 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Create as BooleanCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -29,7 +30,7 @@ class Create extends BooleanCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php index 5316677adc..deead5e1d7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Update as BooleanUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -31,7 +32,7 @@ class Update extends BooleanUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php index a0731f0767..4710031c63 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Create as DatetimeCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -31,7 +32,7 @@ class Create extends DatetimeCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php index 495e96f025..f30e627553 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Update as DatetimeUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -33,7 +34,7 @@ class Update extends DatetimeUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php index 68cb00e18b..d2f0c54839 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Delete as AttributesDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -30,7 +31,7 @@ class Delete extends AttributesDelete public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php index 569d641118..fc64c3b215 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php @@ -3,6 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email; use Appwrite\Network\Validator\Email; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Create as EmailCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -30,7 +31,7 @@ class Create extends EmailCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php index bb3abb10d3..c6425043b5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php @@ -3,6 +3,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email; use Appwrite\Network\Validator\Email; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Update as EmailUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Update extends EmailUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php index 47d06d4a53..338cec4f05 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Create as EnumCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -32,7 +33,7 @@ class Create extends EnumCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php index 18c1db0683..6a35b955d2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Update as EnumUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -34,7 +35,7 @@ class Update extends EnumUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php index 217378e274..7e1a502f2e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Create as FloatCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -30,7 +31,7 @@ class Create extends FloatCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php index be9e2f6b09..05983a8153 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Update as FloatUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Update extends FloatUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php index 630ac01e0f..a0d8a3ce76 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Get as AttributesGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -39,7 +40,7 @@ class Get extends AttributesGet public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php index 4da949dd74..1bae06a360 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Create as IPCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -30,7 +31,7 @@ class Create extends IPCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php index 7adda8a4d5..8174ad7860 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Update as IPUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Update extends IPUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php index 2172b5067b..2c6b7a84e7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Create as IntegerCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -30,7 +31,7 @@ class Create extends IntegerCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php index 26f7e8625c..8375853e83 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Update as IntegerUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Update extends IntegerUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php index 76dd80cec9..6d3f26902d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Create as RelationshipCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -31,7 +32,7 @@ class Create extends RelationshipCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php index b2229bb32d..8bed5013a9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Update as RelationshipUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -31,7 +32,7 @@ class Update extends RelationshipUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php index cf12e6582d..529f4f270d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Create as StringCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -32,7 +33,7 @@ class Create extends StringCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php index 968b15bbef..7450af9eff 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Update as StringUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -34,7 +35,7 @@ class Update extends StringUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php index 8c9865cde0..07295b2d93 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Create as URLCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -30,7 +31,7 @@ class Create extends URLCreate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php index e461befe0b..990fbee742 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Update as URLUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Update extends URLUpdate public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php index 3dde78441d..41b1aee5c9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\XList as AttributesXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -28,7 +29,7 @@ class XList extends AttributesXList public function __construct() { - $this->setContext(DATABASE_COLUMNS_CONTEXT); + $this->setContext(Context::DATABASE_COLUMNS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index fcd52d4854..95ef8bea4a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Create as CollectionCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Create extends CollectionCreate public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php index c24fad28ef..bb9b859a78 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Delete as CollectionDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -28,7 +29,7 @@ class Delete extends CollectionDelete public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php index e277db6d3d..cdf7950a1c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Get as CollectionGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -28,7 +29,7 @@ class Get extends CollectionGet public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php index b8e22cec71..33692b7a0c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Create as IndexCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -32,7 +33,7 @@ class Create extends IndexCreate public function __construct() { - $this->setContext(DATABASE_COLUMN_INDEX_CONTEXT); + $this->setContext(Context::DATABASE_COLUMN_INDEX); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php index ed8c355075..80581f7a6f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Delete as IndexDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -33,7 +34,7 @@ class Delete extends IndexDelete public function __construct() { - $this->setContext(DATABASE_COLUMN_INDEX_CONTEXT); + $this->setContext(Context::DATABASE_COLUMN_INDEX); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php index cd689316e6..d78761459a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Get as IndexGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -29,7 +30,7 @@ class Get extends IndexGet public function __construct() { - $this->setContext(DATABASE_COLUMN_INDEX_CONTEXT); + $this->setContext(Context::DATABASE_COLUMN_INDEX); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php index 3d0e7d5139..b16e328f27 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\XList as IndexXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -29,7 +30,7 @@ class XList extends IndexXList public function __construct() { - $this->setContext(DATABASE_COLUMN_INDEX_CONTEXT); + $this->setContext(Context::DATABASE_COLUMN_INDEX); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php index 967e53539c..99fbe99a34 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Logs; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Logs\XList as CollectionLogXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -25,7 +26,7 @@ class XList extends CollectionLogXList public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index 881e562c10..5eb36598b2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Create as DocumentCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -39,7 +40,7 @@ class Create extends DocumentCreate public function __construct() { - $this->setContext(DATABASE_ROWS_CONTEXT); + $this->setContext(Context::DATABASE_ROWS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php index e40046bdf9..799f3cde05 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Delete as DocumentDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -34,7 +35,7 @@ class Delete extends DocumentDelete public function __construct() { - $this->setContext(DATABASE_ROWS_CONTEXT); + $this->setContext(Context::DATABASE_ROWS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php index 5ff02e96e8..8a8f9f3062 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Get as DocumentGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -30,7 +31,7 @@ class Get extends DocumentGet public function __construct() { - $this->setContext(DATABASE_ROWS_CONTEXT); + $this->setContext(Context::DATABASE_ROWS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php index 29a92413f9..62466eac13 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Logs; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Logs\XList as DocumentLogXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -25,7 +26,7 @@ class XList extends DocumentLogXList public function __construct() { - $this->setContext(DATABASE_ROWS_CONTEXT); + $this->setContext(Context::DATABASE_ROWS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php index 3c98d3c499..798bfddf51 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Update as DocumentUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -31,7 +32,7 @@ class Update extends DocumentUpdate public function __construct() { - $this->setContext(DATABASE_ROWS_CONTEXT); + $this->setContext(Context::DATABASE_ROWS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php index c74a87c842..1175515e5c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\XList as DocumentXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -30,7 +31,7 @@ class XList extends DocumentXList public function __construct() { - $this->setContext(DATABASE_ROWS_CONTEXT); + $this->setContext(Context::DATABASE_ROWS); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index 70ac9d7b7c..14798f8513 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Update as CollectionUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -31,7 +32,7 @@ class Update extends CollectionUpdate public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index e67850e361..1baebb23f2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Usage; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Usage\Get as CollectionUsageGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -29,7 +30,7 @@ class Get extends CollectionUsageGet public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php index b2f102cc55..1086f8f80e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\XList as CollectionXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -30,7 +31,7 @@ class XList extends CollectionXList public function __construct() { - $this->setContext(DATABASE_TABLES_CONTEXT); + $this->setContext(Context::DATABASE_TABLES); $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) From 95bc85f18d455111a80ebfb268ef788e1230123e Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 14:31:28 +0530 Subject: [PATCH 122/362] add: upsert for collections and tables. --- .../Collections/Documents/Upsert.php | 297 ++++++++++++++++++ .../Http/Databases/Tables/Rows/Upsert.php | 78 +++++ .../Services/Registry/Collections.php | 2 + .../Databases/Services/Registry/Tables.php | 2 + 4 files changed, 379 insertions(+) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php new file mode 100644 index 0000000000..efd950e846 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -0,0 +1,297 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') + ->desc('Upsert document') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].upsert') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'document.upsert') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}/document/{response.$id}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', [ + new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/upsert-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + ), + ]) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('documentId', '', new CustomId(), 'Document ID.') + ->param('data', [], new JSON(), 'Document data as JSON object. Include all required attributes of the document to be created or updated.') + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->inject('requestTimestamp') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback($this->action(...)); + } + + public function action(string $databaseId, string $collectionId, string $documentId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void + { + $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array + + if (empty($data) && \is_null($permissions)) { + throw new Exception($this->getMissingPayloadException()); + } + + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId)); + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception($this->getParentNotFoundException()); + } + + // Map aggregate permissions into the multiple permissions they represent. + $permissions = Permission::aggregate($permissions, [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + ]); + + // Users can only manage their own roles, API keys and Admin users can manage any + $roles = Authorization::getRoles(); + if (!$isAPIKey && !$isPrivilegedUser && !\is_null($permissions)) { + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + if (!Authorization::isRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $roles) . ')'); + } + } + } + } + + $data['$id'] = $documentId; + $data['$permissions'] = $permissions; + $newDocument = new Document($data); + + $operations = 0; + + $setCollection = (function (Document $collection, Document $document) use (&$setCollection, $dbForProject, $database, &$operations) { + + $operations++; + + $relationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + + $isList = \is_array($related) && \array_values($related) === $related; + + if ($isList) { + $relations = $related; + } else { + $relations = [$related]; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) + ); + + foreach ($relations as &$relation) { + // If the relation is an array it can be either update or create a child document. + if ( + \is_array($relation) + && \array_values($relation) !== $relation + && !isset($relation['$id']) + ) { + $relation['$id'] = ID::unique(); + $relation = new Document($relation); + } + if ($relation instanceof Document) { + $oldDocument = Authorization::skip(fn () => $dbForProject->getDocument( + 'database_' . $database->getSequence() . '_collection_' . $relatedCollection->getSequence(), + $relation->getId() + )); + $relation->removeAttribute('$collectionId'); + $relation->removeAttribute('$databaseId'); + // Attribute $collection is required for Utopia. + $relation->setAttribute( + '$collection', + 'database_' . $database->getSequence() . '_collection_' . $relatedCollection->getSequence() + ); + + if ($oldDocument->isEmpty()) { + if (isset($relation['$id']) && $relation['$id'] === 'unique()') { + $relation['$id'] = ID::unique(); + } + } + $setCollection($relatedCollection, $relation); + } + } + + if ($isList) { + $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + } else { + $document->setAttribute($relationship->getAttribute('key'), \reset($relations)); + } + } + }); + + $setCollection($collection, $newDocument); + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, \max(1, $operations)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), \max(1, $operations)); + + $upserted = []; + try { + $dbForProject->createOrUpdateDocuments( + 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + [$newDocument], + onNext: function (Document $document) use (&$upserted) { + $upserted[] = $document; + }, + ); + } catch (ConflictException) { + throw new Exception($this->getConflictException()); + } catch (DuplicateException) { + throw new Exception($this->getDuplicateException()); + } catch (RelationshipException $e) { + throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); + } catch (StructureException $e) { + throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + } + + $document = $upserted[0]; + // Add $collectionId and $databaseId for all documents + $processDocument = function (Document $table, Document $document) use (&$processDocument, $dbForProject, $database) { + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $table->getId()); + + $relationships = \array_filter( + $table->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + if (!\is_array($related)) { + $related = [$related]; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) + ); + + foreach ($related as $relation) { + if ($relation instanceof Document) { + $processDocument($relatedCollection, $relation); + } + } + } + }; + + $processDocument($collection, $document); + + $relationships = \array_map( + fn ($document) => $document->getAttribute('key'), + \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ) + ); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setContext('database', $database) + ->setParam('collectionId', $collection->getId()) + ->setParam('tableId', $collection->getId()) + ->setParam('documentId', $document->getId()) + ->setParam('rowId', $document->getId()) + ->setContext($this->getCollectionsEventsContext(), $collection) + ->setPayload($response->getPayload(), sensitive: $relationships); + + $response->dynamic( + $document, + $this->getResponseModel() + ); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php new file mode 100644 index 0000000000..b0be7350b7 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php @@ -0,0 +1,78 @@ +setContext(Context::DATABASE_ROWS); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->desc('Upsert row') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].upsert') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'row.upsert') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', [ + new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/upsert-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + ), + ]) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('rowId', '', new UID(), 'Row ID.') + ->param('data', [], new JSON(), 'Row data as JSON object. Include all required columns of the row to be created or updated.', true) + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->inject('requestTimestamp') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php index 7b629bca44..33d972e0f1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php @@ -31,6 +31,7 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Cre use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Delete as DeleteDocument; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Get as GetDocument; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Update as UpdateDocument; +use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Upsert as UpsertDocument; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\XList as ListDocuments; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Get as GetCollection; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Create as CreateIndex; @@ -78,6 +79,7 @@ class Collections extends Base $service->addAction(CreateDocument::getName(), new CreateDocument()); $service->addAction(GetDocument::getName(), new GetDocument()); $service->addAction(UpdateDocument::getName(), new UpdateDocument()); + $service->addAction(UpsertDocument::getName(), new UpsertDocument()); $service->addAction(DeleteDocument::getName(), new DeleteDocument()); $service->addAction(ListDocuments::getName(), new ListDocuments()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php index d881303c1e..0a8d8c0cfd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php @@ -38,6 +38,7 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Delete as Del use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Get as GetRow; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Logs\XList as ListRowLogs; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Update as UpdateRow; +use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Upsert as UpsertRow; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\XList as ListRows; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Update as UpdateTable; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Usage\Get as GetTableUsage; @@ -135,6 +136,7 @@ class Tables extends Base $service->addAction(CreateRow::getName(), new CreateRow()); $service->addAction(GetRow::getName(), new GetRow()); $service->addAction(UpdateRow::getName(), new UpdateRow()); + $service->addAction(UpsertRow::getName(), new UpsertRow()); $service->addAction(DeleteRow::getName(), new DeleteRow()); $service->addAction(ListRows::getName(), new ListRows()); $service->addAction(ListRowLogs::getName(), new ListRowLogs()); From db128d1fb4fed8d657f5a1313ce4b0697cc47ef0 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 14:39:47 +0530 Subject: [PATCH 123/362] update: better syntax for callbacks. --- .../Http/Databases/Collections/Attributes/Boolean/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Boolean/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Datetime/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Datetime/Update.php | 2 +- .../Databases/Http/Databases/Collections/Attributes/Delete.php | 2 +- .../Http/Databases/Collections/Attributes/Email/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Email/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Enum/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Enum/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Float/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Float/Update.php | 2 +- .../Databases/Http/Databases/Collections/Attributes/Get.php | 2 +- .../Http/Databases/Collections/Attributes/IP/Create.php | 2 +- .../Http/Databases/Collections/Attributes/IP/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Integer/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Integer/Update.php | 2 +- .../Databases/Collections/Attributes/Relationship/Create.php | 2 +- .../Databases/Collections/Attributes/Relationship/Update.php | 2 +- .../Http/Databases/Collections/Attributes/String/Create.php | 2 +- .../Http/Databases/Collections/Attributes/String/Update.php | 2 +- .../Http/Databases/Collections/Attributes/URL/Create.php | 2 +- .../Http/Databases/Collections/Attributes/URL/Update.php | 2 +- .../Databases/Http/Databases/Collections/Attributes/XList.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Create.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Delete.php | 2 +- .../Databases/Http/Databases/Collections/Documents/Create.php | 2 +- .../Databases/Http/Databases/Collections/Documents/Delete.php | 2 +- .../Databases/Http/Databases/Collections/Documents/Get.php | 2 +- .../Http/Databases/Collections/Documents/Logs/XList.php | 2 +- .../Databases/Http/Databases/Collections/Documents/Update.php | 2 +- .../Databases/Http/Databases/Collections/Documents/XList.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Get.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Create.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Delete.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Get.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/XList.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Logs/XList.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Update.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Usage/Get.php | 2 +- .../Modules/Databases/Http/Databases/Collections/XList.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Create.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Delete.php | 2 +- src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Logs/XList.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Boolean/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Boolean/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Datetime/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Datetime/Update.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Columns/Delete.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Email/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Email/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Enum/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Enum/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Float/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Float/Update.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Columns/Get.php | 2 +- .../Databases/Http/Databases/Tables/Columns/IP/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/IP/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Integer/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Integer/Update.php | 2 +- .../Http/Databases/Tables/Columns/Relationship/Create.php | 2 +- .../Http/Databases/Tables/Columns/Relationship/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/String/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/String/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/URL/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/URL/Update.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Columns/XList.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Tables/Create.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Tables/Delete.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Tables/Get.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Indexes/Create.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Indexes/Delete.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Indexes/Get.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Indexes/XList.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Logs/XList.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Create.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Delete.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Get.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Update.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/XList.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Tables/Update.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Usage/Get.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Tables/XList.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Update.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Usage/Get.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Usage/XList.php | 2 +- .../Platform/Modules/Databases/Http/Databases/XList.php | 2 +- src/Appwrite/Platform/Modules/Databases/Workers/Databases.php | 2 +- 89 files changed, 89 insertions(+), 89 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php index 7eb6a109c0..b1fddc0371 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php @@ -66,7 +66,7 @@ class Create extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?bool $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php index 9930ebdd8a..7aa2360fb8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php @@ -66,7 +66,7 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?bool $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php index e3e0cc359b..fd54fe0843 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php @@ -67,7 +67,7 @@ class Create extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php index eac9ba278c..17818fec2d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php @@ -67,7 +67,7 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 242f6a4ea0..4582500091 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -66,7 +66,7 @@ class Delete extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php index 80309609b8..80f0270ea3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php @@ -67,7 +67,7 @@ class Create extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php index 5c35084508..2f14d8a361 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php @@ -67,7 +67,7 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index 8e4ad25f75..006de12e91 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -70,7 +70,7 @@ class Create extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, array $elements, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php index be04a1ef9a..c2f6d7696c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php @@ -69,7 +69,7 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?array $elements, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php index 4e3a8adf75..35e9bb68a1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php @@ -71,7 +71,7 @@ class Create extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php index 13a90310e1..2fdcf949f1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php @@ -69,7 +69,7 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index ba91af54a2..5ce63982b1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -66,7 +66,7 @@ class Get extends Action ->param('key', '', new Key(), 'Attribute Key.') ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, UtopiaResponse $response, Database $dbForProject): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php index 4bf5edc09d..c62e2add01 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php @@ -67,7 +67,7 @@ class Create extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php index 380fa01123..a3e1ea5a61 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php @@ -67,7 +67,7 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php index dc28e41264..69272b6aea 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php @@ -71,7 +71,7 @@ class Create extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, bool $array, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php index 9e864e8b62..9c05382173 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php @@ -69,7 +69,7 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php index 0bbb3faa67..fa8d0ad750 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php @@ -80,7 +80,7 @@ class Create extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $relatedCollectionId, string $type, bool $twoWay, ?string $key, ?string $twoWayKey, string $onDelete, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php index b489f92c3d..da2d0b9b08 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php @@ -68,7 +68,7 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index 6463d2cedf..9b5201c1a8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -72,7 +72,7 @@ class Create extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php index e746edb766..b3f4cf3f03 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php @@ -70,7 +70,7 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php index a802bbf8af..2d72533cf1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php @@ -67,7 +67,7 @@ class Create extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php index 9ca1f372dc..e5c4288d92 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php @@ -67,7 +67,7 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index 307cb98eff..b9f1450fa3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -60,7 +60,7 @@ class XList extends Action ->param('queries', [], new Attributes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Attributes::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject): void 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 b5e7bf5415..84c18e9890 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -75,7 +75,7 @@ class Create extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->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 diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php index 67bddbc9ff..b8080ab471 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php @@ -62,7 +62,7 @@ class Delete extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index b55731a4f2..6a16644a2f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -117,7 +117,7 @@ class Create extends Action ->inject('user') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $documentId, string $collectionId, string|array $data, ?array $permissions, ?array $documents, UtopiaResponse $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index 9944de4e36..dc307071e4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -75,7 +75,7 @@ class Delete extends Action ->inject('dbForProject') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $documentId, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index da730246bf..3f7f74ee75 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -65,7 +65,7 @@ class Get extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $documentId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index 2856d9ddd0..4f4dad9882 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -71,7 +71,7 @@ class XList extends Action ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $documentId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index f69dfb3f98..3bc97e817b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -80,7 +80,7 @@ class Update extends Action ->inject('dbForProject') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $documentId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 02e2900ac8..0012b8339a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -66,7 +66,7 @@ class XList extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php index 9ff9e3e442..0359025fc5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php @@ -55,7 +55,7 @@ class Get extends Action ->param('collectionId', '', new UID(), 'Collection ID.') ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, UtopiaResponse $response, Database $dbForProject): void 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 e688088640..30753a9434 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 @@ -74,7 +74,7 @@ class Create extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, string $type, array $attributes, array $orders, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index 6fe3e3f42c..bb0b7bc4ca 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -68,7 +68,7 @@ class Delete extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index 8d5513e1c0..e29bbf6647 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -57,7 +57,7 @@ class Get extends Action ->param('key', null, new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, string $key, UtopiaResponse $response, Database $dbForProject): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index caf6c72559..13717034ce 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -62,7 +62,7 @@ class XList extends Action ->param('queries', [], new Indexes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Indexes::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 6e9f86260c..2f9ac2c8c0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -70,7 +70,7 @@ class XList extends Action ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index e1e8da7017..cc41d716d4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -68,7 +68,7 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->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 diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php index 5d49be7723..0c565806cc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php @@ -61,7 +61,7 @@ class Get extends Action ->param('collectionId', '', new UID(), 'Collection ID.') ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $range, string $collectionId, UtopiaResponse $response, Database $dbForProject): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index 15705e835e..06a6d2cd39 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -63,7 +63,7 @@ class XList extends Action ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, array $queries, string $search, UtopiaResponse $response, Database $dbForProject): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index 6e4dc5e136..3b9efa2fca 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -65,7 +65,7 @@ class Create extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $name, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php index 60df83bb77..b9b475f699 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php @@ -57,7 +57,7 @@ class Delete extends Action ->inject('queueForDatabase') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php index 67b61bceb2..c2c6a57da1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php @@ -49,7 +49,7 @@ class Get extends Action ->param('databaseId', '', new UID(), 'Database ID.') ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, UtopiaResponse $response, Database $dbForProject): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php index 56358aa723..a531110398 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php @@ -64,7 +64,7 @@ class XList extends Action ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, array $queries, UtopiaResponse $response, Database $dbForProject, Locale $locale, Reader $geodb): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php index e1633da062..b8675877f3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php @@ -65,6 +65,6 @@ class Create extends BooleanCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php index deead5e1d7..09d01cae21 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php @@ -67,6 +67,6 @@ class Update extends BooleanUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php index 4710031c63..34ead7c33d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php @@ -67,6 +67,6 @@ class Create extends DatetimeCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php index f30e627553..5b026cd373 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php @@ -69,6 +69,6 @@ class Update extends DatetimeUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php index d2f0c54839..567cb02169 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php @@ -64,6 +64,6 @@ class Delete extends AttributesDelete ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php index fc64c3b215..f5bb2f5220 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php @@ -66,6 +66,6 @@ class Create extends EmailCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php index c6425043b5..faba9279b5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php @@ -68,6 +68,6 @@ class Update extends EmailUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php index 338cec4f05..ec1d36a916 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php @@ -69,6 +69,6 @@ class Create extends EnumCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php index 6a35b955d2..ef2c829e0a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php @@ -71,6 +71,6 @@ class Update extends EnumUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php index 7e1a502f2e..32579017c6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php @@ -68,6 +68,6 @@ class Create extends FloatCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php index 05983a8153..4ed420cfa0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php @@ -70,6 +70,6 @@ class Update extends FloatUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php index a0d8a3ce76..ed28f96535 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php @@ -67,6 +67,6 @@ class Get extends AttributesGet ->param('key', '', new Key(), 'Column Key.') ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php index 1bae06a360..8acc47f051 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php @@ -66,6 +66,6 @@ class Create extends IPCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php index 8174ad7860..c43f132c13 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php @@ -68,6 +68,6 @@ class Update extends IPUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php index 2c6b7a84e7..7694e9d74f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php @@ -68,6 +68,6 @@ class Create extends IntegerCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php index 8375853e83..b3ce988830 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php @@ -70,6 +70,6 @@ class Update extends IntegerUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php index 6d3f26902d..133f772605 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php @@ -78,6 +78,6 @@ class Create extends RelationshipCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php index 8bed5013a9..ef1d8c7a33 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php @@ -70,6 +70,6 @@ class Update extends RelationshipUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php index 529f4f270d..e1914bed65 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php @@ -70,6 +70,6 @@ class Create extends StringCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php index 7450af9eff..f7ec773e3c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php @@ -71,6 +71,6 @@ class Update extends StringUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php index 07295b2d93..0e6fe7cff3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php @@ -66,6 +66,6 @@ class Create extends URLCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php index 990fbee742..6f3698c0cf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php @@ -68,6 +68,6 @@ class Update extends URLUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php index 41b1aee5c9..c6ceb35f48 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php @@ -56,6 +56,6 @@ class XList extends AttributesXList ->param('queries', [], new Columns(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Columns::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index 95ef8bea4a..c20865d110 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -68,6 +68,6 @@ class Create extends CollectionCreate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php index bb9b859a78..85e52ac37d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php @@ -61,6 +61,6 @@ class Delete extends CollectionDelete ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php index cdf7950a1c..473dfb6273 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php @@ -56,6 +56,6 @@ class Get extends CollectionGet ->param('tableId', '', new UID(), 'Table ID.') ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php index 33692b7a0c..3605afd985 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php @@ -69,6 +69,6 @@ class Create extends IndexCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php index 80581f7a6f..7cda1ce471 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php @@ -67,6 +67,6 @@ class Delete extends IndexDelete ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php index d78761459a..3bee87de4a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php @@ -58,6 +58,6 @@ class Get extends IndexGet ->param('key', null, new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php index b16e328f27..1af13dc82e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php @@ -58,6 +58,6 @@ class XList extends IndexXList ->param('queries', [], new Indexes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Indexes::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php index 99fbe99a34..244cebe3ad 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php @@ -56,6 +56,6 @@ class XList extends CollectionLogXList ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index 5eb36598b2..81d90a7708 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -108,6 +108,6 @@ class Create extends DocumentCreate ->inject('user') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php index 799f3cde05..5edf4e0b73 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php @@ -72,6 +72,6 @@ class Delete extends DocumentDelete ->inject('dbForProject') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php index 8a8f9f3062..74e1f90497 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php @@ -61,6 +61,6 @@ class Get extends DocumentGet ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php index 62466eac13..1cc5202152 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php @@ -57,6 +57,6 @@ class XList extends DocumentLogXList ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php index 798bfddf51..dfe77c9075 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php @@ -71,6 +71,6 @@ class Update extends DocumentUpdate ->inject('dbForProject') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php index 1175515e5c..9d03603a0e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php @@ -60,6 +60,6 @@ class XList extends DocumentXList ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index 14798f8513..ab71634fb2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -67,6 +67,6 @@ class Update extends CollectionUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index 1baebb23f2..9fb5fc8c17 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -58,6 +58,6 @@ class Get extends CollectionUsageGet ->param('tableId', '', new UID(), 'Collection ID.') ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php index 1086f8f80e..f6f48ace40 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php @@ -59,6 +59,6 @@ class XList extends CollectionXList ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php index 49c92a65a2..a0e440c657 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php @@ -58,7 +58,7 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $name, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index fab12a9735..1a85380767 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -55,7 +55,7 @@ class Get extends Action ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $databaseId, string $range, UtopiaResponse $response, Database $dbForProject): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php index 48533935b3..2d551465db 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -52,7 +52,7 @@ class XList extends Action ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(string $range, UtopiaResponse $response, Database $dbForProject): void diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php index 8bb9184baa..dcf7e2d724 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -56,7 +56,7 @@ class XList extends Action ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForProject') - ->callback([$this, 'action']); + ->callback($this->action(...)); } public function action(array $queries, string $search, UtopiaResponse $response, Database $dbForProject): void diff --git a/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php index 0cbddd2a52..2576765445 100644 --- a/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php +++ b/src/Appwrite/Platform/Modules/Databases/Workers/Databases.php @@ -38,7 +38,7 @@ class Databases extends Action ->inject('dbForProject') ->inject('queueForRealtime') ->inject('log') - ->callback([$this, 'action']); + ->callback($this->action(...)); } /** From 9334b98308b16918b7e70145c68225c4bcc8c8dd Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 14:40:33 +0530 Subject: [PATCH 124/362] fix: duplicate call to collection creation. --- .../Modules/Databases/Http/Databases/Collections/Create.php | 2 -- 1 file changed, 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 84c18e9890..5edce7715f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -102,8 +102,6 @@ class Create extends Action 'name' => $name, 'search' => \implode(' ', [$collectionId, $name]), ])); - - $dbForProject->createCollection('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), permissions: $permissions, documentSecurity: $documentSecurity); } catch (DuplicateException) { throw new Exception($this->getDuplicateException()); } catch (LimitException) { From d6b55730eb8b377b4f19a5b5c58ec4ef80467f9e Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 15:10:28 +0530 Subject: [PATCH 125/362] fix: string encryption attribute in model. --- .../Collections/Attributes/String/Create.php | 17 ++++++++++++++++- .../Databases/Tables/Columns/String/Create.php | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index 9b5201c1a8..cc989f6687 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -72,6 +72,7 @@ class Create extends Action ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') + ->inject('plan') ->callback($this->action(...)); } @@ -87,8 +88,20 @@ class Create extends Action UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, - Event $queueForEvents + Event $queueForEvents, + array $plan ): void { + if ($encrypt && !empty($plan) && !($plan['databasesAllowEncrypt'] ?? false)) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Encrypted string ' . $this->getSdkGroup() . ' are not available on your plan. Please upgrade to create encrypted string ' . $this->getSdkGroup() . '.'); + } + + if ($encrypt && $size < APP_DATABASE_ENCRYPT_SIZE_MIN) { + throw new Exception( + Exception::GENERAL_BAD_REQUEST, + "Size too small. Encrypted strings require a minimum size of " . APP_DATABASE_ENCRYPT_SIZE_MIN . " characters." + ); + } + // Ensure default fits in the given size $validator = new Text($size, 0); if (!is_null($default) && !$validator->isValid($default)) { @@ -118,6 +131,8 @@ class Create extends Action $queueForEvents ); + $attribute->setAttribute('encrypt', $encrypt); + $response ->setStatusCode(SwooleResponse::STATUS_CODE_ACCEPTED) ->dynamic($attribute, $this->getResponseModel()); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php index e1914bed65..ed7989fbc3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php @@ -70,6 +70,7 @@ class Create extends StringCreate ->inject('dbForProject') ->inject('queueForDatabase') ->inject('queueForEvents') + ->inject('plan') ->callback($this->action(...)); } } From d502869c3d06f62be02da1384ba1c612fff8ec53 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 15:21:06 +0530 Subject: [PATCH 126/362] fix: index lengths. --- .../Http/Databases/Collections/Indexes/Create.php | 11 ++++++----- .../Http/Databases/Tables/Indexes/Create.php | 3 +++ 2 files changed, 9 insertions(+), 5 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 30753a9434..1665549c92 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 @@ -22,6 +22,8 @@ use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; +use Utopia\Validator\Integer; +use Utopia\Validator\Nullable; use Utopia\Validator\WhiteList; class Create extends Action @@ -70,6 +72,7 @@ class Create extends Action ->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE]), 'Index type.') ->param('attributes', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of attributes to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' attributes are allowed, each 32 characters long.') ->param('orders', [], new ArrayList(new WhiteList(['ASC', 'DESC'], false, Database::VAR_STRING), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index orders. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' orders are allowed.', true) + ->param('lengths', [], new ArrayList(new Nullable(new Integer()), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Length of index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE, optional: true) ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') @@ -77,7 +80,7 @@ class Create extends Action ->callback($this->action(...)); } - public function action(string $databaseId, string $collectionId, string $key, string $type, array $attributes, array $orders, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void + public function action(string $databaseId, string $collectionId, string $key, string $type, array $attributes, array $orders, array $lengths, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents): void { $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); @@ -103,7 +106,7 @@ class Create extends Action throw new Exception($this->getLimitException(), 'Index limit exceeded'); } - // Convert Document[] to array of attribute metadata + // Convert Document array to array of attribute metadata $oldAttributes = \array_map(fn ($a) => $a->getArrayCopy(), $collection->getAttribute('attributes')); $oldAttributes[] = [ @@ -138,9 +141,6 @@ class Create extends Action 'size' => 0 ]; - // lengths hidden by default - $lengths = []; - $contextType = $this->getParentContext(); foreach ($attributes as $i => $attribute) { // find attribute metadata in collection document @@ -191,6 +191,7 @@ class Create extends Action $dbForProject->getAdapter()->getMaxIndexLength(), $dbForProject->getAdapter()->getInternalIndexesKeys(), ); + if (!$validator->isValid($index)) { throw new Exception($this->getInvalidTypeException(), $validator->getDescription()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php index 3605afd985..e57e962e87 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php @@ -15,6 +15,8 @@ use Utopia\Database\Validator\UID; use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; +use Utopia\Validator\Integer; +use Utopia\Validator\Nullable; use Utopia\Validator\WhiteList; class Create extends IndexCreate @@ -65,6 +67,7 @@ class Create extends IndexCreate ->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE]), 'Index type.') ->param('columns', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of columns to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' columns are allowed, each 32 characters long.') ->param('orders', [], new ArrayList(new WhiteList(['ASC', 'DESC'], false, Database::VAR_STRING), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index orders. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' orders are allowed.', true) + ->param('lengths', [], new ArrayList(new Nullable(new Integer()), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Length of index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE, optional: true) ->inject('response') ->inject('dbForProject') ->inject('queueForDatabase') From b1f7f08b9a17216efde50ce028d7bf7dfdc7ec67 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 16:06:15 +0530 Subject: [PATCH 127/362] remove: duplicate events. --- .../Http/Databases/Collections/Documents/Create.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 6a16644a2f..33406044f1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -367,12 +367,6 @@ class Create extends Action throw new Exception($this->getInvalidStructureException(), $e->getMessage()); } - $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()) - ->setContext('collection', $collection) - ->setContext('database', $database); - $queueForEvents ->setParam('databaseId', $databaseId) ->setContext('database', $database) From ffec769f4ada9b6019e55385aea1871646802575 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 16:16:55 +0530 Subject: [PATCH 128/362] fix: index lengths. --- .../Databases/Http/Databases/Collections/Indexes/Create.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1665549c92..9dbd7924c6 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 @@ -164,7 +164,7 @@ class Create extends Action throw new Exception($this->getParentNotAvailableException(), "$contextType not available: " . $oldAttributes[$attributeIndex]['key']); } - $lengths[$i] = null; + $lengths[$i] ??= null; if ($attributeArray === true) { $lengths[$i] = Database::ARRAY_INDEX_LENGTH; From ad34cf3a624f2d8a7ef302aa6ae86c33028e222c Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 16:17:27 +0530 Subject: [PATCH 129/362] add: lengths to column indexes. --- src/Appwrite/Utopia/Response/Model/ColumnIndex.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Model/ColumnIndex.php b/src/Appwrite/Utopia/Response/Model/ColumnIndex.php index 8c632266ef..bebc640fb2 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnIndex.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnIndex.php @@ -42,6 +42,13 @@ class ColumnIndex extends Model 'example' => [], 'array' => true, ]) + ->addRule('lengths', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Index columns length.', + 'default' => [], + 'example' => [], + 'array' => true, + ]) ->addRule('orders', [ 'type' => self::TYPE_STRING, 'description' => 'Index orders.', From 44b8054ed7e831d70415c2e76695e9781b1a3605 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 16:55:15 +0530 Subject: [PATCH 130/362] add: upsert documents/rows. --- .../Collections/Documents/Bulk/Upsert.php | 141 ++++++++++++++++++ .../Databases/Tables/Rows/Bulk/Upsert.php | 74 +++++++++ .../Services/Registry/Collections.php | 2 + .../Databases/Services/Registry/Tables.php | 2 + 4 files changed, 219 insertions(+) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php new file mode 100644 index 0000000000..1e7d838fba --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -0,0 +1,141 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents') + ->desc('Create or update documents') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].create') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'document.create') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', [ + new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/upsert-documents.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON, + ) + ]) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('documents', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of document data as JSON objects. May contain partial documents.', false, ['plan']) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForStatsUsage') + ->inject('plan') + ->callback($this->action(...)); + } + + public function action(string $databaseId, string $collectionId, array $documents, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, array $plan): void + { + $database = $dbForProject->getDocument('databases', $databaseId); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); + if ($collection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + $hasRelationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + if ($hasRelationships) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Bulk upsert is not supported for ' . $this->getSdkNamespace() . ' with relationship attributes'); + } + + foreach ($documents as $key => $document) { + $documents[$key] = new Document($document); + } + + $upserted = []; + + try { + $modified = $dbForProject->createOrUpdateDocuments( + 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + $documents, + onNext: function (Document $document) use ($plan, &$upserted) { + if (\count($upserted) < ($plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH)) { + $upserted[] = $document; + } + }, + ); + } catch (ConflictException) { + throw new Exception($this->getConflictException()); + } catch (DuplicateException) { + throw new Exception($this->getDuplicateException()); + } catch (RelationshipException $e) { + throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); + } catch (StructureException $e) { + throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + } + + foreach ($upserted as $document) { + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $collection->getId()); + } + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, \max(1, $modified)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), \max(1, $modified)); + + $response->dynamic(new Document([ + 'total' => $modified, + $this->getSdkGroup() => $upserted + ]), $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php new file mode 100644 index 0000000000..4a5b2a0fac --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php @@ -0,0 +1,74 @@ +setContext(Context::DATABASE_ROWS); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->desc('Create or update rows') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].create') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'document.create') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', [ + new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/upsert-documents.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON, + ) + ]) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('rows', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of row data as JSON objects. May contain partial rows.', false, ['plan']) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForStatsUsage') + ->inject('plan') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php index 33d972e0f1..ca6796c3e9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php @@ -27,6 +27,7 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\UR use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\XList as ListAttributes; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Create as CreateCollection; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Delete as DeleteCollection; +use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Upsert as UpsertDocuments; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Create as CreateDocument; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Delete as DeleteDocument; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Get as GetDocument; @@ -80,6 +81,7 @@ class Collections extends Base $service->addAction(GetDocument::getName(), new GetDocument()); $service->addAction(UpdateDocument::getName(), new UpdateDocument()); $service->addAction(UpsertDocument::getName(), new UpsertDocument()); + $service->addAction(UpsertDocuments::getName(), new UpsertDocuments()); $service->addAction(DeleteDocument::getName(), new DeleteDocument()); $service->addAction(ListDocuments::getName(), new ListDocuments()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php index 0a8d8c0cfd..2bd596bb1a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php @@ -33,6 +33,7 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\Delete as use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\Get as GetColumnIndex; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\XList as ListColumnIndexes; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Logs\XList as ListTableLogs; +use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Upsert as UpsertRows; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Create as CreateRow; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Delete as DeleteRow; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Get as GetRow; @@ -137,6 +138,7 @@ class Tables extends Base $service->addAction(GetRow::getName(), new GetRow()); $service->addAction(UpdateRow::getName(), new UpdateRow()); $service->addAction(UpsertRow::getName(), new UpsertRow()); + $service->addAction(UpsertRows::getName(), new UpsertRows()); $service->addAction(DeleteRow::getName(), new DeleteRow()); $service->addAction(ListRows::getName(), new ListRows()); $service->addAction(ListRowLogs::getName(), new ListRowLogs()); From a6ae715e3a6b748ee794f3765259ff337e447a20 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 16:55:31 +0530 Subject: [PATCH 131/362] update: descriptions. --- .../Databases/Http/Databases/Collections/Documents/Upsert.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Upsert.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index efd950e846..ebe30f6970 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -47,7 +47,7 @@ class Upsert extends Action $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') - ->desc('Upsert document') + ->desc('Create or update a document') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].upsert') ->label('scope', 'documents.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php index b0be7350b7..800efa9cde 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php @@ -37,7 +37,7 @@ class Upsert extends DocumentUpsert $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') - ->desc('Upsert row') + ->desc('Create or update a row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].upsert') ->label('scope', 'documents.write') From 919f358f3fd5ded0363f8a34fe9b6bdd5a5c109b Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 16:58:18 +0530 Subject: [PATCH 132/362] fix: audit event. --- .../Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php index 4a5b2a0fac..9331e75aa8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php @@ -41,7 +41,7 @@ class Upsert extends DocumentsUpsert ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].create') ->label('scope', 'documents.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('audits.event', 'document.create') + ->label('audits.event', 'row.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) From 1c87e765de8c563d7c6da1ecd739b1d75d3a76fc Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 17:12:43 +0530 Subject: [PATCH 133/362] add: delete documents/rows --- .../Collections/Documents/Bulk/Delete.php | 136 ++++++++++++++++++ .../Databases/Tables/Rows/Bulk/Delete.php | 71 +++++++++ .../Services/Registry/Collections.php | 2 + .../Databases/Services/Registry/Tables.php | 2 + 4 files changed, 211 insertions(+) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php new file mode 100644 index 0000000000..bee3b35599 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -0,0 +1,136 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents') + ->desc('Delete documents') + ->groups(['api', 'database']) + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'documents.delete') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/delete-documents.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForStatsUsage') + ->inject('plan') + ->callback($this->action(...)); + } + + public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, array $plan): void + { + $database = $dbForProject->getDocument('databases', $databaseId); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); + if ($collection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + $hasRelationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + if ($hasRelationships) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Bulk delete is not supported for ' . $this->getSdkNamespace() . ' with relationship attributes'); + } + + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + $documents = []; + + try { + $modified = $dbForProject->deleteDocuments( + 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + $queries, + onNext: function (Document $document) use ($plan, &$documents) { + if (\count($documents) < ($plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH)) { + $documents[] = $document; + } + }, + ); + } catch (ConflictException) { + throw new Exception($this->getConflictException()); + } catch (RestrictedException) { + throw new Exception($this->getRestrictedException()); + } + + foreach ($documents as $document) { + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $collection->getId()); + } + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, \max(1, $modified)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), \max(1, $modified)); + + $response->dynamic(new Document([ + 'total' => $modified, + $this->getSdkGroup() => $documents, + ]), $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php new file mode 100644 index 0000000000..73f3016936 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php @@ -0,0 +1,71 @@ +setContext(Context::DATABASE_ROWS); + + $this + ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) + ->setHttpPath('/v1/databases/:databaseId/tables/:collectionId/rows') + ->desc('Delete rows') + ->groups(['api', 'database']) + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'rows.delete') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/delete-documents.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForStatsUsage') + ->inject('plan') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php index ca6796c3e9..65953c7992 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php @@ -27,6 +27,7 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\UR use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\XList as ListAttributes; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Create as CreateCollection; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Delete as DeleteCollection; +use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Delete as DeleteDocuments; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Upsert as UpsertDocuments; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Create as CreateDocument; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Delete as DeleteDocument; @@ -83,6 +84,7 @@ class Collections extends Base $service->addAction(UpsertDocument::getName(), new UpsertDocument()); $service->addAction(UpsertDocuments::getName(), new UpsertDocuments()); $service->addAction(DeleteDocument::getName(), new DeleteDocument()); + $service->addAction(DeleteDocuments::getName(), new DeleteDocuments()); $service->addAction(ListDocuments::getName(), new ListDocuments()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php index 2bd596bb1a..87bf51512e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php @@ -33,6 +33,7 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\Delete as use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\Get as GetColumnIndex; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\XList as ListColumnIndexes; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Logs\XList as ListTableLogs; +use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Delete as DeleteRows; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Upsert as UpsertRows; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Create as CreateRow; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Delete as DeleteRow; @@ -140,6 +141,7 @@ class Tables extends Base $service->addAction(UpsertRow::getName(), new UpsertRow()); $service->addAction(UpsertRows::getName(), new UpsertRows()); $service->addAction(DeleteRow::getName(), new DeleteRow()); + $service->addAction(DeleteRows::getName(), new DeleteRows()); $service->addAction(ListRows::getName(), new ListRows()); $service->addAction(ListRowLogs::getName(), new ListRowLogs()); } From 2994cdf874b3975a678b7db9e893cdd446e5b89b Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 17:14:50 +0530 Subject: [PATCH 134/362] update: model. --- src/Appwrite/Utopia/Response/Model/Row.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Model/Row.php b/src/Appwrite/Utopia/Response/Model/Row.php index c30984ab7a..b7750feccd 100644 --- a/src/Appwrite/Utopia/Response/Model/Row.php +++ b/src/Appwrite/Utopia/Response/Model/Row.php @@ -36,6 +36,12 @@ class Row extends Any 'default' => '', 'example' => '5e5ea5c16897e', ]) + ->addRule('$sequence', [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Row automatically incrementing ID.', + 'default' => 0, + 'example' => 1, + ]) ->addRule('$tableId', [ 'type' => self::TYPE_STRING, 'description' => 'Table ID.', @@ -71,7 +77,6 @@ class Row extends Any public function filter(DatabaseDocument $document): DatabaseDocument { - $document->removeAttribute('$internalId'); $document->removeAttribute('$collection'); $document->removeAttribute('$tenant'); From 3426847b177b080f44375b4ce5f85ed1622de181 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 17:31:37 +0530 Subject: [PATCH 135/362] add: update documents/rows. --- .../Collections/Documents/Bulk/Update.php | 158 ++++++++++++++++++ .../Databases/Tables/Rows/Bulk/Update.php | 70 ++++++++ .../Services/Registry/Collections.php | 2 + .../Databases/Services/Registry/Tables.php | 2 + 4 files changed, 232 insertions(+) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php new file mode 100644 index 0000000000..23c8d5d58e --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -0,0 +1,158 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents') + ->desc('Update documents') + ->groups(['api', 'database']) + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'documents.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-documents.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('data', [], new JSON(), 'Document data as JSON object. Include only attribute and value pairs to be updated.', true) + ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForStatsUsage') + ->inject('plan') + ->callback($this->action(...)); + } + + public function action(string $databaseId, string $collectionId, string|array $data, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, array $plan): void + { + $data = \is_string($data) + ? \json_decode($data, true) + : $data; + + if (empty($data)) { + throw new Exception($this->getMissingPayloadException()); + } + + $database = $dbForProject->getDocument('databases', $databaseId); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId); + if ($collection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + $hasRelationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + if ($hasRelationships) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Bulk update is not supported for ' . $this->getSdkNamespace() . ' with relationship attributes'); + } + + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + if ($data['$permissions']) { + $validator = new Permissions(); + if (!$validator->isValid($data['$permissions'])) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, $validator->getDescription()); + } + } + + $documents = []; + + try { + $modified = $dbForProject->updateDocuments( + 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + new Document($data), + $queries, + onNext: function (Document $document) use ($plan, &$documents) { + if (\count($documents) < ($plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH)) { + $documents[] = $document; + } + }, + ); + } catch (ConflictException) { + throw new Exception($this->getConflictException()); + } catch (RelationshipException $e) { + throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage()); + } catch (StructureException $e) { + throw new Exception($this->getInvalidStructureException(), $e->getMessage()); + } + + foreach ($documents as $document) { + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $collection->getId()); + } + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, \max(1, $modified)) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), \max(1, $modified)); + + $response->dynamic(new Document([ + 'total' => $modified, + $this->getSdkGroup() => $documents + ]), $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php new file mode 100644 index 0000000000..95a0819dfd --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php @@ -0,0 +1,70 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->desc('Update rows') + ->groups(['api', 'database']) + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'rows.update') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/update-documents.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('data', [], new JSON(), 'Row data as JSON object. Include only column and value pairs to be updated.', true) + ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForStatsUsage') + ->inject('plan') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php index 65953c7992..415eaeaf85 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php @@ -28,6 +28,7 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\XL use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Create as CreateCollection; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Delete as DeleteCollection; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Delete as DeleteDocuments; +use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Update as UpdateDocuments; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Upsert as UpsertDocuments; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Create as CreateDocument; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Delete as DeleteDocument; @@ -81,6 +82,7 @@ class Collections extends Base $service->addAction(CreateDocument::getName(), new CreateDocument()); $service->addAction(GetDocument::getName(), new GetDocument()); $service->addAction(UpdateDocument::getName(), new UpdateDocument()); + $service->addAction(UpdateDocuments::getName(), new UpdateDocuments()); $service->addAction(UpsertDocument::getName(), new UpsertDocument()); $service->addAction(UpsertDocuments::getName(), new UpsertDocuments()); $service->addAction(DeleteDocument::getName(), new DeleteDocument()); diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php index 87bf51512e..87e5f80e3f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php @@ -34,6 +34,7 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\Get as Get use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\XList as ListColumnIndexes; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Logs\XList as ListTableLogs; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Delete as DeleteRows; +use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Update as UpdateRows; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Upsert as UpsertRows; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Create as CreateRow; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Delete as DeleteRow; @@ -138,6 +139,7 @@ class Tables extends Base $service->addAction(CreateRow::getName(), new CreateRow()); $service->addAction(GetRow::getName(), new GetRow()); $service->addAction(UpdateRow::getName(), new UpdateRow()); + $service->addAction(UpdateRows::getName(), new UpdateRows()); $service->addAction(UpsertRow::getName(), new UpsertRow()); $service->addAction(UpsertRows::getName(), new UpsertRows()); $service->addAction(DeleteRow::getName(), new DeleteRow()); From 90d18a9bd5949760c12aed6bfe687778b81cea9e Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 18:24:54 +0530 Subject: [PATCH 136/362] add: increment, decrement document/row attribute/column; fixes: misc. --- .../Databases/Collections/Attributes/Get.php | 12 +- .../Collections/Documents/Action.php | 20 +++ .../Documents/Attribute/Decrement.php | 125 +++++++++++++++++ .../Documents/Attribute/Increment.php | 126 ++++++++++++++++++ .../Databases/Tables/Rows/Bulk/Delete.php | 2 +- .../Tables/Rows/Column/Decrement.php | 72 ++++++++++ .../Tables/Rows/Column/Increment.php | 72 ++++++++++ .../Services/Registry/Collections.php | 5 + .../Databases/Services/Registry/Tables.php | 4 + .../Utopia/Response/Model/ColumnString.php | 7 + 10 files changed, 440 insertions(+), 5 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index 5ce63982b1..d49639e049 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -86,14 +86,18 @@ class Get extends Action throw new Exception($this->getNotFoundException()); } - foreach ($attribute->getAttribute('options', []) as $optKey => $optVal) { - $attribute->setAttribute($optKey, $optVal); - } - $type = $attribute->getAttribute('type'); $format = $attribute->getAttribute('format'); + $options = $attribute->getAttribute('options', []); + $filters = $attribute->getAttribute('filters', []); + foreach ($options as $key => $option) { + $attribute->setAttribute($key, $option); + } + $model = $this->getCorrectModel($type, $format); + $attribute->setAttribute('encrypt', in_array('encrypt', $filters)); + $response->dynamic($attribute, $model); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index 341302f779..c0e71d3730 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -96,6 +96,16 @@ abstract class Action extends UtopiaAction : Exception::TABLE_NOT_FOUND; } + /** + * Get the appropriate attribute/column not found exception. + */ + final protected function getStructureNotFoundException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_NOT_FOUND + : Exception::COLUMN_NOT_FOUND; + } + /** * Get the appropriate not found exception. */ @@ -156,6 +166,16 @@ abstract class Action extends UtopiaAction : Exception::ROW_MISSING_DATA; } + /** + * Get the exception to throw when the resource limit is exceeded. + */ + final protected function getLimitException(): string + { + return $this->isCollectionsAPI() + ? Exception::ATTRIBUTE_LIMIT_EXCEEDED + : Exception::COLUMN_LIMIT_EXCEEDED; + } + /** * Get the appropriate missing payload exception. */ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php new file mode 100644 index 0000000000..9a8da5858c --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php @@ -0,0 +1,125 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId/:attribute/decrement') + ->desc('Decrement document attribute') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].decrement') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'documents.decrement') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/decrement-document-attribute.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('documentId', '', new UID(), 'Document ID.') + ->param('attribute', '', new Key(), 'Attribute key.') + ->param('value', 1, new Numeric(), 'Value to increment the attribute by. The value must be a number.', true) + ->param('min', null, new Numeric(), 'Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback($this->action(...)); + } + + public function action(string $databaseId, string $collectionId, string $documentId, string $attribute, int|float $value, int|float|null $min, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId)); + if ($collection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + try { + $document = $dbForProject->decreaseDocumentAttribute( + collection: 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + id: $documentId, + attribute: $attribute, + value: $value, + min: $min + ); + } catch (ConflictException) { + throw new Exception($this->getConflictException()); + } catch (NotFoundException) { + throw new Exception($this->getStructureNotFoundException()); + } catch (LimitException) { + throw new Exception($this->getLimitException(), $this->getSdkNamespace() . ' "' . $attribute . '" has reached the minimum value of ' . $min); + } catch (TypeException) { + throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID, $this->getSdkNamespace() . ' "' . $attribute . '" is not a number'); + } + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), 1); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setContext('database', $database) + ->setParam('collectionId', $collectionId) + ->setParam('tableId', $collectionId) + ->setContext($this->getCollectionsEventsContext(), $collection); + + $response->dynamic($document, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php new file mode 100644 index 0000000000..b65ca3c285 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php @@ -0,0 +1,126 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId/:attribute/increment') + ->desc('Increment document attribute') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].increment') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'documents.increment') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/increment-document-attribute.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('documentId', '', new UID(), 'Document ID.') + ->param('attribute', '', new Key(), 'Attribute key.') + ->param('value', 1, new Numeric(), 'Value to increment the attribute by. The value must be a number.', true) + ->param('max', null, new Numeric(), 'Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback($this->action(...)); + } + + public function action(string $databaseId, string $collectionId, string $documentId, string $attribute, int|float $value, int|float|null $max, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void + { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $collectionId)); + if ($collection->isEmpty()) { + throw new Exception($this->getParentNotFoundException()); + } + + try { + $document = $dbForProject->increaseDocumentAttribute( + collection: 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + id: $documentId, + attribute: $attribute, + value: $value, + max: $max + ); + } catch (ConflictException) { + throw new Exception($this->getConflictException()); + } catch (NotFoundException) { + // todo: @itznotabug what do we name this exception now? + throw new Exception($this->getStructureNotFoundException()); + } catch (LimitException) { + throw new Exception($this->getLimitException(), $this->getSdkNamespace() . ' "' . $attribute . '" has reached the maximum value of ' . $max); + } catch (TypeException) { + throw new Exception(Exception::ATTRIBUTE_TYPE_INVALID, $this->getSdkNamespace() . ' "' . $attribute . '" is not a number'); + } + + $queueForStatsUsage + ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) + ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_WRITES), 1); + + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setContext('database', $database) + ->setParam('collectionId', $collectionId) + ->setParam('tableId', $collectionId) + ->setContext($this->getCollectionsEventsContext(), $collection); + + $response->dynamic($document, $this->getResponseModel()); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php index 73f3016936..9ddff818e3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php @@ -35,7 +35,7 @@ class Delete extends DocumentsDelete $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/tables/:collectionId/rows') + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('Delete rows') ->groups(['api', 'database']) ->label('scope', 'documents.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php new file mode 100644 index 0000000000..5b2cf17f91 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php @@ -0,0 +1,72 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/:column/decrement') + ->desc('Decrement row column') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].decrement') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'rows.decrement') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/decrement-document-attribute.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('rowId', '', new UID(), 'Row ID.') + ->param('column', '', new Key(), 'Column key.') + ->param('value', 1, new Numeric(), 'Value to increment the column by. The value must be a number.', true) + ->param('min', null, new Numeric(), 'Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php new file mode 100644 index 0000000000..4dcd05cc25 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php @@ -0,0 +1,72 @@ +setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) + ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/:column/increment') + ->desc('Increment row column') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].increment') + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'rows.increment') + ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: self::getName(), + description: '/docs/references/databases/increment-document-attribute.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: $this->getResponseModel(), + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('tableId', '', new UID(), 'Table ID.') + ->param('rowId', '', new UID(), 'Row ID.') + ->param('column', '', new Key(), 'Column key.') + ->param('value', 1, new Numeric(), 'Value to increment the column by. The value must be a number.', true) + ->param('max', null, new Numeric(), 'Maximum value for the column. If the current value is greater than this value, an error will be thrown.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('queueForEvents') + ->inject('queueForStatsUsage') + ->callback($this->action(...)); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php index 415eaeaf85..d036d2fd7b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php @@ -27,6 +27,8 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\UR use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\XList as ListAttributes; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Create as CreateCollection; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Delete as DeleteCollection; +use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Attribute\Decrement as DecrementDocumentAttribute; +use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Attribute\Increment as IncrementDocumentAttribute; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Delete as DeleteDocuments; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Update as UpdateDocuments; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Upsert as UpsertDocuments; @@ -88,6 +90,9 @@ class Collections extends Base $service->addAction(DeleteDocument::getName(), new DeleteDocument()); $service->addAction(DeleteDocuments::getName(), new DeleteDocuments()); $service->addAction(ListDocuments::getName(), new ListDocuments()); + $service->addAction(IncrementDocumentAttribute::getName(), new IncrementDocumentAttribute()); + $service->addAction(DecrementDocumentAttribute::getName(), new DecrementDocumentAttribute()); + } private function registerAttributeActions(Service $service): void diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php index 87e5f80e3f..4ddadeece6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php @@ -36,6 +36,8 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Logs\XList as List use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Delete as DeleteRows; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Update as UpdateRows; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Upsert as UpsertRows; +use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Column\Decrement as DecrementRowColumn; +use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Column\Increment as IncrementRowColumn; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Create as CreateRow; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Delete as DeleteRow; use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Get as GetRow; @@ -146,5 +148,7 @@ class Tables extends Base $service->addAction(DeleteRows::getName(), new DeleteRows()); $service->addAction(ListRows::getName(), new ListRows()); $service->addAction(ListRowLogs::getName(), new ListRowLogs()); + $service->addAction(IncrementRowColumn::getName(), new IncrementRowColumn()); + $service->addAction(DecrementRowColumn::getName(), new DecrementRowColumn()); } } diff --git a/src/Appwrite/Utopia/Response/Model/ColumnString.php b/src/Appwrite/Utopia/Response/Model/ColumnString.php index f962e51c37..f3a876b7a9 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnString.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnString.php @@ -24,6 +24,13 @@ class ColumnString extends Column 'required' => false, 'example' => 'default', ]) + ->addRule('encrypt', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Defines whether this column is encrypted or not.', + 'default' => false, + 'required' => false, + 'example' => false, + ]) ; } From 1f31998092ce4c03fc078cac14066fd3fc25fe69 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 19:48:28 +0530 Subject: [PATCH 137/362] =?UTF-8?q?fix:=20route=20name=20=F0=9F=98=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Databases/Http/Databases/Tables/Rows/Bulk/Update.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Update.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php index 95a0819dfd..53e7c3c152 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php @@ -21,7 +21,7 @@ class Update extends DocumentsUpdate public static function getName(): string { - return 'updateRow'; + return 'updateRows'; } protected function getResponseModel(): string diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php index dfe77c9075..d37f5cc92f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php @@ -62,7 +62,7 @@ class Update extends DocumentUpdate contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Collection ID.') + ->param('tableId', '', new UID(), 'Table ID.') ->param('rowId', '', new UID(), 'Row ID.') ->param('data', [], new JSON(), 'Row data as JSON object. Include only columns and value pairs to be updated.', true) ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) From b248c9b640f6ecca22e81684c58a4f29efdb418d Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 19:58:28 +0530 Subject: [PATCH 138/362] =?UTF-8?q?fix:=20a=20bunch=20of=20tests=20?= =?UTF-8?q?=F0=9F=9A=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Databases/Collections/DatabasesBase.php | 12 +- .../Collections/DatabasesCustomServerTest.php | 4 +- .../Databases/Tables/DatabasesBase.php | 681 ++++++++- .../Tables/DatabasesCustomServerTest.php | 1231 +++++++++++++++-- 4 files changed, 1782 insertions(+), 146 deletions(-) diff --git a/tests/e2e/Services/Databases/Collections/DatabasesBase.php b/tests/e2e/Services/Databases/Collections/DatabasesBase.php index 956b87e13d..6b0aca1512 100644 --- a/tests/e2e/Services/Databases/Collections/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Collections/DatabasesBase.php @@ -1421,7 +1421,6 @@ trait DatabasesBase return $data; } - /** * @depends testCreateAttributes */ @@ -2079,7 +2078,6 @@ trait DatabasesBase return ['documents' => $documents['body']['documents'], 'databaseId' => $databaseId]; } - /** * @depends testListDocuments */ @@ -2830,7 +2828,7 @@ trait DatabasesBase return $data; } - public function testInvalidDocumentStructure() + public function testInvalidDocumentStructure(): void { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -3693,7 +3691,7 @@ trait DatabasesBase $this->assertCount(1, $documentsUser2['body']['documents']); } - public function testEnforceCollectionPermissions() + public function testEnforceCollectionPermissions(): void { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -3986,7 +3984,7 @@ trait DatabasesBase /** * @depends testUniqueIndexDuplicate */ - public function testPersistantCreatedAt(array $data): array + public function testPersistentCreatedAt(array $data): array { $headers = $this->getSide() === 'client' ? array_merge([ 'content-type' => 'application/json', @@ -5498,13 +5496,11 @@ trait DatabasesBase ]), ['min' => 7]); $this->assertEquals(400, $err['headers']['status-code']); - // Test type error on non-numeric attribut + // Test type error on non-numeric attribute $typeErr = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId . '/count/decrement', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), ['value' => 'not-a-number']); $this->assertEquals(400, $typeErr['headers']['status-code']); } - - } diff --git a/tests/e2e/Services/Databases/Collections/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Collections/DatabasesCustomServerTest.php index 84f7d43593..21382b8302 100644 --- a/tests/e2e/Services/Databases/Collections/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Collections/DatabasesCustomServerTest.php @@ -3651,7 +3651,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $doc3['headers']['status-code']); } - public function createRelationshipCollections() + public function createRelationshipCollections(): void { // Prepare the database with collections and relationships $database = $this->client->call(Client::METHOD_POST, '/databases', [ @@ -3700,7 +3700,7 @@ class DatabasesCustomServerTest extends Scope \sleep(2); } - public function cleanupRelationshipCollection() + public function cleanupRelationshipCollection(): void { $this->client->call(Client::METHOD_DELETE, '/databases/database1', [ 'content-type' => 'application/json', diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Tables/DatabasesBase.php index ef35d3c962..a0b6be2fbe 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesBase.php @@ -39,7 +39,7 @@ trait DatabasesBase /** * @depends testCreateDatabase */ - public function testCreateCollection(array $data): array + public function testCreateTable(array $data): array { $databaseId = $data['databaseId']; /** @@ -85,9 +85,9 @@ trait DatabasesBase } /** - * @depends testCreateCollection + * @depends testCreateTable */ - public function testConsoleProject(array $data) + public function testConsoleProject(array $data): void { if ($this->getSide() === 'server') { // Server side can't get past the invalid key check anyway @@ -121,9 +121,9 @@ trait DatabasesBase } /** - * @depends testCreateCollection + * @depends testCreateTable */ - public function testDisableCollection(array $data): void + public function testDisableTable(array $data): void { $databaseId = $data['databaseId']; /** @@ -190,9 +190,9 @@ trait DatabasesBase } /** - * @depends testCreateCollection + * @depends testCreateTable */ - public function testCreateAttributes(array $data): array + public function testCreateColumns(array $data): array { $databaseId = $data['databaseId']; @@ -375,9 +375,9 @@ trait DatabasesBase } /** - * @depends testCreateAttributes + * @depends testCreateColumns */ - public function testListAttributes(array $data): void + public function testListColumns(array $data): void { $databaseId = $data['databaseId']; $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns', array_merge([ @@ -407,7 +407,7 @@ trait DatabasesBase /** * @depends testCreateDatabase */ - public function testPatchAttribute(array $data): void + public function testPatchColumn(array $data): void { $databaseId = $data['databaseId']; @@ -471,7 +471,7 @@ trait DatabasesBase $this->assertStringContainsString('Index length is longer than the maximum: 76', $attribute['body']['message']); } - public function testUpdateAttributeEnum(): void + public function testUpdateColumnEnum(): void { $database = $this->client->call(Client::METHOD_POST, '/databases', [ 'content-type' => 'application/json', @@ -529,9 +529,9 @@ trait DatabasesBase } /** - * @depends testCreateAttributes + * @depends testCreateColumns */ - public function testAttributeResponseModels(array $data): array + public function testColumnResponseModels(array $data): array { $databaseId = $data['databaseId']; $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ @@ -1196,7 +1196,7 @@ trait DatabasesBase } /** - * @depends testCreateAttributes + * @depends testCreateColumns */ public function testCreateIndexes(array $data): array { @@ -1421,6 +1421,99 @@ trait DatabasesBase return $data; } + /** + * @depends testCreateColumns + */ + public function testGetIndexByKeyWithLengths(array $data): void + { + $databaseId = $data['databaseId']; + $tableId = $data['moviesId']; + + // Test case for valid lengths + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$tableId}/indexes", [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'key' => 'lengthTestIndex', + 'type' => 'key', + 'attributes' => ['title','description'], + 'lengths' => [128,200] + ]); + $this->assertEquals(202, $create['headers']['status-code']); + + // Fetch index and check correct lengths + $index = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$tableId}/indexes/lengthTestIndex", [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + $this->assertEquals(200, $index['headers']['status-code']); + $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::ARRAY_INDEX_LENGTH + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$tableId}/indexes", [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'key' => 'lengthOverrideTestIndex', + 'type' => 'key', + 'attributes' => ['actors'], + 'lengths' => [120] + ]); + $this->assertEquals(202, $create['headers']['status-code']); + + $index = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$tableId}/indexes/lengthOverrideTestIndex", [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + $this->assertEquals([Database::ARRAY_INDEX_LENGTH], $index['body']['lengths']); + + // Test case for count of lengths greater than attributes (should throw 400) + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$tableId}/indexes", [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'key' => 'lengthCountExceededIndex', + 'type' => 'key', + 'attributes' => ['title'], + 'lengths' => [128, 128] + ]); + $this->assertEquals(400, $create['headers']['status-code']); + + // Test case for lengths exceeding total of 768 + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$tableId}/indexes", [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'key' => 'lengthTooLargeIndex', + 'type' => 'key', + 'attributes' => ['title','description','tagline','actors'], + 'lengths' => [256,256,256,20] + ]); + + $this->assertEquals(400, $create['headers']['status-code']); + + // Test case for negative length values + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$tableId}/indexes", [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'key' => 'negativeLengthIndex', + 'type' => 'key', + 'attributes' => ['title'], + 'lengths' => [-1] + ]); + $this->assertEquals(400, $create['headers']['status-code']); + } + /** * @depends testCreateIndexes */ @@ -1455,7 +1548,7 @@ trait DatabasesBase /** * @depends testCreateIndexes */ - public function testCreateDocument(array $data): array + public function testCreateRow(array $data): array { $databaseId = $data['databaseId']; $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ @@ -1596,9 +1689,311 @@ trait DatabasesBase } /** - * @depends testCreateDocument + * @depends testCreateIndexes */ - public function testListDocuments(array $data): array + public function testUpsertRow(array $data): void + { + $databaseId = $data['databaseId']; + $rowId = ID::unique(); + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2000 + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ]); + + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertCount(3, $document['body']['$permissions']); + $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Love and Thunder', + 'releaseYear' => 2000 + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ]); + + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Thor: Love and Thunder', $document['body']['title']); + + $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals('Thor: Love and Thunder', $document['body']['title']); + + // removing permission to read and delete + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Love and Thunder', + 'releaseYear' => 2000 + ], + 'permissions' => [ + Permission::update(Role::users()) + ], + ]); + // shouldn't be able to read as no read permission + $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + switch ($this->getSide()) { + case 'client': + $this->assertEquals(404, $document['headers']['status-code']); + break; + case 'server': + $this->assertEquals(200, $document['headers']['status-code']); + break; + } + // shouldn't be able to delete as no delete permission + $document = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + // simulating for the client + // the document should not be allowed to be deleted as needed downward + if ($this->getSide() === 'client') { + $this->assertEquals(401, $document['headers']['status-code']); + } + // giving the delete permission + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Love and Thunder', + 'releaseYear' => 2000 + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()) + ], + ]); + $document = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + $this->assertEquals(204, $document['headers']['status-code']); + + // relationship behaviour + $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => 'person-upsert', + 'name' => 'person', + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + Permission::create(Role::users()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $person['headers']['status-code']); + + $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => 'library-upsert', + 'name' => 'library', + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::create(Role::users()), + Permission::delete(Role::users()), + ], + 'documentSecurity' => true, + ]); + + $this->assertEquals(201, $library['headers']['status-code']); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'fullName', + 'size' => 255, + 'required' => false, + ]); + + sleep(1); // Wait for worker + + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedtableId' => 'library-upsert', + 'type' => Database::RELATION_ONE_TO_ONE, + 'key' => 'library', + 'twoWay' => true, + 'onDelete' => Database::RELATION_MUTATE_CASCADE, + ]); + + sleep(1); // Wait for worker + + $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'libraryName', + 'size' => 255, + 'required' => true, + ]); + + sleep(1); // Wait for worker + + $this->assertEquals(202, $libraryName['headers']['status-code']); + + // upserting values + $rowId = ID::unique(); + $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'library' => [ + '$id' => 'library1', + '$permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + 'libraryName' => 'Library 1', + ], + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ] + ]); + + $this->assertEquals('Library 1', $person1['body']['library']['libraryName']); + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['fullName', 'library.*'])->toString(), + Query::equal('library', ['library1'])->toString(), + ], + ]); + + $this->assertEquals(1, $documents['body']['total']); + $this->assertEquals('Library 1', $documents['body']['documents'][0]['library']['libraryName']); + + + $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'library' => [ + '$id' => 'library1', + '$permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + 'libraryName' => 'Library 2', + ], + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ] + ]); + + // data should get updated + $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['fullName', 'library.*'])->toString(), + Query::equal('library', ['library1'])->toString(), + ], + ]); + + $this->assertEquals(1, $documents['body']['total']); + $this->assertEquals('Library 2', $documents['body']['documents'][0]['library']['libraryName']); + + + // data should get added + $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.ID::unique(), array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'library' => [ + '$id' => 'library2', + '$permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + 'libraryName' => 'Library 2', + ], + ], + 'permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ] + ]); + + $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['fullName', 'library.*'])->toString() + ], + ]); + $this->assertEquals(2, $documents['body']['total']); + } + + /** + * @depends testCreateRow + */ + public function testListRows(array $data): array { $databaseId = $data['databaseId']; $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ @@ -1687,11 +2082,10 @@ trait DatabasesBase return ['rows' => $rows['body']['rows'], 'databaseId' => $databaseId]; } - /** - * @depends testListDocuments + * @depends testListRows */ - public function testGetDocument(array $data): void + public function testGetRow(array $data): void { $databaseId = $data['databaseId']; foreach ($data['rows'] as $row) { @@ -1715,9 +2109,9 @@ trait DatabasesBase } /** - * @depends testListDocuments + * @depends testListRows */ - public function testGetDocumentWithQueries(array $data): void + public function testGetRowWithQueries(array $data): void { $databaseId = $data['databaseId']; $row = $data['rows'][0]; @@ -1738,9 +2132,9 @@ trait DatabasesBase } /** - * @depends testCreateDocument + * @depends testCreateRow */ - public function testListDocumentsAfterPagination(array $data): array + public function testListRowsAfterPagination(array $data): array { $databaseId = $data['databaseId']; /** @@ -1880,9 +2274,9 @@ trait DatabasesBase } /** - * @depends testCreateDocument + * @depends testCreateRow */ - public function testListDocumentsBeforePagination(array $data): array + public function testListRowsBeforePagination(array $data): array { $databaseId = $data['databaseId']; /** @@ -1993,9 +2387,9 @@ trait DatabasesBase } /** - * @depends testCreateDocument + * @depends testCreateRow */ - public function testListDocumentsLimitAndOffset(array $data): array + public function testListRowsLimitAndOffset(array $data): array { $databaseId = $data['databaseId']; $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ @@ -2032,9 +2426,9 @@ trait DatabasesBase } /** - * @depends testCreateDocument + * @depends testCreateRow */ - public function testDocumentsListQueries(array $data): array + public function testRowsListQueries(array $data): array { $databaseId = $data['databaseId']; $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ @@ -2277,9 +2671,9 @@ trait DatabasesBase } /** - * @depends testCreateDocument + * @depends testCreateRow */ - public function testUpdateDocument(array $data): array + public function testUpdateRow(array $data): array { $databaseId = $data['databaseId']; $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ @@ -2403,9 +2797,9 @@ trait DatabasesBase } /** - * @depends testCreateDocument + * @depends testCreateRow */ - public function testDeleteDocument(array $data): array + public function testDeleteRow(array $data): array { $databaseId = $data['databaseId']; $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ @@ -2454,7 +2848,7 @@ trait DatabasesBase return $data; } - public function testInvalidDocumentStructure() + public function testInvalidRowStructure(): void { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -3005,7 +3399,7 @@ trait DatabasesBase } /** - * @depends testDeleteDocument + * @depends testDeleteRow */ public function testDefaultPermissions(array $data): array { @@ -3124,7 +3518,7 @@ trait DatabasesBase return $data; } - public function testEnforceCollectionAndDocumentPermissions(): void + public function testEnforceTableAndRowPermissions(): void { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -3317,7 +3711,7 @@ trait DatabasesBase $this->assertCount(1, $rowsUser2['body']['rows']); } - public function testEnforceCollectionPermissions() + public function testEnforceTablePermissions(): void { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -3610,7 +4004,7 @@ trait DatabasesBase /** * @depends testUniqueIndexDuplicate */ - public function testPersistantCreatedAt(array $data): array + public function testPersistentCreatedAt(array $data): array { $headers = $this->getSide() === 'client' ? array_merge([ 'content-type' => 'application/json', @@ -3789,7 +4183,7 @@ trait DatabasesBase /** * @depends testCreateDatabase */ - public function testAttributeBooleanDefault(array $data): void + public function testColumnBooleanDefault(array $data): void { $databaseId = $data['databaseId']; @@ -4916,4 +5310,211 @@ trait DatabasesBase $this->assertEquals(408, $response['headers']['status-code']); } + + /** + * @throws \Exception + */ + public function testIncrementColumn(): void + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'CounterDatabase' + ]); + $databaseId = $database['body']['$id']; + + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'CounterCollection', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + ], + ]); + $tableId = $collection['body']['$id']; + + // Add integer attribute + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'count', + 'required' => true, + ]); + + \sleep(3); + + // Create document with initial count = 5 + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'count' => 5 + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + ], + ]); + $this->assertEquals(201, $doc['headers']['status-code']); + + $docId = $doc['body']['$id']; + + // Increment by default 1 + $inc = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/tables/$tableId/rows/$docId/count/increment", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ])); + $this->assertEquals(200, $inc['headers']['status-code']); + $this->assertEquals(6, $inc['body']['count']); + + // Verify count = 6 + $get = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/tables/$tableId/rows/$docId", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + $this->assertEquals(6, $get['body']['count']); + + // Increment by custom value 4 + $inc2 = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/tables/$tableId/rows/$docId/count/increment", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]), [ + 'value' => 4 + ]); + $this->assertEquals(200, $inc2['headers']['status-code']); + $this->assertEquals(10, $inc2['body']['count']); + + $get2 = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/tables/$tableId/rows/$docId", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + $this->assertEquals(10, $get2['body']['count']); + + // Test max limit exceeded + $err = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/tables/$tableId/rows/$docId/count/increment", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]), ['max' => 8]); + $this->assertEquals(400, $err['headers']['status-code']); + + // Test attribute not found + $notFound = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/tables/$tableId/rows/$docId/unknown/increment", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ])); + $this->assertEquals(404, $notFound['headers']['status-code']); + } + + public function testDecrementColumn(): void + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'CounterDatabase' + ]); + + $databaseId = $database['body']['$id']; + + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'CounterCollection', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + ], + ]); + + $tableId = $collection['body']['$id']; + + // Add integer attribute + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'count', + 'required' => true, + ]); + + \sleep(2); + + // Create document with initial count = 10 + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => ['count' => 10], + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + ], + ]); + + $rowId = $doc['body']['$id']; + + // Decrement by default 1 (count = 10 -> 9) + $dec = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ])); + $this->assertEquals(200, $dec['headers']['status-code']); + $this->assertEquals(9, $dec['body']['count']); + + $get = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + $this->assertEquals(9, $get['body']['count']); + + // Decrement by custom value 3 (count 9 -> 6) + $dec2 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]), [ + 'value' => 3 + ]); + $this->assertEquals(200, $dec2['headers']['status-code']); + $this->assertEquals(6, $dec2['body']['count']); + + $get2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + $this->assertEquals(6, $get2['body']['count']); + + // Test min limit exceeded + $err = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]), ['min' => 7]); + $this->assertEquals(400, $err['headers']['status-code']); + + // Test type error on non-numeric attribute + $typeErr = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]), ['value' => 'not-a-number']); + $this->assertEquals(400, $typeErr['headers']['status-code']); + } } diff --git a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php index a92f1decf1..e2aebf4969 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php @@ -866,13 +866,13 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($table['body']['indexes'][0]['key'], $index['body']['key']); // Delete attribute - $attribute = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/' . $unneededId, array_merge([ + $column = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/' . $unneededId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertEquals(204, $attribute['headers']['status-code']); + $this->assertEquals(204, $column['headers']['status-code']); sleep(2); @@ -938,7 +938,7 @@ class DatabasesCustomServerTest extends Scope public function testDeleteIndexOnDeleteAttribute($data) { $databaseId = $data['databaseId']; - $attribute1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ + $column1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -948,7 +948,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $attribute2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ + $column2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -958,10 +958,10 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $this->assertEquals(202, $attribute1['headers']['status-code']); - $this->assertEquals(202, $attribute2['headers']['status-code']); - $this->assertEquals('attribute1', $attribute1['body']['key']); - $this->assertEquals('attribute2', $attribute2['body']['key']); + $this->assertEquals(202, $column1['headers']['status-code']); + $this->assertEquals(202, $column2['headers']['status-code']); + $this->assertEquals('attribute1', $column1['body']['key']); + $this->assertEquals('attribute2', $column2['body']['key']); sleep(2); @@ -994,7 +994,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Expected behavior: deleting attribute2 will cause index2 to be dropped, and index1 rebuilt with a single key - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/' . $attribute2['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/' . $column2['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1017,10 +1017,10 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($index1['body']['key'], $table['body']['indexes'][0]['key']); $this->assertIsArray($table['body']['indexes'][0]['columns']); $this->assertCount(1, $table['body']['indexes'][0]['columns']); - $this->assertEquals($attribute1['body']['key'], $table['body']['indexes'][0]['columns'][0]); + $this->assertEquals($column1['body']['key'], $table['body']['indexes'][0]['columns'][0]); // Delete attribute - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/' . $attribute1['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/' . $column1['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1066,7 +1066,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; - $attribute1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $column1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1076,7 +1076,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $attribute2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $column2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1086,10 +1086,10 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $this->assertEquals(202, $attribute1['headers']['status-code']); - $this->assertEquals(202, $attribute2['headers']['status-code']); - $this->assertEquals('attribute1', $attribute1['body']['key']); - $this->assertEquals('attribute2', $attribute2['body']['key']); + $this->assertEquals(202, $column1['headers']['status-code']); + $this->assertEquals(202, $column2['headers']['status-code']); + $this->assertEquals('attribute1', $column1['body']['key']); + $this->assertEquals('attribute2', $column2['body']['key']); sleep(2); @@ -1122,7 +1122,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Expected behavior: deleting attribute1 would cause index1 to be a duplicate of index2 and automatically removed - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $attribute1['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $column1['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1145,10 +1145,10 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($index2['body']['key'], $table['body']['indexes'][0]['key']); $this->assertIsArray($table['body']['indexes'][0]['columns']); $this->assertCount(1, $table['body']['indexes'][0]['columns']); - $this->assertEquals($attribute2['body']['key'], $table['body']['indexes'][0]['columns'][0]); + $this->assertEquals($column2['body']['key'], $table['body']['indexes'][0]['columns'][0]); // Delete attribute - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $attribute2['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $column2['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1336,7 +1336,7 @@ class DatabasesCustomServerTest extends Scope // Add wide string attributes to approach row width limit for ($i = 0; $i < 15; $i++) { - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1346,7 +1346,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $this->assertEquals(202, $attribute['headers']['status-code']); + $this->assertEquals(202, $column['headers']['status-code']); } sleep(5); @@ -1403,7 +1403,7 @@ class DatabasesCustomServerTest extends Scope // add unique attributes for indexing for ($i = 0; $i < 64; $i++) { // $this->assertEquals(true, static::getDatabase()->createAttribute('indexLimit', "test{$i}", Database::VAR_STRING, 16, true)); - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1413,7 +1413,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $this->assertEquals(202, $attribute['headers']['status-code']); + $this->assertEquals(202, $column['headers']['status-code']); } sleep(10); @@ -1431,8 +1431,8 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(64, $table['body']['columns']); $this->assertCount(0, $table['body']['indexes']); - foreach ($table['body']['columns'] as $attribute) { - $this->assertEquals('available', $attribute['status'], 'attribute: ' . $attribute['key']); + foreach ($table['body']['columns'] as $column) { + $this->assertEquals('available', $column['status'], 'attribute: ' . $column['key']); } // Test indexLimit = 64 @@ -1519,7 +1519,7 @@ class DatabasesCustomServerTest extends Scope /** * Create String Attribute */ - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1529,12 +1529,12 @@ class DatabasesCustomServerTest extends Scope 'required' => false ]); - $this->assertEquals(202, $attribute['headers']['status-code']); + $this->assertEquals(202, $column['headers']['status-code']); /** * Create Email Attribute */ - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1543,12 +1543,12 @@ class DatabasesCustomServerTest extends Scope 'required' => false ]); - $this->assertEquals(202, $attribute['headers']['status-code']); + $this->assertEquals(202, $column['headers']['status-code']); /** * Create IP Attribute */ - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1557,12 +1557,12 @@ class DatabasesCustomServerTest extends Scope 'required' => false ]); - $this->assertEquals(202, $attribute['headers']['status-code']); + $this->assertEquals(202, $column['headers']['status-code']); /** * Create URL Attribute */ - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1571,12 +1571,12 @@ class DatabasesCustomServerTest extends Scope 'required' => false ]); - $this->assertEquals(202, $attribute['headers']['status-code']); + $this->assertEquals(202, $column['headers']['status-code']); /** * Create Integer Attribute */ - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1585,12 +1585,12 @@ class DatabasesCustomServerTest extends Scope 'required' => false ]); - $this->assertEquals(202, $attribute['headers']['status-code']); + $this->assertEquals(202, $column['headers']['status-code']); /** * Create Float Attribute */ - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1602,7 +1602,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Boolean Attribute */ - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1614,7 +1614,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Datetime Attribute */ - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1626,7 +1626,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Enum Attribute */ - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1636,7 +1636,7 @@ class DatabasesCustomServerTest extends Scope 'elements' => ['lorem', 'ipsum'] ]); - $this->assertEquals(202, $attribute['headers']['status-code']); + $this->assertEquals(202, $column['headers']['status-code']); sleep(5); @@ -1681,10 +1681,10 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; - $this->assertNotNull($attribute); - $this->assertFalse($attribute['required']); - $this->assertEquals('lorem', $attribute['default']); + $column = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($column); + $this->assertFalse($column['required']); + $this->assertEquals('lorem', $column['default']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', @@ -1823,10 +1823,10 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; - $this->assertNotNull($attribute); - $this->assertFalse($attribute['required']); - $this->assertEquals('torsten@appwrite.io', $attribute['default']); + $column = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($column); + $this->assertFalse($column['required']); + $this->assertEquals('torsten@appwrite.io', $column['default']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ @@ -1966,10 +1966,10 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; - $this->assertNotNull($attribute); - $this->assertFalse($attribute['required']); - $this->assertEquals('127.0.0.1', $attribute['default']); + $column = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($column); + $this->assertFalse($column['required']); + $this->assertEquals('127.0.0.1', $column['default']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2108,10 +2108,10 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; - $this->assertNotNull($attribute); - $this->assertFalse($attribute['required']); - $this->assertEquals('http://appwrite.io', $attribute['default']); + $column = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($column); + $this->assertFalse($column['required']); + $this->assertEquals('http://appwrite.io', $column['default']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2254,12 +2254,12 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; - $this->assertNotNull($attribute); - $this->assertFalse($attribute['required']); - $this->assertEquals(123, $attribute['default']); - $this->assertEquals(0, $attribute['min']); - $this->assertEquals(1000, $attribute['max']); + $column = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($column); + $this->assertFalse($column['required']); + $this->assertEquals(123, $column['default']); + $this->assertEquals(0, $column['min']); + $this->assertEquals(1000, $column['max']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2515,12 +2515,12 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; - $this->assertNotNull($attribute); - $this->assertFalse($attribute['required']); - $this->assertEquals(123.456, $attribute['default']); - $this->assertEquals(0, $attribute['min']); - $this->assertEquals(1000, $attribute['max']); + $column = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($column); + $this->assertFalse($column['required']); + $this->assertEquals(123.456, $column['default']); + $this->assertEquals(0, $column['min']); + $this->assertEquals(1000, $column['max']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2772,10 +2772,10 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; - $this->assertNotNull($attribute); - $this->assertFalse($attribute['required']); - $this->assertEquals(true, $attribute['default']); + $column = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($column); + $this->assertFalse($column['required']); + $this->assertEquals(true, $column['default']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', @@ -2914,10 +2914,10 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; - $this->assertNotNull($attribute); - $this->assertFalse($attribute['required']); - $this->assertEquals('1975-06-12 14:12:55+02:00', $attribute['default']); + $column = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($column); + $this->assertFalse($column['required']); + $this->assertEquals('1975-06-12 14:12:55+02:00', $column['default']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', @@ -3061,14 +3061,14 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $attribute = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; - $this->assertNotNull($attribute); - $this->assertFalse($attribute['required']); - $this->assertEquals('lorem', $attribute['default']); - $this->assertCount(3, $attribute['elements']); - $this->assertContains('lorem', $attribute['elements']); - $this->assertContains('ipsum', $attribute['elements']); - $this->assertContains('dolor', $attribute['elements']); + $column = array_values(array_filter($new['body']['columns'], fn (array $a) => $a['key'] === $key))[0] ?? null; + $this->assertNotNull($column); + $this->assertFalse($column['required']); + $this->assertEquals('lorem', $column['default']); + $this->assertCount(3, $column['elements']); + $this->assertContains('lorem', $column['elements']); + $this->assertContains('ipsum', $column['elements']); + $this->assertContains('dolor', $column['elements']); $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', @@ -3264,7 +3264,7 @@ class DatabasesCustomServerTest extends Scope ); // Test Resize Up - $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3274,8 +3274,8 @@ class DatabasesCustomServerTest extends Scope 'required' => false ]); - $this->assertEquals(200, $attribute['headers']['status-code']); - $this->assertEquals(2048, $attribute['body']['size']); + $this->assertEquals(200, $column['headers']['status-code']); + $this->assertEquals(2048, $column['body']['size']); // Test create new document with new size $newDoc = $this->client->call( @@ -3313,7 +3313,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(2048, strlen($row['body']['string'])); // Test Exception on resize down with data that is too large - $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3323,8 +3323,8 @@ class DatabasesCustomServerTest extends Scope 'required' => false ]); - $this->assertEquals(400, $attribute['headers']['status-code']); - $this->assertEquals(AppwriteException::COLUMN_INVALID_RESIZE, $attribute['body']['type']); + $this->assertEquals(400, $column['headers']['status-code']); + $this->assertEquals(AppwriteException::COLUMN_INVALID_RESIZE, $column['body']['type']); // original documents to original size, remove new document $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ @@ -3350,7 +3350,7 @@ class DatabasesCustomServerTest extends Scope // Test Resize Down - $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3360,8 +3360,8 @@ class DatabasesCustomServerTest extends Scope 'required' => false ]); - $this->assertEquals(200, $attribute['headers']['status-code']); - $this->assertEquals(10, $attribute['body']['size']); + $this->assertEquals(200, $column['headers']['status-code']); + $this->assertEquals(10, $column['body']['size']); // Test create new document with new size $newDoc = $this->client->call( @@ -3611,7 +3611,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $doc3['headers']['status-code']); } - public function createRelationshipCollections() + public function createRelationshipCollections(): void { // Prepare the database with collections and relationships $database = $this->client->call(Client::METHOD_POST, '/databases', [ @@ -3660,7 +3660,7 @@ class DatabasesCustomServerTest extends Scope \sleep(2); } - public function cleanupRelationshipCollection() + public function cleanupRelationshipCollection(): void { $this->client->call(Client::METHOD_DELETE, '/databases/database1', [ 'content-type' => 'application/json', @@ -4110,4 +4110,1043 @@ class DatabasesCustomServerTest extends Scope $this->cleanupRelationshipCollection(); } + + public function testBulkCreate(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Create Perms', + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Bulk Create Perms', + 'rowSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + Permission::update(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + sleep(1); + + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => [ + [ + '$id' => ID::unique(), + 'number' => 1, + ], + [ + '$id' => ID::unique(), + 'number' => 2, + ], + [ + '$id' => ID::unique(), + 'number' => 3, + ], + ], + ]); + + $this->assertEquals(201, $response['headers']['status-code']); + $this->assertCount(3, $response['body']['rows']); + + $response = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(1, $response['body']['rows'][0]['number']); + $this->assertEquals(2, $response['body']['rows'][1]['number']); + $this->assertEquals(3, $response['body']['rows'][2]['number']); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(3, $response['body']['rows']); + + // TEST SUCCESS - $id is auto-assigned if not included in bulk documents + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => [ + [ + 'number' => 1, + ] + ], + ]); + + $this->assertEquals(201, $response['headers']['status-code']); + + // TEST FAIL - Can't use data and document together + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 5 + ], + 'rows' => [ + [ + '$id' => ID::unique(), + 'number' => 1, + ] + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // TEST FAIL - Can't use $rowId and create bulk documents + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'rows' => [ + [ + '$id' => ID::unique(), + 'number' => 1, + ] + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // TEST FAIL - Can't include invalid ID in bulk documents + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => [ + [ + '$id' => '$invalid', + 'number' => 1, + ] + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // TEST FAIL - Can't miss number in bulk documents + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => [ + [ + '$id' => ID::unique(), + 'number' => 1, + ], + [ + '$id' => ID::unique(), + ], + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // TEST FAIL - Can't push more than APP_LIMIT_DATABASE_BATCH documents + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => array_fill(0, APP_LIMIT_DATABASE_BATCH + 1, [ + '$id' => ID::unique(), + 'number' => 1, + ]), + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // TEST FAIL - Can't include invalid permissions in nested documents + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => [ + [ + '$id' => ID::unique(), + '$permissions' => ['invalid'], + 'number' => 1, + ], + ], + ]); + + // TEST FAIL - Can't bulk create in a collection with relationships + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Bulk Related', + 'rowSecurity' => true, + 'permissions' => [], + ]); + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], $this->getHeaders()), [ + 'relatedTableId' => $collection2['body']['$id'], + 'type' => 'manyToOne', + 'twoWay' => true, + 'onDelete' => 'cascade', + 'key' => 'level2', + 'twoWayKey' => 'level1' + ]); + + $this->assertEquals(202, $response['headers']['status-code']); + + sleep(1); + + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => [ + ['$id' => ID::unique(), 'number' => 1,], + ['$id' => ID::unique(), 'number' => 2,], + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + } + + public function testBulkUpdate(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Updates' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Bulk Updates', + 'rowSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + Permission::update(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + // Wait for database worker to create attributes + sleep(2); + + // Create documents + $createBulkDocuments = function ($amount = 10) use ($data) { + $documents = []; + + for ($x = 1; $x <= $amount; $x++) { + $documents[] = [ + '$id' => ID::unique(), + 'number' => $x, + ]; + } + + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => $documents, + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + }; + + $createBulkDocuments(); + + // TEST: Update all documents + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 100, + '$permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(10, $response['body']['rows']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + Query::equal('number', [100])->toString(), + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(10, $documents['body']['total']); + + $returnedDocuments = $response['body']['rows']; + $refetchedDocuments = $documents['body']['rows']; + + $this->assertEquals($returnedDocuments, $refetchedDocuments); + + foreach ($documents['body']['rows'] as $document) { + $this->assertEquals([ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], $document['$permissions']); + $this->assertEquals($collection['body']['$id'], $document['$tableId']); + $this->assertEquals($data['databaseId'], $document['$databaseId']); + $this->assertEquals(100, $document['number']); + } + + // TEST: Check permissions persist + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 200 + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(10, $response['body']['rows']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + Query::equal('number', [200])->toString(), + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(10, $documents['body']['total']); + + foreach ($documents['body']['rows'] as $document) { + $this->assertEquals([ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], $document['$permissions']); + } + + // TEST: Update documents with limit + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 300 + ], + 'queries' => [ + Query::limit(5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(5, $response['body']['rows']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [Query::equal('number', [200])->toString()] + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(5, $documents['body']['total']); + + // TEST: Update documents with offset + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 300 + ], + 'queries' => [ + Query::offset(5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(5, $response['body']['rows']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [Query::equal('number', [300])->toString()] + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(10, $documents['body']['total']); + + // TEST: Update documents with equals filter + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 400 + ], + 'queries' => [ + Query::equal('number', [300])->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(10, $response['body']['rows']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [Query::equal('number', [400])->toString()] + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(10, $documents['body']['total']); + + // TEST: Fail - Can't bulk update in a collection with relationships + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Bulk Related', + 'rowSecurity' => true, + 'permissions' => [], + ]); + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], $this->getHeaders()), [ + 'relatedTableId' => $collection2['body']['$id'], + 'type' => 'manyToOne', + 'twoWay' => true, + 'onDelete' => 'cascade', + 'key' => 'level2', + 'twoWayKey' => 'level1' + ]); + + $this->assertEquals(202, $response['headers']['status-code']); + + sleep(1); + + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 500 + ], + 'queries' => [ + Query::equal('number', [300])->toString(), + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + } + + public function testBulkUpsert(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Upserts' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Bulk Upserts', + 'rowSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + Permission::update(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + // Wait for database worker to create attributes + sleep(2); + + // Create documents + $createBulkDocuments = function ($amount = 10) use ($data) { + $documents = []; + + for ($x = 1; $x <= $amount; $x++) { + $documents[] = [ + '$id' => "$x", + 'number' => $x, + ]; + } + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => $documents, + ]); + + $this->assertEquals(201, $response['headers']['status-code']); + + return $documents; + }; + + $documents = $createBulkDocuments(); + + // Update 1 document + $documents[\array_key_last($documents)]['number'] = 1000; + + // Add 1 document + $documents[] = ['number' => 11]; + + // TEST: Upsert all documents + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => $documents, + ]); + + // Unchanged docs are skipped. 2 documents should be returned, 1 updated and 1 inserted. + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(2, $response['body']['rows']); + $this->assertEquals(1000, $response['body']['rows'][0]['number']); + $this->assertEquals(11, $response['body']['rows'][1]['number']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ])); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + foreach ($documents['body']['rows'] as $index => $document) { + $this->assertEquals($collection['body']['$id'], $document['$tableId']); + $this->assertEquals($data['databaseId'], $document['$databaseId']); + switch ($index) { + case 9: + $this->assertEquals(1000, $document['number']); + break; + default: + $this->assertEquals($index + 1, $document['number']); + } + } + + // TEST: Upsert permissions + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => [ + [ + '$id' => '1', + 'number' => 1000, + ], + [ + '$id' => '10', + '$permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], + 'number' => 10, + ], + ], + ]); + + $this->assertEquals(1000, $response['body']['rows'][0]['number']); + $this->assertEquals([], $response['body']['rows'][0]['$permissions']); + $this->assertEquals([ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], $response['body']['rows'][1]['$permissions']); + + // TEST: Fail - Can't bulk upsert in a collection with relationships + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Bulk Related', + 'rowSecurity' => true, + 'permissions' => [], + ]); + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], $this->getHeaders()), [ + 'relatedTableId' => $collection2['body']['$id'], + 'type' => 'manyToOne', + 'twoWay' => true, + 'onDelete' => 'cascade', + 'key' => 'level2', + 'twoWayKey' => 'level1' + ]); + + $this->assertEquals(202, $response['headers']['status-code']); + + sleep(1); + + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => [ + [ + '$id' => '1', + 'number' => 1000, + ], + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + } + + public function testBulkDelete(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Deletes' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Bulk Deletes', + 'rowSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + // wait for database worker to create attributes + sleep(2); + + // Create documents + $createBulkDocuments = function ($amount = 11) use ($data) { + $documents = []; + + for ($x = 0; $x < $amount; $x++) { + $documents[] = [ + '$id' => ID::unique(), + 'number' => $x, + ]; + } + + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rows' => $documents, + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + }; + + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + // TEST: Delete all documents + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(11, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(0, $documents['body']['total']); + + // TEST: Delete documents with query + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::lessThan('number', 5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(5, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(6, $documents['body']['total']); + + foreach ($documents['body']['rows'] as $document) { + $this->assertGreaterThanOrEqual(5, $document['number']); + } + + // Cleanup + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(6, $response['body']['total']); + + // SUCCESS: Delete documents with query + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::lessThan('number', 5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(5, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(6, $documents['body']['total']); + + // Cleanup + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(6, $response['body']['total']); + + // SUCCESS: Delete Documents with limit query + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::limit(2)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(2, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(9, $documents['body']['total']); + + // Cleanup + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(9, $response['body']['total']); + + // SUCCESS: Delete Documents with offset query + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::offset(5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(6, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(5, $documents['body']['total']); + + $lastDoc = end($documents['body']['rows']); + + $this->assertNotEmpty($lastDoc); + $this->assertEquals(4, $lastDoc['number']); + + // Cleanup + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(5, $response['body']['total']); + + // SUCCESS: Delete 100 documents + $createBulkDocuments(100); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(100, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(100, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(0, $documents['body']['total']); + + // TEST: Fail - Can't bulk delete in a collection with relationships + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Bulk Related', + 'rowSecurity' => true, + 'permissions' => [], + ]); + + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], $this->getHeaders()), [ + 'relatedTableId' => $collection2['body']['$id'], + 'type' => 'manyToOne', + 'twoWay' => true, + 'onDelete' => 'cascade', + 'key' => 'level2', + 'twoWayKey' => 'level1' + ]); + + $this->assertEquals(202, $response['headers']['status-code']); + + sleep(1); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(400, $response['headers']['status-code']); + } } From 58e878653e105c724415d3dd2f04000a46d05f00 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 20:00:53 +0530 Subject: [PATCH 139/362] =?UTF-8?q?fix:=20one=20more=20test=20before=20I?= =?UTF-8?q?=20sign=20out=20=F0=9F=91=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Databases/Http/Databases/Tables/Rows/Create.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index 81d90a7708..5af7fe5dc2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -98,7 +98,7 @@ class Create extends DocumentCreate ) ]) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('rowId', '', new CustomId(), 'Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('rowId', '', new CustomId(), 'Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.', true) ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define columns before creating rows.') ->param('data', [], new JSON(), 'Row data as JSON object.') ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) From 018aad5339e73559ac78e9f2604a135c4bd048af Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 12 Jun 2025 20:03:41 +0530 Subject: [PATCH 140/362] fix: one more test... --- app/controllers/api/databases.php | 0 .../Modules/Databases/Http/Databases/Tables/Rows/Create.php | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 app/controllers/api/databases.php diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index 5af7fe5dc2..881d2b28ed 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -100,7 +100,7 @@ class Create extends DocumentCreate ->param('databaseId', '', new UID(), 'Database ID.') ->param('rowId', '', new CustomId(), 'Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.', true) ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define columns before creating rows.') - ->param('data', [], new JSON(), 'Row data as JSON object.') + ->param('data', [], new JSON(), 'Row data as JSON object.', true) ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('rows', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of documents data as JSON objects.', true, ['plan']) ->inject('response') From 5f8c811f15837f4db680f2813c9fc16997f86672 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 13 Jun 2025 10:08:07 +0530 Subject: [PATCH 141/362] fix: missing context. --- .../Databases/Http/Databases/Tables/Rows/Bulk/Update.php | 3 +++ .../Databases/Http/Databases/Tables/Rows/Column/Decrement.php | 3 +++ .../Databases/Http/Databases/Tables/Rows/Column/Increment.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php index 53e7c3c152..1b9ddb60ab 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Update as DocumentsUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -31,6 +32,8 @@ class Update extends DocumentsUpdate public function __construct() { + $this->setContext(Context::DATABASE_ROWS); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php index 5b2cf17f91..128d578cde 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Column; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Attribute\Decrement as DecrementDocumentAttribute; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -30,6 +31,8 @@ class Decrement extends DecrementDocumentAttribute public function __construct() { + $this->setContext(Context::DATABASE_ROWS); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/:column/decrement') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php index 4dcd05cc25..a3e256d561 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Column; +use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Attribute\Increment as IncrementDocumentAttribute; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -30,6 +31,8 @@ class Increment extends IncrementDocumentAttribute public function __construct() { + $this->setContext(Context::DATABASE_ROWS); + $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/:column/increment') From 44870b9810b3d7c2a63e58d710b099ff3c0f44c0 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 13 Jun 2025 10:26:05 +0530 Subject: [PATCH 142/362] fix: pending tests. --- .github/workflows/tests.yml | 6 +- .../Databases/Tables/DatabasesBase.php | 154 +++++++++--------- .../Tables/DatabasesPermissionsGuestTest.php | 84 +++++----- .../Tables/DatabasesPermissionsMemberTest.php | 10 +- .../Tables/DatabasesPermissionsTeamTest.php | 62 +++---- 5 files changed, 159 insertions(+), 157 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 97f3696e67..cf1e55f7ec 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -145,7 +145,8 @@ jobs: Account, Avatars, Console, - Databases, + Databases/Collections, + Databases/Tables, Functions, FunctionsSchedule, GraphQL, @@ -213,7 +214,8 @@ jobs: Account, Avatars, Console, - Databases, + Databases/Collections, + Databases/Tables, Functions, FunctionsSchedule, GraphQL, diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Tables/DatabasesBase.php index a0b6be2fbe..12426d78b2 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesBase.php @@ -1437,7 +1437,7 @@ trait DatabasesBase ], [ 'key' => 'lengthTestIndex', 'type' => 'key', - 'attributes' => ['title','description'], + 'columns' => ['title','description'], 'lengths' => [128,200] ]); $this->assertEquals(202, $create['headers']['status-code']); @@ -1461,7 +1461,7 @@ trait DatabasesBase ], [ 'key' => 'lengthOverrideTestIndex', 'type' => 'key', - 'attributes' => ['actors'], + 'columns' => ['actors'], 'lengths' => [120] ]); $this->assertEquals(202, $create['headers']['status-code']); @@ -1481,7 +1481,7 @@ trait DatabasesBase ], [ 'key' => 'lengthCountExceededIndex', 'type' => 'key', - 'attributes' => ['title'], + 'columns' => ['title'], 'lengths' => [128, 128] ]); $this->assertEquals(400, $create['headers']['status-code']); @@ -1494,7 +1494,7 @@ trait DatabasesBase ], [ 'key' => 'lengthTooLargeIndex', 'type' => 'key', - 'attributes' => ['title','description','tagline','actors'], + 'columns' => ['title','description','tagline','actors'], 'lengths' => [256,256,256,20] ]); @@ -1508,7 +1508,7 @@ trait DatabasesBase ], [ 'key' => 'negativeLengthIndex', 'type' => 'key', - 'attributes' => ['title'], + 'columns' => ['title'], 'lengths' => [-1] ]); $this->assertEquals(400, $create['headers']['status-code']); @@ -1679,12 +1679,6 @@ trait DatabasesBase $this->assertEquals(400, $row4['headers']['status-code']); - // Delete document 4 with incomplete path - $this->assertEquals(404, $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()))['headers']['status-code']); - return $data; } @@ -1695,7 +1689,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; $rowId = ID::unique(); - $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1710,16 +1704,16 @@ trait DatabasesBase ], ]); - $this->assertEquals(200, $document['headers']['status-code']); - $this->assertCount(3, $document['body']['$permissions']); - $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertCount(3, $row['body']['$permissions']); + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + $this->assertEquals('Thor: Ragnarok', $row['body']['title']); - $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1734,18 +1728,18 @@ trait DatabasesBase ], ]); - $this->assertEquals(200, $document['headers']['status-code']); - $this->assertEquals('Thor: Love and Thunder', $document['body']['title']); + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('Thor: Love and Thunder', $row['body']['title']); - $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals('Thor: Love and Thunder', $document['body']['title']); + $this->assertEquals('Thor: Love and Thunder', $row['body']['title']); // removing permission to read and delete - $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1758,30 +1752,30 @@ trait DatabasesBase ], ]); // shouldn't be able to read as no read permission - $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); switch ($this->getSide()) { case 'client': - $this->assertEquals(404, $document['headers']['status-code']); + $this->assertEquals(404, $row['headers']['status-code']); break; case 'server': - $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals(200, $row['headers']['status-code']); break; } // shouldn't be able to delete as no delete permission - $document = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); // simulating for the client - // the document should not be allowed to be deleted as needed downward + // the row should not be allowed to be deleted as needed downward if ($this->getSide() === 'client') { - $this->assertEquals(401, $document['headers']['status-code']); + $this->assertEquals(401, $row['headers']['status-code']); } // giving the delete permission - $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1795,11 +1789,12 @@ trait DatabasesBase Permission::delete(Role::users()) ], ]); - $document = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + + $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(204, $document['headers']['status-code']); + $this->assertEquals(204, $row['headers']['status-code']); // relationship behaviour $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ @@ -1815,7 +1810,7 @@ trait DatabasesBase Permission::delete(Role::users()), Permission::create(Role::users()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $person['headers']['status-code']); @@ -1833,7 +1828,7 @@ trait DatabasesBase Permission::create(Role::users()), Permission::delete(Role::users()), ], - 'documentSecurity' => true, + 'rowSecurity' => true, ]); $this->assertEquals(201, $library['headers']['status-code']); @@ -1855,7 +1850,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'relatedtableId' => 'library-upsert', + 'relatedTableId' => 'library-upsert', 'type' => Database::RELATION_ONE_TO_ONE, 'key' => 'library', 'twoWay' => true, @@ -1903,7 +1898,7 @@ trait DatabasesBase ]); $this->assertEquals('Library 1', $person1['body']['library']['libraryName']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/documents', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1913,8 +1908,8 @@ trait DatabasesBase ], ]); - $this->assertEquals(1, $documents['body']['total']); - $this->assertEquals('Library 1', $documents['body']['documents'][0]['library']['libraryName']); + $this->assertEquals(1, $rows['body']['total']); + $this->assertEquals('Library 1', $rows['body']['rows'][0]['library']['libraryName']); $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ @@ -1941,7 +1936,7 @@ trait DatabasesBase // data should get updated $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/documents', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1951,9 +1946,8 @@ trait DatabasesBase ], ]); - $this->assertEquals(1, $documents['body']['total']); - $this->assertEquals('Library 2', $documents['body']['documents'][0]['library']['libraryName']); - + $this->assertEquals(1, $rows['body']['total']); + $this->assertEquals('Library 2', $rows['body']['rows'][0]['library']['libraryName']); // data should get added $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.ID::unique(), array_merge([ @@ -1979,7 +1973,8 @@ trait DatabasesBase ]); $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/documents', array_merge([ + + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1987,7 +1982,8 @@ trait DatabasesBase Query::select(['fullName', 'library.*'])->toString() ], ]); - $this->assertEquals(2, $documents['body']['total']); + + $this->assertEquals(2, $rows['body']['total']); } /** @@ -2044,6 +2040,7 @@ trait DatabasesBase 'default' => null, 'required' => false, ]); + // creating a dummy doc with null description $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', @@ -2242,7 +2239,7 @@ trait DatabasesBase $this->assertCount(1, $rows['body']['rows']); /** - * Test after with unknown document. + * Test after with unknown row. */ $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', @@ -3066,6 +3063,7 @@ trait DatabasesBase $this->assertEquals('Minimum value must be lesser than maximum value', $invalidRange['body']['message']); $this->assertEquals('Cannot set default value for array columns', $defaultArray['body']['message']); $this->assertEquals(400, $datetimeDefault['headers']['status-code']); + // wait for worker to add attributes sleep(3); @@ -3073,7 +3071,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], - ]), []); + ])); $this->assertCount(10, $table['body']['columns']); @@ -3387,6 +3385,8 @@ trait DatabasesBase $this->assertEquals(400, $tooHigh['headers']['status-code']); $this->assertEquals(400, $tooLow['headers']['status-code']); $this->assertEquals(400, $badTime['headers']['status-code']); + + // TODO: @itznotabug - database library needs to throw error based on context! $this->assertEquals('Invalid document structure: Attribute "email" has invalid format. Value must be a valid email address', $badEmail['body']['message']); $this->assertEquals('Invalid document structure: Attribute "enum" has invalid format. Value must be one of (yes, no, maybe)', $badEnum['body']['message']); $this->assertEquals('Invalid document structure: Attribute "ip" has invalid format. Value must be a valid IP address', $badIp['body']['message']); @@ -3457,7 +3457,7 @@ trait DatabasesBase $this->assertEquals($row['body']['releaseYear'], 1945); // This differs from the old permissions model because we don't inherit - // existing document permissions on update, unless none were supplied, + // existing row permissions on update, unless none were supplied, // so that specific types can be removed if wanted. $this->assertCount(2, $row['body']['$permissions']); $this->assertEquals([ @@ -3500,7 +3500,7 @@ trait DatabasesBase $this->assertCount(0, $row['body']['$permissions']); $this->assertEquals([], $row['body']['$permissions']); - // Check client side can no longer read the document. + // Check client side can no longer read the row. $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3644,7 +3644,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - // Current user has read permission on the collection so can get any document + // Current user has read permission on the table so can get any row $this->assertEquals(3, $rowsUser1['body']['total']); $this->assertCount(3, $rowsUser1['body']['rows']); @@ -3653,7 +3653,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - // Current user has read permission on the collection so can get any document + // Current user has read permission on the table so can get any row $this->assertEquals(200, $row3GetWithCollectionRead['headers']['status-code']); $email = uniqid() . 'user@localhost.test'; @@ -3686,7 +3686,7 @@ trait DatabasesBase 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, ]); - // Current user has no collection permissions but has read permission for this document + // Current user has no table permissions but has read permission for this row $this->assertEquals(200, $row3GetWithDocumentRead['headers']['status-code']); $row2GetFailure = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row2['body']['$id'], [ @@ -3696,7 +3696,7 @@ trait DatabasesBase 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, ]); - // Current user has no collection or document permissions for this document + // Current user has no table or row permissions for this row $this->assertEquals(404, $row2GetFailure['headers']['status-code']); $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ @@ -3706,7 +3706,7 @@ trait DatabasesBase 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, ]); - // Current user has no collection permissions but has read permission for one document + // Current user has no table permissions but has read permission for one row $this->assertEquals(1, $rowsUser2['body']['total']); $this->assertCount(1, $rowsUser2['body']['rows']); } @@ -3832,7 +3832,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - // Current user has read permission on the collection so can get any document + // Current user has read permission on the table so can get any row $this->assertEquals(3, $rowsUser1['body']['total']); $this->assertCount(3, $rowsUser1['body']['rows']); @@ -3841,7 +3841,7 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - // Current user has read permission on the collection so can get any document + // Current user has read permission on the table so can get any row $this->assertEquals(200, $row3GetWithCollectionRead['headers']['status-code']); $email = uniqid() . 'user2@localhost.test'; @@ -3874,7 +3874,7 @@ trait DatabasesBase 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, ]); - // other2 has no collection permissions and document permissions are disabled + // other2 has no table permissions and row permissions are disabled $this->assertEquals(404, $row3GetWithDocumentRead['headers']['status-code']); $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ @@ -3884,11 +3884,11 @@ trait DatabasesBase 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, ]); - // other2 has no collection permissions and document permissions are disabled + // other2 has no table permissions and row permissions are disabled $this->assertEquals(401, $rowsUser2['headers']['status-code']); - // Enable document permissions - $table = $this->client->call(CLient::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $tableId, [ + // Enable row permissions + $this->client->call(CLient::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $tableId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3904,7 +3904,7 @@ trait DatabasesBase 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session2, ]); - // Current user has no collection permissions read access to one document + // Current user has no table permissions read access to one row $this->assertEquals(1, $rowsUser2['body']['total']); $this->assertCount(1, $rowsUser2['body']['rows']); } @@ -3952,7 +3952,7 @@ trait DatabasesBase $this->assertEquals(409, $duplicate['headers']['status-code']); - // Test for exception when updating document to conflict + // Test for exception when updating row to conflict $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3975,7 +3975,7 @@ trait DatabasesBase $this->assertEquals(201, $row['headers']['status-code']); - // Test for exception when updating document to conflict + // Test for exception when updating row to conflict $duplicate = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4078,7 +4078,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; - // Create collection + // Create table $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4116,7 +4116,7 @@ trait DatabasesBase // wait for database worker to create attributes sleep(2); - // add document + // add row $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4171,7 +4171,7 @@ trait DatabasesBase $this->assertContains(Permission::delete(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); } - // remove collection + // remove table $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $moviesId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4624,7 +4624,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - // Create album collection + // Create album table $albums = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4650,7 +4650,7 @@ trait DatabasesBase 'required' => true, ]); - // Create artist collection + // Create artist table $artists = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4768,7 +4768,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - // Create sports collection + // Create sports table $sports = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4794,7 +4794,7 @@ trait DatabasesBase 'required' => true, ]); - // Create player collection + // Create player table $players = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5326,20 +5326,20 @@ trait DatabasesBase ]); $databaseId = $database['body']['$id']; - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'tableId' => ID::unique(), 'name' => 'CounterCollection', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), ], ]); - $tableId = $collection['body']['$id']; + $tableId = $table['body']['$id']; // Add integer attribute $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ @@ -5353,7 +5353,7 @@ trait DatabasesBase \sleep(3); - // Create document with initial count = 5 + // Create row with initial count = 5 $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5430,21 +5430,21 @@ trait DatabasesBase $databaseId = $database['body']['$id']; - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'tableId' => ID::unique(), 'name' => 'CounterCollection', - 'documentSecurity' => true, + 'rowSecurity' => true, 'permissions' => [ Permission::create(Role::user($this->getUser()['$id'])), Permission::read(Role::user($this->getUser()['$id'])), ], ]); - $tableId = $collection['body']['$id']; + $tableId = $table['body']['$id']; // Add integer attribute $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ @@ -5458,8 +5458,8 @@ trait DatabasesBase \sleep(2); - // Create document with initial count = 10 - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/documents', array_merge([ + // Create row with initial count = 10 + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php index fde6041219..f404cc1bd5 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php @@ -17,7 +17,7 @@ class DatabasesPermissionsGuestTest extends Scope use SideClient; use DatabasesPermissionsScope; - public function createCollection(): array + public function createTable(): array { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -25,10 +25,10 @@ class DatabasesPermissionsGuestTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'databaseId' => ID::unique(), - 'name' => 'InvalidDocumentDatabase', + 'name' => 'InvalidRowDatabase', ]); $this->assertEquals(201, $database['headers']['status-code']); - $this->assertEquals('InvalidDocumentDatabase', $database['body']['name']); + $this->assertEquals('InvalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; $publicMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ @@ -48,15 +48,15 @@ class DatabasesPermissionsGuestTest extends Scope 'rowSecurity' => true, ]); - $publicCollection = ['id' => $publicMovies['body']['$id']]; - $privateCollection = ['id' => $privateMovies['body']['$id']]; + $publicTable = ['id' => $publicMovies['body']['$id']]; + $privateTable = ['id' => $privateMovies['body']['$id']]; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $publicCollection['id'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $publicTable['id'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateCollection['id'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateTable['id'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -66,8 +66,8 @@ class DatabasesPermissionsGuestTest extends Scope return [ 'databaseId' => $databaseId, - 'publicCollectionId' => $publicCollection['id'], - 'privateCollectionId' => $privateCollection['id'], + 'publicTableId' => $publicTable['id'], + 'privateTableId' => $privateTable['id'], ]; } @@ -86,21 +86,21 @@ class DatabasesPermissionsGuestTest extends Scope /** * @dataProvider permissionsProvider */ - public function testReadDocuments($permissions) + public function testReadRows($permissions) { - $data = $this->createCollection(); - $publicCollectionId = $data['publicCollectionId']; - $privateCollectionId = $data['privateCollectionId']; + $data = $this->createTable(); + $publicTableId = $data['publicTableId']; + $privateTableId = $data['privateTableId']; $databaseId = $data['databaseId']; - $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $publicCollectionId . '/rows', $this->getServerHeader(), [ + $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $publicTableId . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], 'permissions' => $permissions, ]); - $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateCollectionId . '/rows', $this->getServerHeader(), [ + $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -114,23 +114,23 @@ class DatabasesPermissionsGuestTest extends Scope $roles = Authorization::getRoles(); Authorization::cleanRoles(); - $publicDocuments = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $publicCollectionId . '/rows', [ + $publicRows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $publicTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); - $privateDocuments = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $privateCollectionId . '/rows', [ + $privateRows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); - $this->assertEquals(1, $publicDocuments['body']['total']); - $this->assertEquals($permissions, $publicDocuments['body']['rows'][0]['$permissions']); + $this->assertEquals(1, $publicRows['body']['total']); + $this->assertEquals($permissions, $publicRows['body']['rows'][0]['$permissions']); if (\in_array(Permission::read(Role::any()), $permissions)) { - $this->assertEquals(1, $privateDocuments['body']['total']); - $this->assertEquals($permissions, $privateDocuments['body']['rows'][0]['$permissions']); + $this->assertEquals(1, $privateRows['body']['total']); + $this->assertEquals($permissions, $privateRows['body']['rows'][0]['$permissions']); } else { - $this->assertEquals(0, $privateDocuments['body']['total']); + $this->assertEquals(0, $privateRows['body']['total']); } foreach ($roles as $role) { @@ -138,17 +138,17 @@ class DatabasesPermissionsGuestTest extends Scope } } - public function testWriteDocument() + public function testWriteRow() { - $data = $this->createCollection(); - $publicCollectionId = $data['publicCollectionId']; - $privateCollectionId = $data['privateCollectionId']; + $data = $this->createTable(); + $publicTableId = $data['publicTableId']; + $privateTableId = $data['privateTableId']; $databaseId = $data['databaseId']; $roles = Authorization::getRoles(); Authorization::cleanRoles(); - $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $publicCollectionId . '/rows', [ + $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $publicTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -158,10 +158,10 @@ class DatabasesPermissionsGuestTest extends Scope ] ]); - $publicDocumentId = $publicResponse['body']['$id']; + $publicRowId = $publicResponse['body']['$id']; $this->assertEquals(201, $publicResponse['headers']['status-code']); - $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateCollectionId . '/rows', [ + $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -173,8 +173,8 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals(401, $privateResponse['headers']['status-code']); - // Create a document in private collection with API key so we can test that update and delete are also not allowed - $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateCollectionId . '/rows', $this->getServerHeader(), [ + // Create a row in private collection with API key so we can test that update and delete are also not allowed + $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -182,9 +182,9 @@ class DatabasesPermissionsGuestTest extends Scope ]); $this->assertEquals(201, $privateResponse['headers']['status-code']); - $privateDocumentId = $privateResponse['body']['$id']; + $privateRowId = $privateResponse['body']['$id']; - $publicDocument = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $publicCollectionId . '/rows/' . $publicDocumentId, [ + $publicRow = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $publicTableId . '/rows/' . $publicRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -193,10 +193,10 @@ class DatabasesPermissionsGuestTest extends Scope ], ]); - $this->assertEquals(200, $publicDocument['headers']['status-code']); - $this->assertEquals('Thor: Ragnarok', $publicDocument['body']['title']); + $this->assertEquals(200, $publicRow['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $publicRow['body']['title']); - $privateDocument = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $privateCollectionId . '/rows/' . $privateDocumentId, [ + $privateRow = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows/' . $privateRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -205,28 +205,28 @@ class DatabasesPermissionsGuestTest extends Scope ], ]); - $this->assertEquals(401, $privateDocument['headers']['status-code']); + $this->assertEquals(401, $privateRow['headers']['status-code']); - $publicDocument = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $publicCollectionId . '/rows/' . $publicDocumentId, [ + $publicRow = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $publicTableId . '/rows/' . $publicRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); - $this->assertEquals(204, $publicDocument['headers']['status-code']); + $this->assertEquals(204, $publicRow['headers']['status-code']); - $privateDocument = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $privateCollectionId . '/rows/' . $privateDocumentId, [ + $privateRow = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows/' . $privateRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); - $this->assertEquals(401, $privateDocument['headers']['status-code']); + $this->assertEquals(401, $privateRow['headers']['status-code']); foreach ($roles as $role) { Authorization::setRole($role); } } - public function testWriteDocumentWithPermissions() + public function testWriteRowWithPermissions() { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php index 32a97aeadf..f1e5c35482 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php @@ -168,7 +168,7 @@ class DatabasesPermissionsMemberTest extends Scope $doconly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), - 'name' => 'Document Only Movies', + 'name' => 'Row Only Movies', 'permissions' => [], 'rowSecurity' => true, ]); @@ -196,7 +196,7 @@ class DatabasesPermissionsMemberTest extends Scope * @dataProvider permissionsProvider * @depends testSetupDatabase */ - public function testReadDocuments($permissions, $anyCount, $usersCount, $docOnlyCount, $data) + public function testReadRows($permissions, $anyCount, $usersCount, $docOnlyCount, $data) { $users = $data['users']; $tables = $data['tables']; @@ -230,7 +230,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); /** - * Check "any" permission collection + * Check "any" permission table */ $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tables['public'] . '/rows', [ 'origin' => 'http://localhost', @@ -243,7 +243,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals($anyCount, $rows['body']['total']); /** - * Check "users" permission collection + * Check "users" permission table */ $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tables['private'] . '/rows', [ 'origin' => 'http://localhost', @@ -256,7 +256,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals($usersCount, $rows['body']['total']); /** - * Check "user:user1" document only permission collection + * Check "user:user1" row only permission table */ $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tables['doconly'] . '/rows', [ 'origin' => 'http://localhost', diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsTeamTest.php b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsTeamTest.php index c62583f76c..406ca79371 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsTeamTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesPermissionsTeamTest.php @@ -36,7 +36,7 @@ class DatabasesPermissionsTeamTest extends Scope ]; } - public function createCollections($teams) + public function createTables($teams) { $db = $this->client->call(Client::METHOD_POST, '/databases', $this->getServerHeader(), [ 'databaseId' => $this->databaseId, @@ -45,8 +45,8 @@ class DatabasesPermissionsTeamTest extends Scope $this->assertEquals(201, $db['headers']['status-code']); $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables', $this->getServerHeader(), [ - 'tableId' => ID::custom('collection1'), - 'name' => 'Collection 1', + 'tableId' => ID::custom('table1'), + 'name' => 'Table 1', 'permissions' => [ Permission::read(Role::team($teams['team1']['$id'])), Permission::create(Role::team($teams['team1']['$id'], 'admin')), @@ -55,17 +55,17 @@ class DatabasesPermissionsTeamTest extends Scope ], ]); - $this->collections['collection1'] = $table1['body']['$id']; + $this->tables['table1'] = $table1['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->collections['collection1'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->tables['table1'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables', $this->getServerHeader(), [ - 'tableId' => ID::custom('collection2'), - 'name' => 'Collection 2', + 'tableId' => ID::custom('table2'), + 'name' => 'Table 2', 'permissions' => [ Permission::read(Role::team($teams['team2']['$id'])), Permission::create(Role::team($teams['team2']['$id'], 'owner')), @@ -74,9 +74,9 @@ class DatabasesPermissionsTeamTest extends Scope ] ]); - $this->collections['collection2'] = $table2['body']['$id']; + $this->tables['table2'] = $table2['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->collections['collection2'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->tables['table2'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -84,22 +84,22 @@ class DatabasesPermissionsTeamTest extends Scope sleep(2); - return $this->collections; + return $this->tables; } /* * $success = can $user read from $table * [$user, $table, $success] */ - public function readDocumentsProvider(): array + public function readRowsProvider(): array { return [ - ['user1', 'collection1', true], - ['user2', 'collection1', false], - ['user3', 'collection1', true], - ['user1', 'collection2', false], - ['user2', 'collection2', true], - ['user3', 'collection2', true], + ['user1', 'table1', true], + ['user2', 'table1', false], + ['user3', 'table1', true], + ['user1', 'table2', false], + ['user2', 'table2', true], + ['user3', 'table2', true], ]; } @@ -107,15 +107,15 @@ class DatabasesPermissionsTeamTest extends Scope * $success = can $user write to $table * [$user, $table, $success] */ - public function writeDocumentsProvider(): array + public function writeRowsProvider(): array { return [ - ['user1', 'collection1', true], - ['user2', 'collection1', false], - ['user3', 'collection1', false], - ['user1', 'collection2', false], - ['user2', 'collection2', true], - ['user3', 'collection2', false], + ['user1', 'table1', true], + ['user2', 'table1', false], + ['user3', 'table1', false], + ['user1', 'table2', false], + ['user2', 'table2', true], + ['user3', 'table2', false], ]; } @@ -138,9 +138,9 @@ class DatabasesPermissionsTeamTest extends Scope $this->addToTeam('user3', 'team1'); $this->addToTeam('user3', 'team2'); - $this->createCollections($this->teams); + $this->createTables($this->teams); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->collections['collection1'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->tables['table1'] . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -148,7 +148,7 @@ class DatabasesPermissionsTeamTest extends Scope ]); $this->assertEquals(201, $response['headers']['status-code']); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->collections['collection2'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->tables['table2'] . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Ipsum', @@ -162,9 +162,9 @@ class DatabasesPermissionsTeamTest extends Scope /** * Data provider params are passed before test dependencies * @depends testSetupDatabase - * @dataProvider readDocumentsProvider + * @dataProvider readRowsProvider */ - public function testReadDocuments($user, $table, $success, $users) + public function testReadRows($user, $table, $success, $users) { $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $this->databaseId . '/tables/' . $table . '/rows', [ 'origin' => 'http://localhost', @@ -182,9 +182,9 @@ class DatabasesPermissionsTeamTest extends Scope /** * @depends testSetupDatabase - * @dataProvider writeDocumentsProvider + * @dataProvider writeRowsProvider */ - public function testWriteDocuments($user, $table, $success, $users) + public function testWriteRows($user, $table, $success, $users) { $rows = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $table . '/rows', [ 'origin' => 'http://localhost', From a13a6a6913d4e098d0cec8e6f353135e434a4bea Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 13 Jun 2025 11:06:51 +0530 Subject: [PATCH 143/362] update: naming convention for table tests. --- .../Tables/DatabasesCustomServerTest.php | 858 +++++++++--------- 1 file changed, 429 insertions(+), 429 deletions(-) diff --git a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php index e2aebf4969..710b167b64 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php @@ -239,7 +239,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); - // This collection already exists + // This database already exists $response = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -325,7 +325,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEquals("", $response['body']); - // Try to get the collection and check if it has been deleted + // Try to get the database and check if it has been deleted $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] @@ -334,7 +334,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(404, $response['headers']['status-code']); } - public function testListCollections(): array + public function testListTables(): array { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -342,10 +342,10 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'databaseId' => ID::unique(), - 'name' => 'invalidDocumentDatabase', + 'name' => 'invalidRowDatabase', ]); $this->assertEquals(201, $database['headers']['status-code']); - $this->assertEquals('invalidDocumentDatabase', $database['body']['name']); + $this->assertEquals('invalidRowDatabase', $database['body']['name']); $this->assertTrue($database['body']['enabled']); $databaseId = $database['body']['$id']; @@ -572,7 +572,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); - // This collection already exists + // This table already exists $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -597,9 +597,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testListCollections + * @depends testListTables */ - public function testGetCollection(array $data): void + public function testGetTable(array $data): void { $databaseId = $data['databaseId']; $tableId = $data['tableId']; @@ -617,9 +617,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testListCollections + * @depends testListTables */ - public function testUpdateCollection(array $data) + public function testUpdateTable(array $data) { $databaseId = $data['databaseId']; $tableId = $data['tableId']; @@ -640,9 +640,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testListCollections + * @depends testListTables */ - public function testCreateEncryptedAttribute(array $data): void + public function testCreateEncryptedColumn(array $data): void { $databaseId = $data['databaseId']; @@ -651,7 +651,7 @@ class DatabasesCustomServerTest extends Scope * Test for SUCCESS */ - // Create collection + // Create table $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -669,10 +669,10 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(201, $actors['headers']['status-code']); - $this->assertEquals($actors['body']['name'], 'Encrypted Actors Data'); + $this->assertEquals('Encrypted Actors Data', $actors['body']['name']); /** - * Test for creating encrypted attributes + * Test for creating encrypted columns */ $columnsPath = '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns'; @@ -700,7 +700,7 @@ class DatabasesCustomServerTest extends Scope /** - * Check status of every attribute + * Check status of every column */ $this->assertEquals(202, $firstName['headers']['status-code']); $this->assertEquals('firstName', $firstName['body']['key']); @@ -710,10 +710,10 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('lastName', $lastName['body']['key']); $this->assertEquals('string', $lastName['body']['type']); - // Wait for database worker to finish creating attributes + // Wait for database worker to finish creating columns sleep(2); - // Creating document to ensure cache is purged on schema change + // Creating row to ensure cache is purged on schema change $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -731,7 +731,7 @@ class DatabasesCustomServerTest extends Scope ], ]); - // Check document to ensure cache is purged on schema change + // Check row to ensure cache is purged on schema change $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -743,7 +743,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('Jameson', $row['body']['lastName']); } - public function testDeleteAttribute(): array + public function testDeleteColumn(): array { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -751,17 +751,17 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'databaseId' => ID::unique(), - 'name' => 'invalidDocumentDatabase', + 'name' => 'invalidRowDatabase', ]); $this->assertEquals(201, $database['headers']['status-code']); - $this->assertEquals('invalidDocumentDatabase', $database['body']['name']); + $this->assertEquals('invalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; /** * Test for SUCCESS */ - // Create collection + // Create table $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -811,10 +811,10 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - // Wait for database worker to finish creating attributes + // Wait for database worker to finish creating columns sleep(2); - // Creating document to ensure cache is purged on schema change + // Creating row to ensure cache is purged on schema change $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -865,7 +865,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(1, $table['body']['indexes']); $this->assertEquals($table['body']['indexes'][0]['key'], $index['body']['key']); - // Delete attribute + // Delete column $column = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/' . $unneededId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -876,7 +876,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); - // Check document to ensure cache is purged on schema change + // Check row to ensure cache is purged on schema change $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -905,7 +905,7 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testDeleteAttribute + * @depends testDeleteColumn */ public function testDeleteIndex($data): array { @@ -935,7 +935,7 @@ class DatabasesCustomServerTest extends Scope /** * @depends testDeleteIndex */ - public function testDeleteIndexOnDeleteAttribute($data) + public function testDeleteIndexOnDeleteColumn($data) { $databaseId = $data['databaseId']; $column1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ @@ -943,7 +943,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'key' => 'attribute1', + 'key' => 'column1', 'size' => 16, 'required' => true, ]); @@ -953,15 +953,15 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'key' => 'attribute2', + 'key' => 'column2', 'size' => 16, 'required' => true, ]); $this->assertEquals(202, $column1['headers']['status-code']); $this->assertEquals(202, $column2['headers']['status-code']); - $this->assertEquals('attribute1', $column1['body']['key']); - $this->assertEquals('attribute2', $column2['body']['key']); + $this->assertEquals('column1', $column1['body']['key']); + $this->assertEquals('column2', $column2['body']['key']); sleep(2); @@ -972,7 +972,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'index1', 'type' => 'key', - 'columns' => ['attribute1', 'attribute2'], + 'columns' => ['column1', 'column2'], 'orders' => ['ASC', 'ASC'], ]); @@ -983,7 +983,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'index2', 'type' => 'key', - 'columns' => ['attribute2'], + 'columns' => ['column2'], ]); $this->assertEquals(202, $index1['headers']['status-code']); @@ -993,7 +993,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); - // Expected behavior: deleting attribute2 will cause index2 to be dropped, and index1 rebuilt with a single key + // Expected behavior: deleting column2 will cause index2 to be dropped, and index1 rebuilt with a single key $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/' . $column2['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1019,7 +1019,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(1, $table['body']['indexes'][0]['columns']); $this->assertEquals($column1['body']['key'], $table['body']['indexes'][0]['columns'][0]); - // Delete attribute + // Delete column $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/' . $column1['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1031,7 +1031,7 @@ class DatabasesCustomServerTest extends Scope return $data; } - public function testCleanupDuplicateIndexOnDeleteAttribute() + public function testCleanupDuplicateIndexOnDeleteColumn() { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -1039,10 +1039,10 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'databaseId' => ID::unique(), - 'name' => 'invalidDocumentDatabase', + 'name' => 'invalidRowDatabase', ]); $this->assertEquals(201, $database['headers']['status-code']); - $this->assertEquals('invalidDocumentDatabase', $database['body']['name']); + $this->assertEquals('invalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ @@ -1051,7 +1051,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'tableId' => ID::unique(), - 'name' => 'TestCleanupDuplicateIndexOnDeleteAttribute', + 'name' => 'TestCleanupDuplicateIndexOnDeleteColumn', 'permissions' => [ Permission::read(Role::any()), Permission::create(Role::any()), @@ -1071,7 +1071,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'key' => 'attribute1', + 'key' => 'column1', 'size' => 16, 'required' => true, ]); @@ -1081,15 +1081,15 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'key' => 'attribute2', + 'key' => 'column2', 'size' => 16, 'required' => true, ]); $this->assertEquals(202, $column1['headers']['status-code']); $this->assertEquals(202, $column2['headers']['status-code']); - $this->assertEquals('attribute1', $column1['body']['key']); - $this->assertEquals('attribute2', $column2['body']['key']); + $this->assertEquals('column1', $column1['body']['key']); + $this->assertEquals('column2', $column2['body']['key']); sleep(2); @@ -1100,7 +1100,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'index1', 'type' => 'key', - 'columns' => ['attribute1', 'attribute2'], + 'columns' => ['column1', 'column2'], 'orders' => ['ASC', 'ASC'], ]); @@ -1111,7 +1111,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'index2', 'type' => 'key', - 'columns' => ['attribute2'], + 'columns' => ['column2'], ]); $this->assertEquals(202, $index1['headers']['status-code']); @@ -1121,7 +1121,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); - // Expected behavior: deleting attribute1 would cause index1 to be a duplicate of index2 and automatically removed + // Expected behavior: deleting column1 would cause index1 to be a duplicate of index2 and automatically removed $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $column1['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1147,7 +1147,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(1, $table['body']['indexes'][0]['columns']); $this->assertEquals($column2['body']['key'], $table['body']['indexes'][0]['columns'][0]); - // Delete attribute + // Delete column $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $column2['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1158,14 +1158,14 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testDeleteIndexOnDeleteAttribute + * @depends testDeleteIndexOnDeleteColumn */ - public function testDeleteCollection($data) + public function testDeleteTable($data) { $databaseId = $data['databaseId']; $tableId = $data['tableId']; - // Add Documents to the collection + // Add Rows to the table $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1207,10 +1207,10 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $row2['headers']['status-code']); $this->assertIsArray($row2['body']['$permissions']); $this->assertCount(3, $row2['body']['$permissions']); - $this->assertEquals($row2['body']['firstName'], 'Samuel'); - $this->assertEquals($row2['body']['lastName'], 'Jackson'); + $this->assertEquals('Samuel', $row2['body']['firstName']); + $this->assertEquals('Jackson', $row2['body']['lastName']); - // Delete the actors collection + // Delete the actors table $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1220,7 +1220,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); $this->assertEquals($response['body'], ""); - // Try to get the collection and check if it has been deleted + // Try to get the table and check if it has been deleted $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] @@ -1232,14 +1232,14 @@ class DatabasesCustomServerTest extends Scope /** * @throws Exception */ - public function testDeleteCollectionDeletesRelatedAttributes(): void + public function testDeleteTableDeletesRelatedColumns(): void { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'databaseId' => ID::unique(), - 'name' => 'TestDeleteCollectionDeletesRelatedAttributes', + 'name' => 'TestDeleteTableDeletesRelatedColumns', ]); $databaseId = $database['body']['$id']; @@ -1250,7 +1250,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'tableId' => ID::unique(), - 'name' => 'Collection1', + 'name' => 'Table1', 'rowSecurity' => false, 'permissions' => [], ]); @@ -1261,7 +1261,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'tableId' => ID::unique(), - 'name' => 'Collection2', + 'name' => 'Table2', 'rowSecurity' => false, 'permissions' => [], ]); @@ -1277,7 +1277,7 @@ class DatabasesCustomServerTest extends Scope 'relatedTableId' => $table2, 'type' => Database::RELATION_MANY_TO_ONE, 'twoWay' => false, - 'key' => 'collection2' + 'key' => 'table2' ]); sleep(2); @@ -1299,7 +1299,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $columns['body']['total']); } - public function testAttributeRowWidthLimit() + public function testColumnRowWidthLimit() { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -1307,10 +1307,10 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'databaseId' => ID::unique(), - 'name' => 'invalidDocumentDatabase', + 'name' => 'invalidRowDatabase', ]); $this->assertEquals(201, $database['headers']['status-code']); - $this->assertEquals('invalidDocumentDatabase', $database['body']['name']); + $this->assertEquals('invalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ @@ -1318,8 +1318,8 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('attributeRowWidthLimit'), - 'name' => 'attributeRowWidthLimit', + 'tableId' => ID::custom('columnRowWidthLimit'), + 'name' => 'columnRowWidthLimit', 'permissions' => [ Permission::read(Role::any()), Permission::create(Role::any()), @@ -1330,18 +1330,18 @@ class DatabasesCustomServerTest extends Scope ]); $this->assertEquals(201, $table['headers']['status-code']); - $this->assertEquals($table['body']['name'], 'attributeRowWidthLimit'); + $this->assertEquals('columnRowWidthLimit', $table['body']['name']); $tableId = $table['body']['$id']; - // Add wide string attributes to approach row width limit + // Add wide string columns to approach row width limit for ($i = 0; $i < 15; $i++) { $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'key' => "attribute{$i}", + 'key' => "column{$i}", 'size' => 1024, 'required' => true, ]); @@ -1373,10 +1373,10 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'databaseId' => ID::unique(), - 'name' => 'invalidDocumentDatabase', + 'name' => 'invalidRowDatabase', ]); $this->assertEquals(201, $database['headers']['status-code']); - $this->assertEquals('invalidDocumentDatabase', $database['body']['name']); + $this->assertEquals('invalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ @@ -1400,15 +1400,15 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; - // add unique attributes for indexing + // add unique columns for indexing for ($i = 0; $i < 64; $i++) { - // $this->assertEquals(true, static::getDatabase()->createAttribute('indexLimit', "test{$i}", Database::VAR_STRING, 16, true)); + // $this->assertEquals(true, static::getDatabase()->createColumn('indexLimit', "test{$i}", Database::VAR_STRING, 16, true)); $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'key' => "attribute{$i}", + 'key' => "column{$i}", 'size' => 64, 'required' => true, ]); @@ -1425,18 +1425,18 @@ class DatabasesCustomServerTest extends Scope ])); $this->assertEquals(200, $table['headers']['status-code']); - $this->assertEquals($table['body']['name'], 'testLimitException'); + $this->assertEquals('testLimitException', $table['body']['name']); $this->assertIsArray($table['body']['columns']); $this->assertIsArray($table['body']['indexes']); $this->assertCount(64, $table['body']['columns']); $this->assertCount(0, $table['body']['indexes']); foreach ($table['body']['columns'] as $column) { - $this->assertEquals('available', $column['status'], 'attribute: ' . $column['key']); + $this->assertEquals('available', $column['status'], 'column: ' . $column['key']); } // Test indexLimit = 64 - // MariaDB, MySQL, and MongoDB create 6 indexes per new collection + // MariaDB, MySQL, and MongoDB create 6 indexes per new table // Add up to the limit, then check if the next index throws IndexLimitException for ($i = 0; $i < 58; $i++) { $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ @@ -1444,13 +1444,13 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'key' => "key_attribute{$i}", + 'key' => "key_column{$i}", 'type' => 'key', - 'columns' => ["attribute{$i}"], + 'columns' => ["column{$i}"], ]); $this->assertEquals(202, $index['headers']['status-code']); - $this->assertEquals("key_attribute{$i}", $index['body']['key']); + $this->assertEquals("key_column{$i}", $index['body']['key']); } sleep(5); @@ -1475,7 +1475,7 @@ class DatabasesCustomServerTest extends Scope ]), [ 'key' => 'tooMany', 'type' => 'key', - 'columns' => ['attribute61'], + 'columns' => ['column61'], ]); $this->assertEquals(400, $tooMany['headers']['status-code']); @@ -1490,7 +1490,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(204, $table['headers']['status-code']); } - public function testAttributeUpdate(): array + public function testColumnUpdate(): array { $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([ 'content-type' => 'application/json', @@ -1498,7 +1498,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'databaseId' => ID::unique(), - 'name' => 'updateAttributes', + 'name' => 'updateColumns', ]); $this->assertEquals(201, $database['headers']['status-code']); @@ -1508,8 +1508,8 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => ID::custom('updateAttributes'), - 'name' => 'updateAttributes' + 'tableId' => ID::custom('updateColumns'), + 'name' => 'updateColumns' ]); $this->assertEquals(201, $table['headers']['status-code']); @@ -1517,7 +1517,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; /** - * Create String Attribute + * Create String Column */ $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', @@ -1532,7 +1532,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(202, $column['headers']['status-code']); /** - * Create Email Attribute + * Create Email Column */ $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email', array_merge([ 'content-type' => 'application/json', @@ -1546,7 +1546,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(202, $column['headers']['status-code']); /** - * Create IP Attribute + * Create IP Column */ $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip', array_merge([ 'content-type' => 'application/json', @@ -1560,7 +1560,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(202, $column['headers']['status-code']); /** - * Create URL Attribute + * Create URL Column */ $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url', array_merge([ 'content-type' => 'application/json', @@ -1574,7 +1574,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(202, $column['headers']['status-code']); /** - * Create Integer Attribute + * Create Integer Column */ $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', @@ -1588,7 +1588,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(202, $column['headers']['status-code']); /** - * Create Float Attribute + * Create Float Column */ $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ 'content-type' => 'application/json', @@ -1600,7 +1600,7 @@ class DatabasesCustomServerTest extends Scope ]); /** - * Create Boolean Attribute + * Create Boolean Column */ $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ 'content-type' => 'application/json', @@ -1612,7 +1612,7 @@ class DatabasesCustomServerTest extends Scope ]); /** - * Create Datetime Attribute + * Create Datetime Column */ $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', @@ -1624,7 +1624,7 @@ class DatabasesCustomServerTest extends Scope ]); /** - * Create Enum Attribute + * Create Enum Column */ $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', @@ -1647,9 +1647,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testAttributeUpdate + * @depends testColumnUpdate */ - public function testAttributeUpdateString(array $data) + public function testColumnUpdateString(array $data) { $key = 'string'; $databaseId = $data['databaseId']; @@ -1789,9 +1789,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testAttributeUpdate + * @depends testColumnUpdate */ - public function testAttributeUpdateEmail(array $data) + public function testColumnUpdateEmail(array $data) { $key = 'email'; $databaseId = $data['databaseId']; @@ -1932,9 +1932,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testAttributeUpdate + * @depends testColumnUpdate */ - public function testAttributeUpdateIp(array $data) + public function testColumnUpdateIp(array $data) { $key = 'ip'; $databaseId = $data['databaseId']; @@ -2074,9 +2074,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testAttributeUpdate + * @depends testColumnUpdate */ - public function testAttributeUpdateUrl(array $data) + public function testColumnUpdateUrl(array $data) { $key = 'url'; $databaseId = $data['databaseId']; @@ -2216,9 +2216,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testAttributeUpdate + * @depends testColumnUpdate */ - public function testAttributeUpdateInteger(array $data) + public function testColumnUpdateInteger(array $data) { $key = 'integer'; $databaseId = $data['databaseId']; @@ -2477,9 +2477,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testAttributeUpdate + * @depends testColumnUpdate */ - public function testAttributeUpdateFloat(array $data) + public function testColumnUpdateFloat(array $data) { $key = 'float'; $databaseId = $data['databaseId']; @@ -2738,9 +2738,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testAttributeUpdate + * @depends testColumnUpdate */ - public function testAttributeUpdateBoolean(array $data) + public function testColumnUpdateBoolean(array $data) { $key = 'boolean'; $databaseId = $data['databaseId']; @@ -2880,9 +2880,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testAttributeUpdate + * @depends testColumnUpdate */ - public function testAttributeUpdateDatetime(array $data) + public function testColumnUpdateDatetime(array $data) { $key = 'datetime'; $databaseId = $data['databaseId']; @@ -3022,9 +3022,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testAttributeUpdate + * @depends testColumnUpdate */ - public function testAttributeUpdateEnum(array $data) + public function testColumnUpdateEnum(array $data) { $key = 'enum'; $databaseId = $data['databaseId']; @@ -3238,9 +3238,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testAttributeUpdate + * @depends testColumnUpdate */ - public function testAttributeUpdateStringResize(array $data) + public function testColumnUpdateStringResize(array $data) { $key = 'string'; $databaseId = $data['databaseId']; @@ -3277,7 +3277,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $column['headers']['status-code']); $this->assertEquals(2048, $column['body']['size']); - // Test create new document with new size + // Test create new row with new size $newDoc = $this->client->call( Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', @@ -3298,7 +3298,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $newDoc['headers']['status-code']); $this->assertEquals(2048, strlen($newDoc['body']['string'])); - // Test update document with new size + // Test update row with new size $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3326,7 +3326,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $column['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_INVALID_RESIZE, $column['body']['type']); - // original documents to original size, remove new document + // original rows to original size, remove new row $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3363,7 +3363,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $column['headers']['status-code']); $this->assertEquals(10, $column['body']['size']); - // Test create new document with new size + // Test create new row with new size $newDoc = $this->client->call( Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', @@ -3384,7 +3384,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $newDoc['headers']['status-code']); $this->assertEquals(10, strlen($newDoc['body']['string'])); - // Test update document with new size + // Test update row with new size $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3398,7 +3398,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $row['headers']['status-code']); $this->assertEquals(10, strlen($row['body']['string'])); - // Try create document with string that is too large + // Try create row with string that is too large $newDoc = $this->client->call( Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', @@ -3421,9 +3421,9 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testAttributeUpdate + * @depends testColumnUpdate */ - public function testAttributeUpdateNotFound(array $data) + public function testColumnUpdateNotFound(array $data) { $databaseId = $data['databaseId']; $tableId = $data['tableId']; @@ -3482,7 +3482,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(AppwriteException::DATABASE_NOT_FOUND, $update['body']['type']); /** - * Check if Collection exists + * Check if Table exists */ $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/i_dont_exist/columns/' . $key . '/unknown_' . $key, array_merge([ 'content-type' => 'application/json', @@ -3494,7 +3494,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(AppwriteException::TABLE_NOT_FOUND, $update['body']['type']); /** - * Check if Attribute exists + * Check if Column exists */ $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ 'content-type' => 'application/json', @@ -3508,15 +3508,15 @@ class DatabasesCustomServerTest extends Scope } /** - * @depends testAttributeUpdate + * @depends testColumnUpdate */ - public function testAttributeRename(array $data) + public function testColumnRename(array $data) { $key = 'string'; $databaseId = $data['databaseId']; $tableId = $data['tableId']; - // Create document to test against + // Create row to test against $row = $this->client->call( Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', @@ -3568,7 +3568,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('string', $doc1['body']['new_string']); $this->assertArrayNotHasKey('string', $doc1['body']); - // Try and create a new document with the new attribute + // Try and create a new row with the new column $doc2 = $this->client->call( Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', @@ -3590,7 +3590,7 @@ class DatabasesCustomServerTest extends Scope $this->assertArrayHasKey('new_string', $doc2['body']); $this->assertEquals('string', $doc2['body']['new_string']); - // Expect fail, try and create a new document with the old attribute + // Expect fail, try and create a new row with the old column $doc3 = $this->client->call( Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', @@ -3611,9 +3611,9 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $doc3['headers']['status-code']); } - public function createRelationshipCollections(): void + public function createRelationshipTables(): void { - // Prepare the database with collections and relationships + // Prepare the database with tables and relationships $database = $this->client->call(Client::METHOD_POST, '/databases', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3630,7 +3630,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => 'collection1', + 'tableId' => 'table1', 'name' => 'level1', 'rowSecurity' => false, 'permissions' => [ @@ -3646,7 +3646,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'tableId' => 'collection2', + 'tableId' => 'table2', 'name' => 'level2', 'rowSecurity' => false, 'permissions' => [ @@ -3660,7 +3660,7 @@ class DatabasesCustomServerTest extends Scope \sleep(2); } - public function cleanupRelationshipCollection(): void + public function cleanupRelationshipTable(): void { $this->client->call(Client::METHOD_DELETE, '/databases/database1', [ 'content-type' => 'application/json', @@ -3671,13 +3671,13 @@ class DatabasesCustomServerTest extends Scope \sleep(2); } - public function testAttributeRenameRelationshipOneToMany() + public function testColumnRenameRelationshipOneToMany() { $databaseId = 'database1'; - $table1Id = 'collection1'; - $table2Id = 'collection2'; + $table1Id = 'table1'; + $table2Id = 'table2'; - $this->createRelationshipCollections(); + $this->createRelationshipTables(); $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ 'content-type' => 'application/json', @@ -3694,20 +3694,20 @@ class DatabasesCustomServerTest extends Scope \sleep(3); - $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $table1RelationAttribute = $table1Attributes['body']['columns'][0]; + $table1RelationColumn = $table1Columns['body']['columns'][0]; - $this->assertEquals($relation['body']['side'], $table1RelationAttribute['side']); - $this->assertEquals($relation['body']['twoWayKey'], $table1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedTable'], $table1RelationAttribute['relatedTable']); + $this->assertEquals($relation['body']['side'], $table1RelationColumn['side']); + $this->assertEquals($relation['body']['twoWayKey'], $table1RelationColumn['twoWayKey']); + $this->assertEquals($relation['body']['relatedTable'], $table1RelationColumn['relatedTable']); - // Create a document for checking later - $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ + // Create a row for checking later + $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3722,9 +3722,9 @@ class DatabasesCustomServerTest extends Scope "permissions" => ["read(\"any\")"] ]); - $this->assertEquals(201, $originalDocument['headers']['status-code']); + $this->assertEquals(201, $originalRow['headers']['status-code']); - // Rename the attribute + // Rename the column $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3735,59 +3735,59 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - // Check the document's key has been renamed - $newDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalDocument['body']['$id'], array_merge([ + // Check the row's key has been renamed + $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertArrayHasKey('new_level_2', $newDocument['body']); - $this->assertEquals(1, count($newDocument['body']['new_level_2'])); - $this->assertArrayNotHasKey('level2', $newDocument['body']); + $this->assertArrayHasKey('new_level_2', $newRow['body']); + $this->assertEquals(1, count($newRow['body']['new_level_2'])); + $this->assertArrayNotHasKey('level2', $newRow['body']); - // Check level2 document has been renamed - $level2Document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newDocument['body']['new_level_2'][0]['$id'], array_merge([ + // Check level2 row has been renamed + $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2'][0]['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertArrayHasKey('level1', $level2Document['body']); - $this->assertNotEmpty($level2Document['body']['level1']); + $this->assertArrayHasKey('level1', $level2Row['body']); + $this->assertNotEmpty($level2Row['body']['level1']); - // Check if attribute was renamed on the parent's side - $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + // Check if column was renamed on the parent's side + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $this->assertEquals(200, $table1Attributes['headers']['status-code']); - $this->assertEquals(1, count($table1Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $table1Attributes['body']['columns'][0]['key']); + $this->assertEquals(200, $table1Columns['headers']['status-code']); + $this->assertEquals(1, count($table1Columns['body']['columns'])); + $this->assertEquals('new_level_2', $table1Columns['body']['columns'][0]['key']); - // Check if attribute was renamed on the child's side - $table2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ + // Check if column was renamed on the child's side + $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $this->assertEquals(200, $table2Attributes['headers']['status-code']); - $this->assertEquals(1, count($table2Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $table2Attributes['body']['columns'][0]['twoWayKey']); + $this->assertEquals(200, $table2Columns['headers']['status-code']); + $this->assertEquals(1, count($table2Columns['body']['columns'])); + $this->assertEquals('new_level_2', $table2Columns['body']['columns'][0]['twoWayKey']); - $this->cleanupRelationshipCollection(); + $this->cleanupRelationshipTable(); } - public function testAttributeRenameRelationshipOneToOne() + public function testColumnRenameRelationshipOneToOne() { $databaseId = 'database1'; - $table1Id = 'collection1'; - $table2Id = 'collection2'; + $table1Id = 'table1'; + $table2Id = 'table2'; - $this->createRelationshipCollections(); + $this->createRelationshipTables(); $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ 'content-type' => 'application/json', @@ -3804,20 +3804,20 @@ class DatabasesCustomServerTest extends Scope \sleep(3); - $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $table1RelationAttribute = $table1Attributes['body']['columns'][0]; + $table1RelationColumn = $table1Columns['body']['columns'][0]; - $this->assertEquals($relation['body']['side'], $table1RelationAttribute['side']); - $this->assertEquals($relation['body']['twoWayKey'], $table1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedTable'], $table1RelationAttribute['relatedTable']); + $this->assertEquals($relation['body']['side'], $table1RelationColumn['side']); + $this->assertEquals($relation['body']['twoWayKey'], $table1RelationColumn['twoWayKey']); + $this->assertEquals($relation['body']['relatedTable'], $table1RelationColumn['relatedTable']); - // Create a document for checking later - $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ + // Create a row for checking later + $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3832,9 +3832,9 @@ class DatabasesCustomServerTest extends Scope "permissions" => ["read(\"any\")"] ]); - $this->assertEquals(201, $originalDocument['headers']['status-code']); + $this->assertEquals(201, $originalRow['headers']['status-code']); - // Rename the attribute + // Rename the column $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3845,59 +3845,59 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - // Check the document's key has been renamed - $newDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalDocument['body']['$id'], array_merge([ + // Check the row's key has been renamed + $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertArrayHasKey('new_level_2', $newDocument['body']); - $this->assertNotEmpty($newDocument['body']['new_level_2']); - $this->assertArrayNotHasKey('level2', $newDocument['body']); + $this->assertArrayHasKey('new_level_2', $newRow['body']); + $this->assertNotEmpty($newRow['body']['new_level_2']); + $this->assertArrayNotHasKey('level2', $newRow['body']); - // Check level2 document has been renamed - $level2Document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newDocument['body']['new_level_2']['$id'], array_merge([ + // Check level2 row has been renamed + $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertArrayHasKey('level1', $level2Document['body']); - $this->assertNotEmpty($level2Document['body']['level1']); + $this->assertArrayHasKey('level1', $level2Row['body']); + $this->assertNotEmpty($level2Row['body']['level1']); - // Check if attribute was renamed on the parent's side - $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + // Check if column was renamed on the parent's side + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $this->assertEquals(200, $table1Attributes['headers']['status-code']); - $this->assertEquals(1, count($table1Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $table1Attributes['body']['columns'][0]['key']); + $this->assertEquals(200, $table1Columns['headers']['status-code']); + $this->assertEquals(1, count($table1Columns['body']['columns'])); + $this->assertEquals('new_level_2', $table1Columns['body']['columns'][0]['key']); - // Check if attribute was renamed on the child's side - $table2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ + // Check if column was renamed on the child's side + $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $this->assertEquals(200, $table2Attributes['headers']['status-code']); - $this->assertEquals(1, count($table2Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $table2Attributes['body']['columns'][0]['twoWayKey']); + $this->assertEquals(200, $table2Columns['headers']['status-code']); + $this->assertEquals(1, count($table2Columns['body']['columns'])); + $this->assertEquals('new_level_2', $table2Columns['body']['columns'][0]['twoWayKey']); - $this->cleanupRelationshipCollection(); + $this->cleanupRelationshipTable(); } - public function testAttributeRenameRelationshipManyToOne() + public function testColumnRenameRelationshipManyToOne() { $databaseId = 'database1'; - $table1Id = 'collection1'; - $table2Id = 'collection2'; + $table1Id = 'table1'; + $table2Id = 'table2'; - $this->createRelationshipCollections(); + $this->createRelationshipTables(); $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ 'content-type' => 'application/json', @@ -3914,20 +3914,20 @@ class DatabasesCustomServerTest extends Scope \sleep(3); - $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $table1RelationAttribute = $table1Attributes['body']['columns'][0]; + $table1RelationColumn = $table1Columns['body']['columns'][0]; - $this->assertEquals($relation['body']['side'], $table1RelationAttribute['side']); - $this->assertEquals($relation['body']['twoWayKey'], $table1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedTable'], $table1RelationAttribute['relatedTable']); + $this->assertEquals($relation['body']['side'], $table1RelationColumn['side']); + $this->assertEquals($relation['body']['twoWayKey'], $table1RelationColumn['twoWayKey']); + $this->assertEquals($relation['body']['relatedTable'], $table1RelationColumn['relatedTable']); - // Create a document for checking later - $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ + // Create a row for checking later + $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3942,9 +3942,9 @@ class DatabasesCustomServerTest extends Scope "permissions" => ["read(\"any\")"] ]); - $this->assertEquals(201, $originalDocument['headers']['status-code']); + $this->assertEquals(201, $originalRow['headers']['status-code']); - // Rename the attribute + // Rename the column $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3955,59 +3955,59 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - // Check the document's key has been renamed - $newDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalDocument['body']['$id'], array_merge([ + // Check the row's key has been renamed + $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertArrayHasKey('new_level_2', $newDocument['body']); - $this->assertNotEmpty($newDocument['body']['new_level_2']); - $this->assertArrayNotHasKey('level2', $newDocument['body']); + $this->assertArrayHasKey('new_level_2', $newRow['body']); + $this->assertNotEmpty($newRow['body']['new_level_2']); + $this->assertArrayNotHasKey('level2', $newRow['body']); - // Check level2 document has been renamed - $level2Document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newDocument['body']['new_level_2']['$id'], array_merge([ + // Check level2 row has been renamed + $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertArrayHasKey('level1', $level2Document['body']); - $this->assertNotEmpty($level2Document['body']['level1']); + $this->assertArrayHasKey('level1', $level2Row['body']); + $this->assertNotEmpty($level2Row['body']['level1']); - // Check if attribute was renamed on the parent's side - $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + // Check if column was renamed on the parent's side + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $this->assertEquals(200, $table1Attributes['headers']['status-code']); - $this->assertEquals(1, count($table1Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $table1Attributes['body']['columns'][0]['key']); + $this->assertEquals(200, $table1Columns['headers']['status-code']); + $this->assertEquals(1, count($table1Columns['body']['columns'])); + $this->assertEquals('new_level_2', $table1Columns['body']['columns'][0]['key']); - // Check if attribute was renamed on the child's side - $table2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ + // Check if column was renamed on the child's side + $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $this->assertEquals(200, $table2Attributes['headers']['status-code']); - $this->assertEquals(1, count($table2Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $table2Attributes['body']['columns'][0]['twoWayKey']); + $this->assertEquals(200, $table2Columns['headers']['status-code']); + $this->assertEquals(1, count($table2Columns['body']['columns'])); + $this->assertEquals('new_level_2', $table2Columns['body']['columns'][0]['twoWayKey']); - $this->cleanupRelationshipCollection(); + $this->cleanupRelationshipTable(); } - public function testAttributeRenameRelationshipManyToMany() + public function testColumnRenameRelationshipManyToMany() { $databaseId = 'database1'; - $table1Id = 'collection1'; - $table2Id = 'collection2'; + $table1Id = 'table1'; + $table2Id = 'table2'; - $this->createRelationshipCollections(); + $this->createRelationshipTables(); $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ 'content-type' => 'application/json', @@ -4024,20 +4024,20 @@ class DatabasesCustomServerTest extends Scope \sleep(3); - $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $table1RelationAttribute = $table1Attributes['body']['columns'][0]; + $table1RelationColumn = $table1Columns['body']['columns'][0]; - $this->assertEquals($relation['body']['side'], $table1RelationAttribute['side']); - $this->assertEquals($relation['body']['twoWayKey'], $table1RelationAttribute['twoWayKey']); - $this->assertEquals($relation['body']['relatedTable'], $table1RelationAttribute['relatedTable']); + $this->assertEquals($relation['body']['side'], $table1RelationColumn['side']); + $this->assertEquals($relation['body']['twoWayKey'], $table1RelationColumn['twoWayKey']); + $this->assertEquals($relation['body']['relatedTable'], $table1RelationColumn['relatedTable']); - // Create a document for checking later - $originalDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ + // Create a row for checking later + $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4052,9 +4052,9 @@ class DatabasesCustomServerTest extends Scope "permissions" => ["read(\"any\")"] ]); - $this->assertEquals(201, $originalDocument['headers']['status-code']); + $this->assertEquals(201, $originalRow['headers']['status-code']); - // Rename the attribute + // Rename the column $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4065,50 +4065,50 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - // Check the document's key has been renamed - $newDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalDocument['body']['$id'], array_merge([ + // Check the row's key has been renamed + $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertArrayHasKey('new_level_2', $newDocument['body']); - $this->assertNotEmpty($newDocument['body']['new_level_2']); - $this->assertArrayNotHasKey('level2', $newDocument['body']); + $this->assertArrayHasKey('new_level_2', $newRow['body']); + $this->assertNotEmpty($newRow['body']['new_level_2']); + $this->assertArrayNotHasKey('level2', $newRow['body']); - // Check level2 document has been renamed - $level2Document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newDocument['body']['new_level_2']['$id'], array_merge([ + // Check level2 row has been renamed + $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ])); - $this->assertArrayHasKey('level1', $level2Document['body']); - $this->assertNotEmpty($level2Document['body']['level1']); + $this->assertArrayHasKey('level1', $level2Row['body']); + $this->assertNotEmpty($level2Row['body']['level1']); - // Check if attribute was renamed on the parent's side - $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + // Check if column was renamed on the parent's side + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $this->assertEquals(200, $table1Attributes['headers']['status-code']); - $this->assertEquals(1, count($table1Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $table1Attributes['body']['columns'][0]['key']); + $this->assertEquals(200, $table1Columns['headers']['status-code']); + $this->assertEquals(1, count($table1Columns['body']['columns'])); + $this->assertEquals('new_level_2', $table1Columns['body']['columns'][0]['key']); - // Check if attribute was renamed on the child's side - $table2Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ + // Check if column was renamed on the child's side + $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]); - $this->assertEquals(200, $table2Attributes['headers']['status-code']); - $this->assertEquals(1, count($table2Attributes['body']['columns'])); - $this->assertEquals('new_level_2', $table2Attributes['body']['columns'][0]['twoWayKey']); + $this->assertEquals(200, $table2Columns['headers']['status-code']); + $this->assertEquals(1, count($table2Columns['body']['columns'])); + $this->assertEquals('new_level_2', $table2Columns['body']['columns'][0]['twoWayKey']); - $this->cleanupRelationshipCollection(); + $this->cleanupRelationshipTable(); } public function testBulkCreate(): void @@ -4127,7 +4127,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4143,15 +4143,15 @@ class DatabasesCustomServerTest extends Scope ], ]); - $this->assertEquals(201, $collection['headers']['status-code']); + $this->assertEquals(201, $table['headers']['status-code']); $data = [ - '$id' => $collection['body']['$id'], - 'databaseId' => $collection['body']['databaseId'] + '$id' => $table['body']['$id'], + 'databaseId' => $table['body']['databaseId'] ]; - // Await attribute - $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + // Await column + $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4160,7 +4160,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $this->assertEquals(202, $numberAttribute['headers']['status-code']); + $this->assertEquals(202, $numberColumn['headers']['status-code']); sleep(1); @@ -4199,7 +4199,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(3, $response['body']['rows']); - // TEST SUCCESS - $id is auto-assigned if not included in bulk documents + // TEST SUCCESS - $id is auto-assigned if not included in bulk rows $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4213,7 +4213,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); - // TEST FAIL - Can't use data and document together + // TEST FAIL - Can't use data and row together $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4231,7 +4231,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); - // TEST FAIL - Can't use $rowId and create bulk documents + // TEST FAIL - Can't use $rowId and create bulk rows $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4247,7 +4247,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); - // TEST FAIL - Can't include invalid ID in bulk documents + // TEST FAIL - Can't include invalid ID in bulk rows $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4262,7 +4262,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); - // TEST FAIL - Can't miss number in bulk documents + // TEST FAIL - Can't miss number in bulk rows $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4280,7 +4280,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); - // TEST FAIL - Can't push more than APP_LIMIT_DATABASE_BATCH documents + // TEST FAIL - Can't push more than APP_LIMIT_DATABASE_BATCH rows $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4293,7 +4293,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); - // TEST FAIL - Can't include invalid permissions in nested documents + // TEST FAIL - Can't include invalid permissions in nested rows $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4307,8 +4307,8 @@ class DatabasesCustomServerTest extends Scope ], ]); - // TEST FAIL - Can't bulk create in a collection with relationships - $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + // TEST FAIL - Can't bulk create in a table with relationships + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4324,7 +4324,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ], $this->getHeaders()), [ - 'relatedTableId' => $collection2['body']['$id'], + 'relatedTableId' => $table2['body']['$id'], 'type' => 'manyToOne', 'twoWay' => true, 'onDelete' => 'cascade', @@ -4365,7 +4365,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4381,15 +4381,15 @@ class DatabasesCustomServerTest extends Scope ], ]); - $this->assertEquals(201, $collection['headers']['status-code']); + $this->assertEquals(201, $table['headers']['status-code']); $data = [ - '$id' => $collection['body']['$id'], - 'databaseId' => $collection['body']['databaseId'] + '$id' => $table['body']['$id'], + 'databaseId' => $table['body']['databaseId'] ]; - // Await attribute - $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + // Await column + $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4398,17 +4398,17 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $this->assertEquals(202, $numberAttribute['headers']['status-code']); + $this->assertEquals(202, $numberColumn['headers']['status-code']); - // Wait for database worker to create attributes + // Wait for database worker to create columns sleep(2); - // Create documents - $createBulkDocuments = function ($amount = 10) use ($data) { - $documents = []; + // Create rows + $createBulkRows = function ($amount = 10) use ($data) { + $rows = []; for ($x = 1; $x <= $amount; $x++) { - $documents[] = [ + $rows[] = [ '$id' => ID::unique(), 'number' => $x, ]; @@ -4418,15 +4418,15 @@ class DatabasesCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rows' => $documents, + 'rows' => $rows, ]); $this->assertEquals(201, $doc['headers']['status-code']); }; - $createBulkDocuments(); + $createBulkRows(); - // TEST: Update all documents + // TEST: Update all rows $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4444,30 +4444,30 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(10, $response['body']['rows']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ Query::equal('number', [100])->toString(), ]); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(10, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(10, $rows['body']['total']); - $returnedDocuments = $response['body']['rows']; - $refetchedDocuments = $documents['body']['rows']; + $returnedRows = $response['body']['rows']; + $refetchedRows = $rows['body']['rows']; - $this->assertEquals($returnedDocuments, $refetchedDocuments); + $this->assertEquals($returnedRows, $refetchedRows); - foreach ($documents['body']['rows'] as $document) { + foreach ($rows['body']['rows'] as $row) { $this->assertEquals([ Permission::read(Role::user($this->getUser()['$id'])), Permission::update(Role::user($this->getUser()['$id'])), Permission::delete(Role::user($this->getUser()['$id'])), - ], $document['$permissions']); - $this->assertEquals($collection['body']['$id'], $document['$tableId']); - $this->assertEquals($data['databaseId'], $document['$databaseId']); - $this->assertEquals(100, $document['number']); + ], $row['$permissions']); + $this->assertEquals($table['body']['$id'], $row['$tableId']); + $this->assertEquals($data['databaseId'], $row['$databaseId']); + $this->assertEquals(100, $row['number']); } // TEST: Check permissions persist @@ -4483,25 +4483,25 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(10, $response['body']['rows']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ Query::equal('number', [200])->toString(), ]); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(10, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(10, $rows['body']['total']); - foreach ($documents['body']['rows'] as $document) { + foreach ($rows['body']['rows'] as $row) { $this->assertEquals([ Permission::read(Role::user($this->getUser()['$id'])), Permission::update(Role::user($this->getUser()['$id'])), Permission::delete(Role::user($this->getUser()['$id'])), - ], $document['$permissions']); + ], $row['$permissions']); } - // TEST: Update documents with limit + // TEST: Update rows with limit $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4517,17 +4517,17 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(5, $response['body']['rows']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [Query::equal('number', [200])->toString()] ]); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(5, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(5, $rows['body']['total']); - // TEST: Update documents with offset + // TEST: Update rows with offset $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4543,17 +4543,17 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(5, $response['body']['rows']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [Query::equal('number', [300])->toString()] ]); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(10, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(10, $rows['body']['total']); - // TEST: Update documents with equals filter + // TEST: Update rows with equals filter $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4569,18 +4569,18 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(10, $response['body']['rows']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [Query::equal('number', [400])->toString()] ]); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(10, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(10, $rows['body']['total']); - // TEST: Fail - Can't bulk update in a collection with relationships - $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + // TEST: Fail - Can't bulk update in a table with relationships + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4596,7 +4596,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ], $this->getHeaders()), [ - 'relatedTableId' => $collection2['body']['$id'], + 'relatedTableId' => $table2['body']['$id'], 'type' => 'manyToOne', 'twoWay' => true, 'onDelete' => 'cascade', @@ -4639,7 +4639,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4655,15 +4655,15 @@ class DatabasesCustomServerTest extends Scope ], ]); - $this->assertEquals(201, $collection['headers']['status-code']); + $this->assertEquals(201, $table['headers']['status-code']); $data = [ - '$id' => $collection['body']['$id'], - 'databaseId' => $collection['body']['databaseId'] + '$id' => $table['body']['$id'], + 'databaseId' => $table['body']['databaseId'] ]; - // Await attribute - $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + // Await column + $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4672,17 +4672,17 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $this->assertEquals(202, $numberAttribute['headers']['status-code']); + $this->assertEquals(202, $numberColumn['headers']['status-code']); - // Wait for database worker to create attributes + // Wait for database worker to create columns sleep(2); - // Create documents - $createBulkDocuments = function ($amount = 10) use ($data) { - $documents = []; + // Create rows + $createBulkRows = function ($amount = 10) use ($data) { + $rows = []; for ($x = 1; $x <= $amount; $x++) { - $documents[] = [ + $rows[] = [ '$id' => "$x", 'number' => $x, ]; @@ -4692,53 +4692,53 @@ class DatabasesCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rows' => $documents, + 'rows' => $rows, ]); $this->assertEquals(201, $response['headers']['status-code']); - return $documents; + return $rows; }; - $documents = $createBulkDocuments(); + $rows = $createBulkRows(); - // Update 1 document - $documents[\array_key_last($documents)]['number'] = 1000; + // Update 1 row + $rows[\array_key_last($rows)]['number'] = 1000; - // Add 1 document - $documents[] = ['number' => 11]; + // Add 1 row + $rows[] = ['number' => 11]; - // TEST: Upsert all documents + // TEST: Upsert all rows $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rows' => $documents, + 'rows' => $rows, ]); - // Unchanged docs are skipped. 2 documents should be returned, 1 updated and 1 inserted. + // Unchanged docs are skipped. 2 rows should be returned, 1 updated and 1 inserted. $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(2, $response['body']['rows']); $this->assertEquals(1000, $response['body']['rows'][0]['number']); $this->assertEquals(11, $response['body']['rows'][1]['number']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(11, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(11, $rows['body']['total']); - foreach ($documents['body']['rows'] as $index => $document) { - $this->assertEquals($collection['body']['$id'], $document['$tableId']); - $this->assertEquals($data['databaseId'], $document['$databaseId']); + foreach ($rows['body']['rows'] as $index => $row) { + $this->assertEquals($table['body']['$id'], $row['$tableId']); + $this->assertEquals($data['databaseId'], $row['$databaseId']); switch ($index) { case 9: - $this->assertEquals(1000, $document['number']); + $this->assertEquals(1000, $row['number']); break; default: - $this->assertEquals($index + 1, $document['number']); + $this->assertEquals($index + 1, $row['number']); } } @@ -4772,8 +4772,8 @@ class DatabasesCustomServerTest extends Scope Permission::delete(Role::user($this->getUser()['$id'])), ], $response['body']['rows'][1]['$permissions']); - // TEST: Fail - Can't bulk upsert in a collection with relationships - $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + // TEST: Fail - Can't bulk upsert in a table with relationships + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4789,7 +4789,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ], $this->getHeaders()), [ - 'relatedTableId' => $collection2['body']['$id'], + 'relatedTableId' => $table2['body']['$id'], 'type' => 'manyToOne', 'twoWay' => true, 'onDelete' => 'cascade', @@ -4832,7 +4832,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4847,15 +4847,15 @@ class DatabasesCustomServerTest extends Scope ], ]); - $this->assertEquals(201, $collection['headers']['status-code']); + $this->assertEquals(201, $table['headers']['status-code']); $data = [ - '$id' => $collection['body']['$id'], - 'databaseId' => $collection['body']['databaseId'] + '$id' => $table['body']['$id'], + 'databaseId' => $table['body']['databaseId'] ]; - // Await attribute - $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + // Await column + $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4864,17 +4864,17 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $this->assertEquals(202, $numberAttribute['headers']['status-code']); + $this->assertEquals(202, $numberColumn['headers']['status-code']); - // wait for database worker to create attributes + // wait for database worker to create columns sleep(2); - // Create documents - $createBulkDocuments = function ($amount = 11) use ($data) { - $documents = []; + // Create rows + $createBulkRows = function ($amount = 11) use ($data) { + $rows = []; for ($x = 0; $x < $amount; $x++) { - $documents[] = [ + $rows[] = [ '$id' => ID::unique(), 'number' => $x, ]; @@ -4884,23 +4884,23 @@ class DatabasesCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'rows' => $documents, + 'rows' => $rows, ]); $this->assertEquals(201, $doc['headers']['status-code']); }; - $createBulkDocuments(); + $createBulkRows(); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(11, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(11, $rows['body']['total']); - // TEST: Delete all documents + // TEST: Delete all rows $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4909,24 +4909,24 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(11, $response['body']['total']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(0, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(0, $rows['body']['total']); - // TEST: Delete documents with query - $createBulkDocuments(); + // TEST: Delete rows with query + $createBulkRows(); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(11, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(11, $rows['body']['total']); $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', @@ -4940,16 +4940,16 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(5, $response['body']['total']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(6, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(6, $rows['body']['total']); - foreach ($documents['body']['rows'] as $document) { - $this->assertGreaterThanOrEqual(5, $document['number']); + foreach ($rows['body']['rows'] as $row) { + $this->assertGreaterThanOrEqual(5, $row['number']); } // Cleanup @@ -4961,16 +4961,16 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(6, $response['body']['total']); - // SUCCESS: Delete documents with query - $createBulkDocuments(); + // SUCCESS: Delete rows with query + $createBulkRows(); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(11, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(11, $rows['body']['total']); $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', @@ -4984,13 +4984,13 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(5, $response['body']['total']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(6, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(6, $rows['body']['total']); // Cleanup $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ @@ -5001,16 +5001,16 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(6, $response['body']['total']); - // SUCCESS: Delete Documents with limit query - $createBulkDocuments(); + // SUCCESS: Delete Rows with limit query + $createBulkRows(); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(11, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(11, $rows['body']['total']); $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', @@ -5024,13 +5024,13 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(2, $response['body']['total']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(9, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(9, $rows['body']['total']); // Cleanup $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ @@ -5041,16 +5041,16 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(9, $response['body']['total']); - // SUCCESS: Delete Documents with offset query - $createBulkDocuments(); + // SUCCESS: Delete Rows with offset query + $createBulkRows(); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(11, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(11, $rows['body']['total']); $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', @@ -5064,15 +5064,15 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(6, $response['body']['total']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(5, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(5, $rows['body']['total']); - $lastDoc = end($documents['body']['rows']); + $lastDoc = end($rows['body']['rows']); $this->assertNotEmpty($lastDoc); $this->assertEquals(4, $lastDoc['number']); @@ -5086,16 +5086,16 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(5, $response['body']['total']); - // SUCCESS: Delete 100 documents - $createBulkDocuments(100); + // SUCCESS: Delete 100 rows + $createBulkRows(100); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(100, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(100, $rows['body']['total']); $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', @@ -5105,16 +5105,16 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(100, $response['body']['total']); - $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertEquals(0, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertEquals(0, $rows['body']['total']); - // TEST: Fail - Can't bulk delete in a collection with relationships - $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + // TEST: Fail - Can't bulk delete in a table with relationships + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5130,7 +5130,7 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ], $this->getHeaders()), [ - 'relatedTableId' => $collection2['body']['$id'], + 'relatedTableId' => $table2['body']['$id'], 'type' => 'manyToOne', 'twoWay' => true, 'onDelete' => 'cascade', From 2e05844ca2242feca29d0afece230b483b020a64 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 13 Jun 2025 14:04:23 +0530 Subject: [PATCH 144/362] add: graphql tests for bulk apis. --- .../Collections/Documents/Bulk/Upsert.php | 1 - .../Collections/Documents/Create.php | 13 +- .../Databases/Tables/Rows/Bulk/Upsert.php | 1 - tests/e2e/Services/GraphQL/Base.php | 135 ++++++++- .../Collections/DatabaseClientTest.php | 176 +++++++++++ .../Collections/DatabaseServerTest.php | 1 + .../GraphQL/Tables/DatabaseClientTest.php | 283 ++++++++++++++++++ .../GraphQL/Tables/DatabaseServerTest.php | 1 + 8 files changed, 601 insertions(+), 10 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index 1e7d838fba..770f7a4d95 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -43,7 +43,6 @@ class Upsert extends Action ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents') ->desc('Create or update documents') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].create') ->label('scope', 'documents.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'document.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 33406044f1..e68a27ba34 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -418,6 +418,13 @@ class Create extends Action $response->setStatusCode(SwooleResponse::STATUS_CODE_CREATED); + // BIG TODO: @itznotabug - need to check what to do for bulk api because there's not just one `[document/rowId]`. + $queueForEvents + ->setParam('documentId', $documents[0]->getId()) + ->setParam('rowId', $documents[0]->getId()) + // TODO: @itznotabug - check if the events mirroring works here! + ->setEvent('databases.[databaseId].collections.[collectionId].documents.[documentId].create'); + if ($isBulk) { $response->dynamic(new Document([ 'total' => count($documents), @@ -427,12 +434,6 @@ class Create extends Action return; } - $queueForEvents - ->setParam('documentId', $documents[0]->getId()) - ->setParam('rowId', $documents[0]->getId()) - // TODO: @itznotabug - check if the events mirroring works here! - ->setEvent('databases.[databaseId].collections.[collectionId].documents.[documentId].create'); - $response->dynamic( $documents[0], $this->getResponseModel() diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php index 9331e75aa8..2b4117c23e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php @@ -38,7 +38,6 @@ class Upsert extends DocumentsUpsert ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('Create or update rows') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].create') ->label('scope', 'documents.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index f050fa9638..f001265caf 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -99,15 +99,29 @@ trait Base public static string $GET_DOCUMENTS = 'list_documents'; public static string $GET_DOCUMENT = 'get_document'; public static string $UPDATE_DOCUMENT = 'update_document'; + public static string $UPSERT_DOCUMENT = 'upsert_document'; public static string $DELETE_DOCUMENT = 'delete_document'; + // Documents Bulk APIs + public static string $CREATE_DOCUMENTS = 'create_documents_rest'; + public static string $UPDATE_DOCUMENTS = 'update_documents'; + public static string $UPSERT_DOCUMENTS = 'upsert_documents'; + public static string $DELETE_DOCUMENTS = 'delete_documents'; + // Rows public static string $CREATE_ROW = 'create_row_rest'; public static string $GET_ROWS = 'list_rows'; public static string $GET_ROW = 'get_row'; public static string $UPDATE_ROW = 'update_row'; + public static string $UPSERT_ROW = 'upsert_row'; public static string $DELETE_ROW = 'delete_row'; + // Rows Bulk APIs + public static string $CREATE_ROWS = 'create_rows_rest'; + public static string $UPDATE_ROWS = 'update_rows'; + public static string $UPSERT_ROWS = 'upsert_rows'; + public static string $DELETE_ROWS = 'delete_rows'; + // Custom Entities public static string $CREATE_CUSTOM_ENTITY = 'create_custom_entity'; public static string $GET_CUSTOM_ENTITIES = 'get_custom_entities'; @@ -1100,6 +1114,28 @@ trait Base _permissions } }'; + case self::$CREATE_DOCUMENTS: + return 'mutation createDocuments($databaseId: String!, $collectionId: String!, $documents: [Json!]!) { + collectionsCreateDocuments(databaseId: $databaseId, collectionId: $collectionId, documents: $documents) { + documents { + _id + _collectionId + _permissions + data + } + } + }'; + case self::$CREATE_ROWS: + return 'mutation createRows($databaseId: String!, $tableId: String!, $rows: [Json!]!) { + tablesCreateRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { + rows { + _id + _tableId + _permissions + data + } + } + }'; case self::$GET_ROW: return 'query getRow($databaseId: String!, $tableId: String!, $rowId: String!) { tablesGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { @@ -1110,11 +1146,12 @@ trait Base } }'; case self::$GET_ROWS: - return 'query listRows($databaseId: String!, $tableId: String!) { - tablesListRows(databaseId: $databaseId, tableId: $tableId) { + return 'query listRows($databaseId: String!, $tableId: String!, $queries: [String!] = []) { + tablesListRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { total rows { _id + _databaseId _tableId _permissions data @@ -1196,6 +1233,53 @@ trait Base data } }'; + case self::$UPSERT_DOCUMENT: + return 'mutation upsertDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!] = []) { + collectionsUpsertDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { + _id + _databaseId + _collectionId + data + } + }'; + case self::$UPDATE_DOCUMENTS: + return 'mutation updateDocuments($databaseId: String!, $collectionId: String!, $data: Json!, $queries: [String!]) { + collectionsUpdateDocuments(databaseId: $databaseId, collectionId: $collectionId, data: $data, queries: $queries) { + total + documents { + _id + _databaseId + _collectionId + _permissions + data + } + } + }'; + case self::$UPSERT_DOCUMENTS: + return 'mutation upsertDocuments($databaseId: String!, $collectionId: String!, $documents: [Json!]!) { + collectionsUpsertDocuments(databaseId: $databaseId, collectionId: $collectionId, documents: $documents) { + total + documents { + _id + _databaseId + _collectionId + _permissions + data + } + } + }'; + case self::$DELETE_DOCUMENTS: + return 'mutation deleteDocuments($databaseId: String!, $collectionId: String!, $queries: [String!] = []) { + collectionsDeleteDocuments(databaseId: $databaseId, collectionId: $collectionId, queries: $queries) { + total + documents { + _id + _databaseId + _collectionId + data + } + } + }'; case self::$DELETE_DOCUMENT: return 'mutation deleteDocument($databaseId: String!, $collectionId: String!, $documentId: String!){ collectionsDeleteDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { @@ -1210,12 +1294,59 @@ trait Base data } }'; + case self::$UPSERT_ROW: + return 'mutation upsertRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!] = []) { + tablesUpsertRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + _id + _databaseId + _tableId + data + } + }'; case self::$DELETE_ROW: return 'mutation deleteRow($databaseId: String!, $tableId: String!, $rowId: String!) { tablesDeleteRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { status } }'; + case self::$UPDATE_ROWS: + return 'mutation updateRows($databaseId: String!, $tableId: String!, $data: Json!, $queries: [String!]) { + tablesUpdateRows(databaseId: $databaseId, tableId: $tableId, data: $data, queries: $queries) { + total + rows { + _id + _databaseId + _tableId + _permissions + data + } + } + }'; + case self::$UPSERT_ROWS: + return 'mutation upsertRows($databaseId: String!, $tableId: String!, $rows: [Json!]!) { + tablesUpsertRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { + total + rows { + _id + _databaseId + _tableId + _permissions + data + } + } + }'; + case self::$DELETE_ROWS: + return 'mutation deleteRows($databaseId: String!, $tableId: String!, $queries: [String!] = []) { + tablesDeleteRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { + total + rows { + _id + _databaseId + _tableId + data + } + } + }'; case self::$GET_USER: return 'query getUser($userId : String!) { usersGet(userId : $userId) { diff --git a/tests/e2e/Services/GraphQL/Collections/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/Collections/DatabaseClientTest.php index 9c23a8d784..349d580d64 100644 --- a/tests/e2e/Services/GraphQL/Collections/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/Collections/DatabaseClientTest.php @@ -303,4 +303,180 @@ class DatabaseClientTest extends Scope $this->assertIsNotArray($document['body']); $this->assertEquals(204, $document['headers']['status-code']); } + + /** + * @throws \Exception + */ + public function testBulkCreateDocuments(): array + { + $project = $this->getProject(); + $projectId = $project['$id']; + $headers = [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $project['apiKey'], + ]; + + // Step 1: Create database + $query = $this->getQuery(self::$CREATE_DATABASE); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => 'bulk', + 'name' => 'Bulk', + ], + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $databaseId = $res['body']['data']['databasesCreate']['_id']; + + // Step 2: Create collection + $query = $this->getQuery(self::$CREATE_COLLECTION); + $payload['query'] = $query; + $payload['variables'] = [ + 'databaseId' => $databaseId, + 'collectionId' => 'operations', + 'name' => 'Operations', + 'documentSecurity' => false, + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $collectionId = $res['body']['data']['databasesCreateCollection']['_id']; + + // Step 3: Create attribute + $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $payload['query'] = $query; + $payload['variables'] = [ + 'databaseId' => $databaseId, + 'collectionId' => $collectionId, + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + sleep(1); + + // Step 4: Create documents + $query = $this->getQuery(self::$CREATE_DOCUMENTS); + $documents = []; + for ($i = 1; $i <= 10; $i++) { + $documents[] = ['$id' => 'doc' . $i, 'name' => 'Doc #' . $i]; + } + + $payload['query'] = $query; + $payload['variables'] = [ + 'databaseId' => $databaseId, + 'collectionId' => $collectionId, + 'documents' => $documents, + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $this->assertCount(10, $res['body']['data']['collectionsCreateDocuments']['documents']); + + return [ + 'databaseId' => $databaseId, + 'collectionId' => $collectionId, + 'projectId' => $projectId, + ]; + } + + /** + * @depends testBulkCreateDocuments + */ + public function testBulkUpdateDocuments(array $data): array + { + $userId = $this->getUser()['$id']; + $permissions = [ + Permission::read(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::delete(Role::user($userId)), + ]; + + $headers = [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]; + + $query = $this->getQuery(self::$UPDATE_DOCUMENTS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'collectionId' => $data['collectionId'], + 'data' => [ + 'name' => 'Docs Updated', + '$permissions' => $permissions, + ], + ], + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $this->assertCount(10, $res['body']['data']['collectionsUpdateDocuments']['documents']); + + return $data; + } + + /** + * @depends testBulkUpdateDocuments + */ + public function testBulkUpsertDocuments(array $data): array + { + $headers = [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]; + + // Upsert: Update one, insert one + $query = $this->getQuery(self::$UPSERT_DOCUMENTS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'collectionId' => $data['collectionId'], + 'documents' => [ + ['$id' => 'doc10', 'name' => 'Doc #1000'], + ['name' => 'Doc #11'], + ], + ], + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $this->assertCount(2, $res['body']['data']['collectionsUpsertDocuments']['documents']); + + return $data; + } + + /** + * @depends testBulkUpsertDocuments + */ + public function testBulkDeleteDocuments(array $data): array + { + $headers = [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]; + + $query = $this->getQuery(self::$DELETE_DOCUMENTS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'collectionId' => $data['collectionId'], + ], + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $this->assertCount(11, $res['body']['data']['collectionsDeleteDocuments']['documents']); + + return $data; + } } diff --git a/tests/e2e/Services/GraphQL/Collections/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Collections/DatabaseServerTest.php index 4aa540a47e..f60acb9b0b 100644 --- a/tests/e2e/Services/GraphQL/Collections/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Collections/DatabaseServerTest.php @@ -134,6 +134,7 @@ class DatabaseServerTest extends Scope 'x-appwrite-project' => $projectId, ], $this->getHeaders()), $gqlPayload); + // TODO: @itznotabug - check for `encrypt` attribute in string column's response body as well! $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); $this->assertIsArray($attribute['body']['data']['collectionsCreateStringAttribute']); diff --git a/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php index 3296f2d622..c5cba6c47f 100644 --- a/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php @@ -10,6 +10,7 @@ use Tests\E2E\Services\GraphQL\Base; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; +use Utopia\Database\Query; class DatabaseClientTest extends Scope { @@ -303,4 +304,286 @@ class DatabaseClientTest extends Scope $this->assertIsNotArray($row['body']); $this->assertEquals(204, $row['headers']['status-code']); } + + /** + * @throws \Exception + */ + public function testBulkCreate(): array + { + $project = $this->getProject(); + $projectId = $project['$id']; + $headers = [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $project['apiKey'], + ]; + + // Step 1: Create database + $query = $this->getQuery(self::$CREATE_DATABASE); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => 'bulk', + 'name' => 'Bulk', + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $databaseId = $res['body']['data']['databasesCreate']['_id']; + + // Step 2: Create table + $query = $this->getQuery(self::$CREATE_TABLE); + $payload['query'] = $query; + $payload['variables'] = [ + 'databaseId' => $databaseId, + 'tableId' => 'operations', + 'name' => 'Operations', + 'rowSecurity' => false, + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $tableId = $res['body']['data']['databasesCreateTable']['_id']; + + // Step 3: Create column + $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $payload['query'] = $query; + $payload['variables'] = [ + 'databaseId' => $databaseId, + 'tableId' => $tableId, + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + sleep(1); + + // Step 4: Create rows + $query = $this->getQuery(self::$CREATE_ROWS); + $rows = []; + for ($i = 1; $i <= 10; $i++) { + $rows[] = ['$id' => 'row' . $i, 'name' => 'Row #' . $i]; + } + + $payload['query'] = $query; + $payload['variables'] = [ + 'databaseId' => $databaseId, + 'tableId' => $tableId, + 'rows' => $rows, + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $this->assertCount(10, $res['body']['data']['tablesCreateRows']['rows']); + + return compact('databaseId', 'tableId', 'projectId'); + } + + /** + * @depends testBulkCreate + */ + public function testBulkUpdate(array $data): array + { + $userId = $this->getUser()['$id']; + $permissions = [ + Permission::read(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::delete(Role::user($userId)), + ]; + + $headers = [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]; + + // Step 1: Bulk update rows + $query = $this->getQuery(self::$UPDATE_ROWS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + 'data' => [ + 'name' => 'Rows Updated', + '$permissions' => $permissions, + ], + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $this->assertCount(10, $res['body']['data']['tablesUpdateRows']['rows']); + + // Step 2: Fetch and validate updated rows + $query = $this->getQuery(self::$GET_ROWS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + 'queries' => [Query::equal('name', ['Rows Updated'])->toString()], + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertEquals(200, $res['headers']['status-code']); + + $fetched = $res['body']['data']['tablesListRows']; + $this->assertEquals(10, $fetched['total']); + + foreach ($fetched['rows'] as $row) { + $this->assertEquals($permissions, $row['_permissions']); + $this->assertEquals($data['tableId'], $row['_tableId']); + $this->assertEquals($data['databaseId'], $row['_databaseId']); + $this->assertEquals('Rows Updated', json_decode($row['data'], true)['name']); + } + + return $data; + } + + /** + * @depends testBulkCreate + */ + public function testBulkUpsert(array $data): array + { + $userId = $this->getUser()['$id']; + $headers = [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]; + + $permissions = [ + Permission::read(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::delete(Role::user($userId)), + ]; + + // Step 1: Mutate row 10 and add row 11 + $query = $this->getQuery(self::$UPSERT_ROWS); + $upsertPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + 'rows' => [ + [ + '$id' => 'row10', + 'name' => 'Row #1000', + ], + [ + 'name' => 'Row #11', + ], + ], + ], + ]; + + $response = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $upsertPayload); + $this->assertArrayNotHasKey('errors', $response['body']); + + $rows = $response['body']['data']['tablesUpsertRows']['rows']; + $this->assertCount(2, $rows); + + $rowMap = []; + foreach ($rows as $row) { + $decoded = json_decode($row['data'], true); + $rowMap[$decoded['name']] = $decoded; + } + + $this->assertArrayHasKey('Row #1000', $rowMap); + $this->assertArrayHasKey('Row #11', $rowMap); + + // Step 2: Fetch all rows and confirm count is now 11 + $query = $this->getQuery(self::$GET_ROWS); + $fetchPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $fetchPayload); + $this->assertEquals(200, $res['headers']['status-code']); + + $fetched = $res['body']['data']['tablesListRows']; + $this->assertEquals(11, $fetched['total']); + + // Step 3: Upsert row with new permissions using `tablesUpsertRow` + $query = $this->getQuery(self::$UPSERT_ROW); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + 'rowId' => 'row10', + 'data' => ['name' => 'Row #10 Patched'], + 'permissions' => $permissions, + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + + $updated = $res['body']['data']['tablesUpsertRow']; + $this->assertEquals('Row #10 Patched', json_decode($updated['data'], true)['name']); + $this->assertEquals($data['databaseId'], $updated['_databaseId']); + $this->assertEquals($data['tableId'], $updated['_tableId']); + + return $data; + } + + /** + * @depends testBulkUpsert + */ + public function testBulkDelete(array $data): array + { + $headers = [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]; + + // Step 1: Perform bulk delete + $query = $this->getQuery(self::$DELETE_ROWS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + + $deleted = $res['body']['data']['tablesDeleteRows']['rows']; + $this->assertIsArray($deleted); + $this->assertCount(11, $deleted); + + // Step 2: Confirm deletion via refetch + $query = $this->getQuery(self::$GET_ROWS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertEquals(200, $res['headers']['status-code']); + $this->assertEquals(0, $res['body']['data']['tablesListRows']['total']); + + return $data; + } } diff --git a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php index 4f711148e3..af72bb8a9f 100644 --- a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php @@ -134,6 +134,7 @@ class DatabaseServerTest extends Scope 'x-appwrite-project' => $projectId, ], $this->getHeaders()), $gqlPayload); + // TODO: @itznotabug - check for `encrypt` attribute in string column's response body as well! $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); $this->assertIsArray($column['body']['data']['tablesCreateStringColumn']); From 6e1fa0526d627e0e5f97dcf2a5c9b18c6f2dfb0f Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 13 Jun 2025 14:07:33 +0530 Subject: [PATCH 145/362] add: graphql tests for bulk apis to server tests. --- .../Collections/DatabaseServerTest.php | 172 ++++++++++++++++++ 1 file changed, 172 insertions(+) diff --git a/tests/e2e/Services/GraphQL/Collections/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Collections/DatabaseServerTest.php index f60acb9b0b..3e5b457308 100644 --- a/tests/e2e/Services/GraphQL/Collections/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Collections/DatabaseServerTest.php @@ -1465,4 +1465,176 @@ class DatabaseServerTest extends Scope $this->assertIsNotArray($database['body']); $this->assertEquals(204, $database['headers']['status-code']); } + + /** + * @throws Exception + */ + public function testBulkCreateDocuments(): array + { + $project = $this->getProject(); + $projectId = $project['$id']; + $headers = array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()); + + // Step 1: Create database + $query = $this->getQuery(self::$CREATE_DATABASE); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => 'bulk', + 'name' => 'Bulk', + ], + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $databaseId = $res['body']['data']['databasesCreate']['_id']; + + // Step 2: Create collection + $query = $this->getQuery(self::$CREATE_COLLECTION); + $payload['query'] = $query; + $payload['variables'] = [ + 'databaseId' => $databaseId, + 'collectionId' => 'operations', + 'name' => 'Operations', + 'documentSecurity' => false, + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $collectionId = $res['body']['data']['databasesCreateCollection']['_id']; + + // Step 3: Create attribute + $query = $this->getQuery(self::$CREATE_STRING_ATTRIBUTE); + $payload['query'] = $query; + $payload['variables'] = [ + 'databaseId' => $databaseId, + 'collectionId' => $collectionId, + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + sleep(1); + + // Step 4: Create documents + $query = $this->getQuery(self::$CREATE_DOCUMENTS); + $documents = []; + for ($i = 1; $i <= 10; $i++) { + $documents[] = ['$id' => 'doc' . $i, 'name' => 'Doc #' . $i]; + } + + $payload['query'] = $query; + $payload['variables'] = [ + 'databaseId' => $databaseId, + 'collectionId' => $collectionId, + 'documents' => $documents, + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $this->assertCount(10, $res['body']['data']['collectionsCreateDocuments']['documents']); + + return [ + 'databaseId' => $databaseId, + 'collectionId' => $collectionId, + 'projectId' => $projectId, + ]; + } + + /** + * @depends testBulkCreateDocuments + */ + public function testBulkUpdateDocuments(array $data): array + { + $userId = $this->getUser()['$id']; + $permissions = [ + Permission::read(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::delete(Role::user($userId)), + ]; + + $headers = array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + ], $this->getHeaders()); + + $query = $this->getQuery(self::$UPDATE_DOCUMENTS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'collectionId' => $data['collectionId'], + 'data' => [ + 'name' => 'Docs Updated', + '$permissions' => $permissions, + ], + ], + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $this->assertCount(10, $res['body']['data']['collectionsUpdateDocuments']['documents']); + + return $data; + } + + /** + * @depends testBulkUpdateDocuments + */ + public function testBulkUpsertDocuments(array $data): array + { + $headers = array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + ], $this->getHeaders()); + + // Upsert: Update one, insert one + $query = $this->getQuery(self::$UPSERT_DOCUMENTS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'collectionId' => $data['collectionId'], + 'documents' => [ + ['$id' => 'doc10', 'name' => 'Doc #1000'], + ['name' => 'Doc #11'], + ], + ], + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $this->assertCount(2, $res['body']['data']['collectionsUpsertDocuments']['documents']); + + return $data; + } + + /** + * @depends testBulkUpsertDocuments + */ + public function testBulkDeleteDocuments(array $data): array + { + $headers = array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + ], $this->getHeaders()); + + $query = $this->getQuery(self::$DELETE_DOCUMENTS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'collectionId' => $data['collectionId'], + ], + ]; + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $this->assertCount(11, $res['body']['data']['collectionsDeleteDocuments']['documents']); + + return $data; + } } From 9cfff792fdcc6617edf4445a2152528ff87529d4 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 13 Jun 2025 14:13:26 +0530 Subject: [PATCH 146/362] add: graphql tests for bulk apis to server tests. --- .../GraphQL/Tables/DatabaseServerTest.php | 279 ++++++++++++++++++ 1 file changed, 279 insertions(+) diff --git a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php index af72bb8a9f..61cb57911a 100644 --- a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php @@ -12,6 +12,7 @@ use Utopia\Database\Database; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; +use Utopia\Database\Query; class DatabaseServerTest extends Scope { @@ -1465,4 +1466,282 @@ class DatabaseServerTest extends Scope $this->assertIsNotArray($database['body']); $this->assertEquals(204, $database['headers']['status-code']); } + + /** + * @throws Exception + */ + public function testBulkCreate(): array + { + $project = $this->getProject(); + $projectId = $project['$id']; + $headers = array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()); + + // Step 1: Create database + $query = $this->getQuery(self::$CREATE_DATABASE); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => 'bulk', + 'name' => 'Bulk', + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $databaseId = $res['body']['data']['databasesCreate']['_id']; + + // Step 2: Create table + $query = $this->getQuery(self::$CREATE_TABLE); + $payload['query'] = $query; + $payload['variables'] = [ + 'databaseId' => $databaseId, + 'tableId' => 'operations', + 'name' => 'Operations', + 'rowSecurity' => false, + 'permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $tableId = $res['body']['data']['databasesCreateTable']['_id']; + + // Step 3: Create column + $query = $this->getQuery(self::$CREATE_STRING_COLUMN); + $payload['query'] = $query; + $payload['variables'] = [ + 'databaseId' => $databaseId, + 'tableId' => $tableId, + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + sleep(1); + + // Step 4: Create rows + $query = $this->getQuery(self::$CREATE_ROWS); + $rows = []; + for ($i = 1; $i <= 10; $i++) { + $rows[] = ['$id' => 'row' . $i, 'name' => 'Row #' . $i]; + } + + $payload['query'] = $query; + $payload['variables'] = [ + 'databaseId' => $databaseId, + 'tableId' => $tableId, + 'rows' => $rows, + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $this->assertCount(10, $res['body']['data']['tablesCreateRows']['rows']); + + return compact('databaseId', 'tableId', 'projectId'); + } + + /** + * @depends testBulkCreate + */ + public function testBulkUpdate(array $data): array + { + $userId = $this->getUser()['$id']; + $permissions = [ + Permission::read(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::delete(Role::user($userId)), + ]; + + $headers = array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + ], $this->getHeaders()); + + // Step 1: Bulk update rows + $query = $this->getQuery(self::$UPDATE_ROWS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + 'data' => [ + 'name' => 'Rows Updated', + '$permissions' => $permissions, + ], + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + $this->assertCount(10, $res['body']['data']['tablesUpdateRows']['rows']); + + // Step 2: Fetch and validate updated rows + $query = $this->getQuery(self::$GET_ROWS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + 'queries' => [Query::equal('name', ['Rows Updated'])->toString()], + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertEquals(200, $res['headers']['status-code']); + + $fetched = $res['body']['data']['tablesListRows']; + $this->assertEquals(10, $fetched['total']); + + foreach ($fetched['rows'] as $row) { + $this->assertEquals($permissions, $row['_permissions']); + $this->assertEquals($data['tableId'], $row['_tableId']); + $this->assertEquals($data['databaseId'], $row['_databaseId']); + $this->assertEquals('Rows Updated', json_decode($row['data'], true)['name']); + } + + return $data; + } + + /** + * @depends testBulkCreate + */ + public function testBulkUpsert(array $data): array + { + $userId = $this->getUser()['$id']; + $headers = array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + ], $this->getHeaders()); + + $permissions = [ + Permission::read(Role::user($userId)), + Permission::update(Role::user($userId)), + Permission::delete(Role::user($userId)), + ]; + + // Step 1: Mutate row 10 and add row 11 + $query = $this->getQuery(self::$UPSERT_ROWS); + $upsertPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + 'rows' => [ + [ + '$id' => 'row10', + 'name' => 'Row #1000', + ], + [ + 'name' => 'Row #11', + ], + ], + ], + ]; + + $response = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $upsertPayload); + $this->assertArrayNotHasKey('errors', $response['body']); + + $rows = $response['body']['data']['tablesUpsertRows']['rows']; + $this->assertCount(2, $rows); + + $rowMap = []; + foreach ($rows as $row) { + $decoded = json_decode($row['data'], true); + $rowMap[$decoded['name']] = $decoded; + } + + $this->assertArrayHasKey('Row #1000', $rowMap); + $this->assertArrayHasKey('Row #11', $rowMap); + + // Step 2: Fetch all rows and confirm count is now 11 + $query = $this->getQuery(self::$GET_ROWS); + $fetchPayload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $fetchPayload); + $this->assertEquals(200, $res['headers']['status-code']); + + $fetched = $res['body']['data']['tablesListRows']; + $this->assertEquals(11, $fetched['total']); + + // Step 3: Upsert row with new permissions using `tablesUpsertRow` + $query = $this->getQuery(self::$UPSERT_ROW); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + 'rowId' => 'row10', + 'data' => ['name' => 'Row #10 Patched'], + 'permissions' => $permissions, + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + + $updated = $res['body']['data']['tablesUpsertRow']; + $this->assertEquals('Row #10 Patched', json_decode($updated['data'], true)['name']); + $this->assertEquals($data['databaseId'], $updated['_databaseId']); + $this->assertEquals($data['tableId'], $updated['_tableId']); + + return $data; + } + + /** + * @depends testBulkUpsert + */ + public function testBulkDelete(array $data): array + { + $headers = array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $data['projectId'], + ], $this->getHeaders()); + + // Step 1: Perform bulk delete + $query = $this->getQuery(self::$DELETE_ROWS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertArrayNotHasKey('errors', $res['body']); + + $deleted = $res['body']['data']['tablesDeleteRows']['rows']; + $this->assertIsArray($deleted); + $this->assertCount(11, $deleted); + + // Step 2: Confirm deletion via refetch + $query = $this->getQuery(self::$GET_ROWS); + $payload = [ + 'query' => $query, + 'variables' => [ + 'databaseId' => $data['databaseId'], + 'tableId' => $data['tableId'], + ], + ]; + + $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); + $this->assertEquals(200, $res['headers']['status-code']); + $this->assertEquals(0, $res['body']['data']['tablesListRows']['total']); + + return $data; + } } From 8cbd06173db748191d4ee6f2794b5e7fbf1ad2eb Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 13 Jun 2025 15:11:18 +0530 Subject: [PATCH 147/362] update: realtime channels checks for tables api. --- .../Services/Realtime/RealtimeCustomClientTest.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index 7f5e2a9da8..6d6c0d18a4 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -81,11 +81,17 @@ class RealtimeCustomClientTest extends Scope 'files', 'files.1', 'collections', + 'tables', 'collections.1.documents', 'collections.2.documents', + 'tables.1.rows', + 'tables.2.rows', 'documents', + 'rows', 'collections.1.documents.1', 'collections.2.documents.2', + 'tables.1.rows.1', + 'tables.2.rows.2', ], $headers); $response = json_decode($client->receive(), true); @@ -95,17 +101,22 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('connected', $response['type']); $this->assertNotEmpty($response['data']); $this->assertNotEmpty($response['data']['user']); - $this->assertCount(10, $response['data']['channels']); + $this->assertCount(16, $response['data']['channels']); $this->assertContains('account', $response['data']['channels']); $this->assertContains('account.' . $userId, $response['data']['channels']); $this->assertContains('files', $response['data']['channels']); $this->assertContains('files.1', $response['data']['channels']); $this->assertContains('collections', $response['data']['channels']); + $this->assertContains('tables', $response['data']['channels']); $this->assertContains('collections.1.documents', $response['data']['channels']); $this->assertContains('collections.2.documents', $response['data']['channels']); + $this->assertContains('tables.1.rows', $response['data']['channels']); + $this->assertContains('tables.2.rows', $response['data']['channels']); $this->assertContains('documents', $response['data']['channels']); $this->assertContains('collections.1.documents.1', $response['data']['channels']); $this->assertContains('collections.2.documents.2', $response['data']['channels']); + $this->assertContains('tables.1.rows.1', $response['data']['channels']); + $this->assertContains('tables.2.rows.2', $response['data']['channels']); $this->assertEquals($userId, $response['data']['user']['$id']); $client->close(); From 8d74083da3a6b214c557d22fed943d7859652299 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 13 Jun 2025 15:18:21 +0530 Subject: [PATCH 148/362] remove: filter queries. --- .../Databases/Http/Databases/Collections/Attributes/XList.php | 4 +--- .../Databases/Http/Databases/Collections/Indexes/XList.php | 3 +-- .../Modules/Databases/Http/Databases/Collections/XList.php | 4 +--- .../Platform/Modules/Databases/Http/Databases/XList.php | 4 +--- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index b9f1450fa3..2509115e13 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -118,11 +118,9 @@ class XList extends Action $cursor->setValue($cursorDocument); } - $filterQueries = Query::groupByType($queries)['filters']; - try { $attributes = $dbForProject->find('attributes', $queries); - $total = $dbForProject->count('attributes', $filterQueries, APP_LIMIT_COUNT); + $total = $dbForProject->count('attributes', $queries, APP_LIMIT_COUNT); } catch (OrderException $e) { $documents = $this->isCollectionsAPI() ? 'documents' : 'rows'; $attribute = $this->isCollectionsAPI() ? 'attribute' : 'column'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index 13717034ce..dae25a3335 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -122,9 +122,8 @@ class XList extends Action $cursor->setValue($cursorDocument[0]); } - $filterQueries = Query::groupByType($queries)['filters']; try { - $total = $dbForProject->count('indexes', $filterQueries, APP_LIMIT_COUNT); + $total = $dbForProject->count('indexes', $queries, APP_LIMIT_COUNT); $indexes = $dbForProject->find('indexes', $queries); } catch (OrderException $e) { $documents = $this->isCollectionsAPI() ? 'documents' : 'rows'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index 06a6d2cd39..d3ddb9301f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -108,11 +108,9 @@ class XList extends Action $cursor->setValue($cursorDocument); } - $filterQueries = Query::groupByType($queries)['filters']; - try { $collections = $dbForProject->find('database_' . $database->getSequence(), $queries); - $total = $dbForProject->count('database_' . $database->getSequence(), $filterQueries, APP_LIMIT_COUNT); + $total = $dbForProject->count('database_' . $database->getSequence(), $queries, APP_LIMIT_COUNT); } catch (OrderException) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL); } catch (QueryException) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php index dcf7e2d724..7179be90ec 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -92,11 +92,9 @@ class XList extends Action $cursor->setValue($cursorDocument); } - $filterQueries = Query::groupByType($queries)['filters']; - try { $databases = $dbForProject->find('databases', $queries); - $total = $dbForProject->count('databases', $filterQueries, APP_LIMIT_COUNT); + $total = $dbForProject->count('databases', $queries, APP_LIMIT_COUNT); } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order column '{$e->getAttribute()}' had a null value. Cursor pagination requires all rows order column values are non-null."); } catch (QueryException) { From fde2f278e8a764fa556835cfef3e95161816f8dc Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Sat, 14 Jun 2025 18:07:42 +0530 Subject: [PATCH 149/362] added invalidating sessions for the project users --- app/controllers/api/projects.php | 41 ++++++++++++++++++- app/controllers/api/users.php | 11 +++++ .../update-auth-on-password-change.md | 1 + .../Utopia/Response/Model/Project.php | 7 ++++ tests/e2e/Scopes/ProjectCustom.php | 13 ++++++ .../Projects/ProjectsConsoleClientTest.php | 25 +++++++++++ tests/e2e/Services/Users/UsersBase.php | 13 +++++- 7 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 docs/references/databases/update-auth-on-password-change.md diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 51cbc097f5..cbdc1c5e05 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -94,13 +94,14 @@ App::post('/v1/projects') ->param('legalCity', '', new Text(256), 'Project legal City. Max length: 256 chars.', true) ->param('legalAddress', '', new Text(256), 'Project legal Address. Max length: 256 chars.', true) ->param('legalTaxId', '', new Text(256), 'Project legal Tax ID. Max length: 256 chars.', true) + ->param('onPasswordChange', false, new Boolean(), 'For invalding sessions', true) ->inject('request') ->inject('response') ->inject('dbForPlatform') ->inject('cache') ->inject('pools') ->inject('hooks') - ->action(function (string $projectId, string $name, string $teamId, string $region, string $description, string $logo, string $url, string $legalName, string $legalCountry, string $legalState, string $legalCity, string $legalAddress, string $legalTaxId, Request $request, Response $response, Database $dbForPlatform, Cache $cache, Group $pools, Hooks $hooks) { + ->action(function (string $projectId, string $name, string $teamId, string $region, string $description, string $logo, string $url, string $legalName, string $legalCountry, string $legalState, string $legalCity, string $legalAddress, string $legalTaxId, $onPasswordChange, Request $request, Response $response, Database $dbForPlatform, Cache $cache, Group $pools, Hooks $hooks) { $team = $dbForPlatform->getDocument('teams', $teamId); @@ -127,6 +128,7 @@ App::post('/v1/projects') 'membershipsUserName' => false, 'membershipsUserEmail' => false, 'membershipsMfa' => false, + 'onPasswordChange' => $onPasswordChange ]; foreach ($auth as $method) { @@ -2499,3 +2501,40 @@ App::delete('/v1/projects/:projectId/templates/email/:type/:locale') 'message' => $template['message'] ]), Response::MODEL_EMAIL_TEMPLATE); }); + +App::patch('/v1/projects/:projectId/auth/password-change') +->desc('Update on password change of the project') +->groups(['api', 'projects']) +->label('scope', 'projects.write') +->label('sdk', new Method( + namespace: 'projects', + group: 'auth', + name: 'updateOnPasswordChange', + description: '/docs/references/projects/update-auth-on-password-change.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] +)) +->param('projectId', '', new UID(), 'Project unique ID.') +->param('onPasswordChange', false, new Boolean(), 'For invalidating project session') +->inject('response') +->inject('dbForPlatform') +->action(function (string $projectId, bool $onPasswordChange, Response $response, Database $dbForPlatform) { + + $project = $dbForPlatform->getDocument('projects', $projectId); + + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } + + $auths = $project->getAttribute('auths', []); + $auths['onPasswordChange'] = $onPasswordChange; + $dbForPlatform->updateDocument('projects', $project->getId(), $project + ->setAttribute('auths', $auths)); + + $response->dynamic($project, Response::MODEL_PROJECT); +}); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index d7def69464..d9dd951c09 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -1351,6 +1351,17 @@ App::patch('/v1/users/:userId/password') $user = $dbForProject->updateDocument('users', $user->getId(), $user); + $sessions = $user->getAttribute('sessions', []); + $onPasswordChange = $project->getAttribute('auths', [])['onPasswordChange']; + if ($onPasswordChange) { + foreach ($sessions as $session) { + /** @var Document $session */ + $dbForProject->deleteDocument('sessions', $session->getId()); + } + } + + $dbForProject->purgeCachedDocument('users', $user->getId()); + $queueForEvents->setParam('userId', $user->getId()); $response->dynamic($user, Response::MODEL_USER); diff --git a/docs/references/databases/update-auth-on-password-change.md b/docs/references/databases/update-auth-on-password-change.md new file mode 100644 index 0000000000..1daf0a69df --- /dev/null +++ b/docs/references/databases/update-auth-on-password-change.md @@ -0,0 +1 @@ +On password change. Should be an optional auth security setting for projects, and enabled by default for console project. \ No newline at end of file diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index efd002654e..c9f900933f 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -271,6 +271,12 @@ class Project extends Model 'default' => '', 'example' => self::TYPE_DATETIME_EXAMPLE, ]) + ->addRule('onPasswordChange', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'For invalidating all sessions', + 'default' => false, + 'example' => self::TYPE_BOOLEAN, + ]) ; $services = Config::getParam('services', []); @@ -376,6 +382,7 @@ class Project extends Model $document->setAttribute('authMembershipsUserName', $authValues['membershipsUserName'] ?? true); $document->setAttribute('authMembershipsUserEmail', $authValues['membershipsUserEmail'] ?? true); $document->setAttribute('authMembershipsMfa', $authValues['membershipsMfa'] ?? true); + $document->setAttribute('onPasswordChange', $authValues['onPasswordChange'] ?? false); foreach ($auth as $index => $method) { $key = $method['key']; diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index a354696f53..0225805054 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -200,4 +200,17 @@ trait ProjectCustom return $key['body']['secret']; } + public function updateProjectOnPasswordChangeProperty(bool $value) + { + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . self::$project['$id'] . '/auth/password-change', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'cookie' => 'a_session_console=' . $this->getRoot()['session'], + 'x-appwrite-project' => 'console', + ]), [ + 'onPasswordChange' => $value, + ]); + + return $response['headers']['status-code']; + } } diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index aea1971be7..d77e330e6a 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -951,6 +951,31 @@ class ProjectsConsoleClientTest extends Scope return ['projectId' => $projectId]; } + /** @depends testCreateProject */ + public function testUpdateProjectOnPasswordChange($data): array + { + $id = $data['projectId']; + + // Check defaults + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'console', + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertFalse($response['body']['onPasswordChange']); + + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/password-change', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'onPasswordChange' => true, + ]); + $this->assertTrue($response['body']['onPasswordChange']); + + return $data; + } + /** * @depends testCreateProject */ diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index 00e999672f..391f31da41 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -1117,7 +1117,7 @@ trait UsersBase ]); $this->assertEquals(401, $session['headers']['status-code']); - + $this->updateProjectOnPasswordChangeProperty(true); $user = $this->client->call(Client::METHOD_PATCH, '/users/' . $data['userId'] . '/password', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1129,6 +1129,15 @@ trait UsersBase $this->assertNotEmpty($user['body']['$id']); $this->assertNotEmpty($user['body']['password']); + $sessions = $this->client->call(Client::METHOD_GET, '/users/' . $data['userId'] . '/sessions', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals($sessions['headers']['status-code'], 200); + $this->assertIsArray($sessions['body']); + $this->assertEmpty($sessions['body']['sessions']); + $session = $this->client->call(Client::METHOD_POST, '/account/sessions/email', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1138,7 +1147,7 @@ trait UsersBase ]); $this->assertEquals($session['headers']['status-code'], 201); - + $this->updateProjectOnPasswordChangeProperty(false); return $data; } From 74614e8d58c9244c5f50ed33d977e1b4f5fad05b Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Sat, 14 Jun 2025 18:09:20 +0530 Subject: [PATCH 150/362] updated description of on password change --- app/controllers/api/projects.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index cbdc1c5e05..c46dc4f603 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -94,7 +94,7 @@ App::post('/v1/projects') ->param('legalCity', '', new Text(256), 'Project legal City. Max length: 256 chars.', true) ->param('legalAddress', '', new Text(256), 'Project legal Address. Max length: 256 chars.', true) ->param('legalTaxId', '', new Text(256), 'Project legal Tax ID. Max length: 256 chars.', true) - ->param('onPasswordChange', false, new Boolean(), 'For invalding sessions', true) + ->param('onPasswordChange', false, new Boolean(), 'Auth option to allow invalidating existing sessions', true) ->inject('request') ->inject('response') ->inject('dbForPlatform') @@ -2520,7 +2520,7 @@ App::patch('/v1/projects/:projectId/auth/password-change') ] )) ->param('projectId', '', new UID(), 'Project unique ID.') -->param('onPasswordChange', false, new Boolean(), 'For invalidating project session') +->param('onPasswordChange', false, new Boolean(), 'Auth option to allow invalidating existing sessions') ->inject('response') ->inject('dbForPlatform') ->action(function (string $projectId, bool $onPasswordChange, Response $response, Database $dbForPlatform) { From 774291b5d8dc0742ab7470f9de5605f27fa031c8 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Sat, 14 Jun 2025 18:15:41 +0530 Subject: [PATCH 151/362] added onPasswordChange property to the console project --- app/config/console.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/config/console.php b/app/config/console.php index 1de3a99370..5c43aa22f6 100644 --- a/app/config/console.php +++ b/app/config/console.php @@ -39,7 +39,8 @@ $console = [ 'invites' => System::getEnv('_APP_CONSOLE_INVITES', 'enabled') === 'enabled', 'limit' => (System::getEnv('_APP_CONSOLE_WHITELIST_ROOT', 'enabled') === 'enabled') ? 1 : 0, // limit signup to 1 user 'duration' => Auth::TOKEN_EXPIRATION_LOGIN_LONG, // 1 Year in seconds - 'sessionAlerts' => System::getEnv('_APP_CONSOLE_SESSION_ALERTS', 'disabled') === 'enabled' + 'sessionAlerts' => System::getEnv('_APP_CONSOLE_SESSION_ALERTS', 'disabled') === 'enabled', + 'onPasswordChange' => true ], 'authWhitelistEmails' => (!empty(System::getEnv('_APP_CONSOLE_WHITELIST_EMAILS', null))) ? \explode(',', System::getEnv('_APP_CONSOLE_WHITELIST_EMAILS', null)) : [], 'authWhitelistIPs' => (!empty(System::getEnv('_APP_CONSOLE_WHITELIST_IPS', null))) ? \explode(',', System::getEnv('_APP_CONSOLE_WHITELIST_IPS', null)) : [], From 7a0ba95231560f80c610767b1dbeb63d0a104088 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 16 Jun 2025 23:05:52 +0530 Subject: [PATCH 152/362] updated onPasswordChange to invalidate session --- app/config/console.php | 2 +- app/controllers/api/projects.php | 19 +++++++++---------- app/controllers/api/users.php | 4 ++-- .../databases/session-invalidation.md | 1 + .../update-auth-on-password-change.md | 1 - .../Utopia/Response/Model/Project.php | 4 ++-- tests/e2e/Scopes/ProjectCustom.php | 6 +++--- .../Projects/ProjectsConsoleClientTest.php | 10 +++++----- tests/e2e/Services/Users/UsersBase.php | 4 ++-- 9 files changed, 25 insertions(+), 26 deletions(-) create mode 100644 docs/references/databases/session-invalidation.md delete mode 100644 docs/references/databases/update-auth-on-password-change.md diff --git a/app/config/console.php b/app/config/console.php index 5c43aa22f6..aa7de13ba0 100644 --- a/app/config/console.php +++ b/app/config/console.php @@ -40,7 +40,7 @@ $console = [ 'limit' => (System::getEnv('_APP_CONSOLE_WHITELIST_ROOT', 'enabled') === 'enabled') ? 1 : 0, // limit signup to 1 user 'duration' => Auth::TOKEN_EXPIRATION_LOGIN_LONG, // 1 Year in seconds 'sessionAlerts' => System::getEnv('_APP_CONSOLE_SESSION_ALERTS', 'disabled') === 'enabled', - 'onPasswordChange' => true + 'invalidateSessions' => true ], 'authWhitelistEmails' => (!empty(System::getEnv('_APP_CONSOLE_WHITELIST_EMAILS', null))) ? \explode(',', System::getEnv('_APP_CONSOLE_WHITELIST_EMAILS', null)) : [], 'authWhitelistIPs' => (!empty(System::getEnv('_APP_CONSOLE_WHITELIST_IPS', null))) ? \explode(',', System::getEnv('_APP_CONSOLE_WHITELIST_IPS', null)) : [], diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index c46dc4f603..116c32fd58 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -94,14 +94,13 @@ App::post('/v1/projects') ->param('legalCity', '', new Text(256), 'Project legal City. Max length: 256 chars.', true) ->param('legalAddress', '', new Text(256), 'Project legal Address. Max length: 256 chars.', true) ->param('legalTaxId', '', new Text(256), 'Project legal Tax ID. Max length: 256 chars.', true) - ->param('onPasswordChange', false, new Boolean(), 'Auth option to allow invalidating existing sessions', true) ->inject('request') ->inject('response') ->inject('dbForPlatform') ->inject('cache') ->inject('pools') ->inject('hooks') - ->action(function (string $projectId, string $name, string $teamId, string $region, string $description, string $logo, string $url, string $legalName, string $legalCountry, string $legalState, string $legalCity, string $legalAddress, string $legalTaxId, $onPasswordChange, Request $request, Response $response, Database $dbForPlatform, Cache $cache, Group $pools, Hooks $hooks) { + ->action(function (string $projectId, string $name, string $teamId, string $region, string $description, string $logo, string $url, string $legalName, string $legalCountry, string $legalState, string $legalCity, string $legalAddress, string $legalTaxId, Request $request, Response $response, Database $dbForPlatform, Cache $cache, Group $pools, Hooks $hooks) { $team = $dbForPlatform->getDocument('teams', $teamId); @@ -128,7 +127,7 @@ App::post('/v1/projects') 'membershipsUserName' => false, 'membershipsUserEmail' => false, 'membershipsMfa' => false, - 'onPasswordChange' => $onPasswordChange + 'invalidateSessions' => true ]; foreach ($auth as $method) { @@ -2502,15 +2501,15 @@ App::delete('/v1/projects/:projectId/templates/email/:type/:locale') ]), Response::MODEL_EMAIL_TEMPLATE); }); -App::patch('/v1/projects/:projectId/auth/password-change') -->desc('Update on password change of the project') +App::patch('/v1/projects/:projectId/auth/session-invalidation') +->desc('Update invalidate session option of the project') ->groups(['api', 'projects']) ->label('scope', 'projects.write') ->label('sdk', new Method( namespace: 'projects', group: 'auth', - name: 'updateOnPasswordChange', - description: '/docs/references/projects/update-auth-on-password-change.md', + name: 'updateInvalidateSessions', + description: '/docs/references/projects/session-invalidation.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -2520,10 +2519,10 @@ App::patch('/v1/projects/:projectId/auth/password-change') ] )) ->param('projectId', '', new UID(), 'Project unique ID.') -->param('onPasswordChange', false, new Boolean(), 'Auth option to allow invalidating existing sessions') +->param('invalidateSessions', false, new Boolean(), 'Auth option to allow invalidating existing sessions') ->inject('response') ->inject('dbForPlatform') -->action(function (string $projectId, bool $onPasswordChange, Response $response, Database $dbForPlatform) { +->action(function (string $projectId, bool $invalidateSessions, Response $response, Database $dbForPlatform) { $project = $dbForPlatform->getDocument('projects', $projectId); @@ -2532,7 +2531,7 @@ App::patch('/v1/projects/:projectId/auth/password-change') } $auths = $project->getAttribute('auths', []); - $auths['onPasswordChange'] = $onPasswordChange; + $auths['invalidateSessions'] = $invalidateSessions; $dbForPlatform->updateDocument('projects', $project->getId(), $project ->setAttribute('auths', $auths)); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index d9dd951c09..0b580170e1 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -1352,8 +1352,8 @@ App::patch('/v1/users/:userId/password') $user = $dbForProject->updateDocument('users', $user->getId(), $user); $sessions = $user->getAttribute('sessions', []); - $onPasswordChange = $project->getAttribute('auths', [])['onPasswordChange']; - if ($onPasswordChange) { + $invalidate = $project->getAttribute('auths', default: [])['invalidateSessions'] ?? false; + if ($invalidate) { foreach ($sessions as $session) { /** @var Document $session */ $dbForProject->deleteDocument('sessions', $session->getId()); diff --git a/docs/references/databases/session-invalidation.md b/docs/references/databases/session-invalidation.md new file mode 100644 index 0000000000..cbaf378624 --- /dev/null +++ b/docs/references/databases/session-invalidation.md @@ -0,0 +1 @@ +Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project. \ No newline at end of file diff --git a/docs/references/databases/update-auth-on-password-change.md b/docs/references/databases/update-auth-on-password-change.md deleted file mode 100644 index 1daf0a69df..0000000000 --- a/docs/references/databases/update-auth-on-password-change.md +++ /dev/null @@ -1 +0,0 @@ -On password change. Should be an optional auth security setting for projects, and enabled by default for console project. \ No newline at end of file diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index c9f900933f..a944c4e6e1 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -271,7 +271,7 @@ class Project extends Model 'default' => '', 'example' => self::TYPE_DATETIME_EXAMPLE, ]) - ->addRule('onPasswordChange', [ + ->addRule('invalidateSessions', [ 'type' => self::TYPE_BOOLEAN, 'description' => 'For invalidating all sessions', 'default' => false, @@ -382,7 +382,7 @@ class Project extends Model $document->setAttribute('authMembershipsUserName', $authValues['membershipsUserName'] ?? true); $document->setAttribute('authMembershipsUserEmail', $authValues['membershipsUserEmail'] ?? true); $document->setAttribute('authMembershipsMfa', $authValues['membershipsMfa'] ?? true); - $document->setAttribute('onPasswordChange', $authValues['onPasswordChange'] ?? false); + $document->setAttribute('invalidateSessions', $authValues['invalidateSessions'] ?? false); foreach ($auth as $index => $method) { $key = $method['key']; diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index 0225805054..5b079a6482 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -200,15 +200,15 @@ trait ProjectCustom return $key['body']['secret']; } - public function updateProjectOnPasswordChangeProperty(bool $value) + public function updateProjectinvalidateSessionsProperty(bool $value) { - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . self::$project['$id'] . '/auth/password-change', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . self::$project['$id'] . '/auth/session-invalidation', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'cookie' => 'a_session_console=' . $this->getRoot()['session'], 'x-appwrite-project' => 'console', ]), [ - 'onPasswordChange' => $value, + 'invalidateSessions' => $value, ]); return $response['headers']['status-code']; diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index d77e330e6a..5b7043805a 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -952,7 +952,7 @@ class ProjectsConsoleClientTest extends Scope } /** @depends testCreateProject */ - public function testUpdateProjectOnPasswordChange($data): array + public function testUpdateProjectInvalidateSessions($data): array { $id = $data['projectId']; @@ -963,15 +963,15 @@ class ProjectsConsoleClientTest extends Scope ], $this->getHeaders())); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertFalse($response['body']['onPasswordChange']); + $this->assertFalse($response['body']['invalidateSessions']); - $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/password-change', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/session-invalidation', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'onPasswordChange' => true, + 'invalidateSessions' => true, ]); - $this->assertTrue($response['body']['onPasswordChange']); + $this->assertTrue($response['body']['invalidateSessions']); return $data; } diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index 391f31da41..0aa5784930 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -1117,7 +1117,7 @@ trait UsersBase ]); $this->assertEquals(401, $session['headers']['status-code']); - $this->updateProjectOnPasswordChangeProperty(true); + $this->updateProjectinvalidateSessionsProperty(true); $user = $this->client->call(Client::METHOD_PATCH, '/users/' . $data['userId'] . '/password', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1147,7 +1147,7 @@ trait UsersBase ]); $this->assertEquals($session['headers']['status-code'], 201); - $this->updateProjectOnPasswordChangeProperty(false); + $this->updateProjectinvalidateSessionsProperty(false); return $data; } From 9bf4361761bd7de79f3ea8bf9dcb9c8de465a43e Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 16 Jun 2025 23:48:08 +0530 Subject: [PATCH 153/362] updated indentation --- app/controllers/api/projects.php | 62 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 116c32fd58..8fca702850 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -2502,38 +2502,38 @@ App::delete('/v1/projects/:projectId/templates/email/:type/:locale') }); App::patch('/v1/projects/:projectId/auth/session-invalidation') -->desc('Update invalidate session option of the project') -->groups(['api', 'projects']) -->label('scope', 'projects.write') -->label('sdk', new Method( - namespace: 'projects', - group: 'auth', - name: 'updateInvalidateSessions', - description: '/docs/references/projects/session-invalidation.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_PROJECT, - ) - ] -)) -->param('projectId', '', new UID(), 'Project unique ID.') -->param('invalidateSessions', false, new Boolean(), 'Auth option to allow invalidating existing sessions') -->inject('response') -->inject('dbForPlatform') -->action(function (string $projectId, bool $invalidateSessions, Response $response, Database $dbForPlatform) { + ->desc('Update invalidate session option of the project') + ->groups(['api', 'projects']) + ->label('scope', 'projects.write') + ->label('sdk', new Method( + namespace: 'projects', + group: 'auth', + name: 'updateInvalidateSessions', + description: '/docs/references/projects/session-invalidation.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) + ->param('projectId', '', new UID(), 'Project unique ID.') + ->param('invalidateSessions', false, new Boolean(), 'Auth option to allow invalidating existing sessions') + ->inject('response') + ->inject('dbForPlatform') + ->action(function (string $projectId, bool $invalidateSessions, Response $response, Database $dbForPlatform) { - $project = $dbForPlatform->getDocument('projects', $projectId); + $project = $dbForPlatform->getDocument('projects', $projectId); - if ($project->isEmpty()) { - throw new Exception(Exception::PROJECT_NOT_FOUND); - } + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } - $auths = $project->getAttribute('auths', []); - $auths['invalidateSessions'] = $invalidateSessions; - $dbForPlatform->updateDocument('projects', $project->getId(), $project - ->setAttribute('auths', $auths)); + $auths = $project->getAttribute('auths', []); + $auths['invalidateSessions'] = $invalidateSessions; + $dbForPlatform->updateDocument('projects', $project->getId(), $project + ->setAttribute('auths', $auths)); - $response->dynamic($project, Response::MODEL_PROJECT); -}); + $response->dynamic($project, Response::MODEL_PROJECT); + }); From 28fbd648645084c67d73300643441d14154da47f Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 17 Jun 2025 00:40:32 +0530 Subject: [PATCH 154/362] updated session invalidation tests , models and descriptions --- app/controllers/api/projects.php | 6 ++-- .../update-session-invalidation.md} | 0 .../Utopia/Response/Model/Project.php | 14 ++++----- tests/e2e/Scopes/ProjectCustom.php | 2 +- .../Projects/ProjectsConsoleClientTest.php | 30 +++++++++++++++++-- 5 files changed, 38 insertions(+), 14 deletions(-) rename docs/references/{databases/session-invalidation.md => projects/update-session-invalidation.md} (100%) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 8fca702850..42bb6c3bcb 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -2508,8 +2508,8 @@ App::patch('/v1/projects/:projectId/auth/session-invalidation') ->label('sdk', new Method( namespace: 'projects', group: 'auth', - name: 'updateInvalidateSessions', - description: '/docs/references/projects/session-invalidation.md', + name: 'updateSessionInvalidation', + description: '/docs/references/projects/update-session-invalidation.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( @@ -2519,7 +2519,7 @@ App::patch('/v1/projects/:projectId/auth/session-invalidation') ] )) ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('invalidateSessions', false, new Boolean(), 'Auth option to allow invalidating existing sessions') + ->param('enabled', false, new Boolean(), 'Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change') ->inject('response') ->inject('dbForPlatform') ->action(function (string $projectId, bool $invalidateSessions, Response $response, Database $dbForPlatform) { diff --git a/docs/references/databases/session-invalidation.md b/docs/references/projects/update-session-invalidation.md similarity index 100% rename from docs/references/databases/session-invalidation.md rename to docs/references/projects/update-session-invalidation.md diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index a944c4e6e1..ef50d81c31 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -169,6 +169,12 @@ class Project extends Model 'default' => false, 'example' => true, ]) + ->addRule('authInvalidateSessions', [ + 'type' => self::TYPE_BOOLEAN, + 'description' => 'Whether or not all existing sessions should be invalidated on password change', + 'default' => false, + 'example' => self::TYPE_BOOLEAN, + ]) ->addRule('oAuthProviders', [ 'type' => Response::MODEL_AUTH_PROVIDER, 'description' => 'List of Auth Providers.', @@ -271,12 +277,6 @@ class Project extends Model 'default' => '', 'example' => self::TYPE_DATETIME_EXAMPLE, ]) - ->addRule('invalidateSessions', [ - 'type' => self::TYPE_BOOLEAN, - 'description' => 'For invalidating all sessions', - 'default' => false, - 'example' => self::TYPE_BOOLEAN, - ]) ; $services = Config::getParam('services', []); @@ -382,7 +382,7 @@ class Project extends Model $document->setAttribute('authMembershipsUserName', $authValues['membershipsUserName'] ?? true); $document->setAttribute('authMembershipsUserEmail', $authValues['membershipsUserEmail'] ?? true); $document->setAttribute('authMembershipsMfa', $authValues['membershipsMfa'] ?? true); - $document->setAttribute('invalidateSessions', $authValues['invalidateSessions'] ?? false); + $document->setAttribute('authInvalidateSessions', $authValues['invalidateSessions'] ?? false); foreach ($auth as $index => $method) { $key = $method['key']; diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index 5b079a6482..51aebeaef7 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -208,7 +208,7 @@ trait ProjectCustom 'cookie' => 'a_session_console=' . $this->getRoot()['session'], 'x-appwrite-project' => 'console', ]), [ - 'invalidateSessions' => $value, + 'enabled' => $value, ]); return $response['headers']['status-code']; diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 5b7043805a..1a9cf3b586 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -963,15 +963,39 @@ class ProjectsConsoleClientTest extends Scope ], $this->getHeaders())); $this->assertEquals(200, $response['headers']['status-code']); - $this->assertFalse($response['body']['invalidateSessions']); + $this->assertTrue($response['body']['authInvalidateSessions']); $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/session-invalidation', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'invalidateSessions' => true, + 'enabled' => false, ]); - $this->assertTrue($response['body']['invalidateSessions']); + $this->assertFalse($response['body']['authInvalidateSessions']); + + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'console', + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertFalse($response['body']['authInvalidateSessions']); + + $response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/auth/session-invalidation', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'enabled' => true, + ]); + $this->assertTrue($response['body']['authInvalidateSessions']); + + $response = $this->client->call(Client::METHOD_GET, '/projects/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => 'console', + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertTrue($response['body']['authInvalidateSessions']); return $data; } From e236aac0ea4388e61e30e9c65af4a87c6f7b5d07 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 17 Jun 2025 09:57:35 +0530 Subject: [PATCH 155/362] =?UTF-8?q?fix:=20events=20logic=20=F0=9F=98=AE?= =?UTF-8?q?=E2=80=8D=F0=9F=92=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Http/Databases/Collections/Documents/Create.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index e68a27ba34..6005495a68 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -56,7 +56,6 @@ class Create extends Action ->setHttpPath('/v1/databases/:databaseId/collections/:collectionId/documents') ->desc('Create document') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].create') ->label('scope', 'documents.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'document.create') @@ -418,12 +417,6 @@ class Create extends Action $response->setStatusCode(SwooleResponse::STATUS_CODE_CREATED); - // BIG TODO: @itznotabug - need to check what to do for bulk api because there's not just one `[document/rowId]`. - $queueForEvents - ->setParam('documentId', $documents[0]->getId()) - ->setParam('rowId', $documents[0]->getId()) - // TODO: @itznotabug - check if the events mirroring works here! - ->setEvent('databases.[databaseId].collections.[collectionId].documents.[documentId].create'); if ($isBulk) { $response->dynamic(new Document([ @@ -434,6 +427,11 @@ class Create extends Action return; } + $queueForEvents + ->setParam('documentId', $documents[0]->getId()) + ->setParam('rowId', $documents[0]->getId()) + ->setEvent('databases.[databaseId].collections.[collectionId].documents.[documentId].create'); + $response->dynamic( $documents[0], $this->getResponseModel() From 1337b759deffd552c05c28e80c82f23ff3b6720b Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 17 Jun 2025 10:15:45 +0530 Subject: [PATCH 156/362] fix: remove event for bulk api support. --- .../Modules/Databases/Http/Databases/Tables/Rows/Create.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index 881d2b28ed..03e5548ddb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -47,7 +47,6 @@ class Create extends DocumentCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('Create row') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].create') ->label('scope', 'documents.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') From deb8b3a789d5d9d129fd3dc0059bcc0884e73568 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 17 Jun 2025 11:11:47 +0530 Subject: [PATCH 157/362] revert: stuff that is not supposed to be in this branch. --- .coderabbit.yaml | 7 ++++- .github/workflows/tests.yml | 6 ++-- app/config/specs/open-api3-latest-client.json | 23 ++++++++++++++ .../specs/open-api3-latest-console.json | 11 +++++++ app/config/specs/swagger2-latest-client.json | 23 ++++++++++++++ app/config/specs/swagger2-latest-console.json | 9 ++++++ app/controllers/api/account.php | 6 ++-- app/controllers/api/vcs.php | 5 ++-- app/controllers/general.php | 21 +++++++------ app/views/install/compose.phtml | 2 +- docker-compose.yml | 4 +-- .../Functions/Http/Executions/Create.php | 6 ++-- src/Appwrite/Platform/Workers/Deletes.php | 2 +- src/Appwrite/Platform/Workers/Functions.php | 6 ++-- .../Services/Sites/SitesCustomServerTest.php | 30 +++++++++---------- 15 files changed, 118 insertions(+), 43 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 822c470cd8..42b705b571 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -9,4 +9,9 @@ reviews: - main - 1.6.x - 1.7.x - - 1.8.x \ No newline at end of file + - 1.8.x + high_level_summary: false + poem: false + sequence_diagrams: false + collapse_walkthrough: true + changed_files_summary: false diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ff548f3447..97f3696e67 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -122,7 +122,7 @@ jobs: docker load --input /tmp/${{ env.IMAGE }}.tar docker compose up -d sleep 10 - + - name: Wait for Open Runtimes timeout-minutes: 3 run: | @@ -273,7 +273,7 @@ jobs: export _APP_DATABASE_SHARED_TABLES=database_db_main export _APP_DATABASE_SHARED_TABLES_V1= fi - + docker compose exec -T \ -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ @@ -359,4 +359,4 @@ jobs: docker compose exec -T \ -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ - appwrite test /usr/src/code/tests/e2e/Services/Projects --debug --group=devKeys \ No newline at end of file + appwrite test /usr/src/code/tests/e2e/Services/Projects --debug --group=devKeys diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 8f03738786..73a027f4bb 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4492,6 +4492,29 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 85ef1334d4..92ba5c6829 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -35112,6 +35112,17 @@ "default": "" }, "in": "query" + }, + { + "name": "providerReference", + "description": "Git reference (branch, tag, commit) to get contents from", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" } ] } diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 33fe1a93c9..e369e2f0f3 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4638,6 +4638,29 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index a11fd21b42..da959a8180 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -35319,6 +35319,15 @@ "x-example": "", "default": "", "in": "query" + }, + { + "name": "providerReference", + "description": "Git reference (branch, tag, commit) to get contents from", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" } ] } diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 0c53423325..2d0d0eac40 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -3880,7 +3880,7 @@ App::patch('/v1/account/mfa') if ($user->getAttribute('phone', false) && $user->getAttribute('phoneVerification', false)) { $factors[] = Type::PHONE; } - $factors = \array_unique($factors); + $factors = \array_values(\array_unique($factors)); $session->setAttribute('factors', $factors); $dbForProject->updateDocument('sessions', $session->getId(), $session); @@ -4065,7 +4065,7 @@ App::put('/v1/account/mfa/authenticators/:type') $factors = $session->getAttribute('factors', []); $factors[] = $type; - $factors = \array_unique($factors); + $factors = \array_values(\array_unique($factors)); $session->setAttribute('factors', $factors); $dbForProject->updateDocument('sessions', $session->getId(), $session); @@ -4549,7 +4549,7 @@ App::put('/v1/account/mfa/challenge') $factors = $session->getAttribute('factors', []); $factors[] = $type; - $factors = \array_unique($factors); + $factors = \array_values(\array_unique($factors)); $session ->setAttribute('factors', $factors) diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 31b2539b99..69d4c490d9 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -605,11 +605,12 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro ->param('installationId', '', new Text(256), 'Installation Id') ->param('providerRepositoryId', '', new Text(256), 'Repository Id') ->param('providerRootDirectory', '', new Text(256, 0), 'Path to get contents of nested directory', true) + ->param('providerReference', '', new Text(256, 0), 'Git reference (branch, tag, commit) to get contents from', true) ->inject('gitHub') ->inject('response') ->inject('project') ->inject('dbForPlatform') - ->action(function (string $installationId, string $providerRepositoryId, string $providerRootDirectory, GitHub $github, Response $response, Document $project, Database $dbForPlatform) { + ->action(function (string $installationId, string $providerRepositoryId, string $providerRootDirectory, string $providerReference, GitHub $github, Response $response, Document $project, Database $dbForPlatform) { $installation = $dbForPlatform->getDocument('installations', $installationId); if ($installation->isEmpty()) { @@ -631,7 +632,7 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro throw new Exception(Exception::PROVIDER_REPOSITORY_NOT_FOUND); } - $contents = $github->listRepositoryContents($owner, $repositoryName, $providerRootDirectory); + $contents = $github->listRepositoryContents($owner, $repositoryName, $providerRootDirectory, $providerReference); $vcsContents = []; foreach ($contents as $content) { diff --git a/app/controllers/general.php b/app/controllers/general.php index 91e414d077..c979f8f1b5 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -513,28 +513,27 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw 'function' => $deployment->getAttribute('entrypoint', ''), 'site' => '', }; + $source = $deployment->getAttribute('buildPath', ''); + $extension = str_ends_with($source, '.tar') ? 'tar' : 'tar.gz'; - if ($type === 'function') { - $runtimeEntrypoint = match ($version) { - 'v2' => '', - default => 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $runtime['startCommand'] . '"' - }; - } elseif ($type === 'site') { + $startCommand = $runtime['startCommand']; + if ($type === 'site') { $frameworks = Config::getParam('frameworks', []); $framework = $frameworks[$resource->getAttribute('framework', '')] ?? null; - $startCommand = $runtime['startCommand']; - if (!is_null($framework)) { $adapter = ($framework['adapters'] ?? [])[$deployment->getAttribute('adapter', '')] ?? null; if (!is_null($adapter) && isset($adapter['startCommand'])) { $startCommand = $adapter['startCommand']; } } - - $runtimeEntrypoint = 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $startCommand . '"'; } + $runtimeEntrypoint = match ($version) { + 'v2' => '', + default => "cp /tmp/code.$extension /mnt/code/code.$extension && nohup helpers/start.sh \"$startCommand\"", + }; + $entrypoint = match ($type) { 'function' => $deployment->getAttribute('entrypoint', ''), 'site' => '', @@ -547,7 +546,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw variables: $vars, timeout: $resource->getAttribute('timeout', 30), image: $runtime['image'], - source: $deployment->getAttribute('buildPath', ''), + source: $source, entrypoint: $entrypoint, version: $version, path: $path, diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 2d8f2b35ab..e3699662a4 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -841,7 +841,7 @@ $image = $this->getParam('image', ''); - _APP_DB_PASS appwrite-assistant: - image: appwrite/assistant:0.4.0 + image: appwrite/assistant:0.8.3 container_name: appwrite-assistant <<: *x-logging restart: unless-stopped diff --git a/docker-compose.yml b/docker-compose.yml index 29a43aca91..0b653af8c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -213,7 +213,7 @@ services: appwrite-console: <<: *x-logging container_name: appwrite-console - image: appwrite/console:6.0.32 + image: appwrite/console:6.0.41 restart: unless-stopped networks: - appwrite @@ -934,7 +934,7 @@ services: appwrite-assistant: container_name: appwrite-assistant - image: appwrite/assistant:0.7.0 + image: appwrite/assistant:0.8.3 networks: - appwrite environment: diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php index 0aec31e5fd..bbdbf8ab45 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Executions/Create.php @@ -386,7 +386,9 @@ class Create extends Base try { $version = $function->getAttribute('version', 'v2'); $command = $runtime['startCommand']; - $command = $version === 'v2' ? '' : 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $command . '"'; + $source = $deployment->getAttribute('buildPath', ''); + $extension = str_ends_with($source, '.tar') ? 'tar' : 'tar.gz'; + $command = $version === 'v2' ? '' : "cp /tmp/code.$extension /mnt/code/code.$extension && nohup helpers/start.sh \"$command\""; $executionResponse = $executor->createExecution( projectId: $project->getId(), deploymentId: $deployment->getId(), @@ -394,7 +396,7 @@ class Create extends Base variables: $vars, timeout: $function->getAttribute('timeout', 0), image: $runtime['image'], - source: $deployment->getAttribute('buildPath', ''), + source: $source, entrypoint: $deployment->getAttribute('entrypoint', ''), version: $version, path: $path, diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index 8ed96c76a2..2f41001b58 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -495,7 +495,7 @@ class Deletes extends Action * @throws Authorization * @throws DatabaseException */ - private function deleteProject(Database $dbForPlatform, callable $getProjectDB, Device $deviceForFiles, Device $deviceForSites, Device $deviceForFunctions, Device $deviceForBuilds, Device $deviceForCache, CertificatesAdapter $certificates, Document $document): void + protected function deleteProject(Database $dbForPlatform, callable $getProjectDB, Device $deviceForFiles, Device $deviceForSites, Device $deviceForFunctions, Device $deviceForBuilds, Device $deviceForCache, CertificatesAdapter $certificates, Document $document): void { $projectInternalId = $document->getSequence(); $projectId = $document->getId(); diff --git a/src/Appwrite/Platform/Workers/Functions.php b/src/Appwrite/Platform/Workers/Functions.php index a9126583ce..8b3347775a 100644 --- a/src/Appwrite/Platform/Workers/Functions.php +++ b/src/Appwrite/Platform/Workers/Functions.php @@ -519,7 +519,9 @@ class Functions extends Action try { $version = $function->getAttribute('version', 'v2'); $command = $runtime['startCommand']; - $command = $version === 'v2' ? '' : 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $command . '"'; + $source = $deployment->getAttribute('buildPath', ''); + $extension = str_ends_with($source, '.tar') ? 'tar' : 'tar.gz'; + $command = $version === 'v2' ? '' : "cp /tmp/code.$extension /mnt/code/code.$extension && nohup helpers/start.sh \"$command\""; $executionResponse = $executor->createExecution( projectId: $project->getId(), deploymentId: $deploymentId, @@ -527,7 +529,7 @@ class Functions extends Action variables: $vars, timeout: $function->getAttribute('timeout', 0), image: $runtime['image'], - source: $deployment->getAttribute('buildPath', ''), + source: $source, entrypoint: $deployment->getAttribute('entrypoint', ''), version: $version, path: $path, diff --git a/tests/e2e/Services/Sites/SitesCustomServerTest.php b/tests/e2e/Services/Sites/SitesCustomServerTest.php index 8459e46c6f..b3ea045430 100644 --- a/tests/e2e/Services/Sites/SitesCustomServerTest.php +++ b/tests/e2e/Services/Sites/SitesCustomServerTest.php @@ -477,7 +477,7 @@ class SitesCustomServerTest extends Scope $this->assertNotEmpty($domain); $deploymentId = $this->setupDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => 'true' ]); $this->assertNotEmpty($deploymentId); @@ -856,7 +856,7 @@ class SitesCustomServerTest extends Scope $deployment = $this->createDeployment($siteId, [ 'siteId' => $siteId, - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => true, ]); @@ -874,7 +874,7 @@ class SitesCustomServerTest extends Scope }, 50000, 500); $deployment = $this->createDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => 'false' ]); @@ -917,7 +917,7 @@ class SitesCustomServerTest extends Scope $this->assertNotNull($siteId); $deployment = $this->createDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => 'false' ]); @@ -969,7 +969,7 @@ class SitesCustomServerTest extends Scope $this->assertNotNull($siteId); $deployment = $this->createDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => 'false' ]); @@ -1014,7 +1014,7 @@ class SitesCustomServerTest extends Scope $this->assertNotNull($siteId); $deployment = $this->createDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => 'false' ]); @@ -1022,7 +1022,7 @@ class SitesCustomServerTest extends Scope $this->assertEquals(202, $deployment['headers']['status-code']); $deployment = $this->createDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => 'false' ]); @@ -1193,7 +1193,7 @@ class SitesCustomServerTest extends Scope $this->assertNotNull($siteId); $deployment = $this->createDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => 'false' ]); @@ -1318,7 +1318,7 @@ class SitesCustomServerTest extends Scope $this->assertNotNull($siteId); $deployment = $this->createDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => 'false' ]); @@ -1818,7 +1818,7 @@ class SitesCustomServerTest extends Scope ]); $deploymentId = $this->setupDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => true ]); @@ -2435,7 +2435,7 @@ class SitesCustomServerTest extends Scope $this->assertNotEmpty($siteId); $deploymentId = $this->setupDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => 'true' ]); @@ -2477,7 +2477,7 @@ class SitesCustomServerTest extends Scope // test canceled deployment error page $deployment = $this->createDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => 'true' ]); $deploymentId = $deployment['body']['$id'] ?? ''; @@ -2517,7 +2517,7 @@ class SitesCustomServerTest extends Scope $this->assertStringContainsString('View deployments', $response['body']); $deployment = $this->createDeployment($siteId, [ - 'code' => $this->packageSite('astro'), + 'code' => $this->packageSite('static-single-file'), 'activate' => 'true' ]); @@ -2606,7 +2606,7 @@ class SitesCustomServerTest extends Scope $this->assertNotEmpty($siteId); $deployment = $this->createDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => true ]); $this->assertEquals(202, $deployment['headers']['status-code']); @@ -2635,7 +2635,7 @@ class SitesCustomServerTest extends Scope $this->assertNotEmpty($siteId); $deployment = $this->createDeployment($siteId, [ - 'code' => $this->packageSite('static'), + 'code' => $this->packageSite('static-single-file'), 'activate' => true ]); $this->assertEquals(202, $deployment['headers']['status-code']); From 57d8185b166c5e05bcf4ab632ba276886c266a0e Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 17 Jun 2025 11:26:22 +0530 Subject: [PATCH 158/362] test: backwards compat for request/response filters. --- .github/workflows/tests.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 97f3696e67..b3f17100b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -146,6 +146,7 @@ jobs: Avatars, Console, Databases, + Databases 1.7.4, Functions, FunctionsSchedule, GraphQL, @@ -191,14 +192,21 @@ jobs: - name: Run ${{ matrix.service }} tests with Project table mode run: | - echo "Using project tables" + if [[ "${{ matrix.service }}" == "Databases 1.7.4" ]]; then + echo "Using Database 1.7 format" + export _APP_SYSTEM_RESPONSE_FORMAT=1.7.4 + service="Databases" + else + service="${{ matrix.service }}" + fi + export _APP_DATABASE_SHARED_TABLES= export _APP_DATABASE_SHARED_TABLES_V1= docker compose exec -T \ -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ - appwrite test /usr/src/code/tests/e2e/Services/${{ matrix.service }} --debug --exclude-group devKeys + appwrite test /usr/src/code/tests/e2e/Services/$service --debug --exclude-group devKeys e2e_shared_mode_test: name: E2E Shared Mode Service Test @@ -214,6 +222,7 @@ jobs: Avatars, Console, Databases, + Databases 1.7.4, Functions, FunctionsSchedule, GraphQL, @@ -273,11 +282,20 @@ jobs: export _APP_DATABASE_SHARED_TABLES=database_db_main export _APP_DATABASE_SHARED_TABLES_V1= fi + + if [[ "${{ matrix.service }}" == "Databases 1.7.4" ]]; then + echo "Using Database 1.6 format" + export _APP_SYSTEM_RESPONSE_FORMAT=1.7.4 + service="Databases" + else + export _APP_SYSTEM_RESPONSE_FORMAT= + service="${{ matrix.service }}" + fi docker compose exec -T \ -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ - appwrite test /usr/src/code/tests/e2e/Services/${{ matrix.service }} --debug --exclude-group devKeys + appwrite test /usr/src/code/tests/e2e/Services/$service --debug --exclude-group devKeys e2e_dev_keys: name: E2E Service Test (Dev Keys) From bfb383e28ae808d695bfbb204545d70d2a446c45 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 17 Jun 2025 11:47:40 +0530 Subject: [PATCH 159/362] test: backwards compat for request/response filters on latest `1.6.x`. --- .github/workflows/tests.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b3f17100b8..1c7292ea91 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -146,7 +146,7 @@ jobs: Avatars, Console, Databases, - Databases 1.7.4, + Databases 1.6.2, Functions, FunctionsSchedule, GraphQL, @@ -192,9 +192,9 @@ jobs: - name: Run ${{ matrix.service }} tests with Project table mode run: | - if [[ "${{ matrix.service }}" == "Databases 1.7.4" ]]; then - echo "Using Database 1.7 format" - export _APP_SYSTEM_RESPONSE_FORMAT=1.7.4 + if [[ "${{ matrix.service }}" == "Databases 1.6.2" ]]; then + echo "Using Database 1.6.2 format" + export _APP_SYSTEM_RESPONSE_FORMAT=1.6.2 service="Databases" else service="${{ matrix.service }}" @@ -222,7 +222,7 @@ jobs: Avatars, Console, Databases, - Databases 1.7.4, + Databases 1.6.2, Functions, FunctionsSchedule, GraphQL, @@ -283,9 +283,9 @@ jobs: export _APP_DATABASE_SHARED_TABLES_V1= fi - if [[ "${{ matrix.service }}" == "Databases 1.7.4" ]]; then - echo "Using Database 1.6 format" - export _APP_SYSTEM_RESPONSE_FORMAT=1.7.4 + if [[ "${{ matrix.service }}" == "Databases 1.6.2" ]]; then + echo "Using Database 1.6.2 format" + export _APP_SYSTEM_RESPONSE_FORMAT=1.6.2 service="Databases" else export _APP_SYSTEM_RESPONSE_FORMAT= From 1e39d8d6ee0474f74e16db0795c77fbcc7e2a65b Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 17 Jun 2025 12:01:50 +0530 Subject: [PATCH 160/362] revert: sanity check tests! --- .github/workflows/tests.yml | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1c7292ea91..97f3696e67 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -146,7 +146,6 @@ jobs: Avatars, Console, Databases, - Databases 1.6.2, Functions, FunctionsSchedule, GraphQL, @@ -192,21 +191,14 @@ jobs: - name: Run ${{ matrix.service }} tests with Project table mode run: | - if [[ "${{ matrix.service }}" == "Databases 1.6.2" ]]; then - echo "Using Database 1.6.2 format" - export _APP_SYSTEM_RESPONSE_FORMAT=1.6.2 - service="Databases" - else - service="${{ matrix.service }}" - fi - + echo "Using project tables" export _APP_DATABASE_SHARED_TABLES= export _APP_DATABASE_SHARED_TABLES_V1= docker compose exec -T \ -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ - appwrite test /usr/src/code/tests/e2e/Services/$service --debug --exclude-group devKeys + appwrite test /usr/src/code/tests/e2e/Services/${{ matrix.service }} --debug --exclude-group devKeys e2e_shared_mode_test: name: E2E Shared Mode Service Test @@ -222,7 +214,6 @@ jobs: Avatars, Console, Databases, - Databases 1.6.2, Functions, FunctionsSchedule, GraphQL, @@ -282,20 +273,11 @@ jobs: export _APP_DATABASE_SHARED_TABLES=database_db_main export _APP_DATABASE_SHARED_TABLES_V1= fi - - if [[ "${{ matrix.service }}" == "Databases 1.6.2" ]]; then - echo "Using Database 1.6.2 format" - export _APP_SYSTEM_RESPONSE_FORMAT=1.6.2 - service="Databases" - else - export _APP_SYSTEM_RESPONSE_FORMAT= - service="${{ matrix.service }}" - fi docker compose exec -T \ -e _APP_DATABASE_SHARED_TABLES \ -e _APP_DATABASE_SHARED_TABLES_V1 \ - appwrite test /usr/src/code/tests/e2e/Services/$service --debug --exclude-group devKeys + appwrite test /usr/src/code/tests/e2e/Services/${{ matrix.service }} --debug --exclude-group devKeys e2e_dev_keys: name: E2E Service Test (Dev Keys) From 1fbbbee31012d5d0a430f24b6f522372af957c10 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 17 Jun 2025 15:01:13 +0530 Subject: [PATCH 161/362] update: add cached logic to `processDocument`. --- .../Collections/Documents/Action.php | 93 +++++++++++++++++++ .../Collections/Documents/Create.php | 39 +------- .../Collections/Documents/Delete.php | 38 +------- .../Databases/Collections/Documents/Get.php | 52 ++--------- .../Collections/Documents/Update.php | 37 +------- .../Collections/Documents/Upsert.php | 37 +------- .../Databases/Collections/Documents/XList.php | 66 ++----------- 7 files changed, 126 insertions(+), 236 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index c0e71d3730..32e26bb344 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -4,6 +4,9 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documen use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Context; +use Utopia\Database\Database; +use Utopia\Database\Document; +use Utopia\Database\Validator\Authorization; use Utopia\Platform\Action as UtopiaAction; abstract class Action extends UtopiaAction @@ -193,4 +196,94 @@ abstract class Action extends UtopiaAction { return $this->isCollectionsAPI() ? 'collection' : 'table'; } + + /** + * Resolves relationships in a document and attaches metadata. + */ + final protected function resolveDocumentRelations(Document $document, Document $collection, array &$context): bool + { + /* @type Document $database */ + $database = $context['database']; + + /* @type Database $dbForProject */ + $dbForProject = $context['dbForProject']; + + /* remove `$collection` if needed */ + $removeCollection = $context['removeCollection'] ?? false; + + /* count operations and use `continue` inside loop */ + $trackOperations = array_key_exists('trackOperations', $context); + + if (!$trackOperations) { + $context['operations'] ??= 0; + } elseif ($document->isEmpty()) { + return false; + } + + $operations = &$context['operations']; + $collectionsCache = &$context['collectionsCache']; + + $operations++; + $collectionId = $collection->getId(); + + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $collectionId); + + if ($removeCollection) { + $document->removeAttribute('$collection'); + } + + $relationships = $collectionsCache[$collectionId] ??= \array_filter( + $collection->getAttribute('attributes', []), + fn ($attr) => $attr->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $key = $relationship->getAttribute('key'); + $related = $document->getAttribute($key); + + if (empty($related)) { + if (\in_array(\gettype($related), ['array', 'object'])) { + $operations++; + } + continue; + } + + $relations = \is_array($related) ? $related : [$related]; + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + + if (!isset($collectionsCache[$relatedCollectionId])) { + $relatedCollectionDoc = Authorization::skip( + fn () => $dbForProject->getDocument( + 'database_' . $database->getSequence(), + $relatedCollectionId + ) + ); + + $collectionsCache[$relatedCollectionId] = \array_filter( + $relatedCollectionDoc->getAttribute('attributes', []), + fn ($attr) => $attr->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + } + + foreach ($relations as $index => $relation) { + if ($relation instanceof Document) { + $relatedCollection = new Document([ + '$id' => $relatedCollectionId, + 'attributes' => $collectionsCache[$relatedCollectionId], + ]); + + $this->resolveDocumentRelations(document: $relation, collection: $relatedCollection, context: $context); + } + } + + if (\is_array($related)) { + $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + } elseif (empty($relations)) { + $document->setAttribute($relationship->getAttribute('key'), null); + } + } + + return true; + } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 6005495a68..47c6acf0b7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -373,42 +373,13 @@ class Create extends Action ->setParam('tableId', $collection->getId()) ->setContext($this->getCollectionsEventsContext(), $collection); - // Add $collectionId and $databaseId for all documents - $processDocument = function (Document $table, Document $document) use (&$processDocument, $dbForProject, $database) { - $document->removeAttribute('$collection'); - $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processDocument($relatedCollection, $relation); - } - } - } - }; + $collectionsCache = []; + $removeCollection = true; + $context = compact('database', 'dbForProject', 'collectionsCache', 'removeCollection'); foreach ($documents as $document) { - $processDocument($collection, $document); + // Add $collectionId and $databaseId for all documents + $this->resolveDocumentRelations(document: $document, collection: $collection, context: $context); } $queueForStatsUsage diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index dc307071e4..9f1f27b1f8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -12,7 +12,6 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; use Utopia\Database\Exception\Conflict as ConflictException; use Utopia\Database\Exception\Restricted as RestrictedException; use Utopia\Database\Validator\Authorization; @@ -115,40 +114,11 @@ class Delete extends Action throw new Exception($this->getRestrictedException()); } + $collectionsCache = []; + $context = compact('database', 'dbForProject', 'collectionsCache'); + // Add $collection and $databaseId for all documents - $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database) { - $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); - - $relationships = \array_filter( - $collection->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processDocument($relatedCollection, $relation); - } - } - } - }; - - $processDocument($collection, $document); + $this->resolveDocumentRelations(document: $document, collection: $collection, context: $context); $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index 3f7f74ee75..bf1acb8086 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -11,7 +11,6 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; -use Utopia\Database\Document; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; @@ -101,52 +100,15 @@ class Get extends Action } $operations = 0; + $collectionsCache = []; + $trackOperations = true; + $context = compact('database', 'dbForProject', 'operations', 'trackOperations', 'collectionsCache'); - // Add $collectionId and $databaseId for all rows - $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database, &$operations) { - if ($document->isEmpty()) { - return; - } + // Add $collectionId and $databaseId for all documents + $this->resolveDocumentRelations(document: $document, collection: $collection, context: $context); - $operations++; - - $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); - - $relationships = \array_filter( - $collection->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - if (\in_array(\gettype($related), ['array', 'object'])) { - $operations++; - } - - continue; - } - - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processDocument($relatedCollection, $relation); - } - } - } - }; - - $processDocument($collection, $document); + // get updated from the context + $operations = $context['operations']; $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 3bc97e817b..b946731c7a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -247,40 +247,11 @@ class Update extends Action throw new Exception($this->getInvalidStructureException(), $e->getMessage()); } + $collectionsCache = []; + $context = compact('database', 'dbForProject', 'collectionsCache'); + // Add $collectionId and $databaseId for all documents - $processDocument = function (Document $table, Document $row) use (&$processDocument, $dbForProject, $database) { - $row->setAttribute('$databaseId', $database->getId()); - $row->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $row->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processDocument($relatedCollection, $relation); - } - } - } - }; - - $processDocument($collection, $document); + $this->resolveDocumentRelations(document: $document, collection: $collection, context: $context); $response->dynamic($document, $this->getResponseModel()); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index ebe30f6970..d27ff632b8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -235,41 +235,12 @@ class Upsert extends Action throw new Exception($this->getInvalidStructureException(), $e->getMessage()); } + $collectionsCache = []; $document = $upserted[0]; + $context = compact('database', 'dbForProject', 'collectionsCache'); + // Add $collectionId and $databaseId for all documents - $processDocument = function (Document $table, Document $document) use (&$processDocument, $dbForProject, $database) { - $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $table->getId()); - - $relationships = \array_filter( - $table->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - continue; - } - if (!\is_array($related)) { - $related = [$related]; - } - - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - $relatedCollection = Authorization::skip( - fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId) - ); - - foreach ($related as $relation) { - if ($relation instanceof Document) { - $processDocument($relatedCollection, $relation); - } - } - } - }; - - $processDocument($collection, $document); + $this->resolveDocumentRelations(document: $document, collection: $collection, context: $context); $relationships = \array_map( fn ($document) => $document->getAttribute('key'), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 0012b8339a..b87efe42de 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -130,67 +130,19 @@ class XList extends Action } $operations = 0; + $collectionsCache = []; + $trackOperations = true; + $removeCollection = true; + $context = compact('database', 'dbForProject', 'operations', 'collectionsCache', 'removeCollection', 'trackOperations'); // Add $collectionId and $databaseId for all documents - $processDocument = (function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database, &$operations): bool { - if ($document->isEmpty()) { - return false; - } - - $operations++; - - $document->removeAttribute('$collection'); - $document->setAttribute('$databaseId', $database->getId()); - $document->setAttribute('$collectionId', $collection->getId()); - - $relationships = \array_filter( - $collection->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ); - - foreach ($relationships as $relationship) { - $related = $document->getAttribute($relationship->getAttribute('key')); - - if (empty($related)) { - if (\in_array(\gettype($related), ['array', 'object'])) { - $operations++; - } - - continue; - } - - if (!\is_array($related)) { - $relations = [$related]; - } else { - $relations = $related; - } - - $relatedCollectionId = $relationship->getAttribute('relatedCollection'); - // todo: Use local cache for this getDocument - $relatedCollection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence(), $relatedCollectionId)); - - foreach ($relations as $index => $doc) { - if ($doc instanceof Document) { - if (!$processDocument($relatedCollection, $doc)) { - unset($relations[$index]); - } - } - } - - if (\is_array($related)) { - $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); - } elseif (empty($relations)) { - $document->setAttribute($relationship->getAttribute('key'), null); - } - } - - return true; - }); - - foreach ($documents as $row) { - $processDocument($collection, $row); + foreach ($documents as $document) { + $this->resolveDocumentRelations(document: $document, collection: $collection, context: $context); } + // get updated from the context + $operations = $context['operations']; + $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); From 16a87535097292cad4e395def4a3ba467b89be38 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 17 Jun 2025 15:03:11 +0530 Subject: [PATCH 162/362] update: comment. --- .../Databases/Http/Databases/Collections/Documents/Action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index 32e26bb344..d5e7d84695 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -211,7 +211,7 @@ abstract class Action extends UtopiaAction /* remove `$collection` if needed */ $removeCollection = $context['removeCollection'] ?? false; - /* count operations and use `continue` inside loop */ + /* count operations inside loop */ $trackOperations = array_key_exists('trackOperations', $context); if (!$trackOperations) { From 8d62ada545ea072aa72447a242f3600f07734601 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 18 Jun 2025 10:54:26 +0530 Subject: [PATCH 163/362] updated example of the authInvalidateSession --- src/Appwrite/Utopia/Response/Model/Project.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index ef50d81c31..abe67e7e86 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -173,7 +173,7 @@ class Project extends Model 'type' => self::TYPE_BOOLEAN, 'description' => 'Whether or not all existing sessions should be invalidated on password change', 'default' => false, - 'example' => self::TYPE_BOOLEAN, + 'example' => true, ]) ->addRule('oAuthProviders', [ 'type' => Response::MODEL_AUTH_PROVIDER, From d6bf748a079682546a19efa54945cd110f0aee8d Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 18 Jun 2025 12:00:19 +0530 Subject: [PATCH 164/362] address comments. --- .../Collections/Documents/Action.php | 51 +++++++++---------- .../Collections/Documents/Create.php | 12 +++-- .../Collections/Documents/Delete.php | 11 ++-- .../Databases/Collections/Documents/Get.php | 16 +++--- .../Collections/Documents/Update.php | 11 ++-- .../Collections/Documents/Upsert.php | 11 ++-- .../Databases/Collections/Documents/XList.php | 17 +++---- 7 files changed, 69 insertions(+), 60 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index d5e7d84695..52dfc62f50 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -200,39 +200,31 @@ abstract class Action extends UtopiaAction /** * Resolves relationships in a document and attaches metadata. */ - final protected function resolveDocumentRelations(Document $document, Document $collection, array &$context): bool - { - /* @type Document $database */ - $database = $context['database']; + final protected function processDocument( + /* database */ + Document $database, + Document $collection, + Document $document, + Database $dbForProject, - /* @type Database $dbForProject */ - $dbForProject = $context['dbForProject']; + /* options */ + array &$collectionsCache, + ?int &$operations = null, + ): bool { - /* remove `$collection` if needed */ - $removeCollection = $context['removeCollection'] ?? false; - - /* count operations inside loop */ - $trackOperations = array_key_exists('trackOperations', $context); - - if (!$trackOperations) { - $context['operations'] ??= 0; - } elseif ($document->isEmpty()) { + if ($operations !== null && $document->isEmpty()) { return false; } - $operations = &$context['operations']; - $collectionsCache = &$context['collectionsCache']; + if ($operations !== null) { + $operations++; + } - $operations++; $collectionId = $collection->getId(); - + $document->removeAttribute('$collection'); $document->setAttribute('$databaseId', $database->getId()); $document->setAttribute('$collectionId', $collectionId); - if ($removeCollection) { - $document->removeAttribute('$collection'); - } - $relationships = $collectionsCache[$collectionId] ??= \array_filter( $collection->getAttribute('attributes', []), fn ($attr) => $attr->getAttribute('type') === Database::VAR_RELATIONSHIP @@ -243,7 +235,7 @@ abstract class Action extends UtopiaAction $related = $document->getAttribute($key); if (empty($related)) { - if (\in_array(\gettype($related), ['array', 'object'])) { + if (\in_array(\gettype($related), ['array', 'object']) && $operations !== null) { $operations++; } continue; @@ -266,14 +258,21 @@ abstract class Action extends UtopiaAction ); } - foreach ($relations as $index => $relation) { + foreach ($relations as $relation) { if ($relation instanceof Document) { $relatedCollection = new Document([ '$id' => $relatedCollectionId, 'attributes' => $collectionsCache[$relatedCollectionId], ]); - $this->resolveDocumentRelations(document: $relation, collection: $relatedCollection, context: $context); + $this->processDocument( + database: $database, + collection: $relatedCollection, + document: $relation, + dbForProject: $dbForProject, + collectionsCache: $collectionsCache, + operations: $operations + ); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 47c6acf0b7..ebab4a7ece 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -374,12 +374,14 @@ class Create extends Action ->setContext($this->getCollectionsEventsContext(), $collection); $collectionsCache = []; - $removeCollection = true; - $context = compact('database', 'dbForProject', 'collectionsCache', 'removeCollection'); - foreach ($documents as $document) { - // Add $collectionId and $databaseId for all documents - $this->resolveDocumentRelations(document: $document, collection: $collection, context: $context); + $this->processDocument( + database: $database, + collection: $collection, + document: $document, + dbForProject: $dbForProject, + collectionsCache: $collectionsCache, + ); } $queueForStatsUsage diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index 9f1f27b1f8..d8ec82910c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -115,10 +115,13 @@ class Delete extends Action } $collectionsCache = []; - $context = compact('database', 'dbForProject', 'collectionsCache'); - - // Add $collection and $databaseId for all documents - $this->resolveDocumentRelations(document: $document, collection: $collection, context: $context); + $this->processDocument( + database: $database, + collection: $collection, + document: $document, + dbForProject: $dbForProject, + collectionsCache: $collectionsCache, + ); $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, 1) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index bf1acb8086..fe40a2412f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -101,14 +101,14 @@ class Get extends Action $operations = 0; $collectionsCache = []; - $trackOperations = true; - $context = compact('database', 'dbForProject', 'operations', 'trackOperations', 'collectionsCache'); - - // Add $collectionId and $databaseId for all documents - $this->resolveDocumentRelations(document: $document, collection: $collection, context: $context); - - // get updated from the context - $operations = $context['operations']; + $this->processDocument( + database: $database, + collection: $collection, + document: $document, + dbForProject: $dbForProject, + collectionsCache: $collectionsCache, + operations: $operations + ); $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index b946731c7a..c39eeea707 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -248,10 +248,13 @@ class Update extends Action } $collectionsCache = []; - $context = compact('database', 'dbForProject', 'collectionsCache'); - - // Add $collectionId and $databaseId for all documents - $this->resolveDocumentRelations(document: $document, collection: $collection, context: $context); + $this->processDocument( + database: $database, + collection: $collection, + document: $document, + dbForProject: $dbForProject, + collectionsCache: $collectionsCache, + ); $response->dynamic($document, $this->getResponseModel()); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index d27ff632b8..fa632c7b2b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -237,10 +237,13 @@ class Upsert extends Action $collectionsCache = []; $document = $upserted[0]; - $context = compact('database', 'dbForProject', 'collectionsCache'); - - // Add $collectionId and $databaseId for all documents - $this->resolveDocumentRelations(document: $document, collection: $collection, context: $context); + $this->processDocument( + database: $database, + collection: $collection, + document: $document, + dbForProject: $dbForProject, + collectionsCache: $collectionsCache, + ); $relationships = \array_map( fn ($document) => $document->getAttribute('key'), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index b87efe42de..9aad8f4b77 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -131,18 +131,17 @@ class XList extends Action $operations = 0; $collectionsCache = []; - $trackOperations = true; - $removeCollection = true; - $context = compact('database', 'dbForProject', 'operations', 'collectionsCache', 'removeCollection', 'trackOperations'); - - // Add $collectionId and $databaseId for all documents foreach ($documents as $document) { - $this->resolveDocumentRelations(document: $document, collection: $collection, context: $context); + $this->processDocument( + database: $database, + collection: $collection, + document: $document, + dbForProject: $dbForProject, + collectionsCache: $collectionsCache, + operations: $operations, + ); } - // get updated from the context - $operations = $context['operations']; - $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_READS, max($operations, 1)) ->addMetric(str_replace('{databaseInternalId}', $database->getSequence(), METRIC_DATABASE_ID_OPERATIONS_READS), $operations); From d69189bd55317fe5b31bce211669e24be6991c74 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 18 Jun 2025 12:02:08 +0530 Subject: [PATCH 165/362] ci: empty commit From 6214c2d104aea5653dccc68fd2868476ca961c77 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 18 Jun 2025 12:07:00 +0530 Subject: [PATCH 166/362] update: disable `1.8.x` request/response filters for `lazy-loading-relationships`. --- app/controllers/general.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index c979f8f1b5..d4b078c0d1 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -844,10 +844,10 @@ App::init() if (version_compare($requestFormat, '1.7.0', '<')) { $request->addFilter(new RequestV19()); } - if (version_compare($requestFormat, '1.8.0', '<')) { + /*if (version_compare($requestFormat, '1.8.0', '<')) { $dbForProject = $getProjectDB($project); $request->addFilter(new RequestV20($dbForProject, $route)); - } + }*/ } $domain = $request->getHostname(); @@ -1017,9 +1017,9 @@ App::init() if (version_compare($responseFormat, '1.7.0', '<')) { $response->addFilter(new ResponseV19()); } - if (version_compare($responseFormat, '1.8.0', '<')) { + /*if (version_compare($responseFormat, '1.8.0', '<')) { $response->addFilter(new ResponseV20()); - } + }*/ if (version_compare($responseFormat, APP_VERSION_STABLE, '>')) { $response->addHeader('X-Appwrite-Warning', "The current SDK is built for Appwrite " . $responseFormat . ". However, the current Appwrite server version is " . APP_VERSION_STABLE . ". Please downgrade your SDK to match the Appwrite version: https://appwrite.io/docs/sdks"); } From 56494ca427f39e9baf1a646a5e1fafc4fff5aafe Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 18 Jun 2025 13:30:24 +0530 Subject: [PATCH 167/362] updated invalidation session during the change password in the account endpoint --- app/controllers/api/account.php | 9 ++++++ .../Account/AccountCustomClientTest.php | 29 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 0c53423325..1030a30e93 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -2843,6 +2843,15 @@ App::patch('/v1/account/password') ->setAttribute('hash', Auth::DEFAULT_ALGO) ->setAttribute('hashOptions', Auth::DEFAULT_ALGO_OPTIONS); + $sessions = $user->getAttribute('sessions', []); + $current = Auth::sessionVerify($sessions, Auth::$secret); + foreach ($sessions as $session) { + /** @var Document $session */ + if ($session->getId() !== $current) { + $dbForProject->deleteDocument('sessions', $session->getId()); + } + } + $user = $dbForProject->updateDocument('users', $user->getId(), $user); $queueForEvents->setParam('userId', $user->getId()); diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index 0cc2eb893a..f99b3a42a2 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -480,6 +480,20 @@ class AccountCustomClientTest extends Scope $password = $data['password'] ?? ''; $session = $data['session'] ?? ''; + for ($i = 0; $i < 5; $i++) { + $response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]), [ + 'email' => $email, + 'password' => $password, + ]); + + $this->assertEquals(201, $response['headers']['status-code']); + sleep(1); + } + /** * Test for SUCCESS */ @@ -500,6 +514,21 @@ class AccountCustomClientTest extends Scope $this->assertTrue((new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); + // checking for all non active sessions are cleared + $sessionId = $data['sessionId'] ?? ''; + $response = $this->client->call(Client::METHOD_GET, '/account/sessions', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ])); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(1, $response['body']['total']); + // checking the current session or not + $this->assertEquals($sessionId, $response['body']['sessions'][0]['$id']); + $this->assertTrue($response['body']['sessions'][0]['current']); + $response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', From 225b6e841302999db5e7ef9c93c801bce100db24 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 19 Jun 2025 02:26:58 +0530 Subject: [PATCH 168/362] updated tests and project invaldate session --- app/controllers/api/account.php | 11 +- .../Account/AccountCustomClientTest.php | 119 ++++++++++++++++-- 2 files changed, 119 insertions(+), 11 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 1030a30e93..d8e3be443d 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -2845,10 +2845,13 @@ App::patch('/v1/account/password') $sessions = $user->getAttribute('sessions', []); $current = Auth::sessionVerify($sessions, Auth::$secret); - foreach ($sessions as $session) { - /** @var Document $session */ - if ($session->getId() !== $current) { - $dbForProject->deleteDocument('sessions', $session->getId()); + $invalidate = $project->getAttribute('auths', default: [])['invalidateSessions'] ?? false; + if ($invalidate && !empty($current)) { + foreach ($sessions as $session) { + /** @var Document $session */ + if ($session->getId() !== $current) { + $dbForProject->deleteDocument('sessions', $session->getId()); + } } } diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index f99b3a42a2..9e75106606 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -494,6 +494,15 @@ class AccountCustomClientTest extends Scope sleep(1); } + $response = $this->client->call(Client::METHOD_GET, '/account/sessions', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ])); + + $allSessions = array_map(fn ($sessionDetails) => $sessionDetails['$id'], $response['body']['sessions']); + /** * Test for SUCCESS */ @@ -514,8 +523,7 @@ class AccountCustomClientTest extends Scope $this->assertTrue((new DatetimeValidator())->isValid($response['body']['registration'])); $this->assertEquals($response['body']['email'], $email); - // checking for all non active sessions are cleared - $sessionId = $data['sessionId'] ?? ''; + $currentSessionId = $data['sessionId'] ?? ''; $response = $this->client->call(Client::METHOD_GET, '/account/sessions', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', @@ -526,19 +534,116 @@ class AccountCustomClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(1, $response['body']['total']); // checking the current session or not - $this->assertEquals($sessionId, $response['body']['sessions'][0]['$id']); + $this->assertEquals($currentSessionId, $response['body']['sessions'][0]['$id']); $this->assertTrue($response['body']['sessions'][0]['current']); - $response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([ + // checking for all non active sessions are cleared + foreach ($allSessions as $sessionId) { + if ($currentSessionId === $sessionId) { + $response = $this->client->call(Client::METHOD_GET, '/account/sessions/current', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ])); + + $this->assertEquals(200, $response['headers']['status-code']); + } else { + $response = $this->client->call(Client::METHOD_GET, '/account/sessions/'.$sessionId, array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ])); + + $this->assertEquals(404, $response['headers']['status-code']); + } + } + + $newPassword = 'new-password'; + // updating the invalidateSession to false to check sessions are not invalidated + $this->updateProjectinvalidateSessionsProperty(false); + for ($i = 0; $i < 5; $i++) { + $response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]), [ + 'email' => $email, + 'password' => $newPassword, + ]); + + $this->assertEquals(201, $response['headers']['status-code']); + sleep(1); + } + + $response = $this->client->call(Client::METHOD_GET, '/account/sessions', array_merge([ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ])); + + $allSessions = array_map(fn ($sessionDetails) => $sessionDetails['$id'], $response['body']['sessions']); + + $response = $this->client->call(Client::METHOD_PATCH, '/account/password', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ]), [ - 'email' => $email, - 'password' => 'new-password', + 'password' => $newPassword, + 'oldPassword' => $newPassword, ]); - $this->assertEquals(201, $response['headers']['status-code']); + $this->assertEquals(200, $response['headers']['status-code']); + + foreach ($allSessions as $sessionId) { + $response = $this->client->call(Client::METHOD_GET, '/account/sessions/'.$sessionId, headers: array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ])); + + $this->assertEquals(200, $response['headers']['status-code']); + } + + // setting invalidateSession to true to check the sessions are cleared or not + $this->updateProjectinvalidateSessionsProperty(true); + $response = $this->client->call(Client::METHOD_PATCH, '/account/password', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ]), [ + 'password' => $newPassword, + 'oldPassword' => $newPassword, + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_GET, '/account/sessions', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ])); + + $allSessions = array_map(fn ($sessionDetails) => $sessionDetails['$id'], $response['body']['sessions']); + + foreach ($allSessions as $sessionId) { + if ($currentSessionId !== $sessionId) { + $response = $this->client->call(Client::METHOD_GET, '/account/sessions/'.$sessionId, array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, + ])); + + $this->assertEquals(404, $response['headers']['status-code']); + } + } /** * Test for FAILURE From d053282bcbe0c3fc5ab7f1515419b625190531ee Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 19 Jun 2025 02:29:21 +0530 Subject: [PATCH 169/362] linting --- .../e2e/Services/Account/AccountCustomClientTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index 9e75106606..b114a54c30 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -645,6 +645,18 @@ class AccountCustomClientTest extends Scope } } + $response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]), [ + 'email' => $email, + 'password' => $newPassword, + ]); + + $this->assertEquals(201, $response['headers']['status-code']); + + /** * Test for FAILURE */ From 83968a62f28251356eb9ce20c070026eafa5b0f0 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 10:42:48 +0530 Subject: [PATCH 170/362] update: docs. --- docs/references/databases/create-attribute-enum.md | 1 - docs/references/databases/create-boolean-column.md | 1 + docs/references/databases/create-datetime-column.md | 1 + docs/references/databases/create-email-column.md | 1 + docs/references/databases/create-enum-attribute.md | 2 +- docs/references/databases/create-enum-column.md | 1 + docs/references/databases/create-float-column.md | 1 + docs/references/databases/create-integer-column.md | 1 + docs/references/databases/create-ip-column.md | 1 + docs/references/databases/create-relationship-column.md | 1 + docs/references/databases/create-row.md | 1 + docs/references/databases/create-rows.md | 1 + docs/references/databases/create-string-column.md | 1 + docs/references/databases/create-table.md | 1 + docs/references/databases/create-url-column.md | 1 + docs/references/databases/decrement-row-column.md | 1 + docs/references/databases/delete-column.md | 1 + docs/references/databases/delete-row.md | 1 + docs/references/databases/delete-rows.md | 1 + docs/references/databases/delete-table.md | 1 + docs/references/databases/get-column.md | 1 + docs/references/databases/get-row-logs.md | 1 + docs/references/databases/get-row.md | 1 + docs/references/databases/get-table-logs.md | 1 + docs/references/databases/get-table-usage.md | 1 + docs/references/databases/get-table.md | 1 + docs/references/databases/increment-row-column.md | 1 + docs/references/databases/list-columns.md | 1 + docs/references/databases/list-rows.md | 1 + docs/references/databases/list-tables.md | 1 + docs/references/databases/update-boolean-column.md | 1 + docs/references/databases/update-datetime-column.md | 1 + docs/references/databases/update-email-column.md | 1 + docs/references/databases/update-enum-column.md | 1 + docs/references/databases/update-float-column.md | 1 + docs/references/databases/update-integer-column.md | 1 + docs/references/databases/update-ip-column.md | 1 + docs/references/databases/update-relationship-column.md | 1 + docs/references/databases/update-row.md | 1 + docs/references/databases/update-rows.md | 1 + docs/references/databases/update-string-column.md | 1 + docs/references/databases/update-table.md | 1 + docs/references/databases/update-url-column.md | 1 + docs/references/databases/upsert-row.md | 1 + docs/references/databases/upsert-rows.md | 1 + .../Http/Databases/Collections/Attributes/Enum/Create.php | 2 +- .../Http/Databases/Tables/Columns/Boolean/Create.php | 2 +- .../Http/Databases/Tables/Columns/Boolean/Update.php | 2 +- .../Http/Databases/Tables/Columns/Datetime/Create.php | 2 +- .../Http/Databases/Tables/Columns/Datetime/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Delete.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Email/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Email/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Enum/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Enum/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Float/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Float/Update.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Columns/Get.php | 2 +- .../Databases/Http/Databases/Tables/Columns/IP/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/IP/Update.php | 2 +- .../Http/Databases/Tables/Columns/Integer/Create.php | 2 +- .../Http/Databases/Tables/Columns/Integer/Update.php | 2 +- .../Http/Databases/Tables/Columns/Relationship/Create.php | 2 +- .../Http/Databases/Tables/Columns/Relationship/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/String/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/String/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/URL/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/URL/Update.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Create.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Delete.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Tables/Get.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Logs/XList.php | 2 +- .../Databases/Http/Databases/Tables/Rows/Bulk/Delete.php | 2 +- .../Databases/Http/Databases/Tables/Rows/Bulk/Update.php | 2 +- .../Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php | 2 +- .../Databases/Http/Databases/Tables/Rows/Column/Decrement.php | 2 +- .../Databases/Http/Databases/Tables/Rows/Column/Increment.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Create.php | 4 ++-- .../Modules/Databases/Http/Databases/Tables/Rows/Delete.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Get.php | 2 +- .../Databases/Http/Databases/Tables/Rows/Logs/XList.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Update.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Upsert.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/XList.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Update.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Usage/Get.php | 2 +- .../Modules/Databases/Http/Databases/Tables/XList.php | 2 +- 87 files changed, 87 insertions(+), 45 deletions(-) delete mode 100644 docs/references/databases/create-attribute-enum.md create mode 100644 docs/references/databases/create-boolean-column.md create mode 100644 docs/references/databases/create-datetime-column.md create mode 100644 docs/references/databases/create-email-column.md create mode 100644 docs/references/databases/create-enum-column.md create mode 100644 docs/references/databases/create-float-column.md create mode 100644 docs/references/databases/create-integer-column.md create mode 100644 docs/references/databases/create-ip-column.md create mode 100644 docs/references/databases/create-relationship-column.md create mode 100644 docs/references/databases/create-row.md create mode 100644 docs/references/databases/create-rows.md create mode 100644 docs/references/databases/create-string-column.md create mode 100644 docs/references/databases/create-table.md create mode 100644 docs/references/databases/create-url-column.md create mode 100644 docs/references/databases/decrement-row-column.md create mode 100644 docs/references/databases/delete-column.md create mode 100644 docs/references/databases/delete-row.md create mode 100644 docs/references/databases/delete-rows.md create mode 100644 docs/references/databases/delete-table.md create mode 100644 docs/references/databases/get-column.md create mode 100644 docs/references/databases/get-row-logs.md create mode 100644 docs/references/databases/get-row.md create mode 100644 docs/references/databases/get-table-logs.md create mode 100644 docs/references/databases/get-table-usage.md create mode 100644 docs/references/databases/get-table.md create mode 100644 docs/references/databases/increment-row-column.md create mode 100644 docs/references/databases/list-columns.md create mode 100644 docs/references/databases/list-rows.md create mode 100644 docs/references/databases/list-tables.md create mode 100644 docs/references/databases/update-boolean-column.md create mode 100644 docs/references/databases/update-datetime-column.md create mode 100644 docs/references/databases/update-email-column.md create mode 100644 docs/references/databases/update-enum-column.md create mode 100644 docs/references/databases/update-float-column.md create mode 100644 docs/references/databases/update-integer-column.md create mode 100644 docs/references/databases/update-ip-column.md create mode 100644 docs/references/databases/update-relationship-column.md create mode 100644 docs/references/databases/update-row.md create mode 100644 docs/references/databases/update-rows.md create mode 100644 docs/references/databases/update-string-column.md create mode 100644 docs/references/databases/update-table.md create mode 100644 docs/references/databases/update-url-column.md create mode 100644 docs/references/databases/upsert-row.md create mode 100644 docs/references/databases/upsert-rows.md diff --git a/docs/references/databases/create-attribute-enum.md b/docs/references/databases/create-attribute-enum.md deleted file mode 100644 index 209c891d97..0000000000 --- a/docs/references/databases/create-attribute-enum.md +++ /dev/null @@ -1 +0,0 @@ -Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. diff --git a/docs/references/databases/create-boolean-column.md b/docs/references/databases/create-boolean-column.md new file mode 100644 index 0000000000..c528ede1a2 --- /dev/null +++ b/docs/references/databases/create-boolean-column.md @@ -0,0 +1 @@ +Create a boolean column. diff --git a/docs/references/databases/create-datetime-column.md b/docs/references/databases/create-datetime-column.md new file mode 100644 index 0000000000..ad92750639 --- /dev/null +++ b/docs/references/databases/create-datetime-column.md @@ -0,0 +1 @@ +Create a date time column according to the ISO 8601 standard. \ No newline at end of file diff --git a/docs/references/databases/create-email-column.md b/docs/references/databases/create-email-column.md new file mode 100644 index 0000000000..91aa5c9326 --- /dev/null +++ b/docs/references/databases/create-email-column.md @@ -0,0 +1 @@ +Create an email column. diff --git a/docs/references/databases/create-enum-attribute.md b/docs/references/databases/create-enum-attribute.md index 02ed0a5d60..0e201cf7eb 100644 --- a/docs/references/databases/create-enum-attribute.md +++ b/docs/references/databases/create-enum-attribute.md @@ -1 +1 @@ -Create an enum attribute. +Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. diff --git a/docs/references/databases/create-enum-column.md b/docs/references/databases/create-enum-column.md new file mode 100644 index 0000000000..b9e5a3ebe4 --- /dev/null +++ b/docs/references/databases/create-enum-column.md @@ -0,0 +1 @@ +Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. \ No newline at end of file diff --git a/docs/references/databases/create-float-column.md b/docs/references/databases/create-float-column.md new file mode 100644 index 0000000000..0b133eef28 --- /dev/null +++ b/docs/references/databases/create-float-column.md @@ -0,0 +1 @@ +Create a float column. Optionally, minimum and maximum values can be provided. diff --git a/docs/references/databases/create-integer-column.md b/docs/references/databases/create-integer-column.md new file mode 100644 index 0000000000..5f51b3965a --- /dev/null +++ b/docs/references/databases/create-integer-column.md @@ -0,0 +1 @@ +Create an integer column. Optionally, minimum and maximum values can be provided. diff --git a/docs/references/databases/create-ip-column.md b/docs/references/databases/create-ip-column.md new file mode 100644 index 0000000000..012431dbae --- /dev/null +++ b/docs/references/databases/create-ip-column.md @@ -0,0 +1 @@ +Create IP address column. diff --git a/docs/references/databases/create-relationship-column.md b/docs/references/databases/create-relationship-column.md new file mode 100644 index 0000000000..d87d8bccf8 --- /dev/null +++ b/docs/references/databases/create-relationship-column.md @@ -0,0 +1 @@ +Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). diff --git a/docs/references/databases/create-row.md b/docs/references/databases/create-row.md new file mode 100644 index 0000000000..a07abfa04d --- /dev/null +++ b/docs/references/databases/create-row.md @@ -0,0 +1 @@ +Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/create-rows.md b/docs/references/databases/create-rows.md new file mode 100644 index 0000000000..cea67913b4 --- /dev/null +++ b/docs/references/databases/create-rows.md @@ -0,0 +1 @@ +Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/create-string-column.md b/docs/references/databases/create-string-column.md new file mode 100644 index 0000000000..7395e26a11 --- /dev/null +++ b/docs/references/databases/create-string-column.md @@ -0,0 +1 @@ +Create a string column. diff --git a/docs/references/databases/create-table.md b/docs/references/databases/create-table.md new file mode 100644 index 0000000000..263638ea00 --- /dev/null +++ b/docs/references/databases/create-table.md @@ -0,0 +1 @@ +Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/create-url-column.md b/docs/references/databases/create-url-column.md new file mode 100644 index 0000000000..e731d758ce --- /dev/null +++ b/docs/references/databases/create-url-column.md @@ -0,0 +1 @@ +Create a URL column. diff --git a/docs/references/databases/decrement-row-column.md b/docs/references/databases/decrement-row-column.md new file mode 100644 index 0000000000..b7b32d6148 --- /dev/null +++ b/docs/references/databases/decrement-row-column.md @@ -0,0 +1 @@ +Decrement a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/databases/delete-column.md b/docs/references/databases/delete-column.md new file mode 100644 index 0000000000..efba8b1d77 --- /dev/null +++ b/docs/references/databases/delete-column.md @@ -0,0 +1 @@ +Deletes a column. \ No newline at end of file diff --git a/docs/references/databases/delete-row.md b/docs/references/databases/delete-row.md new file mode 100644 index 0000000000..c0b9dfbdaf --- /dev/null +++ b/docs/references/databases/delete-row.md @@ -0,0 +1 @@ +Delete a row by its unique ID. \ No newline at end of file diff --git a/docs/references/databases/delete-rows.md b/docs/references/databases/delete-rows.md new file mode 100644 index 0000000000..9d5189ce76 --- /dev/null +++ b/docs/references/databases/delete-rows.md @@ -0,0 +1 @@ +Bulk delete rows using queries, if no queries are passed then all rows are deleted. \ No newline at end of file diff --git a/docs/references/databases/delete-table.md b/docs/references/databases/delete-table.md new file mode 100644 index 0000000000..ad74ca3233 --- /dev/null +++ b/docs/references/databases/delete-table.md @@ -0,0 +1 @@ +Delete a table by its unique ID. Only users with write permissions have access to delete this resource. \ No newline at end of file diff --git a/docs/references/databases/get-column.md b/docs/references/databases/get-column.md new file mode 100644 index 0000000000..cd8b8797a9 --- /dev/null +++ b/docs/references/databases/get-column.md @@ -0,0 +1 @@ +Get column by ID. \ No newline at end of file diff --git a/docs/references/databases/get-row-logs.md b/docs/references/databases/get-row-logs.md new file mode 100644 index 0000000000..1d494ed53e --- /dev/null +++ b/docs/references/databases/get-row-logs.md @@ -0,0 +1 @@ +Get the row activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/databases/get-row.md b/docs/references/databases/get-row.md new file mode 100644 index 0000000000..6a30fa472c --- /dev/null +++ b/docs/references/databases/get-row.md @@ -0,0 +1 @@ +Get a row by its unique ID. This endpoint response returns a JSON object with the row data. \ No newline at end of file diff --git a/docs/references/databases/get-table-logs.md b/docs/references/databases/get-table-logs.md new file mode 100644 index 0000000000..8b00c7f317 --- /dev/null +++ b/docs/references/databases/get-table-logs.md @@ -0,0 +1 @@ +Get the table activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/databases/get-table-usage.md b/docs/references/databases/get-table-usage.md new file mode 100644 index 0000000000..08e28af0a6 --- /dev/null +++ b/docs/references/databases/get-table-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/databases/get-table.md b/docs/references/databases/get-table.md new file mode 100644 index 0000000000..67b8428431 --- /dev/null +++ b/docs/references/databases/get-table.md @@ -0,0 +1 @@ +Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata. \ No newline at end of file diff --git a/docs/references/databases/increment-row-column.md b/docs/references/databases/increment-row-column.md new file mode 100644 index 0000000000..7a19b3fbc7 --- /dev/null +++ b/docs/references/databases/increment-row-column.md @@ -0,0 +1 @@ +Increment a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/databases/list-columns.md b/docs/references/databases/list-columns.md new file mode 100644 index 0000000000..aacf373082 --- /dev/null +++ b/docs/references/databases/list-columns.md @@ -0,0 +1 @@ +List columns in the table. \ No newline at end of file diff --git a/docs/references/databases/list-rows.md b/docs/references/databases/list-rows.md new file mode 100644 index 0000000000..68185fc192 --- /dev/null +++ b/docs/references/databases/list-rows.md @@ -0,0 +1 @@ +Get a list of all the user's rows in a given table. You can use the query params to filter your results. \ No newline at end of file diff --git a/docs/references/databases/list-tables.md b/docs/references/databases/list-tables.md new file mode 100644 index 0000000000..e14795eeac --- /dev/null +++ b/docs/references/databases/list-tables.md @@ -0,0 +1 @@ +Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results. \ No newline at end of file diff --git a/docs/references/databases/update-boolean-column.md b/docs/references/databases/update-boolean-column.md new file mode 100644 index 0000000000..f5167d97b6 --- /dev/null +++ b/docs/references/databases/update-boolean-column.md @@ -0,0 +1 @@ +Update a boolean column. Changing the `default` value will not update already existing rows. \ No newline at end of file diff --git a/docs/references/databases/update-datetime-column.md b/docs/references/databases/update-datetime-column.md new file mode 100644 index 0000000000..e793b41921 --- /dev/null +++ b/docs/references/databases/update-datetime-column.md @@ -0,0 +1 @@ +Update a date time column. Changing the `default` value will not update already existing rows. \ No newline at end of file diff --git a/docs/references/databases/update-email-column.md b/docs/references/databases/update-email-column.md new file mode 100644 index 0000000000..0db17e29bd --- /dev/null +++ b/docs/references/databases/update-email-column.md @@ -0,0 +1 @@ +Update an email column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-enum-column.md b/docs/references/databases/update-enum-column.md new file mode 100644 index 0000000000..df172cbc38 --- /dev/null +++ b/docs/references/databases/update-enum-column.md @@ -0,0 +1 @@ +Update an enum column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-float-column.md b/docs/references/databases/update-float-column.md new file mode 100644 index 0000000000..4e0eb9ddb2 --- /dev/null +++ b/docs/references/databases/update-float-column.md @@ -0,0 +1 @@ +Update a float column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-integer-column.md b/docs/references/databases/update-integer-column.md new file mode 100644 index 0000000000..0f2a07ea6e --- /dev/null +++ b/docs/references/databases/update-integer-column.md @@ -0,0 +1 @@ +Update an integer column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-ip-column.md b/docs/references/databases/update-ip-column.md new file mode 100644 index 0000000000..115c87a7e1 --- /dev/null +++ b/docs/references/databases/update-ip-column.md @@ -0,0 +1 @@ +Update an ip column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-relationship-column.md b/docs/references/databases/update-relationship-column.md new file mode 100644 index 0000000000..dfdcd8ae5a --- /dev/null +++ b/docs/references/databases/update-relationship-column.md @@ -0,0 +1 @@ +Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). diff --git a/docs/references/databases/update-row.md b/docs/references/databases/update-row.md new file mode 100644 index 0000000000..b532ea411d --- /dev/null +++ b/docs/references/databases/update-row.md @@ -0,0 +1 @@ +Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. \ No newline at end of file diff --git a/docs/references/databases/update-rows.md b/docs/references/databases/update-rows.md new file mode 100644 index 0000000000..334b91aec1 --- /dev/null +++ b/docs/references/databases/update-rows.md @@ -0,0 +1 @@ +Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated. \ No newline at end of file diff --git a/docs/references/databases/update-string-column.md b/docs/references/databases/update-string-column.md new file mode 100644 index 0000000000..617214b4c9 --- /dev/null +++ b/docs/references/databases/update-string-column.md @@ -0,0 +1 @@ +Update a string column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-table.md b/docs/references/databases/update-table.md new file mode 100644 index 0000000000..bbd676d3b8 --- /dev/null +++ b/docs/references/databases/update-table.md @@ -0,0 +1 @@ +Update a table by its unique ID. \ No newline at end of file diff --git a/docs/references/databases/update-url-column.md b/docs/references/databases/update-url-column.md new file mode 100644 index 0000000000..6080d71509 --- /dev/null +++ b/docs/references/databases/update-url-column.md @@ -0,0 +1 @@ +Update an url column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/upsert-row.md b/docs/references/databases/upsert-row.md new file mode 100644 index 0000000000..1132afd53c --- /dev/null +++ b/docs/references/databases/upsert-row.md @@ -0,0 +1 @@ +Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/upsert-rows.md b/docs/references/databases/upsert-rows.md new file mode 100644 index 0000000000..21aa3da1ef --- /dev/null +++ b/docs/references/databases/upsert-rows.md @@ -0,0 +1 @@ +Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index 006de12e91..620cd40d3a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -50,7 +50,7 @@ class Create extends Action namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-attribute-enum.md', + description: '/docs/references/databases/create-enum-attribute.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php index b8675877f3..af6bf90696 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php @@ -46,7 +46,7 @@ class Create extends BooleanCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-boolean-attribute.md', + description: '/docs/references/databases/create-boolean-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php index 09d01cae21..4ce36915dc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php @@ -48,7 +48,7 @@ class Update extends BooleanUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-boolean-attribute.md', + description: '/docs/references/databases/update-boolean-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php index 34ead7c33d..7a3f77dbee 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php @@ -48,7 +48,7 @@ class Create extends DatetimeCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-datetime-attribute.md', + description: '/docs/references/databases/create-datetime-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php index 5b026cd373..305a0b4df2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php @@ -50,7 +50,7 @@ class Update extends DatetimeUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-datetime-attribute.md', + description: '/docs/references/databases/update-datetime-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php index 567cb02169..fadbd2b165 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php @@ -47,7 +47,7 @@ class Delete extends AttributesDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-attribute.md', + description: '/docs/references/databases/delete-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php index f5bb2f5220..b8dc7b7ec8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php @@ -47,7 +47,7 @@ class Create extends EmailCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-email-attribute.md', + description: '/docs/references/databases/create-email-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php index faba9279b5..c006e53a41 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php @@ -49,7 +49,7 @@ class Update extends EmailUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-email-attribute.md', + description: '/docs/references/databases/update-email-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php index ec1d36a916..b85fae15dc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php @@ -49,7 +49,7 @@ class Create extends EnumCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-attribute-enum.md', + description: '/docs/references/databases/create-enum-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php index ef2c829e0a..f4ffb53bd7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php @@ -51,7 +51,7 @@ class Update extends EnumUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-enum-attribute.md', + description: '/docs/references/databases/update-enum-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php index 32579017c6..5dd7fb6a3b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php @@ -47,7 +47,7 @@ class Create extends FloatCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-float-attribute.md', + description: '/docs/references/databases/create-float-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php index 4ed420cfa0..5946f16e75 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php @@ -49,7 +49,7 @@ class Update extends FloatUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-float-attribute.md', + description: '/docs/references/databases/update-float-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php index ed28f96535..488b41a27c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php @@ -53,7 +53,7 @@ class Get extends AttributesGet namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/get-attribute.md', + description: '/docs/references/databases/get-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php index 8acc47f051..b889526d2c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php @@ -47,7 +47,7 @@ class Create extends IPCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-ip-attribute.md', + description: '/docs/references/databases/create-ip-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php index c43f132c13..496ee34a53 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php @@ -49,7 +49,7 @@ class Update extends IPUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-ip-attribute.md', + description: '/docs/references/databases/update-ip-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php index 7694e9d74f..8f2e826052 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php @@ -47,7 +47,7 @@ class Create extends IntegerCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-integer-attribute.md', + description: '/docs/references/databases/create-integer-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php index b3ce988830..5b406a95ed 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php @@ -49,7 +49,7 @@ class Update extends IntegerUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-integer-attribute.md', + description: '/docs/references/databases/update-integer-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php index 133f772605..a374e3f520 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php @@ -48,7 +48,7 @@ class Create extends RelationshipCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-relationship-attribute.md', + description: '/docs/references/databases/create-relationship-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php index ef1d8c7a33..c7325b922e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php @@ -48,7 +48,7 @@ class Update extends RelationshipUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-relationship-attribute.md', + description: '/docs/references/databases/update-relationship-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php index ed7989fbc3..e281a3d475 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php @@ -49,7 +49,7 @@ class Create extends StringCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-string-attribute.md', + description: '/docs/references/databases/create-string-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php index f7ec773e3c..6f1512bab4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php @@ -51,7 +51,7 @@ class Update extends StringUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-string-attribute.md', + description: '/docs/references/databases/update-string-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php index 0e6fe7cff3..b33ee6e4c8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php @@ -47,7 +47,7 @@ class Create extends URLCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-url-attribute.md', + description: '/docs/references/databases/create-url-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php index 6f3698c0cf..4404d98c6e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php @@ -49,7 +49,7 @@ class Update extends URLUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-url-attribute.md', + description: '/docs/references/databases/update-url-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index c20865d110..3fafa6c970 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -49,7 +49,7 @@ class Create extends CollectionCreate namespace: 'databases', group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-collection.md', + description: '/docs/references/databases/create-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php index 85e52ac37d..d4c6bb6f7c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php @@ -45,7 +45,7 @@ class Delete extends CollectionDelete namespace: 'databases', group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-collection.md', + description: '/docs/references/databases/delete-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php index 473dfb6273..5fe6ac216b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php @@ -42,7 +42,7 @@ class Get extends CollectionGet namespace: 'databases', group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/get-collection.md', + description: '/docs/references/databases/get-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php index 244cebe3ad..011583ebca 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php @@ -39,7 +39,7 @@ class XList extends CollectionLogXList namespace: 'databases', group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/get-collection-logs.md', + description: '/docs/references/databases/get-table-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php index 9ddff818e3..204dfde5d4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php @@ -49,7 +49,7 @@ class Delete extends DocumentsDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-documents.md', + description: '/docs/references/databases/delete-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php index 1b9ddb60ab..e5e9a9806c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php @@ -50,7 +50,7 @@ class Update extends DocumentsUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-documents.md', + description: '/docs/references/databases/update-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php index 2b4117c23e..8f0a8da91e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php @@ -50,7 +50,7 @@ class Upsert extends DocumentsUpsert namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/upsert-documents.md', + description: '/docs/references/databases/upsert-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php index 128d578cde..3d3247680b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php @@ -50,7 +50,7 @@ class Decrement extends DecrementDocumentAttribute namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/decrement-document-attribute.md', + description: '/docs/references/databases/decrement-row-column.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php index a3e256d561..59e49e20e9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php @@ -50,7 +50,7 @@ class Increment extends IncrementDocumentAttribute namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/increment-document-attribute.md', + description: '/docs/references/databases/increment-row-column.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index 03e5548ddb..928287971c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -59,7 +59,7 @@ class Create extends DocumentCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-document.md', + description: '/docs/references/databases/create-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( @@ -80,7 +80,7 @@ class Create extends DocumentCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: $this->getBulkActionName(self::getName()), - description: '/docs/references/databases/create-documents.md', + description: '/docs/references/databases/create-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php index 5edf4e0b73..45ffa88082 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php @@ -54,7 +54,7 @@ class Delete extends DocumentDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-document.md', + description: '/docs/references/databases/delete-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php index 74e1f90497..d89ca52551 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php @@ -44,7 +44,7 @@ class Get extends DocumentGet namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/get-document.md', + description: '/docs/references/databases/get-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php index 1cc5202152..b00817225e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php @@ -39,7 +39,7 @@ class XList extends DocumentLogXList namespace: $this->getSdkNamespace(), group: 'logs', name: self::getName(), - description: '/docs/references/databases/get-document-logs.md', + description: '/docs/references/databases/get-row-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php index d37f5cc92f..dd256a3fa6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php @@ -51,7 +51,7 @@ class Update extends DocumentUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-document.md', + description: '/docs/references/databases/update-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php index 800efa9cde..1337f75874 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php @@ -52,7 +52,7 @@ class Upsert extends DocumentUpsert namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/upsert-document.md', + description: '/docs/references/databases/upsert-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php index 9d03603a0e..096b29d6d5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php @@ -44,7 +44,7 @@ class XList extends DocumentXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/list-documents.md', + description: '/docs/references/databases/list-rows.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index ab71634fb2..3160b34ec6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -48,7 +48,7 @@ class Update extends CollectionUpdate namespace: 'databases', group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-collection.md', + description: '/docs/references/databases/update-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index 9fb5fc8c17..d9660b1147 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -43,7 +43,7 @@ class Get extends CollectionUsageGet namespace: 'databases', group: null, name: self::getName(), - description: '/docs/references/databases/get-collection-usage.md', + description: '/docs/references/databases/get-table-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php index f6f48ace40..96e0626e58 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php @@ -44,7 +44,7 @@ class XList extends CollectionXList namespace: 'databases', group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/list-collections.md', + description: '/docs/references/databases/list-tables.md', auth: [AuthType::KEY], responses: [ new SDKResponse( From c93d92abef22927abdd3a7be942f1c2ecddbabc9 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 10:52:15 +0530 Subject: [PATCH 171/362] rename: tests from `collections` to `legacy`. --- .github/workflows/tests.yml | 4 ++-- .../Databases/{Collections => Legacy}/DatabasesBase.php | 2 +- .../{Collections => Legacy}/DatabasesConsoleClientTest.php | 2 +- .../{Collections => Legacy}/DatabasesCustomClientTest.php | 2 +- .../{Collections => Legacy}/DatabasesCustomServerTest.php | 2 +- .../{Collections => Legacy}/DatabasesPermissionsGuestTest.php | 2 +- .../DatabasesPermissionsMemberTest.php | 2 +- .../{Collections => Legacy}/DatabasesPermissionsScope.php | 2 +- .../{Collections => Legacy}/DatabasesPermissionsTeamTest.php | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) rename tests/e2e/Services/Databases/{Collections => Legacy}/DatabasesBase.php (99%) rename tests/e2e/Services/Databases/{Collections => Legacy}/DatabasesConsoleClientTest.php (99%) rename tests/e2e/Services/Databases/{Collections => Legacy}/DatabasesCustomClientTest.php (99%) rename tests/e2e/Services/Databases/{Collections => Legacy}/DatabasesCustomServerTest.php (99%) rename tests/e2e/Services/Databases/{Collections => Legacy}/DatabasesPermissionsGuestTest.php (99%) rename tests/e2e/Services/Databases/{Collections => Legacy}/DatabasesPermissionsMemberTest.php (99%) rename tests/e2e/Services/Databases/{Collections => Legacy}/DatabasesPermissionsScope.php (98%) rename tests/e2e/Services/Databases/{Collections => Legacy}/DatabasesPermissionsTeamTest.php (99%) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cf1e55f7ec..766b295fff 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -145,7 +145,7 @@ jobs: Account, Avatars, Console, - Databases/Collections, + Databases/Legacy, Databases/Tables, Functions, FunctionsSchedule, @@ -214,7 +214,7 @@ jobs: Account, Avatars, Console, - Databases/Collections, + Databases/Legacy, Databases/Tables, Functions, FunctionsSchedule, diff --git a/tests/e2e/Services/Databases/Collections/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php similarity index 99% rename from tests/e2e/Services/Databases/Collections/DatabasesBase.php rename to tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 6b0aca1512..69b24d5052 100644 --- a/tests/e2e/Services/Databases/Collections/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -1,6 +1,6 @@ Date: Thu, 19 Jun 2025 10:54:56 +0530 Subject: [PATCH 172/362] change: namespace. --- .../Databases/Http/Databases/Collections/Attributes/Action.php | 2 +- .../Databases/Http/Databases/Collections/Documents/Action.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Action.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 2ee265a18d..b115edbee8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -83,7 +83,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'collections' : 'tables'; + return $this->isCollectionsAPI() ? 'databases' : 'tables'; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index 52dfc62f50..bd92e233f1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -78,7 +78,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'collections' : 'tables'; + return $this->isCollectionsAPI() ? 'databases' : 'tables'; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php index 4a40ea6b5f..7013259fa7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php @@ -71,7 +71,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'collections' : 'tables'; + return $this->isCollectionsAPI() ? 'databases' : 'tables'; } /** From e5caa856290a5403f0deef25b22edc4193dbe6dc Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 11:02:31 +0530 Subject: [PATCH 173/362] update: init with module structure. --- app/controllers/general.php | 14 -------- .../Modules/Databases/Http/Init/Timeout.php | 35 +++++++++++++++++++ .../Modules/Databases/Services/Http.php | 2 ++ 3 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Http/Init/Timeout.php diff --git a/app/controllers/general.php b/app/controllers/general.php index 1872ba82e3..ba5b409a2b 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1582,20 +1582,6 @@ foreach (Config::getParam('services', []) as $service) { } } -// legacy controller init hooks as the endpoint controller logic is now moved to a module structure. -// 1. databases -App::init() - ->groups(['api', 'database']) - ->inject('request') - ->inject('dbForProject') - ->action(function (Request $request, Database $dbForProject) { - $timeout = \intval($request->getHeader('x-appwrite-timeout')); - - if (!empty($timeout) && App::isDevelopment()) { - $dbForProject->setTimeout($timeout); - } - }); - // Check for any errors found while we were initialising the SDK Methods. if (!empty(Method::getErrors())) { throw new \Exception('Errors found during SDK initialization:' . PHP_EOL . implode(PHP_EOL, Method::getErrors())); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Init/Timeout.php b/src/Appwrite/Platform/Modules/Databases/Http/Init/Timeout.php new file mode 100644 index 0000000000..19e202981b --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Http/Init/Timeout.php @@ -0,0 +1,35 @@ +setType(Action::TYPE_INIT) + ->groups(['api', 'database']) + ->inject('request') + ->inject('dbForProject') + ->callback(function (Request $request, Database $dbForProject) { + $timeout = \intval($request->getHeader('x-appwrite-timeout')); + + if (!empty($timeout) && App::isDevelopment()) { + $dbForProject->setTimeout($timeout); + } + }); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Http.php b/src/Appwrite/Platform/Modules/Databases/Services/Http.php index 6c1361b0b1..a877c89345 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Http.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Services; +use Appwrite\Platform\Modules\Databases\Http\Init\Timeout; use Appwrite\Platform\Modules\Databases\Services\Registry\Collections as CollectionsRegistry; use Appwrite\Platform\Modules\Databases\Services\Registry\Databases as DatabasesRegistry; use Appwrite\Platform\Modules\Databases\Services\Registry\Tables as TablesRegistry; @@ -14,6 +15,7 @@ class Http extends Service $this->type = Service::TYPE_HTTP; foreach ([ + Timeout::class, DatabasesRegistry::class, CollectionsRegistry::class, TablesRegistry::class, From 1d23e2ec127bf53951f5718b2c4401a89887049a Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 14:31:54 +0530 Subject: [PATCH 174/362] remove: `use HTTP`. update: inline context logic. --- .../Platform/Modules/Databases/Constants.php | 24 +++++++++++++++++ .../Platform/Modules/Databases/Context.php | 26 ------------------- .../Http/Databases/Collections/Action.php | 19 +++++--------- .../Collections/Attributes/Action.php | 18 +++++-------- .../Collections/Attributes/Boolean/Create.php | 3 --- .../Collections/Attributes/Boolean/Update.php | 3 --- .../Attributes/Datetime/Create.php | 3 --- .../Attributes/Datetime/Update.php | 3 --- .../Collections/Attributes/Delete.php | 3 --- .../Collections/Attributes/Email/Create.php | 3 --- .../Collections/Attributes/Email/Update.php | 3 --- .../Collections/Attributes/Enum/Create.php | 3 --- .../Collections/Attributes/Enum/Update.php | 3 --- .../Collections/Attributes/Float/Create.php | 3 --- .../Collections/Attributes/Float/Update.php | 3 --- .../Databases/Collections/Attributes/Get.php | 3 --- .../Collections/Attributes/IP/Create.php | 3 --- .../Collections/Attributes/IP/Update.php | 3 --- .../Collections/Attributes/Integer/Create.php | 3 --- .../Collections/Attributes/Integer/Update.php | 3 --- .../Attributes/Relationship/Create.php | 3 --- .../Attributes/Relationship/Update.php | 3 --- .../Collections/Attributes/String/Create.php | 3 --- .../Collections/Attributes/String/Update.php | 3 --- .../Collections/Attributes/URL/Create.php | 3 --- .../Collections/Attributes/URL/Update.php | 3 --- .../Collections/Attributes/XList.php | 3 --- .../Http/Databases/Collections/Create.php | 3 --- .../Http/Databases/Collections/Delete.php | 3 --- .../Collections/Documents/Action.php | 18 +++++-------- .../Documents/Attribute/Decrement.php | 3 --- .../Documents/Attribute/Increment.php | 3 --- .../Collections/Documents/Bulk/Delete.php | 3 --- .../Collections/Documents/Bulk/Update.php | 3 --- .../Collections/Documents/Bulk/Upsert.php | 3 --- .../Collections/Documents/Create.php | 3 --- .../Collections/Documents/Delete.php | 3 --- .../Databases/Collections/Documents/Get.php | 3 --- .../Collections/Documents/Logs/XList.php | 3 --- .../Collections/Documents/Update.php | 3 --- .../Collections/Documents/Upsert.php | 3 --- .../Databases/Collections/Documents/XList.php | 3 --- .../Http/Databases/Collections/Get.php | 3 --- .../Databases/Collections/Indexes/Action.php | 22 +++++----------- .../Databases/Collections/Indexes/Create.php | 3 --- .../Databases/Collections/Indexes/Delete.php | 3 --- .../Databases/Collections/Indexes/Get.php | 3 --- .../Databases/Collections/Indexes/XList.php | 3 --- .../Http/Databases/Collections/Logs/XList.php | 3 --- .../Http/Databases/Collections/Update.php | 3 --- .../Http/Databases/Collections/Usage/Get.php | 3 --- .../Http/Databases/Collections/XList.php | 8 +++--- .../Databases/Http/Databases/Create.php | 3 --- .../Databases/Http/Databases/Delete.php | 3 --- .../Modules/Databases/Http/Databases/Get.php | 3 --- .../Databases/Http/Databases/Logs/XList.php | 3 --- .../Tables/Columns/Boolean/Create.php | 6 ----- .../Tables/Columns/Boolean/Update.php | 6 ----- .../Tables/Columns/Datetime/Create.php | 6 ----- .../Tables/Columns/Datetime/Update.php | 6 ----- .../Http/Databases/Tables/Columns/Delete.php | 6 ----- .../Databases/Tables/Columns/Email/Create.php | 6 ----- .../Databases/Tables/Columns/Email/Update.php | 6 ----- .../Databases/Tables/Columns/Enum/Create.php | 6 ----- .../Databases/Tables/Columns/Enum/Update.php | 6 ----- .../Databases/Tables/Columns/Float/Create.php | 6 ----- .../Databases/Tables/Columns/Float/Update.php | 6 ----- .../Http/Databases/Tables/Columns/Get.php | 6 ----- .../Databases/Tables/Columns/IP/Create.php | 6 ----- .../Databases/Tables/Columns/IP/Update.php | 6 ----- .../Tables/Columns/Integer/Create.php | 6 ----- .../Tables/Columns/Integer/Update.php | 6 ----- .../Tables/Columns/Relationship/Create.php | 6 ----- .../Tables/Columns/Relationship/Update.php | 6 ----- .../Tables/Columns/String/Create.php | 6 ----- .../Tables/Columns/String/Update.php | 6 ----- .../Databases/Tables/Columns/URL/Create.php | 6 ----- .../Databases/Tables/Columns/URL/Update.php | 6 ----- .../Http/Databases/Tables/Columns/XList.php | 6 ----- .../Http/Databases/Tables/Create.php | 6 ----- .../Http/Databases/Tables/Delete.php | 6 ----- .../Databases/Http/Databases/Tables/Get.php | 6 ----- .../Http/Databases/Tables/Indexes/Create.php | 6 ----- .../Http/Databases/Tables/Indexes/Delete.php | 6 ----- .../Http/Databases/Tables/Indexes/Get.php | 6 ----- .../Http/Databases/Tables/Indexes/XList.php | 6 ----- .../Http/Databases/Tables/Logs/XList.php | 6 ----- .../Databases/Tables/Rows/Bulk/Delete.php | 6 ----- .../Databases/Tables/Rows/Bulk/Update.php | 6 ----- .../Databases/Tables/Rows/Bulk/Upsert.php | 6 ----- .../Tables/Rows/Column/Decrement.php | 6 ----- .../Tables/Rows/Column/Increment.php | 6 ----- .../Http/Databases/Tables/Rows/Create.php | 6 ----- .../Http/Databases/Tables/Rows/Delete.php | 6 ----- .../Http/Databases/Tables/Rows/Get.php | 6 ----- .../Http/Databases/Tables/Rows/Logs/XList.php | 6 ----- .../Http/Databases/Tables/Rows/Update.php | 6 ----- .../Http/Databases/Tables/Rows/Upsert.php | 6 ----- .../Http/Databases/Tables/Rows/XList.php | 6 ----- .../Http/Databases/Tables/Update.php | 6 ----- .../Http/Databases/Tables/Usage/Get.php | 6 ----- .../Databases/Http/Databases/Tables/XList.php | 6 ----- .../Databases/Http/Databases/Update.php | 3 --- .../Databases/Http/Databases/Usage/Get.php | 3 --- .../Databases/Http/Databases/Usage/XList.php | 3 --- .../Databases/Http/Databases/XList.php | 3 --- .../Platform/Modules/Databases/Module.php | 2 ++ .../Modules/Databases/Services/Http.php | 4 ++- .../Services/Registry/Collections.php | 2 ++ 109 files changed, 62 insertions(+), 516 deletions(-) create mode 100644 src/Appwrite/Platform/Modules/Databases/Constants.php delete mode 100644 src/Appwrite/Platform/Modules/Databases/Context.php diff --git a/src/Appwrite/Platform/Modules/Databases/Constants.php b/src/Appwrite/Platform/Modules/Databases/Constants.php new file mode 100644 index 0000000000..cfc297c3f4 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/Constants.php @@ -0,0 +1,24 @@ +context = TABLES; } - $this->context = $context; + return parent::setHttpPath($path); } /** @@ -53,7 +48,7 @@ abstract class Action extends UtopiaAction */ final protected function isCollectionsAPI(): bool { - return $this->getContext() === Context::DATABASE_COLLECTIONS; + return $this->getContext() === COLLECTIONS; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index b115edbee8..0a977bce32 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -5,7 +5,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attribu use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Utopia\Response; use Appwrite\Utopia\Response as UtopiaResponse; use Throwable; @@ -29,25 +28,20 @@ abstract class Action extends UtopiaAction /** * @var string|null The current context (either 'column' or 'attribute') */ - private ?string $context = Context::DATABASE_ATTRIBUTES; + private ?string $context = ATTRIBUTES; /** * Get the correct response model. */ abstract protected function getResponseModel(): string|array; - /** - * Set the context to either `column` or `attribute`. - * - * @throws \InvalidArgumentException If the context is invalid. - */ - final protected function setContext(string $context): void + public function setHttpPath(string $path): UtopiaAction { - if (!\in_array($context, [Context::DATABASE_COLUMNS, Context::DATABASE_ATTRIBUTES], true)) { - throw new \InvalidArgumentException("Invalid context '$context'. Use `Context::DATABASE_COLUMNS` or `Context::DATABASE_ATTRIBUTES`"); + if (str_contains($path, '/:databaseId/tables')) { + $this->context = COLUMNS; } - $this->context = $context; + return parent::setHttpPath($path); } /** @@ -65,7 +59,7 @@ abstract class Action extends UtopiaAction { // columns in tables context // attributes in collections context - return $this->getContext() === Context::DATABASE_ATTRIBUTES; + return $this->getContext() === ATTRIBUTES; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php index b1fddc0371..c38ef8d703 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php @@ -13,14 +13,11 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createBooleanAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php index 7aa2360fb8..9bb606edf5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php @@ -12,15 +12,12 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateBooleanAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php index fd54fe0843..ff8054abe4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php @@ -14,14 +14,11 @@ use Utopia\Database\Document; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createDatetimeAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php index 17818fec2d..5f8909a294 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php @@ -13,15 +13,12 @@ use Utopia\Database\Database; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateDatetimeAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 4582500091..5dba0860e2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -15,13 +15,10 @@ use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\IndexDependency as IndexDependencyValidator; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Delete extends Action { - use HTTP; - public static function getName(): string { return 'deleteAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php index 80f0270ea3..3c703f23a7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php @@ -14,14 +14,11 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createEmailAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php index 2f14d8a361..c8a34cf55c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php @@ -13,15 +13,12 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateEmailAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index 006de12e91..99d540a4c2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -14,7 +14,6 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; @@ -22,8 +21,6 @@ use Utopia\Validator\Text; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createEnumAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php index c2f6d7696c..8624bde78d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php @@ -12,7 +12,6 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; @@ -21,8 +20,6 @@ use Utopia\Validator\Text; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateEnumAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php index 35e9bb68a1..520366f689 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php @@ -14,7 +14,6 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\FloatValidator; @@ -22,8 +21,6 @@ use Utopia\Validator\Range; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createFloatAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php index 2fdcf949f1..18a966d91d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php @@ -12,7 +12,6 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\FloatValidator; @@ -20,8 +19,6 @@ use Utopia\Validator\Nullable; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateFloatAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index d49639e049..d751e8def0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -11,13 +11,10 @@ use Utopia\Database\Database; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Get extends Action { - use HTTP; - public static function getName(): string { return 'getAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php index c62e2add01..e46e508bc6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php @@ -13,15 +13,12 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\IP; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createIpAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php index a3e1ea5a61..e9d9404c17 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php @@ -12,7 +12,6 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\IP; @@ -20,8 +19,6 @@ use Utopia\Validator\Nullable; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateIpAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php index 69272b6aea..e348e9a2a6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php @@ -14,7 +14,6 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Integer; @@ -22,8 +21,6 @@ use Utopia\Validator\Range; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createIntegerAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php index 9c05382173..bbbf045115 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php @@ -12,7 +12,6 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Integer; @@ -20,8 +19,6 @@ use Utopia\Validator\Nullable; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateIntegerAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php index fa8d0ad750..795ea445c8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php @@ -15,15 +15,12 @@ use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\WhiteList; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createRelationshipAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php index da2d0b9b08..7202a3e4e6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php @@ -12,14 +12,11 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\WhiteList; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateRelationshipAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index cc989f6687..8ce8626f3a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -14,7 +14,6 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator; use Utopia\Validator\Boolean; @@ -23,8 +22,6 @@ use Utopia\Validator\Text; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createStringAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php index b3f4cf3f03..b359b83eaa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php @@ -12,7 +12,6 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator; use Utopia\Validator\Boolean; @@ -22,8 +21,6 @@ use Utopia\Validator\Text; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateStringAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php index 2d72533cf1..27bc2d38c1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php @@ -13,15 +13,12 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\URL; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createUrlAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php index e5c4288d92..ae48c43653 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php @@ -12,7 +12,6 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; @@ -20,8 +19,6 @@ use Utopia\Validator\URL; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateUrlAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index 2509115e13..e09420d7ce 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -16,13 +16,10 @@ use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class XList extends Action { - use HTTP; - public static function getName(): string { return 'listAttributes'; 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 5edce7715f..176c3ca853 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -21,15 +21,12 @@ use Utopia\Database\Helpers\Permission; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Text; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createCollection'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php index b8080ab471..e4618a40b7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php @@ -13,13 +13,10 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Delete extends Action { - use HTTP; - public static function getName(): string { return 'deleteCollection'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index bd92e233f1..bfebca4cf7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -3,7 +3,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\Context; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; @@ -14,25 +13,20 @@ abstract class Action extends UtopiaAction /** * @var string|null The current context (either 'row' or 'document') */ - private ?string $context = Context::DATABASE_DOCUMENTS; + private ?string $context = DOCUMENTS; /** * Get the response model used in the SDK and HTTP responses. */ abstract protected function getResponseModel(): string; - /** - * Set the context to either `row` or `document`. - * - * @throws \InvalidArgumentException If the context is invalid. - */ - final protected function setContext(string $context): void + public function setHttpPath(string $path): UtopiaAction { - if (!\in_array($context, [Context::DATABASE_ROWS, Context::DATABASE_DOCUMENTS], true)) { - throw new \InvalidArgumentException("Invalid context '$context'. Use `Context::DATABASE_ROWS` or `Context::DATABASE_DOCUMENTS`"); + if (str_contains($path, '/:databaseId/tables')) { + $this->context = ROWS; } - $this->context = $context; + return parent::setHttpPath($path); } /** @@ -60,7 +54,7 @@ abstract class Action extends UtopiaAction { // rows in tables api context // documents in collections api context - return $this->getContext() === Context::DATABASE_DOCUMENTS; + return $this->getContext() === DOCUMENTS; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php index 9a8da5858c..40035ac302 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php @@ -19,14 +19,11 @@ use Utopia\Database\Exception\Type as TypeException; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Numeric; class Decrement extends Action { - use HTTP; - public static function getName(): string { return 'decrementDocumentAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php index b65ca3c285..90694d1c69 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php @@ -19,14 +19,11 @@ use Utopia\Database\Exception\Type as TypeException; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Numeric; class Increment extends Action { - use HTTP; - public static function getName(): string { return 'incrementDocumentAttribute'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index bee3b35599..4ec852f7c5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -17,15 +17,12 @@ use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Exception\Restricted as RestrictedException; use Utopia\Database\Query; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Text; class Delete extends Action { - use HTTP; - public static function getName(): string { return 'deleteDocuments'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index 23c8d5d58e..d391c805fa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -19,7 +19,6 @@ use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Query; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\JSON; @@ -27,8 +26,6 @@ use Utopia\Validator\Text; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateDocuments'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index 770f7a4d95..f4c8c2e6d2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -17,15 +17,12 @@ use Utopia\Database\Exception\Duplicate as DuplicateException; use Utopia\Database\Exception\Relationship as RelationshipException; use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\JSON; class Upsert extends Action { - use HTTP; - public static function getName(): string { return 'upsertDocuments'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index ebab4a7ece..6c1fdae5e6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -25,15 +25,12 @@ use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\JSON; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createDocument'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index d8ec82910c..8c8cec2986 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -16,13 +16,10 @@ use Utopia\Database\Exception\Conflict as ConflictException; use Utopia\Database\Exception\Restricted as RestrictedException; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Delete extends Action { - use HTTP; - public static function getName(): string { return 'deleteDocument'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index fe40a2412f..7376fe770a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -15,15 +15,12 @@ use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Text; class Get extends Action { - use HTTP; - public static function getName(): string { return 'getDocument'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index 4f4dad9882..3fe25b9441 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -23,13 +23,10 @@ use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; use Utopia\Locale\Locale; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class XList extends Action { - use HTTP; - public static function getName(): string { return 'listDocumentLogs'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index c39eeea707..ce822ca713 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -23,14 +23,11 @@ use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\JSON; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateDocument'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index fa632c7b2b..7a077fed0d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -24,14 +24,11 @@ use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\JSON; class Upsert extends Action { - use HTTP; - public static function getName(): string { return 'upsertDocument'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 9aad8f4b77..2e76942db1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -18,15 +18,12 @@ use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Text; class XList extends Action { - use HTTP; - public static function getName(): string { return 'listDocuments'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php index 0359025fc5..e35a924657 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php @@ -11,13 +11,10 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Get extends Action { - use HTTP; - public static function getName(): string { return 'getCollection'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php index 7013259fa7..33c2977be5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php @@ -3,7 +3,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\Context; use Utopia\Platform\Action as UtopiaAction; abstract class Action extends UtopiaAction @@ -11,25 +10,20 @@ abstract class Action extends UtopiaAction /** * The current API context (either 'columnIndex' or 'index'). */ - private ?string $context = Context::DATABASE_INDEX; + private ?string $context = INDEX; /** * Get the response model used in the SDK and HTTP responses. */ abstract protected function getResponseModel(): string; - /** - * Set the current API context. - * - * @param string $context Must be either `DATABASE_INDEX` or `DATABASE_COLUMN_INDEX`. - */ - final protected function setContext(string $context): void + public function setHttpPath(string $path): UtopiaAction { - if (!\in_array($context, [Context::DATABASE_INDEX, Context::DATABASE_COLUMN_INDEX], true)) { - throw new \InvalidArgumentException("Invalid context '$context'. Must be either `Context::DATABASE_COLUMN_INDEX` or `Context::DATABASE_INDEX`."); + if (str_contains($path, '/:databaseId/tables')) { + $this->context = COLUMN_INDEX; } - $this->context = $context; + return parent::setHttpPath($path); } /** @@ -37,9 +31,7 @@ abstract class Action extends UtopiaAction */ final protected function getParentContext(): string { - return $this->getContext() === Context::DATABASE_INDEX - ? Context::DATABASE_ATTRIBUTES - : Context::DATABASE_COLUMNS; + return $this->getContext() === INDEX ? ATTRIBUTES : COLUMNS; } /** @@ -55,7 +47,7 @@ abstract class Action extends UtopiaAction */ final protected function isCollectionsAPI(): bool { - return $this->getParentContext() === Context::DATABASE_ATTRIBUTES; + return $this->getParentContext() === ATTRIBUTES; } /** 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 9dbd7924c6..9003fbb4a9 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 @@ -19,7 +19,6 @@ use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Index as IndexValidator; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Integer; @@ -28,8 +27,6 @@ use Utopia\Validator\WhiteList; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createIndex'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index bb0b7bc4ca..701ab103ad 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -14,13 +14,10 @@ use Utopia\Database\Database; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Delete extends Action { - use HTTP; - public static function getName(): string { return 'deleteIndex'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index e29bbf6647..c5b81fe231 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -12,13 +12,10 @@ use Utopia\Database\Database; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Get extends Action { - use HTTP; - public static function getName(): string { return 'getIndex'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index dae25a3335..36c52f711e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -17,13 +17,10 @@ use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class XList extends Action { - use HTTP; - public static function getName(): string { return 'listIndexes'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 2f9ac2c8c0..70bb14e9d8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -23,13 +23,10 @@ use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; use Utopia\Locale\Locale; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class XList extends Action { - use HTTP; - public static function getName(): string { return 'listCollectionLogs'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index cc41d716d4..fd3b1e8bda 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -14,15 +14,12 @@ use Utopia\Database\Helpers\Permission; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Text; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateCollection'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php index 0c565806cc..e5335d6abf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php @@ -15,14 +15,11 @@ use Utopia\Database\Document; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\WhiteList; class Get extends Action { - use HTTP; - public static function getName(): string { return 'getCollectionUsage'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index d3ddb9301f..ae63a40e64 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -17,14 +17,11 @@ use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Text; class XList extends Action { - use HTTP; - public static function getName(): string { return 'listCollections'; @@ -68,6 +65,11 @@ class XList extends Action public function action(string $databaseId, array $queries, string $search, UtopiaResponse $response, Database $dbForProject): void { + print_r(json_encode([ + 'context' => $this->getContext(), + 'model' => $this->getResponseModel() + ], JSON_PRETTY_PRINT)); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index 3b9efa2fca..38374402fb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -19,15 +19,12 @@ use Utopia\Database\Exception\Limit as LimitException; use Utopia\Database\Exception\Structure as StructureException; use Utopia\Database\Helpers\ID; use Utopia\Platform\Action; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Text; class Create extends Action { - use HTTP; - public static function getName(): string { return 'createDatabase'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php index b9b475f699..56cf1a4296 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php @@ -13,13 +13,10 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Delete extends Action { - use HTTP; - public static function getName(): string { return 'deleteDatabase'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php index c2c6a57da1..f478dc7917 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php @@ -11,13 +11,10 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Get extends Action { - use HTTP; - public static function getName(): string { return 'getDatabase'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php index a531110398..52f2ad93b6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php @@ -23,13 +23,10 @@ use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; use Utopia\Locale\Locale; use Utopia\Platform\Action; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class XList extends Action { - use HTTP; - public static function getName(): string { return 'listDatabaseLogs'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php index b8675877f3..9e65e6e5b3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Create as BooleanCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -10,14 +9,11 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; class Create extends BooleanCreate { - use HTTP; - public static function getName(): string { return 'createBooleanColumn'; @@ -30,8 +26,6 @@ class Create extends BooleanCreate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php index 09d01cae21..f7eff81ae3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Update as BooleanUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,15 +10,12 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; class Update extends BooleanUpdate { - use HTTP; - public static function getName(): string { return 'updateBooleanColumn'; @@ -32,8 +28,6 @@ class Update extends BooleanUpdate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php index 34ead7c33d..5bb83733a4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Create as DatetimeCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -12,14 +11,11 @@ use Utopia\Database\Database; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; class Create extends DatetimeCreate { - use HTTP; - public static function getName(): string { return 'createDatetimeColumn'; @@ -32,8 +28,6 @@ class Create extends DatetimeCreate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php index 5b026cd373..6710f76aaa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Update as DatetimeUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -13,15 +12,12 @@ use Utopia\Database\Database; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; class Update extends DatetimeUpdate { - use HTTP; - public static function getName(): string { return 'updateDatetimeColumn'; @@ -34,8 +30,6 @@ class Update extends DatetimeUpdate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php index 567cb02169..b85248e8c3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Delete as AttributesDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,13 +10,10 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Delete extends AttributesDelete { - use HTTP; - public static function getName(): string { return 'deleteColumn'; @@ -31,8 +27,6 @@ class Delete extends AttributesDelete public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php index f5bb2f5220..6aade1aa50 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php @@ -3,7 +3,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email; use Appwrite\Network\Validator\Email; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Create as EmailCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -11,14 +10,11 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; class Create extends EmailCreate { - use HTTP; - public static function getName(): string { return 'createEmailColumn'; @@ -31,8 +27,6 @@ class Create extends EmailCreate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php index faba9279b5..10213c87bb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php @@ -3,7 +3,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email; use Appwrite\Network\Validator\Email; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Update as EmailUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -12,15 +11,12 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; class Update extends EmailUpdate { - use HTTP; - public static function getName(): string { return 'updateEmailColumn'; @@ -33,8 +29,6 @@ class Update extends EmailUpdate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php index ec1d36a916..8e9a658aa8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Create as EnumCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -11,7 +10,6 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; @@ -19,8 +17,6 @@ use Utopia\Validator\Text; class Create extends EnumCreate { - use HTTP; - public static function getName(): string { return 'createEnumColumn'; @@ -33,8 +29,6 @@ class Create extends EnumCreate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php index ef2c829e0a..d1418e5144 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Update as EnumUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -12,7 +11,6 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; @@ -21,8 +19,6 @@ use Utopia\Validator\Text; class Update extends EnumUpdate { - use HTTP; - public static function getName(): string { return 'updateEnumColumn'; @@ -35,8 +31,6 @@ class Update extends EnumUpdate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php index 32579017c6..5c99b90f52 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Create as FloatCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -10,15 +9,12 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\FloatValidator; class Create extends FloatCreate { - use HTTP; - public static function getName(): string { return 'createFloatColumn'; @@ -31,8 +27,6 @@ class Create extends FloatCreate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php index 4ed420cfa0..5360ca0304 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Update as FloatUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,7 +10,6 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\FloatValidator; @@ -19,8 +17,6 @@ use Utopia\Validator\Nullable; class Update extends FloatUpdate { - use HTTP; - public static function getName(): string { return 'updateFloatColumn'; @@ -33,8 +29,6 @@ class Update extends FloatUpdate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php index ed28f96535..17777409d2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Get as AttributesGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -10,13 +9,10 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Get extends AttributesGet { - use HTTP; - public static function getName(): string { return 'getColumn'; @@ -40,8 +36,6 @@ class Get extends AttributesGet public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php index 8acc47f051..cb58a14cbe 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Create as IPCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -10,15 +9,12 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\IP; class Create extends IPCreate { - use HTTP; - public static function getName(): string { return 'createIpColumn'; @@ -31,8 +27,6 @@ class Create extends IPCreate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php index c43f132c13..ef4c62a51f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Update as IPUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,7 +10,6 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\IP; @@ -19,8 +17,6 @@ use Utopia\Validator\Nullable; class Update extends IPUpdate { - use HTTP; - public static function getName(): string { return 'updateIpColumn'; @@ -33,8 +29,6 @@ class Update extends IPUpdate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php index 7694e9d74f..6ca6cc4b93 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Create as IntegerCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -10,15 +9,12 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Integer; class Create extends IntegerCreate { - use HTTP; - public static function getName(): string { return 'createIntegerColumn'; @@ -31,8 +27,6 @@ class Create extends IntegerCreate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php index b3ce988830..764ae31f35 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Update as IntegerUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,7 +10,6 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Integer; @@ -19,8 +17,6 @@ use Utopia\Validator\Nullable; class Update extends IntegerUpdate { - use HTTP; - public static function getName(): string { return 'updateIntegerColumn'; @@ -33,8 +29,6 @@ class Update extends IntegerUpdate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php index 133f772605..20e89396a0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Create as RelationshipCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -11,15 +10,12 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\WhiteList; class Create extends RelationshipCreate { - use HTTP; - public static function getName(): string { return 'createRelationshipColumn'; @@ -32,8 +28,6 @@ class Create extends RelationshipCreate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/relationship') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php index ef1d8c7a33..508c5da57a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Update as RelationshipUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -12,14 +11,11 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\WhiteList; class Update extends RelationshipUpdate { - use HTTP; - public static function getName(): string { return 'updateRelationshipColumn'; @@ -32,8 +28,6 @@ class Update extends RelationshipUpdate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key/relationship') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php index ed7989fbc3..a11ee3464e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Create as StringCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -10,7 +9,6 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator; use Utopia\Validator\Boolean; @@ -19,8 +17,6 @@ use Utopia\Validator\Text; class Create extends StringCreate { - use HTTP; - public static function getName(): string { return 'createStringColumn'; @@ -33,8 +29,6 @@ class Create extends StringCreate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php index f7ec773e3c..92df091866 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Update as StringUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,7 +10,6 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator; use Utopia\Validator\Boolean; @@ -21,8 +19,6 @@ use Utopia\Validator\Text; class Update extends StringUpdate { - use HTTP; - public static function getName(): string { return 'updateStringColumn'; @@ -35,8 +31,6 @@ class Update extends StringUpdate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php index 0e6fe7cff3..84c488ccfc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Create as URLCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -10,15 +9,12 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\URL; class Create extends URLCreate { - use HTTP; - public static function getName(): string { return 'createUrlColumn'; @@ -31,8 +27,6 @@ class Create extends URLCreate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php index 6f3698c0cf..d3681b9358 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Update as URLUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,7 +10,6 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Nullable; @@ -19,8 +17,6 @@ use Utopia\Validator\URL; class Update extends URLUpdate { - use HTTP; - public static function getName(): string { return 'updateUrlColumn'; @@ -33,8 +29,6 @@ class Update extends URLUpdate public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php index c6ceb35f48..29a108f180 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\XList as AttributesXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; @@ -10,13 +9,10 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Columns; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class XList extends AttributesXList { - use HTTP; - public static function getName(): string { return 'listColumns'; @@ -29,8 +25,6 @@ class XList extends AttributesXList public function __construct() { - $this->setContext(Context::DATABASE_COLUMNS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index c20865d110..273791f154 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Create as CollectionCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -12,15 +11,12 @@ use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Text; class Create extends CollectionCreate { - use HTTP; - public static function getName(): string { return 'createTable'; @@ -33,8 +29,6 @@ class Create extends CollectionCreate public function __construct() { - $this->setContext(Context::DATABASE_TABLES); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php index 85e52ac37d..0a20a20f54 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Delete as CollectionDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -10,13 +9,10 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Delete extends CollectionDelete { - use HTTP; - public static function getName(): string { return 'deleteTable'; @@ -29,8 +25,6 @@ class Delete extends CollectionDelete public function __construct() { - $this->setContext(Context::DATABASE_TABLES); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php index 473dfb6273..7f565231f9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Get as CollectionGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -10,13 +9,10 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Get extends CollectionGet { - use HTTP; - public static function getName(): string { return 'getTable'; @@ -29,8 +25,6 @@ class Get extends CollectionGet public function __construct() { - $this->setContext(Context::DATABASE_TABLES); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php index e57e962e87..b11892e0f9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Create as IndexCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -12,7 +11,6 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Integer; @@ -21,8 +19,6 @@ use Utopia\Validator\WhiteList; class Create extends IndexCreate { - use HTTP; - public static function getName(): string { return 'createColumnIndex'; @@ -35,8 +31,6 @@ class Create extends IndexCreate public function __construct() { - $this->setContext(Context::DATABASE_COLUMN_INDEX); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php index 7cda1ce471..4ff9638f27 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Delete as IndexDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,13 +10,10 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Delete extends IndexDelete { - use HTTP; - public static function getName(): string { return 'updateColumnIndex'; @@ -34,8 +30,6 @@ class Delete extends IndexDelete public function __construct() { - $this->setContext(Context::DATABASE_COLUMN_INDEX); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php index 3bee87de4a..79529fda66 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Get as IndexGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,13 +10,10 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Get extends IndexGet { - use HTTP; - public static function getName(): string { return 'getColumnIndex'; @@ -30,8 +26,6 @@ class Get extends IndexGet public function __construct() { - $this->setContext(Context::DATABASE_COLUMN_INDEX); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php index 1af13dc82e..12581a4fc3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\XList as IndexXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,13 +10,10 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Indexes; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class XList extends IndexXList { - use HTTP; - public static function getName(): string { return 'listColumnIndexes'; @@ -30,8 +26,6 @@ class XList extends IndexXList public function __construct() { - $this->setContext(Context::DATABASE_COLUMN_INDEX); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php index 244cebe3ad..8e652c5416 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Logs; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Logs\XList as CollectionLogXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -12,13 +11,10 @@ use Utopia\Database\Validator\Queries; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class XList extends CollectionLogXList { - use HTTP; - public static function getName(): string { return 'listTableLogs'; @@ -26,8 +22,6 @@ class XList extends CollectionLogXList public function __construct() { - $this->setContext(Context::DATABASE_TABLES); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/logs') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php index 9ddff818e3..945450aee3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Delete as DocumentsDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -10,15 +9,12 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Text; class Delete extends DocumentsDelete { - use HTTP; - public static function getName(): string { return 'deleteRows'; @@ -31,8 +27,6 @@ class Delete extends DocumentsDelete public function __construct() { - $this->setContext(Context::DATABASE_ROWS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php index 1b9ddb60ab..916d683491 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Update as DocumentsUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -10,7 +9,6 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\JSON; @@ -18,8 +16,6 @@ use Utopia\Validator\Text; class Update extends DocumentsUpdate { - use HTTP; - public static function getName(): string { return 'updateRows'; @@ -32,8 +28,6 @@ class Update extends DocumentsUpdate public function __construct() { - $this->setContext(Context::DATABASE_ROWS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php index 2b4117c23e..65c848a7c4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Upsert as DocumentsUpsert; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -10,15 +9,12 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\JSON; class Upsert extends DocumentsUpsert { - use HTTP; - public static function getName(): string { return 'upsertRows'; @@ -31,8 +27,6 @@ class Upsert extends DocumentsUpsert public function __construct() { - $this->setContext(Context::DATABASE_ROWS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php index 128d578cde..916c051d8a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Column; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Attribute\Decrement as DecrementDocumentAttribute; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,14 +10,11 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Numeric; class Decrement extends DecrementDocumentAttribute { - use HTTP; - public static function getName(): string { return 'decrementRowColumn'; @@ -31,8 +27,6 @@ class Decrement extends DecrementDocumentAttribute public function __construct() { - $this->setContext(Context::DATABASE_ROWS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/:column/decrement') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php index a3e256d561..ba78833744 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Column; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Attribute\Increment as IncrementDocumentAttribute; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,14 +10,11 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Key; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Numeric; class Increment extends IncrementDocumentAttribute { - use HTTP; - public static function getName(): string { return 'incrementRowColumn'; @@ -31,8 +27,6 @@ class Increment extends IncrementDocumentAttribute public function __construct() { - $this->setContext(Context::DATABASE_ROWS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/:column/increment') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index 03e5548ddb..ba2b461d6e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Create as DocumentCreate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -14,15 +13,12 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\JSON; class Create extends DocumentCreate { - use HTTP; - public static function getName(): string { return 'createRow'; @@ -40,8 +36,6 @@ class Create extends DocumentCreate public function __construct() { - $this->setContext(Context::DATABASE_ROWS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php index 5edf4e0b73..27fe101f1d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Delete as DocumentDelete; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -10,13 +9,10 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class Delete extends DocumentDelete { - use HTTP; - public static function getName(): string { return 'deleteRow'; @@ -35,8 +31,6 @@ class Delete extends DocumentDelete public function __construct() { - $this->setContext(Context::DATABASE_ROWS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php index 74e1f90497..8100abbea5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Get as DocumentGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -10,15 +9,12 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Text; class Get extends DocumentGet { - use HTTP; - public static function getName(): string { return 'getRow'; @@ -31,8 +27,6 @@ class Get extends DocumentGet public function __construct() { - $this->setContext(Context::DATABASE_ROWS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php index 1cc5202152..f39a77323f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Logs; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Logs\XList as DocumentLogXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -12,13 +11,10 @@ use Utopia\Database\Validator\Queries; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; class XList extends DocumentLogXList { - use HTTP; - public static function getName(): string { return 'listRowLogs'; @@ -26,8 +22,6 @@ class XList extends DocumentLogXList public function __construct() { - $this->setContext(Context::DATABASE_ROWS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/logs') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php index d37f5cc92f..9fa596ecc0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Update as DocumentUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -12,14 +11,11 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\JSON; class Update extends DocumentUpdate { - use HTTP; - public static function getName(): string { return 'updateRow'; @@ -32,8 +28,6 @@ class Update extends DocumentUpdate public function __construct() { - $this->setContext(Context::DATABASE_ROWS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php index 800efa9cde..5c0fde708b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Upsert as DocumentUpsert; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -12,14 +11,11 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\JSON; class Upsert extends DocumentUpsert { - use HTTP; - public static function getName(): string { return 'upsertRow'; @@ -32,8 +28,6 @@ class Upsert extends DocumentUpsert public function __construct() { - $this->setContext(Context::DATABASE_ROWS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php index 9d03603a0e..b7ad763e36 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\XList as DocumentXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -10,15 +9,12 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\ArrayList; use Utopia\Validator\Text; class XList extends DocumentXList { - use HTTP; - public static function getName(): string { return 'listRows'; @@ -31,8 +27,6 @@ class XList extends DocumentXList public function __construct() { - $this->setContext(Context::DATABASE_ROWS); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index ab71634fb2..210b281e57 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Update as CollectionUpdate; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,15 +10,12 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\Permissions; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Text; class Update extends CollectionUpdate { - use HTTP; - public static function getName(): string { return 'updateTable'; @@ -32,8 +28,6 @@ class Update extends CollectionUpdate public function __construct() { - $this->setContext(Context::DATABASE_TABLES); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index 9fb5fc8c17..c82eaae7c5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Usage; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Usage\Get as CollectionUsageGet; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -10,14 +9,11 @@ use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\WhiteList; class Get extends CollectionUsageGet { - use HTTP; - public static function getName(): string { return 'getTableUsage'; @@ -30,8 +26,6 @@ class Get extends CollectionUsageGet public function __construct() { - $this->setContext(Context::DATABASE_TABLES); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/usage') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php index f6f48ace40..391b91a3dd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php @@ -2,7 +2,6 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; -use Appwrite\Platform\Modules\Databases\Context; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\XList as CollectionXList; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; @@ -11,14 +10,11 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Tables; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Validator\UID; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Text; class XList extends CollectionXList { - use HTTP; - public static function getName(): string { return 'listTables'; @@ -31,8 +27,6 @@ class XList extends CollectionXList public function __construct() { - $this->setContext(Context::DATABASE_TABLES); - $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) ->setHttpPath('/v1/databases/:databaseId/tables') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php index a0e440c657..a746f4ce4c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php @@ -12,15 +12,12 @@ use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Text; class Update extends Action { - use HTTP; - public static function getName(): string { return 'updateDatabase'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index 1a85380767..5482d25269 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -15,14 +15,11 @@ use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\UID; use Utopia\Platform\Action; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\WhiteList; class Get extends Action { - use HTTP; - public static function getName(): string { return 'getUsage'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php index 2d551465db..fd3a95cd24 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -13,14 +13,11 @@ use Utopia\Database\Document; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Platform\Action; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\WhiteList; class XList extends Action { - use HTTP; - public static function getName(): string { return 'listUsages'; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php index 7179be90ec..52f3fd2b55 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -16,14 +16,11 @@ use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; use Utopia\Database\Validator\Query\Cursor; use Utopia\Platform\Action; -use Utopia\Platform\Scope\HTTP; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Text; class XList extends Action { - use HTTP; - public static function getName(): string { return 'listDatabases'; diff --git a/src/Appwrite/Platform/Modules/Databases/Module.php b/src/Appwrite/Platform/Modules/Databases/Module.php index f8686999dd..bf336413d4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Module.php +++ b/src/Appwrite/Platform/Modules/Databases/Module.php @@ -2,6 +2,8 @@ namespace Appwrite\Platform\Modules\Databases; +require_once __DIR__ . '/Constants.php'; + use Appwrite\Platform\Modules\Databases\Services\Http; use Appwrite\Platform\Modules\Databases\Services\Workers; use Utopia\Platform; diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Http.php b/src/Appwrite/Platform/Modules/Databases/Services/Http.php index a877c89345..d2f66f3657 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Http.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Http.php @@ -14,8 +14,10 @@ class Http extends Service { $this->type = Service::TYPE_HTTP; + // Project database timeout init hook! + $this->addAction(Timeout::getName(), new Timeout()); + foreach ([ - Timeout::class, DatabasesRegistry::class, CollectionsRegistry::class, TablesRegistry::class, diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php index d036d2fd7b..bb0002ed47 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Collections.php @@ -35,6 +35,7 @@ use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bul use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Create as CreateDocument; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Delete as DeleteDocument; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Get as GetDocument; +use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Logs\XList as ListDocumentLogs; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Update as UpdateDocument; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Upsert as UpsertDocument; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\XList as ListDocuments; @@ -90,6 +91,7 @@ class Collections extends Base $service->addAction(DeleteDocument::getName(), new DeleteDocument()); $service->addAction(DeleteDocuments::getName(), new DeleteDocuments()); $service->addAction(ListDocuments::getName(), new ListDocuments()); + $service->addAction(ListDocumentLogs::getName(), new ListDocumentLogs()); $service->addAction(IncrementDocumentAttribute::getName(), new IncrementDocumentAttribute()); $service->addAction(DecrementDocumentAttribute::getName(), new DecrementDocumentAttribute()); From 03b40262331cfae6a01b8fff5913ab3c79b9a25c Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 14:33:23 +0530 Subject: [PATCH 175/362] remove: leftover. --- .../Http/Databases/Collections/Documents/Attribute/Increment.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php index 90694d1c69..6755d313c0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php @@ -99,7 +99,6 @@ class Increment extends Action } catch (ConflictException) { throw new Exception($this->getConflictException()); } catch (NotFoundException) { - // todo: @itznotabug what do we name this exception now? throw new Exception($this->getStructureNotFoundException()); } catch (LimitException) { throw new Exception($this->getLimitException(), $this->getSdkNamespace() . ' "' . $attribute . '" has reached the maximum value of ' . $max); From 60ab787894f963b38fb6a3449ca26e848d3d4a21 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 14:33:58 +0530 Subject: [PATCH 176/362] address comments. --- .../Databases/Http/Databases/Collections/Attributes/Action.php | 2 +- .../Databases/Http/Databases/Collections/Attributes/Delete.php | 2 +- .../Databases/Http/Databases/Collections/Attributes/Get.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 0a977bce32..3f331edc9a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -221,7 +221,7 @@ abstract class Action extends UtopiaAction /** * Get the proper column/attribute type based on set context. */ - final protected function getCorrectModel(string $type, string $format): string + final protected function getModel(string $type, string $format): string { $isCollections = $this->isCollectionsAPI(); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 5dba0860e2..271ea56f29 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -138,7 +138,7 @@ class Delete extends Action $type = $attribute->getAttribute('type'); $format = $attribute->getAttribute('format'); - $model = $this->getCorrectModel($type, $format); + $model = $this->getModel($type, $format); $queueForEvents ->setContext('database', $db) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index d751e8def0..579f7883e0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -91,7 +91,7 @@ class Get extends Action $attribute->setAttribute($key, $option); } - $model = $this->getCorrectModel($type, $format); + $model = $this->getModel($type, $format); $attribute->setAttribute('encrypt', in_array('encrypt', $filters)); From 3d6acaa19c7e25bce884bbb0397d3ff4b6993a36 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 14:49:42 +0530 Subject: [PATCH 177/362] address comments. --- .../Platform/Modules/Databases/Http/Databases/Tables/Create.php | 2 +- .../Platform/Modules/Databases/Http/Databases/Tables/Update.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index 273791f154..92b29ffdc6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -57,7 +57,7 @@ class Create extends CollectionCreate ->param('tableId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Table name. Max length: 128 chars.') ->param('permissions', null, 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 document. [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) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index 210b281e57..62a1b3bdee 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -54,7 +54,7 @@ class Update extends CollectionUpdate )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('tableId', '', new UID(), 'Table ID.') - ->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.') + ->param('name', null, new Text(128), 'Table name. Max length: 128 chars.') ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, the current permissions are inherited. [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 document. [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) From caf23083003a4ac44897018a684ffe38ff6328a0 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 14:50:15 +0530 Subject: [PATCH 178/362] address comment. --- .../Modules/Databases/Http/Databases/Collections/XList.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index ae63a40e64..3a9868dec2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -65,11 +65,6 @@ class XList extends Action public function action(string $databaseId, array $queries, string $search, UtopiaResponse $response, Database $dbForProject): void { - print_r(json_encode([ - 'context' => $this->getContext(), - 'model' => $this->getResponseModel() - ], JSON_PRETTY_PRINT)); - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); if ($database->isEmpty()) { From 5287a3d6190960320888ab2ebe7bb88779927f41 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 14:52:01 +0530 Subject: [PATCH 179/362] address comment. --- .../Databases/Http/Databases/Collections/Attributes/Delete.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 271ea56f29..5816de31a2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -26,7 +26,6 @@ class Delete extends Action protected function getResponseModel(): string|array { - // we should correctly & carefully set the context later. return UtopiaResponse::MODEL_NONE; } From 7ebe8f6c9e687b665166d481697c60866a9addc6 Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 17:34:16 +0530 Subject: [PATCH 180/362] revert: legacy tests namespacing to old. --- tests/e2e/Services/GraphQL/Base.php | 80 ++++++------ .../{Collections => Legacy}/AbuseTest.php | 2 +- .../{Collections => Legacy}/AuthTest.php | 8 +- .../DatabaseClientTest.php | 22 ++-- .../DatabaseServerTest.php | 118 +++++++++--------- 5 files changed, 115 insertions(+), 115 deletions(-) rename tests/e2e/Services/GraphQL/{Collections => Legacy}/AbuseTest.php (99%) rename tests/e2e/Services/GraphQL/{Collections => Legacy}/AuthTest.php (96%) rename tests/e2e/Services/GraphQL/{Collections => Legacy}/DatabaseClientTest.php (94%) rename tests/e2e/Services/GraphQL/{Collections => Legacy}/DatabaseServerTest.php (91%) diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index f001265caf..3da4dc11a3 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -626,7 +626,7 @@ trait Base }'; case self::$CREATE_STRING_ATTRIBUTE: return 'mutation createStringAttribute($databaseId: String!, $collectionId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ - collectionsCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, size: $size, required: $required, default: $default, array: $array) { + databasesCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, size: $size, required: $required, default: $default, array: $array) { key required default @@ -635,7 +635,7 @@ trait Base }'; case self::$CREATE_INTEGER_ATTRIBUTE: return 'mutation createIntegerAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Int, $max: Int, $default: Int, $array: Boolean){ - collectionsCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + databasesCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -646,7 +646,7 @@ trait Base }'; case self::$CREATE_FLOAT_ATTRIBUTE: return 'mutation createFloatAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Float, $max: Float, $default: Float, $array: Boolean){ - collectionsCreateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + databasesCreateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -657,7 +657,7 @@ trait Base }'; case self::$CREATE_BOOLEAN_ATTRIBUTE: return 'mutation createBooleanAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: Boolean, $array: Boolean){ - collectionsCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + databasesCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -666,7 +666,7 @@ trait Base }'; case self::$CREATE_URL_ATTRIBUTE: return 'mutation createUrlAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - collectionsCreateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + databasesCreateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -675,7 +675,7 @@ trait Base }'; case self::$CREATE_EMAIL_ATTRIBUTE: return 'mutation createEmailAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - collectionsCreateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + databasesCreateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -684,7 +684,7 @@ trait Base }'; case self::$CREATE_IP_ATTRIBUTE: return 'mutation createIpAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - collectionsCreateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + databasesCreateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -693,7 +693,7 @@ trait Base }'; case self::$CREATE_ENUM_ATTRIBUTE: return 'mutation createEnumAttribute($databaseId: String!, $collectionId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String, $array: Boolean){ - collectionsCreateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { + databasesCreateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { key elements required @@ -703,7 +703,7 @@ trait Base }'; case self::$CREATE_DATETIME_ATTRIBUTE: return 'mutation createDatetimeAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - collectionsCreateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { + databasesCreateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -712,7 +712,7 @@ trait Base }'; case self::$CREATE_RELATIONSHIP_ATTRIBUTE: return 'mutation createRelationshipAttribute($databaseId: String!, $collectionId: String!, $relatedCollectionId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ - collectionsCreateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, relatedCollectionId: $relatedCollectionId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { + databasesCreateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, relatedCollectionId: $relatedCollectionId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { relatedCollection relationType twoWay @@ -723,14 +723,14 @@ trait Base }'; case self::$UPDATE_STRING_ATTRIBUTE: return 'mutation updateStringAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - collectionsUpdateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + databasesUpdateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_INTEGER_ATTRIBUTE: return 'mutation updateIntegerAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Int!, $max: Int!, $default: Int){ - collectionsUpdateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, min: $min, max: $max, default: $default) { + databasesUpdateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, min: $min, max: $max, default: $default) { required min max @@ -739,7 +739,7 @@ trait Base }'; case self::$UPDATE_FLOAT_ATTRIBUTE: return 'mutation updateFloatAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $min: Float!, $max: Float!, $default: Float){ - collectionsUpdateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default) { + databasesUpdateFloatAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, min: $min, max: $max, required: $required, default: $default) { required min max @@ -748,35 +748,35 @@ trait Base }'; case self::$UPDATE_BOOLEAN_ATTRIBUTE: return 'mutation updateBooleanAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: Boolean){ - collectionsUpdateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + databasesUpdateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_URL_ATTRIBUTE: return 'mutation updateUrlAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - collectionsUpdateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + databasesUpdateUrlAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_EMAIL_ATTRIBUTE: return 'mutation updateEmailAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - collectionsUpdateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + databasesUpdateEmailAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_IP_ATTRIBUTE: return 'mutation updateIpAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - collectionsUpdateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + databasesUpdateIpAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_ENUM_ATTRIBUTE: return 'mutation updateEnumAttribute($databaseId: String!, $collectionId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String){ - collectionsUpdateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default) { + databasesUpdateEnumAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, elements: $elements, required: $required, default: $default) { elements required default @@ -784,14 +784,14 @@ trait Base }'; case self::$UPDATE_DATETIME_ATTRIBUTE: return 'mutation updateDatetimeAttribute($databaseId: String!, $collectionId: String!, $key: String!, $required: Boolean!, $default: String){ - collectionsUpdateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { + databasesUpdateDatetimeAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_RELATIONSHIP_ATTRIBUTE: return 'mutation updateRelationshipAttribute($databaseId: String!, $collectionId: String!, $key: String!, $onDelete: String){ - collectionsUpdateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, onDelete: $onDelete) { + databasesUpdateRelationshipAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key, onDelete: $onDelete) { relatedCollection relationType twoWay @@ -978,7 +978,7 @@ trait Base }'; case self::$CREATE_INDEX: return 'mutation createIndex($databaseId: String!, $collectionId: String!, $key: String!, $type: String!, $attributes: [String!]!, $orders: [String!]){ - collectionsCreateIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key, type: $type, attributes: $attributes, orders: $orders) { + databasesCreateIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key, type: $type, attributes: $attributes, orders: $orders) { key type status @@ -986,7 +986,7 @@ trait Base }'; case self::$GET_INDEXES: return 'query listIndexes($databaseId: String!, $collectionId: String!) { - collectionsListIndexes(databaseId: $databaseId, collectionId: $collectionId) { + databasesListIndexes(databaseId: $databaseId, collectionId: $collectionId) { total indexes { key @@ -997,7 +997,7 @@ trait Base }'; case self::$GET_INDEX: return 'query getIndex($databaseId: String!, $collectionId: String!, $key: String!) { - collectionsGetIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + databasesGetIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { key type status @@ -1005,7 +1005,7 @@ trait Base }'; case self::$DELETE_INDEX: return 'mutation deleteIndex($databaseId: String!, $collectionId: String!, $key: String!) { - collectionsDeleteIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + databasesDeleteIndex(databaseId: $databaseId, collectionId: $collectionId, key: $key) { status } }'; @@ -1044,7 +1044,7 @@ trait Base }'; case self::$GET_ATTRIBUTES: return 'query listAttributes($databaseId: String!, $collectionId: String!) { - collectionsListAttributes(databaseId: $databaseId, collectionId: $collectionId) { + databasesListAttributes(databaseId: $databaseId, collectionId: $collectionId) { total attributes { ...attributeProperties @@ -1053,13 +1053,13 @@ trait Base }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; case self::$GET_ATTRIBUTE: return 'query getAttribute($databaseId: String!, $collectionId: String!, $key: String!) { - collectionsGetAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + databasesGetAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { ...attributeProperties } }' . PHP_EOL . self::$FRAGMENT_ATTRIBUTES; case self::$DELETE_ATTRIBUTE: return 'mutation deleteAttribute($databaseId: String!, $collectionId: String!, $key: String!) { - collectionsDeleteAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { + databasesDeleteAttribute(databaseId: $databaseId, collectionId: $collectionId, key: $key) { status } }'; @@ -1087,7 +1087,7 @@ trait Base case self::$GET_DOCUMENT: return 'query getDocument($databaseId: String!, $collectionId: String!, $documentId: String!) { - collectionsGetDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { + databasesGetDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { _id _collectionId _permissions @@ -1096,7 +1096,7 @@ trait Base }'; case self::$GET_DOCUMENTS: return 'query listDocuments($databaseId: String!, $collectionId: String!){ - collectionsListDocuments(databaseId: $databaseId, collectionId: $collectionId) { + databasesListDocuments(databaseId: $databaseId, collectionId: $collectionId) { total documents { _id @@ -1108,7 +1108,7 @@ trait Base }'; case self::$CREATE_DOCUMENT: return 'mutation createDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!]){ - collectionsCreateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { + databasesCreateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { _id _collectionId _permissions @@ -1116,7 +1116,7 @@ trait Base }'; case self::$CREATE_DOCUMENTS: return 'mutation createDocuments($databaseId: String!, $collectionId: String!, $documents: [Json!]!) { - collectionsCreateDocuments(databaseId: $databaseId, collectionId: $collectionId, documents: $documents) { + databasesCreateDocuments(databaseId: $databaseId, collectionId: $collectionId, documents: $documents) { documents { _id _collectionId @@ -1227,7 +1227,7 @@ trait Base }'; case self::$UPDATE_DOCUMENT: return 'mutation updateDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!]){ - collectionsUpdateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { + databasesUpdateDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { _id _collectionId data @@ -1235,7 +1235,7 @@ trait Base }'; case self::$UPSERT_DOCUMENT: return 'mutation upsertDocument($databaseId: String!, $collectionId: String!, $documentId: String!, $data: Json!, $permissions: [String!] = []) { - collectionsUpsertDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { + databasesUpsertDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId, data: $data, permissions: $permissions) { _id _databaseId _collectionId @@ -1244,7 +1244,7 @@ trait Base }'; case self::$UPDATE_DOCUMENTS: return 'mutation updateDocuments($databaseId: String!, $collectionId: String!, $data: Json!, $queries: [String!]) { - collectionsUpdateDocuments(databaseId: $databaseId, collectionId: $collectionId, data: $data, queries: $queries) { + databasesUpdateDocuments(databaseId: $databaseId, collectionId: $collectionId, data: $data, queries: $queries) { total documents { _id @@ -1257,7 +1257,7 @@ trait Base }'; case self::$UPSERT_DOCUMENTS: return 'mutation upsertDocuments($databaseId: String!, $collectionId: String!, $documents: [Json!]!) { - collectionsUpsertDocuments(databaseId: $databaseId, collectionId: $collectionId, documents: $documents) { + databasesUpsertDocuments(databaseId: $databaseId, collectionId: $collectionId, documents: $documents) { total documents { _id @@ -1270,7 +1270,7 @@ trait Base }'; case self::$DELETE_DOCUMENTS: return 'mutation deleteDocuments($databaseId: String!, $collectionId: String!, $queries: [String!] = []) { - collectionsDeleteDocuments(databaseId: $databaseId, collectionId: $collectionId, queries: $queries) { + databasesDeleteDocuments(databaseId: $databaseId, collectionId: $collectionId, queries: $queries) { total documents { _id @@ -1282,7 +1282,7 @@ trait Base }'; case self::$DELETE_DOCUMENT: return 'mutation deleteDocument($databaseId: String!, $collectionId: String!, $documentId: String!){ - collectionsDeleteDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { + databasesDeleteDocument(databaseId: $databaseId, collectionId: $collectionId, documentId: $documentId) { status } }'; @@ -2844,7 +2844,7 @@ trait Base status } } - collectionsCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "name", size: 255, required: true) { + databasesCreateStringAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "name", size: 255, required: true) { key type status @@ -2853,7 +2853,7 @@ trait Base default array } - collectionsCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "age", min: 0, max: 150, required: true) { + databasesCreateIntegerAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "age", min: 0, max: 150, required: true) { key type status @@ -2863,7 +2863,7 @@ trait Base default array } - collectionsCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "alive", required: false, default: true) { + databasesCreateBooleanAttribute(databaseId: $databaseId, collectionId: $collectionId, key: "alive", required: false, default: true) { key type status diff --git a/tests/e2e/Services/GraphQL/Collections/AbuseTest.php b/tests/e2e/Services/GraphQL/Legacy/AbuseTest.php similarity index 99% rename from tests/e2e/Services/GraphQL/Collections/AbuseTest.php rename to tests/e2e/Services/GraphQL/Legacy/AbuseTest.php index a58a57ec5a..d579ddb128 100644 --- a/tests/e2e/Services/GraphQL/Collections/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/AbuseTest.php @@ -1,6 +1,6 @@ [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], - 'documentId' => $document['body']['data']['collectionsCreateDocument']['_id'], + 'documentId' => $document['body']['data']['databasesCreateDocument']['_id'], ] ]; $document = $this->client->call(Client::METHOD_POST, '/graphql', [ @@ -188,7 +188,7 @@ class AuthTest extends Scope 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, ], $gqlPayload); - $this->assertIsArray($document['body']['data']['collectionsGetDocument']); + $this->assertIsArray($document['body']['data']['databasesGetDocument']); $this->assertArrayNotHasKey('errors', $document['body']); // Try to read as account 2 @@ -238,7 +238,7 @@ class AuthTest extends Scope 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], 'collectionId' => $this->collection['body']['data']['databasesCreateCollection']['_id'], - 'documentId' => $document['body']['data']['collectionsCreateDocument']['_id'], + 'documentId' => $document['body']['data']['databasesCreateDocument']['_id'], ] ]; $document = $this->client->call(Client::METHOD_POST, '/graphql', [ diff --git a/tests/e2e/Services/GraphQL/Collections/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php similarity index 94% rename from tests/e2e/Services/GraphQL/Collections/DatabaseClientTest.php rename to tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php index 349d580d64..c2c63e41c0 100644 --- a/tests/e2e/Services/GraphQL/Collections/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/DatabaseClientTest.php @@ -1,6 +1,6 @@ assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsCreateStringAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateStringAttribute']); return $data; } @@ -141,7 +141,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsCreateIntegerAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateIntegerAttribute']); return $data; } @@ -182,7 +182,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['collectionsCreateDocument']; + $document = $document['body']['data']['databasesCreateDocument']; $this->assertIsArray($document); return [ @@ -215,7 +215,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $documents['body']); $this->assertIsArray($documents['body']['data']); - $this->assertIsArray($documents['body']['data']['collectionsListDocuments']); + $this->assertIsArray($documents['body']['data']['databasesListDocuments']); } /** @@ -242,7 +242,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $this->assertIsArray($document['body']['data']['collectionsGetDocument']); + $this->assertIsArray($document['body']['data']['databasesGetDocument']); } /** @@ -272,7 +272,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['collectionsUpdateDocument']; + $document = $document['body']['data']['databasesUpdateDocument']; $this->assertIsArray($document); $this->assertStringContainsString('New Document Name', $document['data']); @@ -377,7 +377,7 @@ class DatabaseClientTest extends Scope ]; $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(10, $res['body']['data']['collectionsCreateDocuments']['documents']); + $this->assertCount(10, $res['body']['data']['databasesCreateDocuments']['documents']); return [ 'databaseId' => $databaseId, @@ -418,7 +418,7 @@ class DatabaseClientTest extends Scope ]; $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(10, $res['body']['data']['collectionsUpdateDocuments']['documents']); + $this->assertCount(10, $res['body']['data']['databasesUpdateDocuments']['documents']); return $data; } @@ -449,7 +449,7 @@ class DatabaseClientTest extends Scope ]; $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(2, $res['body']['data']['collectionsUpsertDocuments']['documents']); + $this->assertCount(2, $res['body']['data']['databasesUpsertDocuments']['documents']); return $data; } @@ -475,7 +475,7 @@ class DatabaseClientTest extends Scope ]; $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(11, $res['body']['data']['collectionsDeleteDocuments']['documents']); + $this->assertCount(11, $res['body']['data']['databasesDeleteDocuments']['documents']); return $data; } diff --git a/tests/e2e/Services/GraphQL/Collections/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php similarity index 91% rename from tests/e2e/Services/GraphQL/Collections/DatabaseServerTest.php rename to tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php index 3e5b457308..3ecc96eaa0 100644 --- a/tests/e2e/Services/GraphQL/Collections/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php @@ -1,6 +1,6 @@ assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsCreateStringAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateStringAttribute']); return $data; } @@ -170,9 +170,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsUpdateStringAttribute']); - $this->assertFalse($attribute['body']['data']['collectionsUpdateStringAttribute']['required']); - $this->assertEquals('Default Value', $attribute['body']['data']['collectionsUpdateStringAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateStringAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateStringAttribute']['required']); + $this->assertEquals('Default Value', $attribute['body']['data']['databasesUpdateStringAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -205,7 +205,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsCreateIntegerAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateIntegerAttribute']); return $data; } @@ -240,11 +240,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsUpdateIntegerAttribute']); - $this->assertFalse($attribute['body']['data']['collectionsUpdateIntegerAttribute']['required']); - $this->assertEquals(12, $attribute['body']['data']['collectionsUpdateIntegerAttribute']['min']); - $this->assertEquals(160, $attribute['body']['data']['collectionsUpdateIntegerAttribute']['max']); - $this->assertEquals(50, $attribute['body']['data']['collectionsUpdateIntegerAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateIntegerAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateIntegerAttribute']['required']); + $this->assertEquals(12, $attribute['body']['data']['databasesUpdateIntegerAttribute']['min']); + $this->assertEquals(160, $attribute['body']['data']['databasesUpdateIntegerAttribute']['max']); + $this->assertEquals(50, $attribute['body']['data']['databasesUpdateIntegerAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -275,7 +275,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsCreateBooleanAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateBooleanAttribute']); return $data; } @@ -308,9 +308,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsUpdateBooleanAttribute']); - $this->assertFalse($attribute['body']['data']['collectionsUpdateBooleanAttribute']['required']); - $this->assertTrue($attribute['body']['data']['collectionsUpdateBooleanAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateBooleanAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateBooleanAttribute']['required']); + $this->assertTrue($attribute['body']['data']['databasesUpdateBooleanAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -344,7 +344,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsCreateFloatAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateFloatAttribute']); return $data; } @@ -379,11 +379,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsUpdateFloatAttribute']); - $this->assertFalse($attribute['body']['data']['collectionsUpdateFloatAttribute']['required']); - $this->assertEquals(100.0, $attribute['body']['data']['collectionsUpdateFloatAttribute']['min']); - $this->assertEquals(1000000.0, $attribute['body']['data']['collectionsUpdateFloatAttribute']['max']); - $this->assertEquals(2500.0, $attribute['body']['data']['collectionsUpdateFloatAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateFloatAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateFloatAttribute']['required']); + $this->assertEquals(100.0, $attribute['body']['data']['databasesUpdateFloatAttribute']['min']); + $this->assertEquals(1000000.0, $attribute['body']['data']['databasesUpdateFloatAttribute']['max']); + $this->assertEquals(2500.0, $attribute['body']['data']['databasesUpdateFloatAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -414,7 +414,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsCreateEmailAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateEmailAttribute']); return $data; } @@ -447,9 +447,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsUpdateEmailAttribute']); - $this->assertFalse($attribute['body']['data']['collectionsUpdateEmailAttribute']['required']); - $this->assertEquals('torsten@appwrite.io', $attribute['body']['data']['collectionsUpdateEmailAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateEmailAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateEmailAttribute']['required']); + $this->assertEquals('torsten@appwrite.io', $attribute['body']['data']['databasesUpdateEmailAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -485,7 +485,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsCreateEnumAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateEnumAttribute']); return $data; } @@ -524,11 +524,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsUpdateEnumAttribute']); - $this->assertFalse($attribute['body']['data']['collectionsUpdateEnumAttribute']['required']); - $this->assertEquals('tech', $attribute['body']['data']['collectionsUpdateEnumAttribute']['default']); - $this->assertContains('tech', $attribute['body']['data']['collectionsUpdateEnumAttribute']['elements']); - $this->assertNotContains('guest', $attribute['body']['data']['collectionsUpdateEnumAttribute']['elements']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateEnumAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateEnumAttribute']['required']); + $this->assertEquals('tech', $attribute['body']['data']['databasesUpdateEnumAttribute']['default']); + $this->assertContains('tech', $attribute['body']['data']['databasesUpdateEnumAttribute']['elements']); + $this->assertNotContains('guest', $attribute['body']['data']['databasesUpdateEnumAttribute']['elements']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -559,7 +559,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsCreateDatetimeAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateDatetimeAttribute']); return $data; } @@ -592,9 +592,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsUpdateDatetimeAttribute']); - $this->assertFalse($attribute['body']['data']['collectionsUpdateDatetimeAttribute']['required']); - $this->assertEquals('2000-01-01T00:00:00Z', $attribute['body']['data']['collectionsUpdateDatetimeAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateDatetimeAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateDatetimeAttribute']['required']); + $this->assertEquals('2000-01-01T00:00:00Z', $attribute['body']['data']['databasesUpdateDatetimeAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -627,7 +627,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsCreateRelationshipAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateRelationshipAttribute']); return $data; } @@ -658,7 +658,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsUpdateRelationshipAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateRelationshipAttribute']); return $data; } @@ -689,7 +689,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsCreateIpAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateIpAttribute']); return $data; } @@ -722,9 +722,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsUpdateIpAttribute']); - $this->assertFalse($attribute['body']['data']['collectionsUpdateIpAttribute']['required']); - $this->assertEquals('127.0.0.1', $attribute['body']['data']['collectionsUpdateIpAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateIpAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateIpAttribute']['required']); + $this->assertEquals('127.0.0.1', $attribute['body']['data']['databasesUpdateIpAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); return $data; @@ -756,7 +756,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsCreateUrlAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesCreateUrlAttribute']); return $data; } @@ -789,9 +789,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsUpdateUrlAttribute']); - $this->assertFalse($attribute['body']['data']['collectionsUpdateUrlAttribute']['required']); - $this->assertEquals('https://cloud.appwrite.io', $attribute['body']['data']['collectionsUpdateUrlAttribute']['default']); + $this->assertIsArray($attribute['body']['data']['databasesUpdateUrlAttribute']); + $this->assertFalse($attribute['body']['data']['databasesUpdateUrlAttribute']['required']); + $this->assertEquals('https://cloud.appwrite.io', $attribute['body']['data']['databasesUpdateUrlAttribute']['default']); $this->assertEquals(200, $attribute['headers']['status-code']); } @@ -825,12 +825,12 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['collectionsCreateIndex']); + $this->assertIsArray($index['body']['data']['databasesCreateIndex']); return [ 'database' => $data['database'], 'collection' => $data['collection'], - 'index' => $index['body']['data']['collectionsCreateIndex'], + 'index' => $index['body']['data']['databasesCreateIndex'], ]; } @@ -876,7 +876,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['collectionsCreateDocument']; + $document = $document['body']['data']['databasesCreateDocument']; $this->assertIsArray($document); return [ @@ -1044,7 +1044,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attributes['body']); $this->assertIsArray($attributes['body']['data']); - $this->assertIsArray($attributes['body']['data']['collectionsListAttributes']); + $this->assertIsArray($attributes['body']['data']['databasesListAttributes']); } /** @@ -1071,7 +1071,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $attribute['body']); $this->assertIsArray($attribute['body']['data']); - $this->assertIsArray($attribute['body']['data']['collectionsGetAttribute']); + $this->assertIsArray($attribute['body']['data']['databasesGetAttribute']); } /** @@ -1097,7 +1097,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $indices['body']); $this->assertIsArray($indices['body']['data']); - $this->assertIsArray($indices['body']['data']['collectionsListIndexes']); + $this->assertIsArray($indices['body']['data']['databasesListIndexes']); } /** @@ -1124,7 +1124,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['collectionsGetIndex']); + $this->assertIsArray($index['body']['data']['databasesGetIndex']); } /** @@ -1150,7 +1150,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $documents['body']); $this->assertIsArray($documents['body']['data']); - $this->assertIsArray($documents['body']['data']['collectionsListDocuments']); + $this->assertIsArray($documents['body']['data']['databasesListDocuments']); } /** @@ -1177,7 +1177,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $this->assertIsArray($document['body']['data']['collectionsGetDocument']); + $this->assertIsArray($document['body']['data']['databasesGetDocument']); } // /** @@ -1308,7 +1308,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $document['body']); $this->assertIsArray($document['body']['data']); - $document = $document['body']['data']['collectionsUpdateDocument']; + $document = $document['body']['data']['databasesUpdateDocument']; $this->assertIsArray($document); $this->assertStringContainsString('New Document Name', $document['data']); } @@ -1538,7 +1538,7 @@ class DatabaseServerTest extends Scope ]; $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(10, $res['body']['data']['collectionsCreateDocuments']['documents']); + $this->assertCount(10, $res['body']['data']['databasesCreateDocuments']['documents']); return [ 'databaseId' => $databaseId, @@ -1578,7 +1578,7 @@ class DatabaseServerTest extends Scope ]; $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(10, $res['body']['data']['collectionsUpdateDocuments']['documents']); + $this->assertCount(10, $res['body']['data']['databasesUpdateDocuments']['documents']); return $data; } @@ -1608,7 +1608,7 @@ class DatabaseServerTest extends Scope ]; $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(2, $res['body']['data']['collectionsUpsertDocuments']['documents']); + $this->assertCount(2, $res['body']['data']['databasesUpsertDocuments']['documents']); return $data; } @@ -1633,7 +1633,7 @@ class DatabaseServerTest extends Scope ]; $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(11, $res['body']['data']['collectionsDeleteDocuments']['documents']); + $this->assertCount(11, $res['body']['data']['databasesDeleteDocuments']['documents']); return $data; } From 531f50a2c74b279a98ab85b9aaf61f53f0f81e1d Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 17:59:29 +0530 Subject: [PATCH 181/362] fix: sdk namespacing and graphql tests. --- .../Http/Databases/Collections/Action.php | 8 ++++++++ .../Http/Databases/Tables/Columns/XList.php | 2 +- .../Http/Databases/Tables/Create.php | 6 +++--- .../Http/Databases/Tables/Delete.php | 6 +++--- .../Databases/Http/Databases/Tables/Get.php | 6 +++--- .../Http/Databases/Tables/Update.php | 6 +++--- .../Http/Databases/Tables/Usage/Get.php | 2 +- .../Databases/Http/Databases/Tables/XList.php | 8 ++++---- .../Database/Validator/Queries/Attributes.php | 2 +- .../Validator/Queries/Collections.php | 2 +- .../Database/Validator/Queries/Columns.php | 4 ++-- .../Database/Validator/Queries/Tables.php | 6 +++--- tests/e2e/Services/GraphQL/Base.php | 20 +++++++++---------- .../e2e/Services/GraphQL/Tables/AbuseTest.php | 4 ++-- .../e2e/Services/GraphQL/Tables/AuthTest.php | 10 +++++----- .../GraphQL/Tables/DatabaseClientTest.php | 4 ++-- .../GraphQL/Tables/DatabaseServerTest.php | 12 +++++------ 17 files changed, 58 insertions(+), 50 deletions(-) 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 0e3202d979..9329300ffa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php @@ -59,6 +59,14 @@ abstract class Action extends UtopiaAction return $this->isCollectionsAPI() ? 'collections' : 'tables'; } + /** + * Get the SDK namespace for the current action. + */ + final protected function getSdkNamespace(): string + { + return $this->isCollectionsAPI() ? 'databases' : 'tables'; + } + /** * Get the exception to throw when the resource already exists. */ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php index 29a108f180..8190f2ec71 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php @@ -47,7 +47,7 @@ class XList extends AttributesXList )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('tableId', '', new UID(), 'Table ID.') - ->param('queries', [], new Columns(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Columns::ALLOWED_ATTRIBUTES), true) + ->param('queries', [], new Columns(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Columns::ALLOWED_COLUMNS), true) ->inject('response') ->inject('dbForProject') ->callback($this->action(...)); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index 92b29ffdc6..0bfdef5249 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -19,7 +19,7 @@ class Create extends CollectionCreate { public static function getName(): string { - return 'createTable'; + return 'create'; } protected function getResponseModel(): string @@ -40,8 +40,8 @@ class Create extends CollectionCreate ->label('audits.event', 'table.create') ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') ->label('sdk', new Method( - namespace: 'databases', - group: $this->getSdkGroup(), + namespace: $this->getSdkNamespace(), + group: null, name: self::getName(), description: '/docs/references/databases/create-collection.md', auth: [AuthType::KEY], diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php index 0a20a20f54..caa7197acb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php @@ -15,7 +15,7 @@ class Delete extends CollectionDelete { public static function getName(): string { - return 'deleteTable'; + return 'delete'; } protected function getResponseModel(): string @@ -36,8 +36,8 @@ class Delete extends CollectionDelete ->label('audits.event', 'table.delete') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', - group: $this->getSdkGroup(), + namespace: $this->getSdkNamespace(), + group: null, name: self::getName(), description: '/docs/references/databases/delete-collection.md', auth: [AuthType::KEY], diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php index 7f565231f9..40672ba51f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php @@ -15,7 +15,7 @@ class Get extends CollectionGet { public static function getName(): string { - return 'getTable'; + return 'get'; } protected function getResponseModel(): string @@ -33,8 +33,8 @@ class Get extends CollectionGet ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', - group: $this->getSdkGroup(), + namespace: $this->getSdkNamespace(), + group: null, name: self::getName(), description: '/docs/references/databases/get-collection.md', auth: [AuthType::KEY], diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index 62a1b3bdee..f800e7b1de 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -18,7 +18,7 @@ class Update extends CollectionUpdate { public static function getName(): string { - return 'updateTable'; + return 'update'; } protected function getResponseModel(): string @@ -39,8 +39,8 @@ class Update extends CollectionUpdate ->label('audits.event', 'table.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') ->label('sdk', new Method( - namespace: 'databases', - group: $this->getSdkGroup(), + namespace: $this->getSdkNamespace(), + group: null, name: self::getName(), description: '/docs/references/databases/update-collection.md', auth: [AuthType::KEY], diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index c82eaae7c5..ca990eeab6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -34,7 +34,7 @@ class Get extends CollectionUsageGet ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: null, name: self::getName(), description: '/docs/references/databases/get-collection-usage.md', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php index 391b91a3dd..34000d97b1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php @@ -17,7 +17,7 @@ class XList extends CollectionXList { public static function getName(): string { - return 'listTables'; + return 'list'; } protected function getResponseModel(): string @@ -35,8 +35,8 @@ class XList extends CollectionXList ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', - group: $this->getSdkGroup(), + namespace: $this->getSdkNamespace(), + group: null, name: self::getName(), description: '/docs/references/databases/list-collections.md', auth: [AuthType::KEY], @@ -49,7 +49,7 @@ class XList extends CollectionXList contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('queries', [], new Tables(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Tables::ALLOWED_ATTRIBUTES), true) + ->param('queries', [], new Tables(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Tables::ALLOWED_COLUMNS), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Attributes.php b/src/Appwrite/Utopia/Database/Validator/Queries/Attributes.php index 4a35c82b73..953948c045 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Attributes.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Attributes.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Database\Validator\Queries; class Attributes extends Base { - public const ALLOWED_ATTRIBUTES = [ + public const array ALLOWED_ATTRIBUTES = [ 'key', 'type', 'size', diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Collections.php b/src/Appwrite/Utopia/Database/Validator/Queries/Collections.php index 6e8fcb8339..cdaaa104dc 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Collections.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Collections.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Database\Validator\Queries; class Collections extends Base { - public const ALLOWED_ATTRIBUTES = [ + public const array ALLOWED_ATTRIBUTES = [ 'name', 'enabled', 'documentSecurity' diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Columns.php b/src/Appwrite/Utopia/Database/Validator/Queries/Columns.php index 3c2742bfdd..c990dfc18a 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Columns.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Columns.php @@ -4,7 +4,7 @@ namespace Appwrite\Utopia\Database\Validator\Queries; class Columns extends Base { - public const ALLOWED_ATTRIBUTES = [ + public const array ALLOWED_COLUMNS = [ 'key', 'type', 'size', @@ -20,6 +20,6 @@ class Columns extends Base */ public function __construct() { - parent::__construct('attributes', self::ALLOWED_ATTRIBUTES); + parent::__construct('attributes', self::ALLOWED_COLUMNS); } } diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Tables.php b/src/Appwrite/Utopia/Database/Validator/Queries/Tables.php index 5a1fc4ec6d..f3aadb69ac 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Tables.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Tables.php @@ -4,10 +4,10 @@ namespace Appwrite\Utopia\Database\Validator\Queries; class Tables extends Base { - public const ALLOWED_ATTRIBUTES = [ + public const array ALLOWED_COLUMNS = [ 'name', 'enabled', - 'documentSecurity' + 'rowSecurity' ]; /** @@ -16,6 +16,6 @@ class Tables extends Base */ public function __construct() { - parent::__construct('collections', self::ALLOWED_ATTRIBUTES); + parent::__construct('collections', self::ALLOWED_COLUMNS); } } diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 3da4dc11a3..bd3c792248 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -580,8 +580,8 @@ trait Base } }'; case self::$GET_TABLE: - return 'query getTable($databaseId: String!, $tableId: String!) { - databasesGetTable(databaseId: $databaseId, tableId: $tableId) { + return 'query tablesGet($databaseId: String!, $tableId: String!) { + tablesGet(databaseId: $databaseId, tableId: $tableId) { _id _permissions rowSecurity @@ -589,8 +589,8 @@ trait Base } }'; case self::$GET_TABLES: - return 'query listTables($databaseId: String!) { - databasesListTables(databaseId: $databaseId) { + return 'query tablesList($databaseId: String!) { + tablesList(databaseId: $databaseId) { total tables { _id @@ -601,8 +601,8 @@ trait Base } }'; case self::$CREATE_TABLE: - return 'mutation createTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!]!) { - databasesCreateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions) { + return 'mutation tablesCreate($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!]!) { + tablesCreate(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions) { _id _permissions rowSecurity @@ -610,8 +610,8 @@ trait Base } }'; case self::$UPDATE_TABLE: - return 'mutation updateTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!], $enabled: Boolean) { - databasesUpdateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions, enabled: $enabled) { + return 'mutation tablesUpdate($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!], $enabled: Boolean) { + tablesUpdate(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions, enabled: $enabled) { _id _permissions rowSecurity @@ -619,8 +619,8 @@ trait Base } }'; case self::$DELETE_TABLE: - return 'mutation deleteTable($databaseId: String!, $tableId: String!) { - databasesDeleteTable(databaseId: $databaseId, tableId: $tableId) { + return 'mutation tablesDelete($databaseId: String!, $tableId: String!) { + tablesDelete(databaseId: $databaseId, tableId: $tableId) { status } }'; diff --git a/tests/e2e/Services/GraphQL/Tables/AbuseTest.php b/tests/e2e/Services/GraphQL/Tables/AbuseTest.php index abb5019d55..8b759aa1ce 100644 --- a/tests/e2e/Services/GraphQL/Tables/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/Tables/AbuseTest.php @@ -132,7 +132,7 @@ class AbuseTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'], ], $gqlPayload); - $databaseId = $response['body']['data']['databasesCreate']['_id']; + $databaseId = $response['body']['data']['tablesCreate']['_id']; $query = $this->getQuery(self::$CREATE_TABLE); $gqlPayload = [ @@ -155,7 +155,7 @@ class AbuseTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'], ], $gqlPayload); - $tableId = $response['body']['data']['databasesCreateTable']['_id']; + $tableId = $response['body']['data']['tablesCreate']['_id']; $query = $this->getQuery(self::$CREATE_STRING_COLUMN); $gqlPayload = [ diff --git a/tests/e2e/Services/GraphQL/Tables/AuthTest.php b/tests/e2e/Services/GraphQL/Tables/AuthTest.php index 681607d599..21d581d207 100644 --- a/tests/e2e/Services/GraphQL/Tables/AuthTest.php +++ b/tests/e2e/Services/GraphQL/Tables/AuthTest.php @@ -128,7 +128,7 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], 'key' => 'name', 'size' => 256, 'required' => true, @@ -154,7 +154,7 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', @@ -178,7 +178,7 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], 'rowId' => $row['body']['data']['tablesCreateRow']['_id'], ] ]; @@ -213,7 +213,7 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', @@ -237,7 +237,7 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['databasesCreateTable']['_id'], + 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], 'rowId' => $row['body']['data']['tablesCreateRow']['_id'], ] ]; diff --git a/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php index c5cba6c47f..5ff8e65922 100644 --- a/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php @@ -75,7 +75,7 @@ class DatabaseClientTest extends Scope $this->assertIsArray($table['body']['data']); $this->assertArrayNotHasKey('errors', $table['body']); - $table = $table['body']['data']['databasesCreateTable']; + $table = $table['body']['data']['tablesCreate']; $this->assertEquals('Actors', $table['name']); return [ @@ -349,7 +349,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $tableId = $res['body']['data']['databasesCreateTable']['_id']; + $tableId = $res['body']['data']['tablesCreate']['_id']; // Step 3: Create column $query = $this->getQuery(self::$CREATE_STRING_COLUMN); diff --git a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php index 61cb57911a..e4e9b34f35 100644 --- a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php @@ -75,7 +75,7 @@ class DatabaseServerTest extends Scope $this->assertIsArray($table['body']['data']); $this->assertArrayNotHasKey('errors', $table['body']); - $table = $table['body']['data']['databasesCreateTable']; + $table = $table['body']['data']['tablesCreate']; $this->assertEquals('Actors', $table['name']); $gqlPayload = [ @@ -101,7 +101,7 @@ class DatabaseServerTest extends Scope $this->assertIsArray($table2['body']['data']); $this->assertArrayNotHasKey('errors', $table2['body']); - $table2 = $table2['body']['data']['databasesCreateTable']; + $table2 = $table2['body']['data']['tablesCreate']; $this->assertEquals('Movies', $table2['name']); return [ @@ -992,7 +992,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $tables['body']); $this->assertIsArray($tables['body']['data']); - $this->assertIsArray($tables['body']['data']['databasesListTables']); + $this->assertIsArray($tables['body']['data']['tablesList']); } /** @@ -1018,7 +1018,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $table['body']); $this->assertIsArray($table['body']['data']); - $this->assertIsArray($table['body']['data']['databasesGetTable']); + $this->assertIsArray($table['body']['data']['tablesGet']); } /** @@ -1279,7 +1279,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $table['body']); $this->assertIsArray($table['body']['data']); - $this->assertIsArray($table['body']['data']['databasesUpdateTable']); + $this->assertIsArray($table['body']['data']['tablesUpdate']); } /** @@ -1510,7 +1510,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $tableId = $res['body']['data']['databasesCreateTable']['_id']; + $tableId = $res['body']['data']['tablesCreate']['_id']; // Step 3: Create column $query = $this->getQuery(self::$CREATE_STRING_COLUMN); From c7a3ffdb71dc03d01d4fa4b18f96a53adbd15e0b Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 18:07:53 +0530 Subject: [PATCH 182/362] update: generate latest specs. --- app/config/specs/open-api3-1.8.x-client.json | 809 +- app/config/specs/open-api3-1.8.x-console.json | 7050 +++++++++++++++-- app/config/specs/open-api3-1.8.x-server.json | 6365 ++++++++++++++- app/config/specs/open-api3-latest-client.json | 786 +- .../specs/open-api3-latest-console.json | 7039 ++++++++++++++-- app/config/specs/open-api3-latest-server.json | 6365 ++++++++++++++- app/config/specs/swagger2-1.8.x-client.json | 812 +- app/config/specs/swagger2-1.8.x-console.json | 6949 ++++++++++++++-- app/config/specs/swagger2-1.8.x-server.json | 6280 ++++++++++++++- app/config/specs/swagger2-latest-client.json | 789 +- app/config/specs/swagger2-latest-console.json | 6940 ++++++++++++++-- app/config/specs/swagger2-latest-server.json | 6280 ++++++++++++++- 12 files changed, 52572 insertions(+), 3892 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 8f03738786..58917b543a 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4361,7 +4361,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -4446,7 +4446,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4457,7 +4457,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -4467,7 +4466,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -4492,6 +4490,30 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4589,7 +4611,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4663,14 +4685,14 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "tags": [ "databases" ], "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -4684,7 +4706,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -4700,6 +4722,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [] } @@ -4793,7 +4834,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -4892,7 +4933,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -4953,43 +4994,42 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", "tags": [ - "databases" + "tables" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { "200": { - "description": "Document", + "description": "Rows List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/rowList" } } } } }, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 116, + "method": "listRows", + "group": "rows", + "weight": 413, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/decrement-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", "platforms": [ - "console", - "server", "client", + "server", "server" ], "packaging": false, @@ -5016,31 +5056,151 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "" }, "in": "path" } @@ -5051,15 +5211,31 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "x-example": null + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } } } } @@ -5068,43 +5244,42 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", "tags": [ - "databases" + "tables" ], - "description": "Increment a specific attribute of a document by a given value.", + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { "200": { - "description": "Document", + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/row" } } } } }, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 115, + "method": "getRow", + "group": "rows", + "weight": 406, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/increment-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", "platforms": [ - "console", - "server", "client", + "server", "server" ], "packaging": false, @@ -5131,31 +5306,136 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "rowId", + "description": "Row ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } @@ -5166,21 +5446,205 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } } } } } } } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] } }, "\/functions\/{functionId}\/executions": { @@ -5206,7 +5670,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -5281,7 +5745,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -5396,7 +5860,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -5470,7 +5934,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 255, "cookies": false, "type": "graphql", "deprecated": false, @@ -5522,7 +5986,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -5574,7 +6038,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -5626,7 +6090,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -5678,7 +6142,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -5730,7 +6194,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -5782,7 +6246,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -5834,7 +6298,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -5886,7 +6350,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -5938,7 +6402,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -5990,7 +6454,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -6073,7 +6537,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -6148,7 +6612,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -6234,7 +6698,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -6332,7 +6796,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -6404,7 +6868,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -6493,7 +6957,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -6560,7 +7024,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -6638,7 +7102,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -6866,7 +7330,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -6951,7 +7415,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -7027,7 +7491,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -7112,7 +7576,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -7174,7 +7638,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -7248,7 +7712,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -7312,7 +7776,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -7398,7 +7862,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -7509,7 +7973,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -7581,7 +8045,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -7668,7 +8132,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -7742,7 +8206,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -7840,7 +8304,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -7901,7 +8365,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -8070,13 +8534,37 @@ "version" ] }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8100,7 +8588,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8124,7 +8612,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8148,7 +8636,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8172,7 +8660,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8196,7 +8684,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8220,7 +8708,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8244,7 +8732,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8268,7 +8756,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8292,7 +8780,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8316,7 +8804,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8340,7 +8828,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8364,7 +8852,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8388,7 +8876,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8406,6 +8894,63 @@ "localeCodes" ] }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", 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 85ef1334d4..77b8b42436 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4359,7 +4359,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 310, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -4419,7 +4419,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 434, + "weight": 481, "cookies": false, "type": "", "deprecated": false, @@ -4494,7 +4494,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 309, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -4542,7 +4542,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -4615,7 +4615,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4674,7 +4674,7 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesListUsages", "tags": [ "databases" ], @@ -4692,13 +4692,13 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "listUsages", "group": null, - "weight": 121, + "weight": 324, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", + "demo": "databases\/list-usages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -4720,7 +4720,7 @@ "parameters": [ { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "schema": { "type": "string", @@ -4730,12 +4730,8 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], + "x-enum-name": null, + "x-enum-keys": [], "default": "30d" }, "in": "query" @@ -4766,7 +4762,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4825,7 +4821,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4901,7 +4897,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4962,7 +4958,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -5024,7 +5020,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "tags": [ "databases" @@ -5045,7 +5041,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -5149,7 +5145,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -5218,7 +5214,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -5317,7 +5313,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -5388,7 +5384,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5425,7 +5421,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5472,7 +5468,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5509,7 +5505,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -5578,7 +5574,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5615,7 +5611,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5689,7 +5685,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5726,7 +5722,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5774,7 +5770,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "tags": [ "databases" @@ -5795,7 +5791,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5832,7 +5828,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5906,7 +5902,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5943,7 +5939,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6012,7 +6008,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -6049,7 +6045,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6086,7 +6082,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6107,7 +6103,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -6123,12 +6119,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 353, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -6160,7 +6156,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6182,7 +6178,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "x-example": null, "items": { "type": "string" @@ -6238,7 +6234,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6275,7 +6271,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6301,7 +6297,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "x-example": null, "items": { "type": "string" @@ -6320,7 +6316,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6358,7 +6354,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6395,7 +6391,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6422,17 +6418,17 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null }, "array": { @@ -6474,7 +6470,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6511,7 +6507,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6542,23 +6538,23 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6595,7 +6591,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6632,7 +6628,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6659,17 +6655,17 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6711,7 +6707,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6748,7 +6744,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6779,23 +6775,23 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6832,7 +6828,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6869,7 +6865,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6896,7 +6892,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6938,7 +6934,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6975,7 +6971,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7006,13 +7002,13 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7049,7 +7045,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7086,7 +7082,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7103,7 +7099,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "x-example": "" }, "type": { @@ -7180,7 +7176,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7217,7 +7213,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -7297,7 +7293,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7334,7 +7330,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -7376,7 +7372,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7413,7 +7409,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7450,7 +7446,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7519,7 +7515,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -7556,7 +7552,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7593,7 +7589,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7661,7 +7657,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7698,7 +7694,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7732,7 +7728,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -7769,7 +7765,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7812,7 +7808,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7849,7 +7845,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7887,7 +7883,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } } @@ -7920,7 +7916,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -8005,7 +8001,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8016,7 +8012,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -8026,7 +8021,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -8156,7 +8150,7 @@ ], "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { - "200": { + "201": { "description": "Documents List", "content": { "application\/json": { @@ -8170,7 +8164,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8185,6 +8179,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [] } @@ -8262,7 +8274,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8356,7 +8368,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8447,7 +8459,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8521,14 +8533,14 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "tags": [ "databases" ], "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -8542,7 +8554,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8558,6 +8570,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [] } @@ -8651,7 +8682,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8750,7 +8781,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8834,7 +8865,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 112, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -8927,7 +8958,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -8939,8 +8970,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8951,8 +8980,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9004,7 +9032,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "x-example": null }, "min": { @@ -9042,7 +9070,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -9054,8 +9082,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -9066,8 +9092,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9157,7 +9182,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -9238,8 +9263,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -9367,7 +9392,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9438,7 +9463,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9518,7 +9543,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 79, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -9601,7 +9626,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 123, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -9693,7 +9718,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 73, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -9743,10 +9768,4763 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "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).", + "x-example": false + }, + "enabled": { + "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 + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "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 + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + } + } + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "databasesListTableLogs", + "tags": [ + "databases" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "x-appwrite": { + "method": "listTableLogs", + "group": "tables", + "weight": 376, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDeleteRows", + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesListRowLogs", + "tags": [ + "tables" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 414, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesGetTableUsage", + "tags": [ + "tables" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageTable" + } + } + } + } + }, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "30d" + }, + "in": "query" + }, + { + "name": "tableId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", + "operationId": "databasesGetUsage", "tags": [ "databases" ], @@ -9764,13 +14542,13 @@ } }, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "getUsage", "group": null, - "weight": 122, + "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-database-usage.md", + "demo": "databases\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -9802,7 +14580,7 @@ }, { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "schema": { "type": "string", @@ -9848,7 +14626,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -9921,7 +14699,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -10154,7 +14932,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -10203,7 +14981,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -10253,7 +15031,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 404, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -10353,7 +15131,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 403, + "weight": 450, "cookies": false, "type": "", "deprecated": false, @@ -10413,7 +15191,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 397, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -10485,7 +15263,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -10544,7 +15322,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -10774,7 +15552,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -10835,7 +15613,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -10915,7 +15693,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -10998,7 +15776,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 429, "cookies": false, "type": "upload", "deprecated": false, @@ -11094,7 +15872,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -11179,7 +15957,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -11282,7 +16060,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -11379,7 +16157,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -11441,7 +16219,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -11505,7 +16283,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 436, "cookies": false, "type": "location", "deprecated": false, @@ -11595,7 +16373,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -11666,7 +16444,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -11741,7 +16519,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -11856,7 +16634,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -11921,7 +16699,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -11992,7 +16770,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 396, + "weight": 443, "cookies": false, "type": "", "deprecated": false, @@ -12074,7 +16852,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -12133,7 +16911,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -12224,7 +17002,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -12293,7 +17071,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -12384,7 +17162,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -12455,7 +17233,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 255, "cookies": false, "type": "graphql", "deprecated": false, @@ -12507,7 +17285,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -12559,7 +17337,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -12608,7 +17386,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -12657,7 +17435,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -12706,7 +17484,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -12766,7 +17544,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -12815,7 +17593,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -12864,7 +17642,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -12926,7 +17704,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -12988,7 +17766,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -13061,7 +17839,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -13123,7 +17901,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -13211,7 +17989,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -13273,7 +18051,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -13335,7 +18113,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -13397,7 +18175,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -13459,7 +18237,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -13521,7 +18299,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -13583,7 +18361,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -13645,7 +18423,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -13707,7 +18485,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -13756,7 +18534,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -13805,7 +18583,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -13854,7 +18632,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -13906,7 +18684,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -13958,7 +18736,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -14010,7 +18788,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -14062,7 +18840,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -14114,7 +18892,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -14166,7 +18944,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -14218,7 +18996,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -14270,7 +19048,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -14346,7 +19124,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -14490,7 +19268,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -14636,7 +19414,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -14810,7 +19588,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -14988,7 +19766,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -15097,7 +19875,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -15209,7 +19987,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -15262,7 +20040,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -15324,7 +20102,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -15399,7 +20177,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -15474,7 +20252,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -15550,7 +20328,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -15655,7 +20433,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -15763,7 +20541,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -15848,7 +20626,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -15936,7 +20714,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -16051,7 +20829,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -16169,7 +20947,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -16264,7 +21042,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -16362,7 +21140,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -16467,7 +21245,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -16575,7 +21353,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -16718,7 +21496,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -16863,7 +21641,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -16958,7 +21736,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -17056,7 +21834,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -17151,7 +21929,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -17249,7 +22027,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -17344,7 +22122,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -17442,7 +22220,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -17537,7 +22315,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -17635,7 +22413,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -17688,7 +22466,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -17750,7 +22528,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -17825,7 +22603,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -17900,7 +22678,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -17974,7 +22752,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -18057,7 +22835,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -18117,7 +22895,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -18194,7 +22972,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -18256,7 +23034,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -18331,7 +23109,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -18415,7 +23193,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -18505,7 +23283,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -18568,7 +23346,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -18643,7 +23421,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 316, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -18717,7 +23495,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 311, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -18805,7 +23583,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 318, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -18898,7 +23676,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 315, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -18977,7 +23755,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 312, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -19053,7 +23831,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 319, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -19125,7 +23903,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 314, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -19236,7 +24014,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 321, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -19369,7 +24147,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 313, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -19474,7 +24252,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 320, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -19598,7 +24376,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 317, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -19656,7 +24434,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 322, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -19707,7 +24485,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 323, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -19767,7 +24545,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 202, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -19855,7 +24633,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 204, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -19901,7 +24679,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 203, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -19979,7 +24757,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 205, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20037,7 +24815,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 206, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20117,7 +24895,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 207, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20177,7 +24955,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 157, + "weight": 103, "cookies": false, "type": "", "deprecated": false, @@ -20249,7 +25027,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 156, + "weight": 102, "cookies": false, "type": "", "deprecated": false, @@ -20383,7 +25161,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 158, + "weight": 104, "cookies": false, "type": "", "deprecated": false, @@ -20441,7 +25219,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 159, + "weight": 105, "cookies": false, "type": "", "deprecated": false, @@ -20556,7 +25334,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 176, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -20616,7 +25394,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 163, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -20708,7 +25486,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 164, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -20787,7 +25565,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 169, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -20866,7 +25644,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 168, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -20945,7 +25723,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 174, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -21024,7 +25802,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 167, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -21115,7 +25893,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 175, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -21197,7 +25975,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 172, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -21276,7 +26054,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 171, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -21355,7 +26133,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 173, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -21434,7 +26212,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 166, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -21490,6 +26268,85 @@ } } }, + "\/projects\/{projectId}\/auth\/session-invalidation": { + "patch": { + "summary": "Update invalidate session option of the project", + "operationId": "projectsUpdateSessionInvalidation", + "tags": [ + "projects" + ], + "description": "Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "x-appwrite": { + "method": "updateSessionInvalidation", + "group": "auth", + "weight": 148, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-session-invalidation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-invalidation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -21513,7 +26370,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 170, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -21613,7 +26470,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 373, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -21681,7 +26538,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 370, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -21766,7 +26623,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 372, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -21834,7 +26691,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 371, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -21920,7 +26777,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 374, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -21990,7 +26847,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 188, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -22077,7 +26934,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 184, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -22135,7 +26992,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 183, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -22228,7 +27085,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 185, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -22296,7 +27153,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 186, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -22390,7 +27247,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 187, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -22460,7 +27317,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 165, + "weight": 111, "cookies": false, "type": "", "deprecated": false, @@ -22598,7 +27455,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 190, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -22656,7 +27513,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 189, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -22775,7 +27632,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 191, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -22843,7 +27700,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 192, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -22938,7 +27795,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 193, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -23008,7 +27865,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 161, + "weight": 107, "cookies": false, "type": "", "deprecated": false, @@ -23109,7 +27966,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 162, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -23188,7 +28045,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 194, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -23306,7 +28163,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 195, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -23437,7 +28294,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 160, + "weight": 106, "cookies": false, "type": "", "deprecated": false, @@ -23516,7 +28373,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 197, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -23740,7 +28597,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 199, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -24004,7 +28861,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 201, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -24230,7 +29087,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 196, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -24451,7 +29308,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 198, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -24691,7 +29548,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 200, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -24914,7 +29771,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 178, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -24972,7 +29829,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 177, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -25087,7 +29944,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 179, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -25155,7 +30012,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 180, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -25271,7 +30128,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 182, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -25341,7 +30198,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 181, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -25411,7 +30268,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 294, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -25485,7 +30342,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 435, + "weight": 482, "cookies": false, "type": "", "deprecated": false, @@ -25552,7 +30409,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 437, + "weight": 484, "cookies": false, "type": "", "deprecated": false, @@ -25630,7 +30487,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 438, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -25743,7 +30600,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 436, + "weight": 483, "cookies": false, "type": "", "deprecated": false, @@ -25821,7 +30678,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 295, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -25872,7 +30729,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 296, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -25932,7 +30789,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 297, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -25992,7 +30849,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -26062,7 +30919,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -26311,7 +31168,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 457, "cookies": false, "type": "", "deprecated": false, @@ -26360,7 +31217,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -26410,7 +31267,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 429, + "weight": 476, "cookies": false, "type": "", "deprecated": false, @@ -26510,7 +31367,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 430, + "weight": 477, "cookies": false, "type": "", "deprecated": false, @@ -26570,7 +31427,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 431, + "weight": 478, "cookies": false, "type": "", "deprecated": false, @@ -26642,7 +31499,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -26701,7 +31558,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -26946,7 +31803,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -27007,7 +31864,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -27087,7 +31944,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -27170,7 +32027,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 458, "cookies": false, "type": "upload", "deprecated": false, @@ -27271,7 +32128,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -27351,7 +32208,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -27454,7 +32311,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -27552,7 +32409,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -27614,7 +32471,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 464, "cookies": false, "type": "", "deprecated": false, @@ -27678,7 +32535,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 465, "cookies": false, "type": "location", "deprecated": false, @@ -27768,7 +32625,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -27839,7 +32696,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -27910,7 +32767,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -27972,7 +32829,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -28043,7 +32900,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 432, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -28125,7 +32982,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -28184,7 +33041,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -28275,7 +33132,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -28344,7 +33201,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -28435,7 +33292,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -28506,7 +33363,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -28579,7 +33436,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -28706,7 +33563,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -28765,7 +33622,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -28889,7 +33746,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -28950,7 +33807,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -29036,7 +33893,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -29134,7 +33991,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -29206,7 +34063,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -29295,7 +34152,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -29362,7 +34219,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -29440,7 +34297,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -29668,7 +34525,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -29753,7 +34610,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 222, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -29825,7 +34682,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 223, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -29907,7 +34764,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -29983,7 +34840,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -30068,7 +34925,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -30130,7 +34987,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -30204,7 +35061,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -30268,7 +35125,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 237, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -30341,7 +35198,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -30427,7 +35284,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -30538,7 +35395,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -30610,7 +35467,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -30697,7 +35554,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -30771,7 +35628,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -30868,7 +35725,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -30928,7 +35785,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -31009,7 +35866,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -31089,7 +35946,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -31178,7 +36035,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -31238,7 +36095,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -31308,7 +36165,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 490, "cookies": false, "type": "", "deprecated": false, @@ -31370,7 +36227,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -31443,7 +36300,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -31531,7 +36388,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -31616,7 +36473,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -31701,7 +36558,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -31769,7 +36626,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -31830,7 +36687,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -31915,7 +36772,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -32000,7 +36857,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -32115,7 +36972,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -32218,7 +37075,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -32323,7 +37180,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 280, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -32395,7 +37252,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -32447,7 +37304,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -32508,7 +37365,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -32588,7 +37445,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -32670,7 +37527,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -32753,7 +37610,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -32827,7 +37684,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -32912,7 +37769,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -32985,7 +37842,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -33061,7 +37918,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -33122,7 +37979,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -33181,7 +38038,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -33240,7 +38097,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -33301,7 +38158,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -33381,7 +38238,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -33461,7 +38318,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -33541,7 +38398,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -33600,7 +38457,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -33680,7 +38537,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -33739,7 +38596,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -33791,7 +38648,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -33845,7 +38702,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -33916,7 +38773,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -33996,7 +38853,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -34069,7 +38926,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -34179,7 +39036,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -34249,7 +39106,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -34338,7 +39195,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -34410,7 +39267,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -34492,7 +39349,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -34572,7 +39429,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -34652,7 +39509,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 284, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -34748,7 +39605,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 285, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -34833,7 +39690,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 286, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -34918,7 +39775,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 287, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -34988,7 +39845,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 288, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -35058,7 +39915,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 283, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -35112,6 +39969,17 @@ "default": "" }, "in": "query" + }, + { + "name": "providerReference", + "description": "Git reference (branch, tag, commit) to get contents from", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" } ] } @@ -35132,7 +40000,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 293, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -35221,7 +40089,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 290, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -35295,7 +40163,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 291, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -35346,7 +40214,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 292, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -35493,13 +40361,37 @@ "version" ] }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35517,13 +40409,37 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "$ref": "#\/components\/schemas\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35547,7 +40463,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35571,7 +40487,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35589,13 +40505,37 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35619,7 +40559,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35643,7 +40583,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35667,7 +40607,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35691,7 +40631,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35715,7 +40655,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35739,7 +40679,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35763,7 +40703,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35787,7 +40727,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35811,7 +40751,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35835,7 +40775,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35859,7 +40799,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35883,7 +40823,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35907,7 +40847,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of installations documents that matched your query.", + "description": "Total number of installations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35931,7 +40871,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworkProviderRepositories documents that matched your query.", + "description": "Total number of frameworkProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35955,7 +40895,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimeProviderRepositories documents that matched your query.", + "description": "Total number of runtimeProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35979,7 +40919,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of branches documents that matched your query.", + "description": "Total number of branches rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36003,7 +40943,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36027,7 +40967,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36051,7 +40991,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36075,7 +41015,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36099,7 +41039,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of projects documents that matched your query.", + "description": "Total number of projects rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36123,7 +41063,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of webhooks documents that matched your query.", + "description": "Total number of webhooks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36147,7 +41087,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of keys documents that matched your query.", + "description": "Total number of keys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36171,7 +41111,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of devKeys documents that matched your query.", + "description": "Total number of devKeys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36195,7 +41135,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of platforms documents that matched your query.", + "description": "Total number of platforms rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36219,7 +41159,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36243,7 +41183,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36267,7 +41207,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36291,7 +41231,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36315,7 +41255,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36339,7 +41279,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36363,7 +41303,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rules documents that matched your query.", + "description": "Total number of rules rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36387,7 +41327,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36411,7 +41351,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36435,7 +41375,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36459,7 +41399,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36483,7 +41423,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36507,7 +41447,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36531,7 +41471,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of migrations documents that matched your query.", + "description": "Total number of migrations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36555,7 +41495,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36579,7 +41519,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of contents documents that matched your query.", + "description": "Total number of contents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -37532,6 +42472,903 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -37604,6 +43441,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", @@ -40500,6 +46466,11 @@ "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true }, + "authInvalidateSessions": { + "type": "boolean", + "description": "Whether or not all existing sessions should be invalidated on password change", + "x-example": true + }, "oAuthProviders": { "type": "array", "description": "List of Auth Providers.", @@ -40721,6 +46692,7 @@ "authMembershipsUserName", "authMembershipsUserEmail", "authMembershipsMfa", + "authInvalidateSessions", "oAuthProviders", "platforms", "webhooks", @@ -40793,7 +46765,10 @@ "items": { "type": "string" }, - "x-example": "database.collections.update" + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] }, "security": { "type": "boolean", @@ -41512,12 +47487,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total databases storage in bytes.", @@ -41552,6 +47539,14 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41560,6 +47555,14 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "An array of the aggregated number of databases storage in bytes per period.", @@ -41589,13 +47592,17 @@ "range", "databasesTotal", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databasesReadsTotal", "databasesWritesTotal", "databases", "collections", + "tables", "documents", + "rows", "storage", "databasesReads", "databasesWrites" @@ -41616,12 +47623,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total storage used in bytes.", @@ -41648,6 +47667,14 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41656,6 +47683,14 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "Aggregated storage used in bytes per period.", @@ -41684,17 +47719,51 @@ "required": [ "range", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databaseReadsTotal", "databaseWritesTotal", "collections", + "tables", "documents", + "rows", "storage", "databaseReads", "databaseWrites" ] }, + "usageTable": { + "description": "UsageTable", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of of rows.", + "x-example": 0, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "rowsTotal", + "rows" + ] + }, "usageCollection": { "description": "UsageCollection", "type": "object", @@ -42813,6 +48882,12 @@ "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "databasesTotal": { "type": "integer", "description": "Total aggregated number of databases.", @@ -43019,6 +49094,7 @@ "required": [ "executionsTotal", "documentsTotal", + "rowsTotal", "databasesTotal", "databasesStorageTotal", "usersTotal", 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 3e9b87fdf1..a4e905fda7 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4060,7 +4060,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -4134,7 +4134,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4214,7 +4214,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4274,7 +4274,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4351,7 +4351,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4413,7 +4413,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -4476,7 +4476,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "tags": [ "databases" @@ -4497,7 +4497,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -4602,7 +4602,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -4672,7 +4672,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -4772,7 +4772,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4844,7 +4844,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -4882,7 +4882,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -4929,7 +4929,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -4967,7 +4967,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -5036,7 +5036,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5074,7 +5074,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5148,7 +5148,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5186,7 +5186,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5234,7 +5234,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "tags": [ "databases" @@ -5255,7 +5255,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5293,7 +5293,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5367,7 +5367,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5405,7 +5405,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5474,7 +5474,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5512,7 +5512,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5549,7 +5549,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -5570,7 +5570,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -5586,12 +5586,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 353, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5624,7 +5624,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5646,7 +5646,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "x-example": null, "items": { "type": "string" @@ -5702,7 +5702,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -5740,7 +5740,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5766,7 +5766,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "x-example": null, "items": { "type": "string" @@ -5785,7 +5785,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -5823,7 +5823,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -5861,7 +5861,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5888,17 +5888,17 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null }, "array": { @@ -5940,7 +5940,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -5978,7 +5978,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6009,23 +6009,23 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6062,7 +6062,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6100,7 +6100,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6127,17 +6127,17 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6179,7 +6179,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6217,7 +6217,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6248,23 +6248,23 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6301,7 +6301,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6339,7 +6339,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6366,7 +6366,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6408,7 +6408,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6446,7 +6446,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6477,13 +6477,13 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6520,7 +6520,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -6558,7 +6558,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6575,7 +6575,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "x-example": "" }, "type": { @@ -6652,7 +6652,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -6690,7 +6690,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -6770,7 +6770,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -6808,7 +6808,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -6850,7 +6850,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6887,7 +6887,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -6925,7 +6925,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6994,7 +6994,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -7032,7 +7032,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7069,7 +7069,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7137,7 +7137,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7175,7 +7175,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7209,7 +7209,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -7247,7 +7247,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7290,7 +7290,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7328,7 +7328,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7366,7 +7366,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } } @@ -7399,7 +7399,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -7486,7 +7486,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -7497,7 +7497,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -7507,7 +7506,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -7639,7 +7637,7 @@ ], "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { - "200": { + "201": { "description": "Documents List", "content": { "application\/json": { @@ -7653,7 +7651,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -7668,6 +7666,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [], "Key": [] @@ -7746,7 +7762,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -7841,7 +7857,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -7933,7 +7949,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8009,14 +8025,14 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "tags": [ "databases" ], "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -8030,7 +8046,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8046,6 +8062,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [], "Session": [] @@ -8141,7 +8176,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8242,7 +8277,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8328,7 +8363,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -8340,8 +8375,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8353,9 +8386,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8407,7 +8438,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "x-example": null }, "min": { @@ -8445,7 +8476,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8457,8 +8488,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8470,9 +8499,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8562,7 +8589,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -8644,8 +8671,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -8774,7 +8801,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -8846,7 +8873,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8904,6 +8931,4544 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "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).", + "x-example": false + }, + "enabled": { + "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 + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "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 + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + } + } + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDeleteRows", + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, "\/functions": { "get": { "summary": "List functions", @@ -8927,7 +13492,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -9001,7 +13566,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -9235,7 +13800,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -9285,7 +13850,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -9336,7 +13901,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -9396,7 +13961,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -9627,7 +14192,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -9689,7 +14254,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -9770,7 +14335,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -9854,7 +14419,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 429, "cookies": false, "type": "upload", "deprecated": false, @@ -9951,7 +14516,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -10037,7 +14602,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -10141,7 +14706,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -10239,7 +14804,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -10302,7 +14867,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -10367,7 +14932,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 436, "cookies": false, "type": "location", "deprecated": false, @@ -10458,7 +15023,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -10530,7 +15095,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -10607,7 +15172,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -10724,7 +15289,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -10791,7 +15356,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -10863,7 +15428,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -10923,7 +15488,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -11015,7 +15580,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -11085,7 +15650,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -11177,7 +15742,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -11249,7 +15814,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 255, "cookies": false, "type": "graphql", "deprecated": false, @@ -11303,7 +15868,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -11357,7 +15922,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -11407,7 +15972,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -11457,7 +16022,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -11507,7 +16072,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -11568,7 +16133,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -11618,7 +16183,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -11668,7 +16233,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -11731,7 +16296,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -11794,7 +16359,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -11868,7 +16433,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -11931,7 +16496,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -12020,7 +16585,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -12083,7 +16648,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -12146,7 +16711,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -12209,7 +16774,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -12272,7 +16837,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -12335,7 +16900,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -12398,7 +16963,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -12461,7 +17026,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -12524,7 +17089,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -12574,7 +17139,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -12624,7 +17189,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -12674,7 +17239,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -12728,7 +17293,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -12782,7 +17347,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -12836,7 +17401,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -12890,7 +17455,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -12944,7 +17509,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -12998,7 +17563,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -13052,7 +17617,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -13106,7 +17671,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -13183,7 +17748,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -13328,7 +17893,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -13475,7 +18040,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -13650,7 +18215,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -13829,7 +18394,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -13939,7 +18504,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -14052,7 +18617,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -14106,7 +18671,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -14169,7 +18734,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -14245,7 +18810,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -14321,7 +18886,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -14398,7 +18963,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -14504,7 +19069,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -14613,7 +19178,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -14699,7 +19264,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -14788,7 +19353,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -14904,7 +19469,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -15023,7 +19588,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -15119,7 +19684,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -15218,7 +19783,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -15324,7 +19889,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -15433,7 +19998,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -15577,7 +20142,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -15723,7 +20288,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -15819,7 +20384,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -15918,7 +20483,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -16014,7 +20579,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -16113,7 +20678,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -16209,7 +20774,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -16308,7 +20873,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -16404,7 +20969,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -16503,7 +21068,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -16557,7 +21122,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -16620,7 +21185,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -16696,7 +21261,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -16772,7 +21337,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -16847,7 +21412,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -16931,7 +21496,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -16992,7 +21557,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -17070,7 +21635,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -17133,7 +21698,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -17209,7 +21774,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -17294,7 +21859,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -17386,7 +21951,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -17450,7 +22015,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -17527,7 +22092,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -17598,7 +22163,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -17848,7 +22413,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 457, "cookies": false, "type": "", "deprecated": false, @@ -17898,7 +22463,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -17949,7 +22514,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -18009,7 +22574,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -18255,7 +22820,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -18317,7 +22882,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -18398,7 +22963,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -18482,7 +23047,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 458, "cookies": false, "type": "upload", "deprecated": false, @@ -18584,7 +23149,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -18665,7 +23230,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -18769,7 +23334,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -18868,7 +23433,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -18931,7 +23496,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 464, "cookies": false, "type": "", "deprecated": false, @@ -18996,7 +23561,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 465, "cookies": false, "type": "location", "deprecated": false, @@ -19087,7 +23652,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -19159,7 +23724,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -19231,7 +23796,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -19294,7 +23859,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -19366,7 +23931,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -19426,7 +23991,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -19518,7 +24083,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -19588,7 +24153,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -19680,7 +24245,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -19752,7 +24317,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -19826,7 +24391,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -19954,7 +24519,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20014,7 +24579,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -20139,7 +24704,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20201,7 +24766,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20289,7 +24854,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -20389,7 +24954,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20463,7 +25028,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20554,7 +25119,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20623,7 +25188,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -20703,7 +25268,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -20933,7 +25498,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -21020,7 +25585,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -21098,7 +25663,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21185,7 +25750,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -21249,7 +25814,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -21325,7 +25890,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21391,7 +25956,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21479,7 +26044,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21592,7 +26157,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21666,7 +26231,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21755,7 +26320,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21831,7 +26396,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21930,7 +26495,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -21992,7 +26557,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -22075,7 +26640,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -22156,7 +26721,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -22246,7 +26811,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -22307,7 +26872,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -22378,7 +26943,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 490, "cookies": false, "type": "", "deprecated": false, @@ -22441,7 +27006,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -22515,7 +27080,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22604,7 +27169,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22690,7 +27255,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -22776,7 +27341,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -22845,7 +27410,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -22907,7 +27472,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22993,7 +27558,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23079,7 +27644,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23195,7 +27760,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23299,7 +27864,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -23405,7 +27970,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23458,7 +28023,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -23520,7 +28085,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -23601,7 +28166,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -23684,7 +28249,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -23768,7 +28333,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -23843,7 +28408,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -23929,7 +28494,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -24003,7 +28568,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -24080,7 +28645,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -24142,7 +28707,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -24202,7 +28767,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -24262,7 +28827,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -24324,7 +28889,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -24405,7 +28970,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -24486,7 +29051,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -24567,7 +29132,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24627,7 +29192,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -24708,7 +29273,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -24768,7 +29333,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -24821,7 +29386,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -24876,7 +29441,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -24948,7 +29513,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -25029,7 +29594,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -25103,7 +29668,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -25214,7 +29779,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -25285,7 +29850,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -25375,7 +29940,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -25448,7 +30013,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -25531,7 +30096,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -25612,7 +30177,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25780,13 +30345,37 @@ "version" ] }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25804,13 +30393,37 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "$ref": "#\/components\/schemas\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25834,7 +30447,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25858,7 +30471,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25876,13 +30489,37 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25906,7 +30543,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25930,7 +30567,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25954,7 +30591,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25978,7 +30615,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26002,7 +30639,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26026,7 +30663,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26050,7 +30687,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26074,7 +30711,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26098,7 +30735,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26122,7 +30759,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26146,7 +30783,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26170,7 +30807,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26194,7 +30831,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26218,7 +30855,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26242,7 +30879,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26266,7 +30903,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26290,7 +30927,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26314,7 +30951,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26338,7 +30975,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26362,7 +30999,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26386,7 +31023,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26410,7 +31047,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26434,7 +31071,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26458,7 +31095,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26482,7 +31119,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26506,7 +31143,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26530,7 +31167,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -27483,6 +32120,903 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -27555,6 +33089,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 73a027f4bb..58917b543a 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4361,7 +4361,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -4446,7 +4446,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4457,7 +4457,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -4467,7 +4466,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -4496,6 +4494,7 @@ { "name": "createDocuments", "auth": { + "Admin": [], "Key": [] }, "parameters": [ @@ -4612,7 +4611,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4686,14 +4685,14 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "tags": [ "databases" ], "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -4707,7 +4706,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -4723,6 +4722,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [] } @@ -4816,7 +4834,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -4915,7 +4933,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -4976,43 +4994,42 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", "tags": [ - "databases" + "tables" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { "200": { - "description": "Document", + "description": "Rows List", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/rowList" } } } } }, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 116, + "method": "listRows", + "group": "rows", + "weight": 413, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/decrement-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", "platforms": [ - "console", - "server", "client", + "server", "server" ], "packaging": false, @@ -5039,31 +5056,151 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "" }, "in": "path" } @@ -5074,15 +5211,31 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "x-example": null + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } } } } @@ -5091,43 +5244,42 @@ } } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", "tags": [ - "databases" + "tables" ], - "description": "Increment a specific attribute of a document by a given value.", + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { "200": { - "description": "Document", + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/document" + "$ref": "#\/components\/schemas\/row" } } } } }, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 115, + "method": "getRow", + "group": "rows", + "weight": 406, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/increment-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", "platforms": [ - "console", - "server", "client", + "server", "server" ], "packaging": false, @@ -5154,31 +5306,136 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "rowId", + "description": "Row ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { - "type": "string" + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } @@ -5189,21 +5446,205 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "x-example": null + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", - "x-example": null + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } } } } } } } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] } }, "\/functions\/{functionId}\/executions": { @@ -5229,7 +5670,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -5304,7 +5745,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -5419,7 +5860,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -5493,7 +5934,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 255, "cookies": false, "type": "graphql", "deprecated": false, @@ -5545,7 +5986,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -5597,7 +6038,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -5649,7 +6090,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -5701,7 +6142,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -5753,7 +6194,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -5805,7 +6246,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -5857,7 +6298,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -5909,7 +6350,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -5961,7 +6402,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -6013,7 +6454,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -6096,7 +6537,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -6171,7 +6612,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -6257,7 +6698,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -6355,7 +6796,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -6427,7 +6868,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -6516,7 +6957,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -6583,7 +7024,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -6661,7 +7102,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -6889,7 +7330,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -6974,7 +7415,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -7050,7 +7491,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -7135,7 +7576,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -7197,7 +7638,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -7271,7 +7712,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -7335,7 +7776,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -7421,7 +7862,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -7532,7 +7973,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -7604,7 +8045,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -7691,7 +8132,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -7765,7 +8206,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -7863,7 +8304,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -7924,7 +8365,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -8093,13 +8534,37 @@ "version" ] }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8123,7 +8588,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8147,7 +8612,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8171,7 +8636,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8195,7 +8660,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8219,7 +8684,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8243,7 +8708,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8267,7 +8732,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8291,7 +8756,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8315,7 +8780,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8339,7 +8804,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8363,7 +8828,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8387,7 +8852,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8411,7 +8876,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8429,6 +8894,63 @@ "localeCodes" ] }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 92ba5c6829..77b8b42436 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4359,7 +4359,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 310, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -4419,7 +4419,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 434, + "weight": 481, "cookies": false, "type": "", "deprecated": false, @@ -4494,7 +4494,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 309, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -4542,7 +4542,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -4615,7 +4615,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4674,7 +4674,7 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesListUsages", "tags": [ "databases" ], @@ -4692,13 +4692,13 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "listUsages", "group": null, - "weight": 121, + "weight": 324, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", + "demo": "databases\/list-usages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -4720,7 +4720,7 @@ "parameters": [ { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "schema": { "type": "string", @@ -4730,12 +4730,8 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], + "x-enum-name": null, + "x-enum-keys": [], "default": "30d" }, "in": "query" @@ -4766,7 +4762,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4825,7 +4821,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4901,7 +4897,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4962,7 +4958,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -5024,7 +5020,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "tags": [ "databases" @@ -5045,7 +5041,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -5149,7 +5145,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -5218,7 +5214,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -5317,7 +5313,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -5388,7 +5384,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5425,7 +5421,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5472,7 +5468,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5509,7 +5505,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -5578,7 +5574,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5615,7 +5611,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5689,7 +5685,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5726,7 +5722,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5774,7 +5770,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "tags": [ "databases" @@ -5795,7 +5791,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5832,7 +5828,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5906,7 +5902,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5943,7 +5939,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6012,7 +6008,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -6049,7 +6045,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6086,7 +6082,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6107,7 +6103,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -6123,12 +6119,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 353, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -6160,7 +6156,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6182,7 +6178,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "x-example": null, "items": { "type": "string" @@ -6238,7 +6234,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6275,7 +6271,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6301,7 +6297,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "x-example": null, "items": { "type": "string" @@ -6320,7 +6316,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6358,7 +6354,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6395,7 +6391,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6422,17 +6418,17 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null }, "array": { @@ -6474,7 +6470,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6511,7 +6507,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6542,23 +6538,23 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6595,7 +6591,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6632,7 +6628,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6659,17 +6655,17 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6711,7 +6707,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6748,7 +6744,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6779,23 +6775,23 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6832,7 +6828,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6869,7 +6865,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6896,7 +6892,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6938,7 +6934,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6975,7 +6971,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7006,13 +7002,13 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7049,7 +7045,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7086,7 +7082,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7103,7 +7099,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "x-example": "" }, "type": { @@ -7180,7 +7176,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7217,7 +7213,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -7297,7 +7293,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7334,7 +7330,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -7376,7 +7372,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7413,7 +7409,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7450,7 +7446,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7519,7 +7515,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -7556,7 +7552,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7593,7 +7589,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7661,7 +7657,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7698,7 +7694,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7732,7 +7728,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -7769,7 +7765,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7812,7 +7808,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7849,7 +7845,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7887,7 +7883,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } } @@ -7920,7 +7916,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -8005,7 +8001,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8016,7 +8012,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -8026,7 +8021,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -8156,7 +8150,7 @@ ], "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { - "200": { + "201": { "description": "Documents List", "content": { "application\/json": { @@ -8170,7 +8164,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8185,6 +8179,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [] } @@ -8262,7 +8274,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8356,7 +8368,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8447,7 +8459,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8521,14 +8533,14 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "tags": [ "databases" ], "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -8542,7 +8554,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8558,6 +8570,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [] } @@ -8651,7 +8682,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8750,7 +8781,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8834,7 +8865,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 112, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -8927,7 +8958,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -8939,8 +8970,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8951,8 +8980,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9004,7 +9032,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "x-example": null }, "min": { @@ -9042,7 +9070,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -9054,8 +9082,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -9066,8 +9092,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9157,7 +9182,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -9238,8 +9263,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -9367,7 +9392,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9438,7 +9463,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9518,7 +9543,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 79, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -9601,7 +9626,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 123, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -9693,7 +9718,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 73, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -9743,10 +9768,4763 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "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).", + "x-example": false + }, + "enabled": { + "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 + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "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 + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + } + } + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "databasesListTableLogs", + "tags": [ + "databases" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "x-appwrite": { + "method": "listTableLogs", + "group": "tables", + "weight": 376, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDeleteRows", + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesListRowLogs", + "tags": [ + "tables" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 414, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesGetTableUsage", + "tags": [ + "tables" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/usageTable" + } + } + } + } + }, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "schema": { + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "30d" + }, + "in": "query" + }, + { + "name": "tableId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", + "operationId": "databasesGetUsage", "tags": [ "databases" ], @@ -9764,13 +14542,13 @@ } }, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "getUsage", "group": null, - "weight": 122, + "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-database-usage.md", + "demo": "databases\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -9802,7 +14580,7 @@ }, { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "schema": { "type": "string", @@ -9848,7 +14626,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -9921,7 +14699,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -10154,7 +14932,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -10203,7 +14981,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -10253,7 +15031,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 404, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -10353,7 +15131,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 403, + "weight": 450, "cookies": false, "type": "", "deprecated": false, @@ -10413,7 +15191,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 397, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -10485,7 +15263,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -10544,7 +15322,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -10774,7 +15552,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -10835,7 +15613,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -10915,7 +15693,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -10998,7 +15776,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 429, "cookies": false, "type": "upload", "deprecated": false, @@ -11094,7 +15872,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -11179,7 +15957,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -11282,7 +16060,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -11379,7 +16157,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -11441,7 +16219,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -11505,7 +16283,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 436, "cookies": false, "type": "location", "deprecated": false, @@ -11595,7 +16373,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -11666,7 +16444,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -11741,7 +16519,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -11856,7 +16634,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -11921,7 +16699,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -11992,7 +16770,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 396, + "weight": 443, "cookies": false, "type": "", "deprecated": false, @@ -12074,7 +16852,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -12133,7 +16911,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -12224,7 +17002,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -12293,7 +17071,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -12384,7 +17162,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -12455,7 +17233,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 255, "cookies": false, "type": "graphql", "deprecated": false, @@ -12507,7 +17285,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -12559,7 +17337,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -12608,7 +17386,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -12657,7 +17435,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -12706,7 +17484,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -12766,7 +17544,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -12815,7 +17593,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -12864,7 +17642,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -12926,7 +17704,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -12988,7 +17766,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -13061,7 +17839,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -13123,7 +17901,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -13211,7 +17989,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -13273,7 +18051,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -13335,7 +18113,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -13397,7 +18175,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -13459,7 +18237,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -13521,7 +18299,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -13583,7 +18361,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -13645,7 +18423,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -13707,7 +18485,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -13756,7 +18534,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -13805,7 +18583,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -13854,7 +18632,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -13906,7 +18684,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -13958,7 +18736,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -14010,7 +18788,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -14062,7 +18840,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -14114,7 +18892,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -14166,7 +18944,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -14218,7 +18996,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -14270,7 +19048,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -14346,7 +19124,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -14490,7 +19268,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -14636,7 +19414,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -14810,7 +19588,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -14988,7 +19766,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -15097,7 +19875,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -15209,7 +19987,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -15262,7 +20040,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -15324,7 +20102,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -15399,7 +20177,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -15474,7 +20252,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -15550,7 +20328,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -15655,7 +20433,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -15763,7 +20541,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -15848,7 +20626,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -15936,7 +20714,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -16051,7 +20829,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -16169,7 +20947,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -16264,7 +21042,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -16362,7 +21140,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -16467,7 +21245,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -16575,7 +21353,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -16718,7 +21496,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -16863,7 +21641,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -16958,7 +21736,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -17056,7 +21834,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -17151,7 +21929,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -17249,7 +22027,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -17344,7 +22122,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -17442,7 +22220,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -17537,7 +22315,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -17635,7 +22413,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -17688,7 +22466,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -17750,7 +22528,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -17825,7 +22603,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -17900,7 +22678,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -17974,7 +22752,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -18057,7 +22835,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -18117,7 +22895,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -18194,7 +22972,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -18256,7 +23034,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -18331,7 +23109,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -18415,7 +23193,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -18505,7 +23283,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -18568,7 +23346,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -18643,7 +23421,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 316, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -18717,7 +23495,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 311, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -18805,7 +23583,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 318, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -18898,7 +23676,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 315, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -18977,7 +23755,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 312, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -19053,7 +23831,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 319, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -19125,7 +23903,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 314, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -19236,7 +24014,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 321, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -19369,7 +24147,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 313, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -19474,7 +24252,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 320, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -19598,7 +24376,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 317, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -19656,7 +24434,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 322, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -19707,7 +24485,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 323, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -19767,7 +24545,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 202, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -19855,7 +24633,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 204, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -19901,7 +24679,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 203, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -19979,7 +24757,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 205, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20037,7 +24815,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 206, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20117,7 +24895,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 207, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20177,7 +24955,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 157, + "weight": 103, "cookies": false, "type": "", "deprecated": false, @@ -20249,7 +25027,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 156, + "weight": 102, "cookies": false, "type": "", "deprecated": false, @@ -20383,7 +25161,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 158, + "weight": 104, "cookies": false, "type": "", "deprecated": false, @@ -20441,7 +25219,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 159, + "weight": 105, "cookies": false, "type": "", "deprecated": false, @@ -20556,7 +25334,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 176, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -20616,7 +25394,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 163, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -20708,7 +25486,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 164, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -20787,7 +25565,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 169, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -20866,7 +25644,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 168, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -20945,7 +25723,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 174, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -21024,7 +25802,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 167, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -21115,7 +25893,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 175, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -21197,7 +25975,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 172, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -21276,7 +26054,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 171, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -21355,7 +26133,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 173, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -21434,7 +26212,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 166, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -21490,6 +26268,85 @@ } } }, + "\/projects\/{projectId}\/auth\/session-invalidation": { + "patch": { + "summary": "Update invalidate session option of the project", + "operationId": "projectsUpdateSessionInvalidation", + "tags": [ + "projects" + ], + "description": "Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.", + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "x-appwrite": { + "method": "updateSessionInvalidation", + "group": "auth", + "weight": 148, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-session-invalidation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-invalidation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change", + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + } + } + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -21513,7 +26370,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 170, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -21613,7 +26470,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 373, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -21681,7 +26538,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 370, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -21766,7 +26623,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 372, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -21834,7 +26691,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 371, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -21920,7 +26777,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 374, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -21990,7 +26847,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 188, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -22077,7 +26934,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 184, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -22135,7 +26992,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 183, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -22228,7 +27085,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 185, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -22296,7 +27153,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 186, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -22390,7 +27247,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 187, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -22460,7 +27317,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 165, + "weight": 111, "cookies": false, "type": "", "deprecated": false, @@ -22598,7 +27455,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 190, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -22656,7 +27513,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 189, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -22775,7 +27632,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 191, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -22843,7 +27700,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 192, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -22938,7 +27795,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 193, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -23008,7 +27865,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 161, + "weight": 107, "cookies": false, "type": "", "deprecated": false, @@ -23109,7 +27966,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 162, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -23188,7 +28045,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 194, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -23306,7 +28163,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 195, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -23437,7 +28294,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 160, + "weight": 106, "cookies": false, "type": "", "deprecated": false, @@ -23516,7 +28373,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 197, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -23740,7 +28597,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 199, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -24004,7 +28861,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 201, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -24230,7 +29087,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 196, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -24451,7 +29308,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 198, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -24691,7 +29548,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 200, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -24914,7 +29771,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 178, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -24972,7 +29829,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 177, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -25087,7 +29944,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 179, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -25155,7 +30012,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 180, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -25271,7 +30128,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 182, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -25341,7 +30198,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 181, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -25411,7 +30268,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 294, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -25485,7 +30342,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 435, + "weight": 482, "cookies": false, "type": "", "deprecated": false, @@ -25552,7 +30409,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 437, + "weight": 484, "cookies": false, "type": "", "deprecated": false, @@ -25630,7 +30487,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 438, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -25743,7 +30600,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 436, + "weight": 483, "cookies": false, "type": "", "deprecated": false, @@ -25821,7 +30678,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 295, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -25872,7 +30729,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 296, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -25932,7 +30789,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 297, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -25992,7 +30849,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -26062,7 +30919,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -26311,7 +31168,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 457, "cookies": false, "type": "", "deprecated": false, @@ -26360,7 +31217,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -26410,7 +31267,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 429, + "weight": 476, "cookies": false, "type": "", "deprecated": false, @@ -26510,7 +31367,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 430, + "weight": 477, "cookies": false, "type": "", "deprecated": false, @@ -26570,7 +31427,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 431, + "weight": 478, "cookies": false, "type": "", "deprecated": false, @@ -26642,7 +31499,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -26701,7 +31558,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -26946,7 +31803,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -27007,7 +31864,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -27087,7 +31944,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -27170,7 +32027,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 458, "cookies": false, "type": "upload", "deprecated": false, @@ -27271,7 +32128,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -27351,7 +32208,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -27454,7 +32311,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -27552,7 +32409,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -27614,7 +32471,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 464, "cookies": false, "type": "", "deprecated": false, @@ -27678,7 +32535,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 465, "cookies": false, "type": "location", "deprecated": false, @@ -27768,7 +32625,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -27839,7 +32696,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -27910,7 +32767,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -27972,7 +32829,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -28043,7 +32900,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 432, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -28125,7 +32982,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -28184,7 +33041,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -28275,7 +33132,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -28344,7 +33201,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -28435,7 +33292,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -28506,7 +33363,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -28579,7 +33436,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -28706,7 +33563,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -28765,7 +33622,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -28889,7 +33746,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -28950,7 +33807,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -29036,7 +33893,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -29134,7 +33991,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -29206,7 +34063,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -29295,7 +34152,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -29362,7 +34219,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -29440,7 +34297,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -29668,7 +34525,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -29753,7 +34610,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 222, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -29825,7 +34682,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 223, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -29907,7 +34764,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -29983,7 +34840,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -30068,7 +34925,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -30130,7 +34987,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -30204,7 +35061,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -30268,7 +35125,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 237, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -30341,7 +35198,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -30427,7 +35284,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -30538,7 +35395,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -30610,7 +35467,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -30697,7 +35554,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -30771,7 +35628,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -30868,7 +35725,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -30928,7 +35785,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -31009,7 +35866,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -31089,7 +35946,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -31178,7 +36035,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -31238,7 +36095,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -31308,7 +36165,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 490, "cookies": false, "type": "", "deprecated": false, @@ -31370,7 +36227,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -31443,7 +36300,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -31531,7 +36388,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -31616,7 +36473,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -31701,7 +36558,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -31769,7 +36626,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -31830,7 +36687,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -31915,7 +36772,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -32000,7 +36857,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -32115,7 +36972,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -32218,7 +37075,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -32323,7 +37180,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 280, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -32395,7 +37252,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -32447,7 +37304,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -32508,7 +37365,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -32588,7 +37445,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -32670,7 +37527,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -32753,7 +37610,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -32827,7 +37684,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -32912,7 +37769,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -32985,7 +37842,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -33061,7 +37918,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -33122,7 +37979,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -33181,7 +38038,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -33240,7 +38097,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -33301,7 +38158,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -33381,7 +38238,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -33461,7 +38318,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -33541,7 +38398,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -33600,7 +38457,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -33680,7 +38537,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -33739,7 +38596,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -33791,7 +38648,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -33845,7 +38702,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -33916,7 +38773,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -33996,7 +38853,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -34069,7 +38926,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -34179,7 +39036,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -34249,7 +39106,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -34338,7 +39195,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -34410,7 +39267,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -34492,7 +39349,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -34572,7 +39429,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -34652,7 +39509,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 284, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -34748,7 +39605,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 285, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -34833,7 +39690,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 286, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -34918,7 +39775,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 287, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -34988,7 +39845,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 288, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -35058,7 +39915,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 283, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -35143,7 +40000,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 293, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -35232,7 +40089,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 290, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -35306,7 +40163,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 291, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -35357,7 +40214,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 292, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -35504,13 +40361,37 @@ "version" ] }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35528,13 +40409,37 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "$ref": "#\/components\/schemas\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35558,7 +40463,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35582,7 +40487,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35600,13 +40505,37 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35630,7 +40559,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35654,7 +40583,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35678,7 +40607,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35702,7 +40631,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35726,7 +40655,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35750,7 +40679,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35774,7 +40703,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35798,7 +40727,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35822,7 +40751,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35846,7 +40775,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35870,7 +40799,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35894,7 +40823,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35918,7 +40847,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of installations documents that matched your query.", + "description": "Total number of installations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35942,7 +40871,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworkProviderRepositories documents that matched your query.", + "description": "Total number of frameworkProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35966,7 +40895,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimeProviderRepositories documents that matched your query.", + "description": "Total number of runtimeProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35990,7 +40919,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of branches documents that matched your query.", + "description": "Total number of branches rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36014,7 +40943,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36038,7 +40967,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36062,7 +40991,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36086,7 +41015,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36110,7 +41039,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of projects documents that matched your query.", + "description": "Total number of projects rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36134,7 +41063,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of webhooks documents that matched your query.", + "description": "Total number of webhooks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36158,7 +41087,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of keys documents that matched your query.", + "description": "Total number of keys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36182,7 +41111,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of devKeys documents that matched your query.", + "description": "Total number of devKeys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36206,7 +41135,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of platforms documents that matched your query.", + "description": "Total number of platforms rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36230,7 +41159,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36254,7 +41183,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36278,7 +41207,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36302,7 +41231,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36326,7 +41255,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36350,7 +41279,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36374,7 +41303,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rules documents that matched your query.", + "description": "Total number of rules rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36398,7 +41327,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36422,7 +41351,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36446,7 +41375,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36470,7 +41399,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36494,7 +41423,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36518,7 +41447,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36542,7 +41471,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of migrations documents that matched your query.", + "description": "Total number of migrations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36566,7 +41495,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36590,7 +41519,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of contents documents that matched your query.", + "description": "Total number of contents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -37543,6 +42472,903 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -37615,6 +43441,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", @@ -40511,6 +46466,11 @@ "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true }, + "authInvalidateSessions": { + "type": "boolean", + "description": "Whether or not all existing sessions should be invalidated on password change", + "x-example": true + }, "oAuthProviders": { "type": "array", "description": "List of Auth Providers.", @@ -40732,6 +46692,7 @@ "authMembershipsUserName", "authMembershipsUserEmail", "authMembershipsMfa", + "authInvalidateSessions", "oAuthProviders", "platforms", "webhooks", @@ -40804,7 +46765,10 @@ "items": { "type": "string" }, - "x-example": "database.collections.update" + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] }, "security": { "type": "boolean", @@ -41523,12 +47487,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total databases storage in bytes.", @@ -41563,6 +47539,14 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41571,6 +47555,14 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "An array of the aggregated number of databases storage in bytes per period.", @@ -41600,13 +47592,17 @@ "range", "databasesTotal", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databasesReadsTotal", "databasesWritesTotal", "databases", "collections", + "tables", "documents", + "rows", "storage", "databasesReads", "databasesWrites" @@ -41627,12 +47623,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total storage used in bytes.", @@ -41659,6 +47667,14 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41667,6 +47683,14 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "Aggregated storage used in bytes per period.", @@ -41695,17 +47719,51 @@ "required": [ "range", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databaseReadsTotal", "databaseWritesTotal", "collections", + "tables", "documents", + "rows", "storage", "databaseReads", "databaseWrites" ] }, + "usageTable": { + "description": "UsageTable", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of of rows.", + "x-example": 0, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "$ref": "#\/components\/schemas\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "rowsTotal", + "rows" + ] + }, "usageCollection": { "description": "UsageCollection", "type": "object", @@ -42824,6 +48882,12 @@ "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "databasesTotal": { "type": "integer", "description": "Total aggregated number of databases.", @@ -43030,6 +49094,7 @@ "required": [ "executionsTotal", "documentsTotal", + "rowsTotal", "databasesTotal", "databasesStorageTotal", "usersTotal", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 3e9b87fdf1..a4e905fda7 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -4060,7 +4060,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -4134,7 +4134,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4214,7 +4214,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4274,7 +4274,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4351,7 +4351,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4413,7 +4413,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -4476,7 +4476,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "tags": [ "databases" @@ -4497,7 +4497,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -4602,7 +4602,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -4672,7 +4672,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -4772,7 +4772,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4844,7 +4844,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -4882,7 +4882,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -4929,7 +4929,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -4967,7 +4967,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -5036,7 +5036,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5074,7 +5074,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5148,7 +5148,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5186,7 +5186,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "schema": { "type": "string", @@ -5234,7 +5234,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "tags": [ "databases" @@ -5255,7 +5255,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5293,7 +5293,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5367,7 +5367,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5405,7 +5405,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5474,7 +5474,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5512,7 +5512,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5549,7 +5549,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -5570,7 +5570,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -5586,12 +5586,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 353, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5624,7 +5624,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5646,7 +5646,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "x-example": null, "items": { "type": "string" @@ -5702,7 +5702,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -5740,7 +5740,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5766,7 +5766,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "x-example": null, "items": { "type": "string" @@ -5785,7 +5785,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -5823,7 +5823,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -5861,7 +5861,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -5888,17 +5888,17 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null }, "array": { @@ -5940,7 +5940,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -5978,7 +5978,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6009,23 +6009,23 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6062,7 +6062,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6100,7 +6100,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6127,17 +6127,17 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6179,7 +6179,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6217,7 +6217,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6248,23 +6248,23 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6301,7 +6301,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6339,7 +6339,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6366,7 +6366,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null }, "array": { @@ -6408,7 +6408,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6446,7 +6446,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6477,13 +6477,13 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6520,7 +6520,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -6558,7 +6558,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6575,7 +6575,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "x-example": "" }, "type": { @@ -6652,7 +6652,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -6690,7 +6690,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -6770,7 +6770,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -6808,7 +6808,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "schema": { "type": "string", @@ -6850,7 +6850,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -6887,7 +6887,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -6925,7 +6925,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -6994,7 +6994,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -7032,7 +7032,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7069,7 +7069,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } }, @@ -7137,7 +7137,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7175,7 +7175,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7209,7 +7209,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -7247,7 +7247,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7290,7 +7290,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7328,7 +7328,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "schema": { "type": "string", @@ -7366,7 +7366,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "x-example": null } } @@ -7399,7 +7399,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -7486,7 +7486,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -7497,7 +7497,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -7507,7 +7506,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -7639,7 +7637,7 @@ ], "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { - "200": { + "201": { "description": "Documents List", "content": { "application\/json": { @@ -7653,7 +7651,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -7668,6 +7666,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [], "Key": [] @@ -7746,7 +7762,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -7841,7 +7857,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -7933,7 +7949,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8009,14 +8025,14 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "tags": [ "databases" ], "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "content": { "application\/json": { @@ -8030,7 +8046,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8046,6 +8062,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [], "Session": [] @@ -8141,7 +8176,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8242,7 +8277,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8328,7 +8363,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -8340,8 +8375,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8353,9 +8386,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8407,7 +8438,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "x-example": null }, "min": { @@ -8445,7 +8476,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8457,8 +8488,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8470,9 +8499,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8562,7 +8589,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -8644,8 +8671,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -8774,7 +8801,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -8846,7 +8873,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8904,6 +8931,4544 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/tableList" + } + } + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "default": "" + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "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).", + "x-example": false + }, + "enabled": { + "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 + } + }, + "required": [ + "tableId", + "name" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/table" + } + } + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": false + }, + "enabled": { + "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 + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnList" + } + } + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnBoolean" + } + } + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnDatetime" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEmail" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnEnum" + } + } + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnFloat" + } + } + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnInteger" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIp" + } + } + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnString" + } + } + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnUrl" + } + } + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "content": { + "application\/json": { + "schema": { + "oneOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + } + } + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnRelationship" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndexList" + } + } + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/columnIndex" + } + } + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + } + } + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + } + } + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDeleteRows", + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null + } + } + } + } + } + } + } + }, "\/functions": { "get": { "summary": "List functions", @@ -8927,7 +13492,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -9001,7 +13566,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -9235,7 +13800,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -9285,7 +13850,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -9336,7 +13901,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -9396,7 +13961,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -9627,7 +14192,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -9689,7 +14254,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -9770,7 +14335,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -9854,7 +14419,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 429, "cookies": false, "type": "upload", "deprecated": false, @@ -9951,7 +14516,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -10037,7 +14602,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -10141,7 +14706,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -10239,7 +14804,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -10302,7 +14867,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -10367,7 +14932,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 436, "cookies": false, "type": "location", "deprecated": false, @@ -10458,7 +15023,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -10530,7 +15095,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -10607,7 +15172,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -10724,7 +15289,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -10791,7 +15356,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -10863,7 +15428,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -10923,7 +15488,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -11015,7 +15580,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -11085,7 +15650,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -11177,7 +15742,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -11249,7 +15814,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 255, "cookies": false, "type": "graphql", "deprecated": false, @@ -11303,7 +15868,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -11357,7 +15922,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -11407,7 +15972,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -11457,7 +16022,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -11507,7 +16072,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -11568,7 +16133,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -11618,7 +16183,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -11668,7 +16233,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -11731,7 +16296,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -11794,7 +16359,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -11868,7 +16433,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -11931,7 +16496,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -12020,7 +16585,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -12083,7 +16648,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -12146,7 +16711,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -12209,7 +16774,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -12272,7 +16837,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -12335,7 +16900,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -12398,7 +16963,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -12461,7 +17026,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -12524,7 +17089,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -12574,7 +17139,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -12624,7 +17189,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -12674,7 +17239,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -12728,7 +17293,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -12782,7 +17347,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -12836,7 +17401,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -12890,7 +17455,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -12944,7 +17509,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -12998,7 +17563,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -13052,7 +17617,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -13106,7 +17671,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -13183,7 +17748,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -13328,7 +17893,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -13475,7 +18040,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -13650,7 +18215,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -13829,7 +18394,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -13939,7 +18504,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -14052,7 +18617,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -14106,7 +18671,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -14169,7 +18734,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -14245,7 +18810,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -14321,7 +18886,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -14398,7 +18963,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -14504,7 +19069,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -14613,7 +19178,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -14699,7 +19264,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -14788,7 +19353,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -14904,7 +19469,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -15023,7 +19588,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -15119,7 +19684,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -15218,7 +19783,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -15324,7 +19889,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -15433,7 +19998,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -15577,7 +20142,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -15723,7 +20288,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -15819,7 +20384,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -15918,7 +20483,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -16014,7 +20579,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -16113,7 +20678,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -16209,7 +20774,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -16308,7 +20873,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -16404,7 +20969,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -16503,7 +21068,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -16557,7 +21122,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -16620,7 +21185,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -16696,7 +21261,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -16772,7 +21337,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -16847,7 +21412,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -16931,7 +21496,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -16992,7 +21557,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -17070,7 +21635,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -17133,7 +21698,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -17209,7 +21774,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -17294,7 +21859,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -17386,7 +21951,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -17450,7 +22015,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -17527,7 +22092,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -17598,7 +22163,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -17848,7 +22413,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 457, "cookies": false, "type": "", "deprecated": false, @@ -17898,7 +22463,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -17949,7 +22514,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -18009,7 +22574,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -18255,7 +22820,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -18317,7 +22882,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -18398,7 +22963,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -18482,7 +23047,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 458, "cookies": false, "type": "upload", "deprecated": false, @@ -18584,7 +23149,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -18665,7 +23230,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -18769,7 +23334,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -18868,7 +23433,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -18931,7 +23496,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 464, "cookies": false, "type": "", "deprecated": false, @@ -18996,7 +23561,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 465, "cookies": false, "type": "location", "deprecated": false, @@ -19087,7 +23652,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -19159,7 +23724,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -19231,7 +23796,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -19294,7 +23859,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -19366,7 +23931,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -19426,7 +23991,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -19518,7 +24083,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -19588,7 +24153,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -19680,7 +24245,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -19752,7 +24317,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -19826,7 +24391,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -19954,7 +24519,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20014,7 +24579,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -20139,7 +24704,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20201,7 +24766,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20289,7 +24854,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -20389,7 +24954,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20463,7 +25028,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20554,7 +25119,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20623,7 +25188,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -20703,7 +25268,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -20933,7 +25498,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -21020,7 +25585,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -21098,7 +25663,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21185,7 +25750,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -21249,7 +25814,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -21325,7 +25890,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21391,7 +25956,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21479,7 +26044,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21592,7 +26157,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21666,7 +26231,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21755,7 +26320,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21831,7 +26396,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21930,7 +26495,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -21992,7 +26557,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -22075,7 +26640,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -22156,7 +26721,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -22246,7 +26811,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -22307,7 +26872,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -22378,7 +26943,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 490, "cookies": false, "type": "", "deprecated": false, @@ -22441,7 +27006,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -22515,7 +27080,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22604,7 +27169,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22690,7 +27255,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -22776,7 +27341,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -22845,7 +27410,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -22907,7 +27472,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22993,7 +27558,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23079,7 +27644,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23195,7 +27760,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23299,7 +27864,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -23405,7 +27970,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23458,7 +28023,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -23520,7 +28085,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -23601,7 +28166,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -23684,7 +28249,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -23768,7 +28333,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -23843,7 +28408,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -23929,7 +28494,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -24003,7 +28568,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -24080,7 +28645,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -24142,7 +28707,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -24202,7 +28767,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -24262,7 +28827,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -24324,7 +28889,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -24405,7 +28970,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -24486,7 +29051,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -24567,7 +29132,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24627,7 +29192,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -24708,7 +29273,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -24768,7 +29333,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -24821,7 +29386,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -24876,7 +29441,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -24948,7 +29513,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -25029,7 +29594,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -25103,7 +29668,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -25214,7 +29779,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -25285,7 +29850,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -25375,7 +29940,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -25448,7 +30013,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -25531,7 +30096,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -25612,7 +30177,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25780,13 +30345,37 @@ "version" ] }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "$ref": "#\/components\/schemas\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25804,13 +30393,37 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "$ref": "#\/components\/schemas\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25834,7 +30447,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25858,7 +30471,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25876,13 +30489,37 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25906,7 +30543,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25930,7 +30567,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25954,7 +30591,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -25978,7 +30615,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26002,7 +30639,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26026,7 +30663,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26050,7 +30687,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26074,7 +30711,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26098,7 +30735,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26122,7 +30759,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26146,7 +30783,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26170,7 +30807,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26194,7 +30831,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26218,7 +30855,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26242,7 +30879,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26266,7 +30903,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26290,7 +30927,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26314,7 +30951,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26338,7 +30975,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26362,7 +30999,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26386,7 +31023,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26410,7 +31047,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26434,7 +31071,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26458,7 +31095,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26482,7 +31119,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26506,7 +31143,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26530,7 +31167,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -27483,6 +32120,903 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "$ref": "#\/components\/schemas\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "anyOf": [ + { + "$ref": "#\/components\/schemas\/columnBoolean" + }, + { + "$ref": "#\/components\/schemas\/columnInteger" + }, + { + "$ref": "#\/components\/schemas\/columnFloat" + }, + { + "$ref": "#\/components\/schemas\/columnEmail" + }, + { + "$ref": "#\/components\/schemas\/columnEnum" + }, + { + "$ref": "#\/components\/schemas\/columnUrl" + }, + { + "$ref": "#\/components\/schemas\/columnIp" + }, + { + "$ref": "#\/components\/schemas\/columnDatetime" + }, + { + "$ref": "#\/components\/schemas\/columnRelationship" + }, + { + "$ref": "#\/components\/schemas\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -27555,6 +33089,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 33fe1a93c9..84445b4af5 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -4510,7 +4510,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -4592,7 +4592,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4603,7 +4603,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -4613,7 +4612,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -4638,6 +4636,30 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4733,7 +4755,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4800,7 +4822,7 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -4813,7 +4835,7 @@ ], "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -4823,7 +4845,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -4839,6 +4861,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [] } @@ -4928,7 +4969,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -5025,7 +5066,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -5080,45 +5121,42 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", - "consumes": [ - "application\/json" - ], + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "consumes": [], "produces": [ "application\/json" ], "tags": [ - "databases" + "tables" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { "200": { - "description": "Document", + "description": "Rows List", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/rowList" } } }, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 116, + "method": "listRows", + "group": "rows", + "weight": 413, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/decrement-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", "platforms": [ - "console", - "server", "client", + "server", "server" ], "packaging": false, @@ -5143,26 +5181,147 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", "required": true, "type": "string", + "x-example": "", "in": "path" }, { @@ -5171,17 +5330,35 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "default": 1, - "x-example": null + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "" }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "default": null, - "x-example": null + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } } } @@ -5189,45 +5366,42 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", - "consumes": [ - "application\/json" - ], + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "consumes": [], "produces": [ "application\/json" ], "tags": [ - "databases" + "tables" ], - "description": "Increment a specific attribute of a document by a given value.", + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { "200": { - "description": "Document", + "description": "Row", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/row" } } }, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 115, + "method": "getRow", + "group": "rows", + "weight": 406, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/increment-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", "platforms": [ - "console", - "server", "client", + "server", "server" ], "packaging": false, @@ -5252,26 +5426,128 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "rowId", + "description": "Row ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", "in": "path" }, { @@ -5280,22 +5556,200 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "default": null, - "x-example": null + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } } } } } ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] } }, "\/functions\/{functionId}\/executions": { @@ -5321,7 +5775,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -5395,7 +5849,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -5512,7 +5966,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -5584,7 +6038,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 255, "cookies": false, "type": "graphql", "deprecated": false, @@ -5658,7 +6112,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -5730,7 +6184,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -5782,7 +6236,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -5834,7 +6288,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -5886,7 +6340,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -5938,7 +6392,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -5990,7 +6444,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -6042,7 +6496,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -6094,7 +6548,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -6148,7 +6602,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -6233,7 +6687,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -6304,7 +6758,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -6387,7 +6841,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -6477,7 +6931,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -6547,7 +7001,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -6636,7 +7090,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -6706,7 +7160,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -6785,7 +7239,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -6992,7 +7446,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -7071,7 +7525,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -7146,7 +7600,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -7236,7 +7690,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -7298,7 +7752,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -7373,7 +7827,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -7435,7 +7889,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -7518,7 +7972,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -7631,7 +8085,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -7701,7 +8155,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -7787,7 +8241,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -7859,7 +8313,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -7953,7 +8407,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -8014,7 +8468,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -8147,13 +8601,38 @@ "type": "object", "additionalProperties": true }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8178,7 +8657,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8203,7 +8682,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8228,7 +8707,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8253,7 +8732,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8278,7 +8757,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8303,7 +8782,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8328,7 +8807,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8353,7 +8832,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8378,7 +8857,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8403,7 +8882,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8428,7 +8907,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8453,7 +8932,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8478,7 +8957,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8497,6 +8976,63 @@ "localeCodes" ] }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index a11fd21b42..4ac2c7b317 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -4527,7 +4527,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 310, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -4590,7 +4590,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 434, + "weight": 481, "cookies": false, "type": "", "deprecated": false, @@ -4661,7 +4661,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 309, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -4709,7 +4709,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -4781,7 +4781,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4843,7 +4843,7 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesListUsages", "consumes": [], "produces": [ "application\/json" @@ -4861,13 +4861,13 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "listUsages", "group": null, - "weight": 121, + "weight": 324, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", + "demo": "databases\/list-usages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -4889,7 +4889,7 @@ "parameters": [ { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "type": "string", "x-example": "24h", @@ -4898,12 +4898,8 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], + "x-enum-name": null, + "x-enum-keys": [], "default": "30d", "in": "query" } @@ -4933,7 +4929,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4992,7 +4988,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -5070,7 +5066,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -5129,7 +5125,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -5186,7 +5182,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "consumes": [ "application\/json" @@ -5209,7 +5205,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -5314,7 +5310,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -5381,7 +5377,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -5482,7 +5478,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -5549,7 +5545,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5584,7 +5580,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5630,7 +5626,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5665,7 +5661,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -5736,7 +5732,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5771,7 +5767,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5844,7 +5840,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5879,7 +5875,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5927,7 +5923,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "consumes": [ "application\/json" @@ -5950,7 +5946,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5985,7 +5981,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6058,7 +6054,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -6093,7 +6089,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6164,7 +6160,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -6199,7 +6195,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6233,7 +6229,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6260,7 +6256,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -6272,12 +6268,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 353, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -6307,7 +6303,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6327,7 +6323,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "default": null, "x-example": null, "items": { @@ -6388,7 +6384,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6423,7 +6419,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6444,7 +6440,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "default": null, "x-example": null, "items": { @@ -6466,7 +6462,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6506,7 +6502,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6541,7 +6537,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6567,19 +6563,19 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null }, @@ -6624,7 +6620,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6659,7 +6655,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6686,26 +6682,26 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6744,7 +6740,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6779,7 +6775,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6805,19 +6801,19 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -6862,7 +6858,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6897,7 +6893,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6924,26 +6920,26 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6982,7 +6978,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -7017,7 +7013,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7043,7 +7039,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -7088,7 +7084,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -7123,7 +7119,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7150,14 +7146,14 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7196,7 +7192,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7231,7 +7227,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7245,7 +7241,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "default": null, "x-example": "" }, @@ -7329,7 +7325,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7364,7 +7360,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -7448,7 +7444,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7483,7 +7479,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -7523,7 +7519,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7562,7 +7558,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7597,7 +7593,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7668,7 +7664,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -7703,7 +7699,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7737,7 +7733,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7805,7 +7801,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7840,7 +7836,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7874,7 +7870,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -7909,7 +7905,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7950,7 +7946,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7985,7 +7981,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -8019,7 +8015,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -8052,7 +8048,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -8134,7 +8130,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8145,7 +8141,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -8155,7 +8150,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -8289,7 +8283,7 @@ ], "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { - "200": { + "201": { "description": "Documents List", "schema": { "$ref": "#\/definitions\/documentList" @@ -8299,7 +8293,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8314,6 +8308,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [] } @@ -8388,7 +8400,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8480,7 +8492,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8566,7 +8578,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8633,7 +8645,7 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -8646,7 +8658,7 @@ ], "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -8656,7 +8668,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8672,6 +8684,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [] } @@ -8761,7 +8792,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8858,7 +8889,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8936,7 +8967,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 112, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -9024,7 +9055,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -9036,8 +9067,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -9048,8 +9077,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9092,7 +9120,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "default": 1, "x-example": null }, @@ -9133,7 +9161,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -9145,8 +9173,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -9157,8 +9183,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9240,7 +9265,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -9318,8 +9343,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -9446,7 +9471,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9515,7 +9540,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9589,7 +9614,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 79, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -9667,7 +9692,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 123, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -9753,7 +9778,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 73, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -9800,10 +9825,4656 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "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).", + "default": false, + "x-example": false + }, + "enabled": { + "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "databasesListTableLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listTableLogs", + "group": "tables", + "weight": 376, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesListRowLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 414, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesGetTableUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "schema": { + "$ref": "#\/definitions\/usageTable" + } + } + }, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "30d", + "in": "query" + }, + { + "name": "tableId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", + "operationId": "databasesGetUsage", "consumes": [], "produces": [ "application\/json" @@ -9821,13 +14492,13 @@ } }, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "getUsage", "group": null, - "weight": 122, + "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-database-usage.md", + "demo": "databases\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -9857,7 +14528,7 @@ }, { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "type": "string", "x-example": "24h", @@ -9901,7 +14572,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -9973,7 +14644,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -10224,7 +14895,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -10273,7 +14944,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -10323,7 +14994,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 404, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -10417,7 +15088,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 403, + "weight": 450, "cookies": false, "type": "", "deprecated": false, @@ -10475,7 +15146,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 397, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -10545,7 +15216,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -10604,7 +15275,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -10851,7 +15522,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -10912,7 +15583,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -10989,7 +15660,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -11069,7 +15740,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 429, "cookies": false, "type": "upload", "deprecated": false, @@ -11161,7 +15832,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -11246,7 +15917,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -11352,7 +16023,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -11448,7 +16119,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -11510,7 +16181,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -11577,7 +16248,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 436, "cookies": false, "type": "location", "deprecated": false, @@ -11663,7 +16334,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -11730,7 +16401,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -11804,7 +16475,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -11921,7 +16592,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -11986,7 +16657,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -12053,7 +16724,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 396, + "weight": 443, "cookies": false, "type": "", "deprecated": false, @@ -12131,7 +16802,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -12190,7 +16861,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -12280,7 +16951,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -12347,7 +17018,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -12439,7 +17110,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -12508,7 +17179,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 255, "cookies": false, "type": "graphql", "deprecated": false, @@ -12582,7 +17253,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -12654,7 +17325,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -12703,7 +17374,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -12752,7 +17423,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -12801,7 +17472,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -12859,7 +17530,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -12908,7 +17579,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -12957,7 +17628,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -13017,7 +17688,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -13077,7 +17748,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -13146,7 +17817,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -13206,7 +17877,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -13290,7 +17961,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -13350,7 +18021,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -13410,7 +18081,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -13470,7 +18141,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -13530,7 +18201,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -13590,7 +18261,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -13650,7 +18321,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -13710,7 +18381,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -13770,7 +18441,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -13819,7 +18490,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -13868,7 +18539,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -13917,7 +18588,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -13969,7 +18640,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -14021,7 +18692,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -14073,7 +18744,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -14125,7 +18796,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -14177,7 +18848,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -14229,7 +18900,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -14281,7 +18952,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -14333,7 +19004,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -14408,7 +19079,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -14566,7 +19237,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -14721,7 +19392,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -14916,7 +19587,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -15110,7 +19781,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -15228,7 +19899,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -15342,7 +20013,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -15397,7 +20068,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -15457,7 +20128,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -15529,7 +20200,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -15601,7 +20272,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -15676,7 +20347,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -15791,7 +20462,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -15904,7 +20575,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -15995,7 +20666,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -16084,7 +20755,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -16211,7 +20882,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -16336,7 +21007,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -16439,7 +21110,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -16540,7 +21211,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -16655,7 +21326,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -16768,7 +21439,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -16927,7 +21598,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -17083,7 +21754,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -17186,7 +21857,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -17287,7 +21958,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -17390,7 +22061,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -17491,7 +22162,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -17594,7 +22265,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -17695,7 +22366,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -17798,7 +22469,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -17897,7 +22568,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -17952,7 +22623,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -18012,7 +22683,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -18084,7 +22755,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -18156,7 +22827,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -18229,7 +22900,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -18317,7 +22988,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -18377,7 +23048,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -18456,7 +23127,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -18516,7 +23187,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -18588,7 +23259,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -18669,7 +23340,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -18757,7 +23428,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -18820,7 +23491,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -18891,7 +23562,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 316, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -18964,7 +23635,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 311, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -19056,7 +23727,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 318, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -19144,7 +23815,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 315, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -19228,7 +23899,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 312, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -19306,7 +23977,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 319, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -19377,7 +24048,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 314, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -19496,7 +24167,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 321, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -19616,7 +24287,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 313, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -19728,7 +24399,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 320, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -19839,7 +24510,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 317, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -19897,7 +24568,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 322, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -19950,7 +24621,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 323, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -20008,7 +24679,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 202, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -20090,7 +24761,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 204, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -20138,7 +24809,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 203, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -20219,7 +24890,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 205, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20277,7 +24948,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 206, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20360,7 +25031,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 207, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20418,7 +25089,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 157, + "weight": 103, "cookies": false, "type": "", "deprecated": false, @@ -20489,7 +25160,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 156, + "weight": 102, "cookies": false, "type": "", "deprecated": false, @@ -20636,7 +25307,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 158, + "weight": 104, "cookies": false, "type": "", "deprecated": false, @@ -20694,7 +25365,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 159, + "weight": 105, "cookies": false, "type": "", "deprecated": false, @@ -20819,7 +25490,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 176, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -20879,7 +25550,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 163, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -20971,7 +25642,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 164, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -21049,7 +25720,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 169, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -21127,7 +25798,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 168, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -21205,7 +25876,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 174, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -21283,7 +25954,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 167, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -21375,7 +26046,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 175, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -21456,7 +26127,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 172, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -21534,7 +26205,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 171, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -21612,7 +26283,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 173, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -21690,7 +26361,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 166, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -21743,6 +26414,84 @@ ] } }, + "\/projects\/{projectId}\/auth\/session-invalidation": { + "patch": { + "summary": "Update invalidate session option of the project", + "operationId": "projectsUpdateSessionInvalidation", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateSessionInvalidation", + "group": "auth", + "weight": 148, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-session-invalidation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-invalidation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -21768,7 +26517,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 170, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -21863,7 +26612,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 373, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -21933,7 +26682,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 370, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -22016,7 +26765,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 372, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -22082,7 +26831,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 371, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -22168,7 +26917,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 374, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -22236,7 +26985,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 188, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -22321,7 +27070,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 184, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -22379,7 +27128,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 183, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -22471,7 +27220,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 185, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -22537,7 +27286,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 186, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -22632,7 +27381,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 187, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -22700,7 +27449,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 165, + "weight": 111, "cookies": false, "type": "", "deprecated": false, @@ -22838,7 +27587,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 190, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -22896,7 +27645,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 189, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -23016,7 +27765,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 191, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -23082,7 +27831,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 192, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -23179,7 +27928,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 193, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -23247,7 +27996,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 161, + "weight": 107, "cookies": false, "type": "", "deprecated": false, @@ -23348,7 +28097,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 162, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -23426,7 +28175,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 194, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -23555,7 +28304,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 195, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -23693,7 +28442,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 160, + "weight": 106, "cookies": false, "type": "", "deprecated": false, @@ -23769,7 +28518,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 197, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -23989,7 +28738,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 199, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -24252,7 +29001,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 201, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -24472,7 +29221,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 196, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -24689,7 +29438,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 198, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -24924,7 +29673,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 200, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -25141,7 +29890,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 178, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -25199,7 +29948,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 177, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -25317,7 +30066,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 179, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -25383,7 +30132,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 180, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -25504,7 +30253,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 182, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -25572,7 +30321,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 181, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -25638,7 +30387,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 294, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -25711,7 +30460,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 435, + "weight": 482, "cookies": false, "type": "", "deprecated": false, @@ -25781,7 +30530,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 437, + "weight": 484, "cookies": false, "type": "", "deprecated": false, @@ -25864,7 +30613,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 438, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -25984,7 +30733,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 436, + "weight": 483, "cookies": false, "type": "", "deprecated": false, @@ -26065,7 +30814,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 295, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -26118,7 +30867,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 296, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -26178,7 +30927,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 297, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -26236,7 +30985,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -26308,7 +31057,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -26575,7 +31324,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 457, "cookies": false, "type": "", "deprecated": false, @@ -26624,7 +31373,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -26674,7 +31423,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 429, + "weight": 476, "cookies": false, "type": "", "deprecated": false, @@ -26768,7 +31517,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 430, + "weight": 477, "cookies": false, "type": "", "deprecated": false, @@ -26826,7 +31575,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 431, + "weight": 478, "cookies": false, "type": "", "deprecated": false, @@ -26896,7 +31645,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -26955,7 +31704,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -27217,7 +31966,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -27278,7 +32027,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -27355,7 +32104,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -27435,7 +32184,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 458, "cookies": false, "type": "upload", "deprecated": false, @@ -27535,7 +32284,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -27614,7 +32363,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -27720,7 +32469,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -27817,7 +32566,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -27879,7 +32628,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 464, "cookies": false, "type": "", "deprecated": false, @@ -27946,7 +32695,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 465, "cookies": false, "type": "location", "deprecated": false, @@ -28032,7 +32781,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -28099,7 +32848,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -28170,7 +32919,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -28234,7 +32983,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -28301,7 +33050,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 432, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -28379,7 +33128,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -28438,7 +33187,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -28528,7 +33277,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -28595,7 +33344,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -28687,7 +33436,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -28754,7 +33503,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -28826,7 +33575,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -28963,7 +33712,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -29022,7 +33771,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -29155,7 +33904,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -29214,7 +33963,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -29297,7 +34046,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -29387,7 +34136,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -29457,7 +34206,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -29546,7 +34295,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -29616,7 +34365,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -29695,7 +34444,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -29902,7 +34651,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -29981,7 +34730,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 222, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -30051,7 +34800,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 223, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -30129,7 +34878,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -30204,7 +34953,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -30294,7 +35043,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -30356,7 +35105,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -30431,7 +35180,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -30493,7 +35242,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 237, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -30563,7 +35312,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -30646,7 +35395,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -30759,7 +35508,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -30829,7 +35578,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -30915,7 +35664,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -30987,7 +35736,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -31080,7 +35829,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -31140,7 +35889,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -31218,7 +35967,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -31298,7 +36047,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -31382,7 +36131,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -31442,7 +36191,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -31513,7 +36262,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 490, "cookies": false, "type": "", "deprecated": false, @@ -31573,7 +36322,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -31645,7 +36394,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -31740,7 +36489,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -31831,7 +36580,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -31920,7 +36669,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -31989,7 +36738,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -32050,7 +36799,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -32141,7 +36890,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -32232,7 +36981,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -32358,7 +37107,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -32470,7 +37219,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -32580,7 +37329,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 280, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -32650,7 +37399,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -32704,7 +37453,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -32765,7 +37514,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -32844,7 +37593,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -32926,7 +37675,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -33006,7 +37755,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -33077,7 +37826,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -33159,7 +37908,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -33233,7 +37982,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -33305,7 +38054,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -33364,7 +38113,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -33423,7 +38172,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -33482,7 +38231,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -33543,7 +38292,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -33622,7 +38371,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -33701,7 +38450,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -33778,7 +38527,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -33837,7 +38586,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -33914,7 +38663,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -33973,7 +38722,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -34027,7 +38776,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -34083,7 +38832,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -34152,7 +38901,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -34229,7 +38978,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -34301,7 +39050,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -34412,7 +39161,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -34480,7 +39229,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -34570,7 +39319,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -34640,7 +39389,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -34722,7 +39471,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -34801,7 +39550,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -34880,7 +39629,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 284, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -34975,7 +39724,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 285, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -35056,7 +39805,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 286, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -35139,7 +39888,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 287, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -35205,7 +39954,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 288, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -35271,7 +40020,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 283, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -35319,6 +40068,15 @@ "x-example": "", "default": "", "in": "query" + }, + { + "name": "providerReference", + "description": "Git reference (branch, tag, commit) to get contents from", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" } ] } @@ -35345,7 +40103,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 293, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -35429,7 +40187,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 290, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -35500,7 +40258,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 291, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -35553,7 +40311,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 292, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -35665,13 +40423,38 @@ "type": "object", "additionalProperties": true }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35690,13 +40473,38 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35721,7 +40529,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35746,7 +40554,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35765,13 +40573,38 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35796,7 +40629,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35821,7 +40654,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35846,7 +40679,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35871,7 +40704,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35896,7 +40729,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35921,7 +40754,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35946,7 +40779,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35971,7 +40804,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35996,7 +40829,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36021,7 +40854,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36046,7 +40879,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36071,7 +40904,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36096,7 +40929,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of installations documents that matched your query.", + "description": "Total number of installations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36121,7 +40954,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworkProviderRepositories documents that matched your query.", + "description": "Total number of frameworkProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36146,7 +40979,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimeProviderRepositories documents that matched your query.", + "description": "Total number of runtimeProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36171,7 +41004,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of branches documents that matched your query.", + "description": "Total number of branches rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36196,7 +41029,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36221,7 +41054,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36246,7 +41079,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36271,7 +41104,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36296,7 +41129,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of projects documents that matched your query.", + "description": "Total number of projects rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36321,7 +41154,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of webhooks documents that matched your query.", + "description": "Total number of webhooks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36346,7 +41179,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of keys documents that matched your query.", + "description": "Total number of keys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36371,7 +41204,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of devKeys documents that matched your query.", + "description": "Total number of devKeys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36396,7 +41229,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of platforms documents that matched your query.", + "description": "Total number of platforms rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36421,7 +41254,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36446,7 +41279,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36471,7 +41304,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36496,7 +41329,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36521,7 +41354,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36546,7 +41379,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36571,7 +41404,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rules documents that matched your query.", + "description": "Total number of rules rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36596,7 +41429,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36621,7 +41454,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36646,7 +41479,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36671,7 +41504,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36696,7 +41529,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36721,7 +41554,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36746,7 +41579,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of migrations documents that matched your query.", + "description": "Total number of migrations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36771,7 +41604,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36796,7 +41629,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of contents documents that matched your query.", + "description": "Total number of contents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -37751,6 +42584,904 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -37823,6 +43554,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", @@ -40732,6 +46592,11 @@ "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true }, + "authInvalidateSessions": { + "type": "boolean", + "description": "Whether or not all existing sessions should be invalidated on password change", + "x-example": true + }, "oAuthProviders": { "type": "array", "description": "List of Auth Providers.", @@ -40958,6 +46823,7 @@ "authMembershipsUserName", "authMembershipsUserEmail", "authMembershipsMfa", + "authInvalidateSessions", "oAuthProviders", "platforms", "webhooks", @@ -41030,7 +46896,10 @@ "items": { "type": "string" }, - "x-example": "database.collections.update" + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] }, "security": { "type": "boolean", @@ -41749,12 +47618,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total databases storage in bytes.", @@ -41791,6 +47672,15 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41800,6 +47690,15 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "An array of the aggregated number of databases storage in bytes per period.", @@ -41832,13 +47731,17 @@ "range", "databasesTotal", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databasesReadsTotal", "databasesWritesTotal", "databases", "collections", + "tables", "documents", + "rows", "storage", "databasesReads", "databasesWrites" @@ -41859,12 +47762,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total storage used in bytes.", @@ -41892,6 +47807,15 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41901,6 +47825,15 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "Aggregated storage used in bytes per period.", @@ -41932,17 +47865,52 @@ "required": [ "range", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databaseReadsTotal", "databaseWritesTotal", "collections", + "tables", "documents", + "rows", "storage", "databaseReads", "databaseWrites" ] }, + "usageTable": { + "description": "UsageTable", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of of rows.", + "x-example": 0, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "rowsTotal", + "rows" + ] + }, "usageCollection": { "description": "UsageCollection", "type": "object", @@ -43122,6 +49090,12 @@ "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "databasesTotal": { "type": "integer", "description": "Total aggregated number of databases.", @@ -43342,6 +49316,7 @@ "required": [ "executionsTotal", "documentsTotal", + "rowsTotal", "databasesTotal", "databasesStorageTotal", "usersTotal", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 7c15f9e5ea..215735cdb9 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -4215,7 +4215,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -4288,7 +4288,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4371,7 +4371,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4431,7 +4431,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4510,7 +4510,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4570,7 +4570,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -4628,7 +4628,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "consumes": [ "application\/json" @@ -4651,7 +4651,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -4757,7 +4757,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -4825,7 +4825,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -4927,7 +4927,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4995,7 +4995,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5031,7 +5031,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5077,7 +5077,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5113,7 +5113,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -5184,7 +5184,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5220,7 +5220,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5293,7 +5293,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5329,7 +5329,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5377,7 +5377,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "consumes": [ "application\/json" @@ -5400,7 +5400,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5436,7 +5436,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5509,7 +5509,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5545,7 +5545,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5616,7 +5616,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5652,7 +5652,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5686,7 +5686,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -5713,7 +5713,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -5725,12 +5725,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 353, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5761,7 +5761,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5781,7 +5781,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "default": null, "x-example": null, "items": { @@ -5842,7 +5842,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -5878,7 +5878,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5899,7 +5899,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "default": null, "x-example": null, "items": { @@ -5921,7 +5921,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -5961,7 +5961,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -5997,7 +5997,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6023,19 +6023,19 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null }, @@ -6080,7 +6080,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6116,7 +6116,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6143,26 +6143,26 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6201,7 +6201,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6237,7 +6237,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6263,19 +6263,19 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -6320,7 +6320,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6356,7 +6356,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6383,26 +6383,26 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6441,7 +6441,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6477,7 +6477,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6503,7 +6503,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -6548,7 +6548,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6584,7 +6584,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6611,14 +6611,14 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6657,7 +6657,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -6693,7 +6693,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6707,7 +6707,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "default": null, "x-example": "" }, @@ -6791,7 +6791,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -6827,7 +6827,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -6911,7 +6911,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -6947,7 +6947,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -6987,7 +6987,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7026,7 +7026,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7062,7 +7062,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7133,7 +7133,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -7169,7 +7169,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7203,7 +7203,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7271,7 +7271,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7307,7 +7307,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7341,7 +7341,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -7377,7 +7377,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7418,7 +7418,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7454,7 +7454,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7488,7 +7488,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7521,7 +7521,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -7605,7 +7605,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -7616,7 +7616,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -7626,7 +7625,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -7762,7 +7760,7 @@ ], "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { - "200": { + "201": { "description": "Documents List", "schema": { "$ref": "#\/definitions\/documentList" @@ -7772,7 +7770,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -7787,6 +7785,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [], "Key": [] @@ -7862,7 +7878,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -7955,7 +7971,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8042,7 +8058,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8111,7 +8127,7 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -8124,7 +8140,7 @@ ], "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -8134,7 +8150,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8150,6 +8166,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [], "Session": [] @@ -8241,7 +8276,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8340,7 +8375,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8422,7 +8457,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -8434,8 +8469,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8447,9 +8480,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8492,7 +8523,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "default": 1, "x-example": null }, @@ -8533,7 +8564,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8545,8 +8576,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8558,9 +8587,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8642,7 +8669,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -8721,8 +8748,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -8850,7 +8877,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -8920,7 +8947,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8972,6 +8999,4455 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "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).", + "default": false, + "x-example": false + }, + "enabled": { + "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, "\/functions": { "get": { "summary": "List functions", @@ -8995,7 +13471,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -9068,7 +13544,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -9320,7 +13796,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -9370,7 +13846,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -9421,7 +13897,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -9481,7 +13957,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -9729,7 +14205,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -9791,7 +14267,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -9869,7 +14345,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -9950,7 +14426,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 429, "cookies": false, "type": "upload", "deprecated": false, @@ -10043,7 +14519,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -10129,7 +14605,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -10236,7 +14712,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -10333,7 +14809,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -10396,7 +14872,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -10464,7 +14940,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 436, "cookies": false, "type": "location", "deprecated": false, @@ -10551,7 +15027,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -10619,7 +15095,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -10695,7 +15171,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -10814,7 +15290,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -10881,7 +15357,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -10949,7 +15425,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -11009,7 +15485,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -11100,7 +15576,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -11168,7 +15644,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -11261,7 +15737,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -11331,7 +15807,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 255, "cookies": false, "type": "graphql", "deprecated": false, @@ -11407,7 +15883,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -11481,7 +15957,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -11531,7 +16007,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -11581,7 +16057,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -11631,7 +16107,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -11690,7 +16166,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -11740,7 +16216,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -11790,7 +16266,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -11851,7 +16327,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -11912,7 +16388,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -11982,7 +16458,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -12043,7 +16519,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -12128,7 +16604,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -12189,7 +16665,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -12250,7 +16726,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -12311,7 +16787,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -12372,7 +16848,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -12433,7 +16909,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -12494,7 +16970,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -12555,7 +17031,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -12616,7 +17092,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -12666,7 +17142,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -12716,7 +17192,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -12766,7 +17242,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -12820,7 +17296,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -12874,7 +17350,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -12928,7 +17404,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -12982,7 +17458,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -13036,7 +17512,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -13090,7 +17566,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -13144,7 +17620,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -13198,7 +17674,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -13274,7 +17750,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -13433,7 +17909,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -13589,7 +18065,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -13785,7 +18261,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -13980,7 +18456,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -14099,7 +18575,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -14214,7 +18690,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -14270,7 +18746,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -14331,7 +18807,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -14404,7 +18880,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -14477,7 +18953,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -14553,7 +19029,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -14669,7 +19145,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -14783,7 +19259,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -14875,7 +19351,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -14965,7 +19441,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -15093,7 +19569,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -15219,7 +19695,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -15323,7 +19799,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -15425,7 +19901,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -15541,7 +20017,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -15655,7 +20131,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -15815,7 +20291,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -15972,7 +20448,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -16076,7 +20552,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -16178,7 +20654,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -16282,7 +20758,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -16384,7 +20860,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -16488,7 +20964,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -16590,7 +21066,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -16694,7 +21170,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -16794,7 +21270,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -16850,7 +21326,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -16911,7 +21387,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -16984,7 +21460,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -17057,7 +21533,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -17131,7 +21607,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -17220,7 +21696,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -17281,7 +21757,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -17361,7 +21837,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -17422,7 +21898,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -17495,7 +21971,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -17577,7 +22053,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -17667,7 +22143,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -17731,7 +22207,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -17804,7 +22280,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -17877,7 +22353,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -18145,7 +22621,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 457, "cookies": false, "type": "", "deprecated": false, @@ -18195,7 +22671,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -18246,7 +22722,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -18306,7 +22782,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -18569,7 +23045,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -18631,7 +23107,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -18709,7 +23185,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -18790,7 +23266,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 458, "cookies": false, "type": "upload", "deprecated": false, @@ -18891,7 +23367,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -18971,7 +23447,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -19078,7 +23554,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -19176,7 +23652,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -19239,7 +23715,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 464, "cookies": false, "type": "", "deprecated": false, @@ -19307,7 +23783,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 465, "cookies": false, "type": "location", "deprecated": false, @@ -19394,7 +23870,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -19462,7 +23938,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -19534,7 +24010,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -19599,7 +24075,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -19667,7 +24143,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -19727,7 +24203,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -19818,7 +24294,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -19886,7 +24362,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -19979,7 +24455,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -20047,7 +24523,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -20120,7 +24596,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -20258,7 +24734,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20318,7 +24794,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -20452,7 +24928,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20512,7 +24988,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20597,7 +25073,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -20689,7 +25165,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20761,7 +25237,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20852,7 +25328,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20924,7 +25400,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -21005,7 +25481,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -21214,7 +25690,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -21295,7 +25771,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -21372,7 +25848,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21464,7 +25940,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -21528,7 +26004,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -21605,7 +26081,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21669,7 +26145,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21754,7 +26230,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21869,7 +26345,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21941,7 +26417,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -22029,7 +26505,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -22103,7 +26579,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -22198,7 +26674,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -22260,7 +26736,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -22340,7 +26816,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -22421,7 +26897,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -22506,7 +26982,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -22567,7 +27043,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -22639,7 +27115,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 490, "cookies": false, "type": "", "deprecated": false, @@ -22700,7 +27176,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -22773,7 +27249,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22869,7 +27345,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22961,7 +27437,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -23051,7 +27527,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -23121,7 +27597,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -23183,7 +27659,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -23275,7 +27751,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23367,7 +27843,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23494,7 +27970,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23607,7 +28083,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -23718,7 +28194,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23773,7 +28249,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -23835,7 +28311,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -23915,7 +28391,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -23998,7 +28474,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -24079,7 +28555,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -24151,7 +28627,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -24234,7 +28710,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -24309,7 +28785,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -24382,7 +28858,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -24442,7 +28918,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -24502,7 +28978,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -24562,7 +29038,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -24624,7 +29100,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -24704,7 +29180,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -24784,7 +29260,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -24862,7 +29338,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24922,7 +29398,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -25000,7 +29476,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -25060,7 +29536,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -25115,7 +29591,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -25172,7 +29648,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -25242,7 +29718,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -25320,7 +29796,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -25393,7 +29869,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -25505,7 +29981,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -25574,7 +30050,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -25665,7 +30141,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -25736,7 +30212,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -25819,7 +30295,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -25899,7 +30375,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -26031,13 +30507,38 @@ "type": "object", "additionalProperties": true }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26056,13 +30557,38 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26087,7 +30613,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26112,7 +30638,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26131,13 +30657,38 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26162,7 +30713,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26187,7 +30738,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26212,7 +30763,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26237,7 +30788,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26262,7 +30813,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26287,7 +30838,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26312,7 +30863,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26337,7 +30888,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26362,7 +30913,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26387,7 +30938,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26412,7 +30963,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26437,7 +30988,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26462,7 +31013,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26487,7 +31038,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26512,7 +31063,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26537,7 +31088,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26562,7 +31113,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26587,7 +31138,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26612,7 +31163,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26637,7 +31188,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26662,7 +31213,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26687,7 +31238,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26712,7 +31263,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26737,7 +31288,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26762,7 +31313,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26787,7 +31338,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26812,7 +31363,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -27767,6 +32318,904 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -27839,6 +33288,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index e369e2f0f3..84445b4af5 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4510,7 +4510,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -4592,7 +4592,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4603,7 +4603,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -4613,7 +4612,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -4642,6 +4640,7 @@ { "name": "createDocuments", "auth": { + "Admin": [], "Key": [] }, "parameters": [ @@ -4756,7 +4755,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4823,7 +4822,7 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -4836,7 +4835,7 @@ ], "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -4846,7 +4845,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -4862,6 +4861,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [] } @@ -4951,7 +4969,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -5048,7 +5066,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -5103,45 +5121,42 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/decrement": { - "patch": { - "summary": "Decrement document attribute", - "operationId": "databasesDecrementDocumentAttribute", - "consumes": [ - "application\/json" - ], + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "consumes": [], "produces": [ "application\/json" ], "tags": [ - "databases" + "tables" ], - "description": "Decrement a specific attribute of a document by a given value.", + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { "200": { - "description": "Document", + "description": "Rows List", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/rowList" } } }, "x-appwrite": { - "method": "decrementDocumentAttribute", - "group": "documents", - "weight": 116, + "method": "listRows", + "group": "rows", + "weight": 413, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/decrement-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", "platforms": [ - "console", - "server", "client", + "server", "server" ], "packaging": false, @@ -5166,26 +5181,147 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", "required": true, "type": "string", + "x-example": "", "in": "path" }, { @@ -5194,17 +5330,35 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", - "default": 1, - "x-example": null + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "" }, - "min": { - "type": "number", - "description": "Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.", + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "default": null, - "x-example": null + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } } } } @@ -5212,45 +5366,42 @@ ] } }, - "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/{attribute}\/increment": { - "patch": { - "summary": "Increment document attribute", - "operationId": "databasesIncrementDocumentAttribute", - "consumes": [ - "application\/json" - ], + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "consumes": [], "produces": [ "application\/json" ], "tags": [ - "databases" + "tables" ], - "description": "Increment a specific attribute of a document by a given value.", + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { "200": { - "description": "Document", + "description": "Row", "schema": { - "$ref": "#\/definitions\/document" + "$ref": "#\/definitions\/row" } } }, "x-appwrite": { - "method": "incrementDocumentAttribute", - "group": "documents", - "weight": 115, + "method": "getRow", + "group": "rows", + "weight": 406, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/increment-document-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", "platforms": [ - "console", - "server", "client", + "server", "server" ], "packaging": false, @@ -5275,26 +5426,128 @@ "in": "path" }, { - "name": "collectionId", - "description": "Collection ID.", + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "documentId", - "description": "Document ID.", + "name": "rowId", + "description": "Row ID.", "required": true, "type": "string", - "x-example": "", + "x-example": "", "in": "path" }, { - "name": "attribute", - "description": "Attribute key.", + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", "required": true, "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", "in": "path" }, { @@ -5303,22 +5556,200 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the attribute by. The value must be a number.", - "default": 1, - "x-example": null + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" }, - "max": { - "type": "number", - "description": "Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.", + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "default": null, - "x-example": null + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } } } } } ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] } }, "\/functions\/{functionId}\/executions": { @@ -5344,7 +5775,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -5418,7 +5849,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -5535,7 +5966,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -5607,7 +6038,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 255, "cookies": false, "type": "graphql", "deprecated": false, @@ -5681,7 +6112,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -5753,7 +6184,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -5805,7 +6236,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -5857,7 +6288,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -5909,7 +6340,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -5961,7 +6392,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -6013,7 +6444,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -6065,7 +6496,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -6117,7 +6548,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -6171,7 +6602,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -6256,7 +6687,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -6327,7 +6758,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -6410,7 +6841,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -6500,7 +6931,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -6570,7 +7001,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -6659,7 +7090,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -6729,7 +7160,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -6808,7 +7239,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -7015,7 +7446,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -7094,7 +7525,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -7169,7 +7600,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -7259,7 +7690,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -7321,7 +7752,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -7396,7 +7827,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -7458,7 +7889,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -7541,7 +7972,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -7654,7 +8085,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -7724,7 +8155,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -7810,7 +8241,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -7882,7 +8313,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -7976,7 +8407,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -8037,7 +8468,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -8170,13 +8601,38 @@ "type": "object", "additionalProperties": true }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8201,7 +8657,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8226,7 +8682,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8251,7 +8707,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8276,7 +8732,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8301,7 +8757,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8326,7 +8782,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8351,7 +8807,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8376,7 +8832,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8401,7 +8857,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8426,7 +8882,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8451,7 +8907,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8476,7 +8932,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8501,7 +8957,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -8520,6 +8976,63 @@ "localeCodes" ] }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index da959a8180..4ac2c7b317 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4527,7 +4527,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 310, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -4590,7 +4590,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 434, + "weight": 481, "cookies": false, "type": "", "deprecated": false, @@ -4661,7 +4661,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 309, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -4709,7 +4709,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -4781,7 +4781,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4843,7 +4843,7 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesListUsages", "consumes": [], "produces": [ "application\/json" @@ -4861,13 +4861,13 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "listUsages", "group": null, - "weight": 121, + "weight": 324, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", + "demo": "databases\/list-usages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -4889,7 +4889,7 @@ "parameters": [ { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "type": "string", "x-example": "24h", @@ -4898,12 +4898,8 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", - "x-enum-keys": [ - "Twenty Four Hours", - "Thirty Days", - "Ninety Days" - ], + "x-enum-name": null, + "x-enum-keys": [], "default": "30d", "in": "query" } @@ -4933,7 +4929,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4992,7 +4988,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -5070,7 +5066,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -5129,7 +5125,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -5186,7 +5182,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "consumes": [ "application\/json" @@ -5209,7 +5205,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -5314,7 +5310,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -5381,7 +5377,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -5482,7 +5478,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -5549,7 +5545,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5584,7 +5580,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5630,7 +5626,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5665,7 +5661,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -5736,7 +5732,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5771,7 +5767,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5844,7 +5840,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5879,7 +5875,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5927,7 +5923,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "consumes": [ "application\/json" @@ -5950,7 +5946,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5985,7 +5981,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6058,7 +6054,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -6093,7 +6089,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6164,7 +6160,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -6199,7 +6195,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6233,7 +6229,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6260,7 +6256,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -6272,12 +6268,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 353, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -6307,7 +6303,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6327,7 +6323,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "default": null, "x-example": null, "items": { @@ -6388,7 +6384,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6423,7 +6419,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6444,7 +6440,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "default": null, "x-example": null, "items": { @@ -6466,7 +6462,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6506,7 +6502,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6541,7 +6537,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6567,19 +6563,19 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null }, @@ -6624,7 +6620,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6659,7 +6655,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6686,26 +6682,26 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6744,7 +6740,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6779,7 +6775,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6805,19 +6801,19 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -6862,7 +6858,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6897,7 +6893,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6924,26 +6920,26 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6982,7 +6978,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -7017,7 +7013,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7043,7 +7039,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -7088,7 +7084,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -7123,7 +7119,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7150,14 +7146,14 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7196,7 +7192,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7231,7 +7227,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7245,7 +7241,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "default": null, "x-example": "" }, @@ -7329,7 +7325,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7364,7 +7360,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -7448,7 +7444,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7483,7 +7479,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -7523,7 +7519,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7562,7 +7558,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7597,7 +7593,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7668,7 +7664,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -7703,7 +7699,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7737,7 +7733,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7805,7 +7801,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7840,7 +7836,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7874,7 +7870,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -7909,7 +7905,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7950,7 +7946,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7985,7 +7981,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -8019,7 +8015,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -8052,7 +8048,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -8134,7 +8130,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8145,7 +8141,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -8155,7 +8150,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -8289,7 +8283,7 @@ ], "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { - "200": { + "201": { "description": "Documents List", "schema": { "$ref": "#\/definitions\/documentList" @@ -8299,7 +8293,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8314,6 +8308,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [] } @@ -8388,7 +8400,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8480,7 +8492,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8566,7 +8578,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8633,7 +8645,7 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -8646,7 +8658,7 @@ ], "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -8656,7 +8668,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8672,6 +8684,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [] } @@ -8761,7 +8792,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8858,7 +8889,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8936,7 +8967,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 112, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -9024,7 +9055,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -9036,8 +9067,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -9048,8 +9077,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9092,7 +9120,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "default": 1, "x-example": null }, @@ -9133,7 +9161,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -9145,8 +9173,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -9157,8 +9183,7 @@ "security": [ { "Project": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -9240,7 +9265,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -9318,8 +9343,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -9446,7 +9471,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9515,7 +9540,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9589,7 +9614,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 79, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -9667,7 +9692,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 123, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -9753,7 +9778,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 73, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -9800,10 +9825,4656 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "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).", + "default": false, + "x-example": false + }, + "enabled": { + "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "get": { + "summary": "List table logs", + "operationId": "databasesListTableLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get the table activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listTableLogs", + "group": "tables", + "weight": 376, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/list-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "get": { + "summary": "List row logs", + "operationId": "tablesListRowLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get the row activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "x-appwrite": { + "method": "listRowLogs", + "group": "logs", + "weight": 414, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "get": { + "summary": "Get table usage stats", + "operationId": "tablesGetTableUsage", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "responses": { + "200": { + "description": "UsageTable", + "schema": { + "$ref": "#\/definitions\/usageTable" + } + } + }, + "x-appwrite": { + "method": "getTableUsage", + "group": null, + "weight": 377, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "enum": [ + "24h", + "30d", + "90d" + ], + "x-enum-name": null, + "x-enum-keys": [], + "default": "30d", + "in": "query" + }, + { + "name": "tableId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetDatabaseUsage", + "operationId": "databasesGetUsage", "consumes": [], "produces": [ "application\/json" @@ -9821,13 +14492,13 @@ } }, "x-appwrite": { - "method": "getDatabaseUsage", + "method": "getUsage", "group": null, - "weight": 122, + "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-database-usage.md", + "demo": "databases\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -9857,7 +14528,7 @@ }, { "name": "range", - "description": "`Date range.", + "description": "Date range.", "required": false, "type": "string", "x-example": "24h", @@ -9901,7 +14572,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -9973,7 +14644,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -10224,7 +14895,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -10273,7 +14944,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -10323,7 +14994,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 404, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -10417,7 +15088,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 403, + "weight": 450, "cookies": false, "type": "", "deprecated": false, @@ -10475,7 +15146,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 397, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -10545,7 +15216,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -10604,7 +15275,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -10851,7 +15522,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -10912,7 +15583,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -10989,7 +15660,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -11069,7 +15740,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 429, "cookies": false, "type": "upload", "deprecated": false, @@ -11161,7 +15832,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -11246,7 +15917,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -11352,7 +16023,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -11448,7 +16119,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -11510,7 +16181,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -11577,7 +16248,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 436, "cookies": false, "type": "location", "deprecated": false, @@ -11663,7 +16334,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -11730,7 +16401,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -11804,7 +16475,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -11921,7 +16592,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -11986,7 +16657,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -12053,7 +16724,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 396, + "weight": 443, "cookies": false, "type": "", "deprecated": false, @@ -12131,7 +16802,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -12190,7 +16861,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -12280,7 +16951,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -12347,7 +17018,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -12439,7 +17110,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -12508,7 +17179,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 255, "cookies": false, "type": "graphql", "deprecated": false, @@ -12582,7 +17253,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -12654,7 +17325,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -12703,7 +17374,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -12752,7 +17423,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -12801,7 +17472,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -12859,7 +17530,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -12908,7 +17579,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -12957,7 +17628,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -13017,7 +17688,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -13077,7 +17748,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -13146,7 +17817,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -13206,7 +17877,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -13290,7 +17961,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -13350,7 +18021,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -13410,7 +18081,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -13470,7 +18141,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -13530,7 +18201,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -13590,7 +18261,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -13650,7 +18321,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -13710,7 +18381,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -13770,7 +18441,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -13819,7 +18490,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -13868,7 +18539,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -13917,7 +18588,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -13969,7 +18640,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -14021,7 +18692,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -14073,7 +18744,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -14125,7 +18796,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -14177,7 +18848,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -14229,7 +18900,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -14281,7 +18952,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -14333,7 +19004,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -14408,7 +19079,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -14566,7 +19237,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -14721,7 +19392,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -14916,7 +19587,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -15110,7 +19781,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -15228,7 +19899,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -15342,7 +20013,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -15397,7 +20068,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -15457,7 +20128,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -15529,7 +20200,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -15601,7 +20272,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -15676,7 +20347,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -15791,7 +20462,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -15904,7 +20575,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -15995,7 +20666,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -16084,7 +20755,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -16211,7 +20882,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -16336,7 +21007,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -16439,7 +21110,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -16540,7 +21211,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -16655,7 +21326,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -16768,7 +21439,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -16927,7 +21598,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -17083,7 +21754,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -17186,7 +21857,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -17287,7 +21958,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -17390,7 +22061,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -17491,7 +22162,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -17594,7 +22265,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -17695,7 +22366,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -17798,7 +22469,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -17897,7 +22568,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -17952,7 +22623,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -18012,7 +22683,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -18084,7 +22755,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -18156,7 +22827,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -18229,7 +22900,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -18317,7 +22988,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -18377,7 +23048,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -18456,7 +23127,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -18516,7 +23187,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -18588,7 +23259,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -18669,7 +23340,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -18757,7 +23428,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -18820,7 +23491,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -18891,7 +23562,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 316, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -18964,7 +23635,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 311, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -19056,7 +23727,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 318, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -19144,7 +23815,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 315, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -19228,7 +23899,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 312, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -19306,7 +23977,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 319, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -19377,7 +24048,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 314, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -19496,7 +24167,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 321, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -19616,7 +24287,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 313, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -19728,7 +24399,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 320, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -19839,7 +24510,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 317, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -19897,7 +24568,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 322, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -19950,7 +24621,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 323, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -20008,7 +24679,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 202, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -20090,7 +24761,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 204, + "weight": 151, "cookies": false, "type": "", "deprecated": false, @@ -20138,7 +24809,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 203, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -20219,7 +24890,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 205, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20277,7 +24948,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 206, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20360,7 +25031,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 207, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20418,7 +25089,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 157, + "weight": 103, "cookies": false, "type": "", "deprecated": false, @@ -20489,7 +25160,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 156, + "weight": 102, "cookies": false, "type": "", "deprecated": false, @@ -20636,7 +25307,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 158, + "weight": 104, "cookies": false, "type": "", "deprecated": false, @@ -20694,7 +25365,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 159, + "weight": 105, "cookies": false, "type": "", "deprecated": false, @@ -20819,7 +25490,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 176, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -20879,7 +25550,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 163, + "weight": 109, "cookies": false, "type": "", "deprecated": false, @@ -20971,7 +25642,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 164, + "weight": 110, "cookies": false, "type": "", "deprecated": false, @@ -21049,7 +25720,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 169, + "weight": 115, "cookies": false, "type": "", "deprecated": false, @@ -21127,7 +25798,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 168, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -21205,7 +25876,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 174, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -21283,7 +25954,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 167, + "weight": 113, "cookies": false, "type": "", "deprecated": false, @@ -21375,7 +26046,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 175, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -21456,7 +26127,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 172, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -21534,7 +26205,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 171, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -21612,7 +26283,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 173, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -21690,7 +26361,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 166, + "weight": 112, "cookies": false, "type": "", "deprecated": false, @@ -21743,6 +26414,84 @@ ] } }, + "\/projects\/{projectId}\/auth\/session-invalidation": { + "patch": { + "summary": "Update invalidate session option of the project", + "operationId": "projectsUpdateSessionInvalidation", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": "Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.", + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "x-appwrite": { + "method": "updateSessionInvalidation", + "group": "auth", + "weight": 148, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "projects\/update-session-invalidation.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-invalidation.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change", + "default": null, + "x-example": false + } + }, + "required": [ + "enabled" + ] + } + } + ] + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -21768,7 +26517,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 170, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -21863,7 +26612,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 373, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -21933,7 +26682,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 370, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -22016,7 +26765,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 372, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -22082,7 +26831,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 371, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -22168,7 +26917,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 374, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -22236,7 +26985,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 188, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -22321,7 +27070,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 184, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -22379,7 +27128,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 183, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -22471,7 +27220,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 185, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -22537,7 +27286,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 186, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -22632,7 +27381,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 187, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -22700,7 +27449,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 165, + "weight": 111, "cookies": false, "type": "", "deprecated": false, @@ -22838,7 +27587,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 190, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -22896,7 +27645,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 189, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -23016,7 +27765,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 191, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -23082,7 +27831,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 192, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -23179,7 +27928,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 193, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -23247,7 +27996,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 161, + "weight": 107, "cookies": false, "type": "", "deprecated": false, @@ -23348,7 +28097,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 162, + "weight": 108, "cookies": false, "type": "", "deprecated": false, @@ -23426,7 +28175,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 194, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -23555,7 +28304,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 195, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -23693,7 +28442,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 160, + "weight": 106, "cookies": false, "type": "", "deprecated": false, @@ -23769,7 +28518,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 197, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -23989,7 +28738,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 199, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -24252,7 +29001,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 201, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -24472,7 +29221,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 196, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -24689,7 +29438,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 198, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -24924,7 +29673,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 200, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -25141,7 +29890,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 178, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -25199,7 +29948,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 177, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -25317,7 +30066,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 179, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -25383,7 +30132,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 180, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -25504,7 +30253,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 182, + "weight": 128, "cookies": false, "type": "", "deprecated": false, @@ -25572,7 +30321,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 181, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -25638,7 +30387,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 294, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -25711,7 +30460,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 435, + "weight": 482, "cookies": false, "type": "", "deprecated": false, @@ -25781,7 +30530,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 437, + "weight": 484, "cookies": false, "type": "", "deprecated": false, @@ -25864,7 +30613,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 438, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -25984,7 +30733,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 436, + "weight": 483, "cookies": false, "type": "", "deprecated": false, @@ -26065,7 +30814,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 295, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -26118,7 +30867,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 296, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -26178,7 +30927,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 297, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -26236,7 +30985,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -26308,7 +31057,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -26575,7 +31324,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 457, "cookies": false, "type": "", "deprecated": false, @@ -26624,7 +31373,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -26674,7 +31423,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 429, + "weight": 476, "cookies": false, "type": "", "deprecated": false, @@ -26768,7 +31517,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 430, + "weight": 477, "cookies": false, "type": "", "deprecated": false, @@ -26826,7 +31575,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 431, + "weight": 478, "cookies": false, "type": "", "deprecated": false, @@ -26896,7 +31645,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -26955,7 +31704,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -27217,7 +31966,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -27278,7 +32027,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -27355,7 +32104,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -27435,7 +32184,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 458, "cookies": false, "type": "upload", "deprecated": false, @@ -27535,7 +32284,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -27614,7 +32363,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -27720,7 +32469,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -27817,7 +32566,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -27879,7 +32628,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 464, "cookies": false, "type": "", "deprecated": false, @@ -27946,7 +32695,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 465, "cookies": false, "type": "location", "deprecated": false, @@ -28032,7 +32781,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -28099,7 +32848,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -28170,7 +32919,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -28234,7 +32983,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -28301,7 +33050,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 432, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -28379,7 +33128,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -28438,7 +33187,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -28528,7 +33277,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -28595,7 +33344,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -28687,7 +33436,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -28754,7 +33503,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -28826,7 +33575,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -28963,7 +33712,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -29022,7 +33771,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -29155,7 +33904,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -29214,7 +33963,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -29297,7 +34046,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -29387,7 +34136,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -29457,7 +34206,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -29546,7 +34295,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -29616,7 +34365,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -29695,7 +34444,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -29902,7 +34651,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -29981,7 +34730,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 222, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -30051,7 +34800,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 223, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -30129,7 +34878,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -30204,7 +34953,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -30294,7 +35043,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -30356,7 +35105,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -30431,7 +35180,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -30493,7 +35242,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 237, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -30563,7 +35312,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -30646,7 +35395,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -30759,7 +35508,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -30829,7 +35578,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -30915,7 +35664,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -30987,7 +35736,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -31080,7 +35829,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -31140,7 +35889,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -31218,7 +35967,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -31298,7 +36047,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -31382,7 +36131,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -31442,7 +36191,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -31513,7 +36262,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 490, "cookies": false, "type": "", "deprecated": false, @@ -31573,7 +36322,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -31645,7 +36394,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -31740,7 +36489,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -31831,7 +36580,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -31920,7 +36669,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -31989,7 +36738,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -32050,7 +36799,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -32141,7 +36890,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -32232,7 +36981,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -32358,7 +37107,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -32470,7 +37219,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -32580,7 +37329,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 280, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -32650,7 +37399,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -32704,7 +37453,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -32765,7 +37514,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -32844,7 +37593,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -32926,7 +37675,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -33006,7 +37755,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -33077,7 +37826,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -33159,7 +37908,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -33233,7 +37982,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -33305,7 +38054,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -33364,7 +38113,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -33423,7 +38172,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -33482,7 +38231,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -33543,7 +38292,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -33622,7 +38371,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -33701,7 +38450,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -33778,7 +38527,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -33837,7 +38586,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -33914,7 +38663,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -33973,7 +38722,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -34027,7 +38776,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -34083,7 +38832,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -34152,7 +38901,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -34229,7 +38978,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -34301,7 +39050,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -34412,7 +39161,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -34480,7 +39229,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -34570,7 +39319,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -34640,7 +39389,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -34722,7 +39471,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -34801,7 +39550,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -34880,7 +39629,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 284, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -34975,7 +39724,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 285, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -35056,7 +39805,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 286, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -35139,7 +39888,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 287, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -35205,7 +39954,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 288, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -35271,7 +40020,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 283, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -35354,7 +40103,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 293, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -35438,7 +40187,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 290, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -35509,7 +40258,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 291, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -35562,7 +40311,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 292, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -35674,13 +40423,38 @@ "type": "object", "additionalProperties": true }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35699,13 +40473,38 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35730,7 +40529,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35755,7 +40554,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35774,13 +40573,38 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35805,7 +40629,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35830,7 +40654,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35855,7 +40679,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35880,7 +40704,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35905,7 +40729,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35930,7 +40754,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35955,7 +40779,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -35980,7 +40804,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36005,7 +40829,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36030,7 +40854,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36055,7 +40879,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36080,7 +40904,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of templates documents that matched your query.", + "description": "Total number of templates rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36105,7 +40929,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of installations documents that matched your query.", + "description": "Total number of installations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36130,7 +40954,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworkProviderRepositories documents that matched your query.", + "description": "Total number of frameworkProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36155,7 +40979,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimeProviderRepositories documents that matched your query.", + "description": "Total number of runtimeProviderRepositories rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36180,7 +41004,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of branches documents that matched your query.", + "description": "Total number of branches rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36205,7 +41029,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36230,7 +41054,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36255,7 +41079,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36280,7 +41104,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36305,7 +41129,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of projects documents that matched your query.", + "description": "Total number of projects rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36330,7 +41154,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of webhooks documents that matched your query.", + "description": "Total number of webhooks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36355,7 +41179,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of keys documents that matched your query.", + "description": "Total number of keys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36380,7 +41204,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of devKeys documents that matched your query.", + "description": "Total number of devKeys rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36405,7 +41229,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of platforms documents that matched your query.", + "description": "Total number of platforms rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36430,7 +41254,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36455,7 +41279,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36480,7 +41304,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36505,7 +41329,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36530,7 +41354,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36555,7 +41379,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36580,7 +41404,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of rules documents that matched your query.", + "description": "Total number of rules rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36605,7 +41429,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36630,7 +41454,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36655,7 +41479,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36680,7 +41504,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36705,7 +41529,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36730,7 +41554,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36755,7 +41579,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of migrations documents that matched your query.", + "description": "Total number of migrations rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36780,7 +41604,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -36805,7 +41629,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of contents documents that matched your query.", + "description": "Total number of contents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -37760,6 +42584,904 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -37832,6 +43554,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", @@ -40741,6 +46592,11 @@ "description": "Whether or not to show user MFA status in the teams membership response.", "x-example": true }, + "authInvalidateSessions": { + "type": "boolean", + "description": "Whether or not all existing sessions should be invalidated on password change", + "x-example": true + }, "oAuthProviders": { "type": "array", "description": "List of Auth Providers.", @@ -40967,6 +46823,7 @@ "authMembershipsUserName", "authMembershipsUserEmail", "authMembershipsMfa", + "authInvalidateSessions", "oAuthProviders", "platforms", "webhooks", @@ -41039,7 +46896,10 @@ "items": { "type": "string" }, - "x-example": "database.collections.update" + "x-example": [ + "databases.tables.update", + "databases.collections.update" + ] }, "security": { "type": "boolean", @@ -41758,12 +47618,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total databases storage in bytes.", @@ -41800,6 +47672,15 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41809,6 +47690,15 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "An array of the aggregated number of databases storage in bytes per period.", @@ -41841,13 +47731,17 @@ "range", "databasesTotal", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databasesReadsTotal", "databasesWritesTotal", "databases", "collections", + "tables", "documents", + "rows", "storage", "databasesReads", "databasesWrites" @@ -41868,12 +47762,24 @@ "x-example": 0, "format": "int32" }, + "tablesTotal": { + "type": "integer", + "description": "Total aggregated number of tables.", + "x-example": 0, + "format": "int32" + }, "documentsTotal": { "type": "integer", "description": "Total aggregated number of documents.", "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "storageTotal": { "type": "integer", "description": "Total aggregated number of total storage used in bytes.", @@ -41901,6 +47807,15 @@ }, "x-example": [] }, + "tables": { + "type": "array", + "description": "Aggregated number of tables per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "documents": { "type": "array", "description": "Aggregated number of documents per period.", @@ -41910,6 +47825,15 @@ }, "x-example": [] }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + }, "storage": { "type": "array", "description": "Aggregated storage used in bytes per period.", @@ -41941,17 +47865,52 @@ "required": [ "range", "collectionsTotal", + "tablesTotal", "documentsTotal", + "rowsTotal", "storageTotal", "databaseReadsTotal", "databaseWritesTotal", "collections", + "tables", "documents", + "rows", "storage", "databaseReads", "databaseWrites" ] }, + "usageTable": { + "description": "UsageTable", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "Time range of the usage stats.", + "x-example": "30d" + }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of of rows.", + "x-example": 0, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "Aggregated number of rows per period.", + "items": { + "type": "object", + "$ref": "#\/definitions\/metric" + }, + "x-example": [] + } + }, + "required": [ + "range", + "rowsTotal", + "rows" + ] + }, "usageCollection": { "description": "UsageCollection", "type": "object", @@ -43131,6 +49090,12 @@ "x-example": 0, "format": "int32" }, + "rowsTotal": { + "type": "integer", + "description": "Total aggregated number of rows.", + "x-example": 0, + "format": "int32" + }, "databasesTotal": { "type": "integer", "description": "Total aggregated number of databases.", @@ -43351,6 +49316,7 @@ "required": [ "executionsTotal", "documentsTotal", + "rowsTotal", "databasesTotal", "databasesStorageTotal", "usersTotal", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 7c15f9e5ea..215735cdb9 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -4215,7 +4215,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 71, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -4288,7 +4288,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 70, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4371,7 +4371,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 72, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4431,7 +4431,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 74, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4510,7 +4510,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 75, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4570,7 +4570,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 77, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -4628,7 +4628,7 @@ ] }, "post": { - "summary": "Create collection", + "summary": "Create collections", "operationId": "databasesCreateCollection", "consumes": [ "application\/json" @@ -4651,7 +4651,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 76, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -4757,7 +4757,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 78, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -4825,7 +4825,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 80, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -4927,7 +4927,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 81, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4995,7 +4995,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 92, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5031,7 +5031,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5077,7 +5077,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 89, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5113,7 +5113,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -5184,7 +5184,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 101, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5220,7 +5220,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5293,7 +5293,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 90, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5329,7 +5329,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#createCollection).", "required": true, "type": "string", "x-example": "", @@ -5377,7 +5377,7 @@ }, "\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/datetime\/{key}": { "patch": { - "summary": "Update dateTime attribute", + "summary": "Update datetime attribute", "operationId": "databasesUpdateDatetimeAttribute", "consumes": [ "application\/json" @@ -5400,7 +5400,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 102, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5436,7 +5436,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5509,7 +5509,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 83, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5545,7 +5545,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5616,7 +5616,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 95, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5652,7 +5652,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5686,7 +5686,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -5713,7 +5713,7 @@ "tags": [ "databases" ], - "description": "Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", + "description": "Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. \n", "responses": { "202": { "description": "AttributeEnum", @@ -5725,12 +5725,12 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 84, + "weight": 353, "cookies": false, "type": "", "deprecated": false, "demo": "databases\/create-enum-attribute.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5761,7 +5761,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5781,7 +5781,7 @@ }, "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Array of enum values.", "default": null, "x-example": null, "items": { @@ -5842,7 +5842,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 96, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -5878,7 +5878,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -5899,7 +5899,7 @@ "properties": { "elements": { "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.", + "description": "Updated list of enum values.", "default": null, "x-example": null, "items": { @@ -5921,7 +5921,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -5961,7 +5961,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 88, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -5997,7 +5997,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6023,19 +6023,19 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null }, @@ -6080,7 +6080,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 100, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6116,7 +6116,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6143,26 +6143,26 @@ }, "min": { "type": "number", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value.", "default": null, "x-example": null }, "max": { "type": "number", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value.", "default": null, "x-example": null }, "default": { "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6201,7 +6201,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 87, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6237,7 +6237,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6263,19 +6263,19 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -6320,7 +6320,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 99, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6356,7 +6356,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6383,26 +6383,26 @@ }, "min": { "type": "integer", - "description": "Minimum value to enforce on new documents", + "description": "Minimum value", "default": null, "x-example": null }, "max": { "type": "integer", - "description": "Maximum value to enforce on new documents", + "description": "Maximum value", "default": null, "x-example": null }, "default": { "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6441,7 +6441,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 85, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6477,7 +6477,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6503,7 +6503,7 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null }, @@ -6548,7 +6548,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 97, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6584,7 +6584,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6611,14 +6611,14 @@ }, "default": { "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "description": "Default value. Cannot be set when attribute is required.", "default": null, "x-example": null, "x-nullable": true }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -6657,7 +6657,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 91, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -6693,7 +6693,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -6707,7 +6707,7 @@ "properties": { "relatedCollectionId": { "type": "string", - "description": "Related Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Related Collection ID.", "default": null, "x-example": "" }, @@ -6791,7 +6791,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 82, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -6827,7 +6827,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -6911,7 +6911,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 94, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -6947,7 +6947,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", "required": true, "type": "string", "x-example": "", @@ -6987,7 +6987,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7026,7 +7026,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 86, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7062,7 +7062,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7133,7 +7133,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 98, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -7169,7 +7169,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7203,7 +7203,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7271,7 +7271,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 93, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7307,7 +7307,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7341,7 +7341,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 104, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -7377,7 +7377,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7418,7 +7418,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 103, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7454,7 +7454,7 @@ }, { "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Collection ID.", "required": true, "type": "string", "x-example": "", @@ -7488,7 +7488,7 @@ }, "newKey": { "type": "string", - "description": "New attribute key.", + "description": "New Attribute Key.", "default": null, "x-example": null } @@ -7521,7 +7521,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 110, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -7605,7 +7605,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 109, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -7616,7 +7616,6 @@ "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": "documents.write", "platforms": [ - "console", "client", "server", "server" @@ -7626,7 +7625,6 @@ { "name": "createDocument", "auth": { - "Admin": [], "Session": [], "Key": [], "JWT": [] @@ -7762,7 +7760,7 @@ ], "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { - "200": { + "201": { "description": "Documents List", "schema": { "$ref": "#\/definitions\/documentList" @@ -7772,7 +7770,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 118, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -7787,6 +7785,24 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [], "Key": [] @@ -7862,7 +7878,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 117, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -7955,7 +7971,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 120, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8042,7 +8058,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 111, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8111,7 +8127,7 @@ ] }, "put": { - "summary": "Upsert document", + "summary": "Create or update a document", "operationId": "databasesUpsertDocument", "consumes": [ "application\/json" @@ -8124,7 +8140,7 @@ ], "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { - "200": { + "201": { "description": "Document", "schema": { "$ref": "#\/definitions\/document" @@ -8134,7 +8150,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 114, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8150,6 +8166,25 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "upsertDocument", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + } + ], "auth": { "Project": [], "Session": [] @@ -8241,7 +8276,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 113, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8340,7 +8375,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 119, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8422,7 +8457,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 116, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -8434,8 +8469,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8447,9 +8480,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8492,7 +8523,7 @@ "properties": { "value": { "type": "number", - "description": "Value to decrement the attribute by. The value must be a number.", + "description": "Value to increment the attribute by. The value must be a number.", "default": 1, "x-example": null }, @@ -8533,7 +8564,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 115, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8545,8 +8576,6 @@ "scope": "documents.write", "platforms": [ "console", - "server", - "client", "server" ], "packaging": false, @@ -8558,9 +8587,7 @@ "security": [ { "Project": [], - "Key": [], - "Session": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -8642,7 +8669,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 106, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -8721,8 +8748,8 @@ }, "x-appwrite": { "method": "createIndex", - "group": "collections", - "weight": 105, + "group": "indexes", + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -8850,7 +8877,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 107, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -8920,7 +8947,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 108, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8972,6 +8999,4455 @@ ] } }, + "\/databases\/{databaseId}\/tables": { + "get": { + "summary": "List tables", + "operationId": "tablesList", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", + "responses": { + "200": { + "description": "Tables List", + "schema": { + "$ref": "#\/definitions\/tableList" + } + } + }, + "x-appwrite": { + "method": "list", + "group": null, + "weight": 375, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, rowSecurity", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "", + "default": "", + "in": "query" + } + ] + }, + "post": { + "summary": "Create table", + "operationId": "tablesCreate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "create", + "group": null, + "weight": 371, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "tableId": { + "type": "string", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "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).", + "default": false, + "x-example": false + }, + "enabled": { + "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "tableId", + "name" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}": { + "get": { + "summary": "Get table", + "operationId": "tablesGet", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "get", + "group": null, + "weight": 372, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update table", + "operationId": "tablesUpdate", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a table by its unique ID.", + "responses": { + "200": { + "description": "Table", + "schema": { + "$ref": "#\/definitions\/table" + } + } + }, + "x-appwrite": { + "method": "update", + "group": null, + "weight": 373, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Table name. Max length: 128 chars.", + "default": null, + "x-example": "" + }, + "permissions": { + "type": "array", + "description": "An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rowSecurity": { + "type": "boolean", + "description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": false, + "x-example": false + }, + "enabled": { + "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.", + "default": true, + "x-example": false + } + }, + "required": [ + "name" + ] + } + } + ] + }, + "delete": { + "summary": "Delete table", + "operationId": "tablesDelete", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "delete", + "group": null, + "weight": 374, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "get": { + "summary": "List columns", + "operationId": "tablesListColumns", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List attributes in the collection.", + "responses": { + "200": { + "description": "Columns List", + "schema": { + "$ref": "#\/definitions\/columnList" + } + } + }, + "x-appwrite": { + "method": "listColumns", + "group": "columns", + "weight": 380, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-columns.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "post": { + "summary": "Create boolean column", + "operationId": "tablesCreateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a boolean column.\n", + "responses": { + "202": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "createBooleanColumn", + "group": "columns", + "weight": 381, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "patch": { + "summary": "Update boolean column", + "operationId": "tablesUpdateBooleanColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnBoolean", + "schema": { + "$ref": "#\/definitions\/columnBoolean" + } + } + }, + "x-appwrite": { + "method": "updateBooleanColumn", + "group": "columns", + "weight": 382, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": false, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "post": { + "summary": "Create datetime column", + "operationId": "tablesCreateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a date time column according to the ISO 8601 standard.", + "responses": { + "202": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "createDatetimeColumn", + "group": "columns", + "weight": 383, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "patch": { + "summary": "Update dateTime column", + "operationId": "tablesUpdateDatetimeColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a date time column. Changing the `default` value will not update already existing rows.", + "responses": { + "200": { + "description": "ColumnDatetime", + "schema": { + "$ref": "#\/definitions\/columnDatetime" + } + } + }, + "x-appwrite": { + "method": "updateDatetimeColumn", + "group": "columns", + "weight": 384, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "post": { + "summary": "Create email column", + "operationId": "tablesCreateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an email column.\n", + "responses": { + "202": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "createEmailColumn", + "group": "columns", + "weight": 385, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "patch": { + "summary": "Update email column", + "operationId": "tablesUpdateEmailColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEmail", + "schema": { + "$ref": "#\/definitions\/columnEmail" + } + } + }, + "x-appwrite": { + "method": "updateEmailColumn", + "group": "columns", + "weight": 386, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "email@example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "post": { + "summary": "Create enum column", + "operationId": "tablesCreateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", + "responses": { + "202": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "createEnumColumn", + "group": "columns", + "weight": 387, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "elements", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "patch": { + "summary": "Update enum column", + "operationId": "tablesUpdateEnumColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnEnum", + "schema": { + "$ref": "#\/definitions\/columnEnum" + } + } + }, + "x-appwrite": { + "method": "updateEnumColumn", + "group": "columns", + "weight": 388, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "description": "Updated list of enum values.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "elements", + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "post": { + "summary": "Create float column", + "operationId": "tablesCreateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "createFloatColumn", + "group": "columns", + "weight": 389, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "patch": { + "summary": "Update float column", + "operationId": "tablesUpdateFloatColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnFloat", + "schema": { + "$ref": "#\/definitions\/columnFloat" + } + } + }, + "x-appwrite": { + "method": "updateFloatColumn", + "group": "columns", + "weight": 390, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value. Cannot be set when required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "post": { + "summary": "Create integer column", + "operationId": "tablesCreateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "202": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "createIntegerColumn", + "group": "columns", + "weight": 391, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "patch": { + "summary": "Update integer column", + "operationId": "tablesUpdateIntegerColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnInteger", + "schema": { + "$ref": "#\/definitions\/columnInteger" + } + } + }, + "x-appwrite": { + "method": "updateIntegerColumn", + "group": "columns", + "weight": 392, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "post": { + "summary": "Create IP address column", + "operationId": "tablesCreateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create IP address column.\n", + "responses": { + "202": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "createIpColumn", + "group": "columns", + "weight": 393, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "patch": { + "summary": "Update IP address column", + "operationId": "tablesUpdateIpColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnIP", + "schema": { + "$ref": "#\/definitions\/columnIp" + } + } + }, + "x-appwrite": { + "method": "updateIpColumn", + "group": "columns", + "weight": 394, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value. Cannot be set when column is required.", + "default": null, + "x-example": null, + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "post": { + "summary": "Create relationship column", + "operationId": "tablesCreateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "202": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "createRelationshipColumn", + "group": "columns", + "weight": 395, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "relatedTableId": { + "type": "string", + "description": "Related Table ID.", + "default": null, + "x-example": "" + }, + "type": { + "type": "string", + "description": "Relation type", + "default": null, + "x-example": "oneToOne", + "enum": [ + "oneToOne", + "manyToOne", + "manyToMany", + "oneToMany" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "twoWay": { + "type": "boolean", + "description": "Is Two Way?", + "default": false, + "x-example": false + }, + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "twoWayKey": { + "type": "string", + "description": "Two Way Column Key.", + "default": null, + "x-example": null + }, + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": "restrict", + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + } + }, + "required": [ + "relatedTableId", + "type" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "post": { + "summary": "Create string column", + "operationId": "tablesCreateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a string column.\n", + "responses": { + "202": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "createStringColumn", + "group": "columns", + "weight": 397, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + }, + "encrypt": { + "type": "boolean", + "description": "Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "size", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "patch": { + "summary": "Update string column", + "operationId": "tablesUpdateStringColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnString", + "schema": { + "$ref": "#\/definitions\/columnString" + } + } + }, + "x-appwrite": { + "method": "updateStringColumn", + "group": "columns", + "weight": 398, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "", + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Maximum size of the string column.", + "default": null, + "x-example": 1 + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "post": { + "summary": "Create URL column", + "operationId": "tablesCreateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a URL column.\n", + "responses": { + "202": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "createUrlColumn", + "group": "columns", + "weight": 399, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "default": false, + "x-example": false + } + }, + "required": [ + "key", + "required" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "patch": { + "summary": "Update URL column", + "operationId": "tablesUpdateUrlColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", + "responses": { + "200": { + "description": "ColumnURL", + "schema": { + "$ref": "#\/definitions\/columnUrl" + } + } + }, + "x-appwrite": { + "method": "updateUrlColumn", + "group": "columns", + "weight": 400, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Is column required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "default": null, + "x-example": "https:\/\/example.com", + "x-nullable": true + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + }, + "required": [ + "required", + "default" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "get": { + "summary": "Get column", + "operationId": "tablesGetColumn", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get column by ID.", + "responses": { + "200": { + "description": "ColumnBoolean, or ColumnInteger, or ColumnFloat, or ColumnEmail, or ColumnEnum, or ColumnURL, or ColumnIP, or ColumnDatetime, or ColumnRelationship, or ColumnString", + "schema": { + "x-oneOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + } + } + }, + "x-appwrite": { + "method": "getColumn", + "group": "columns", + "weight": 378, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete column", + "operationId": "tablesDeleteColumn", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Deletes a column.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteColumn", + "group": "columns", + "weight": 379, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "patch": { + "summary": "Update relationship column", + "operationId": "tablesUpdateRelationshipColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", + "responses": { + "200": { + "description": "ColumnRelationship", + "schema": { + "$ref": "#\/definitions\/columnRelationship" + } + } + }, + "x-appwrite": { + "method": "updateRelationshipColumn", + "group": "columns", + "weight": 396, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Column Key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "onDelete": { + "type": "string", + "description": "Constraints option", + "default": null, + "x-example": "cascade", + "enum": [ + "cascade", + "restrict", + "setNull" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "newKey": { + "type": "string", + "description": "New Column Key.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "get": { + "summary": "List indexes", + "operationId": "tablesListIndexes", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "List indexes in the collection.", + "responses": { + "200": { + "description": "Column Indexes List", + "schema": { + "$ref": "#\/definitions\/columnIndexList" + } + } + }, + "x-appwrite": { + "method": "listIndexes", + "group": "indexes", + "weight": 404, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, status, attributes, error", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create index", + "operationId": "tablesCreateIndex", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "responses": { + "202": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "createIndex", + "group": "indexes", + "weight": 401, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key", + "enum": [ + "key", + "fulltext", + "unique" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "columns": { + "type": "array", + "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "orders": { + "type": "array", + "description": "Array of index orders. Maximum of 100 orders are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "lengths": { + "type": "array", + "description": "Length of index. Maximum of 100", + "default": [], + "x-example": null, + "items": { + "type": "integer" + } + } + }, + "required": [ + "key", + "type", + "columns" + ] + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "get": { + "summary": "Get index", + "operationId": "tablesGetIndex", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get index by ID.", + "responses": { + "200": { + "description": "Index", + "schema": { + "$ref": "#\/definitions\/columnIndex" + } + } + }, + "x-appwrite": { + "method": "getIndex", + "group": "indexes", + "weight": 402, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete index", + "operationId": "tablesDeleteIndex", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete an index.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteIndex", + "group": "indexes", + "weight": 403, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesListRows", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "weight": 413, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesCreateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "weight": 405, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "createRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": "", + "x-example": "" + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "description": "Array of documents data as JSON objects.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + } + } + } + } + ] + }, + "put": { + "summary": "Create or update rows", + "operationId": "tablesUpsertRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", + "responses": { + "201": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "upsertRows", + "group": "rows", + "weight": 410, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n" + } + ], + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "description": "Array of row data as JSON objects. May contain partial rows.", + "default": null, + "x-example": null, + "items": { + "type": "object" + } + } + }, + "required": [ + "rows" + ] + } + } + ] + }, + "patch": { + "summary": "Update rows", + "operationId": "tablesUpdateRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "updateRows", + "group": "rows", + "weight": 408, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only column and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete rows", + "operationId": "tablesDeleteRows", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", + "responses": { + "200": { + "description": "Rows List", + "schema": { + "$ref": "#\/definitions\/rowList" + } + } + }, + "x-appwrite": { + "method": "deleteRows", + "group": "rows", + "weight": 412, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "get": { + "summary": "Get row", + "operationId": "tablesGetRow", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "getRow", + "group": "rows", + "weight": 406, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "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). Maximum of 100 queries are allowed, each 4096 characters long.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "put": { + "summary": "Create or update a row", + "operationId": "tablesUpsertRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "weight": 409, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "methods": [ + { + "name": "upsertRow", + "auth": { + "Session": [], + "Key": [], + "JWT": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + } + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "patch": { + "summary": "Update row", + "operationId": "tablesUpdateRow", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "updateRow", + "group": "rows", + "weight": 407, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "default": null, + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDeleteRow", + "consumes": [ + "application\/json" + ], + "produces": [], + "tags": [ + "tables" + ], + "description": "Delete a row by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "x-appwrite": { + "method": "deleteRow", + "group": "rows", + "weight": 411, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDecrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Decrement a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "decrementRowColumn", + "group": "rows", + "weight": 416, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, + "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "patch": { + "summary": "Increment row column", + "operationId": "tablesIncrementRowColumn", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "tables" + ], + "description": "Increment a specific column of a row by a given value.", + "responses": { + "200": { + "description": "Row", + "schema": { + "$ref": "#\/definitions\/row" + } + } + }, + "x-appwrite": { + "method": "incrementRowColumn", + "group": "rows", + "weight": 415, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "tables\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "type": "string", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "default": null, + "x-example": null + } + } + } + } + ] + } + }, "\/functions": { "get": { "summary": "List functions", @@ -8995,7 +13471,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 378, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -9068,7 +13544,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 375, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -9320,7 +13796,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 380, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -9370,7 +13846,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 381, + "weight": 428, "cookies": false, "type": "", "deprecated": false, @@ -9421,7 +13897,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 376, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -9481,7 +13957,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 377, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -9729,7 +14205,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 379, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -9791,7 +14267,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 384, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -9869,7 +14345,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 385, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -9950,7 +14426,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 382, + "weight": 429, "cookies": false, "type": "upload", "deprecated": false, @@ -10043,7 +14519,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 390, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -10129,7 +14605,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 387, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -10236,7 +14712,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 388, + "weight": 435, "cookies": false, "type": "", "deprecated": false, @@ -10333,7 +14809,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 383, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -10396,7 +14872,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 386, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -10464,7 +14940,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 389, + "weight": 436, "cookies": false, "type": "location", "deprecated": false, @@ -10551,7 +15027,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 391, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -10619,7 +15095,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 394, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -10695,7 +15171,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 392, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -10814,7 +15290,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 393, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -10881,7 +15357,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 395, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -10949,7 +15425,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 400, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -11009,7 +15485,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 398, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -11100,7 +15576,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 399, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -11168,7 +15644,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 401, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -11261,7 +15737,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 402, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -11331,7 +15807,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 308, + "weight": 255, "cookies": false, "type": "graphql", "deprecated": false, @@ -11407,7 +15883,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 307, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -11481,7 +15957,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 132, + "weight": 78, "cookies": false, "type": "", "deprecated": false, @@ -11531,7 +16007,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 153, + "weight": 99, "cookies": false, "type": "", "deprecated": false, @@ -11581,7 +16057,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 135, + "weight": 81, "cookies": false, "type": "", "deprecated": false, @@ -11631,7 +16107,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 140, + "weight": 86, "cookies": false, "type": "", "deprecated": false, @@ -11690,7 +16166,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 134, + "weight": 80, "cookies": false, "type": "", "deprecated": false, @@ -11740,7 +16216,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 136, + "weight": 82, "cookies": false, "type": "", "deprecated": false, @@ -11790,7 +16266,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 142, + "weight": 88, "cookies": false, "type": "", "deprecated": false, @@ -11851,7 +16327,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 141, + "weight": 87, "cookies": false, "type": "", "deprecated": false, @@ -11912,7 +16388,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 143, + "weight": 89, "cookies": false, "type": "", "deprecated": false, @@ -11982,7 +16458,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 144, + "weight": 90, "cookies": false, "type": "", "deprecated": false, @@ -12043,7 +16519,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 154, + "weight": 100, "cookies": false, "type": "", "deprecated": false, @@ -12128,7 +16604,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 148, + "weight": 94, "cookies": false, "type": "", "deprecated": false, @@ -12189,7 +16665,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 139, + "weight": 85, "cookies": false, "type": "", "deprecated": false, @@ -12250,7 +16726,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 145, + "weight": 91, "cookies": false, "type": "", "deprecated": false, @@ -12311,7 +16787,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 146, + "weight": 92, "cookies": false, "type": "", "deprecated": false, @@ -12372,7 +16848,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 147, + "weight": 93, "cookies": false, "type": "", "deprecated": false, @@ -12433,7 +16909,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 149, + "weight": 95, "cookies": false, "type": "", "deprecated": false, @@ -12494,7 +16970,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 150, + "weight": 96, "cookies": false, "type": "", "deprecated": false, @@ -12555,7 +17031,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 138, + "weight": 84, "cookies": false, "type": "", "deprecated": false, @@ -12616,7 +17092,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 152, + "weight": 98, "cookies": false, "type": "", "deprecated": false, @@ -12666,7 +17142,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 151, + "weight": 97, "cookies": false, "type": "", "deprecated": false, @@ -12716,7 +17192,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 137, + "weight": 83, "cookies": false, "type": "", "deprecated": false, @@ -12766,7 +17242,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 124, + "weight": 70, "cookies": false, "type": "", "deprecated": false, @@ -12820,7 +17296,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 125, + "weight": 71, "cookies": false, "type": "", "deprecated": false, @@ -12874,7 +17350,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 129, + "weight": 75, "cookies": false, "type": "", "deprecated": false, @@ -12928,7 +17404,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 126, + "weight": 72, "cookies": false, "type": "", "deprecated": false, @@ -12982,7 +17458,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 127, + "weight": 73, "cookies": false, "type": "", "deprecated": false, @@ -13036,7 +17512,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 128, + "weight": 74, "cookies": false, "type": "", "deprecated": false, @@ -13090,7 +17566,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 130, + "weight": 76, "cookies": false, "type": "", "deprecated": false, @@ -13144,7 +17620,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 131, + "weight": 77, "cookies": false, "type": "", "deprecated": false, @@ -13198,7 +17674,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 362, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -13274,7 +17750,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 359, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -13433,7 +17909,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 366, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -13589,7 +18065,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 361, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -13785,7 +18261,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 368, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -13980,7 +18456,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 360, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -14099,7 +18575,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 367, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -14214,7 +18690,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 365, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -14270,7 +18746,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 369, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -14331,7 +18807,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 363, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -14404,7 +18880,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 364, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -14477,7 +18953,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 334, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -14553,7 +19029,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 333, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -14669,7 +19145,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 346, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -14783,7 +19259,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 332, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -14875,7 +19351,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 345, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -14965,7 +19441,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 324, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -15093,7 +19569,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 337, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -15219,7 +19695,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 327, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -15323,7 +19799,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 340, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -15425,7 +19901,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 325, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -15541,7 +20017,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 338, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -15655,7 +20131,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 326, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -15815,7 +20291,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 339, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -15972,7 +20448,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 328, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -16076,7 +20552,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 341, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -16178,7 +20654,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 329, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -16282,7 +20758,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 342, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -16384,7 +20860,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 330, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -16488,7 +20964,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 343, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -16590,7 +21066,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 331, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -16694,7 +21170,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 344, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -16794,7 +21270,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 336, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -16850,7 +21326,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 347, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -16911,7 +21387,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 335, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -16984,7 +21460,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 356, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -17057,7 +21533,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 349, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -17131,7 +21607,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 348, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -17220,7 +21696,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 351, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -17281,7 +21757,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 352, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -17361,7 +21837,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 353, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -17422,7 +21898,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 350, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -17495,7 +21971,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 355, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -17577,7 +22053,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 354, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -17667,7 +22143,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 357, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -17731,7 +22207,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 358, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -17804,7 +22280,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 407, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -17877,7 +22353,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 405, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -18145,7 +22621,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 410, + "weight": 457, "cookies": false, "type": "", "deprecated": false, @@ -18195,7 +22671,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 433, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -18246,7 +22722,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 406, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -18306,7 +22782,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 408, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -18569,7 +23045,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 409, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -18631,7 +23107,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 416, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -18709,7 +23185,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 415, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -18790,7 +23266,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 411, + "weight": 458, "cookies": false, "type": "upload", "deprecated": false, @@ -18891,7 +23367,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 419, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -18971,7 +23447,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 412, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -19078,7 +23554,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 413, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -19176,7 +23652,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 414, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -19239,7 +23715,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 417, + "weight": 464, "cookies": false, "type": "", "deprecated": false, @@ -19307,7 +23783,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 418, + "weight": 465, "cookies": false, "type": "location", "deprecated": false, @@ -19394,7 +23870,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 420, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -19462,7 +23938,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 422, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -19534,7 +24010,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 421, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -19599,7 +24075,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 423, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -19667,7 +24143,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 426, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -19727,7 +24203,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 424, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -19818,7 +24294,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 425, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -19886,7 +24362,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 427, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -19979,7 +24455,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 428, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -20047,7 +24523,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 209, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -20120,7 +24596,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 208, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -20258,7 +24734,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 210, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -20318,7 +24794,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 211, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -20452,7 +24928,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 212, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20512,7 +24988,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 214, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20597,7 +25073,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 213, + "weight": 160, "cookies": false, "type": "upload", "deprecated": false, @@ -20689,7 +25165,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 215, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20761,7 +25237,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 220, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20852,7 +25328,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 221, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20924,7 +25400,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 217, + "weight": 164, "cookies": false, "type": "location", "deprecated": false, @@ -21005,7 +25481,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 216, + "weight": 163, "cookies": false, "type": "location", "deprecated": false, @@ -21214,7 +25690,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 218, + "weight": 165, "cookies": false, "type": "location", "deprecated": false, @@ -21295,7 +25771,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 225, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -21372,7 +25848,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 224, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21464,7 +25940,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 226, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -21528,7 +26004,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 228, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -21605,7 +26081,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 230, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -21669,7 +26145,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 232, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21754,7 +26230,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 231, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -21869,7 +26345,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 233, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21941,7 +26417,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 234, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -22029,7 +26505,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 236, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -22103,7 +26579,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 235, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -22198,7 +26674,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 227, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -22260,7 +26736,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 229, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -22340,7 +26816,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 441, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -22421,7 +26897,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 439, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -22506,7 +26982,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 440, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -22567,7 +27043,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 442, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -22639,7 +27115,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 443, + "weight": 490, "cookies": false, "type": "", "deprecated": false, @@ -22700,7 +27176,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 247, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -22773,7 +27249,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 238, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22869,7 +27345,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 241, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22961,7 +27437,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 239, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -23051,7 +27527,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 255, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -23121,7 +27597,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 278, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -23183,7 +27659,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 240, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -23275,7 +27751,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 243, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23367,7 +27843,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 244, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23494,7 +27970,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 245, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23607,7 +28083,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 242, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -23718,7 +28194,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 248, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23773,7 +28249,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 276, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -23835,7 +28311,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 261, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -23915,7 +28391,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 279, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -23998,7 +28474,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 257, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -24079,7 +28555,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 253, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -24151,7 +28627,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 252, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -24234,7 +28710,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 266, + "weight": 213, "cookies": false, "type": "", "deprecated": false, @@ -24309,7 +28785,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 271, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -24382,7 +28858,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 267, + "weight": 214, "cookies": false, "type": "", "deprecated": false, @@ -24442,7 +28918,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 268, + "weight": 215, "cookies": false, "type": "", "deprecated": false, @@ -24502,7 +28978,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 270, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -24562,7 +29038,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 269, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -24624,7 +29100,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 259, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -24704,7 +29180,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 260, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -24784,7 +29260,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 262, + "weight": 209, "cookies": false, "type": "", "deprecated": false, @@ -24862,7 +29338,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 249, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24922,7 +29398,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 264, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -25000,7 +29476,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 251, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -25060,7 +29536,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 272, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -25115,7 +29591,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 275, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -25172,7 +29648,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 274, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -25242,7 +29718,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 256, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -25320,7 +29796,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 254, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -25393,7 +29869,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 246, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -25505,7 +29981,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 250, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -25574,7 +30050,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 265, + "weight": 212, "cookies": false, "type": "", "deprecated": false, @@ -25665,7 +30141,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 277, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -25736,7 +30212,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 273, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -25819,7 +30295,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 263, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -25899,7 +30375,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 258, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -26031,13 +30507,38 @@ "type": "object", "additionalProperties": true }, + "rowList": { + "description": "Rows List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of rows rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "rows": { + "type": "array", + "description": "List of rows.", + "items": { + "type": "object", + "$ref": "#\/definitions\/row" + }, + "x-example": "" + } + }, + "required": [ + "total", + "rows" + ] + }, "documentList": { "description": "Documents List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of documents documents that matched your query.", + "description": "Total number of documents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26056,13 +30557,38 @@ "documents" ] }, + "tableList": { + "description": "Tables List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of tables rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "tables": { + "type": "array", + "description": "List of tables.", + "items": { + "type": "object", + "$ref": "#\/definitions\/table" + }, + "x-example": "" + } + }, + "required": [ + "total", + "tables" + ] + }, "collectionList": { "description": "Collections List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of collections documents that matched your query.", + "description": "Total number of collections rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26087,7 +30613,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of databases documents that matched your query.", + "description": "Total number of databases rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26112,7 +30638,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of indexes documents that matched your query.", + "description": "Total number of indexes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26131,13 +30657,38 @@ "indexes" ] }, + "columnIndexList": { + "description": "Column Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes rows that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": "" + } + }, + "required": [ + "total", + "indexes" + ] + }, "userList": { "description": "Users List", "type": "object", "properties": { "total": { "type": "integer", - "description": "Total number of users documents that matched your query.", + "description": "Total number of users rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26162,7 +30713,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sessions documents that matched your query.", + "description": "Total number of sessions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26187,7 +30738,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of identities documents that matched your query.", + "description": "Total number of identities rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26212,7 +30763,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of logs documents that matched your query.", + "description": "Total number of logs rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26237,7 +30788,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of files documents that matched your query.", + "description": "Total number of files rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26262,7 +30813,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of buckets documents that matched your query.", + "description": "Total number of buckets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26287,7 +30838,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of tokens documents that matched your query.", + "description": "Total number of tokens rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26312,7 +30863,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of teams documents that matched your query.", + "description": "Total number of teams rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26337,7 +30888,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of memberships documents that matched your query.", + "description": "Total number of memberships rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26362,7 +30913,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of sites documents that matched your query.", + "description": "Total number of sites rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26387,7 +30938,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of functions documents that matched your query.", + "description": "Total number of functions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26412,7 +30963,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of frameworks documents that matched your query.", + "description": "Total number of frameworks rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26437,7 +30988,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of runtimes documents that matched your query.", + "description": "Total number of runtimes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26462,7 +31013,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of deployments documents that matched your query.", + "description": "Total number of deployments rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26487,7 +31038,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of executions documents that matched your query.", + "description": "Total number of executions rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26512,7 +31063,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of countries documents that matched your query.", + "description": "Total number of countries rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26537,7 +31088,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of continents documents that matched your query.", + "description": "Total number of continents rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26562,7 +31113,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of languages documents that matched your query.", + "description": "Total number of languages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26587,7 +31138,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of currencies documents that matched your query.", + "description": "Total number of currencies rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26612,7 +31163,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of phones documents that matched your query.", + "description": "Total number of phones rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26637,7 +31188,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of variables documents that matched your query.", + "description": "Total number of variables rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26662,7 +31213,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of localeCodes documents that matched your query.", + "description": "Total number of localeCodes rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26687,7 +31238,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of providers documents that matched your query.", + "description": "Total number of providers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26712,7 +31263,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of messages documents that matched your query.", + "description": "Total number of messages rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26737,7 +31288,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of topics documents that matched your query.", + "description": "Total number of topics rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26762,7 +31313,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of subscribers documents that matched your query.", + "description": "Total number of subscribers rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26787,7 +31338,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of targets documents that matched your query.", + "description": "Total number of targets rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -26812,7 +31363,7 @@ "properties": { "total": { "type": "integer", - "description": "Total number of specifications documents that matched your query.", + "description": "Total number of specifications rows that matched your query.", "x-example": 5, "format": "int32" }, @@ -27767,6 +32318,904 @@ "side" ] }, + "table": { + "description": "Table", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Table creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Table update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Table permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + }, + "databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Table name.", + "x-example": "My Table" + }, + "enabled": { + "type": "boolean", + "description": "Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys.", + "x-example": false + }, + "rowSecurity": { + "type": "boolean", + "description": "Whether row-level permissions are enabled. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": true + }, + "columns": { + "type": "array", + "description": "Table columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Table indexes.", + "items": { + "type": "object", + "$ref": "#\/definitions\/columnIndex" + }, + "x-example": {} + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "$permissions", + "databaseId", + "name", + "enabled", + "rowSecurity", + "columns", + "indexes" + ] + }, + "columnList": { + "description": "Columns List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of columns in the given table.", + "x-example": 5, + "format": "int32" + }, + "columns": { + "type": "array", + "description": "List of columns.", + "items": { + "x-anyOf": [ + { + "$ref": "#\/definitions\/columnBoolean" + }, + { + "$ref": "#\/definitions\/columnInteger" + }, + { + "$ref": "#\/definitions\/columnFloat" + }, + { + "$ref": "#\/definitions\/columnEmail" + }, + { + "$ref": "#\/definitions\/columnEnum" + }, + { + "$ref": "#\/definitions\/columnUrl" + }, + { + "$ref": "#\/definitions\/columnIp" + }, + { + "$ref": "#\/definitions\/columnDatetime" + }, + { + "$ref": "#\/definitions\/columnRelationship" + }, + { + "$ref": "#\/definitions\/columnString" + } + ] + }, + "x-example": "" + } + }, + "required": [ + "total", + "columns" + ] + }, + "columnString": { + "description": "ColumnString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "size": { + "type": "integer", + "description": "Column size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "default", + "x-nullable": true + }, + "encrypt": { + "type": "boolean", + "description": "Defines whether this column is encrypted or not.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "size" + ] + }, + "columnInteger": { + "description": "ColumnInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnFloat": { + "description": "ColumnFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnBoolean": { + "description": "ColumnBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt" + ] + }, + "columnEmail": { + "description": "ColumnEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnEnum": { + "description": "ColumnEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { + "type": "string" + }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "elements", + "format" + ] + }, + "columnIp": { + "description": "ColumnIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnUrl": { + "description": "ColumnURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for column when not provided. Cannot be set when column is required.", + "x-example": "https:\/\/example.com", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnDatetime": { + "description": "ColumnDatetime", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "birthDay" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "datetime" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "format": { + "type": "string", + "description": "ISO 8601 format.", + "x-example": "datetime" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Only null is optional", + "x-example": "2020-10-15T06:38:00.000+00:00", + "x-nullable": true + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "format" + ] + }, + "columnRelationship": { + "description": "ColumnRelationship", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Column Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Column type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an column.", + "x-example": "string" + }, + "required": { + "type": "boolean", + "description": "Is column required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is column an array?", + "x-example": false, + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Column creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Column update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "relatedTable": { + "type": "string", + "description": "The ID of the related table.", + "x-example": "table" + }, + "relationType": { + "type": "string", + "description": "The type of the relationship.", + "x-example": "oneToOne|oneToMany|manyToOne|manyToMany" + }, + "twoWay": { + "type": "boolean", + "description": "Is the relationship two-way?", + "x-example": false + }, + "twoWayKey": { + "type": "string", + "description": "The key of the two-way relationship.", + "x-example": "string" + }, + "onDelete": { + "type": "string", + "description": "How deleting the parent document will propagate to child documents.", + "x-example": "restrict|cascade|setNull" + }, + "side": { + "type": "string", + "description": "Whether this is the parent or child side of the relationship", + "x-example": "parent|child" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "required", + "$createdAt", + "$updatedAt", + "relatedTable", + "relationType", + "twoWay", + "twoWayKey", + "onDelete", + "side" + ] + }, "index": { "description": "Index", "type": "object", @@ -27839,6 +33288,135 @@ "$updatedAt" ] }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "error": { + "type": "string", + "description": "Error message. Displays error generated on failure of creating or deleting an index.", + "x-example": "string" + }, + "columns": { + "type": "array", + "description": "Index columns.", + "items": { + "type": "string" + }, + "x-example": [] + }, + "lengths": { + "type": "array", + "description": "Index columns length.", + "items": { + "type": "integer", + "format": "int32" + }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { + "type": "string" + }, + "x-example": [], + "x-nullable": true + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + } + }, + "required": [ + "key", + "type", + "status", + "error", + "columns", + "lengths", + "$createdAt", + "$updatedAt" + ] + }, + "row": { + "description": "Row", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Row ID.", + "x-example": "5e5ea5c16897e" + }, + "$sequence": { + "type": "integer", + "description": "Row automatically incrementing ID.", + "x-example": 1, + "format": "int32" + }, + "$tableId": { + "type": "string", + "description": "Table ID.", + "x-example": "5e5ea5c15117e" + }, + "$databaseId": { + "type": "string", + "description": "Database ID.", + "x-example": "5e5ea5c15117e" + }, + "$createdAt": { + "type": "string", + "description": "Row creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Row update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$permissions": { + "type": "array", + "description": "Row permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "items": { + "type": "string" + }, + "x-example": [ + "read(\"any\")" + ] + } + }, + "additionalProperties": true, + "required": [ + "$id", + "$sequence", + "$tableId", + "$databaseId", + "$createdAt", + "$updatedAt", + "$permissions" + ] + }, "document": { "description": "Document", "type": "object", From 974037ee38621cfdaefea97ab8d4c984d6febfca Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 19 Jun 2025 18:13:27 +0530 Subject: [PATCH 183/362] update: generate docs examples as per latest `1.8.x` source. --- .../java/account/create-anonymous-session.md | 18 ++++++ .../account/create-email-password-session.md | 23 +++++++ .../java/account/create-email-token.md | 24 ++++++++ .../java/account/create-j-w-t.md | 18 ++++++ .../java/account/create-magic-u-r-l-token.md | 25 ++++++++ .../java/account/create-mfa-authenticator.md | 23 +++++++ .../java/account/create-mfa-challenge.md | 23 +++++++ .../java/account/create-mfa-recovery-codes.md | 18 ++++++ .../java/account/create-o-auth2session.md | 26 ++++++++ .../java/account/create-o-auth2token.md | 26 ++++++++ .../java/account/create-phone-token.md | 23 +++++++ .../java/account/create-phone-verification.md | 18 ++++++ .../java/account/create-push-target.md | 24 ++++++++ .../java/account/create-recovery.md | 23 +++++++ .../java/account/create-session.md | 23 +++++++ .../java/account/create-verification.md | 22 +++++++ .../client-android/java/account/create.md | 25 ++++++++ .../java/account/delete-identity.md | 22 +++++++ .../java/account/delete-mfa-authenticator.md | 23 +++++++ .../java/account/delete-push-target.md | 22 +++++++ .../java/account/delete-session.md | 22 +++++++ .../java/account/delete-sessions.md | 18 ++++++ .../java/account/get-mfa-recovery-codes.md | 18 ++++++ .../client-android/java/account/get-prefs.md | 18 ++++++ .../java/account/get-session.md | 22 +++++++ .../1.8.x/client-android/java/account/get.md | 18 ++++++ .../java/account/list-identities.md | 22 +++++++ .../client-android/java/account/list-logs.md | 22 +++++++ .../java/account/list-mfa-factors.md | 18 ++++++ .../java/account/list-sessions.md | 18 ++++++ .../java/account/update-email.md | 23 +++++++ .../java/account/update-m-f-a.md | 22 +++++++ .../account/update-magic-u-r-l-session.md | 23 +++++++ .../java/account/update-mfa-authenticator.md | 24 ++++++++ .../java/account/update-mfa-challenge.md | 23 +++++++ .../java/account/update-mfa-recovery-codes.md | 18 ++++++ .../java/account/update-name.md | 22 +++++++ .../java/account/update-password.md | 23 +++++++ .../java/account/update-phone-session.md | 23 +++++++ .../java/account/update-phone-verification.md | 23 +++++++ .../java/account/update-phone.md | 23 +++++++ .../java/account/update-prefs.md | 22 +++++++ .../java/account/update-push-target.md | 23 +++++++ .../java/account/update-recovery.md | 24 ++++++++ .../java/account/update-session.md | 22 +++++++ .../java/account/update-status.md | 18 ++++++ .../java/account/update-verification.md | 23 +++++++ .../java/avatars/get-browser.md | 26 ++++++++ .../java/avatars/get-credit-card.md | 26 ++++++++ .../java/avatars/get-favicon.md | 22 +++++++ .../client-android/java/avatars/get-flag.md | 26 ++++++++ .../client-android/java/avatars/get-image.md | 24 ++++++++ .../java/avatars/get-initials.md | 25 ++++++++ .../client-android/java/avatars/get-q-r.md | 25 ++++++++ .../java/databases/create-document.md | 28 +++++++++ .../java/databases/create-documents.md | 25 ++++++++ .../java/databases/delete-document.md | 24 ++++++++ .../java/databases/get-document.md | 25 ++++++++ .../java/databases/list-documents.md | 24 ++++++++ .../java/databases/update-document.md | 26 ++++++++ .../java/databases/upsert-document.md | 26 ++++++++ .../java/functions/create-execution.md | 28 +++++++++ .../java/functions/get-execution.md | 23 +++++++ .../java/functions/list-executions.md | 23 +++++++ .../client-android/java/graphql/mutation.md | 22 +++++++ .../client-android/java/graphql/query.md | 22 +++++++ .../1.8.x/client-android/java/locale/get.md | 18 ++++++ .../client-android/java/locale/list-codes.md | 18 ++++++ .../java/locale/list-continents.md | 18 ++++++ .../java/locale/list-countries-e-u.md | 18 ++++++ .../java/locale/list-countries-phones.md | 18 ++++++ .../java/locale/list-countries.md | 18 ++++++ .../java/locale/list-currencies.md | 18 ++++++ .../java/locale/list-languages.md | 18 ++++++ .../java/messaging/create-subscriber.md | 24 ++++++++ .../java/messaging/delete-subscriber.md | 23 +++++++ .../java/storage/create-file.md | 26 ++++++++ .../java/storage/delete-file.md | 23 +++++++ .../java/storage/get-file-download.md | 24 ++++++++ .../java/storage/get-file-preview.md | 35 +++++++++++ .../java/storage/get-file-view.md | 24 ++++++++ .../client-android/java/storage/get-file.md | 23 +++++++ .../client-android/java/storage/list-files.md | 24 ++++++++ .../java/storage/update-file.md | 25 ++++++++ .../client-android/java/tables/create-row.md | 28 +++++++++ .../client-android/java/tables/create-rows.md | 25 ++++++++ .../client-android/java/tables/delete-row.md | 24 ++++++++ .../client-android/java/tables/get-row.md | 25 ++++++++ .../client-android/java/tables/list-rows.md | 24 ++++++++ .../client-android/java/tables/update-row.md | 26 ++++++++ .../client-android/java/tables/upsert-row.md | 26 ++++++++ .../java/teams/create-membership.md | 28 +++++++++ .../1.8.x/client-android/java/teams/create.md | 24 ++++++++ .../java/teams/delete-membership.md | 23 +++++++ .../1.8.x/client-android/java/teams/delete.md | 22 +++++++ .../java/teams/get-membership.md | 23 +++++++ .../client-android/java/teams/get-prefs.md | 22 +++++++ .../1.8.x/client-android/java/teams/get.md | 22 +++++++ .../java/teams/list-memberships.md | 24 ++++++++ .../1.8.x/client-android/java/teams/list.md | 23 +++++++ .../java/teams/update-membership-status.md | 25 ++++++++ .../java/teams/update-membership.md | 24 ++++++++ .../client-android/java/teams/update-name.md | 23 +++++++ .../client-android/java/teams/update-prefs.md | 23 +++++++ .../account/create-anonymous-session.md | 11 ++++ .../account/create-email-password-session.md | 14 +++++ .../kotlin/account/create-email-token.md | 15 +++++ .../kotlin/account/create-j-w-t.md | 11 ++++ .../account/create-magic-u-r-l-token.md | 16 +++++ .../account/create-mfa-authenticator.md | 14 +++++ .../kotlin/account/create-mfa-challenge.md | 14 +++++ .../account/create-mfa-recovery-codes.md | 11 ++++ .../kotlin/account/create-o-auth2session.md | 17 ++++++ .../kotlin/account/create-o-auth2token.md | 17 ++++++ .../kotlin/account/create-phone-token.md | 14 +++++ .../account/create-phone-verification.md | 11 ++++ .../kotlin/account/create-push-target.md | 15 +++++ .../kotlin/account/create-recovery.md | 14 +++++ .../kotlin/account/create-session.md | 14 +++++ .../kotlin/account/create-verification.md | 13 ++++ .../client-android/kotlin/account/create.md | 16 +++++ .../kotlin/account/delete-identity.md | 13 ++++ .../account/delete-mfa-authenticator.md | 14 +++++ .../kotlin/account/delete-push-target.md | 13 ++++ .../kotlin/account/delete-session.md | 13 ++++ .../kotlin/account/delete-sessions.md | 11 ++++ .../kotlin/account/get-mfa-recovery-codes.md | 11 ++++ .../kotlin/account/get-prefs.md | 11 ++++ .../kotlin/account/get-session.md | 13 ++++ .../client-android/kotlin/account/get.md | 11 ++++ .../kotlin/account/list-identities.md | 13 ++++ .../kotlin/account/list-logs.md | 13 ++++ .../kotlin/account/list-mfa-factors.md | 11 ++++ .../kotlin/account/list-sessions.md | 11 ++++ .../kotlin/account/update-email.md | 14 +++++ .../kotlin/account/update-m-f-a.md | 13 ++++ .../account/update-magic-u-r-l-session.md | 14 +++++ .../account/update-mfa-authenticator.md | 15 +++++ .../kotlin/account/update-mfa-challenge.md | 14 +++++ .../account/update-mfa-recovery-codes.md | 11 ++++ .../kotlin/account/update-name.md | 13 ++++ .../kotlin/account/update-password.md | 14 +++++ .../kotlin/account/update-phone-session.md | 14 +++++ .../account/update-phone-verification.md | 14 +++++ .../kotlin/account/update-phone.md | 14 +++++ .../kotlin/account/update-prefs.md | 13 ++++ .../kotlin/account/update-push-target.md | 14 +++++ .../kotlin/account/update-recovery.md | 15 +++++ .../kotlin/account/update-session.md | 13 ++++ .../kotlin/account/update-status.md | 11 ++++ .../kotlin/account/update-verification.md | 14 +++++ .../kotlin/avatars/get-browser.md | 17 ++++++ .../kotlin/avatars/get-credit-card.md | 17 ++++++ .../kotlin/avatars/get-favicon.md | 13 ++++ .../client-android/kotlin/avatars/get-flag.md | 17 ++++++ .../kotlin/avatars/get-image.md | 15 +++++ .../kotlin/avatars/get-initials.md | 16 +++++ .../client-android/kotlin/avatars/get-q-r.md | 16 +++++ .../kotlin/databases/create-document.md | 19 ++++++ .../kotlin/databases/create-documents.md | 16 +++++ .../kotlin/databases/delete-document.md | 15 +++++ .../kotlin/databases/get-document.md | 16 +++++ .../kotlin/databases/list-documents.md | 15 +++++ .../kotlin/databases/update-document.md | 17 ++++++ .../kotlin/databases/upsert-document.md | 17 ++++++ .../kotlin/functions/create-execution.md | 19 ++++++ .../kotlin/functions/get-execution.md | 14 +++++ .../kotlin/functions/list-executions.md | 14 +++++ .../client-android/kotlin/graphql/mutation.md | 13 ++++ .../client-android/kotlin/graphql/query.md | 13 ++++ .../1.8.x/client-android/kotlin/locale/get.md | 11 ++++ .../kotlin/locale/list-codes.md | 11 ++++ .../kotlin/locale/list-continents.md | 11 ++++ .../kotlin/locale/list-countries-e-u.md | 11 ++++ .../kotlin/locale/list-countries-phones.md | 11 ++++ .../kotlin/locale/list-countries.md | 11 ++++ .../kotlin/locale/list-currencies.md | 11 ++++ .../kotlin/locale/list-languages.md | 11 ++++ .../kotlin/messaging/create-subscriber.md | 15 +++++ .../kotlin/messaging/delete-subscriber.md | 14 +++++ .../kotlin/storage/create-file.md | 17 ++++++ .../kotlin/storage/delete-file.md | 14 +++++ .../kotlin/storage/get-file-download.md | 15 +++++ .../kotlin/storage/get-file-preview.md | 26 ++++++++ .../kotlin/storage/get-file-view.md | 15 +++++ .../client-android/kotlin/storage/get-file.md | 14 +++++ .../kotlin/storage/list-files.md | 15 +++++ .../kotlin/storage/update-file.md | 16 +++++ .../kotlin/tables/create-row.md | 19 ++++++ .../kotlin/tables/create-rows.md | 16 +++++ .../kotlin/tables/delete-row.md | 15 +++++ .../client-android/kotlin/tables/get-row.md | 16 +++++ .../client-android/kotlin/tables/list-rows.md | 15 +++++ .../kotlin/tables/update-row.md | 17 ++++++ .../kotlin/tables/upsert-row.md | 17 ++++++ .../kotlin/teams/create-membership.md | 19 ++++++ .../client-android/kotlin/teams/create.md | 15 +++++ .../kotlin/teams/delete-membership.md | 14 +++++ .../client-android/kotlin/teams/delete.md | 13 ++++ .../kotlin/teams/get-membership.md | 14 +++++ .../client-android/kotlin/teams/get-prefs.md | 13 ++++ .../1.8.x/client-android/kotlin/teams/get.md | 13 ++++ .../kotlin/teams/list-memberships.md | 15 +++++ .../1.8.x/client-android/kotlin/teams/list.md | 14 +++++ .../kotlin/teams/update-membership-status.md | 16 +++++ .../kotlin/teams/update-membership.md | 15 +++++ .../kotlin/teams/update-name.md | 14 +++++ .../kotlin/teams/update-prefs.md | 14 +++++ .../account/create-anonymous-session.md | 10 +++ .../account/create-email-password-session.md | 13 ++++ .../examples/account/create-email-token.md | 14 +++++ .../examples/account/create-j-w-t.md | 10 +++ .../account/create-magic-u-r-l-token.md | 15 +++++ .../account/create-mfa-authenticator.md | 13 ++++ .../examples/account/create-mfa-challenge.md | 13 ++++ .../account/create-mfa-recovery-codes.md | 10 +++ .../examples/account/create-o-auth2session.md | 16 +++++ .../examples/account/create-o-auth2token.md | 16 +++++ .../examples/account/create-phone-token.md | 13 ++++ .../account/create-phone-verification.md | 10 +++ .../examples/account/create-push-target.md | 14 +++++ .../examples/account/create-recovery.md | 13 ++++ .../examples/account/create-session.md | 13 ++++ .../examples/account/create-verification.md | 12 ++++ .../client-apple/examples/account/create.md | 15 +++++ .../examples/account/delete-identity.md | 12 ++++ .../account/delete-mfa-authenticator.md | 13 ++++ .../examples/account/delete-push-target.md | 12 ++++ .../examples/account/delete-session.md | 12 ++++ .../examples/account/delete-sessions.md | 10 +++ .../account/get-mfa-recovery-codes.md | 10 +++ .../examples/account/get-prefs.md | 10 +++ .../examples/account/get-session.md | 12 ++++ .../client-apple/examples/account/get.md | 10 +++ .../examples/account/list-identities.md | 12 ++++ .../examples/account/list-logs.md | 12 ++++ .../examples/account/list-mfa-factors.md | 10 +++ .../examples/account/list-sessions.md | 10 +++ .../examples/account/update-email.md | 13 ++++ .../examples/account/update-m-f-a.md | 12 ++++ .../account/update-magic-u-r-l-session.md | 13 ++++ .../account/update-mfa-authenticator.md | 14 +++++ .../examples/account/update-mfa-challenge.md | 13 ++++ .../account/update-mfa-recovery-codes.md | 10 +++ .../examples/account/update-name.md | 12 ++++ .../examples/account/update-password.md | 13 ++++ .../examples/account/update-phone-session.md | 13 ++++ .../account/update-phone-verification.md | 13 ++++ .../examples/account/update-phone.md | 13 ++++ .../examples/account/update-prefs.md | 12 ++++ .../examples/account/update-push-target.md | 13 ++++ .../examples/account/update-recovery.md | 14 +++++ .../examples/account/update-session.md | 12 ++++ .../examples/account/update-status.md | 10 +++ .../examples/account/update-verification.md | 13 ++++ .../examples/avatars/get-browser.md | 16 +++++ .../examples/avatars/get-credit-card.md | 16 +++++ .../examples/avatars/get-favicon.md | 12 ++++ .../client-apple/examples/avatars/get-flag.md | 16 +++++ .../examples/avatars/get-image.md | 14 +++++ .../examples/avatars/get-initials.md | 15 +++++ .../client-apple/examples/avatars/get-q-r.md | 15 +++++ .../examples/databases/create-document.md | 18 ++++++ .../examples/databases/create-documents.md | 15 +++++ .../examples/databases/delete-document.md | 14 +++++ .../examples/databases/get-document.md | 15 +++++ .../examples/databases/list-documents.md | 14 +++++ .../examples/databases/update-document.md | 16 +++++ .../examples/databases/upsert-document.md | 16 +++++ .../examples/functions/create-execution.md | 19 ++++++ .../examples/functions/get-execution.md | 13 ++++ .../examples/functions/list-executions.md | 13 ++++ .../client-apple/examples/graphql/mutation.md | 12 ++++ .../client-apple/examples/graphql/query.md | 12 ++++ .../1.8.x/client-apple/examples/locale/get.md | 10 +++ .../examples/locale/list-codes.md | 10 +++ .../examples/locale/list-continents.md | 10 +++ .../examples/locale/list-countries-e-u.md | 10 +++ .../examples/locale/list-countries-phones.md | 10 +++ .../examples/locale/list-countries.md | 10 +++ .../examples/locale/list-currencies.md | 10 +++ .../examples/locale/list-languages.md | 10 +++ .../examples/messaging/create-subscriber.md | 14 +++++ .../examples/messaging/delete-subscriber.md | 13 ++++ .../examples/storage/create-file.md | 15 +++++ .../examples/storage/delete-file.md | 13 ++++ .../examples/storage/get-file-download.md | 14 +++++ .../examples/storage/get-file-preview.md | 26 ++++++++ .../examples/storage/get-file-view.md | 14 +++++ .../client-apple/examples/storage/get-file.md | 13 ++++ .../examples/storage/list-files.md | 14 +++++ .../examples/storage/update-file.md | 15 +++++ .../examples/tables/create-row.md | 18 ++++++ .../examples/tables/create-rows.md | 15 +++++ .../examples/tables/delete-row.md | 14 +++++ .../client-apple/examples/tables/get-row.md | 15 +++++ .../client-apple/examples/tables/list-rows.md | 14 +++++ .../examples/tables/update-row.md | 16 +++++ .../examples/tables/upsert-row.md | 16 +++++ .../examples/teams/create-membership.md | 18 ++++++ .../client-apple/examples/teams/create.md | 14 +++++ .../examples/teams/delete-membership.md | 13 ++++ .../client-apple/examples/teams/delete.md | 12 ++++ .../examples/teams/get-membership.md | 13 ++++ .../client-apple/examples/teams/get-prefs.md | 12 ++++ .../1.8.x/client-apple/examples/teams/get.md | 12 ++++ .../examples/teams/list-memberships.md | 14 +++++ .../1.8.x/client-apple/examples/teams/list.md | 13 ++++ .../teams/update-membership-status.md | 15 +++++ .../examples/teams/update-membership.md | 14 +++++ .../examples/teams/update-name.md | 13 ++++ .../examples/teams/update-prefs.md | 13 ++++ .../account/create-anonymous-session.md | 9 +++ .../account/create-email-password-session.md | 12 ++++ .../examples/account/create-email-token.md | 13 ++++ .../examples/account/create-j-w-t.md | 9 +++ .../account/create-magic-u-r-l-token.md | 14 +++++ .../account/create-mfa-authenticator.md | 11 ++++ .../examples/account/create-mfa-challenge.md | 11 ++++ .../account/create-mfa-recovery-codes.md | 9 +++ .../examples/account/create-o-auth2session.md | 14 +++++ .../examples/account/create-o-auth2token.md | 14 +++++ .../examples/account/create-phone-token.md | 12 ++++ .../account/create-phone-verification.md | 9 +++ .../examples/account/create-push-target.md | 13 ++++ .../examples/account/create-recovery.md | 12 ++++ .../examples/account/create-session.md | 12 ++++ .../examples/account/create-verification.md | 11 ++++ .../client-flutter/examples/account/create.md | 14 +++++ .../examples/account/delete-identity.md | 11 ++++ .../account/delete-mfa-authenticator.md | 11 ++++ .../examples/account/delete-push-target.md | 11 ++++ .../examples/account/delete-session.md | 11 ++++ .../examples/account/delete-sessions.md | 9 +++ .../account/get-mfa-recovery-codes.md | 9 +++ .../examples/account/get-prefs.md | 9 +++ .../examples/account/get-session.md | 11 ++++ .../client-flutter/examples/account/get.md | 9 +++ .../examples/account/list-identities.md | 11 ++++ .../examples/account/list-logs.md | 11 ++++ .../examples/account/list-mfa-factors.md | 9 +++ .../examples/account/list-sessions.md | 9 +++ .../examples/account/update-email.md | 12 ++++ .../examples/account/update-m-f-a.md | 11 ++++ .../account/update-magic-u-r-l-session.md | 12 ++++ .../account/update-mfa-authenticator.md | 12 ++++ .../examples/account/update-mfa-challenge.md | 12 ++++ .../account/update-mfa-recovery-codes.md | 9 +++ .../examples/account/update-name.md | 11 ++++ .../examples/account/update-password.md | 12 ++++ .../examples/account/update-phone-session.md | 12 ++++ .../account/update-phone-verification.md | 12 ++++ .../examples/account/update-phone.md | 12 ++++ .../examples/account/update-prefs.md | 11 ++++ .../examples/account/update-push-target.md | 12 ++++ .../examples/account/update-recovery.md | 13 ++++ .../examples/account/update-session.md | 11 ++++ .../examples/account/update-status.md | 9 +++ .../examples/account/update-verification.md | 12 ++++ .../examples/avatars/get-browser.md | 33 ++++++++++ .../examples/avatars/get-credit-card.md | 33 ++++++++++ .../examples/avatars/get-favicon.md | 27 ++++++++ .../examples/avatars/get-flag.md | 33 ++++++++++ .../examples/avatars/get-image.md | 31 ++++++++++ .../examples/avatars/get-initials.md | 33 ++++++++++ .../examples/avatars/get-q-r.md | 33 ++++++++++ .../examples/databases/create-document.md | 17 ++++++ .../examples/databases/create-documents.md | 14 +++++ .../examples/databases/delete-document.md | 13 ++++ .../examples/databases/get-document.md | 14 +++++ .../examples/databases/list-documents.md | 13 ++++ .../examples/databases/update-document.md | 15 +++++ .../examples/databases/upsert-document.md | 15 +++++ .../examples/functions/create-execution.md | 17 ++++++ .../examples/functions/get-execution.md | 12 ++++ .../examples/functions/list-executions.md | 12 ++++ .../examples/graphql/mutation.md | 11 ++++ .../client-flutter/examples/graphql/query.md | 11 ++++ .../client-flutter/examples/locale/get.md | 9 +++ .../examples/locale/list-codes.md | 9 +++ .../examples/locale/list-continents.md | 9 +++ .../examples/locale/list-countries-e-u.md | 9 +++ .../examples/locale/list-countries-phones.md | 9 +++ .../examples/locale/list-countries.md | 9 +++ .../examples/locale/list-currencies.md | 9 +++ .../examples/locale/list-languages.md | 9 +++ .../examples/messaging/create-subscriber.md | 13 ++++ .../examples/messaging/delete-subscriber.md | 12 ++++ .../examples/storage/create-file.md | 15 +++++ .../examples/storage/delete-file.md | 12 ++++ .../examples/storage/get-file-download.md | 31 ++++++++++ .../examples/storage/get-file-preview.md | 53 ++++++++++++++++ .../examples/storage/get-file-view.md | 31 ++++++++++ .../examples/storage/get-file.md | 12 ++++ .../examples/storage/list-files.md | 13 ++++ .../examples/storage/update-file.md | 14 +++++ .../examples/tables/create-row.md | 17 ++++++ .../examples/tables/create-rows.md | 14 +++++ .../examples/tables/delete-row.md | 13 ++++ .../client-flutter/examples/tables/get-row.md | 14 +++++ .../examples/tables/list-rows.md | 13 ++++ .../examples/tables/update-row.md | 15 +++++ .../examples/tables/upsert-row.md | 15 +++++ .../examples/teams/create-membership.md | 17 ++++++ .../client-flutter/examples/teams/create.md | 13 ++++ .../examples/teams/delete-membership.md | 12 ++++ .../client-flutter/examples/teams/delete.md | 11 ++++ .../examples/teams/get-membership.md | 12 ++++ .../examples/teams/get-prefs.md | 11 ++++ .../client-flutter/examples/teams/get.md | 11 ++++ .../examples/teams/list-memberships.md | 13 ++++ .../client-flutter/examples/teams/list.md | 12 ++++ .../teams/update-membership-status.md | 14 +++++ .../examples/teams/update-membership.md | 13 ++++ .../examples/teams/update-name.md | 12 ++++ .../examples/teams/update-prefs.md | 12 ++++ .../account/create-anonymous-session.md | 33 ++++++++++ .../account/create-email-password-session.md | 36 +++++++++++ .../examples/account/create-email-token.md | 14 +++++ .../examples/account/create-j-w-t.md | 5 ++ .../account/create-magic-u-r-l-token.md | 15 +++++ .../account/create-mfa-authenticator.md | 8 +++ .../examples/account/create-mfa-challenge.md | 10 +++ .../account/create-mfa-recovery-codes.md | 5 ++ .../examples/account/create-phone-token.md | 13 ++++ .../account/create-phone-verification.md | 10 +++ .../examples/account/create-push-target.md | 17 ++++++ .../examples/account/create-recovery.md | 13 ++++ .../examples/account/create-session.md | 36 +++++++++++ .../examples/account/create-verification.md | 12 ++++ .../client-graphql/examples/account/create.md | 40 ++++++++++++ .../examples/account/delete-identity.md | 7 +++ .../account/delete-mfa-authenticator.md | 7 +++ .../examples/account/delete-push-target.md | 7 +++ .../examples/account/delete-session.md | 7 +++ .../examples/account/delete-sessions.md | 5 ++ .../account/get-mfa-recovery-codes.md | 0 .../examples/account/get-prefs.md | 0 .../examples/account/get-session.md | 0 .../client-graphql/examples/account/get.md | 0 .../examples/account/list-identities.md | 0 .../examples/account/list-logs.md | 0 .../examples/account/list-mfa-factors.md | 0 .../examples/account/list-sessions.md | 0 .../examples/account/update-email.md | 38 ++++++++++++ .../examples/account/update-m-f-a.md | 37 +++++++++++ .../account/update-magic-u-r-l-session.md | 36 +++++++++++ .../account/update-mfa-authenticator.md | 38 ++++++++++++ .../examples/account/update-mfa-challenge.md | 36 +++++++++++ .../account/update-mfa-recovery-codes.md | 5 ++ .../examples/account/update-name.md | 37 +++++++++++ .../examples/account/update-password.md | 38 ++++++++++++ .../examples/account/update-phone-session.md | 36 +++++++++++ .../account/update-phone-verification.md | 13 ++++ .../examples/account/update-phone.md | 38 ++++++++++++ .../examples/account/update-prefs.md | 37 +++++++++++ .../examples/account/update-push-target.md | 16 +++++ .../examples/account/update-recovery.md | 14 +++++ .../examples/account/update-session.md | 35 +++++++++++ .../examples/account/update-status.md | 35 +++++++++++ .../examples/account/update-verification.md | 13 ++++ .../examples/avatars/get-browser.md | 0 .../examples/avatars/get-credit-card.md | 0 .../examples/avatars/get-favicon.md | 0 .../examples/avatars/get-flag.md | 0 .../examples/avatars/get-image.md | 0 .../examples/avatars/get-initials.md | 0 .../examples/avatars/get-q-r.md | 0 .../examples/databases/create-document.md | 18 ++++++ .../examples/databases/create-documents.md | 19 ++++++ .../examples/databases/delete-document.md | 9 +++ .../examples/databases/get-document.md | 0 .../examples/databases/list-documents.md | 0 .../examples/databases/update-document.md | 18 ++++++ .../examples/databases/upsert-document.md | 16 +++++ .../examples/functions/create-execution.md | 35 +++++++++++ .../examples/functions/get-execution.md | 0 .../examples/functions/list-executions.md | 0 .../client-graphql/examples/locale/get.md | 0 .../examples/locale/list-codes.md | 0 .../examples/locale/list-continents.md | 0 .../examples/locale/list-countries-e-u.md | 0 .../examples/locale/list-countries-phones.md | 0 .../examples/locale/list-countries.md | 0 .../examples/locale/list-currencies.md | 0 .../examples/locale/list-languages.md | 0 .../examples/messaging/create-subscriber.md | 27 ++++++++ .../examples/messaging/delete-subscriber.md | 8 +++ .../examples/storage/create-file.md | 25 ++++++++ .../examples/storage/delete-file.md | 8 +++ .../examples/storage/get-file-download.md | 0 .../examples/storage/get-file-preview.md | 0 .../examples/storage/get-file-view.md | 0 .../examples/storage/get-file.md | 0 .../examples/storage/list-files.md | 0 .../examples/storage/update-file.md | 20 ++++++ .../examples/tables/create-row.md | 18 ++++++ .../examples/tables/create-rows.md | 19 ++++++ .../examples/tables/delete-row.md | 9 +++ .../client-graphql/examples/tables/get-row.md | 0 .../examples/tables/list-rows.md | 0 .../examples/tables/update-row.md | 18 ++++++ .../examples/tables/upsert-row.md | 16 +++++ .../examples/teams/create-membership.md | 25 ++++++++ .../client-graphql/examples/teams/create.md | 16 +++++ .../examples/teams/delete-membership.md | 8 +++ .../client-graphql/examples/teams/delete.md | 7 +++ .../examples/teams/get-membership.md | 0 .../examples/teams/get-prefs.md | 0 .../client-graphql/examples/teams/get.md | 0 .../examples/teams/list-memberships.md | 0 .../client-graphql/examples/teams/list.md | 0 .../teams/update-membership-status.md | 22 +++++++ .../examples/teams/update-membership.md | 21 +++++++ .../examples/teams/update-name.md | 15 +++++ .../examples/teams/update-prefs.md | 8 +++ .../account/create-anonymous-session.md | 11 ++++ .../account/create-email-password-session.md | 14 +++++ .../examples/account/create-email-token.md | 15 +++++ .../examples/account/create-j-w-t.md | 11 ++++ .../account/create-magic-u-r-l-token.md | 16 +++++ .../account/create-mfa-authenticator.md | 13 ++++ .../examples/account/create-mfa-challenge.md | 13 ++++ .../account/create-mfa-recovery-codes.md | 11 ++++ .../examples/account/create-o-auth2session.md | 15 +++++ .../examples/account/create-o-auth2token.md | 15 +++++ .../examples/account/create-phone-token.md | 14 +++++ .../account/create-phone-verification.md | 11 ++++ .../examples/account/create-push-target.md | 15 +++++ .../examples/account/create-recovery.md | 14 +++++ .../examples/account/create-session.md | 14 +++++ .../examples/account/create-verification.md | 13 ++++ .../examples/account/create.md | 16 +++++ .../examples/account/delete-identity.md | 13 ++++ .../account/delete-mfa-authenticator.md | 13 ++++ .../examples/account/delete-push-target.md | 13 ++++ .../examples/account/delete-session.md | 13 ++++ .../examples/account/delete-sessions.md | 11 ++++ .../account/get-mfa-recovery-codes.md | 11 ++++ .../examples/account/get-prefs.md | 11 ++++ .../examples/account/get-session.md | 13 ++++ .../examples/account/get.md | 11 ++++ .../examples/account/list-identities.md | 13 ++++ .../examples/account/list-logs.md | 13 ++++ .../examples/account/list-mfa-factors.md | 11 ++++ .../examples/account/list-sessions.md | 11 ++++ .../examples/account/update-email.md | 14 +++++ .../examples/account/update-m-f-a.md | 13 ++++ .../account/update-magic-u-r-l-session.md | 14 +++++ .../account/update-mfa-authenticator.md | 14 +++++ .../examples/account/update-mfa-challenge.md | 14 +++++ .../account/update-mfa-recovery-codes.md | 11 ++++ .../examples/account/update-name.md | 13 ++++ .../examples/account/update-password.md | 14 +++++ .../examples/account/update-phone-session.md | 14 +++++ .../account/update-phone-verification.md | 14 +++++ .../examples/account/update-phone.md | 14 +++++ .../examples/account/update-prefs.md | 13 ++++ .../examples/account/update-push-target.md | 14 +++++ .../examples/account/update-recovery.md | 15 +++++ .../examples/account/update-session.md | 13 ++++ .../examples/account/update-status.md | 11 ++++ .../examples/account/update-verification.md | 14 +++++ .../examples/avatars/get-browser.md | 16 +++++ .../examples/avatars/get-credit-card.md | 16 +++++ .../examples/avatars/get-favicon.md | 13 ++++ .../examples/avatars/get-flag.md | 16 +++++ .../examples/avatars/get-image.md | 15 +++++ .../examples/avatars/get-initials.md | 16 +++++ .../examples/avatars/get-q-r.md | 16 +++++ .../examples/databases/create-document.md | 19 ++++++ .../examples/databases/create-documents.md | 16 +++++ .../examples/databases/delete-document.md | 15 +++++ .../examples/databases/get-document.md | 16 +++++ .../examples/databases/list-documents.md | 15 +++++ .../examples/databases/update-document.md | 17 ++++++ .../examples/databases/upsert-document.md | 17 ++++++ .../examples/functions/create-execution.md | 19 ++++++ .../examples/functions/get-execution.md | 14 +++++ .../examples/functions/list-executions.md | 14 +++++ .../examples/graphql/mutation.md | 13 ++++ .../examples/graphql/query.md | 13 ++++ .../examples/locale/get.md | 11 ++++ .../examples/locale/list-codes.md | 11 ++++ .../examples/locale/list-continents.md | 11 ++++ .../examples/locale/list-countries-e-u.md | 11 ++++ .../examples/locale/list-countries-phones.md | 11 ++++ .../examples/locale/list-countries.md | 11 ++++ .../examples/locale/list-currencies.md | 11 ++++ .../examples/locale/list-languages.md | 11 ++++ .../examples/messaging/create-subscriber.md | 15 +++++ .../examples/messaging/delete-subscriber.md | 14 +++++ .../examples/storage/create-file.md | 16 +++++ .../examples/storage/delete-file.md | 14 +++++ .../examples/storage/get-file-download.md | 15 +++++ .../examples/storage/get-file-preview.md | 26 ++++++++ .../examples/storage/get-file-view.md | 15 +++++ .../examples/storage/get-file.md | 14 +++++ .../examples/storage/list-files.md | 15 +++++ .../examples/storage/update-file.md | 16 +++++ .../examples/tables/create-row.md | 19 ++++++ .../examples/tables/create-rows.md | 16 +++++ .../examples/tables/delete-row.md | 15 +++++ .../examples/tables/get-row.md | 16 +++++ .../examples/tables/list-rows.md | 15 +++++ .../examples/tables/update-row.md | 17 ++++++ .../examples/tables/upsert-row.md | 17 ++++++ .../examples/teams/create-membership.md | 19 ++++++ .../examples/teams/create.md | 15 +++++ .../examples/teams/delete-membership.md | 14 +++++ .../examples/teams/delete.md | 13 ++++ .../examples/teams/get-membership.md | 14 +++++ .../examples/teams/get-prefs.md | 13 ++++ .../client-react-native/examples/teams/get.md | 13 ++++ .../examples/teams/list-memberships.md | 15 +++++ .../examples/teams/list.md | 14 +++++ .../teams/update-membership-status.md | 16 +++++ .../examples/teams/update-membership.md | 15 +++++ .../examples/teams/update-name.md | 14 +++++ .../examples/teams/update-prefs.md | 14 +++++ .../account/create-anonymous-session.md | 6 ++ .../account/create-email-password-session.md | 10 +++ .../examples/account/create-email-token.md | 11 ++++ .../examples/account/create-j-w-t.md | 6 ++ .../account/create-magic-u-r-l-token.md | 12 ++++ .../account/create-mfa-authenticator.md | 8 +++ .../examples/account/create-mfa-challenge.md | 9 +++ .../account/create-mfa-recovery-codes.md | 8 +++ .../examples/account/create-o-auth2session.md | 4 ++ .../examples/account/create-o-auth2token.md | 4 ++ .../examples/account/create-phone-token.md | 10 +++ .../account/create-phone-verification.md | 8 +++ .../examples/account/create-push-target.md | 12 ++++ .../examples/account/create-recovery.md | 12 ++++ .../examples/account/create-session.md | 10 +++ .../examples/account/create-verification.md | 11 ++++ .../client-rest/examples/account/create.md | 12 ++++ .../examples/account/delete-identity.md | 8 +++ .../account/delete-mfa-authenticator.md | 8 +++ .../examples/account/delete-push-target.md | 7 +++ .../examples/account/delete-session.md | 8 +++ .../examples/account/delete-sessions.md | 8 +++ .../account/get-mfa-recovery-codes.md | 6 ++ .../client-rest/examples/account/get-prefs.md | 6 ++ .../examples/account/get-session.md | 6 ++ .../1.8.x/client-rest/examples/account/get.md | 6 ++ .../examples/account/list-identities.md | 6 ++ .../client-rest/examples/account/list-logs.md | 6 ++ .../examples/account/list-mfa-factors.md | 6 ++ .../examples/account/list-sessions.md | 6 ++ .../examples/account/update-email.md | 12 ++++ .../examples/account/update-m-f-a.md | 11 ++++ .../account/update-magic-u-r-l-session.md | 10 +++ .../account/update-mfa-authenticator.md | 11 ++++ .../examples/account/update-mfa-challenge.md | 12 ++++ .../account/update-mfa-recovery-codes.md | 8 +++ .../examples/account/update-name.md | 11 ++++ .../examples/account/update-password.md | 12 ++++ .../examples/account/update-phone-session.md | 10 +++ .../account/update-phone-verification.md | 12 ++++ .../examples/account/update-phone.md | 12 ++++ .../examples/account/update-prefs.md | 11 ++++ .../examples/account/update-push-target.md | 10 +++ .../examples/account/update-recovery.md | 13 ++++ .../examples/account/update-session.md | 8 +++ .../examples/account/update-status.md | 8 +++ .../examples/account/update-verification.md | 12 ++++ .../examples/avatars/get-browser.md | 6 ++ .../examples/avatars/get-credit-card.md | 6 ++ .../examples/avatars/get-favicon.md | 6 ++ .../client-rest/examples/avatars/get-flag.md | 6 ++ .../client-rest/examples/avatars/get-image.md | 6 ++ .../examples/avatars/get-initials.md | 6 ++ .../client-rest/examples/avatars/get-q-r.md | 6 ++ .../examples/databases/create-document.md | 13 ++++ .../examples/databases/create-documents.md | 11 ++++ .../examples/databases/delete-document.md | 8 +++ .../examples/databases/get-document.md | 6 ++ .../examples/databases/list-documents.md | 6 ++ .../examples/databases/update-document.md | 12 ++++ .../examples/databases/upsert-document.md | 8 +++ .../examples/functions/create-execution.md | 16 +++++ .../examples/functions/get-execution.md | 6 ++ .../examples/functions/list-executions.md | 6 ++ .../client-rest/examples/graphql/mutation.md | 12 ++++ .../client-rest/examples/graphql/query.md | 12 ++++ .../1.8.x/client-rest/examples/locale/get.md | 6 ++ .../client-rest/examples/locale/list-codes.md | 6 ++ .../examples/locale/list-continents.md | 6 ++ .../examples/locale/list-countries-e-u.md | 6 ++ .../examples/locale/list-countries-phones.md | 6 ++ .../examples/locale/list-countries.md | 6 ++ .../examples/locale/list-currencies.md | 6 ++ .../examples/locale/list-languages.md | 6 ++ .../examples/messaging/create-subscriber.md | 12 ++++ .../examples/messaging/delete-subscriber.md | 8 +++ .../examples/storage/create-file.md | 26 ++++++++ .../examples/storage/delete-file.md | 8 +++ .../examples/storage/get-file-download.md | 6 ++ .../examples/storage/get-file-preview.md | 6 ++ .../examples/storage/get-file-view.md | 6 ++ .../client-rest/examples/storage/get-file.md | 6 ++ .../examples/storage/list-files.md | 6 ++ .../examples/storage/update-file.md | 12 ++++ .../client-rest/examples/tables/create-row.md | 13 ++++ .../examples/tables/create-rows.md | 11 ++++ .../client-rest/examples/tables/delete-row.md | 8 +++ .../client-rest/examples/tables/get-row.md | 6 ++ .../client-rest/examples/tables/list-rows.md | 6 ++ .../client-rest/examples/tables/update-row.md | 12 ++++ .../client-rest/examples/tables/upsert-row.md | 8 +++ .../examples/teams/create-membership.md | 16 +++++ .../client-rest/examples/teams/create.md | 13 ++++ .../examples/teams/delete-membership.md | 8 +++ .../client-rest/examples/teams/delete.md | 8 +++ .../examples/teams/get-membership.md | 6 ++ .../client-rest/examples/teams/get-prefs.md | 6 ++ .../1.8.x/client-rest/examples/teams/get.md | 6 ++ .../examples/teams/list-memberships.md | 6 ++ .../1.8.x/client-rest/examples/teams/list.md | 6 ++ .../teams/update-membership-status.md | 12 ++++ .../examples/teams/update-membership.md | 11 ++++ .../client-rest/examples/teams/update-name.md | 11 ++++ .../examples/teams/update-prefs.md | 11 ++++ .../account/create-anonymous-session.md | 11 ++++ .../account/create-email-password-session.md | 14 +++++ .../examples/account/create-email-token.md | 15 +++++ .../examples/account/create-j-w-t.md | 11 ++++ .../account/create-magic-u-r-l-token.md | 16 +++++ .../account/create-mfa-authenticator.md | 13 ++++ .../examples/account/create-mfa-challenge.md | 13 ++++ .../account/create-mfa-recovery-codes.md | 11 ++++ .../examples/account/create-o-auth2session.md | 15 +++++ .../examples/account/create-o-auth2token.md | 15 +++++ .../examples/account/create-phone-token.md | 14 +++++ .../account/create-phone-verification.md | 11 ++++ .../examples/account/create-push-target.md | 15 +++++ .../examples/account/create-recovery.md | 14 +++++ .../examples/account/create-session.md | 14 +++++ .../examples/account/create-verification.md | 13 ++++ .../client-web/examples/account/create.md | 16 +++++ .../examples/account/delete-identity.md | 13 ++++ .../account/delete-mfa-authenticator.md | 13 ++++ .../examples/account/delete-push-target.md | 13 ++++ .../examples/account/delete-session.md | 13 ++++ .../examples/account/delete-sessions.md | 11 ++++ .../account/get-mfa-recovery-codes.md | 11 ++++ .../client-web/examples/account/get-prefs.md | 11 ++++ .../examples/account/get-session.md | 13 ++++ .../1.8.x/client-web/examples/account/get.md | 11 ++++ .../examples/account/list-identities.md | 13 ++++ .../client-web/examples/account/list-logs.md | 13 ++++ .../examples/account/list-mfa-factors.md | 11 ++++ .../examples/account/list-sessions.md | 11 ++++ .../examples/account/update-email.md | 14 +++++ .../examples/account/update-m-f-a.md | 13 ++++ .../account/update-magic-u-r-l-session.md | 14 +++++ .../account/update-mfa-authenticator.md | 14 +++++ .../examples/account/update-mfa-challenge.md | 14 +++++ .../account/update-mfa-recovery-codes.md | 11 ++++ .../examples/account/update-name.md | 13 ++++ .../examples/account/update-password.md | 14 +++++ .../examples/account/update-phone-session.md | 14 +++++ .../account/update-phone-verification.md | 14 +++++ .../examples/account/update-phone.md | 14 +++++ .../examples/account/update-prefs.md | 13 ++++ .../examples/account/update-push-target.md | 14 +++++ .../examples/account/update-recovery.md | 15 +++++ .../examples/account/update-session.md | 13 ++++ .../examples/account/update-status.md | 11 ++++ .../examples/account/update-verification.md | 14 +++++ .../examples/avatars/get-browser.md | 16 +++++ .../examples/avatars/get-credit-card.md | 16 +++++ .../examples/avatars/get-favicon.md | 13 ++++ .../client-web/examples/avatars/get-flag.md | 16 +++++ .../client-web/examples/avatars/get-image.md | 15 +++++ .../examples/avatars/get-initials.md | 16 +++++ .../client-web/examples/avatars/get-q-r.md | 16 +++++ .../examples/databases/create-document.md | 19 ++++++ .../examples/databases/create-documents.md | 16 +++++ .../examples/databases/delete-document.md | 15 +++++ .../examples/databases/get-document.md | 16 +++++ .../examples/databases/list-documents.md | 15 +++++ .../examples/databases/update-document.md | 17 ++++++ .../examples/databases/upsert-document.md | 17 ++++++ .../examples/functions/create-execution.md | 19 ++++++ .../examples/functions/get-execution.md | 14 +++++ .../examples/functions/list-executions.md | 14 +++++ .../client-web/examples/graphql/mutation.md | 13 ++++ .../client-web/examples/graphql/query.md | 13 ++++ .../1.8.x/client-web/examples/locale/get.md | 11 ++++ .../client-web/examples/locale/list-codes.md | 11 ++++ .../examples/locale/list-continents.md | 11 ++++ .../examples/locale/list-countries-e-u.md | 11 ++++ .../examples/locale/list-countries-phones.md | 11 ++++ .../examples/locale/list-countries.md | 11 ++++ .../examples/locale/list-currencies.md | 11 ++++ .../examples/locale/list-languages.md | 11 ++++ .../examples/messaging/create-subscriber.md | 15 +++++ .../examples/messaging/delete-subscriber.md | 14 +++++ .../examples/storage/create-file.md | 16 +++++ .../examples/storage/delete-file.md | 14 +++++ .../examples/storage/get-file-download.md | 15 +++++ .../examples/storage/get-file-preview.md | 26 ++++++++ .../examples/storage/get-file-view.md | 15 +++++ .../client-web/examples/storage/get-file.md | 14 +++++ .../client-web/examples/storage/list-files.md | 15 +++++ .../examples/storage/update-file.md | 16 +++++ .../client-web/examples/tables/create-row.md | 19 ++++++ .../client-web/examples/tables/create-rows.md | 16 +++++ .../client-web/examples/tables/delete-row.md | 15 +++++ .../client-web/examples/tables/get-row.md | 16 +++++ .../client-web/examples/tables/list-rows.md | 15 +++++ .../client-web/examples/tables/update-row.md | 17 ++++++ .../client-web/examples/tables/upsert-row.md | 17 ++++++ .../examples/teams/create-membership.md | 19 ++++++ .../1.8.x/client-web/examples/teams/create.md | 15 +++++ .../examples/teams/delete-membership.md | 14 +++++ .../1.8.x/client-web/examples/teams/delete.md | 13 ++++ .../examples/teams/get-membership.md | 14 +++++ .../client-web/examples/teams/get-prefs.md | 13 ++++ .../1.8.x/client-web/examples/teams/get.md | 13 ++++ .../examples/teams/list-memberships.md | 15 +++++ .../1.8.x/client-web/examples/teams/list.md | 14 +++++ .../teams/update-membership-status.md | 16 +++++ .../examples/teams/update-membership.md | 15 +++++ .../client-web/examples/teams/update-name.md | 14 +++++ .../client-web/examples/teams/update-prefs.md | 14 +++++ .../account/create-anonymous-session.md | 1 + .../account/create-email-password-session.md | 3 + .../examples/account/create-email-token.md | 4 ++ .../examples/account/create-j-w-t.md | 1 + .../account/create-magic-u-r-l-token.md | 5 ++ .../account/create-mfa-authenticator.md | 2 + .../examples/account/create-mfa-challenge.md | 2 + .../account/create-mfa-recovery-codes.md | 1 + .../examples/account/create-o-auth2session.md | 5 ++ .../examples/account/create-o-auth2token.md | 5 ++ .../examples/account/create-phone-token.md | 3 + .../account/create-phone-verification.md | 1 + .../examples/account/create-push-target.md | 4 ++ .../examples/account/create-recovery.md | 3 + .../examples/account/create-session.md | 3 + .../examples/account/create-verification.md | 2 + .../console-cli/examples/account/create.md | 5 ++ .../examples/account/delete-identity.md | 2 + .../account/delete-mfa-authenticator.md | 2 + .../examples/account/delete-push-target.md | 2 + .../examples/account/delete-session.md | 2 + .../examples/account/delete-sessions.md | 1 + .../console-cli/examples/account/delete.md | 1 + .../account/get-mfa-recovery-codes.md | 1 + .../console-cli/examples/account/get-prefs.md | 1 + .../examples/account/get-session.md | 2 + .../1.8.x/console-cli/examples/account/get.md | 1 + .../examples/account/list-identities.md | 2 + .../console-cli/examples/account/list-logs.md | 2 + .../examples/account/list-mfa-factors.md | 1 + .../examples/account/list-sessions.md | 1 + .../examples/account/update-email.md | 3 + .../examples/account/update-m-f-a.md | 2 + .../account/update-magic-u-r-l-session.md | 3 + .../account/update-mfa-authenticator.md | 3 + .../examples/account/update-mfa-challenge.md | 3 + .../account/update-mfa-recovery-codes.md | 1 + .../examples/account/update-name.md | 2 + .../examples/account/update-password.md | 3 + .../examples/account/update-phone-session.md | 3 + .../account/update-phone-verification.md | 3 + .../examples/account/update-phone.md | 3 + .../examples/account/update-prefs.md | 2 + .../examples/account/update-push-target.md | 3 + .../examples/account/update-recovery.md | 4 ++ .../examples/account/update-session.md | 2 + .../examples/account/update-status.md | 1 + .../examples/account/update-verification.md | 3 + .../examples/avatars/get-browser.md | 5 ++ .../examples/avatars/get-credit-card.md | 5 ++ .../examples/avatars/get-favicon.md | 2 + .../console-cli/examples/avatars/get-flag.md | 5 ++ .../console-cli/examples/avatars/get-image.md | 4 ++ .../examples/avatars/get-initials.md | 5 ++ .../console-cli/examples/avatars/get-q-r.md | 5 ++ .../examples/console/get-resource.md | 3 + .../console-cli/examples/console/variables.md | 1 + .../databases/create-boolean-attribute.md | 7 +++ .../examples/databases/create-collection.md | 7 +++ .../databases/create-datetime-attribute.md | 7 +++ .../examples/databases/create-document.md | 6 ++ .../examples/databases/create-documents.md | 4 ++ .../databases/create-email-attribute.md | 7 +++ .../databases/create-enum-attribute.md | 8 +++ .../databases/create-float-attribute.md | 9 +++ .../examples/databases/create-index.md | 8 +++ .../databases/create-integer-attribute.md | 9 +++ .../examples/databases/create-ip-attribute.md | 7 +++ .../create-relationship-attribute.md | 9 +++ .../databases/create-string-attribute.md | 9 +++ .../databases/create-url-attribute.md | 7 +++ .../console-cli/examples/databases/create.md | 4 ++ .../databases/decrement-document-attribute.md | 7 +++ .../examples/databases/delete-attribute.md | 4 ++ .../examples/databases/delete-collection.md | 3 + .../examples/databases/delete-document.md | 4 ++ .../examples/databases/delete-documents.md | 4 ++ .../examples/databases/delete-index.md | 4 ++ .../console-cli/examples/databases/delete.md | 2 + .../examples/databases/get-attribute.md | 4 ++ .../databases/get-collection-usage.md | 4 ++ .../examples/databases/get-collection.md | 3 + .../examples/databases/get-document.md | 5 ++ .../examples/databases/get-index.md | 4 ++ .../examples/databases/get-usage.md | 3 + .../console-cli/examples/databases/get.md | 2 + .../databases/increment-document-attribute.md | 7 +++ .../examples/databases/list-attributes.md | 4 ++ .../databases/list-collection-logs.md | 4 ++ .../examples/databases/list-collections.md | 4 ++ .../examples/databases/list-document-logs.md | 5 ++ .../examples/databases/list-documents.md | 4 ++ .../examples/databases/list-indexes.md | 4 ++ .../examples/databases/list-logs.md | 3 + .../examples/databases/list-table-logs.md | 4 ++ .../examples/databases/list-usages.md | 2 + .../console-cli/examples/databases/list.md | 3 + .../databases/update-boolean-attribute.md | 7 +++ .../examples/databases/update-collection.md | 7 +++ .../databases/update-datetime-attribute.md | 7 +++ .../examples/databases/update-document.md | 6 ++ .../examples/databases/update-documents.md | 5 ++ .../databases/update-email-attribute.md | 7 +++ .../databases/update-enum-attribute.md | 8 +++ .../databases/update-float-attribute.md | 9 +++ .../databases/update-integer-attribute.md | 9 +++ .../examples/databases/update-ip-attribute.md | 7 +++ .../update-relationship-attribute.md | 6 ++ .../databases/update-string-attribute.md | 8 +++ .../databases/update-url-attribute.md | 7 +++ .../console-cli/examples/databases/update.md | 4 ++ .../examples/databases/upsert-document.md | 4 ++ .../examples/databases/upsert-documents.md | 3 + .../examples/functions/create-deployment.md | 6 ++ .../functions/create-duplicate-deployment.md | 4 ++ .../examples/functions/create-execution.md | 8 +++ .../functions/create-template-deployment.md | 7 +++ .../examples/functions/create-variable.md | 5 ++ .../functions/create-vcs-deployment.md | 5 ++ .../console-cli/examples/functions/create.md | 19 ++++++ .../examples/functions/delete-deployment.md | 3 + .../examples/functions/delete-execution.md | 3 + .../examples/functions/delete-variable.md | 3 + .../console-cli/examples/functions/delete.md | 2 + .../functions/get-deployment-download.md | 4 ++ .../examples/functions/get-deployment.md | 3 + .../examples/functions/get-execution.md | 3 + .../examples/functions/get-template.md | 2 + .../examples/functions/get-usage.md | 3 + .../examples/functions/get-variable.md | 3 + .../console-cli/examples/functions/get.md | 2 + .../examples/functions/list-deployments.md | 4 ++ .../examples/functions/list-executions.md | 3 + .../examples/functions/list-runtimes.md | 1 + .../examples/functions/list-specifications.md | 1 + .../examples/functions/list-templates.md | 5 ++ .../examples/functions/list-usage.md | 2 + .../examples/functions/list-variables.md | 2 + .../console-cli/examples/functions/list.md | 3 + .../functions/update-deployment-status.md | 3 + .../functions/update-function-deployment.md | 3 + .../examples/functions/update-variable.md | 6 ++ .../console-cli/examples/functions/update.md | 19 ++++++ .../console-cli/examples/graphql/mutation.md | 2 + .../console-cli/examples/graphql/query.md | 2 + .../examples/health/get-antivirus.md | 1 + .../console-cli/examples/health/get-cache.md | 1 + .../examples/health/get-certificate.md | 2 + .../console-cli/examples/health/get-d-b.md | 1 + .../examples/health/get-failed-jobs.md | 3 + .../examples/health/get-pub-sub.md | 1 + .../examples/health/get-queue-builds.md | 2 + .../examples/health/get-queue-certificates.md | 2 + .../examples/health/get-queue-databases.md | 3 + .../examples/health/get-queue-deletes.md | 2 + .../examples/health/get-queue-functions.md | 2 + .../examples/health/get-queue-logs.md | 2 + .../examples/health/get-queue-mails.md | 2 + .../examples/health/get-queue-messaging.md | 2 + .../examples/health/get-queue-migrations.md | 2 + .../health/get-queue-stats-resources.md | 2 + .../examples/health/get-queue-usage.md | 2 + .../examples/health/get-queue-webhooks.md | 2 + .../examples/health/get-storage-local.md | 1 + .../examples/health/get-storage.md | 1 + .../console-cli/examples/health/get-time.md | 1 + .../1.8.x/console-cli/examples/health/get.md | 1 + .../1.8.x/console-cli/examples/locale/get.md | 1 + .../console-cli/examples/locale/list-codes.md | 1 + .../examples/locale/list-continents.md | 1 + .../examples/locale/list-countries-e-u.md | 1 + .../examples/locale/list-countries-phones.md | 1 + .../examples/locale/list-countries.md | 1 + .../examples/locale/list-currencies.md | 1 + .../examples/locale/list-languages.md | 1 + .../messaging/create-apns-provider.md | 9 +++ .../examples/messaging/create-email.md | 13 ++++ .../examples/messaging/create-fcm-provider.md | 5 ++ .../messaging/create-mailgun-provider.md | 11 ++++ .../messaging/create-msg91provider.md | 7 +++ .../examples/messaging/create-push.md | 20 ++++++ .../messaging/create-sendgrid-provider.md | 9 +++ .../examples/messaging/create-sms.md | 8 +++ .../messaging/create-smtp-provider.md | 15 +++++ .../examples/messaging/create-subscriber.md | 4 ++ .../messaging/create-telesign-provider.md | 7 +++ .../messaging/create-textmagic-provider.md | 7 +++ .../examples/messaging/create-topic.md | 4 ++ .../messaging/create-twilio-provider.md | 7 +++ .../messaging/create-vonage-provider.md | 7 +++ .../examples/messaging/delete-provider.md | 2 + .../examples/messaging/delete-subscriber.md | 3 + .../examples/messaging/delete-topic.md | 2 + .../console-cli/examples/messaging/delete.md | 2 + .../examples/messaging/get-message.md | 2 + .../examples/messaging/get-provider.md | 2 + .../examples/messaging/get-subscriber.md | 3 + .../examples/messaging/get-topic.md | 2 + .../examples/messaging/list-message-logs.md | 3 + .../examples/messaging/list-messages.md | 3 + .../examples/messaging/list-provider-logs.md | 3 + .../examples/messaging/list-providers.md | 3 + .../messaging/list-subscriber-logs.md | 3 + .../examples/messaging/list-subscribers.md | 4 ++ .../examples/messaging/list-targets.md | 3 + .../examples/messaging/list-topic-logs.md | 3 + .../examples/messaging/list-topics.md | 3 + .../messaging/update-apns-provider.md | 9 +++ .../examples/messaging/update-email.md | 13 ++++ .../examples/messaging/update-fcm-provider.md | 5 ++ .../messaging/update-mailgun-provider.md | 11 ++++ .../messaging/update-msg91provider.md | 7 +++ .../examples/messaging/update-push.md | 20 ++++++ .../messaging/update-sendgrid-provider.md | 9 +++ .../examples/messaging/update-sms.md | 8 +++ .../messaging/update-smtp-provider.md | 15 +++++ .../messaging/update-telesign-provider.md | 7 +++ .../messaging/update-textmagic-provider.md | 7 +++ .../examples/messaging/update-topic.md | 4 ++ .../messaging/update-twilio-provider.md | 7 +++ .../messaging/update-vonage-provider.md | 7 +++ .../migrations/create-appwrite-migration.md | 5 ++ .../migrations/create-csv-migration.md | 4 ++ .../migrations/create-firebase-migration.md | 3 + .../migrations/create-n-host-migration.md | 9 +++ .../migrations/create-supabase-migration.md | 8 +++ .../console-cli/examples/migrations/delete.md | 2 + .../migrations/get-appwrite-report.md | 5 ++ .../migrations/get-firebase-report.md | 3 + .../examples/migrations/get-n-host-report.md | 9 +++ .../migrations/get-supabase-report.md | 8 +++ .../console-cli/examples/migrations/get.md | 2 + .../console-cli/examples/migrations/list.md | 3 + .../console-cli/examples/migrations/retry.md | 2 + .../examples/project/create-variable.md | 4 ++ .../examples/project/delete-variable.md | 2 + .../console-cli/examples/project/get-usage.md | 4 ++ .../examples/project/get-variable.md | 2 + .../examples/project/list-variables.md | 1 + .../examples/project/update-variable.md | 5 ++ .../examples/projects/create-dev-key.md | 4 ++ .../examples/projects/create-j-w-t.md | 4 ++ .../examples/projects/create-key.md | 5 ++ .../examples/projects/create-platform.md | 7 +++ .../examples/projects/create-smtp-test.md | 11 ++++ .../examples/projects/create-webhook.md | 9 +++ .../console-cli/examples/projects/create.md | 14 +++++ .../examples/projects/delete-dev-key.md | 3 + .../projects/delete-email-template.md | 4 ++ .../examples/projects/delete-key.md | 3 + .../examples/projects/delete-platform.md | 3 + .../examples/projects/delete-sms-template.md | 4 ++ .../examples/projects/delete-webhook.md | 3 + .../console-cli/examples/projects/delete.md | 2 + .../examples/projects/get-dev-key.md | 3 + .../examples/projects/get-email-template.md | 4 ++ .../console-cli/examples/projects/get-key.md | 3 + .../examples/projects/get-platform.md | 3 + .../examples/projects/get-sms-template.md | 4 ++ .../examples/projects/get-webhook.md | 3 + .../console-cli/examples/projects/get.md | 2 + .../examples/projects/list-dev-keys.md | 3 + .../examples/projects/list-keys.md | 2 + .../examples/projects/list-platforms.md | 2 + .../examples/projects/list-webhooks.md | 2 + .../console-cli/examples/projects/list.md | 3 + .../projects/update-api-status-all.md | 3 + .../examples/projects/update-api-status.md | 4 ++ .../examples/projects/update-auth-duration.md | 3 + .../examples/projects/update-auth-limit.md | 3 + .../update-auth-password-dictionary.md | 3 + .../projects/update-auth-password-history.md | 3 + .../projects/update-auth-sessions-limit.md | 3 + .../examples/projects/update-auth-status.md | 4 ++ .../examples/projects/update-dev-key.md | 5 ++ .../projects/update-email-template.md | 9 +++ .../examples/projects/update-key.md | 6 ++ .../projects/update-memberships-privacy.md | 5 ++ .../examples/projects/update-mock-numbers.md | 3 + .../examples/projects/update-o-auth2.md | 6 ++ .../projects/update-personal-data-check.md | 3 + .../examples/projects/update-platform.md | 7 +++ .../projects/update-service-status-all.md | 3 + .../projects/update-service-status.md | 4 ++ .../projects/update-session-alerts.md | 3 + .../projects/update-session-invalidation.md | 3 + .../examples/projects/update-sms-template.md | 5 ++ .../examples/projects/update-smtp.md | 11 ++++ .../examples/projects/update-team.md | 3 + .../projects/update-webhook-signature.md | 3 + .../examples/projects/update-webhook.md | 10 +++ .../console-cli/examples/projects/update.md | 12 ++++ .../examples/proxy/create-a-p-i-rule.md | 2 + .../examples/proxy/create-function-rule.md | 4 ++ .../examples/proxy/create-redirect-rule.md | 6 ++ .../examples/proxy/create-site-rule.md | 4 ++ .../console-cli/examples/proxy/delete-rule.md | 2 + .../console-cli/examples/proxy/get-rule.md | 2 + .../console-cli/examples/proxy/list-rules.md | 3 + .../proxy/update-rule-verification.md | 2 + .../examples/sites/create-deployment.md | 7 +++ .../sites/create-duplicate-deployment.md | 3 + .../sites/create-template-deployment.md | 7 +++ .../examples/sites/create-variable.md | 5 ++ .../examples/sites/create-vcs-deployment.md | 5 ++ .../console-cli/examples/sites/create.md | 19 ++++++ .../examples/sites/delete-deployment.md | 3 + .../console-cli/examples/sites/delete-log.md | 3 + .../examples/sites/delete-variable.md | 3 + .../console-cli/examples/sites/delete.md | 2 + .../examples/sites/get-deployment-download.md | 4 ++ .../examples/sites/get-deployment.md | 3 + .../console-cli/examples/sites/get-log.md | 3 + .../examples/sites/get-template.md | 2 + .../console-cli/examples/sites/get-usage.md | 3 + .../examples/sites/get-variable.md | 3 + .../1.8.x/console-cli/examples/sites/get.md | 2 + .../examples/sites/list-deployments.md | 4 ++ .../examples/sites/list-frameworks.md | 1 + .../console-cli/examples/sites/list-logs.md | 3 + .../examples/sites/list-specifications.md | 1 + .../examples/sites/list-templates.md | 5 ++ .../console-cli/examples/sites/list-usage.md | 2 + .../examples/sites/list-variables.md | 2 + .../1.8.x/console-cli/examples/sites/list.md | 3 + .../sites/update-deployment-status.md | 3 + .../examples/sites/update-site-deployment.md | 3 + .../examples/sites/update-variable.md | 6 ++ .../console-cli/examples/sites/update.md | 19 ++++++ .../examples/storage/create-bucket.md | 11 ++++ .../examples/storage/create-file.md | 5 ++ .../examples/storage/delete-bucket.md | 2 + .../examples/storage/delete-file.md | 3 + .../examples/storage/get-bucket-usage.md | 3 + .../examples/storage/get-bucket.md | 2 + .../examples/storage/get-file-download.md | 4 ++ .../examples/storage/get-file-preview.md | 15 +++++ .../examples/storage/get-file-view.md | 4 ++ .../console-cli/examples/storage/get-file.md | 3 + .../console-cli/examples/storage/get-usage.md | 2 + .../examples/storage/list-buckets.md | 3 + .../examples/storage/list-files.md | 4 ++ .../examples/storage/update-bucket.md | 11 ++++ .../examples/storage/update-file.md | 5 ++ .../examples/tables/create-boolean-column.md | 7 +++ .../examples/tables/create-datetime-column.md | 7 +++ .../examples/tables/create-email-column.md | 7 +++ .../examples/tables/create-enum-column.md | 8 +++ .../examples/tables/create-float-column.md | 9 +++ .../examples/tables/create-index.md | 8 +++ .../examples/tables/create-integer-column.md | 9 +++ .../examples/tables/create-ip-column.md | 7 +++ .../tables/create-relationship-column.md | 9 +++ .../console-cli/examples/tables/create-row.md | 6 ++ .../examples/tables/create-rows.md | 4 ++ .../examples/tables/create-string-column.md | 9 +++ .../examples/tables/create-url-column.md | 7 +++ .../console-cli/examples/tables/create.md | 7 +++ .../examples/tables/decrement-row-column.md | 7 +++ .../examples/tables/delete-column.md | 4 ++ .../examples/tables/delete-index.md | 4 ++ .../console-cli/examples/tables/delete-row.md | 4 ++ .../examples/tables/delete-rows.md | 4 ++ .../console-cli/examples/tables/delete.md | 3 + .../console-cli/examples/tables/get-column.md | 4 ++ .../console-cli/examples/tables/get-index.md | 4 ++ .../console-cli/examples/tables/get-row.md | 5 ++ .../examples/tables/get-table-usage.md | 4 ++ .../1.8.x/console-cli/examples/tables/get.md | 3 + .../examples/tables/increment-row-column.md | 7 +++ .../examples/tables/list-columns.md | 4 ++ .../examples/tables/list-indexes.md | 4 ++ .../examples/tables/list-row-logs.md | 5 ++ .../console-cli/examples/tables/list-rows.md | 4 ++ .../1.8.x/console-cli/examples/tables/list.md | 4 ++ .../examples/tables/update-boolean-column.md | 7 +++ .../examples/tables/update-datetime-column.md | 7 +++ .../examples/tables/update-email-column.md | 7 +++ .../examples/tables/update-enum-column.md | 8 +++ .../examples/tables/update-float-column.md | 9 +++ .../examples/tables/update-integer-column.md | 9 +++ .../examples/tables/update-ip-column.md | 7 +++ .../tables/update-relationship-column.md | 6 ++ .../console-cli/examples/tables/update-row.md | 6 ++ .../examples/tables/update-rows.md | 5 ++ .../examples/tables/update-string-column.md | 8 +++ .../examples/tables/update-url-column.md | 7 +++ .../console-cli/examples/tables/update.md | 7 +++ .../console-cli/examples/tables/upsert-row.md | 4 ++ .../examples/tables/upsert-rows.md | 3 + .../examples/teams/create-membership.md | 8 +++ .../console-cli/examples/teams/create.md | 4 ++ .../examples/teams/delete-membership.md | 3 + .../console-cli/examples/teams/delete.md | 2 + .../examples/teams/get-membership.md | 3 + .../console-cli/examples/teams/get-prefs.md | 2 + .../1.8.x/console-cli/examples/teams/get.md | 2 + .../console-cli/examples/teams/list-logs.md | 3 + .../examples/teams/list-memberships.md | 4 ++ .../1.8.x/console-cli/examples/teams/list.md | 3 + .../teams/update-membership-status.md | 5 ++ .../examples/teams/update-membership.md | 4 ++ .../console-cli/examples/teams/update-name.md | 3 + .../examples/teams/update-prefs.md | 3 + .../examples/tokens/create-file-token.md | 4 ++ .../console-cli/examples/tokens/delete.md | 2 + .../1.8.x/console-cli/examples/tokens/get.md | 2 + .../1.8.x/console-cli/examples/tokens/list.md | 4 ++ .../console-cli/examples/tokens/update.md | 3 + .../examples/users/create-argon2user.md | 5 ++ .../examples/users/create-bcrypt-user.md | 5 ++ .../examples/users/create-j-w-t.md | 4 ++ .../examples/users/create-m-d5user.md | 5 ++ .../users/create-mfa-recovery-codes.md | 2 + .../examples/users/create-p-h-pass-user.md | 5 ++ .../examples/users/create-s-h-a-user.md | 6 ++ .../users/create-scrypt-modified-user.md | 8 +++ .../examples/users/create-scrypt-user.md | 10 +++ .../examples/users/create-session.md | 2 + .../examples/users/create-target.md | 7 +++ .../examples/users/create-token.md | 4 ++ .../console-cli/examples/users/create.md | 6 ++ .../examples/users/delete-identity.md | 2 + .../users/delete-mfa-authenticator.md | 3 + .../examples/users/delete-session.md | 3 + .../examples/users/delete-sessions.md | 2 + .../examples/users/delete-target.md | 3 + .../console-cli/examples/users/delete.md | 2 + .../examples/users/get-mfa-recovery-codes.md | 2 + .../console-cli/examples/users/get-prefs.md | 2 + .../console-cli/examples/users/get-target.md | 3 + .../console-cli/examples/users/get-usage.md | 2 + .../1.8.x/console-cli/examples/users/get.md | 2 + .../examples/users/list-identities.md | 3 + .../console-cli/examples/users/list-logs.md | 3 + .../examples/users/list-memberships.md | 4 ++ .../examples/users/list-mfa-factors.md | 2 + .../examples/users/list-sessions.md | 2 + .../examples/users/list-targets.md | 3 + .../1.8.x/console-cli/examples/users/list.md | 3 + .../users/update-email-verification.md | 3 + .../examples/users/update-email.md | 3 + .../examples/users/update-labels.md | 3 + .../users/update-mfa-recovery-codes.md | 2 + .../console-cli/examples/users/update-mfa.md | 3 + .../console-cli/examples/users/update-name.md | 3 + .../examples/users/update-password.md | 3 + .../users/update-phone-verification.md | 3 + .../examples/users/update-phone.md | 3 + .../examples/users/update-prefs.md | 3 + .../examples/users/update-status.md | 3 + .../examples/users/update-target.md | 6 ++ .../vcs/create-repository-detection.md | 5 ++ .../examples/vcs/create-repository.md | 4 ++ .../examples/vcs/delete-installation.md | 2 + .../examples/vcs/get-installation.md | 2 + .../examples/vcs/get-repository-contents.md | 5 ++ .../examples/vcs/get-repository.md | 3 + .../examples/vcs/list-installations.md | 3 + .../examples/vcs/list-repositories.md | 4 ++ .../examples/vcs/list-repository-branches.md | 3 + .../vcs/update-external-deployments.md | 4 ++ .../account/create-anonymous-session.md | 11 ++++ .../account/create-email-password-session.md | 14 +++++ .../examples/account/create-email-token.md | 15 +++++ .../examples/account/create-j-w-t.md | 11 ++++ .../account/create-magic-u-r-l-token.md | 16 +++++ .../account/create-mfa-authenticator.md | 13 ++++ .../examples/account/create-mfa-challenge.md | 13 ++++ .../account/create-mfa-recovery-codes.md | 11 ++++ .../examples/account/create-o-auth2session.md | 15 +++++ .../examples/account/create-o-auth2token.md | 15 +++++ .../examples/account/create-phone-token.md | 14 +++++ .../account/create-phone-verification.md | 11 ++++ .../examples/account/create-push-target.md | 15 +++++ .../examples/account/create-recovery.md | 14 +++++ .../examples/account/create-session.md | 14 +++++ .../examples/account/create-verification.md | 13 ++++ .../console-web/examples/account/create.md | 16 +++++ .../examples/account/delete-identity.md | 13 ++++ .../account/delete-mfa-authenticator.md | 13 ++++ .../examples/account/delete-push-target.md | 13 ++++ .../examples/account/delete-session.md | 13 ++++ .../examples/account/delete-sessions.md | 11 ++++ .../console-web/examples/account/delete.md | 11 ++++ .../account/get-mfa-recovery-codes.md | 11 ++++ .../console-web/examples/account/get-prefs.md | 11 ++++ .../examples/account/get-session.md | 13 ++++ .../1.8.x/console-web/examples/account/get.md | 11 ++++ .../examples/account/list-identities.md | 13 ++++ .../console-web/examples/account/list-logs.md | 13 ++++ .../examples/account/list-mfa-factors.md | 11 ++++ .../examples/account/list-sessions.md | 11 ++++ .../examples/account/update-email.md | 14 +++++ .../examples/account/update-m-f-a.md | 13 ++++ .../account/update-magic-u-r-l-session.md | 14 +++++ .../account/update-mfa-authenticator.md | 14 +++++ .../examples/account/update-mfa-challenge.md | 14 +++++ .../account/update-mfa-recovery-codes.md | 11 ++++ .../examples/account/update-name.md | 13 ++++ .../examples/account/update-password.md | 14 +++++ .../examples/account/update-phone-session.md | 14 +++++ .../account/update-phone-verification.md | 14 +++++ .../examples/account/update-phone.md | 14 +++++ .../examples/account/update-prefs.md | 13 ++++ .../examples/account/update-push-target.md | 14 +++++ .../examples/account/update-recovery.md | 15 +++++ .../examples/account/update-session.md | 13 ++++ .../examples/account/update-status.md | 11 ++++ .../examples/account/update-verification.md | 14 +++++ .../console-web/examples/assistant/chat.md | 13 ++++ .../examples/avatars/get-browser.md | 16 +++++ .../examples/avatars/get-credit-card.md | 16 +++++ .../examples/avatars/get-favicon.md | 13 ++++ .../console-web/examples/avatars/get-flag.md | 16 +++++ .../console-web/examples/avatars/get-image.md | 15 +++++ .../examples/avatars/get-initials.md | 16 +++++ .../console-web/examples/avatars/get-q-r.md | 16 +++++ .../examples/console/get-resource.md | 14 +++++ .../console-web/examples/console/variables.md | 11 ++++ .../databases/create-boolean-attribute.md | 18 ++++++ .../examples/databases/create-collection.md | 18 ++++++ .../databases/create-datetime-attribute.md | 18 ++++++ .../examples/databases/create-document.md | 19 ++++++ .../examples/databases/create-documents.md | 16 +++++ .../databases/create-email-attribute.md | 18 ++++++ .../databases/create-enum-attribute.md | 19 ++++++ .../databases/create-float-attribute.md | 20 ++++++ .../examples/databases/create-index.md | 19 ++++++ .../databases/create-integer-attribute.md | 20 ++++++ .../examples/databases/create-ip-attribute.md | 18 ++++++ .../create-relationship-attribute.md | 20 ++++++ .../databases/create-string-attribute.md | 20 ++++++ .../databases/create-url-attribute.md | 18 ++++++ .../console-web/examples/databases/create.md | 15 +++++ .../databases/decrement-document-attribute.md | 18 ++++++ .../examples/databases/delete-attribute.md | 15 +++++ .../examples/databases/delete-collection.md | 14 +++++ .../examples/databases/delete-document.md | 15 +++++ .../examples/databases/delete-documents.md | 15 +++++ .../examples/databases/delete-index.md | 15 +++++ .../console-web/examples/databases/delete.md | 13 ++++ .../examples/databases/get-attribute.md | 15 +++++ .../databases/get-collection-usage.md | 15 +++++ .../examples/databases/get-collection.md | 14 +++++ .../examples/databases/get-document.md | 16 +++++ .../examples/databases/get-index.md | 15 +++++ .../examples/databases/get-usage.md | 14 +++++ .../console-web/examples/databases/get.md | 13 ++++ .../databases/increment-document-attribute.md | 18 ++++++ .../examples/databases/list-attributes.md | 15 +++++ .../databases/list-collection-logs.md | 15 +++++ .../examples/databases/list-collections.md | 15 +++++ .../examples/databases/list-document-logs.md | 16 +++++ .../examples/databases/list-documents.md | 15 +++++ .../examples/databases/list-indexes.md | 15 +++++ .../examples/databases/list-logs.md | 14 +++++ .../examples/databases/list-table-logs.md | 15 +++++ .../examples/databases/list-usages.md | 13 ++++ .../console-web/examples/databases/list.md | 14 +++++ .../databases/update-boolean-attribute.md | 18 ++++++ .../examples/databases/update-collection.md | 18 ++++++ .../databases/update-datetime-attribute.md | 18 ++++++ .../examples/databases/update-document.md | 17 ++++++ .../examples/databases/update-documents.md | 16 +++++ .../databases/update-email-attribute.md | 18 ++++++ .../databases/update-enum-attribute.md | 19 ++++++ .../databases/update-float-attribute.md | 20 ++++++ .../databases/update-integer-attribute.md | 20 ++++++ .../examples/databases/update-ip-attribute.md | 18 ++++++ .../update-relationship-attribute.md | 17 ++++++ .../databases/update-string-attribute.md | 19 ++++++ .../databases/update-url-attribute.md | 18 ++++++ .../console-web/examples/databases/update.md | 15 +++++ .../examples/databases/upsert-document.md | 17 ++++++ .../examples/databases/upsert-documents.md | 15 +++++ .../examples/functions/create-deployment.md | 17 ++++++ .../functions/create-duplicate-deployment.md | 15 +++++ .../examples/functions/create-execution.md | 19 ++++++ .../functions/create-template-deployment.md | 18 ++++++ .../examples/functions/create-variable.md | 16 +++++ .../functions/create-vcs-deployment.md | 16 +++++ .../console-web/examples/functions/create.md | 30 +++++++++ .../examples/functions/delete-deployment.md | 14 +++++ .../examples/functions/delete-execution.md | 14 +++++ .../examples/functions/delete-variable.md | 14 +++++ .../console-web/examples/functions/delete.md | 13 ++++ .../functions/get-deployment-download.md | 15 +++++ .../examples/functions/get-deployment.md | 14 +++++ .../examples/functions/get-execution.md | 14 +++++ .../examples/functions/get-template.md | 13 ++++ .../examples/functions/get-usage.md | 14 +++++ .../examples/functions/get-variable.md | 14 +++++ .../console-web/examples/functions/get.md | 13 ++++ .../examples/functions/list-deployments.md | 15 +++++ .../examples/functions/list-executions.md | 14 +++++ .../examples/functions/list-runtimes.md | 11 ++++ .../examples/functions/list-specifications.md | 11 ++++ .../examples/functions/list-templates.md | 16 +++++ .../examples/functions/list-usage.md | 13 ++++ .../examples/functions/list-variables.md | 13 ++++ .../console-web/examples/functions/list.md | 14 +++++ .../functions/update-deployment-status.md | 14 +++++ .../functions/update-function-deployment.md | 14 +++++ .../examples/functions/update-variable.md | 17 ++++++ .../console-web/examples/functions/update.md | 30 +++++++++ .../console-web/examples/graphql/mutation.md | 13 ++++ .../console-web/examples/graphql/query.md | 13 ++++ .../examples/health/get-antivirus.md | 11 ++++ .../console-web/examples/health/get-cache.md | 11 ++++ .../examples/health/get-certificate.md | 13 ++++ .../console-web/examples/health/get-d-b.md | 11 ++++ .../examples/health/get-failed-jobs.md | 14 +++++ .../examples/health/get-pub-sub.md | 11 ++++ .../examples/health/get-queue-builds.md | 13 ++++ .../examples/health/get-queue-certificates.md | 13 ++++ .../examples/health/get-queue-databases.md | 14 +++++ .../examples/health/get-queue-deletes.md | 13 ++++ .../examples/health/get-queue-functions.md | 13 ++++ .../examples/health/get-queue-logs.md | 13 ++++ .../examples/health/get-queue-mails.md | 13 ++++ .../examples/health/get-queue-messaging.md | 13 ++++ .../examples/health/get-queue-migrations.md | 13 ++++ .../health/get-queue-stats-resources.md | 13 ++++ .../examples/health/get-queue-usage.md | 13 ++++ .../examples/health/get-queue-webhooks.md | 13 ++++ .../examples/health/get-storage-local.md | 11 ++++ .../examples/health/get-storage.md | 11 ++++ .../console-web/examples/health/get-time.md | 11 ++++ .../1.8.x/console-web/examples/health/get.md | 11 ++++ .../1.8.x/console-web/examples/locale/get.md | 11 ++++ .../console-web/examples/locale/list-codes.md | 11 ++++ .../examples/locale/list-continents.md | 11 ++++ .../examples/locale/list-countries-e-u.md | 11 ++++ .../examples/locale/list-countries-phones.md | 11 ++++ .../examples/locale/list-countries.md | 11 ++++ .../examples/locale/list-currencies.md | 11 ++++ .../examples/locale/list-languages.md | 11 ++++ .../messaging/create-apns-provider.md | 20 ++++++ .../examples/messaging/create-email.md | 24 ++++++++ .../examples/messaging/create-fcm-provider.md | 16 +++++ .../messaging/create-mailgun-provider.md | 22 +++++++ .../messaging/create-msg91provider.md | 18 ++++++ .../examples/messaging/create-push.md | 31 ++++++++++ .../messaging/create-sendgrid-provider.md | 20 ++++++ .../examples/messaging/create-sms.md | 19 ++++++ .../messaging/create-smtp-provider.md | 26 ++++++++ .../examples/messaging/create-subscriber.md | 15 +++++ .../messaging/create-telesign-provider.md | 18 ++++++ .../messaging/create-textmagic-provider.md | 18 ++++++ .../examples/messaging/create-topic.md | 15 +++++ .../messaging/create-twilio-provider.md | 18 ++++++ .../messaging/create-vonage-provider.md | 18 ++++++ .../examples/messaging/delete-provider.md | 13 ++++ .../examples/messaging/delete-subscriber.md | 14 +++++ .../examples/messaging/delete-topic.md | 13 ++++ .../console-web/examples/messaging/delete.md | 13 ++++ .../examples/messaging/get-message.md | 13 ++++ .../examples/messaging/get-provider.md | 13 ++++ .../examples/messaging/get-subscriber.md | 14 +++++ .../examples/messaging/get-topic.md | 13 ++++ .../examples/messaging/list-message-logs.md | 14 +++++ .../examples/messaging/list-messages.md | 14 +++++ .../examples/messaging/list-provider-logs.md | 14 +++++ .../examples/messaging/list-providers.md | 14 +++++ .../messaging/list-subscriber-logs.md | 14 +++++ .../examples/messaging/list-subscribers.md | 15 +++++ .../examples/messaging/list-targets.md | 14 +++++ .../examples/messaging/list-topic-logs.md | 14 +++++ .../examples/messaging/list-topics.md | 14 +++++ .../messaging/update-apns-provider.md | 20 ++++++ .../examples/messaging/update-email.md | 24 ++++++++ .../examples/messaging/update-fcm-provider.md | 16 +++++ .../messaging/update-mailgun-provider.md | 22 +++++++ .../messaging/update-msg91provider.md | 18 ++++++ .../examples/messaging/update-push.md | 31 ++++++++++ .../messaging/update-sendgrid-provider.md | 20 ++++++ .../examples/messaging/update-sms.md | 19 ++++++ .../messaging/update-smtp-provider.md | 26 ++++++++ .../messaging/update-telesign-provider.md | 18 ++++++ .../messaging/update-textmagic-provider.md | 18 ++++++ .../examples/messaging/update-topic.md | 15 +++++ .../messaging/update-twilio-provider.md | 18 ++++++ .../messaging/update-vonage-provider.md | 18 ++++++ .../migrations/create-appwrite-migration.md | 16 +++++ .../migrations/create-csv-migration.md | 15 +++++ .../migrations/create-firebase-migration.md | 14 +++++ .../migrations/create-n-host-migration.md | 20 ++++++ .../migrations/create-supabase-migration.md | 19 ++++++ .../console-web/examples/migrations/delete.md | 13 ++++ .../migrations/get-appwrite-report.md | 16 +++++ .../migrations/get-firebase-report.md | 14 +++++ .../examples/migrations/get-n-host-report.md | 20 ++++++ .../migrations/get-supabase-report.md | 19 ++++++ .../console-web/examples/migrations/get.md | 13 ++++ .../console-web/examples/migrations/list.md | 14 +++++ .../console-web/examples/migrations/retry.md | 13 ++++ .../examples/project/create-variable.md | 15 +++++ .../examples/project/delete-variable.md | 13 ++++ .../console-web/examples/project/get-usage.md | 15 +++++ .../examples/project/get-variable.md | 13 ++++ .../examples/project/list-variables.md | 11 ++++ .../examples/project/update-variable.md | 16 +++++ .../examples/projects/create-dev-key.md | 15 +++++ .../examples/projects/create-j-w-t.md | 15 +++++ .../examples/projects/create-key.md | 16 +++++ .../examples/projects/create-platform.md | 18 ++++++ .../examples/projects/create-smtp-test.md | 22 +++++++ .../examples/projects/create-webhook.md | 20 ++++++ .../console-web/examples/projects/create.md | 25 ++++++++ .../examples/projects/delete-dev-key.md | 14 +++++ .../projects/delete-email-template.md | 15 +++++ .../examples/projects/delete-key.md | 14 +++++ .../examples/projects/delete-platform.md | 14 +++++ .../examples/projects/delete-sms-template.md | 15 +++++ .../examples/projects/delete-webhook.md | 14 +++++ .../console-web/examples/projects/delete.md | 13 ++++ .../examples/projects/get-dev-key.md | 14 +++++ .../examples/projects/get-email-template.md | 15 +++++ .../console-web/examples/projects/get-key.md | 14 +++++ .../examples/projects/get-platform.md | 14 +++++ .../examples/projects/get-sms-template.md | 15 +++++ .../examples/projects/get-webhook.md | 14 +++++ .../console-web/examples/projects/get.md | 13 ++++ .../examples/projects/list-dev-keys.md | 14 +++++ .../examples/projects/list-keys.md | 13 ++++ .../examples/projects/list-platforms.md | 13 ++++ .../examples/projects/list-webhooks.md | 13 ++++ .../console-web/examples/projects/list.md | 14 +++++ .../projects/update-api-status-all.md | 14 +++++ .../examples/projects/update-api-status.md | 15 +++++ .../examples/projects/update-auth-duration.md | 14 +++++ .../examples/projects/update-auth-limit.md | 14 +++++ .../update-auth-password-dictionary.md | 14 +++++ .../projects/update-auth-password-history.md | 14 +++++ .../projects/update-auth-sessions-limit.md | 14 +++++ .../examples/projects/update-auth-status.md | 15 +++++ .../examples/projects/update-dev-key.md | 16 +++++ .../projects/update-email-template.md | 20 ++++++ .../examples/projects/update-key.md | 17 ++++++ .../projects/update-memberships-privacy.md | 16 +++++ .../examples/projects/update-mock-numbers.md | 14 +++++ .../examples/projects/update-o-auth2.md | 17 ++++++ .../projects/update-personal-data-check.md | 14 +++++ .../examples/projects/update-platform.md | 18 ++++++ .../projects/update-service-status-all.md | 14 +++++ .../projects/update-service-status.md | 15 +++++ .../projects/update-session-alerts.md | 14 +++++ .../projects/update-session-invalidation.md | 14 +++++ .../examples/projects/update-sms-template.md | 16 +++++ .../examples/projects/update-smtp.md | 22 +++++++ .../examples/projects/update-team.md | 14 +++++ .../projects/update-webhook-signature.md | 14 +++++ .../examples/projects/update-webhook.md | 21 +++++++ .../console-web/examples/projects/update.md | 23 +++++++ .../examples/proxy/create-a-p-i-rule.md | 13 ++++ .../examples/proxy/create-function-rule.md | 15 +++++ .../examples/proxy/create-redirect-rule.md | 17 ++++++ .../examples/proxy/create-site-rule.md | 15 +++++ .../console-web/examples/proxy/delete-rule.md | 13 ++++ .../console-web/examples/proxy/get-rule.md | 13 ++++ .../console-web/examples/proxy/list-rules.md | 14 +++++ .../proxy/update-rule-verification.md | 13 ++++ .../examples/sites/create-deployment.md | 18 ++++++ .../sites/create-duplicate-deployment.md | 14 +++++ .../sites/create-template-deployment.md | 18 ++++++ .../examples/sites/create-variable.md | 16 +++++ .../examples/sites/create-vcs-deployment.md | 16 +++++ .../console-web/examples/sites/create.md | 30 +++++++++ .../examples/sites/delete-deployment.md | 14 +++++ .../console-web/examples/sites/delete-log.md | 14 +++++ .../examples/sites/delete-variable.md | 14 +++++ .../console-web/examples/sites/delete.md | 13 ++++ .../examples/sites/get-deployment-download.md | 15 +++++ .../examples/sites/get-deployment.md | 14 +++++ .../console-web/examples/sites/get-log.md | 14 +++++ .../examples/sites/get-template.md | 13 ++++ .../console-web/examples/sites/get-usage.md | 14 +++++ .../examples/sites/get-variable.md | 14 +++++ .../1.8.x/console-web/examples/sites/get.md | 13 ++++ .../examples/sites/list-deployments.md | 15 +++++ .../examples/sites/list-frameworks.md | 11 ++++ .../console-web/examples/sites/list-logs.md | 14 +++++ .../examples/sites/list-specifications.md | 11 ++++ .../examples/sites/list-templates.md | 16 +++++ .../console-web/examples/sites/list-usage.md | 13 ++++ .../examples/sites/list-variables.md | 13 ++++ .../1.8.x/console-web/examples/sites/list.md | 14 +++++ .../sites/update-deployment-status.md | 14 +++++ .../examples/sites/update-site-deployment.md | 14 +++++ .../examples/sites/update-variable.md | 17 ++++++ .../console-web/examples/sites/update.md | 30 +++++++++ .../examples/storage/create-bucket.md | 22 +++++++ .../examples/storage/create-file.md | 16 +++++ .../examples/storage/delete-bucket.md | 13 ++++ .../examples/storage/delete-file.md | 14 +++++ .../examples/storage/get-bucket-usage.md | 14 +++++ .../examples/storage/get-bucket.md | 13 ++++ .../examples/storage/get-file-download.md | 15 +++++ .../examples/storage/get-file-preview.md | 26 ++++++++ .../examples/storage/get-file-view.md | 15 +++++ .../console-web/examples/storage/get-file.md | 14 +++++ .../console-web/examples/storage/get-usage.md | 13 ++++ .../examples/storage/list-buckets.md | 14 +++++ .../examples/storage/list-files.md | 15 +++++ .../examples/storage/update-bucket.md | 22 +++++++ .../examples/storage/update-file.md | 16 +++++ .../examples/tables/create-boolean-column.md | 18 ++++++ .../examples/tables/create-datetime-column.md | 18 ++++++ .../examples/tables/create-email-column.md | 18 ++++++ .../examples/tables/create-enum-column.md | 19 ++++++ .../examples/tables/create-float-column.md | 20 ++++++ .../examples/tables/create-index.md | 19 ++++++ .../examples/tables/create-integer-column.md | 20 ++++++ .../examples/tables/create-ip-column.md | 18 ++++++ .../tables/create-relationship-column.md | 20 ++++++ .../console-web/examples/tables/create-row.md | 19 ++++++ .../examples/tables/create-rows.md | 16 +++++ .../examples/tables/create-string-column.md | 20 ++++++ .../examples/tables/create-url-column.md | 18 ++++++ .../console-web/examples/tables/create.md | 18 ++++++ .../examples/tables/decrement-row-column.md | 18 ++++++ .../examples/tables/delete-column.md | 15 +++++ .../examples/tables/delete-index.md | 15 +++++ .../console-web/examples/tables/delete-row.md | 15 +++++ .../examples/tables/delete-rows.md | 15 +++++ .../console-web/examples/tables/delete.md | 14 +++++ .../console-web/examples/tables/get-column.md | 15 +++++ .../console-web/examples/tables/get-index.md | 15 +++++ .../console-web/examples/tables/get-row.md | 16 +++++ .../examples/tables/get-table-usage.md | 15 +++++ .../1.8.x/console-web/examples/tables/get.md | 14 +++++ .../examples/tables/increment-row-column.md | 18 ++++++ .../examples/tables/list-columns.md | 15 +++++ .../examples/tables/list-indexes.md | 15 +++++ .../examples/tables/list-row-logs.md | 16 +++++ .../console-web/examples/tables/list-rows.md | 15 +++++ .../1.8.x/console-web/examples/tables/list.md | 15 +++++ .../examples/tables/update-boolean-column.md | 18 ++++++ .../examples/tables/update-datetime-column.md | 18 ++++++ .../examples/tables/update-email-column.md | 18 ++++++ .../examples/tables/update-enum-column.md | 19 ++++++ .../examples/tables/update-float-column.md | 20 ++++++ .../examples/tables/update-integer-column.md | 20 ++++++ .../examples/tables/update-ip-column.md | 18 ++++++ .../tables/update-relationship-column.md | 17 ++++++ .../console-web/examples/tables/update-row.md | 17 ++++++ .../examples/tables/update-rows.md | 16 +++++ .../examples/tables/update-string-column.md | 19 ++++++ .../examples/tables/update-url-column.md | 18 ++++++ .../console-web/examples/tables/update.md | 18 ++++++ .../console-web/examples/tables/upsert-row.md | 17 ++++++ .../examples/tables/upsert-rows.md | 15 +++++ .../examples/teams/create-membership.md | 19 ++++++ .../console-web/examples/teams/create.md | 15 +++++ .../examples/teams/delete-membership.md | 14 +++++ .../console-web/examples/teams/delete.md | 13 ++++ .../examples/teams/get-membership.md | 14 +++++ .../console-web/examples/teams/get-prefs.md | 13 ++++ .../1.8.x/console-web/examples/teams/get.md | 13 ++++ .../console-web/examples/teams/list-logs.md | 14 +++++ .../examples/teams/list-memberships.md | 15 +++++ .../1.8.x/console-web/examples/teams/list.md | 14 +++++ .../teams/update-membership-status.md | 16 +++++ .../examples/teams/update-membership.md | 15 +++++ .../console-web/examples/teams/update-name.md | 14 +++++ .../examples/teams/update-prefs.md | 14 +++++ .../examples/tokens/create-file-token.md | 15 +++++ .../console-web/examples/tokens/delete.md | 13 ++++ .../1.8.x/console-web/examples/tokens/get.md | 13 ++++ .../1.8.x/console-web/examples/tokens/list.md | 15 +++++ .../console-web/examples/tokens/update.md | 14 +++++ .../examples/users/create-argon2user.md | 16 +++++ .../examples/users/create-bcrypt-user.md | 16 +++++ .../examples/users/create-j-w-t.md | 15 +++++ .../examples/users/create-m-d5user.md | 16 +++++ .../users/create-mfa-recovery-codes.md | 13 ++++ .../examples/users/create-p-h-pass-user.md | 16 +++++ .../examples/users/create-s-h-a-user.md | 17 ++++++ .../users/create-scrypt-modified-user.md | 19 ++++++ .../examples/users/create-scrypt-user.md | 21 +++++++ .../examples/users/create-session.md | 13 ++++ .../examples/users/create-target.md | 18 ++++++ .../examples/users/create-token.md | 15 +++++ .../console-web/examples/users/create.md | 17 ++++++ .../examples/users/delete-identity.md | 13 ++++ .../users/delete-mfa-authenticator.md | 14 +++++ .../examples/users/delete-session.md | 14 +++++ .../examples/users/delete-sessions.md | 13 ++++ .../examples/users/delete-target.md | 14 +++++ .../console-web/examples/users/delete.md | 13 ++++ .../examples/users/get-mfa-recovery-codes.md | 13 ++++ .../console-web/examples/users/get-prefs.md | 13 ++++ .../console-web/examples/users/get-target.md | 14 +++++ .../console-web/examples/users/get-usage.md | 13 ++++ .../1.8.x/console-web/examples/users/get.md | 13 ++++ .../examples/users/list-identities.md | 14 +++++ .../console-web/examples/users/list-logs.md | 14 +++++ .../examples/users/list-memberships.md | 15 +++++ .../examples/users/list-mfa-factors.md | 13 ++++ .../examples/users/list-sessions.md | 13 ++++ .../examples/users/list-targets.md | 14 +++++ .../1.8.x/console-web/examples/users/list.md | 14 +++++ .../users/update-email-verification.md | 14 +++++ .../examples/users/update-email.md | 14 +++++ .../examples/users/update-labels.md | 14 +++++ .../users/update-mfa-recovery-codes.md | 13 ++++ .../console-web/examples/users/update-mfa.md | 14 +++++ .../console-web/examples/users/update-name.md | 14 +++++ .../examples/users/update-password.md | 14 +++++ .../users/update-phone-verification.md | 14 +++++ .../examples/users/update-phone.md | 14 +++++ .../examples/users/update-prefs.md | 14 +++++ .../examples/users/update-status.md | 14 +++++ .../examples/users/update-target.md | 17 ++++++ .../vcs/create-repository-detection.md | 16 +++++ .../examples/vcs/create-repository.md | 15 +++++ .../examples/vcs/delete-installation.md | 13 ++++ .../examples/vcs/get-installation.md | 13 ++++ .../examples/vcs/get-repository-contents.md | 16 +++++ .../examples/vcs/get-repository.md | 14 +++++ .../examples/vcs/list-installations.md | 14 +++++ .../examples/vcs/list-repositories.md | 15 +++++ .../examples/vcs/list-repository-branches.md | 14 +++++ .../vcs/update-external-deployments.md | 15 +++++ .../account/create-anonymous-session.md | 9 +++ .../account/create-email-password-session.md | 12 ++++ .../examples/account/create-email-token.md | 13 ++++ .../examples/account/create-j-w-t.md | 9 +++ .../account/create-magic-u-r-l-token.md | 14 +++++ .../account/create-mfa-authenticator.md | 12 ++++ .../examples/account/create-mfa-challenge.md | 11 ++++ .../account/create-mfa-recovery-codes.md | 10 +++ .../examples/account/create-o-auth2token.md | 14 +++++ .../examples/account/create-phone-token.md | 12 ++++ .../account/create-phone-verification.md | 10 +++ .../examples/account/create-recovery.md | 13 ++++ .../examples/account/create-session.md | 12 ++++ .../examples/account/create-verification.md | 12 ++++ .../server-dart/examples/account/create.md | 14 +++++ .../examples/account/delete-identity.md | 12 ++++ .../account/delete-mfa-authenticator.md | 12 ++++ .../examples/account/delete-session.md | 12 ++++ .../examples/account/delete-sessions.md | 10 +++ .../account/get-mfa-recovery-codes.md | 10 +++ .../server-dart/examples/account/get-prefs.md | 10 +++ .../examples/account/get-session.md | 12 ++++ .../1.8.x/server-dart/examples/account/get.md | 10 +++ .../examples/account/list-identities.md | 12 ++++ .../server-dart/examples/account/list-logs.md | 12 ++++ .../examples/account/list-mfa-factors.md | 10 +++ .../examples/account/list-sessions.md | 10 +++ .../examples/account/update-email.md | 13 ++++ .../examples/account/update-m-f-a.md | 12 ++++ .../account/update-magic-u-r-l-session.md | 12 ++++ .../account/update-mfa-authenticator.md | 13 ++++ .../examples/account/update-mfa-challenge.md | 13 ++++ .../account/update-mfa-recovery-codes.md | 10 +++ .../examples/account/update-name.md | 12 ++++ .../examples/account/update-password.md | 13 ++++ .../examples/account/update-phone-session.md | 12 ++++ .../account/update-phone-verification.md | 13 ++++ .../examples/account/update-phone.md | 13 ++++ .../examples/account/update-prefs.md | 12 ++++ .../examples/account/update-recovery.md | 14 +++++ .../examples/account/update-session.md | 12 ++++ .../examples/account/update-status.md | 10 +++ .../examples/account/update-verification.md | 13 ++++ .../examples/avatars/get-browser.md | 15 +++++ .../examples/avatars/get-credit-card.md | 15 +++++ .../examples/avatars/get-favicon.md | 12 ++++ .../server-dart/examples/avatars/get-flag.md | 15 +++++ .../server-dart/examples/avatars/get-image.md | 14 +++++ .../examples/avatars/get-initials.md | 15 +++++ .../server-dart/examples/avatars/get-q-r.md | 15 +++++ .../databases/create-boolean-attribute.md | 17 ++++++ .../examples/databases/create-collection.md | 17 ++++++ .../databases/create-datetime-attribute.md | 17 ++++++ .../examples/databases/create-document.md | 17 ++++++ .../examples/databases/create-documents.md | 14 +++++ .../databases/create-email-attribute.md | 17 ++++++ .../databases/create-enum-attribute.md | 18 ++++++ .../databases/create-float-attribute.md | 19 ++++++ .../examples/databases/create-index.md | 18 ++++++ .../databases/create-integer-attribute.md | 19 ++++++ .../examples/databases/create-ip-attribute.md | 17 ++++++ .../create-relationship-attribute.md | 19 ++++++ .../databases/create-string-attribute.md | 19 ++++++ .../databases/create-url-attribute.md | 17 ++++++ .../server-dart/examples/databases/create.md | 14 +++++ .../databases/decrement-document-attribute.md | 17 ++++++ .../examples/databases/delete-attribute.md | 14 +++++ .../examples/databases/delete-collection.md | 13 ++++ .../examples/databases/delete-document.md | 14 +++++ .../examples/databases/delete-documents.md | 14 +++++ .../examples/databases/delete-index.md | 14 +++++ .../server-dart/examples/databases/delete.md | 12 ++++ .../examples/databases/get-attribute.md | 14 +++++ .../examples/databases/get-collection.md | 13 ++++ .../examples/databases/get-document.md | 15 +++++ .../examples/databases/get-index.md | 14 +++++ .../server-dart/examples/databases/get.md | 12 ++++ .../databases/increment-document-attribute.md | 17 ++++++ .../examples/databases/list-attributes.md | 14 +++++ .../examples/databases/list-collections.md | 14 +++++ .../examples/databases/list-documents.md | 14 +++++ .../examples/databases/list-indexes.md | 14 +++++ .../server-dart/examples/databases/list.md | 13 ++++ .../databases/update-boolean-attribute.md | 17 ++++++ .../examples/databases/update-collection.md | 17 ++++++ .../databases/update-datetime-attribute.md | 17 ++++++ .../examples/databases/update-document.md | 16 +++++ .../examples/databases/update-documents.md | 15 +++++ .../databases/update-email-attribute.md | 17 ++++++ .../databases/update-enum-attribute.md | 18 ++++++ .../databases/update-float-attribute.md | 19 ++++++ .../databases/update-integer-attribute.md | 19 ++++++ .../examples/databases/update-ip-attribute.md | 17 ++++++ .../update-relationship-attribute.md | 16 +++++ .../databases/update-string-attribute.md | 18 ++++++ .../databases/update-url-attribute.md | 17 ++++++ .../server-dart/examples/databases/update.md | 14 +++++ .../examples/databases/upsert-document.md | 15 +++++ .../examples/databases/upsert-documents.md | 13 ++++ .../examples/functions/create-deployment.md | 17 ++++++ .../functions/create-duplicate-deployment.md | 14 +++++ .../examples/functions/create-execution.md | 18 ++++++ .../functions/create-template-deployment.md | 17 ++++++ .../examples/functions/create-variable.md | 15 +++++ .../functions/create-vcs-deployment.md | 15 +++++ .../server-dart/examples/functions/create.md | 29 +++++++++ .../examples/functions/delete-deployment.md | 13 ++++ .../examples/functions/delete-execution.md | 13 ++++ .../examples/functions/delete-variable.md | 13 ++++ .../server-dart/examples/functions/delete.md | 12 ++++ .../functions/get-deployment-download.md | 14 +++++ .../examples/functions/get-deployment.md | 13 ++++ .../examples/functions/get-execution.md | 13 ++++ .../examples/functions/get-variable.md | 13 ++++ .../server-dart/examples/functions/get.md | 12 ++++ .../examples/functions/list-deployments.md | 14 +++++ .../examples/functions/list-executions.md | 13 ++++ .../examples/functions/list-runtimes.md | 10 +++ .../examples/functions/list-specifications.md | 10 +++ .../examples/functions/list-variables.md | 12 ++++ .../server-dart/examples/functions/list.md | 13 ++++ .../functions/update-deployment-status.md | 13 ++++ .../functions/update-function-deployment.md | 13 ++++ .../examples/functions/update-variable.md | 16 +++++ .../server-dart/examples/functions/update.md | 29 +++++++++ .../server-dart/examples/graphql/mutation.md | 12 ++++ .../server-dart/examples/graphql/query.md | 12 ++++ .../examples/health/get-antivirus.md | 10 +++ .../server-dart/examples/health/get-cache.md | 10 +++ .../examples/health/get-certificate.md | 12 ++++ .../server-dart/examples/health/get-d-b.md | 10 +++ .../examples/health/get-failed-jobs.md | 13 ++++ .../examples/health/get-pub-sub.md | 10 +++ .../examples/health/get-queue-builds.md | 12 ++++ .../examples/health/get-queue-certificates.md | 12 ++++ .../examples/health/get-queue-databases.md | 13 ++++ .../examples/health/get-queue-deletes.md | 12 ++++ .../examples/health/get-queue-functions.md | 12 ++++ .../examples/health/get-queue-logs.md | 12 ++++ .../examples/health/get-queue-mails.md | 12 ++++ .../examples/health/get-queue-messaging.md | 12 ++++ .../examples/health/get-queue-migrations.md | 12 ++++ .../health/get-queue-stats-resources.md | 12 ++++ .../examples/health/get-queue-usage.md | 12 ++++ .../examples/health/get-queue-webhooks.md | 12 ++++ .../examples/health/get-storage-local.md | 10 +++ .../examples/health/get-storage.md | 10 +++ .../server-dart/examples/health/get-time.md | 10 +++ .../1.8.x/server-dart/examples/health/get.md | 10 +++ .../1.8.x/server-dart/examples/locale/get.md | 10 +++ .../server-dart/examples/locale/list-codes.md | 10 +++ .../examples/locale/list-continents.md | 10 +++ .../examples/locale/list-countries-e-u.md | 10 +++ .../examples/locale/list-countries-phones.md | 10 +++ .../examples/locale/list-countries.md | 10 +++ .../examples/locale/list-currencies.md | 10 +++ .../examples/locale/list-languages.md | 10 +++ .../messaging/create-apns-provider.md | 19 ++++++ .../examples/messaging/create-email.md | 23 +++++++ .../examples/messaging/create-fcm-provider.md | 15 +++++ .../messaging/create-mailgun-provider.md | 21 +++++++ .../messaging/create-msg91provider.md | 17 ++++++ .../examples/messaging/create-push.md | 30 +++++++++ .../messaging/create-sendgrid-provider.md | 19 ++++++ .../examples/messaging/create-sms.md | 18 ++++++ .../messaging/create-smtp-provider.md | 25 ++++++++ .../examples/messaging/create-subscriber.md | 14 +++++ .../messaging/create-telesign-provider.md | 17 ++++++ .../messaging/create-textmagic-provider.md | 17 ++++++ .../examples/messaging/create-topic.md | 14 +++++ .../messaging/create-twilio-provider.md | 17 ++++++ .../messaging/create-vonage-provider.md | 17 ++++++ .../examples/messaging/delete-provider.md | 12 ++++ .../examples/messaging/delete-subscriber.md | 13 ++++ .../examples/messaging/delete-topic.md | 12 ++++ .../server-dart/examples/messaging/delete.md | 12 ++++ .../examples/messaging/get-message.md | 12 ++++ .../examples/messaging/get-provider.md | 12 ++++ .../examples/messaging/get-subscriber.md | 13 ++++ .../examples/messaging/get-topic.md | 12 ++++ .../examples/messaging/list-message-logs.md | 13 ++++ .../examples/messaging/list-messages.md | 13 ++++ .../examples/messaging/list-provider-logs.md | 13 ++++ .../examples/messaging/list-providers.md | 13 ++++ .../messaging/list-subscriber-logs.md | 13 ++++ .../examples/messaging/list-subscribers.md | 14 +++++ .../examples/messaging/list-targets.md | 13 ++++ .../examples/messaging/list-topic-logs.md | 13 ++++ .../examples/messaging/list-topics.md | 13 ++++ .../messaging/update-apns-provider.md | 19 ++++++ .../examples/messaging/update-email.md | 23 +++++++ .../examples/messaging/update-fcm-provider.md | 15 +++++ .../messaging/update-mailgun-provider.md | 21 +++++++ .../messaging/update-msg91provider.md | 17 ++++++ .../examples/messaging/update-push.md | 30 +++++++++ .../messaging/update-sendgrid-provider.md | 19 ++++++ .../examples/messaging/update-sms.md | 18 ++++++ .../messaging/update-smtp-provider.md | 25 ++++++++ .../messaging/update-telesign-provider.md | 17 ++++++ .../messaging/update-textmagic-provider.md | 17 ++++++ .../examples/messaging/update-topic.md | 14 +++++ .../messaging/update-twilio-provider.md | 17 ++++++ .../messaging/update-vonage-provider.md | 17 ++++++ .../examples/sites/create-deployment.md | 18 ++++++ .../sites/create-duplicate-deployment.md | 13 ++++ .../sites/create-template-deployment.md | 17 ++++++ .../examples/sites/create-variable.md | 15 +++++ .../examples/sites/create-vcs-deployment.md | 15 +++++ .../server-dart/examples/sites/create.md | 29 +++++++++ .../examples/sites/delete-deployment.md | 13 ++++ .../server-dart/examples/sites/delete-log.md | 13 ++++ .../examples/sites/delete-variable.md | 13 ++++ .../server-dart/examples/sites/delete.md | 12 ++++ .../examples/sites/get-deployment-download.md | 14 +++++ .../examples/sites/get-deployment.md | 13 ++++ .../server-dart/examples/sites/get-log.md | 13 ++++ .../examples/sites/get-variable.md | 13 ++++ .../1.8.x/server-dart/examples/sites/get.md | 12 ++++ .../examples/sites/list-deployments.md | 14 +++++ .../examples/sites/list-frameworks.md | 10 +++ .../server-dart/examples/sites/list-logs.md | 13 ++++ .../examples/sites/list-specifications.md | 10 +++ .../examples/sites/list-variables.md | 12 ++++ .../1.8.x/server-dart/examples/sites/list.md | 13 ++++ .../sites/update-deployment-status.md | 13 ++++ .../examples/sites/update-site-deployment.md | 13 ++++ .../examples/sites/update-variable.md | 16 +++++ .../server-dart/examples/sites/update.md | 29 +++++++++ .../examples/storage/create-bucket.md | 21 +++++++ .../examples/storage/create-file.md | 16 +++++ .../examples/storage/delete-bucket.md | 12 ++++ .../examples/storage/delete-file.md | 13 ++++ .../examples/storage/get-bucket.md | 12 ++++ .../examples/storage/get-file-download.md | 14 +++++ .../examples/storage/get-file-preview.md | 25 ++++++++ .../examples/storage/get-file-view.md | 14 +++++ .../server-dart/examples/storage/get-file.md | 13 ++++ .../examples/storage/list-buckets.md | 13 ++++ .../examples/storage/list-files.md | 14 +++++ .../examples/storage/update-bucket.md | 21 +++++++ .../examples/storage/update-file.md | 15 +++++ .../examples/tables/create-boolean-column.md | 17 ++++++ .../examples/tables/create-datetime-column.md | 17 ++++++ .../examples/tables/create-email-column.md | 17 ++++++ .../examples/tables/create-enum-column.md | 18 ++++++ .../examples/tables/create-float-column.md | 19 ++++++ .../examples/tables/create-index.md | 18 ++++++ .../examples/tables/create-integer-column.md | 19 ++++++ .../examples/tables/create-ip-column.md | 17 ++++++ .../tables/create-relationship-column.md | 19 ++++++ .../server-dart/examples/tables/create-row.md | 17 ++++++ .../examples/tables/create-rows.md | 14 +++++ .../examples/tables/create-string-column.md | 19 ++++++ .../examples/tables/create-url-column.md | 17 ++++++ .../server-dart/examples/tables/create.md | 17 ++++++ .../examples/tables/decrement-row-column.md | 17 ++++++ .../examples/tables/delete-column.md | 14 +++++ .../examples/tables/delete-index.md | 14 +++++ .../server-dart/examples/tables/delete-row.md | 14 +++++ .../examples/tables/delete-rows.md | 14 +++++ .../server-dart/examples/tables/delete.md | 13 ++++ .../server-dart/examples/tables/get-column.md | 14 +++++ .../server-dart/examples/tables/get-index.md | 14 +++++ .../server-dart/examples/tables/get-row.md | 15 +++++ .../1.8.x/server-dart/examples/tables/get.md | 13 ++++ .../examples/tables/increment-row-column.md | 17 ++++++ .../examples/tables/list-columns.md | 14 +++++ .../examples/tables/list-indexes.md | 14 +++++ .../server-dart/examples/tables/list-rows.md | 14 +++++ .../1.8.x/server-dart/examples/tables/list.md | 14 +++++ .../examples/tables/update-boolean-column.md | 17 ++++++ .../examples/tables/update-datetime-column.md | 17 ++++++ .../examples/tables/update-email-column.md | 17 ++++++ .../examples/tables/update-enum-column.md | 18 ++++++ .../examples/tables/update-float-column.md | 19 ++++++ .../examples/tables/update-integer-column.md | 19 ++++++ .../examples/tables/update-ip-column.md | 17 ++++++ .../tables/update-relationship-column.md | 16 +++++ .../server-dart/examples/tables/update-row.md | 16 +++++ .../examples/tables/update-rows.md | 15 +++++ .../examples/tables/update-string-column.md | 18 ++++++ .../examples/tables/update-url-column.md | 17 ++++++ .../server-dart/examples/tables/update.md | 17 ++++++ .../server-dart/examples/tables/upsert-row.md | 15 +++++ .../examples/tables/upsert-rows.md | 13 ++++ .../examples/teams/create-membership.md | 18 ++++++ .../server-dart/examples/teams/create.md | 14 +++++ .../examples/teams/delete-membership.md | 13 ++++ .../server-dart/examples/teams/delete.md | 12 ++++ .../examples/teams/get-membership.md | 13 ++++ .../server-dart/examples/teams/get-prefs.md | 12 ++++ .../1.8.x/server-dart/examples/teams/get.md | 12 ++++ .../examples/teams/list-memberships.md | 14 +++++ .../1.8.x/server-dart/examples/teams/list.md | 13 ++++ .../teams/update-membership-status.md | 15 +++++ .../examples/teams/update-membership.md | 14 +++++ .../server-dart/examples/teams/update-name.md | 13 ++++ .../examples/teams/update-prefs.md | 13 ++++ .../examples/tokens/create-file-token.md | 14 +++++ .../server-dart/examples/tokens/delete.md | 12 ++++ .../1.8.x/server-dart/examples/tokens/get.md | 12 ++++ .../1.8.x/server-dart/examples/tokens/list.md | 14 +++++ .../server-dart/examples/tokens/update.md | 13 ++++ .../examples/users/create-argon2user.md | 15 +++++ .../examples/users/create-bcrypt-user.md | 15 +++++ .../examples/users/create-j-w-t.md | 14 +++++ .../examples/users/create-m-d5user.md | 15 +++++ .../users/create-mfa-recovery-codes.md | 12 ++++ .../examples/users/create-p-h-pass-user.md | 15 +++++ .../examples/users/create-s-h-a-user.md | 16 +++++ .../users/create-scrypt-modified-user.md | 18 ++++++ .../examples/users/create-scrypt-user.md | 20 ++++++ .../examples/users/create-session.md | 12 ++++ .../examples/users/create-target.md | 17 ++++++ .../examples/users/create-token.md | 14 +++++ .../server-dart/examples/users/create.md | 16 +++++ .../examples/users/delete-identity.md | 12 ++++ .../users/delete-mfa-authenticator.md | 13 ++++ .../examples/users/delete-session.md | 13 ++++ .../examples/users/delete-sessions.md | 12 ++++ .../examples/users/delete-target.md | 13 ++++ .../server-dart/examples/users/delete.md | 12 ++++ .../examples/users/get-mfa-recovery-codes.md | 12 ++++ .../server-dart/examples/users/get-prefs.md | 12 ++++ .../server-dart/examples/users/get-target.md | 13 ++++ .../1.8.x/server-dart/examples/users/get.md | 12 ++++ .../examples/users/list-identities.md | 13 ++++ .../server-dart/examples/users/list-logs.md | 13 ++++ .../examples/users/list-memberships.md | 14 +++++ .../examples/users/list-mfa-factors.md | 12 ++++ .../examples/users/list-sessions.md | 12 ++++ .../examples/users/list-targets.md | 13 ++++ .../1.8.x/server-dart/examples/users/list.md | 13 ++++ .../users/update-email-verification.md | 13 ++++ .../examples/users/update-email.md | 13 ++++ .../examples/users/update-labels.md | 13 ++++ .../users/update-mfa-recovery-codes.md | 12 ++++ .../server-dart/examples/users/update-mfa.md | 13 ++++ .../server-dart/examples/users/update-name.md | 13 ++++ .../examples/users/update-password.md | 13 ++++ .../users/update-phone-verification.md | 13 ++++ .../examples/users/update-phone.md | 13 ++++ .../examples/users/update-prefs.md | 13 ++++ .../examples/users/update-status.md | 13 ++++ .../examples/users/update-target.md | 16 +++++ .../account/create-anonymous-session.md | 9 +++ .../account/create-email-password-session.md | 12 ++++ .../examples/account/create-email-token.md | 13 ++++ .../examples/account/create-j-w-t.md | 9 +++ .../account/create-magic-u-r-l-token.md | 14 +++++ .../account/create-mfa-authenticator.md | 12 ++++ .../examples/account/create-mfa-challenge.md | 11 ++++ .../account/create-mfa-recovery-codes.md | 10 +++ .../examples/account/create-o-auth2token.md | 14 +++++ .../examples/account/create-phone-token.md | 12 ++++ .../account/create-phone-verification.md | 10 +++ .../examples/account/create-recovery.md | 13 ++++ .../examples/account/create-session.md | 12 ++++ .../examples/account/create-verification.md | 12 ++++ .../server-deno/examples/account/create.md | 14 +++++ .../examples/account/delete-identity.md | 12 ++++ .../account/delete-mfa-authenticator.md | 12 ++++ .../examples/account/delete-session.md | 12 ++++ .../examples/account/delete-sessions.md | 10 +++ .../account/get-mfa-recovery-codes.md | 10 +++ .../server-deno/examples/account/get-prefs.md | 10 +++ .../examples/account/get-session.md | 12 ++++ .../1.8.x/server-deno/examples/account/get.md | 10 +++ .../examples/account/list-identities.md | 12 ++++ .../server-deno/examples/account/list-logs.md | 12 ++++ .../examples/account/list-mfa-factors.md | 10 +++ .../examples/account/list-sessions.md | 10 +++ .../examples/account/update-email.md | 13 ++++ .../examples/account/update-m-f-a.md | 12 ++++ .../account/update-magic-u-r-l-session.md | 12 ++++ .../account/update-mfa-authenticator.md | 13 ++++ .../examples/account/update-mfa-challenge.md | 13 ++++ .../account/update-mfa-recovery-codes.md | 10 +++ .../examples/account/update-name.md | 12 ++++ .../examples/account/update-password.md | 13 ++++ .../examples/account/update-phone-session.md | 12 ++++ .../account/update-phone-verification.md | 13 ++++ .../examples/account/update-phone.md | 13 ++++ .../examples/account/update-prefs.md | 12 ++++ .../examples/account/update-recovery.md | 14 +++++ .../examples/account/update-session.md | 12 ++++ .../examples/account/update-status.md | 10 +++ .../examples/account/update-verification.md | 13 ++++ .../examples/avatars/get-browser.md | 15 +++++ .../examples/avatars/get-credit-card.md | 15 +++++ .../examples/avatars/get-favicon.md | 12 ++++ .../server-deno/examples/avatars/get-flag.md | 15 +++++ .../server-deno/examples/avatars/get-image.md | 14 +++++ .../examples/avatars/get-initials.md | 15 +++++ .../server-deno/examples/avatars/get-q-r.md | 15 +++++ .../databases/create-boolean-attribute.md | 17 ++++++ .../examples/databases/create-collection.md | 17 ++++++ .../databases/create-datetime-attribute.md | 17 ++++++ .../examples/databases/create-document.md | 17 ++++++ .../examples/databases/create-documents.md | 14 +++++ .../databases/create-email-attribute.md | 17 ++++++ .../databases/create-enum-attribute.md | 18 ++++++ .../databases/create-float-attribute.md | 19 ++++++ .../examples/databases/create-index.md | 18 ++++++ .../databases/create-integer-attribute.md | 19 ++++++ .../examples/databases/create-ip-attribute.md | 17 ++++++ .../create-relationship-attribute.md | 19 ++++++ .../databases/create-string-attribute.md | 19 ++++++ .../databases/create-url-attribute.md | 17 ++++++ .../server-deno/examples/databases/create.md | 14 +++++ .../databases/decrement-document-attribute.md | 17 ++++++ .../examples/databases/delete-attribute.md | 14 +++++ .../examples/databases/delete-collection.md | 13 ++++ .../examples/databases/delete-document.md | 14 +++++ .../examples/databases/delete-documents.md | 14 +++++ .../examples/databases/delete-index.md | 14 +++++ .../server-deno/examples/databases/delete.md | 12 ++++ .../examples/databases/get-attribute.md | 14 +++++ .../examples/databases/get-collection.md | 13 ++++ .../examples/databases/get-document.md | 15 +++++ .../examples/databases/get-index.md | 14 +++++ .../server-deno/examples/databases/get.md | 12 ++++ .../databases/increment-document-attribute.md | 17 ++++++ .../examples/databases/list-attributes.md | 14 +++++ .../examples/databases/list-collections.md | 14 +++++ .../examples/databases/list-documents.md | 14 +++++ .../examples/databases/list-indexes.md | 14 +++++ .../server-deno/examples/databases/list.md | 13 ++++ .../databases/update-boolean-attribute.md | 17 ++++++ .../examples/databases/update-collection.md | 17 ++++++ .../databases/update-datetime-attribute.md | 17 ++++++ .../examples/databases/update-document.md | 16 +++++ .../examples/databases/update-documents.md | 15 +++++ .../databases/update-email-attribute.md | 17 ++++++ .../databases/update-enum-attribute.md | 18 ++++++ .../databases/update-float-attribute.md | 19 ++++++ .../databases/update-integer-attribute.md | 19 ++++++ .../examples/databases/update-ip-attribute.md | 17 ++++++ .../update-relationship-attribute.md | 16 +++++ .../databases/update-string-attribute.md | 18 ++++++ .../databases/update-url-attribute.md | 17 ++++++ .../server-deno/examples/databases/update.md | 14 +++++ .../examples/databases/upsert-document.md | 15 +++++ .../examples/databases/upsert-documents.md | 13 ++++ .../examples/functions/create-deployment.md | 16 +++++ .../functions/create-duplicate-deployment.md | 14 +++++ .../examples/functions/create-execution.md | 18 ++++++ .../functions/create-template-deployment.md | 17 ++++++ .../examples/functions/create-variable.md | 15 +++++ .../functions/create-vcs-deployment.md | 15 +++++ .../server-deno/examples/functions/create.md | 29 +++++++++ .../examples/functions/delete-deployment.md | 13 ++++ .../examples/functions/delete-execution.md | 13 ++++ .../examples/functions/delete-variable.md | 13 ++++ .../server-deno/examples/functions/delete.md | 12 ++++ .../functions/get-deployment-download.md | 14 +++++ .../examples/functions/get-deployment.md | 13 ++++ .../examples/functions/get-execution.md | 13 ++++ .../examples/functions/get-variable.md | 13 ++++ .../server-deno/examples/functions/get.md | 12 ++++ .../examples/functions/list-deployments.md | 14 +++++ .../examples/functions/list-executions.md | 13 ++++ .../examples/functions/list-runtimes.md | 10 +++ .../examples/functions/list-specifications.md | 10 +++ .../examples/functions/list-variables.md | 12 ++++ .../server-deno/examples/functions/list.md | 13 ++++ .../functions/update-deployment-status.md | 13 ++++ .../functions/update-function-deployment.md | 13 ++++ .../examples/functions/update-variable.md | 16 +++++ .../server-deno/examples/functions/update.md | 29 +++++++++ .../server-deno/examples/graphql/mutation.md | 12 ++++ .../server-deno/examples/graphql/query.md | 12 ++++ .../examples/health/get-antivirus.md | 10 +++ .../server-deno/examples/health/get-cache.md | 10 +++ .../examples/health/get-certificate.md | 12 ++++ .../server-deno/examples/health/get-d-b.md | 10 +++ .../examples/health/get-failed-jobs.md | 13 ++++ .../examples/health/get-pub-sub.md | 10 +++ .../examples/health/get-queue-builds.md | 12 ++++ .../examples/health/get-queue-certificates.md | 12 ++++ .../examples/health/get-queue-databases.md | 13 ++++ .../examples/health/get-queue-deletes.md | 12 ++++ .../examples/health/get-queue-functions.md | 12 ++++ .../examples/health/get-queue-logs.md | 12 ++++ .../examples/health/get-queue-mails.md | 12 ++++ .../examples/health/get-queue-messaging.md | 12 ++++ .../examples/health/get-queue-migrations.md | 12 ++++ .../health/get-queue-stats-resources.md | 12 ++++ .../examples/health/get-queue-usage.md | 12 ++++ .../examples/health/get-queue-webhooks.md | 12 ++++ .../examples/health/get-storage-local.md | 10 +++ .../examples/health/get-storage.md | 10 +++ .../server-deno/examples/health/get-time.md | 10 +++ .../1.8.x/server-deno/examples/health/get.md | 10 +++ .../1.8.x/server-deno/examples/locale/get.md | 10 +++ .../server-deno/examples/locale/list-codes.md | 10 +++ .../examples/locale/list-continents.md | 10 +++ .../examples/locale/list-countries-e-u.md | 10 +++ .../examples/locale/list-countries-phones.md | 10 +++ .../examples/locale/list-countries.md | 10 +++ .../examples/locale/list-currencies.md | 10 +++ .../examples/locale/list-languages.md | 10 +++ .../messaging/create-apns-provider.md | 19 ++++++ .../examples/messaging/create-email.md | 23 +++++++ .../examples/messaging/create-fcm-provider.md | 15 +++++ .../messaging/create-mailgun-provider.md | 21 +++++++ .../messaging/create-msg91provider.md | 17 ++++++ .../examples/messaging/create-push.md | 30 +++++++++ .../messaging/create-sendgrid-provider.md | 19 ++++++ .../examples/messaging/create-sms.md | 18 ++++++ .../messaging/create-smtp-provider.md | 25 ++++++++ .../examples/messaging/create-subscriber.md | 14 +++++ .../messaging/create-telesign-provider.md | 17 ++++++ .../messaging/create-textmagic-provider.md | 17 ++++++ .../examples/messaging/create-topic.md | 14 +++++ .../messaging/create-twilio-provider.md | 17 ++++++ .../messaging/create-vonage-provider.md | 17 ++++++ .../examples/messaging/delete-provider.md | 12 ++++ .../examples/messaging/delete-subscriber.md | 13 ++++ .../examples/messaging/delete-topic.md | 12 ++++ .../server-deno/examples/messaging/delete.md | 12 ++++ .../examples/messaging/get-message.md | 12 ++++ .../examples/messaging/get-provider.md | 12 ++++ .../examples/messaging/get-subscriber.md | 13 ++++ .../examples/messaging/get-topic.md | 12 ++++ .../examples/messaging/list-message-logs.md | 13 ++++ .../examples/messaging/list-messages.md | 13 ++++ .../examples/messaging/list-provider-logs.md | 13 ++++ .../examples/messaging/list-providers.md | 13 ++++ .../messaging/list-subscriber-logs.md | 13 ++++ .../examples/messaging/list-subscribers.md | 14 +++++ .../examples/messaging/list-targets.md | 13 ++++ .../examples/messaging/list-topic-logs.md | 13 ++++ .../examples/messaging/list-topics.md | 13 ++++ .../messaging/update-apns-provider.md | 19 ++++++ .../examples/messaging/update-email.md | 23 +++++++ .../examples/messaging/update-fcm-provider.md | 15 +++++ .../messaging/update-mailgun-provider.md | 21 +++++++ .../messaging/update-msg91provider.md | 17 ++++++ .../examples/messaging/update-push.md | 30 +++++++++ .../messaging/update-sendgrid-provider.md | 19 ++++++ .../examples/messaging/update-sms.md | 18 ++++++ .../messaging/update-smtp-provider.md | 25 ++++++++ .../messaging/update-telesign-provider.md | 17 ++++++ .../messaging/update-textmagic-provider.md | 17 ++++++ .../examples/messaging/update-topic.md | 14 +++++ .../messaging/update-twilio-provider.md | 17 ++++++ .../messaging/update-vonage-provider.md | 17 ++++++ .../examples/sites/create-deployment.md | 17 ++++++ .../sites/create-duplicate-deployment.md | 13 ++++ .../sites/create-template-deployment.md | 17 ++++++ .../examples/sites/create-variable.md | 15 +++++ .../examples/sites/create-vcs-deployment.md | 15 +++++ .../server-deno/examples/sites/create.md | 29 +++++++++ .../examples/sites/delete-deployment.md | 13 ++++ .../server-deno/examples/sites/delete-log.md | 13 ++++ .../examples/sites/delete-variable.md | 13 ++++ .../server-deno/examples/sites/delete.md | 12 ++++ .../examples/sites/get-deployment-download.md | 14 +++++ .../examples/sites/get-deployment.md | 13 ++++ .../server-deno/examples/sites/get-log.md | 13 ++++ .../examples/sites/get-variable.md | 13 ++++ .../1.8.x/server-deno/examples/sites/get.md | 12 ++++ .../examples/sites/list-deployments.md | 14 +++++ .../examples/sites/list-frameworks.md | 10 +++ .../server-deno/examples/sites/list-logs.md | 13 ++++ .../examples/sites/list-specifications.md | 10 +++ .../examples/sites/list-variables.md | 12 ++++ .../1.8.x/server-deno/examples/sites/list.md | 13 ++++ .../sites/update-deployment-status.md | 13 ++++ .../examples/sites/update-site-deployment.md | 13 ++++ .../examples/sites/update-variable.md | 16 +++++ .../server-deno/examples/sites/update.md | 29 +++++++++ .../examples/storage/create-bucket.md | 21 +++++++ .../examples/storage/create-file.md | 15 +++++ .../examples/storage/delete-bucket.md | 12 ++++ .../examples/storage/delete-file.md | 13 ++++ .../examples/storage/get-bucket.md | 12 ++++ .../examples/storage/get-file-download.md | 14 +++++ .../examples/storage/get-file-preview.md | 25 ++++++++ .../examples/storage/get-file-view.md | 14 +++++ .../server-deno/examples/storage/get-file.md | 13 ++++ .../examples/storage/list-buckets.md | 13 ++++ .../examples/storage/list-files.md | 14 +++++ .../examples/storage/update-bucket.md | 21 +++++++ .../examples/storage/update-file.md | 15 +++++ .../examples/tables/create-boolean-column.md | 17 ++++++ .../examples/tables/create-datetime-column.md | 17 ++++++ .../examples/tables/create-email-column.md | 17 ++++++ .../examples/tables/create-enum-column.md | 18 ++++++ .../examples/tables/create-float-column.md | 19 ++++++ .../examples/tables/create-index.md | 18 ++++++ .../examples/tables/create-integer-column.md | 19 ++++++ .../examples/tables/create-ip-column.md | 17 ++++++ .../tables/create-relationship-column.md | 19 ++++++ .../server-deno/examples/tables/create-row.md | 17 ++++++ .../examples/tables/create-rows.md | 14 +++++ .../examples/tables/create-string-column.md | 19 ++++++ .../examples/tables/create-url-column.md | 17 ++++++ .../server-deno/examples/tables/create.md | 17 ++++++ .../examples/tables/decrement-row-column.md | 17 ++++++ .../examples/tables/delete-column.md | 14 +++++ .../examples/tables/delete-index.md | 14 +++++ .../server-deno/examples/tables/delete-row.md | 14 +++++ .../examples/tables/delete-rows.md | 14 +++++ .../server-deno/examples/tables/delete.md | 13 ++++ .../server-deno/examples/tables/get-column.md | 14 +++++ .../server-deno/examples/tables/get-index.md | 14 +++++ .../server-deno/examples/tables/get-row.md | 15 +++++ .../1.8.x/server-deno/examples/tables/get.md | 13 ++++ .../examples/tables/increment-row-column.md | 17 ++++++ .../examples/tables/list-columns.md | 14 +++++ .../examples/tables/list-indexes.md | 14 +++++ .../server-deno/examples/tables/list-rows.md | 14 +++++ .../1.8.x/server-deno/examples/tables/list.md | 14 +++++ .../examples/tables/update-boolean-column.md | 17 ++++++ .../examples/tables/update-datetime-column.md | 17 ++++++ .../examples/tables/update-email-column.md | 17 ++++++ .../examples/tables/update-enum-column.md | 18 ++++++ .../examples/tables/update-float-column.md | 19 ++++++ .../examples/tables/update-integer-column.md | 19 ++++++ .../examples/tables/update-ip-column.md | 17 ++++++ .../tables/update-relationship-column.md | 16 +++++ .../server-deno/examples/tables/update-row.md | 16 +++++ .../examples/tables/update-rows.md | 15 +++++ .../examples/tables/update-string-column.md | 18 ++++++ .../examples/tables/update-url-column.md | 17 ++++++ .../server-deno/examples/tables/update.md | 17 ++++++ .../server-deno/examples/tables/upsert-row.md | 15 +++++ .../examples/tables/upsert-rows.md | 13 ++++ .../examples/teams/create-membership.md | 18 ++++++ .../server-deno/examples/teams/create.md | 14 +++++ .../examples/teams/delete-membership.md | 13 ++++ .../server-deno/examples/teams/delete.md | 12 ++++ .../examples/teams/get-membership.md | 13 ++++ .../server-deno/examples/teams/get-prefs.md | 12 ++++ .../1.8.x/server-deno/examples/teams/get.md | 12 ++++ .../examples/teams/list-memberships.md | 14 +++++ .../1.8.x/server-deno/examples/teams/list.md | 13 ++++ .../teams/update-membership-status.md | 15 +++++ .../examples/teams/update-membership.md | 14 +++++ .../server-deno/examples/teams/update-name.md | 13 ++++ .../examples/teams/update-prefs.md | 13 ++++ .../examples/tokens/create-file-token.md | 14 +++++ .../server-deno/examples/tokens/delete.md | 12 ++++ .../1.8.x/server-deno/examples/tokens/get.md | 12 ++++ .../1.8.x/server-deno/examples/tokens/list.md | 14 +++++ .../server-deno/examples/tokens/update.md | 13 ++++ .../examples/users/create-argon2user.md | 15 +++++ .../examples/users/create-bcrypt-user.md | 15 +++++ .../examples/users/create-j-w-t.md | 14 +++++ .../examples/users/create-m-d5user.md | 15 +++++ .../users/create-mfa-recovery-codes.md | 12 ++++ .../examples/users/create-p-h-pass-user.md | 15 +++++ .../examples/users/create-s-h-a-user.md | 16 +++++ .../users/create-scrypt-modified-user.md | 18 ++++++ .../examples/users/create-scrypt-user.md | 20 ++++++ .../examples/users/create-session.md | 12 ++++ .../examples/users/create-target.md | 17 ++++++ .../examples/users/create-token.md | 14 +++++ .../server-deno/examples/users/create.md | 16 +++++ .../examples/users/delete-identity.md | 12 ++++ .../users/delete-mfa-authenticator.md | 13 ++++ .../examples/users/delete-session.md | 13 ++++ .../examples/users/delete-sessions.md | 12 ++++ .../examples/users/delete-target.md | 13 ++++ .../server-deno/examples/users/delete.md | 12 ++++ .../examples/users/get-mfa-recovery-codes.md | 12 ++++ .../server-deno/examples/users/get-prefs.md | 12 ++++ .../server-deno/examples/users/get-target.md | 13 ++++ .../1.8.x/server-deno/examples/users/get.md | 12 ++++ .../examples/users/list-identities.md | 13 ++++ .../server-deno/examples/users/list-logs.md | 13 ++++ .../examples/users/list-memberships.md | 14 +++++ .../examples/users/list-mfa-factors.md | 12 ++++ .../examples/users/list-sessions.md | 12 ++++ .../examples/users/list-targets.md | 13 ++++ .../1.8.x/server-deno/examples/users/list.md | 13 ++++ .../users/update-email-verification.md | 13 ++++ .../examples/users/update-email.md | 13 ++++ .../examples/users/update-labels.md | 13 ++++ .../users/update-mfa-recovery-codes.md | 12 ++++ .../server-deno/examples/users/update-mfa.md | 13 ++++ .../server-deno/examples/users/update-name.md | 13 ++++ .../examples/users/update-password.md | 13 ++++ .../users/update-phone-verification.md | 13 ++++ .../examples/users/update-phone.md | 13 ++++ .../examples/users/update-prefs.md | 13 ++++ .../examples/users/update-status.md | 13 ++++ .../examples/users/update-target.md | 16 +++++ .../account/create-anonymous-session.md | 11 ++++ .../account/create-email-password-session.md | 14 +++++ .../examples/account/create-email-token.md | 15 +++++ .../examples/account/create-j-w-t.md | 11 ++++ .../account/create-magic-u-r-l-token.md | 16 +++++ .../account/create-mfa-authenticator.md | 15 +++++ .../examples/account/create-mfa-challenge.md | 14 +++++ .../account/create-mfa-recovery-codes.md | 12 ++++ .../examples/account/create-o-auth2token.md | 17 ++++++ .../examples/account/create-phone-token.md | 14 +++++ .../account/create-phone-verification.md | 12 ++++ .../examples/account/create-recovery.md | 15 +++++ .../examples/account/create-session.md | 14 +++++ .../examples/account/create-verification.md | 14 +++++ .../server-dotnet/examples/account/create.md | 16 +++++ .../examples/account/delete-identity.md | 14 +++++ .../account/delete-mfa-authenticator.md | 15 +++++ .../examples/account/delete-session.md | 14 +++++ .../examples/account/delete-sessions.md | 12 ++++ .../account/get-mfa-recovery-codes.md | 12 ++++ .../examples/account/get-prefs.md | 12 ++++ .../examples/account/get-session.md | 14 +++++ .../server-dotnet/examples/account/get.md | 12 ++++ .../examples/account/list-identities.md | 14 +++++ .../examples/account/list-logs.md | 14 +++++ .../examples/account/list-mfa-factors.md | 12 ++++ .../examples/account/list-sessions.md | 12 ++++ .../examples/account/update-email.md | 15 +++++ .../examples/account/update-m-f-a.md | 14 +++++ .../account/update-magic-u-r-l-session.md | 14 +++++ .../account/update-mfa-authenticator.md | 16 +++++ .../examples/account/update-mfa-challenge.md | 15 +++++ .../account/update-mfa-recovery-codes.md | 12 ++++ .../examples/account/update-name.md | 14 +++++ .../examples/account/update-password.md | 15 +++++ .../examples/account/update-phone-session.md | 14 +++++ .../account/update-phone-verification.md | 15 +++++ .../examples/account/update-phone.md | 15 +++++ .../examples/account/update-prefs.md | 14 +++++ .../examples/account/update-recovery.md | 16 +++++ .../examples/account/update-session.md | 14 +++++ .../examples/account/update-status.md | 12 ++++ .../examples/account/update-verification.md | 15 +++++ .../examples/avatars/get-browser.md | 18 ++++++ .../examples/avatars/get-credit-card.md | 18 ++++++ .../examples/avatars/get-favicon.md | 14 +++++ .../examples/avatars/get-flag.md | 18 ++++++ .../examples/avatars/get-image.md | 16 +++++ .../examples/avatars/get-initials.md | 17 ++++++ .../server-dotnet/examples/avatars/get-q-r.md | 17 ++++++ .../databases/create-boolean-attribute.md | 19 ++++++ .../examples/databases/create-collection.md | 19 ++++++ .../databases/create-datetime-attribute.md | 19 ++++++ .../examples/databases/create-document.md | 19 ++++++ .../examples/databases/create-documents.md | 16 +++++ .../databases/create-email-attribute.md | 19 ++++++ .../databases/create-enum-attribute.md | 20 ++++++ .../databases/create-float-attribute.md | 21 +++++++ .../examples/databases/create-index.md | 21 +++++++ .../databases/create-integer-attribute.md | 21 +++++++ .../examples/databases/create-ip-attribute.md | 19 ++++++ .../create-relationship-attribute.md | 22 +++++++ .../databases/create-string-attribute.md | 21 +++++++ .../databases/create-url-attribute.md | 19 ++++++ .../examples/databases/create.md | 16 +++++ .../databases/decrement-document-attribute.md | 19 ++++++ .../examples/databases/delete-attribute.md | 16 +++++ .../examples/databases/delete-collection.md | 15 +++++ .../examples/databases/delete-document.md | 16 +++++ .../examples/databases/delete-documents.md | 16 +++++ .../examples/databases/delete-index.md | 16 +++++ .../examples/databases/delete.md | 14 +++++ .../examples/databases/get-attribute.md | 16 +++++ .../examples/databases/get-collection.md | 15 +++++ .../examples/databases/get-document.md | 17 ++++++ .../examples/databases/get-index.md | 16 +++++ .../server-dotnet/examples/databases/get.md | 14 +++++ .../databases/increment-document-attribute.md | 19 ++++++ .../examples/databases/list-attributes.md | 16 +++++ .../examples/databases/list-collections.md | 16 +++++ .../examples/databases/list-documents.md | 16 +++++ .../examples/databases/list-indexes.md | 16 +++++ .../server-dotnet/examples/databases/list.md | 15 +++++ .../databases/update-boolean-attribute.md | 19 ++++++ .../examples/databases/update-collection.md | 19 ++++++ .../databases/update-datetime-attribute.md | 19 ++++++ .../examples/databases/update-document.md | 18 ++++++ .../examples/databases/update-documents.md | 17 ++++++ .../databases/update-email-attribute.md | 19 ++++++ .../databases/update-enum-attribute.md | 20 ++++++ .../databases/update-float-attribute.md | 21 +++++++ .../databases/update-integer-attribute.md | 21 +++++++ .../examples/databases/update-ip-attribute.md | 19 ++++++ .../update-relationship-attribute.md | 19 ++++++ .../databases/update-string-attribute.md | 20 ++++++ .../databases/update-url-attribute.md | 19 ++++++ .../examples/databases/update.md | 16 +++++ .../examples/databases/upsert-document.md | 17 ++++++ .../examples/databases/upsert-documents.md | 15 +++++ .../examples/functions/create-deployment.md | 18 ++++++ .../functions/create-duplicate-deployment.md | 16 +++++ .../examples/functions/create-execution.md | 21 +++++++ .../functions/create-template-deployment.md | 19 ++++++ .../examples/functions/create-variable.md | 17 ++++++ .../functions/create-vcs-deployment.md | 18 ++++++ .../examples/functions/create.md | 32 ++++++++++ .../examples/functions/delete-deployment.md | 15 +++++ .../examples/functions/delete-execution.md | 15 +++++ .../examples/functions/delete-variable.md | 15 +++++ .../examples/functions/delete.md | 14 +++++ .../functions/get-deployment-download.md | 17 ++++++ .../examples/functions/get-deployment.md | 15 +++++ .../examples/functions/get-execution.md | 15 +++++ .../examples/functions/get-variable.md | 15 +++++ .../server-dotnet/examples/functions/get.md | 14 +++++ .../examples/functions/list-deployments.md | 16 +++++ .../examples/functions/list-executions.md | 15 +++++ .../examples/functions/list-runtimes.md | 12 ++++ .../examples/functions/list-specifications.md | 12 ++++ .../examples/functions/list-variables.md | 14 +++++ .../server-dotnet/examples/functions/list.md | 15 +++++ .../functions/update-deployment-status.md | 15 +++++ .../functions/update-function-deployment.md | 15 +++++ .../examples/functions/update-variable.md | 18 ++++++ .../examples/functions/update.md | 32 ++++++++++ .../examples/graphql/mutation.md | 14 +++++ .../server-dotnet/examples/graphql/query.md | 14 +++++ .../examples/health/get-antivirus.md | 12 ++++ .../examples/health/get-cache.md | 12 ++++ .../examples/health/get-certificate.md | 14 +++++ .../server-dotnet/examples/health/get-d-b.md | 12 ++++ .../examples/health/get-failed-jobs.md | 16 +++++ .../examples/health/get-pub-sub.md | 12 ++++ .../examples/health/get-queue-builds.md | 14 +++++ .../examples/health/get-queue-certificates.md | 14 +++++ .../examples/health/get-queue-databases.md | 15 +++++ .../examples/health/get-queue-deletes.md | 14 +++++ .../examples/health/get-queue-functions.md | 14 +++++ .../examples/health/get-queue-logs.md | 14 +++++ .../examples/health/get-queue-mails.md | 14 +++++ .../examples/health/get-queue-messaging.md | 14 +++++ .../examples/health/get-queue-migrations.md | 14 +++++ .../health/get-queue-stats-resources.md | 14 +++++ .../examples/health/get-queue-usage.md | 14 +++++ .../examples/health/get-queue-webhooks.md | 14 +++++ .../examples/health/get-storage-local.md | 12 ++++ .../examples/health/get-storage.md | 12 ++++ .../server-dotnet/examples/health/get-time.md | 12 ++++ .../server-dotnet/examples/health/get.md | 12 ++++ .../server-dotnet/examples/locale/get.md | 12 ++++ .../examples/locale/list-codes.md | 12 ++++ .../examples/locale/list-continents.md | 12 ++++ .../examples/locale/list-countries-e-u.md | 12 ++++ .../examples/locale/list-countries-phones.md | 12 ++++ .../examples/locale/list-countries.md | 12 ++++ .../examples/locale/list-currencies.md | 12 ++++ .../examples/locale/list-languages.md | 12 ++++ .../messaging/create-apns-provider.md | 21 +++++++ .../examples/messaging/create-email.md | 25 ++++++++ .../examples/messaging/create-fcm-provider.md | 17 ++++++ .../messaging/create-mailgun-provider.md | 23 +++++++ .../messaging/create-msg91provider.md | 19 ++++++ .../examples/messaging/create-push.md | 33 ++++++++++ .../messaging/create-sendgrid-provider.md | 21 +++++++ .../examples/messaging/create-sms.md | 20 ++++++ .../messaging/create-smtp-provider.md | 28 +++++++++ .../examples/messaging/create-subscriber.md | 16 +++++ .../messaging/create-telesign-provider.md | 19 ++++++ .../messaging/create-textmagic-provider.md | 19 ++++++ .../examples/messaging/create-topic.md | 16 +++++ .../messaging/create-twilio-provider.md | 19 ++++++ .../messaging/create-vonage-provider.md | 19 ++++++ .../examples/messaging/delete-provider.md | 14 +++++ .../examples/messaging/delete-subscriber.md | 15 +++++ .../examples/messaging/delete-topic.md | 14 +++++ .../examples/messaging/delete.md | 14 +++++ .../examples/messaging/get-message.md | 14 +++++ .../examples/messaging/get-provider.md | 14 +++++ .../examples/messaging/get-subscriber.md | 15 +++++ .../examples/messaging/get-topic.md | 14 +++++ .../examples/messaging/list-message-logs.md | 15 +++++ .../examples/messaging/list-messages.md | 15 +++++ .../examples/messaging/list-provider-logs.md | 15 +++++ .../examples/messaging/list-providers.md | 15 +++++ .../messaging/list-subscriber-logs.md | 15 +++++ .../examples/messaging/list-subscribers.md | 16 +++++ .../examples/messaging/list-targets.md | 15 +++++ .../examples/messaging/list-topic-logs.md | 15 +++++ .../examples/messaging/list-topics.md | 15 +++++ .../messaging/update-apns-provider.md | 21 +++++++ .../examples/messaging/update-email.md | 25 ++++++++ .../examples/messaging/update-fcm-provider.md | 17 ++++++ .../messaging/update-mailgun-provider.md | 23 +++++++ .../messaging/update-msg91provider.md | 19 ++++++ .../examples/messaging/update-push.md | 33 ++++++++++ .../messaging/update-sendgrid-provider.md | 21 +++++++ .../examples/messaging/update-sms.md | 20 ++++++ .../messaging/update-smtp-provider.md | 28 +++++++++ .../messaging/update-telesign-provider.md | 19 ++++++ .../messaging/update-textmagic-provider.md | 19 ++++++ .../examples/messaging/update-topic.md | 16 +++++ .../messaging/update-twilio-provider.md | 19 ++++++ .../messaging/update-vonage-provider.md | 19 ++++++ .../examples/sites/create-deployment.md | 19 ++++++ .../sites/create-duplicate-deployment.md | 15 +++++ .../sites/create-template-deployment.md | 19 ++++++ .../examples/sites/create-variable.md | 17 ++++++ .../examples/sites/create-vcs-deployment.md | 18 ++++++ .../server-dotnet/examples/sites/create.md | 32 ++++++++++ .../examples/sites/delete-deployment.md | 15 +++++ .../examples/sites/delete-log.md | 15 +++++ .../examples/sites/delete-variable.md | 15 +++++ .../server-dotnet/examples/sites/delete.md | 14 +++++ .../examples/sites/get-deployment-download.md | 17 ++++++ .../examples/sites/get-deployment.md | 15 +++++ .../server-dotnet/examples/sites/get-log.md | 15 +++++ .../examples/sites/get-variable.md | 15 +++++ .../1.8.x/server-dotnet/examples/sites/get.md | 14 +++++ .../examples/sites/list-deployments.md | 16 +++++ .../examples/sites/list-frameworks.md | 12 ++++ .../server-dotnet/examples/sites/list-logs.md | 15 +++++ .../examples/sites/list-specifications.md | 12 ++++ .../examples/sites/list-variables.md | 14 +++++ .../server-dotnet/examples/sites/list.md | 15 +++++ .../sites/update-deployment-status.md | 15 +++++ .../examples/sites/update-site-deployment.md | 15 +++++ .../examples/sites/update-variable.md | 18 ++++++ .../server-dotnet/examples/sites/update.md | 32 ++++++++++ .../examples/storage/create-bucket.md | 24 ++++++++ .../examples/storage/create-file.md | 17 ++++++ .../examples/storage/delete-bucket.md | 14 +++++ .../examples/storage/delete-file.md | 15 +++++ .../examples/storage/get-bucket.md | 14 +++++ .../examples/storage/get-file-download.md | 16 +++++ .../examples/storage/get-file-preview.md | 28 +++++++++ .../examples/storage/get-file-view.md | 16 +++++ .../examples/storage/get-file.md | 15 +++++ .../examples/storage/list-buckets.md | 15 +++++ .../examples/storage/list-files.md | 16 +++++ .../examples/storage/update-bucket.md | 24 ++++++++ .../examples/storage/update-file.md | 17 ++++++ .../examples/tables/create-boolean-column.md | 19 ++++++ .../examples/tables/create-datetime-column.md | 19 ++++++ .../examples/tables/create-email-column.md | 19 ++++++ .../examples/tables/create-enum-column.md | 20 ++++++ .../examples/tables/create-float-column.md | 21 +++++++ .../examples/tables/create-index.md | 21 +++++++ .../examples/tables/create-integer-column.md | 21 +++++++ .../examples/tables/create-ip-column.md | 19 ++++++ .../tables/create-relationship-column.md | 22 +++++++ .../examples/tables/create-row.md | 19 ++++++ .../examples/tables/create-rows.md | 16 +++++ .../examples/tables/create-string-column.md | 21 +++++++ .../examples/tables/create-url-column.md | 19 ++++++ .../server-dotnet/examples/tables/create.md | 19 ++++++ .../examples/tables/decrement-row-column.md | 19 ++++++ .../examples/tables/delete-column.md | 16 +++++ .../examples/tables/delete-index.md | 16 +++++ .../examples/tables/delete-row.md | 16 +++++ .../examples/tables/delete-rows.md | 16 +++++ .../server-dotnet/examples/tables/delete.md | 15 +++++ .../examples/tables/get-column.md | 16 +++++ .../examples/tables/get-index.md | 16 +++++ .../server-dotnet/examples/tables/get-row.md | 17 ++++++ .../server-dotnet/examples/tables/get.md | 15 +++++ .../examples/tables/increment-row-column.md | 19 ++++++ .../examples/tables/list-columns.md | 16 +++++ .../examples/tables/list-indexes.md | 16 +++++ .../examples/tables/list-rows.md | 16 +++++ .../server-dotnet/examples/tables/list.md | 16 +++++ .../examples/tables/update-boolean-column.md | 19 ++++++ .../examples/tables/update-datetime-column.md | 19 ++++++ .../examples/tables/update-email-column.md | 19 ++++++ .../examples/tables/update-enum-column.md | 20 ++++++ .../examples/tables/update-float-column.md | 21 +++++++ .../examples/tables/update-integer-column.md | 21 +++++++ .../examples/tables/update-ip-column.md | 19 ++++++ .../tables/update-relationship-column.md | 19 ++++++ .../examples/tables/update-row.md | 18 ++++++ .../examples/tables/update-rows.md | 17 ++++++ .../examples/tables/update-string-column.md | 20 ++++++ .../examples/tables/update-url-column.md | 19 ++++++ .../server-dotnet/examples/tables/update.md | 19 ++++++ .../examples/tables/upsert-row.md | 17 ++++++ .../examples/tables/upsert-rows.md | 15 +++++ .../examples/teams/create-membership.md | 20 ++++++ .../server-dotnet/examples/teams/create.md | 16 +++++ .../examples/teams/delete-membership.md | 15 +++++ .../server-dotnet/examples/teams/delete.md | 14 +++++ .../examples/teams/get-membership.md | 15 +++++ .../server-dotnet/examples/teams/get-prefs.md | 14 +++++ .../1.8.x/server-dotnet/examples/teams/get.md | 14 +++++ .../examples/teams/list-memberships.md | 16 +++++ .../server-dotnet/examples/teams/list.md | 15 +++++ .../teams/update-membership-status.md | 17 ++++++ .../examples/teams/update-membership.md | 16 +++++ .../examples/teams/update-name.md | 15 +++++ .../examples/teams/update-prefs.md | 15 +++++ .../examples/tokens/create-file-token.md | 16 +++++ .../server-dotnet/examples/tokens/delete.md | 14 +++++ .../server-dotnet/examples/tokens/get.md | 14 +++++ .../server-dotnet/examples/tokens/list.md | 16 +++++ .../server-dotnet/examples/tokens/update.md | 15 +++++ .../examples/users/create-argon2user.md | 17 ++++++ .../examples/users/create-bcrypt-user.md | 17 ++++++ .../examples/users/create-j-w-t.md | 16 +++++ .../examples/users/create-m-d5user.md | 17 ++++++ .../users/create-mfa-recovery-codes.md | 14 +++++ .../examples/users/create-p-h-pass-user.md | 17 ++++++ .../examples/users/create-s-h-a-user.md | 19 ++++++ .../users/create-scrypt-modified-user.md | 20 ++++++ .../examples/users/create-scrypt-user.md | 22 +++++++ .../examples/users/create-session.md | 14 +++++ .../examples/users/create-target.md | 20 ++++++ .../examples/users/create-token.md | 16 +++++ .../server-dotnet/examples/users/create.md | 18 ++++++ .../examples/users/delete-identity.md | 14 +++++ .../users/delete-mfa-authenticator.md | 16 +++++ .../examples/users/delete-session.md | 15 +++++ .../examples/users/delete-sessions.md | 14 +++++ .../examples/users/delete-target.md | 15 +++++ .../server-dotnet/examples/users/delete.md | 14 +++++ .../examples/users/get-mfa-recovery-codes.md | 14 +++++ .../server-dotnet/examples/users/get-prefs.md | 14 +++++ .../examples/users/get-target.md | 15 +++++ .../1.8.x/server-dotnet/examples/users/get.md | 14 +++++ .../examples/users/list-identities.md | 15 +++++ .../server-dotnet/examples/users/list-logs.md | 15 +++++ .../examples/users/list-memberships.md | 16 +++++ .../examples/users/list-mfa-factors.md | 14 +++++ .../examples/users/list-sessions.md | 14 +++++ .../examples/users/list-targets.md | 15 +++++ .../server-dotnet/examples/users/list.md | 15 +++++ .../users/update-email-verification.md | 15 +++++ .../examples/users/update-email.md | 15 +++++ .../examples/users/update-labels.md | 15 +++++ .../users/update-mfa-recovery-codes.md | 14 +++++ .../examples/users/update-mfa.md | 15 +++++ .../examples/users/update-name.md | 15 +++++ .../examples/users/update-password.md | 15 +++++ .../users/update-phone-verification.md | 15 +++++ .../examples/users/update-phone.md | 15 +++++ .../examples/users/update-prefs.md | 15 +++++ .../examples/users/update-status.md | 15 +++++ .../examples/users/update-target.md | 18 ++++++ .../account/create-anonymous-session.md | 24 ++++++++ .../account/create-email-password-session.md | 26 ++++++++ .../examples/account/create-email-token.md | 27 ++++++++ .../examples/account/create-j-w-t.md | 24 ++++++++ .../account/create-magic-u-r-l-token.md | 28 +++++++++ .../account/create-mfa-authenticator.md | 26 ++++++++ .../examples/account/create-mfa-challenge.md | 25 ++++++++ .../account/create-mfa-recovery-codes.md | 25 ++++++++ .../examples/account/create-o-auth2token.md | 28 +++++++++ .../examples/account/create-phone-token.md | 26 ++++++++ .../account/create-phone-verification.md | 25 ++++++++ .../examples/account/create-recovery.md | 27 ++++++++ .../examples/account/create-session.md | 26 ++++++++ .../examples/account/create-verification.md | 26 ++++++++ .../server-go/examples/account/create.md | 28 +++++++++ .../examples/account/delete-identity.md | 26 ++++++++ .../account/delete-mfa-authenticator.md | 26 ++++++++ .../examples/account/delete-session.md | 26 ++++++++ .../examples/account/delete-sessions.md | 25 ++++++++ .../account/get-mfa-recovery-codes.md | 25 ++++++++ .../server-go/examples/account/get-prefs.md | 25 ++++++++ .../server-go/examples/account/get-session.md | 26 ++++++++ .../1.8.x/server-go/examples/account/get.md | 25 ++++++++ .../examples/account/list-identities.md | 26 ++++++++ .../server-go/examples/account/list-logs.md | 26 ++++++++ .../examples/account/list-mfa-factors.md | 25 ++++++++ .../examples/account/list-sessions.md | 25 ++++++++ .../examples/account/update-email.md | 27 ++++++++ .../examples/account/update-m-f-a.md | 26 ++++++++ .../account/update-magic-u-r-l-session.md | 26 ++++++++ .../account/update-mfa-authenticator.md | 27 ++++++++ .../examples/account/update-mfa-challenge.md | 27 ++++++++ .../account/update-mfa-recovery-codes.md | 25 ++++++++ .../server-go/examples/account/update-name.md | 26 ++++++++ .../examples/account/update-password.md | 27 ++++++++ .../examples/account/update-phone-session.md | 26 ++++++++ .../account/update-phone-verification.md | 27 ++++++++ .../examples/account/update-phone.md | 27 ++++++++ .../examples/account/update-prefs.md | 26 ++++++++ .../examples/account/update-recovery.md | 28 +++++++++ .../examples/account/update-session.md | 26 ++++++++ .../examples/account/update-status.md | 25 ++++++++ .../examples/account/update-verification.md | 27 ++++++++ .../server-go/examples/avatars/get-browser.md | 29 +++++++++ .../examples/avatars/get-credit-card.md | 29 +++++++++ .../server-go/examples/avatars/get-favicon.md | 26 ++++++++ .../server-go/examples/avatars/get-flag.md | 29 +++++++++ .../server-go/examples/avatars/get-image.md | 28 +++++++++ .../examples/avatars/get-initials.md | 29 +++++++++ .../server-go/examples/avatars/get-q-r.md | 29 +++++++++ .../databases/create-boolean-attribute.md | 31 ++++++++++ .../examples/databases/create-collection.md | 31 ++++++++++ .../databases/create-datetime-attribute.md | 31 ++++++++++ .../examples/databases/create-document.md | 31 ++++++++++ .../examples/databases/create-documents.md | 28 +++++++++ .../databases/create-email-attribute.md | 31 ++++++++++ .../databases/create-enum-attribute.md | 32 ++++++++++ .../databases/create-float-attribute.md | 33 ++++++++++ .../examples/databases/create-index.md | 32 ++++++++++ .../databases/create-integer-attribute.md | 33 ++++++++++ .../examples/databases/create-ip-attribute.md | 31 ++++++++++ .../create-relationship-attribute.md | 33 ++++++++++ .../databases/create-string-attribute.md | 33 ++++++++++ .../databases/create-url-attribute.md | 31 ++++++++++ .../server-go/examples/databases/create.md | 28 +++++++++ .../databases/decrement-document-attribute.md | 31 ++++++++++ .../examples/databases/delete-attribute.md | 28 +++++++++ .../examples/databases/delete-collection.md | 27 ++++++++ .../examples/databases/delete-document.md | 28 +++++++++ .../examples/databases/delete-documents.md | 28 +++++++++ .../examples/databases/delete-index.md | 28 +++++++++ .../server-go/examples/databases/delete.md | 26 ++++++++ .../examples/databases/get-attribute.md | 28 +++++++++ .../examples/databases/get-collection.md | 27 ++++++++ .../examples/databases/get-document.md | 29 +++++++++ .../server-go/examples/databases/get-index.md | 28 +++++++++ .../1.8.x/server-go/examples/databases/get.md | 26 ++++++++ .../databases/increment-document-attribute.md | 31 ++++++++++ .../examples/databases/list-attributes.md | 28 +++++++++ .../examples/databases/list-collections.md | 28 +++++++++ .../examples/databases/list-documents.md | 28 +++++++++ .../examples/databases/list-indexes.md | 28 +++++++++ .../server-go/examples/databases/list.md | 27 ++++++++ .../databases/update-boolean-attribute.md | 31 ++++++++++ .../examples/databases/update-collection.md | 31 ++++++++++ .../databases/update-datetime-attribute.md | 31 ++++++++++ .../examples/databases/update-document.md | 30 +++++++++ .../examples/databases/update-documents.md | 29 +++++++++ .../databases/update-email-attribute.md | 31 ++++++++++ .../databases/update-enum-attribute.md | 32 ++++++++++ .../databases/update-float-attribute.md | 33 ++++++++++ .../databases/update-integer-attribute.md | 33 ++++++++++ .../examples/databases/update-ip-attribute.md | 31 ++++++++++ .../update-relationship-attribute.md | 30 +++++++++ .../databases/update-string-attribute.md | 32 ++++++++++ .../databases/update-url-attribute.md | 31 ++++++++++ .../server-go/examples/databases/update.md | 28 +++++++++ .../examples/databases/upsert-document.md | 29 +++++++++ .../examples/databases/upsert-documents.md | 27 ++++++++ .../examples/functions/create-deployment.md | 30 +++++++++ .../functions/create-duplicate-deployment.md | 28 +++++++++ .../examples/functions/create-execution.md | 32 ++++++++++ .../functions/create-template-deployment.md | 31 ++++++++++ .../examples/functions/create-variable.md | 29 +++++++++ .../functions/create-vcs-deployment.md | 29 +++++++++ .../server-go/examples/functions/create.md | 43 +++++++++++++ .../examples/functions/delete-deployment.md | 27 ++++++++ .../examples/functions/delete-execution.md | 27 ++++++++ .../examples/functions/delete-variable.md | 27 ++++++++ .../server-go/examples/functions/delete.md | 26 ++++++++ .../functions/get-deployment-download.md | 28 +++++++++ .../examples/functions/get-deployment.md | 27 ++++++++ .../examples/functions/get-execution.md | 27 ++++++++ .../examples/functions/get-variable.md | 27 ++++++++ .../1.8.x/server-go/examples/functions/get.md | 26 ++++++++ .../examples/functions/list-deployments.md | 28 +++++++++ .../examples/functions/list-executions.md | 27 ++++++++ .../examples/functions/list-runtimes.md | 25 ++++++++ .../examples/functions/list-specifications.md | 25 ++++++++ .../examples/functions/list-variables.md | 26 ++++++++ .../server-go/examples/functions/list.md | 27 ++++++++ .../functions/update-deployment-status.md | 27 ++++++++ .../functions/update-function-deployment.md | 27 ++++++++ .../examples/functions/update-variable.md | 30 +++++++++ .../server-go/examples/functions/update.md | 43 +++++++++++++ .../server-go/examples/graphql/mutation.md | 26 ++++++++ .../1.8.x/server-go/examples/graphql/query.md | 26 ++++++++ .../examples/health/get-antivirus.md | 25 ++++++++ .../server-go/examples/health/get-cache.md | 25 ++++++++ .../examples/health/get-certificate.md | 26 ++++++++ .../server-go/examples/health/get-d-b.md | 25 ++++++++ .../examples/health/get-failed-jobs.md | 27 ++++++++ .../server-go/examples/health/get-pub-sub.md | 25 ++++++++ .../examples/health/get-queue-builds.md | 26 ++++++++ .../examples/health/get-queue-certificates.md | 26 ++++++++ .../examples/health/get-queue-databases.md | 27 ++++++++ .../examples/health/get-queue-deletes.md | 26 ++++++++ .../examples/health/get-queue-functions.md | 26 ++++++++ .../examples/health/get-queue-logs.md | 26 ++++++++ .../examples/health/get-queue-mails.md | 26 ++++++++ .../examples/health/get-queue-messaging.md | 26 ++++++++ .../examples/health/get-queue-migrations.md | 26 ++++++++ .../health/get-queue-stats-resources.md | 26 ++++++++ .../examples/health/get-queue-usage.md | 26 ++++++++ .../examples/health/get-queue-webhooks.md | 26 ++++++++ .../examples/health/get-storage-local.md | 25 ++++++++ .../server-go/examples/health/get-storage.md | 25 ++++++++ .../server-go/examples/health/get-time.md | 25 ++++++++ .../1.8.x/server-go/examples/health/get.md | 25 ++++++++ .../1.8.x/server-go/examples/locale/get.md | 25 ++++++++ .../server-go/examples/locale/list-codes.md | 25 ++++++++ .../examples/locale/list-continents.md | 25 ++++++++ .../examples/locale/list-countries-e-u.md | 25 ++++++++ .../examples/locale/list-countries-phones.md | 25 ++++++++ .../examples/locale/list-countries.md | 25 ++++++++ .../examples/locale/list-currencies.md | 25 ++++++++ .../examples/locale/list-languages.md | 25 ++++++++ .../messaging/create-apns-provider.md | 33 ++++++++++ .../examples/messaging/create-email.md | 37 +++++++++++ .../examples/messaging/create-fcm-provider.md | 29 +++++++++ .../messaging/create-mailgun-provider.md | 35 +++++++++++ .../messaging/create-msg91provider.md | 31 ++++++++++ .../examples/messaging/create-push.md | 44 +++++++++++++ .../messaging/create-sendgrid-provider.md | 33 ++++++++++ .../examples/messaging/create-sms.md | 32 ++++++++++ .../messaging/create-smtp-provider.md | 39 ++++++++++++ .../examples/messaging/create-subscriber.md | 28 +++++++++ .../messaging/create-telesign-provider.md | 31 ++++++++++ .../messaging/create-textmagic-provider.md | 31 ++++++++++ .../examples/messaging/create-topic.md | 28 +++++++++ .../messaging/create-twilio-provider.md | 31 ++++++++++ .../messaging/create-vonage-provider.md | 31 ++++++++++ .../examples/messaging/delete-provider.md | 26 ++++++++ .../examples/messaging/delete-subscriber.md | 27 ++++++++ .../examples/messaging/delete-topic.md | 26 ++++++++ .../server-go/examples/messaging/delete.md | 26 ++++++++ .../examples/messaging/get-message.md | 26 ++++++++ .../examples/messaging/get-provider.md | 26 ++++++++ .../examples/messaging/get-subscriber.md | 27 ++++++++ .../server-go/examples/messaging/get-topic.md | 26 ++++++++ .../examples/messaging/list-message-logs.md | 27 ++++++++ .../examples/messaging/list-messages.md | 27 ++++++++ .../examples/messaging/list-provider-logs.md | 27 ++++++++ .../examples/messaging/list-providers.md | 27 ++++++++ .../messaging/list-subscriber-logs.md | 27 ++++++++ .../examples/messaging/list-subscribers.md | 28 +++++++++ .../examples/messaging/list-targets.md | 27 ++++++++ .../examples/messaging/list-topic-logs.md | 27 ++++++++ .../examples/messaging/list-topics.md | 27 ++++++++ .../messaging/update-apns-provider.md | 33 ++++++++++ .../examples/messaging/update-email.md | 37 +++++++++++ .../examples/messaging/update-fcm-provider.md | 29 +++++++++ .../messaging/update-mailgun-provider.md | 35 +++++++++++ .../messaging/update-msg91provider.md | 31 ++++++++++ .../examples/messaging/update-push.md | 44 +++++++++++++ .../messaging/update-sendgrid-provider.md | 33 ++++++++++ .../examples/messaging/update-sms.md | 32 ++++++++++ .../messaging/update-smtp-provider.md | 39 ++++++++++++ .../messaging/update-telesign-provider.md | 31 ++++++++++ .../messaging/update-textmagic-provider.md | 31 ++++++++++ .../examples/messaging/update-topic.md | 28 +++++++++ .../messaging/update-twilio-provider.md | 31 ++++++++++ .../messaging/update-vonage-provider.md | 31 ++++++++++ .../examples/sites/create-deployment.md | 31 ++++++++++ .../sites/create-duplicate-deployment.md | 27 ++++++++ .../sites/create-template-deployment.md | 31 ++++++++++ .../examples/sites/create-variable.md | 29 +++++++++ .../examples/sites/create-vcs-deployment.md | 29 +++++++++ .../1.8.x/server-go/examples/sites/create.md | 43 +++++++++++++ .../examples/sites/delete-deployment.md | 27 ++++++++ .../server-go/examples/sites/delete-log.md | 27 ++++++++ .../examples/sites/delete-variable.md | 27 ++++++++ .../1.8.x/server-go/examples/sites/delete.md | 26 ++++++++ .../examples/sites/get-deployment-download.md | 28 +++++++++ .../examples/sites/get-deployment.md | 27 ++++++++ .../1.8.x/server-go/examples/sites/get-log.md | 27 ++++++++ .../server-go/examples/sites/get-variable.md | 27 ++++++++ .../1.8.x/server-go/examples/sites/get.md | 26 ++++++++ .../examples/sites/list-deployments.md | 28 +++++++++ .../examples/sites/list-frameworks.md | 25 ++++++++ .../server-go/examples/sites/list-logs.md | 27 ++++++++ .../examples/sites/list-specifications.md | 25 ++++++++ .../examples/sites/list-variables.md | 26 ++++++++ .../1.8.x/server-go/examples/sites/list.md | 27 ++++++++ .../sites/update-deployment-status.md | 27 ++++++++ .../examples/sites/update-site-deployment.md | 27 ++++++++ .../examples/sites/update-variable.md | 30 +++++++++ .../1.8.x/server-go/examples/sites/update.md | 43 +++++++++++++ .../examples/storage/create-bucket.md | 35 +++++++++++ .../server-go/examples/storage/create-file.md | 29 +++++++++ .../examples/storage/delete-bucket.md | 26 ++++++++ .../server-go/examples/storage/delete-file.md | 27 ++++++++ .../server-go/examples/storage/get-bucket.md | 26 ++++++++ .../examples/storage/get-file-download.md | 28 +++++++++ .../examples/storage/get-file-preview.md | 39 ++++++++++++ .../examples/storage/get-file-view.md | 28 +++++++++ .../server-go/examples/storage/get-file.md | 27 ++++++++ .../examples/storage/list-buckets.md | 27 ++++++++ .../server-go/examples/storage/list-files.md | 28 +++++++++ .../examples/storage/update-bucket.md | 35 +++++++++++ .../server-go/examples/storage/update-file.md | 29 +++++++++ .../examples/tables/create-boolean-column.md | 31 ++++++++++ .../examples/tables/create-datetime-column.md | 31 ++++++++++ .../examples/tables/create-email-column.md | 31 ++++++++++ .../examples/tables/create-enum-column.md | 32 ++++++++++ .../examples/tables/create-float-column.md | 33 ++++++++++ .../server-go/examples/tables/create-index.md | 32 ++++++++++ .../examples/tables/create-integer-column.md | 33 ++++++++++ .../examples/tables/create-ip-column.md | 31 ++++++++++ .../tables/create-relationship-column.md | 33 ++++++++++ .../server-go/examples/tables/create-row.md | 31 ++++++++++ .../server-go/examples/tables/create-rows.md | 28 +++++++++ .../examples/tables/create-string-column.md | 33 ++++++++++ .../examples/tables/create-url-column.md | 31 ++++++++++ .../1.8.x/server-go/examples/tables/create.md | 31 ++++++++++ .../examples/tables/decrement-row-column.md | 31 ++++++++++ .../examples/tables/delete-column.md | 28 +++++++++ .../server-go/examples/tables/delete-index.md | 28 +++++++++ .../server-go/examples/tables/delete-row.md | 28 +++++++++ .../server-go/examples/tables/delete-rows.md | 28 +++++++++ .../1.8.x/server-go/examples/tables/delete.md | 27 ++++++++ .../server-go/examples/tables/get-column.md | 28 +++++++++ .../server-go/examples/tables/get-index.md | 28 +++++++++ .../server-go/examples/tables/get-row.md | 29 +++++++++ .../1.8.x/server-go/examples/tables/get.md | 27 ++++++++ .../examples/tables/increment-row-column.md | 31 ++++++++++ .../server-go/examples/tables/list-columns.md | 28 +++++++++ .../server-go/examples/tables/list-indexes.md | 28 +++++++++ .../server-go/examples/tables/list-rows.md | 28 +++++++++ .../1.8.x/server-go/examples/tables/list.md | 28 +++++++++ .../examples/tables/update-boolean-column.md | 31 ++++++++++ .../examples/tables/update-datetime-column.md | 31 ++++++++++ .../examples/tables/update-email-column.md | 31 ++++++++++ .../examples/tables/update-enum-column.md | 32 ++++++++++ .../examples/tables/update-float-column.md | 33 ++++++++++ .../examples/tables/update-integer-column.md | 33 ++++++++++ .../examples/tables/update-ip-column.md | 31 ++++++++++ .../tables/update-relationship-column.md | 30 +++++++++ .../server-go/examples/tables/update-row.md | 30 +++++++++ .../server-go/examples/tables/update-rows.md | 29 +++++++++ .../examples/tables/update-string-column.md | 32 ++++++++++ .../examples/tables/update-url-column.md | 31 ++++++++++ .../1.8.x/server-go/examples/tables/update.md | 31 ++++++++++ .../server-go/examples/tables/upsert-row.md | 29 +++++++++ .../server-go/examples/tables/upsert-rows.md | 27 ++++++++ .../examples/teams/create-membership.md | 32 ++++++++++ .../1.8.x/server-go/examples/teams/create.md | 28 +++++++++ .../examples/teams/delete-membership.md | 27 ++++++++ .../1.8.x/server-go/examples/teams/delete.md | 26 ++++++++ .../examples/teams/get-membership.md | 27 ++++++++ .../server-go/examples/teams/get-prefs.md | 26 ++++++++ .../1.8.x/server-go/examples/teams/get.md | 26 ++++++++ .../examples/teams/list-memberships.md | 28 +++++++++ .../1.8.x/server-go/examples/teams/list.md | 27 ++++++++ .../teams/update-membership-status.md | 29 +++++++++ .../examples/teams/update-membership.md | 28 +++++++++ .../server-go/examples/teams/update-name.md | 27 ++++++++ .../server-go/examples/teams/update-prefs.md | 27 ++++++++ .../examples/tokens/create-file-token.md | 28 +++++++++ .../1.8.x/server-go/examples/tokens/delete.md | 26 ++++++++ .../1.8.x/server-go/examples/tokens/get.md | 26 ++++++++ .../1.8.x/server-go/examples/tokens/list.md | 28 +++++++++ .../1.8.x/server-go/examples/tokens/update.md | 27 ++++++++ .../examples/users/create-argon2user.md | 29 +++++++++ .../examples/users/create-bcrypt-user.md | 29 +++++++++ .../server-go/examples/users/create-j-w-t.md | 28 +++++++++ .../examples/users/create-m-d5user.md | 29 +++++++++ .../users/create-mfa-recovery-codes.md | 26 ++++++++ .../examples/users/create-p-h-pass-user.md | 29 +++++++++ .../examples/users/create-s-h-a-user.md | 30 +++++++++ .../users/create-scrypt-modified-user.md | 32 ++++++++++ .../examples/users/create-scrypt-user.md | 34 +++++++++++ .../examples/users/create-session.md | 26 ++++++++ .../server-go/examples/users/create-target.md | 31 ++++++++++ .../server-go/examples/users/create-token.md | 28 +++++++++ .../1.8.x/server-go/examples/users/create.md | 30 +++++++++ .../examples/users/delete-identity.md | 26 ++++++++ .../users/delete-mfa-authenticator.md | 27 ++++++++ .../examples/users/delete-session.md | 27 ++++++++ .../examples/users/delete-sessions.md | 26 ++++++++ .../server-go/examples/users/delete-target.md | 27 ++++++++ .../1.8.x/server-go/examples/users/delete.md | 26 ++++++++ .../examples/users/get-mfa-recovery-codes.md | 26 ++++++++ .../server-go/examples/users/get-prefs.md | 26 ++++++++ .../server-go/examples/users/get-target.md | 27 ++++++++ .../1.8.x/server-go/examples/users/get.md | 26 ++++++++ .../examples/users/list-identities.md | 27 ++++++++ .../server-go/examples/users/list-logs.md | 27 ++++++++ .../examples/users/list-memberships.md | 28 +++++++++ .../examples/users/list-mfa-factors.md | 26 ++++++++ .../server-go/examples/users/list-sessions.md | 26 ++++++++ .../server-go/examples/users/list-targets.md | 27 ++++++++ .../1.8.x/server-go/examples/users/list.md | 27 ++++++++ .../users/update-email-verification.md | 27 ++++++++ .../server-go/examples/users/update-email.md | 27 ++++++++ .../server-go/examples/users/update-labels.md | 27 ++++++++ .../users/update-mfa-recovery-codes.md | 26 ++++++++ .../server-go/examples/users/update-mfa.md | 27 ++++++++ .../server-go/examples/users/update-name.md | 27 ++++++++ .../examples/users/update-password.md | 27 ++++++++ .../users/update-phone-verification.md | 27 ++++++++ .../server-go/examples/users/update-phone.md | 27 ++++++++ .../server-go/examples/users/update-prefs.md | 27 ++++++++ .../server-go/examples/users/update-status.md | 27 ++++++++ .../server-go/examples/users/update-target.md | 30 +++++++++ .../account/create-anonymous-session.md | 33 ++++++++++ .../account/create-email-password-session.md | 36 +++++++++++ .../examples/account/create-email-token.md | 14 +++++ .../examples/account/create-j-w-t.md | 5 ++ .../account/create-magic-u-r-l-token.md | 15 +++++ .../account/create-mfa-authenticator.md | 8 +++ .../examples/account/create-mfa-challenge.md | 10 +++ .../account/create-mfa-recovery-codes.md | 5 ++ .../examples/account/create-phone-token.md | 13 ++++ .../account/create-phone-verification.md | 10 +++ .../examples/account/create-recovery.md | 13 ++++ .../examples/account/create-session.md | 36 +++++++++++ .../examples/account/create-verification.md | 12 ++++ .../server-graphql/examples/account/create.md | 40 ++++++++++++ .../examples/account/delete-identity.md | 7 +++ .../account/delete-mfa-authenticator.md | 7 +++ .../examples/account/delete-session.md | 7 +++ .../examples/account/delete-sessions.md | 5 ++ .../account/get-mfa-recovery-codes.md | 0 .../examples/account/get-prefs.md | 0 .../examples/account/get-session.md | 0 .../server-graphql/examples/account/get.md | 0 .../examples/account/list-identities.md | 0 .../examples/account/list-logs.md | 0 .../examples/account/list-mfa-factors.md | 0 .../examples/account/list-sessions.md | 0 .../examples/account/update-email.md | 38 ++++++++++++ .../examples/account/update-m-f-a.md | 37 +++++++++++ .../account/update-magic-u-r-l-session.md | 36 +++++++++++ .../account/update-mfa-authenticator.md | 38 ++++++++++++ .../examples/account/update-mfa-challenge.md | 36 +++++++++++ .../account/update-mfa-recovery-codes.md | 5 ++ .../examples/account/update-name.md | 37 +++++++++++ .../examples/account/update-password.md | 38 ++++++++++++ .../examples/account/update-phone-session.md | 36 +++++++++++ .../account/update-phone-verification.md | 13 ++++ .../examples/account/update-phone.md | 38 ++++++++++++ .../examples/account/update-prefs.md | 37 +++++++++++ .../examples/account/update-recovery.md | 14 +++++ .../examples/account/update-session.md | 35 +++++++++++ .../examples/account/update-status.md | 35 +++++++++++ .../examples/account/update-verification.md | 13 ++++ .../examples/avatars/get-browser.md | 0 .../examples/avatars/get-credit-card.md | 0 .../examples/avatars/get-favicon.md | 0 .../examples/avatars/get-flag.md | 0 .../examples/avatars/get-image.md | 0 .../examples/avatars/get-initials.md | 0 .../examples/avatars/get-q-r.md | 0 .../databases/create-boolean-attribute.md | 20 ++++++ .../examples/databases/create-collection.md | 31 ++++++++++ .../databases/create-datetime-attribute.md | 21 +++++++ .../examples/databases/create-document.md | 18 ++++++ .../examples/databases/create-documents.md | 19 ++++++ .../databases/create-email-attribute.md | 21 +++++++ .../databases/create-enum-attribute.md | 23 +++++++ .../databases/create-float-attribute.md | 24 ++++++++ .../examples/databases/create-index.md | 21 +++++++ .../databases/create-integer-attribute.md | 24 ++++++++ .../examples/databases/create-ip-attribute.md | 21 +++++++ .../create-relationship-attribute.md | 27 ++++++++ .../databases/create-string-attribute.md | 24 ++++++++ .../databases/create-url-attribute.md | 21 +++++++ .../examples/databases/create.md | 13 ++++ .../databases/decrement-document-attribute.md | 19 ++++++ .../examples/databases/delete-attribute.md | 9 +++ .../examples/databases/delete-collection.md | 8 +++ .../examples/databases/delete-document.md | 9 +++ .../examples/databases/delete-documents.md | 19 ++++++ .../examples/databases/delete-index.md | 9 +++ .../examples/databases/delete.md | 7 +++ .../examples/databases/get-attribute.md | 0 .../examples/databases/get-collection.md | 0 .../examples/databases/get-document.md | 0 .../examples/databases/get-index.md | 0 .../server-graphql/examples/databases/get.md | 0 .../databases/increment-document-attribute.md | 19 ++++++ .../examples/databases/list-attributes.md | 0 .../examples/databases/list-collections.md | 0 .../examples/databases/list-documents.md | 0 .../examples/databases/list-indexes.md | 0 .../server-graphql/examples/databases/list.md | 0 .../databases/update-boolean-attribute.md | 20 ++++++ .../examples/databases/update-collection.md | 31 ++++++++++ .../databases/update-datetime-attribute.md | 21 +++++++ .../examples/databases/update-document.md | 18 ++++++ .../examples/databases/update-documents.md | 20 ++++++ .../databases/update-email-attribute.md | 21 +++++++ .../databases/update-enum-attribute.md | 23 +++++++ .../databases/update-float-attribute.md | 24 ++++++++ .../databases/update-integer-attribute.md | 24 ++++++++ .../examples/databases/update-ip-attribute.md | 21 +++++++ .../update-relationship-attribute.md | 24 ++++++++ .../databases/update-string-attribute.md | 23 +++++++ .../databases/update-url-attribute.md | 21 +++++++ .../examples/databases/update.md | 13 ++++ .../examples/databases/upsert-document.md | 16 +++++ .../examples/databases/upsert-documents.md | 18 ++++++ .../examples/functions/create-deployment.md | 24 ++++++++ .../functions/create-duplicate-deployment.md | 35 +++++++++++ .../examples/functions/create-execution.md | 35 +++++++++++ .../functions/create-template-deployment.md | 38 ++++++++++++ .../examples/functions/create-variable.md | 17 ++++++ .../functions/create-vcs-deployment.md | 36 +++++++++++ .../examples/functions/create.md | 60 ++++++++++++++++++ .../examples/functions/delete-deployment.md | 8 +++ .../examples/functions/delete-execution.md | 8 +++ .../examples/functions/delete-variable.md | 8 +++ .../examples/functions/delete.md | 7 +++ .../functions/get-deployment-download.md | 0 .../examples/functions/get-deployment.md | 0 .../examples/functions/get-execution.md | 0 .../examples/functions/get-variable.md | 0 .../server-graphql/examples/functions/get.md | 0 .../examples/functions/list-deployments.md | 0 .../examples/functions/list-executions.md | 0 .../examples/functions/list-runtimes.md | 0 .../examples/functions/list-specifications.md | 0 .../examples/functions/list-variables.md | 0 .../server-graphql/examples/functions/list.md | 0 .../functions/update-deployment-status.md | 34 +++++++++++ .../functions/update-function-deployment.md | 44 +++++++++++++ .../examples/functions/update-variable.md | 18 ++++++ .../examples/functions/update.md | 60 ++++++++++++++++++ .../examples/health/get-antivirus.md | 0 .../examples/health/get-cache.md | 0 .../examples/health/get-certificate.md | 0 .../server-graphql/examples/health/get-d-b.md | 0 .../examples/health/get-failed-jobs.md | 0 .../examples/health/get-pub-sub.md | 0 .../examples/health/get-queue-builds.md | 0 .../examples/health/get-queue-certificates.md | 0 .../examples/health/get-queue-databases.md | 0 .../examples/health/get-queue-deletes.md | 0 .../examples/health/get-queue-functions.md | 0 .../examples/health/get-queue-logs.md | 0 .../examples/health/get-queue-mails.md | 0 .../examples/health/get-queue-messaging.md | 0 .../examples/health/get-queue-migrations.md | 0 .../health/get-queue-stats-resources.md | 0 .../examples/health/get-queue-usage.md | 0 .../examples/health/get-queue-webhooks.md | 0 .../examples/health/get-storage-local.md | 0 .../examples/health/get-storage.md | 0 .../examples/health/get-time.md | 0 .../server-graphql/examples/health/get.md | 0 .../server-graphql/examples/locale/get.md | 0 .../examples/locale/list-codes.md | 0 .../examples/locale/list-continents.md | 0 .../examples/locale/list-countries-e-u.md | 0 .../examples/locale/list-countries-phones.md | 0 .../examples/locale/list-countries.md | 0 .../examples/locale/list-currencies.md | 0 .../examples/locale/list-languages.md | 0 .../messaging/create-apns-provider.md | 22 +++++++ .../examples/messaging/create-email.md | 30 +++++++++ .../examples/messaging/create-fcm-provider.md | 18 ++++++ .../messaging/create-mailgun-provider.md | 24 ++++++++ .../messaging/create-msg91provider.md | 20 ++++++ .../examples/messaging/create-push.md | 37 +++++++++++ .../messaging/create-sendgrid-provider.md | 22 +++++++ .../examples/messaging/create-sms.md | 25 ++++++++ .../messaging/create-smtp-provider.md | 28 +++++++++ .../examples/messaging/create-subscriber.md | 27 ++++++++ .../messaging/create-telesign-provider.md | 20 ++++++ .../messaging/create-textmagic-provider.md | 20 ++++++ .../examples/messaging/create-topic.md | 16 +++++ .../messaging/create-twilio-provider.md | 20 ++++++ .../messaging/create-vonage-provider.md | 20 ++++++ .../examples/messaging/delete-provider.md | 7 +++ .../examples/messaging/delete-subscriber.md | 8 +++ .../examples/messaging/delete-topic.md | 7 +++ .../examples/messaging/delete.md | 7 +++ .../examples/messaging/get-message.md | 0 .../examples/messaging/get-provider.md | 0 .../examples/messaging/get-subscriber.md | 0 .../examples/messaging/get-topic.md | 0 .../examples/messaging/list-message-logs.md | 0 .../examples/messaging/list-messages.md | 0 .../examples/messaging/list-provider-logs.md | 0 .../examples/messaging/list-providers.md | 0 .../messaging/list-subscriber-logs.md | 0 .../examples/messaging/list-subscribers.md | 0 .../examples/messaging/list-targets.md | 0 .../examples/messaging/list-topic-logs.md | 0 .../examples/messaging/list-topics.md | 0 .../messaging/update-apns-provider.md | 22 +++++++ .../examples/messaging/update-email.md | 30 +++++++++ .../examples/messaging/update-fcm-provider.md | 18 ++++++ .../messaging/update-mailgun-provider.md | 24 ++++++++ .../messaging/update-msg91provider.md | 20 ++++++ .../examples/messaging/update-push.md | 37 +++++++++++ .../messaging/update-sendgrid-provider.md | 22 +++++++ .../examples/messaging/update-sms.md | 25 ++++++++ .../messaging/update-smtp-provider.md | 28 +++++++++ .../messaging/update-telesign-provider.md | 20 ++++++ .../messaging/update-textmagic-provider.md | 20 ++++++ .../examples/messaging/update-topic.md | 16 +++++ .../messaging/update-twilio-provider.md | 20 ++++++ .../messaging/update-vonage-provider.md | 20 ++++++ .../examples/sites/create-deployment.md | 24 ++++++++ .../sites/create-duplicate-deployment.md | 34 +++++++++++ .../sites/create-template-deployment.md | 38 ++++++++++++ .../examples/sites/create-variable.md | 17 ++++++ .../examples/sites/create-vcs-deployment.md | 36 +++++++++++ .../server-graphql/examples/sites/create.md | 61 +++++++++++++++++++ .../examples/sites/delete-deployment.md | 8 +++ .../examples/sites/delete-log.md | 8 +++ .../examples/sites/delete-variable.md | 8 +++ .../server-graphql/examples/sites/delete.md | 7 +++ .../examples/sites/get-deployment-download.md | 0 .../examples/sites/get-deployment.md | 0 .../server-graphql/examples/sites/get-log.md | 0 .../examples/sites/get-variable.md | 0 .../server-graphql/examples/sites/get.md | 0 .../examples/sites/list-deployments.md | 0 .../examples/sites/list-frameworks.md | 0 .../examples/sites/list-logs.md | 0 .../examples/sites/list-specifications.md | 0 .../examples/sites/list-variables.md | 0 .../server-graphql/examples/sites/list.md | 0 .../sites/update-deployment-status.md | 34 +++++++++++ .../examples/sites/update-site-deployment.md | 45 ++++++++++++++ .../examples/sites/update-variable.md | 18 ++++++ .../server-graphql/examples/sites/update.md | 61 +++++++++++++++++++ .../examples/storage/create-bucket.md | 27 ++++++++ .../examples/storage/create-file.md | 26 ++++++++ .../examples/storage/delete-bucket.md | 7 +++ .../examples/storage/delete-file.md | 8 +++ .../examples/storage/get-bucket.md | 0 .../examples/storage/get-file-download.md | 0 .../examples/storage/get-file-preview.md | 0 .../examples/storage/get-file-view.md | 0 .../examples/storage/get-file.md | 0 .../examples/storage/list-buckets.md | 0 .../examples/storage/list-files.md | 0 .../examples/storage/update-bucket.md | 27 ++++++++ .../examples/storage/update-file.md | 20 ++++++ .../examples/tables/create-boolean-column.md | 20 ++++++ .../examples/tables/create-datetime-column.md | 21 +++++++ .../examples/tables/create-email-column.md | 21 +++++++ .../examples/tables/create-enum-column.md | 23 +++++++ .../examples/tables/create-float-column.md | 24 ++++++++ .../examples/tables/create-index.md | 21 +++++++ .../examples/tables/create-integer-column.md | 24 ++++++++ .../examples/tables/create-ip-column.md | 21 +++++++ .../tables/create-relationship-column.md | 27 ++++++++ .../examples/tables/create-row.md | 18 ++++++ .../examples/tables/create-rows.md | 19 ++++++ .../examples/tables/create-string-column.md | 24 ++++++++ .../examples/tables/create-url-column.md | 21 +++++++ .../server-graphql/examples/tables/create.md | 31 ++++++++++ .../examples/tables/decrement-row-column.md | 19 ++++++ .../examples/tables/delete-column.md | 9 +++ .../examples/tables/delete-index.md | 9 +++ .../examples/tables/delete-row.md | 9 +++ .../examples/tables/delete-rows.md | 19 ++++++ .../server-graphql/examples/tables/delete.md | 8 +++ .../examples/tables/get-column.md | 0 .../examples/tables/get-index.md | 0 .../server-graphql/examples/tables/get-row.md | 0 .../server-graphql/examples/tables/get.md | 0 .../examples/tables/increment-row-column.md | 19 ++++++ .../examples/tables/list-columns.md | 0 .../examples/tables/list-indexes.md | 0 .../examples/tables/list-rows.md | 0 .../server-graphql/examples/tables/list.md | 0 .../examples/tables/update-boolean-column.md | 20 ++++++ .../examples/tables/update-datetime-column.md | 21 +++++++ .../examples/tables/update-email-column.md | 21 +++++++ .../examples/tables/update-enum-column.md | 23 +++++++ .../examples/tables/update-float-column.md | 24 ++++++++ .../examples/tables/update-integer-column.md | 24 ++++++++ .../examples/tables/update-ip-column.md | 21 +++++++ .../tables/update-relationship-column.md | 24 ++++++++ .../examples/tables/update-row.md | 18 ++++++ .../examples/tables/update-rows.md | 20 ++++++ .../examples/tables/update-string-column.md | 23 +++++++ .../examples/tables/update-url-column.md | 21 +++++++ .../server-graphql/examples/tables/update.md | 31 ++++++++++ .../examples/tables/upsert-row.md | 16 +++++ .../examples/tables/upsert-rows.md | 18 ++++++ .../examples/teams/create-membership.md | 25 ++++++++ .../server-graphql/examples/teams/create.md | 16 +++++ .../examples/teams/delete-membership.md | 8 +++ .../server-graphql/examples/teams/delete.md | 7 +++ .../examples/teams/get-membership.md | 0 .../examples/teams/get-prefs.md | 0 .../server-graphql/examples/teams/get.md | 0 .../examples/teams/list-memberships.md | 0 .../server-graphql/examples/teams/list.md | 0 .../teams/update-membership-status.md | 22 +++++++ .../examples/teams/update-membership.md | 21 +++++++ .../examples/teams/update-name.md | 15 +++++ .../examples/teams/update-prefs.md | 8 +++ .../examples/tokens/create-file-token.md | 15 +++++ .../server-graphql/examples/tokens/delete.md | 7 +++ .../server-graphql/examples/tokens/get.md | 0 .../server-graphql/examples/tokens/list.md | 0 .../server-graphql/examples/tokens/update.md | 14 +++++ .../examples/users/create-argon2user.md | 40 ++++++++++++ .../examples/users/create-bcrypt-user.md | 40 ++++++++++++ .../examples/users/create-j-w-t.md | 9 +++ .../examples/users/create-m-d5user.md | 40 ++++++++++++ .../users/create-mfa-recovery-codes.md | 7 +++ .../examples/users/create-p-h-pass-user.md | 40 ++++++++++++ .../examples/users/create-s-h-a-user.md | 41 +++++++++++++ .../users/create-scrypt-modified-user.md | 43 +++++++++++++ .../examples/users/create-scrypt-user.md | 45 ++++++++++++++ .../examples/users/create-session.md | 35 +++++++++++ .../examples/users/create-target.md | 20 ++++++ .../examples/users/create-token.md | 14 +++++ .../server-graphql/examples/users/create.md | 41 +++++++++++++ .../examples/users/delete-identity.md | 7 +++ .../users/delete-mfa-authenticator.md | 8 +++ .../examples/users/delete-session.md | 8 +++ .../examples/users/delete-sessions.md | 7 +++ .../examples/users/delete-target.md | 8 +++ .../server-graphql/examples/users/delete.md | 7 +++ .../examples/users/get-mfa-recovery-codes.md | 0 .../examples/users/get-prefs.md | 0 .../examples/users/get-target.md | 0 .../server-graphql/examples/users/get.md | 0 .../examples/users/list-identities.md | 0 .../examples/users/list-logs.md | 0 .../examples/users/list-memberships.md | 0 .../examples/users/list-mfa-factors.md | 0 .../examples/users/list-sessions.md | 0 .../examples/users/list-targets.md | 0 .../server-graphql/examples/users/list.md | 0 .../users/update-email-verification.md | 38 ++++++++++++ .../examples/users/update-email.md | 38 ++++++++++++ .../examples/users/update-labels.md | 38 ++++++++++++ .../users/update-mfa-recovery-codes.md | 7 +++ .../examples/users/update-mfa.md | 38 ++++++++++++ .../examples/users/update-name.md | 38 ++++++++++++ .../examples/users/update-password.md | 38 ++++++++++++ .../users/update-phone-verification.md | 38 ++++++++++++ .../examples/users/update-phone.md | 38 ++++++++++++ .../examples/users/update-prefs.md | 8 +++ .../examples/users/update-status.md | 38 ++++++++++++ .../examples/users/update-target.md | 19 ++++++ .../java/account/create-anonymous-session.md | 18 ++++++ .../account/create-email-password-session.md | 23 +++++++ .../java/account/create-email-token.md | 24 ++++++++ .../java/account/create-j-w-t.md | 18 ++++++ .../java/account/create-magic-u-r-l-token.md | 25 ++++++++ .../java/account/create-mfa-authenticator.md | 24 ++++++++ .../java/account/create-mfa-challenge.md | 23 +++++++ .../java/account/create-mfa-recovery-codes.md | 19 ++++++ .../java/account/create-o-auth2token.md | 26 ++++++++ .../java/account/create-phone-token.md | 23 +++++++ .../java/account/create-phone-verification.md | 19 ++++++ .../java/account/create-recovery.md | 24 ++++++++ .../java/account/create-session.md | 23 +++++++ .../java/account/create-verification.md | 23 +++++++ .../server-kotlin/java/account/create.md | 25 ++++++++ .../java/account/delete-identity.md | 23 +++++++ .../java/account/delete-mfa-authenticator.md | 24 ++++++++ .../java/account/delete-session.md | 23 +++++++ .../java/account/delete-sessions.md | 19 ++++++ .../java/account/get-mfa-recovery-codes.md | 19 ++++++ .../server-kotlin/java/account/get-prefs.md | 19 ++++++ .../server-kotlin/java/account/get-session.md | 23 +++++++ .../1.8.x/server-kotlin/java/account/get.md | 19 ++++++ .../java/account/list-identities.md | 23 +++++++ .../server-kotlin/java/account/list-logs.md | 23 +++++++ .../java/account/list-mfa-factors.md | 19 ++++++ .../java/account/list-sessions.md | 19 ++++++ .../java/account/update-email.md | 24 ++++++++ .../java/account/update-m-f-a.md | 23 +++++++ .../account/update-magic-u-r-l-session.md | 23 +++++++ .../java/account/update-mfa-authenticator.md | 25 ++++++++ .../java/account/update-mfa-challenge.md | 24 ++++++++ .../java/account/update-mfa-recovery-codes.md | 19 ++++++ .../server-kotlin/java/account/update-name.md | 23 +++++++ .../java/account/update-password.md | 24 ++++++++ .../java/account/update-phone-session.md | 23 +++++++ .../java/account/update-phone-verification.md | 24 ++++++++ .../java/account/update-phone.md | 24 ++++++++ .../java/account/update-prefs.md | 23 +++++++ .../java/account/update-recovery.md | 25 ++++++++ .../java/account/update-session.md | 23 +++++++ .../java/account/update-status.md | 19 ++++++ .../java/account/update-verification.md | 24 ++++++++ .../server-kotlin/java/avatars/get-browser.md | 27 ++++++++ .../java/avatars/get-credit-card.md | 27 ++++++++ .../server-kotlin/java/avatars/get-favicon.md | 23 +++++++ .../server-kotlin/java/avatars/get-flag.md | 27 ++++++++ .../server-kotlin/java/avatars/get-image.md | 25 ++++++++ .../java/avatars/get-initials.md | 26 ++++++++ .../server-kotlin/java/avatars/get-q-r.md | 26 ++++++++ .../databases/create-boolean-attribute.md | 28 +++++++++ .../java/databases/create-collection.md | 28 +++++++++ .../databases/create-datetime-attribute.md | 28 +++++++++ .../java/databases/create-document.md | 28 +++++++++ .../java/databases/create-documents.md | 25 ++++++++ .../java/databases/create-email-attribute.md | 28 +++++++++ .../java/databases/create-enum-attribute.md | 29 +++++++++ .../java/databases/create-float-attribute.md | 30 +++++++++ .../java/databases/create-index.md | 30 +++++++++ .../databases/create-integer-attribute.md | 30 +++++++++ .../java/databases/create-ip-attribute.md | 28 +++++++++ .../create-relationship-attribute.md | 31 ++++++++++ .../java/databases/create-string-attribute.md | 30 +++++++++ .../java/databases/create-url-attribute.md | 28 +++++++++ .../server-kotlin/java/databases/create.md | 25 ++++++++ .../databases/decrement-document-attribute.md | 28 +++++++++ .../java/databases/delete-attribute.md | 25 ++++++++ .../java/databases/delete-collection.md | 24 ++++++++ .../java/databases/delete-document.md | 25 ++++++++ .../java/databases/delete-documents.md | 25 ++++++++ .../java/databases/delete-index.md | 25 ++++++++ .../server-kotlin/java/databases/delete.md | 23 +++++++ .../java/databases/get-attribute.md | 25 ++++++++ .../java/databases/get-collection.md | 24 ++++++++ .../java/databases/get-document.md | 26 ++++++++ .../server-kotlin/java/databases/get-index.md | 25 ++++++++ .../1.8.x/server-kotlin/java/databases/get.md | 23 +++++++ .../databases/increment-document-attribute.md | 28 +++++++++ .../java/databases/list-attributes.md | 25 ++++++++ .../java/databases/list-collections.md | 25 ++++++++ .../java/databases/list-documents.md | 25 ++++++++ .../java/databases/list-indexes.md | 25 ++++++++ .../server-kotlin/java/databases/list.md | 24 ++++++++ .../databases/update-boolean-attribute.md | 28 +++++++++ .../java/databases/update-collection.md | 28 +++++++++ .../databases/update-datetime-attribute.md | 28 +++++++++ .../java/databases/update-document.md | 27 ++++++++ .../java/databases/update-documents.md | 26 ++++++++ .../java/databases/update-email-attribute.md | 28 +++++++++ .../java/databases/update-enum-attribute.md | 29 +++++++++ .../java/databases/update-float-attribute.md | 30 +++++++++ .../databases/update-integer-attribute.md | 30 +++++++++ .../java/databases/update-ip-attribute.md | 28 +++++++++ .../update-relationship-attribute.md | 27 ++++++++ .../java/databases/update-string-attribute.md | 29 +++++++++ .../java/databases/update-url-attribute.md | 28 +++++++++ .../server-kotlin/java/databases/update.md | 25 ++++++++ .../java/databases/upsert-document.md | 26 ++++++++ .../java/databases/upsert-documents.md | 24 ++++++++ .../java/functions/create-deployment.md | 28 +++++++++ .../functions/create-duplicate-deployment.md | 25 ++++++++ .../java/functions/create-execution.md | 29 +++++++++ .../functions/create-template-deployment.md | 28 +++++++++ .../java/functions/create-variable.md | 26 ++++++++ .../java/functions/create-vcs-deployment.md | 27 ++++++++ .../server-kotlin/java/functions/create.md | 41 +++++++++++++ .../java/functions/delete-deployment.md | 24 ++++++++ .../java/functions/delete-execution.md | 24 ++++++++ .../java/functions/delete-variable.md | 24 ++++++++ .../server-kotlin/java/functions/delete.md | 23 +++++++ .../java/functions/get-deployment-download.md | 25 ++++++++ .../java/functions/get-deployment.md | 24 ++++++++ .../java/functions/get-execution.md | 24 ++++++++ .../java/functions/get-variable.md | 24 ++++++++ .../1.8.x/server-kotlin/java/functions/get.md | 23 +++++++ .../java/functions/list-deployments.md | 25 ++++++++ .../java/functions/list-executions.md | 24 ++++++++ .../java/functions/list-runtimes.md | 19 ++++++ .../java/functions/list-specifications.md | 19 ++++++ .../java/functions/list-variables.md | 23 +++++++ .../server-kotlin/java/functions/list.md | 24 ++++++++ .../functions/update-deployment-status.md | 24 ++++++++ .../functions/update-function-deployment.md | 24 ++++++++ .../java/functions/update-variable.md | 27 ++++++++ .../server-kotlin/java/functions/update.md | 40 ++++++++++++ .../server-kotlin/java/graphql/mutation.md | 23 +++++++ .../1.8.x/server-kotlin/java/graphql/query.md | 23 +++++++ .../java/health/get-antivirus.md | 19 ++++++ .../server-kotlin/java/health/get-cache.md | 19 ++++++ .../java/health/get-certificate.md | 23 +++++++ .../server-kotlin/java/health/get-d-b.md | 19 ++++++ .../java/health/get-failed-jobs.md | 25 ++++++++ .../server-kotlin/java/health/get-pub-sub.md | 19 ++++++ .../java/health/get-queue-builds.md | 23 +++++++ .../java/health/get-queue-certificates.md | 23 +++++++ .../java/health/get-queue-databases.md | 24 ++++++++ .../java/health/get-queue-deletes.md | 23 +++++++ .../java/health/get-queue-functions.md | 23 +++++++ .../java/health/get-queue-logs.md | 23 +++++++ .../java/health/get-queue-mails.md | 23 +++++++ .../java/health/get-queue-messaging.md | 23 +++++++ .../java/health/get-queue-migrations.md | 23 +++++++ .../java/health/get-queue-stats-resources.md | 23 +++++++ .../java/health/get-queue-usage.md | 23 +++++++ .../java/health/get-queue-webhooks.md | 23 +++++++ .../java/health/get-storage-local.md | 19 ++++++ .../server-kotlin/java/health/get-storage.md | 19 ++++++ .../server-kotlin/java/health/get-time.md | 19 ++++++ .../1.8.x/server-kotlin/java/health/get.md | 19 ++++++ .../1.8.x/server-kotlin/java/locale/get.md | 19 ++++++ .../server-kotlin/java/locale/list-codes.md | 19 ++++++ .../java/locale/list-continents.md | 19 ++++++ .../java/locale/list-countries-e-u.md | 19 ++++++ .../java/locale/list-countries-phones.md | 19 ++++++ .../java/locale/list-countries.md | 19 ++++++ .../java/locale/list-currencies.md | 19 ++++++ .../java/locale/list-languages.md | 19 ++++++ .../java/messaging/create-apns-provider.md | 30 +++++++++ .../java/messaging/create-email.md | 34 +++++++++++ .../java/messaging/create-fcm-provider.md | 26 ++++++++ .../java/messaging/create-mailgun-provider.md | 32 ++++++++++ .../java/messaging/create-msg91provider.md | 28 +++++++++ .../java/messaging/create-push.md | 41 +++++++++++++ .../messaging/create-sendgrid-provider.md | 30 +++++++++ .../java/messaging/create-sms.md | 29 +++++++++ .../java/messaging/create-smtp-provider.md | 36 +++++++++++ .../java/messaging/create-subscriber.md | 25 ++++++++ .../messaging/create-telesign-provider.md | 28 +++++++++ .../messaging/create-textmagic-provider.md | 28 +++++++++ .../java/messaging/create-topic.md | 25 ++++++++ .../java/messaging/create-twilio-provider.md | 28 +++++++++ .../java/messaging/create-vonage-provider.md | 28 +++++++++ .../java/messaging/delete-provider.md | 23 +++++++ .../java/messaging/delete-subscriber.md | 24 ++++++++ .../java/messaging/delete-topic.md | 23 +++++++ .../server-kotlin/java/messaging/delete.md | 23 +++++++ .../java/messaging/get-message.md | 23 +++++++ .../java/messaging/get-provider.md | 23 +++++++ .../java/messaging/get-subscriber.md | 24 ++++++++ .../server-kotlin/java/messaging/get-topic.md | 23 +++++++ .../java/messaging/list-message-logs.md | 24 ++++++++ .../java/messaging/list-messages.md | 24 ++++++++ .../java/messaging/list-provider-logs.md | 24 ++++++++ .../java/messaging/list-providers.md | 24 ++++++++ .../java/messaging/list-subscriber-logs.md | 24 ++++++++ .../java/messaging/list-subscribers.md | 25 ++++++++ .../java/messaging/list-targets.md | 24 ++++++++ .../java/messaging/list-topic-logs.md | 24 ++++++++ .../java/messaging/list-topics.md | 24 ++++++++ .../java/messaging/update-apns-provider.md | 30 +++++++++ .../java/messaging/update-email.md | 34 +++++++++++ .../java/messaging/update-fcm-provider.md | 26 ++++++++ .../java/messaging/update-mailgun-provider.md | 32 ++++++++++ .../java/messaging/update-msg91provider.md | 28 +++++++++ .../java/messaging/update-push.md | 41 +++++++++++++ .../messaging/update-sendgrid-provider.md | 30 +++++++++ .../java/messaging/update-sms.md | 29 +++++++++ .../java/messaging/update-smtp-provider.md | 36 +++++++++++ .../messaging/update-telesign-provider.md | 28 +++++++++ .../messaging/update-textmagic-provider.md | 28 +++++++++ .../java/messaging/update-topic.md | 25 ++++++++ .../java/messaging/update-twilio-provider.md | 28 +++++++++ .../java/messaging/update-vonage-provider.md | 28 +++++++++ .../java/sites/create-deployment.md | 29 +++++++++ .../java/sites/create-duplicate-deployment.md | 24 ++++++++ .../java/sites/create-template-deployment.md | 28 +++++++++ .../java/sites/create-variable.md | 26 ++++++++ .../java/sites/create-vcs-deployment.md | 27 ++++++++ .../1.8.x/server-kotlin/java/sites/create.md | 42 +++++++++++++ .../java/sites/delete-deployment.md | 24 ++++++++ .../server-kotlin/java/sites/delete-log.md | 24 ++++++++ .../java/sites/delete-variable.md | 24 ++++++++ .../1.8.x/server-kotlin/java/sites/delete.md | 23 +++++++ .../java/sites/get-deployment-download.md | 25 ++++++++ .../java/sites/get-deployment.md | 24 ++++++++ .../1.8.x/server-kotlin/java/sites/get-log.md | 24 ++++++++ .../server-kotlin/java/sites/get-variable.md | 24 ++++++++ .../1.8.x/server-kotlin/java/sites/get.md | 23 +++++++ .../java/sites/list-deployments.md | 25 ++++++++ .../java/sites/list-frameworks.md | 19 ++++++ .../server-kotlin/java/sites/list-logs.md | 24 ++++++++ .../java/sites/list-specifications.md | 19 ++++++ .../java/sites/list-variables.md | 23 +++++++ .../1.8.x/server-kotlin/java/sites/list.md | 24 ++++++++ .../java/sites/update-deployment-status.md | 24 ++++++++ .../java/sites/update-site-deployment.md | 24 ++++++++ .../java/sites/update-variable.md | 27 ++++++++ .../1.8.x/server-kotlin/java/sites/update.md | 41 +++++++++++++ .../java/storage/create-bucket.md | 32 ++++++++++ .../server-kotlin/java/storage/create-file.md | 27 ++++++++ .../java/storage/delete-bucket.md | 23 +++++++ .../server-kotlin/java/storage/delete-file.md | 24 ++++++++ .../server-kotlin/java/storage/get-bucket.md | 23 +++++++ .../java/storage/get-file-download.md | 25 ++++++++ .../java/storage/get-file-preview.md | 36 +++++++++++ .../java/storage/get-file-view.md | 25 ++++++++ .../server-kotlin/java/storage/get-file.md | 24 ++++++++ .../java/storage/list-buckets.md | 24 ++++++++ .../server-kotlin/java/storage/list-files.md | 25 ++++++++ .../java/storage/update-bucket.md | 32 ++++++++++ .../server-kotlin/java/storage/update-file.md | 26 ++++++++ .../java/tables/create-boolean-column.md | 28 +++++++++ .../java/tables/create-datetime-column.md | 28 +++++++++ .../java/tables/create-email-column.md | 28 +++++++++ .../java/tables/create-enum-column.md | 29 +++++++++ .../java/tables/create-float-column.md | 30 +++++++++ .../server-kotlin/java/tables/create-index.md | 30 +++++++++ .../java/tables/create-integer-column.md | 30 +++++++++ .../java/tables/create-ip-column.md | 28 +++++++++ .../java/tables/create-relationship-column.md | 31 ++++++++++ .../server-kotlin/java/tables/create-row.md | 28 +++++++++ .../server-kotlin/java/tables/create-rows.md | 25 ++++++++ .../java/tables/create-string-column.md | 30 +++++++++ .../java/tables/create-url-column.md | 28 +++++++++ .../1.8.x/server-kotlin/java/tables/create.md | 28 +++++++++ .../java/tables/decrement-row-column.md | 28 +++++++++ .../java/tables/delete-column.md | 25 ++++++++ .../server-kotlin/java/tables/delete-index.md | 25 ++++++++ .../server-kotlin/java/tables/delete-row.md | 25 ++++++++ .../server-kotlin/java/tables/delete-rows.md | 25 ++++++++ .../1.8.x/server-kotlin/java/tables/delete.md | 24 ++++++++ .../server-kotlin/java/tables/get-column.md | 25 ++++++++ .../server-kotlin/java/tables/get-index.md | 25 ++++++++ .../server-kotlin/java/tables/get-row.md | 26 ++++++++ .../1.8.x/server-kotlin/java/tables/get.md | 24 ++++++++ .../java/tables/increment-row-column.md | 28 +++++++++ .../server-kotlin/java/tables/list-columns.md | 25 ++++++++ .../server-kotlin/java/tables/list-indexes.md | 25 ++++++++ .../server-kotlin/java/tables/list-rows.md | 25 ++++++++ .../1.8.x/server-kotlin/java/tables/list.md | 25 ++++++++ .../java/tables/update-boolean-column.md | 28 +++++++++ .../java/tables/update-datetime-column.md | 28 +++++++++ .../java/tables/update-email-column.md | 28 +++++++++ .../java/tables/update-enum-column.md | 29 +++++++++ .../java/tables/update-float-column.md | 30 +++++++++ .../java/tables/update-integer-column.md | 30 +++++++++ .../java/tables/update-ip-column.md | 28 +++++++++ .../java/tables/update-relationship-column.md | 27 ++++++++ .../server-kotlin/java/tables/update-row.md | 27 ++++++++ .../server-kotlin/java/tables/update-rows.md | 26 ++++++++ .../java/tables/update-string-column.md | 29 +++++++++ .../java/tables/update-url-column.md | 28 +++++++++ .../1.8.x/server-kotlin/java/tables/update.md | 28 +++++++++ .../server-kotlin/java/tables/upsert-row.md | 26 ++++++++ .../server-kotlin/java/tables/upsert-rows.md | 24 ++++++++ .../java/teams/create-membership.md | 29 +++++++++ .../1.8.x/server-kotlin/java/teams/create.md | 25 ++++++++ .../java/teams/delete-membership.md | 24 ++++++++ .../1.8.x/server-kotlin/java/teams/delete.md | 23 +++++++ .../java/teams/get-membership.md | 24 ++++++++ .../server-kotlin/java/teams/get-prefs.md | 23 +++++++ .../1.8.x/server-kotlin/java/teams/get.md | 23 +++++++ .../java/teams/list-memberships.md | 25 ++++++++ .../1.8.x/server-kotlin/java/teams/list.md | 24 ++++++++ .../java/teams/update-membership-status.md | 26 ++++++++ .../java/teams/update-membership.md | 25 ++++++++ .../server-kotlin/java/teams/update-name.md | 24 ++++++++ .../server-kotlin/java/teams/update-prefs.md | 24 ++++++++ .../java/tokens/create-file-token.md | 25 ++++++++ .../1.8.x/server-kotlin/java/tokens/delete.md | 23 +++++++ .../1.8.x/server-kotlin/java/tokens/get.md | 23 +++++++ .../1.8.x/server-kotlin/java/tokens/list.md | 25 ++++++++ .../1.8.x/server-kotlin/java/tokens/update.md | 24 ++++++++ .../java/users/create-argon2user.md | 26 ++++++++ .../java/users/create-bcrypt-user.md | 26 ++++++++ .../server-kotlin/java/users/create-j-w-t.md | 25 ++++++++ .../java/users/create-m-d5user.md | 26 ++++++++ .../java/users/create-mfa-recovery-codes.md | 23 +++++++ .../java/users/create-p-h-pass-user.md | 26 ++++++++ .../java/users/create-s-h-a-user.md | 27 ++++++++ .../java/users/create-scrypt-modified-user.md | 29 +++++++++ .../java/users/create-scrypt-user.md | 31 ++++++++++ .../java/users/create-session.md | 23 +++++++ .../server-kotlin/java/users/create-target.md | 29 +++++++++ .../server-kotlin/java/users/create-token.md | 25 ++++++++ .../1.8.x/server-kotlin/java/users/create.md | 27 ++++++++ .../java/users/delete-identity.md | 23 +++++++ .../java/users/delete-mfa-authenticator.md | 25 ++++++++ .../java/users/delete-session.md | 24 ++++++++ .../java/users/delete-sessions.md | 23 +++++++ .../server-kotlin/java/users/delete-target.md | 24 ++++++++ .../1.8.x/server-kotlin/java/users/delete.md | 23 +++++++ .../java/users/get-mfa-recovery-codes.md | 23 +++++++ .../server-kotlin/java/users/get-prefs.md | 23 +++++++ .../server-kotlin/java/users/get-target.md | 24 ++++++++ .../1.8.x/server-kotlin/java/users/get.md | 23 +++++++ .../java/users/list-identities.md | 24 ++++++++ .../server-kotlin/java/users/list-logs.md | 24 ++++++++ .../java/users/list-memberships.md | 25 ++++++++ .../java/users/list-mfa-factors.md | 23 +++++++ .../server-kotlin/java/users/list-sessions.md | 23 +++++++ .../server-kotlin/java/users/list-targets.md | 24 ++++++++ .../1.8.x/server-kotlin/java/users/list.md | 24 ++++++++ .../java/users/update-email-verification.md | 24 ++++++++ .../server-kotlin/java/users/update-email.md | 24 ++++++++ .../server-kotlin/java/users/update-labels.md | 24 ++++++++ .../java/users/update-mfa-recovery-codes.md | 23 +++++++ .../server-kotlin/java/users/update-mfa.md | 24 ++++++++ .../server-kotlin/java/users/update-name.md | 24 ++++++++ .../java/users/update-password.md | 24 ++++++++ .../java/users/update-phone-verification.md | 24 ++++++++ .../server-kotlin/java/users/update-phone.md | 24 ++++++++ .../server-kotlin/java/users/update-prefs.md | 24 ++++++++ .../server-kotlin/java/users/update-status.md | 24 ++++++++ .../server-kotlin/java/users/update-target.md | 27 ++++++++ .../account/create-anonymous-session.md | 11 ++++ .../account/create-email-password-session.md | 14 +++++ .../kotlin/account/create-email-token.md | 15 +++++ .../kotlin/account/create-j-w-t.md | 11 ++++ .../account/create-magic-u-r-l-token.md | 16 +++++ .../account/create-mfa-authenticator.md | 15 +++++ .../kotlin/account/create-mfa-challenge.md | 14 +++++ .../account/create-mfa-recovery-codes.md | 12 ++++ .../kotlin/account/create-o-auth2token.md | 17 ++++++ .../kotlin/account/create-phone-token.md | 14 +++++ .../account/create-phone-verification.md | 12 ++++ .../kotlin/account/create-recovery.md | 15 +++++ .../kotlin/account/create-session.md | 14 +++++ .../kotlin/account/create-verification.md | 14 +++++ .../server-kotlin/kotlin/account/create.md | 16 +++++ .../kotlin/account/delete-identity.md | 14 +++++ .../account/delete-mfa-authenticator.md | 15 +++++ .../kotlin/account/delete-session.md | 14 +++++ .../kotlin/account/delete-sessions.md | 12 ++++ .../kotlin/account/get-mfa-recovery-codes.md | 12 ++++ .../server-kotlin/kotlin/account/get-prefs.md | 12 ++++ .../kotlin/account/get-session.md | 14 +++++ .../1.8.x/server-kotlin/kotlin/account/get.md | 12 ++++ .../kotlin/account/list-identities.md | 14 +++++ .../server-kotlin/kotlin/account/list-logs.md | 14 +++++ .../kotlin/account/list-mfa-factors.md | 12 ++++ .../kotlin/account/list-sessions.md | 12 ++++ .../kotlin/account/update-email.md | 15 +++++ .../kotlin/account/update-m-f-a.md | 14 +++++ .../account/update-magic-u-r-l-session.md | 14 +++++ .../account/update-mfa-authenticator.md | 16 +++++ .../kotlin/account/update-mfa-challenge.md | 15 +++++ .../account/update-mfa-recovery-codes.md | 12 ++++ .../kotlin/account/update-name.md | 14 +++++ .../kotlin/account/update-password.md | 15 +++++ .../kotlin/account/update-phone-session.md | 14 +++++ .../account/update-phone-verification.md | 15 +++++ .../kotlin/account/update-phone.md | 15 +++++ .../kotlin/account/update-prefs.md | 14 +++++ .../kotlin/account/update-recovery.md | 16 +++++ .../kotlin/account/update-session.md | 14 +++++ .../kotlin/account/update-status.md | 12 ++++ .../kotlin/account/update-verification.md | 15 +++++ .../kotlin/avatars/get-browser.md | 18 ++++++ .../kotlin/avatars/get-credit-card.md | 18 ++++++ .../kotlin/avatars/get-favicon.md | 14 +++++ .../server-kotlin/kotlin/avatars/get-flag.md | 18 ++++++ .../server-kotlin/kotlin/avatars/get-image.md | 16 +++++ .../kotlin/avatars/get-initials.md | 17 ++++++ .../server-kotlin/kotlin/avatars/get-q-r.md | 17 ++++++ .../databases/create-boolean-attribute.md | 19 ++++++ .../kotlin/databases/create-collection.md | 19 ++++++ .../databases/create-datetime-attribute.md | 19 ++++++ .../kotlin/databases/create-document.md | 19 ++++++ .../kotlin/databases/create-documents.md | 16 +++++ .../databases/create-email-attribute.md | 19 ++++++ .../kotlin/databases/create-enum-attribute.md | 20 ++++++ .../databases/create-float-attribute.md | 21 +++++++ .../kotlin/databases/create-index.md | 21 +++++++ .../databases/create-integer-attribute.md | 21 +++++++ .../kotlin/databases/create-ip-attribute.md | 19 ++++++ .../create-relationship-attribute.md | 22 +++++++ .../databases/create-string-attribute.md | 21 +++++++ .../kotlin/databases/create-url-attribute.md | 19 ++++++ .../server-kotlin/kotlin/databases/create.md | 16 +++++ .../databases/decrement-document-attribute.md | 19 ++++++ .../kotlin/databases/delete-attribute.md | 16 +++++ .../kotlin/databases/delete-collection.md | 15 +++++ .../kotlin/databases/delete-document.md | 16 +++++ .../kotlin/databases/delete-documents.md | 16 +++++ .../kotlin/databases/delete-index.md | 16 +++++ .../server-kotlin/kotlin/databases/delete.md | 14 +++++ .../kotlin/databases/get-attribute.md | 16 +++++ .../kotlin/databases/get-collection.md | 15 +++++ .../kotlin/databases/get-document.md | 17 ++++++ .../kotlin/databases/get-index.md | 16 +++++ .../server-kotlin/kotlin/databases/get.md | 14 +++++ .../databases/increment-document-attribute.md | 19 ++++++ .../kotlin/databases/list-attributes.md | 16 +++++ .../kotlin/databases/list-collections.md | 16 +++++ .../kotlin/databases/list-documents.md | 16 +++++ .../kotlin/databases/list-indexes.md | 16 +++++ .../server-kotlin/kotlin/databases/list.md | 15 +++++ .../databases/update-boolean-attribute.md | 19 ++++++ .../kotlin/databases/update-collection.md | 19 ++++++ .../databases/update-datetime-attribute.md | 19 ++++++ .../kotlin/databases/update-document.md | 18 ++++++ .../kotlin/databases/update-documents.md | 17 ++++++ .../databases/update-email-attribute.md | 19 ++++++ .../kotlin/databases/update-enum-attribute.md | 20 ++++++ .../databases/update-float-attribute.md | 21 +++++++ .../databases/update-integer-attribute.md | 21 +++++++ .../kotlin/databases/update-ip-attribute.md | 19 ++++++ .../update-relationship-attribute.md | 18 ++++++ .../databases/update-string-attribute.md | 20 ++++++ .../kotlin/databases/update-url-attribute.md | 19 ++++++ .../server-kotlin/kotlin/databases/update.md | 16 +++++ .../kotlin/databases/upsert-document.md | 17 ++++++ .../kotlin/databases/upsert-documents.md | 15 +++++ .../kotlin/functions/create-deployment.md | 19 ++++++ .../functions/create-duplicate-deployment.md | 16 +++++ .../kotlin/functions/create-execution.md | 20 ++++++ .../functions/create-template-deployment.md | 19 ++++++ .../kotlin/functions/create-variable.md | 17 ++++++ .../kotlin/functions/create-vcs-deployment.md | 18 ++++++ .../server-kotlin/kotlin/functions/create.md | 32 ++++++++++ .../kotlin/functions/delete-deployment.md | 15 +++++ .../kotlin/functions/delete-execution.md | 15 +++++ .../kotlin/functions/delete-variable.md | 15 +++++ .../server-kotlin/kotlin/functions/delete.md | 14 +++++ .../functions/get-deployment-download.md | 16 +++++ .../kotlin/functions/get-deployment.md | 15 +++++ .../kotlin/functions/get-execution.md | 15 +++++ .../kotlin/functions/get-variable.md | 15 +++++ .../server-kotlin/kotlin/functions/get.md | 14 +++++ .../kotlin/functions/list-deployments.md | 16 +++++ .../kotlin/functions/list-executions.md | 15 +++++ .../kotlin/functions/list-runtimes.md | 12 ++++ .../kotlin/functions/list-specifications.md | 12 ++++ .../kotlin/functions/list-variables.md | 14 +++++ .../server-kotlin/kotlin/functions/list.md | 15 +++++ .../functions/update-deployment-status.md | 15 +++++ .../functions/update-function-deployment.md | 15 +++++ .../kotlin/functions/update-variable.md | 18 ++++++ .../server-kotlin/kotlin/functions/update.md | 31 ++++++++++ .../server-kotlin/kotlin/graphql/mutation.md | 14 +++++ .../server-kotlin/kotlin/graphql/query.md | 14 +++++ .../kotlin/health/get-antivirus.md | 12 ++++ .../server-kotlin/kotlin/health/get-cache.md | 12 ++++ .../kotlin/health/get-certificate.md | 14 +++++ .../server-kotlin/kotlin/health/get-d-b.md | 12 ++++ .../kotlin/health/get-failed-jobs.md | 16 +++++ .../kotlin/health/get-pub-sub.md | 12 ++++ .../kotlin/health/get-queue-builds.md | 14 +++++ .../kotlin/health/get-queue-certificates.md | 14 +++++ .../kotlin/health/get-queue-databases.md | 15 +++++ .../kotlin/health/get-queue-deletes.md | 14 +++++ .../kotlin/health/get-queue-functions.md | 14 +++++ .../kotlin/health/get-queue-logs.md | 14 +++++ .../kotlin/health/get-queue-mails.md | 14 +++++ .../kotlin/health/get-queue-messaging.md | 14 +++++ .../kotlin/health/get-queue-migrations.md | 14 +++++ .../health/get-queue-stats-resources.md | 14 +++++ .../kotlin/health/get-queue-usage.md | 14 +++++ .../kotlin/health/get-queue-webhooks.md | 14 +++++ .../kotlin/health/get-storage-local.md | 12 ++++ .../kotlin/health/get-storage.md | 12 ++++ .../server-kotlin/kotlin/health/get-time.md | 12 ++++ .../1.8.x/server-kotlin/kotlin/health/get.md | 12 ++++ .../1.8.x/server-kotlin/kotlin/locale/get.md | 12 ++++ .../server-kotlin/kotlin/locale/list-codes.md | 12 ++++ .../kotlin/locale/list-continents.md | 12 ++++ .../kotlin/locale/list-countries-e-u.md | 12 ++++ .../kotlin/locale/list-countries-phones.md | 12 ++++ .../kotlin/locale/list-countries.md | 12 ++++ .../kotlin/locale/list-currencies.md | 12 ++++ .../kotlin/locale/list-languages.md | 12 ++++ .../kotlin/messaging/create-apns-provider.md | 21 +++++++ .../kotlin/messaging/create-email.md | 25 ++++++++ .../kotlin/messaging/create-fcm-provider.md | 17 ++++++ .../messaging/create-mailgun-provider.md | 23 +++++++ .../kotlin/messaging/create-msg91provider.md | 19 ++++++ .../kotlin/messaging/create-push.md | 32 ++++++++++ .../messaging/create-sendgrid-provider.md | 21 +++++++ .../kotlin/messaging/create-sms.md | 20 ++++++ .../kotlin/messaging/create-smtp-provider.md | 27 ++++++++ .../kotlin/messaging/create-subscriber.md | 16 +++++ .../messaging/create-telesign-provider.md | 19 ++++++ .../messaging/create-textmagic-provider.md | 19 ++++++ .../kotlin/messaging/create-topic.md | 16 +++++ .../messaging/create-twilio-provider.md | 19 ++++++ .../messaging/create-vonage-provider.md | 19 ++++++ .../kotlin/messaging/delete-provider.md | 14 +++++ .../kotlin/messaging/delete-subscriber.md | 15 +++++ .../kotlin/messaging/delete-topic.md | 14 +++++ .../server-kotlin/kotlin/messaging/delete.md | 14 +++++ .../kotlin/messaging/get-message.md | 14 +++++ .../kotlin/messaging/get-provider.md | 14 +++++ .../kotlin/messaging/get-subscriber.md | 15 +++++ .../kotlin/messaging/get-topic.md | 14 +++++ .../kotlin/messaging/list-message-logs.md | 15 +++++ .../kotlin/messaging/list-messages.md | 15 +++++ .../kotlin/messaging/list-provider-logs.md | 15 +++++ .../kotlin/messaging/list-providers.md | 15 +++++ .../kotlin/messaging/list-subscriber-logs.md | 15 +++++ .../kotlin/messaging/list-subscribers.md | 16 +++++ .../kotlin/messaging/list-targets.md | 15 +++++ .../kotlin/messaging/list-topic-logs.md | 15 +++++ .../kotlin/messaging/list-topics.md | 15 +++++ .../kotlin/messaging/update-apns-provider.md | 21 +++++++ .../kotlin/messaging/update-email.md | 25 ++++++++ .../kotlin/messaging/update-fcm-provider.md | 17 ++++++ .../messaging/update-mailgun-provider.md | 23 +++++++ .../kotlin/messaging/update-msg91provider.md | 19 ++++++ .../kotlin/messaging/update-push.md | 32 ++++++++++ .../messaging/update-sendgrid-provider.md | 21 +++++++ .../kotlin/messaging/update-sms.md | 20 ++++++ .../kotlin/messaging/update-smtp-provider.md | 27 ++++++++ .../messaging/update-telesign-provider.md | 19 ++++++ .../messaging/update-textmagic-provider.md | 19 ++++++ .../kotlin/messaging/update-topic.md | 16 +++++ .../messaging/update-twilio-provider.md | 19 ++++++ .../messaging/update-vonage-provider.md | 19 ++++++ .../kotlin/sites/create-deployment.md | 20 ++++++ .../sites/create-duplicate-deployment.md | 15 +++++ .../sites/create-template-deployment.md | 19 ++++++ .../kotlin/sites/create-variable.md | 17 ++++++ .../kotlin/sites/create-vcs-deployment.md | 18 ++++++ .../server-kotlin/kotlin/sites/create.md | 33 ++++++++++ .../kotlin/sites/delete-deployment.md | 15 +++++ .../server-kotlin/kotlin/sites/delete-log.md | 15 +++++ .../kotlin/sites/delete-variable.md | 15 +++++ .../server-kotlin/kotlin/sites/delete.md | 14 +++++ .../kotlin/sites/get-deployment-download.md | 16 +++++ .../kotlin/sites/get-deployment.md | 15 +++++ .../server-kotlin/kotlin/sites/get-log.md | 15 +++++ .../kotlin/sites/get-variable.md | 15 +++++ .../1.8.x/server-kotlin/kotlin/sites/get.md | 14 +++++ .../kotlin/sites/list-deployments.md | 16 +++++ .../kotlin/sites/list-frameworks.md | 12 ++++ .../server-kotlin/kotlin/sites/list-logs.md | 15 +++++ .../kotlin/sites/list-specifications.md | 12 ++++ .../kotlin/sites/list-variables.md | 14 +++++ .../1.8.x/server-kotlin/kotlin/sites/list.md | 15 +++++ .../kotlin/sites/update-deployment-status.md | 15 +++++ .../kotlin/sites/update-site-deployment.md | 15 +++++ .../kotlin/sites/update-variable.md | 18 ++++++ .../server-kotlin/kotlin/sites/update.md | 32 ++++++++++ .../kotlin/storage/create-bucket.md | 23 +++++++ .../kotlin/storage/create-file.md | 18 ++++++ .../kotlin/storage/delete-bucket.md | 14 +++++ .../kotlin/storage/delete-file.md | 15 +++++ .../kotlin/storage/get-bucket.md | 14 +++++ .../kotlin/storage/get-file-download.md | 16 +++++ .../kotlin/storage/get-file-preview.md | 27 ++++++++ .../kotlin/storage/get-file-view.md | 16 +++++ .../server-kotlin/kotlin/storage/get-file.md | 15 +++++ .../kotlin/storage/list-buckets.md | 15 +++++ .../kotlin/storage/list-files.md | 16 +++++ .../kotlin/storage/update-bucket.md | 23 +++++++ .../kotlin/storage/update-file.md | 17 ++++++ .../kotlin/tables/create-boolean-column.md | 19 ++++++ .../kotlin/tables/create-datetime-column.md | 19 ++++++ .../kotlin/tables/create-email-column.md | 19 ++++++ .../kotlin/tables/create-enum-column.md | 20 ++++++ .../kotlin/tables/create-float-column.md | 21 +++++++ .../kotlin/tables/create-index.md | 21 +++++++ .../kotlin/tables/create-integer-column.md | 21 +++++++ .../kotlin/tables/create-ip-column.md | 19 ++++++ .../tables/create-relationship-column.md | 22 +++++++ .../server-kotlin/kotlin/tables/create-row.md | 19 ++++++ .../kotlin/tables/create-rows.md | 16 +++++ .../kotlin/tables/create-string-column.md | 21 +++++++ .../kotlin/tables/create-url-column.md | 19 ++++++ .../server-kotlin/kotlin/tables/create.md | 19 ++++++ .../kotlin/tables/decrement-row-column.md | 19 ++++++ .../kotlin/tables/delete-column.md | 16 +++++ .../kotlin/tables/delete-index.md | 16 +++++ .../server-kotlin/kotlin/tables/delete-row.md | 16 +++++ .../kotlin/tables/delete-rows.md | 16 +++++ .../server-kotlin/kotlin/tables/delete.md | 15 +++++ .../server-kotlin/kotlin/tables/get-column.md | 16 +++++ .../server-kotlin/kotlin/tables/get-index.md | 16 +++++ .../server-kotlin/kotlin/tables/get-row.md | 17 ++++++ .../1.8.x/server-kotlin/kotlin/tables/get.md | 15 +++++ .../kotlin/tables/increment-row-column.md | 19 ++++++ .../kotlin/tables/list-columns.md | 16 +++++ .../kotlin/tables/list-indexes.md | 16 +++++ .../server-kotlin/kotlin/tables/list-rows.md | 16 +++++ .../1.8.x/server-kotlin/kotlin/tables/list.md | 16 +++++ .../kotlin/tables/update-boolean-column.md | 19 ++++++ .../kotlin/tables/update-datetime-column.md | 19 ++++++ .../kotlin/tables/update-email-column.md | 19 ++++++ .../kotlin/tables/update-enum-column.md | 20 ++++++ .../kotlin/tables/update-float-column.md | 21 +++++++ .../kotlin/tables/update-integer-column.md | 21 +++++++ .../kotlin/tables/update-ip-column.md | 19 ++++++ .../tables/update-relationship-column.md | 18 ++++++ .../server-kotlin/kotlin/tables/update-row.md | 18 ++++++ .../kotlin/tables/update-rows.md | 17 ++++++ .../kotlin/tables/update-string-column.md | 20 ++++++ .../kotlin/tables/update-url-column.md | 19 ++++++ .../server-kotlin/kotlin/tables/update.md | 19 ++++++ .../server-kotlin/kotlin/tables/upsert-row.md | 17 ++++++ .../kotlin/tables/upsert-rows.md | 15 +++++ .../kotlin/teams/create-membership.md | 20 ++++++ .../server-kotlin/kotlin/teams/create.md | 16 +++++ .../kotlin/teams/delete-membership.md | 15 +++++ .../server-kotlin/kotlin/teams/delete.md | 14 +++++ .../kotlin/teams/get-membership.md | 15 +++++ .../server-kotlin/kotlin/teams/get-prefs.md | 14 +++++ .../1.8.x/server-kotlin/kotlin/teams/get.md | 14 +++++ .../kotlin/teams/list-memberships.md | 16 +++++ .../1.8.x/server-kotlin/kotlin/teams/list.md | 15 +++++ .../kotlin/teams/update-membership-status.md | 17 ++++++ .../kotlin/teams/update-membership.md | 16 +++++ .../server-kotlin/kotlin/teams/update-name.md | 15 +++++ .../kotlin/teams/update-prefs.md | 15 +++++ .../kotlin/tokens/create-file-token.md | 16 +++++ .../server-kotlin/kotlin/tokens/delete.md | 14 +++++ .../1.8.x/server-kotlin/kotlin/tokens/get.md | 14 +++++ .../1.8.x/server-kotlin/kotlin/tokens/list.md | 16 +++++ .../server-kotlin/kotlin/tokens/update.md | 15 +++++ .../kotlin/users/create-argon2user.md | 17 ++++++ .../kotlin/users/create-bcrypt-user.md | 17 ++++++ .../kotlin/users/create-j-w-t.md | 16 +++++ .../kotlin/users/create-m-d5user.md | 17 ++++++ .../kotlin/users/create-mfa-recovery-codes.md | 14 +++++ .../kotlin/users/create-p-h-pass-user.md | 17 ++++++ .../kotlin/users/create-s-h-a-user.md | 18 ++++++ .../users/create-scrypt-modified-user.md | 20 ++++++ .../kotlin/users/create-scrypt-user.md | 22 +++++++ .../kotlin/users/create-session.md | 14 +++++ .../kotlin/users/create-target.md | 20 ++++++ .../kotlin/users/create-token.md | 16 +++++ .../server-kotlin/kotlin/users/create.md | 18 ++++++ .../kotlin/users/delete-identity.md | 14 +++++ .../kotlin/users/delete-mfa-authenticator.md | 16 +++++ .../kotlin/users/delete-session.md | 15 +++++ .../kotlin/users/delete-sessions.md | 14 +++++ .../kotlin/users/delete-target.md | 15 +++++ .../server-kotlin/kotlin/users/delete.md | 14 +++++ .../kotlin/users/get-mfa-recovery-codes.md | 14 +++++ .../server-kotlin/kotlin/users/get-prefs.md | 14 +++++ .../server-kotlin/kotlin/users/get-target.md | 15 +++++ .../1.8.x/server-kotlin/kotlin/users/get.md | 14 +++++ .../kotlin/users/list-identities.md | 15 +++++ .../server-kotlin/kotlin/users/list-logs.md | 15 +++++ .../kotlin/users/list-memberships.md | 16 +++++ .../kotlin/users/list-mfa-factors.md | 14 +++++ .../kotlin/users/list-sessions.md | 14 +++++ .../kotlin/users/list-targets.md | 15 +++++ .../1.8.x/server-kotlin/kotlin/users/list.md | 15 +++++ .../kotlin/users/update-email-verification.md | 15 +++++ .../kotlin/users/update-email.md | 15 +++++ .../kotlin/users/update-labels.md | 15 +++++ .../kotlin/users/update-mfa-recovery-codes.md | 14 +++++ .../server-kotlin/kotlin/users/update-mfa.md | 15 +++++ .../server-kotlin/kotlin/users/update-name.md | 15 +++++ .../kotlin/users/update-password.md | 15 +++++ .../kotlin/users/update-phone-verification.md | 15 +++++ .../kotlin/users/update-phone.md | 15 +++++ .../kotlin/users/update-prefs.md | 15 +++++ .../kotlin/users/update-status.md | 15 +++++ .../kotlin/users/update-target.md | 18 ++++++ .../account/create-anonymous-session.md | 9 +++ .../account/create-email-password-session.md | 12 ++++ .../examples/account/create-email-token.md | 13 ++++ .../examples/account/create-j-w-t.md | 9 +++ .../account/create-magic-u-r-l-token.md | 14 +++++ .../account/create-mfa-authenticator.md | 12 ++++ .../examples/account/create-mfa-challenge.md | 11 ++++ .../account/create-mfa-recovery-codes.md | 10 +++ .../examples/account/create-o-auth2token.md | 14 +++++ .../examples/account/create-phone-token.md | 12 ++++ .../account/create-phone-verification.md | 10 +++ .../examples/account/create-recovery.md | 13 ++++ .../examples/account/create-session.md | 12 ++++ .../examples/account/create-verification.md | 12 ++++ .../server-nodejs/examples/account/create.md | 14 +++++ .../examples/account/delete-identity.md | 12 ++++ .../account/delete-mfa-authenticator.md | 12 ++++ .../examples/account/delete-session.md | 12 ++++ .../examples/account/delete-sessions.md | 10 +++ .../account/get-mfa-recovery-codes.md | 10 +++ .../examples/account/get-prefs.md | 10 +++ .../examples/account/get-session.md | 12 ++++ .../server-nodejs/examples/account/get.md | 10 +++ .../examples/account/list-identities.md | 12 ++++ .../examples/account/list-logs.md | 12 ++++ .../examples/account/list-mfa-factors.md | 10 +++ .../examples/account/list-sessions.md | 10 +++ .../examples/account/update-email.md | 13 ++++ .../examples/account/update-m-f-a.md | 12 ++++ .../account/update-magic-u-r-l-session.md | 12 ++++ .../account/update-mfa-authenticator.md | 13 ++++ .../examples/account/update-mfa-challenge.md | 13 ++++ .../account/update-mfa-recovery-codes.md | 10 +++ .../examples/account/update-name.md | 12 ++++ .../examples/account/update-password.md | 13 ++++ .../examples/account/update-phone-session.md | 12 ++++ .../account/update-phone-verification.md | 13 ++++ .../examples/account/update-phone.md | 13 ++++ .../examples/account/update-prefs.md | 12 ++++ .../examples/account/update-recovery.md | 14 +++++ .../examples/account/update-session.md | 12 ++++ .../examples/account/update-status.md | 10 +++ .../examples/account/update-verification.md | 13 ++++ .../examples/avatars/get-browser.md | 15 +++++ .../examples/avatars/get-credit-card.md | 15 +++++ .../examples/avatars/get-favicon.md | 12 ++++ .../examples/avatars/get-flag.md | 15 +++++ .../examples/avatars/get-image.md | 14 +++++ .../examples/avatars/get-initials.md | 15 +++++ .../server-nodejs/examples/avatars/get-q-r.md | 15 +++++ .../databases/create-boolean-attribute.md | 17 ++++++ .../examples/databases/create-collection.md | 17 ++++++ .../databases/create-datetime-attribute.md | 17 ++++++ .../examples/databases/create-document.md | 17 ++++++ .../examples/databases/create-documents.md | 14 +++++ .../databases/create-email-attribute.md | 17 ++++++ .../databases/create-enum-attribute.md | 18 ++++++ .../databases/create-float-attribute.md | 19 ++++++ .../examples/databases/create-index.md | 18 ++++++ .../databases/create-integer-attribute.md | 19 ++++++ .../examples/databases/create-ip-attribute.md | 17 ++++++ .../create-relationship-attribute.md | 19 ++++++ .../databases/create-string-attribute.md | 19 ++++++ .../databases/create-url-attribute.md | 17 ++++++ .../examples/databases/create.md | 14 +++++ .../databases/decrement-document-attribute.md | 17 ++++++ .../examples/databases/delete-attribute.md | 14 +++++ .../examples/databases/delete-collection.md | 13 ++++ .../examples/databases/delete-document.md | 14 +++++ .../examples/databases/delete-documents.md | 14 +++++ .../examples/databases/delete-index.md | 14 +++++ .../examples/databases/delete.md | 12 ++++ .../examples/databases/get-attribute.md | 14 +++++ .../examples/databases/get-collection.md | 13 ++++ .../examples/databases/get-document.md | 15 +++++ .../examples/databases/get-index.md | 14 +++++ .../server-nodejs/examples/databases/get.md | 12 ++++ .../databases/increment-document-attribute.md | 17 ++++++ .../examples/databases/list-attributes.md | 14 +++++ .../examples/databases/list-collections.md | 14 +++++ .../examples/databases/list-documents.md | 14 +++++ .../examples/databases/list-indexes.md | 14 +++++ .../server-nodejs/examples/databases/list.md | 13 ++++ .../databases/update-boolean-attribute.md | 17 ++++++ .../examples/databases/update-collection.md | 17 ++++++ .../databases/update-datetime-attribute.md | 17 ++++++ .../examples/databases/update-document.md | 16 +++++ .../examples/databases/update-documents.md | 15 +++++ .../databases/update-email-attribute.md | 17 ++++++ .../databases/update-enum-attribute.md | 18 ++++++ .../databases/update-float-attribute.md | 19 ++++++ .../databases/update-integer-attribute.md | 19 ++++++ .../examples/databases/update-ip-attribute.md | 17 ++++++ .../update-relationship-attribute.md | 16 +++++ .../databases/update-string-attribute.md | 18 ++++++ .../databases/update-url-attribute.md | 17 ++++++ .../examples/databases/update.md | 14 +++++ .../examples/databases/upsert-document.md | 15 +++++ .../examples/databases/upsert-documents.md | 13 ++++ .../examples/functions/create-deployment.md | 17 ++++++ .../functions/create-duplicate-deployment.md | 14 +++++ .../examples/functions/create-execution.md | 18 ++++++ .../functions/create-template-deployment.md | 17 ++++++ .../examples/functions/create-variable.md | 15 +++++ .../functions/create-vcs-deployment.md | 15 +++++ .../examples/functions/create.md | 29 +++++++++ .../examples/functions/delete-deployment.md | 13 ++++ .../examples/functions/delete-execution.md | 13 ++++ .../examples/functions/delete-variable.md | 13 ++++ .../examples/functions/delete.md | 12 ++++ .../functions/get-deployment-download.md | 14 +++++ .../examples/functions/get-deployment.md | 13 ++++ .../examples/functions/get-execution.md | 13 ++++ .../examples/functions/get-variable.md | 13 ++++ .../server-nodejs/examples/functions/get.md | 12 ++++ .../examples/functions/list-deployments.md | 14 +++++ .../examples/functions/list-executions.md | 13 ++++ .../examples/functions/list-runtimes.md | 10 +++ .../examples/functions/list-specifications.md | 10 +++ .../examples/functions/list-variables.md | 12 ++++ .../server-nodejs/examples/functions/list.md | 13 ++++ .../functions/update-deployment-status.md | 13 ++++ .../functions/update-function-deployment.md | 13 ++++ .../examples/functions/update-variable.md | 16 +++++ .../examples/functions/update.md | 29 +++++++++ .../examples/graphql/mutation.md | 12 ++++ .../server-nodejs/examples/graphql/query.md | 12 ++++ .../examples/health/get-antivirus.md | 10 +++ .../examples/health/get-cache.md | 10 +++ .../examples/health/get-certificate.md | 12 ++++ .../server-nodejs/examples/health/get-d-b.md | 10 +++ .../examples/health/get-failed-jobs.md | 13 ++++ .../examples/health/get-pub-sub.md | 10 +++ .../examples/health/get-queue-builds.md | 12 ++++ .../examples/health/get-queue-certificates.md | 12 ++++ .../examples/health/get-queue-databases.md | 13 ++++ .../examples/health/get-queue-deletes.md | 12 ++++ .../examples/health/get-queue-functions.md | 12 ++++ .../examples/health/get-queue-logs.md | 12 ++++ .../examples/health/get-queue-mails.md | 12 ++++ .../examples/health/get-queue-messaging.md | 12 ++++ .../examples/health/get-queue-migrations.md | 12 ++++ .../health/get-queue-stats-resources.md | 12 ++++ .../examples/health/get-queue-usage.md | 12 ++++ .../examples/health/get-queue-webhooks.md | 12 ++++ .../examples/health/get-storage-local.md | 10 +++ .../examples/health/get-storage.md | 10 +++ .../server-nodejs/examples/health/get-time.md | 10 +++ .../server-nodejs/examples/health/get.md | 10 +++ .../server-nodejs/examples/locale/get.md | 10 +++ .../examples/locale/list-codes.md | 10 +++ .../examples/locale/list-continents.md | 10 +++ .../examples/locale/list-countries-e-u.md | 10 +++ .../examples/locale/list-countries-phones.md | 10 +++ .../examples/locale/list-countries.md | 10 +++ .../examples/locale/list-currencies.md | 10 +++ .../examples/locale/list-languages.md | 10 +++ .../messaging/create-apns-provider.md | 19 ++++++ .../examples/messaging/create-email.md | 23 +++++++ .../examples/messaging/create-fcm-provider.md | 15 +++++ .../messaging/create-mailgun-provider.md | 21 +++++++ .../messaging/create-msg91provider.md | 17 ++++++ .../examples/messaging/create-push.md | 30 +++++++++ .../messaging/create-sendgrid-provider.md | 19 ++++++ .../examples/messaging/create-sms.md | 18 ++++++ .../messaging/create-smtp-provider.md | 25 ++++++++ .../examples/messaging/create-subscriber.md | 14 +++++ .../messaging/create-telesign-provider.md | 17 ++++++ .../messaging/create-textmagic-provider.md | 17 ++++++ .../examples/messaging/create-topic.md | 14 +++++ .../messaging/create-twilio-provider.md | 17 ++++++ .../messaging/create-vonage-provider.md | 17 ++++++ .../examples/messaging/delete-provider.md | 12 ++++ .../examples/messaging/delete-subscriber.md | 13 ++++ .../examples/messaging/delete-topic.md | 12 ++++ .../examples/messaging/delete.md | 12 ++++ .../examples/messaging/get-message.md | 12 ++++ .../examples/messaging/get-provider.md | 12 ++++ .../examples/messaging/get-subscriber.md | 13 ++++ .../examples/messaging/get-topic.md | 12 ++++ .../examples/messaging/list-message-logs.md | 13 ++++ .../examples/messaging/list-messages.md | 13 ++++ .../examples/messaging/list-provider-logs.md | 13 ++++ .../examples/messaging/list-providers.md | 13 ++++ .../messaging/list-subscriber-logs.md | 13 ++++ .../examples/messaging/list-subscribers.md | 14 +++++ .../examples/messaging/list-targets.md | 13 ++++ .../examples/messaging/list-topic-logs.md | 13 ++++ .../examples/messaging/list-topics.md | 13 ++++ .../messaging/update-apns-provider.md | 19 ++++++ .../examples/messaging/update-email.md | 23 +++++++ .../examples/messaging/update-fcm-provider.md | 15 +++++ .../messaging/update-mailgun-provider.md | 21 +++++++ .../messaging/update-msg91provider.md | 17 ++++++ .../examples/messaging/update-push.md | 30 +++++++++ .../messaging/update-sendgrid-provider.md | 19 ++++++ .../examples/messaging/update-sms.md | 18 ++++++ .../messaging/update-smtp-provider.md | 25 ++++++++ .../messaging/update-telesign-provider.md | 17 ++++++ .../messaging/update-textmagic-provider.md | 17 ++++++ .../examples/messaging/update-topic.md | 14 +++++ .../messaging/update-twilio-provider.md | 17 ++++++ .../messaging/update-vonage-provider.md | 17 ++++++ .../examples/sites/create-deployment.md | 18 ++++++ .../sites/create-duplicate-deployment.md | 13 ++++ .../sites/create-template-deployment.md | 17 ++++++ .../examples/sites/create-variable.md | 15 +++++ .../examples/sites/create-vcs-deployment.md | 15 +++++ .../server-nodejs/examples/sites/create.md | 29 +++++++++ .../examples/sites/delete-deployment.md | 13 ++++ .../examples/sites/delete-log.md | 13 ++++ .../examples/sites/delete-variable.md | 13 ++++ .../server-nodejs/examples/sites/delete.md | 12 ++++ .../examples/sites/get-deployment-download.md | 14 +++++ .../examples/sites/get-deployment.md | 13 ++++ .../server-nodejs/examples/sites/get-log.md | 13 ++++ .../examples/sites/get-variable.md | 13 ++++ .../1.8.x/server-nodejs/examples/sites/get.md | 12 ++++ .../examples/sites/list-deployments.md | 14 +++++ .../examples/sites/list-frameworks.md | 10 +++ .../server-nodejs/examples/sites/list-logs.md | 13 ++++ .../examples/sites/list-specifications.md | 10 +++ .../examples/sites/list-variables.md | 12 ++++ .../server-nodejs/examples/sites/list.md | 13 ++++ .../sites/update-deployment-status.md | 13 ++++ .../examples/sites/update-site-deployment.md | 13 ++++ .../examples/sites/update-variable.md | 16 +++++ .../server-nodejs/examples/sites/update.md | 29 +++++++++ .../examples/storage/create-bucket.md | 21 +++++++ .../examples/storage/create-file.md | 16 +++++ .../examples/storage/delete-bucket.md | 12 ++++ .../examples/storage/delete-file.md | 13 ++++ .../examples/storage/get-bucket.md | 12 ++++ .../examples/storage/get-file-download.md | 14 +++++ .../examples/storage/get-file-preview.md | 25 ++++++++ .../examples/storage/get-file-view.md | 14 +++++ .../examples/storage/get-file.md | 13 ++++ .../examples/storage/list-buckets.md | 13 ++++ .../examples/storage/list-files.md | 14 +++++ .../examples/storage/update-bucket.md | 21 +++++++ .../examples/storage/update-file.md | 15 +++++ .../examples/tables/create-boolean-column.md | 17 ++++++ .../examples/tables/create-datetime-column.md | 17 ++++++ .../examples/tables/create-email-column.md | 17 ++++++ .../examples/tables/create-enum-column.md | 18 ++++++ .../examples/tables/create-float-column.md | 19 ++++++ .../examples/tables/create-index.md | 18 ++++++ .../examples/tables/create-integer-column.md | 19 ++++++ .../examples/tables/create-ip-column.md | 17 ++++++ .../tables/create-relationship-column.md | 19 ++++++ .../examples/tables/create-row.md | 17 ++++++ .../examples/tables/create-rows.md | 14 +++++ .../examples/tables/create-string-column.md | 19 ++++++ .../examples/tables/create-url-column.md | 17 ++++++ .../server-nodejs/examples/tables/create.md | 17 ++++++ .../examples/tables/decrement-row-column.md | 17 ++++++ .../examples/tables/delete-column.md | 14 +++++ .../examples/tables/delete-index.md | 14 +++++ .../examples/tables/delete-row.md | 14 +++++ .../examples/tables/delete-rows.md | 14 +++++ .../server-nodejs/examples/tables/delete.md | 13 ++++ .../examples/tables/get-column.md | 14 +++++ .../examples/tables/get-index.md | 14 +++++ .../server-nodejs/examples/tables/get-row.md | 15 +++++ .../server-nodejs/examples/tables/get.md | 13 ++++ .../examples/tables/increment-row-column.md | 17 ++++++ .../examples/tables/list-columns.md | 14 +++++ .../examples/tables/list-indexes.md | 14 +++++ .../examples/tables/list-rows.md | 14 +++++ .../server-nodejs/examples/tables/list.md | 14 +++++ .../examples/tables/update-boolean-column.md | 17 ++++++ .../examples/tables/update-datetime-column.md | 17 ++++++ .../examples/tables/update-email-column.md | 17 ++++++ .../examples/tables/update-enum-column.md | 18 ++++++ .../examples/tables/update-float-column.md | 19 ++++++ .../examples/tables/update-integer-column.md | 19 ++++++ .../examples/tables/update-ip-column.md | 17 ++++++ .../tables/update-relationship-column.md | 16 +++++ .../examples/tables/update-row.md | 16 +++++ .../examples/tables/update-rows.md | 15 +++++ .../examples/tables/update-string-column.md | 18 ++++++ .../examples/tables/update-url-column.md | 17 ++++++ .../server-nodejs/examples/tables/update.md | 17 ++++++ .../examples/tables/upsert-row.md | 15 +++++ .../examples/tables/upsert-rows.md | 13 ++++ .../examples/teams/create-membership.md | 18 ++++++ .../server-nodejs/examples/teams/create.md | 14 +++++ .../examples/teams/delete-membership.md | 13 ++++ .../server-nodejs/examples/teams/delete.md | 12 ++++ .../examples/teams/get-membership.md | 13 ++++ .../server-nodejs/examples/teams/get-prefs.md | 12 ++++ .../1.8.x/server-nodejs/examples/teams/get.md | 12 ++++ .../examples/teams/list-memberships.md | 14 +++++ .../server-nodejs/examples/teams/list.md | 13 ++++ .../teams/update-membership-status.md | 15 +++++ .../examples/teams/update-membership.md | 14 +++++ .../examples/teams/update-name.md | 13 ++++ .../examples/teams/update-prefs.md | 13 ++++ .../examples/tokens/create-file-token.md | 14 +++++ .../server-nodejs/examples/tokens/delete.md | 12 ++++ .../server-nodejs/examples/tokens/get.md | 12 ++++ .../server-nodejs/examples/tokens/list.md | 14 +++++ .../server-nodejs/examples/tokens/update.md | 13 ++++ .../examples/users/create-argon2user.md | 15 +++++ .../examples/users/create-bcrypt-user.md | 15 +++++ .../examples/users/create-j-w-t.md | 14 +++++ .../examples/users/create-m-d5user.md | 15 +++++ .../users/create-mfa-recovery-codes.md | 12 ++++ .../examples/users/create-p-h-pass-user.md | 15 +++++ .../examples/users/create-s-h-a-user.md | 16 +++++ .../users/create-scrypt-modified-user.md | 18 ++++++ .../examples/users/create-scrypt-user.md | 20 ++++++ .../examples/users/create-session.md | 12 ++++ .../examples/users/create-target.md | 17 ++++++ .../examples/users/create-token.md | 14 +++++ .../server-nodejs/examples/users/create.md | 16 +++++ .../examples/users/delete-identity.md | 12 ++++ .../users/delete-mfa-authenticator.md | 13 ++++ .../examples/users/delete-session.md | 13 ++++ .../examples/users/delete-sessions.md | 12 ++++ .../examples/users/delete-target.md | 13 ++++ .../server-nodejs/examples/users/delete.md | 12 ++++ .../examples/users/get-mfa-recovery-codes.md | 12 ++++ .../server-nodejs/examples/users/get-prefs.md | 12 ++++ .../examples/users/get-target.md | 13 ++++ .../1.8.x/server-nodejs/examples/users/get.md | 12 ++++ .../examples/users/list-identities.md | 13 ++++ .../server-nodejs/examples/users/list-logs.md | 13 ++++ .../examples/users/list-memberships.md | 14 +++++ .../examples/users/list-mfa-factors.md | 12 ++++ .../examples/users/list-sessions.md | 12 ++++ .../examples/users/list-targets.md | 13 ++++ .../server-nodejs/examples/users/list.md | 13 ++++ .../users/update-email-verification.md | 13 ++++ .../examples/users/update-email.md | 13 ++++ .../examples/users/update-labels.md | 13 ++++ .../users/update-mfa-recovery-codes.md | 12 ++++ .../examples/users/update-mfa.md | 13 ++++ .../examples/users/update-name.md | 13 ++++ .../examples/users/update-password.md | 13 ++++ .../users/update-phone-verification.md | 13 ++++ .../examples/users/update-phone.md | 13 ++++ .../examples/users/update-prefs.md | 13 ++++ .../examples/users/update-status.md | 13 ++++ .../examples/users/update-target.md | 16 +++++ .../account/create-anonymous-session.md | 12 ++++ .../account/create-email-password-session.md | 15 +++++ .../examples/account/create-email-token.md | 16 +++++ .../examples/account/create-j-w-t.md | 12 ++++ .../account/create-magic-u-r-l-token.md | 17 ++++++ .../account/create-mfa-authenticator.md | 16 +++++ .../examples/account/create-mfa-challenge.md | 15 +++++ .../account/create-mfa-recovery-codes.md | 13 ++++ .../examples/account/create-o-auth2token.md | 18 ++++++ .../examples/account/create-phone-token.md | 15 +++++ .../account/create-phone-verification.md | 13 ++++ .../examples/account/create-recovery.md | 16 +++++ .../examples/account/create-session.md | 15 +++++ .../examples/account/create-verification.md | 15 +++++ .../server-php/examples/account/create.md | 17 ++++++ .../examples/account/delete-identity.md | 15 +++++ .../account/delete-mfa-authenticator.md | 16 +++++ .../examples/account/delete-session.md | 15 +++++ .../examples/account/delete-sessions.md | 13 ++++ .../account/get-mfa-recovery-codes.md | 13 ++++ .../server-php/examples/account/get-prefs.md | 13 ++++ .../examples/account/get-session.md | 15 +++++ .../1.8.x/server-php/examples/account/get.md | 13 ++++ .../examples/account/list-identities.md | 15 +++++ .../server-php/examples/account/list-logs.md | 15 +++++ .../examples/account/list-mfa-factors.md | 13 ++++ .../examples/account/list-sessions.md | 13 ++++ .../examples/account/update-email.md | 16 +++++ .../examples/account/update-m-f-a.md | 15 +++++ .../account/update-magic-u-r-l-session.md | 15 +++++ .../account/update-mfa-authenticator.md | 17 ++++++ .../examples/account/update-mfa-challenge.md | 16 +++++ .../account/update-mfa-recovery-codes.md | 13 ++++ .../examples/account/update-name.md | 15 +++++ .../examples/account/update-password.md | 16 +++++ .../examples/account/update-phone-session.md | 15 +++++ .../account/update-phone-verification.md | 16 +++++ .../examples/account/update-phone.md | 16 +++++ .../examples/account/update-prefs.md | 15 +++++ .../examples/account/update-recovery.md | 17 ++++++ .../examples/account/update-session.md | 15 +++++ .../examples/account/update-status.md | 13 ++++ .../examples/account/update-verification.md | 16 +++++ .../examples/avatars/get-browser.md | 19 ++++++ .../examples/avatars/get-credit-card.md | 19 ++++++ .../examples/avatars/get-favicon.md | 15 +++++ .../server-php/examples/avatars/get-flag.md | 19 ++++++ .../server-php/examples/avatars/get-image.md | 17 ++++++ .../examples/avatars/get-initials.md | 18 ++++++ .../server-php/examples/avatars/get-q-r.md | 18 ++++++ .../databases/create-boolean-attribute.md | 20 ++++++ .../examples/databases/create-collection.md | 20 ++++++ .../databases/create-datetime-attribute.md | 20 ++++++ .../examples/databases/create-document.md | 20 ++++++ .../examples/databases/create-documents.md | 17 ++++++ .../databases/create-email-attribute.md | 20 ++++++ .../databases/create-enum-attribute.md | 21 +++++++ .../databases/create-float-attribute.md | 22 +++++++ .../examples/databases/create-index.md | 22 +++++++ .../databases/create-integer-attribute.md | 22 +++++++ .../examples/databases/create-ip-attribute.md | 20 ++++++ .../create-relationship-attribute.md | 23 +++++++ .../databases/create-string-attribute.md | 22 +++++++ .../databases/create-url-attribute.md | 20 ++++++ .../server-php/examples/databases/create.md | 17 ++++++ .../databases/decrement-document-attribute.md | 20 ++++++ .../examples/databases/delete-attribute.md | 17 ++++++ .../examples/databases/delete-collection.md | 16 +++++ .../examples/databases/delete-document.md | 17 ++++++ .../examples/databases/delete-documents.md | 17 ++++++ .../examples/databases/delete-index.md | 17 ++++++ .../server-php/examples/databases/delete.md | 15 +++++ .../examples/databases/get-attribute.md | 17 ++++++ .../examples/databases/get-collection.md | 16 +++++ .../examples/databases/get-document.md | 18 ++++++ .../examples/databases/get-index.md | 17 ++++++ .../server-php/examples/databases/get.md | 15 +++++ .../databases/increment-document-attribute.md | 20 ++++++ .../examples/databases/list-attributes.md | 17 ++++++ .../examples/databases/list-collections.md | 17 ++++++ .../examples/databases/list-documents.md | 17 ++++++ .../examples/databases/list-indexes.md | 17 ++++++ .../server-php/examples/databases/list.md | 16 +++++ .../databases/update-boolean-attribute.md | 20 ++++++ .../examples/databases/update-collection.md | 20 ++++++ .../databases/update-datetime-attribute.md | 20 ++++++ .../examples/databases/update-document.md | 19 ++++++ .../examples/databases/update-documents.md | 18 ++++++ .../databases/update-email-attribute.md | 20 ++++++ .../databases/update-enum-attribute.md | 21 +++++++ .../databases/update-float-attribute.md | 22 +++++++ .../databases/update-integer-attribute.md | 22 +++++++ .../examples/databases/update-ip-attribute.md | 20 ++++++ .../update-relationship-attribute.md | 19 ++++++ .../databases/update-string-attribute.md | 21 +++++++ .../databases/update-url-attribute.md | 20 ++++++ .../server-php/examples/databases/update.md | 17 ++++++ .../examples/databases/upsert-document.md | 18 ++++++ .../examples/databases/upsert-documents.md | 16 +++++ .../examples/functions/create-deployment.md | 20 ++++++ .../functions/create-duplicate-deployment.md | 17 ++++++ .../examples/functions/create-execution.md | 21 +++++++ .../functions/create-template-deployment.md | 20 ++++++ .../examples/functions/create-variable.md | 18 ++++++ .../functions/create-vcs-deployment.md | 19 ++++++ .../server-php/examples/functions/create.md | 33 ++++++++++ .../examples/functions/delete-deployment.md | 16 +++++ .../examples/functions/delete-execution.md | 16 +++++ .../examples/functions/delete-variable.md | 16 +++++ .../server-php/examples/functions/delete.md | 15 +++++ .../functions/get-deployment-download.md | 17 ++++++ .../examples/functions/get-deployment.md | 16 +++++ .../examples/functions/get-execution.md | 16 +++++ .../examples/functions/get-variable.md | 16 +++++ .../server-php/examples/functions/get.md | 15 +++++ .../examples/functions/list-deployments.md | 17 ++++++ .../examples/functions/list-executions.md | 16 +++++ .../examples/functions/list-runtimes.md | 13 ++++ .../examples/functions/list-specifications.md | 13 ++++ .../examples/functions/list-variables.md | 15 +++++ .../server-php/examples/functions/list.md | 16 +++++ .../functions/update-deployment-status.md | 16 +++++ .../functions/update-function-deployment.md | 16 +++++ .../examples/functions/update-variable.md | 19 ++++++ .../server-php/examples/functions/update.md | 32 ++++++++++ .../server-php/examples/graphql/mutation.md | 15 +++++ .../server-php/examples/graphql/query.md | 15 +++++ .../examples/health/get-antivirus.md | 13 ++++ .../server-php/examples/health/get-cache.md | 13 ++++ .../examples/health/get-certificate.md | 15 +++++ .../server-php/examples/health/get-d-b.md | 13 ++++ .../examples/health/get-failed-jobs.md | 17 ++++++ .../server-php/examples/health/get-pub-sub.md | 13 ++++ .../examples/health/get-queue-builds.md | 15 +++++ .../examples/health/get-queue-certificates.md | 15 +++++ .../examples/health/get-queue-databases.md | 16 +++++ .../examples/health/get-queue-deletes.md | 15 +++++ .../examples/health/get-queue-functions.md | 15 +++++ .../examples/health/get-queue-logs.md | 15 +++++ .../examples/health/get-queue-mails.md | 15 +++++ .../examples/health/get-queue-messaging.md | 15 +++++ .../examples/health/get-queue-migrations.md | 15 +++++ .../health/get-queue-stats-resources.md | 15 +++++ .../examples/health/get-queue-usage.md | 15 +++++ .../examples/health/get-queue-webhooks.md | 15 +++++ .../examples/health/get-storage-local.md | 13 ++++ .../server-php/examples/health/get-storage.md | 13 ++++ .../server-php/examples/health/get-time.md | 13 ++++ .../1.8.x/server-php/examples/health/get.md | 13 ++++ .../1.8.x/server-php/examples/locale/get.md | 13 ++++ .../server-php/examples/locale/list-codes.md | 13 ++++ .../examples/locale/list-continents.md | 13 ++++ .../examples/locale/list-countries-e-u.md | 13 ++++ .../examples/locale/list-countries-phones.md | 13 ++++ .../examples/locale/list-countries.md | 13 ++++ .../examples/locale/list-currencies.md | 13 ++++ .../examples/locale/list-languages.md | 13 ++++ .../messaging/create-apns-provider.md | 22 +++++++ .../examples/messaging/create-email.md | 26 ++++++++ .../examples/messaging/create-fcm-provider.md | 18 ++++++ .../messaging/create-mailgun-provider.md | 24 ++++++++ .../messaging/create-msg91provider.md | 20 ++++++ .../examples/messaging/create-push.md | 33 ++++++++++ .../messaging/create-sendgrid-provider.md | 22 +++++++ .../examples/messaging/create-sms.md | 21 +++++++ .../messaging/create-smtp-provider.md | 28 +++++++++ .../examples/messaging/create-subscriber.md | 17 ++++++ .../messaging/create-telesign-provider.md | 20 ++++++ .../messaging/create-textmagic-provider.md | 20 ++++++ .../examples/messaging/create-topic.md | 17 ++++++ .../messaging/create-twilio-provider.md | 20 ++++++ .../messaging/create-vonage-provider.md | 20 ++++++ .../examples/messaging/delete-provider.md | 15 +++++ .../examples/messaging/delete-subscriber.md | 16 +++++ .../examples/messaging/delete-topic.md | 15 +++++ .../server-php/examples/messaging/delete.md | 15 +++++ .../examples/messaging/get-message.md | 15 +++++ .../examples/messaging/get-provider.md | 15 +++++ .../examples/messaging/get-subscriber.md | 16 +++++ .../examples/messaging/get-topic.md | 15 +++++ .../examples/messaging/list-message-logs.md | 16 +++++ .../examples/messaging/list-messages.md | 16 +++++ .../examples/messaging/list-provider-logs.md | 16 +++++ .../examples/messaging/list-providers.md | 16 +++++ .../messaging/list-subscriber-logs.md | 16 +++++ .../examples/messaging/list-subscribers.md | 17 ++++++ .../examples/messaging/list-targets.md | 16 +++++ .../examples/messaging/list-topic-logs.md | 16 +++++ .../examples/messaging/list-topics.md | 16 +++++ .../messaging/update-apns-provider.md | 22 +++++++ .../examples/messaging/update-email.md | 26 ++++++++ .../examples/messaging/update-fcm-provider.md | 18 ++++++ .../messaging/update-mailgun-provider.md | 24 ++++++++ .../messaging/update-msg91provider.md | 20 ++++++ .../examples/messaging/update-push.md | 33 ++++++++++ .../messaging/update-sendgrid-provider.md | 22 +++++++ .../examples/messaging/update-sms.md | 21 +++++++ .../messaging/update-smtp-provider.md | 28 +++++++++ .../messaging/update-telesign-provider.md | 20 ++++++ .../messaging/update-textmagic-provider.md | 20 ++++++ .../examples/messaging/update-topic.md | 17 ++++++ .../messaging/update-twilio-provider.md | 20 ++++++ .../messaging/update-vonage-provider.md | 20 ++++++ .../examples/sites/create-deployment.md | 21 +++++++ .../sites/create-duplicate-deployment.md | 16 +++++ .../sites/create-template-deployment.md | 20 ++++++ .../examples/sites/create-variable.md | 18 ++++++ .../examples/sites/create-vcs-deployment.md | 19 ++++++ .../1.8.x/server-php/examples/sites/create.md | 34 +++++++++++ .../examples/sites/delete-deployment.md | 16 +++++ .../server-php/examples/sites/delete-log.md | 16 +++++ .../examples/sites/delete-variable.md | 16 +++++ .../1.8.x/server-php/examples/sites/delete.md | 15 +++++ .../examples/sites/get-deployment-download.md | 17 ++++++ .../examples/sites/get-deployment.md | 16 +++++ .../server-php/examples/sites/get-log.md | 16 +++++ .../server-php/examples/sites/get-variable.md | 16 +++++ .../1.8.x/server-php/examples/sites/get.md | 15 +++++ .../examples/sites/list-deployments.md | 17 ++++++ .../examples/sites/list-frameworks.md | 13 ++++ .../server-php/examples/sites/list-logs.md | 16 +++++ .../examples/sites/list-specifications.md | 13 ++++ .../examples/sites/list-variables.md | 15 +++++ .../1.8.x/server-php/examples/sites/list.md | 16 +++++ .../sites/update-deployment-status.md | 16 +++++ .../examples/sites/update-site-deployment.md | 16 +++++ .../examples/sites/update-variable.md | 19 ++++++ .../1.8.x/server-php/examples/sites/update.md | 33 ++++++++++ .../examples/storage/create-bucket.md | 24 ++++++++ .../examples/storage/create-file.md | 19 ++++++ .../examples/storage/delete-bucket.md | 15 +++++ .../examples/storage/delete-file.md | 16 +++++ .../server-php/examples/storage/get-bucket.md | 15 +++++ .../examples/storage/get-file-download.md | 17 ++++++ .../examples/storage/get-file-preview.md | 28 +++++++++ .../examples/storage/get-file-view.md | 17 ++++++ .../server-php/examples/storage/get-file.md | 16 +++++ .../examples/storage/list-buckets.md | 16 +++++ .../server-php/examples/storage/list-files.md | 17 ++++++ .../examples/storage/update-bucket.md | 24 ++++++++ .../examples/storage/update-file.md | 18 ++++++ .../examples/tables/create-boolean-column.md | 20 ++++++ .../examples/tables/create-datetime-column.md | 20 ++++++ .../examples/tables/create-email-column.md | 20 ++++++ .../examples/tables/create-enum-column.md | 21 +++++++ .../examples/tables/create-float-column.md | 22 +++++++ .../examples/tables/create-index.md | 22 +++++++ .../examples/tables/create-integer-column.md | 22 +++++++ .../examples/tables/create-ip-column.md | 20 ++++++ .../tables/create-relationship-column.md | 23 +++++++ .../server-php/examples/tables/create-row.md | 20 ++++++ .../server-php/examples/tables/create-rows.md | 17 ++++++ .../examples/tables/create-string-column.md | 22 +++++++ .../examples/tables/create-url-column.md | 20 ++++++ .../server-php/examples/tables/create.md | 20 ++++++ .../examples/tables/decrement-row-column.md | 20 ++++++ .../examples/tables/delete-column.md | 17 ++++++ .../examples/tables/delete-index.md | 17 ++++++ .../server-php/examples/tables/delete-row.md | 17 ++++++ .../server-php/examples/tables/delete-rows.md | 17 ++++++ .../server-php/examples/tables/delete.md | 16 +++++ .../server-php/examples/tables/get-column.md | 17 ++++++ .../server-php/examples/tables/get-index.md | 17 ++++++ .../server-php/examples/tables/get-row.md | 18 ++++++ .../1.8.x/server-php/examples/tables/get.md | 16 +++++ .../examples/tables/increment-row-column.md | 20 ++++++ .../examples/tables/list-columns.md | 17 ++++++ .../examples/tables/list-indexes.md | 17 ++++++ .../server-php/examples/tables/list-rows.md | 17 ++++++ .../1.8.x/server-php/examples/tables/list.md | 17 ++++++ .../examples/tables/update-boolean-column.md | 20 ++++++ .../examples/tables/update-datetime-column.md | 20 ++++++ .../examples/tables/update-email-column.md | 20 ++++++ .../examples/tables/update-enum-column.md | 21 +++++++ .../examples/tables/update-float-column.md | 22 +++++++ .../examples/tables/update-integer-column.md | 22 +++++++ .../examples/tables/update-ip-column.md | 20 ++++++ .../tables/update-relationship-column.md | 19 ++++++ .../server-php/examples/tables/update-row.md | 19 ++++++ .../server-php/examples/tables/update-rows.md | 18 ++++++ .../examples/tables/update-string-column.md | 21 +++++++ .../examples/tables/update-url-column.md | 20 ++++++ .../server-php/examples/tables/update.md | 20 ++++++ .../server-php/examples/tables/upsert-row.md | 18 ++++++ .../server-php/examples/tables/upsert-rows.md | 16 +++++ .../examples/teams/create-membership.md | 21 +++++++ .../1.8.x/server-php/examples/teams/create.md | 17 ++++++ .../examples/teams/delete-membership.md | 16 +++++ .../1.8.x/server-php/examples/teams/delete.md | 15 +++++ .../examples/teams/get-membership.md | 16 +++++ .../server-php/examples/teams/get-prefs.md | 15 +++++ .../1.8.x/server-php/examples/teams/get.md | 15 +++++ .../examples/teams/list-memberships.md | 17 ++++++ .../1.8.x/server-php/examples/teams/list.md | 16 +++++ .../teams/update-membership-status.md | 18 ++++++ .../examples/teams/update-membership.md | 17 ++++++ .../server-php/examples/teams/update-name.md | 16 +++++ .../server-php/examples/teams/update-prefs.md | 16 +++++ .../examples/tokens/create-file-token.md | 17 ++++++ .../server-php/examples/tokens/delete.md | 15 +++++ .../1.8.x/server-php/examples/tokens/get.md | 15 +++++ .../1.8.x/server-php/examples/tokens/list.md | 17 ++++++ .../server-php/examples/tokens/update.md | 16 +++++ .../examples/users/create-argon2user.md | 18 ++++++ .../examples/users/create-bcrypt-user.md | 18 ++++++ .../server-php/examples/users/create-j-w-t.md | 17 ++++++ .../examples/users/create-m-d5user.md | 18 ++++++ .../users/create-mfa-recovery-codes.md | 15 +++++ .../examples/users/create-p-h-pass-user.md | 18 ++++++ .../examples/users/create-s-h-a-user.md | 19 ++++++ .../users/create-scrypt-modified-user.md | 21 +++++++ .../examples/users/create-scrypt-user.md | 23 +++++++ .../examples/users/create-session.md | 15 +++++ .../examples/users/create-target.md | 21 +++++++ .../server-php/examples/users/create-token.md | 17 ++++++ .../1.8.x/server-php/examples/users/create.md | 19 ++++++ .../examples/users/delete-identity.md | 15 +++++ .../users/delete-mfa-authenticator.md | 17 ++++++ .../examples/users/delete-session.md | 16 +++++ .../examples/users/delete-sessions.md | 15 +++++ .../examples/users/delete-target.md | 16 +++++ .../1.8.x/server-php/examples/users/delete.md | 15 +++++ .../examples/users/get-mfa-recovery-codes.md | 15 +++++ .../server-php/examples/users/get-prefs.md | 15 +++++ .../server-php/examples/users/get-target.md | 16 +++++ .../1.8.x/server-php/examples/users/get.md | 15 +++++ .../examples/users/list-identities.md | 16 +++++ .../server-php/examples/users/list-logs.md | 16 +++++ .../examples/users/list-memberships.md | 17 ++++++ .../examples/users/list-mfa-factors.md | 15 +++++ .../examples/users/list-sessions.md | 15 +++++ .../server-php/examples/users/list-targets.md | 16 +++++ .../1.8.x/server-php/examples/users/list.md | 16 +++++ .../users/update-email-verification.md | 16 +++++ .../server-php/examples/users/update-email.md | 16 +++++ .../examples/users/update-labels.md | 16 +++++ .../users/update-mfa-recovery-codes.md | 15 +++++ .../server-php/examples/users/update-mfa.md | 16 +++++ .../server-php/examples/users/update-name.md | 16 +++++ .../examples/users/update-password.md | 16 +++++ .../users/update-phone-verification.md | 16 +++++ .../server-php/examples/users/update-phone.md | 16 +++++ .../server-php/examples/users/update-prefs.md | 16 +++++ .../examples/users/update-status.md | 16 +++++ .../examples/users/update-target.md | 19 ++++++ .../account/create-anonymous-session.md | 10 +++ .../account/create-email-password-session.md | 13 ++++ .../examples/account/create-email-token.md | 14 +++++ .../examples/account/create-j-w-t.md | 10 +++ .../account/create-magic-u-r-l-token.md | 15 +++++ .../account/create-mfa-authenticator.md | 14 +++++ .../examples/account/create-mfa-challenge.md | 13 ++++ .../account/create-mfa-recovery-codes.md | 11 ++++ .../examples/account/create-o-auth2token.md | 16 +++++ .../examples/account/create-phone-token.md | 13 ++++ .../account/create-phone-verification.md | 11 ++++ .../examples/account/create-recovery.md | 14 +++++ .../examples/account/create-session.md | 13 ++++ .../examples/account/create-verification.md | 13 ++++ .../server-python/examples/account/create.md | 15 +++++ .../examples/account/delete-identity.md | 13 ++++ .../account/delete-mfa-authenticator.md | 14 +++++ .../examples/account/delete-session.md | 13 ++++ .../examples/account/delete-sessions.md | 11 ++++ .../account/get-mfa-recovery-codes.md | 11 ++++ .../examples/account/get-prefs.md | 11 ++++ .../examples/account/get-session.md | 13 ++++ .../server-python/examples/account/get.md | 11 ++++ .../examples/account/list-identities.md | 13 ++++ .../examples/account/list-logs.md | 13 ++++ .../examples/account/list-mfa-factors.md | 11 ++++ .../examples/account/list-sessions.md | 11 ++++ .../examples/account/update-email.md | 14 +++++ .../examples/account/update-m-f-a.md | 13 ++++ .../account/update-magic-u-r-l-session.md | 13 ++++ .../account/update-mfa-authenticator.md | 15 +++++ .../examples/account/update-mfa-challenge.md | 14 +++++ .../account/update-mfa-recovery-codes.md | 11 ++++ .../examples/account/update-name.md | 13 ++++ .../examples/account/update-password.md | 14 +++++ .../examples/account/update-phone-session.md | 13 ++++ .../account/update-phone-verification.md | 14 +++++ .../examples/account/update-phone.md | 14 +++++ .../examples/account/update-prefs.md | 13 ++++ .../examples/account/update-recovery.md | 15 +++++ .../examples/account/update-session.md | 13 ++++ .../examples/account/update-status.md | 11 ++++ .../examples/account/update-verification.md | 14 +++++ .../examples/avatars/get-browser.md | 17 ++++++ .../examples/avatars/get-credit-card.md | 17 ++++++ .../examples/avatars/get-favicon.md | 13 ++++ .../examples/avatars/get-flag.md | 17 ++++++ .../examples/avatars/get-image.md | 15 +++++ .../examples/avatars/get-initials.md | 16 +++++ .../server-python/examples/avatars/get-q-r.md | 16 +++++ .../databases/create-boolean-attribute.md | 18 ++++++ .../examples/databases/create-collection.md | 18 ++++++ .../databases/create-datetime-attribute.md | 18 ++++++ .../examples/databases/create-document.md | 18 ++++++ .../examples/databases/create-documents.md | 15 +++++ .../databases/create-email-attribute.md | 18 ++++++ .../databases/create-enum-attribute.md | 19 ++++++ .../databases/create-float-attribute.md | 20 ++++++ .../examples/databases/create-index.md | 20 ++++++ .../databases/create-integer-attribute.md | 20 ++++++ .../examples/databases/create-ip-attribute.md | 18 ++++++ .../create-relationship-attribute.md | 21 +++++++ .../databases/create-string-attribute.md | 20 ++++++ .../databases/create-url-attribute.md | 18 ++++++ .../examples/databases/create.md | 15 +++++ .../databases/decrement-document-attribute.md | 18 ++++++ .../examples/databases/delete-attribute.md | 15 +++++ .../examples/databases/delete-collection.md | 14 +++++ .../examples/databases/delete-document.md | 15 +++++ .../examples/databases/delete-documents.md | 15 +++++ .../examples/databases/delete-index.md | 15 +++++ .../examples/databases/delete.md | 13 ++++ .../examples/databases/get-attribute.md | 15 +++++ .../examples/databases/get-collection.md | 14 +++++ .../examples/databases/get-document.md | 16 +++++ .../examples/databases/get-index.md | 15 +++++ .../server-python/examples/databases/get.md | 13 ++++ .../databases/increment-document-attribute.md | 18 ++++++ .../examples/databases/list-attributes.md | 15 +++++ .../examples/databases/list-collections.md | 15 +++++ .../examples/databases/list-documents.md | 15 +++++ .../examples/databases/list-indexes.md | 15 +++++ .../server-python/examples/databases/list.md | 14 +++++ .../databases/update-boolean-attribute.md | 18 ++++++ .../examples/databases/update-collection.md | 18 ++++++ .../databases/update-datetime-attribute.md | 18 ++++++ .../examples/databases/update-document.md | 17 ++++++ .../examples/databases/update-documents.md | 16 +++++ .../databases/update-email-attribute.md | 18 ++++++ .../databases/update-enum-attribute.md | 19 ++++++ .../databases/update-float-attribute.md | 20 ++++++ .../databases/update-integer-attribute.md | 20 ++++++ .../examples/databases/update-ip-attribute.md | 18 ++++++ .../update-relationship-attribute.md | 17 ++++++ .../databases/update-string-attribute.md | 19 ++++++ .../databases/update-url-attribute.md | 18 ++++++ .../examples/databases/update.md | 15 +++++ .../examples/databases/upsert-document.md | 16 +++++ .../examples/databases/upsert-documents.md | 14 +++++ .../examples/functions/create-deployment.md | 18 ++++++ .../functions/create-duplicate-deployment.md | 15 +++++ .../examples/functions/create-execution.md | 19 ++++++ .../functions/create-template-deployment.md | 18 ++++++ .../examples/functions/create-variable.md | 16 +++++ .../functions/create-vcs-deployment.md | 17 ++++++ .../examples/functions/create.md | 31 ++++++++++ .../examples/functions/delete-deployment.md | 14 +++++ .../examples/functions/delete-execution.md | 14 +++++ .../examples/functions/delete-variable.md | 14 +++++ .../examples/functions/delete.md | 13 ++++ .../functions/get-deployment-download.md | 15 +++++ .../examples/functions/get-deployment.md | 14 +++++ .../examples/functions/get-execution.md | 14 +++++ .../examples/functions/get-variable.md | 14 +++++ .../server-python/examples/functions/get.md | 13 ++++ .../examples/functions/list-deployments.md | 15 +++++ .../examples/functions/list-executions.md | 14 +++++ .../examples/functions/list-runtimes.md | 11 ++++ .../examples/functions/list-specifications.md | 11 ++++ .../examples/functions/list-variables.md | 13 ++++ .../server-python/examples/functions/list.md | 14 +++++ .../functions/update-deployment-status.md | 14 +++++ .../functions/update-function-deployment.md | 14 +++++ .../examples/functions/update-variable.md | 17 ++++++ .../examples/functions/update.md | 30 +++++++++ .../examples/graphql/mutation.md | 13 ++++ .../server-python/examples/graphql/query.md | 13 ++++ .../examples/health/get-antivirus.md | 11 ++++ .../examples/health/get-cache.md | 11 ++++ .../examples/health/get-certificate.md | 13 ++++ .../server-python/examples/health/get-d-b.md | 11 ++++ .../examples/health/get-failed-jobs.md | 15 +++++ .../examples/health/get-pub-sub.md | 11 ++++ .../examples/health/get-queue-builds.md | 13 ++++ .../examples/health/get-queue-certificates.md | 13 ++++ .../examples/health/get-queue-databases.md | 14 +++++ .../examples/health/get-queue-deletes.md | 13 ++++ .../examples/health/get-queue-functions.md | 13 ++++ .../examples/health/get-queue-logs.md | 13 ++++ .../examples/health/get-queue-mails.md | 13 ++++ .../examples/health/get-queue-messaging.md | 13 ++++ .../examples/health/get-queue-migrations.md | 13 ++++ .../health/get-queue-stats-resources.md | 13 ++++ .../examples/health/get-queue-usage.md | 13 ++++ .../examples/health/get-queue-webhooks.md | 13 ++++ .../examples/health/get-storage-local.md | 11 ++++ .../examples/health/get-storage.md | 11 ++++ .../server-python/examples/health/get-time.md | 11 ++++ .../server-python/examples/health/get.md | 11 ++++ .../server-python/examples/locale/get.md | 11 ++++ .../examples/locale/list-codes.md | 11 ++++ .../examples/locale/list-continents.md | 11 ++++ .../examples/locale/list-countries-e-u.md | 11 ++++ .../examples/locale/list-countries-phones.md | 11 ++++ .../examples/locale/list-countries.md | 11 ++++ .../examples/locale/list-currencies.md | 11 ++++ .../examples/locale/list-languages.md | 11 ++++ .../messaging/create-apns-provider.md | 20 ++++++ .../examples/messaging/create-email.md | 24 ++++++++ .../examples/messaging/create-fcm-provider.md | 16 +++++ .../messaging/create-mailgun-provider.md | 22 +++++++ .../messaging/create-msg91provider.md | 18 ++++++ .../examples/messaging/create-push.md | 31 ++++++++++ .../messaging/create-sendgrid-provider.md | 20 ++++++ .../examples/messaging/create-sms.md | 19 ++++++ .../messaging/create-smtp-provider.md | 26 ++++++++ .../examples/messaging/create-subscriber.md | 15 +++++ .../messaging/create-telesign-provider.md | 18 ++++++ .../messaging/create-textmagic-provider.md | 18 ++++++ .../examples/messaging/create-topic.md | 15 +++++ .../messaging/create-twilio-provider.md | 18 ++++++ .../messaging/create-vonage-provider.md | 18 ++++++ .../examples/messaging/delete-provider.md | 13 ++++ .../examples/messaging/delete-subscriber.md | 14 +++++ .../examples/messaging/delete-topic.md | 13 ++++ .../examples/messaging/delete.md | 13 ++++ .../examples/messaging/get-message.md | 13 ++++ .../examples/messaging/get-provider.md | 13 ++++ .../examples/messaging/get-subscriber.md | 14 +++++ .../examples/messaging/get-topic.md | 13 ++++ .../examples/messaging/list-message-logs.md | 14 +++++ .../examples/messaging/list-messages.md | 14 +++++ .../examples/messaging/list-provider-logs.md | 14 +++++ .../examples/messaging/list-providers.md | 14 +++++ .../messaging/list-subscriber-logs.md | 14 +++++ .../examples/messaging/list-subscribers.md | 15 +++++ .../examples/messaging/list-targets.md | 14 +++++ .../examples/messaging/list-topic-logs.md | 14 +++++ .../examples/messaging/list-topics.md | 14 +++++ .../messaging/update-apns-provider.md | 20 ++++++ .../examples/messaging/update-email.md | 24 ++++++++ .../examples/messaging/update-fcm-provider.md | 16 +++++ .../messaging/update-mailgun-provider.md | 22 +++++++ .../messaging/update-msg91provider.md | 18 ++++++ .../examples/messaging/update-push.md | 31 ++++++++++ .../messaging/update-sendgrid-provider.md | 20 ++++++ .../examples/messaging/update-sms.md | 19 ++++++ .../messaging/update-smtp-provider.md | 26 ++++++++ .../messaging/update-telesign-provider.md | 18 ++++++ .../messaging/update-textmagic-provider.md | 18 ++++++ .../examples/messaging/update-topic.md | 15 +++++ .../messaging/update-twilio-provider.md | 18 ++++++ .../messaging/update-vonage-provider.md | 18 ++++++ .../examples/sites/create-deployment.md | 19 ++++++ .../sites/create-duplicate-deployment.md | 14 +++++ .../sites/create-template-deployment.md | 18 ++++++ .../examples/sites/create-variable.md | 16 +++++ .../examples/sites/create-vcs-deployment.md | 17 ++++++ .../server-python/examples/sites/create.md | 32 ++++++++++ .../examples/sites/delete-deployment.md | 14 +++++ .../examples/sites/delete-log.md | 14 +++++ .../examples/sites/delete-variable.md | 14 +++++ .../server-python/examples/sites/delete.md | 13 ++++ .../examples/sites/get-deployment-download.md | 15 +++++ .../examples/sites/get-deployment.md | 14 +++++ .../server-python/examples/sites/get-log.md | 14 +++++ .../examples/sites/get-variable.md | 14 +++++ .../1.8.x/server-python/examples/sites/get.md | 13 ++++ .../examples/sites/list-deployments.md | 15 +++++ .../examples/sites/list-frameworks.md | 11 ++++ .../server-python/examples/sites/list-logs.md | 14 +++++ .../examples/sites/list-specifications.md | 11 ++++ .../examples/sites/list-variables.md | 13 ++++ .../server-python/examples/sites/list.md | 14 +++++ .../sites/update-deployment-status.md | 14 +++++ .../examples/sites/update-site-deployment.md | 14 +++++ .../examples/sites/update-variable.md | 17 ++++++ .../server-python/examples/sites/update.md | 31 ++++++++++ .../examples/storage/create-bucket.md | 22 +++++++ .../examples/storage/create-file.md | 17 ++++++ .../examples/storage/delete-bucket.md | 13 ++++ .../examples/storage/delete-file.md | 14 +++++ .../examples/storage/get-bucket.md | 13 ++++ .../examples/storage/get-file-download.md | 15 +++++ .../examples/storage/get-file-preview.md | 26 ++++++++ .../examples/storage/get-file-view.md | 15 +++++ .../examples/storage/get-file.md | 14 +++++ .../examples/storage/list-buckets.md | 14 +++++ .../examples/storage/list-files.md | 15 +++++ .../examples/storage/update-bucket.md | 22 +++++++ .../examples/storage/update-file.md | 16 +++++ .../examples/tables/create-boolean-column.md | 18 ++++++ .../examples/tables/create-datetime-column.md | 18 ++++++ .../examples/tables/create-email-column.md | 18 ++++++ .../examples/tables/create-enum-column.md | 19 ++++++ .../examples/tables/create-float-column.md | 20 ++++++ .../examples/tables/create-index.md | 20 ++++++ .../examples/tables/create-integer-column.md | 20 ++++++ .../examples/tables/create-ip-column.md | 18 ++++++ .../tables/create-relationship-column.md | 21 +++++++ .../examples/tables/create-row.md | 18 ++++++ .../examples/tables/create-rows.md | 15 +++++ .../examples/tables/create-string-column.md | 20 ++++++ .../examples/tables/create-url-column.md | 18 ++++++ .../server-python/examples/tables/create.md | 18 ++++++ .../examples/tables/decrement-row-column.md | 18 ++++++ .../examples/tables/delete-column.md | 15 +++++ .../examples/tables/delete-index.md | 15 +++++ .../examples/tables/delete-row.md | 15 +++++ .../examples/tables/delete-rows.md | 15 +++++ .../server-python/examples/tables/delete.md | 14 +++++ .../examples/tables/get-column.md | 15 +++++ .../examples/tables/get-index.md | 15 +++++ .../server-python/examples/tables/get-row.md | 16 +++++ .../server-python/examples/tables/get.md | 14 +++++ .../examples/tables/increment-row-column.md | 18 ++++++ .../examples/tables/list-columns.md | 15 +++++ .../examples/tables/list-indexes.md | 15 +++++ .../examples/tables/list-rows.md | 15 +++++ .../server-python/examples/tables/list.md | 15 +++++ .../examples/tables/update-boolean-column.md | 18 ++++++ .../examples/tables/update-datetime-column.md | 18 ++++++ .../examples/tables/update-email-column.md | 18 ++++++ .../examples/tables/update-enum-column.md | 19 ++++++ .../examples/tables/update-float-column.md | 20 ++++++ .../examples/tables/update-integer-column.md | 20 ++++++ .../examples/tables/update-ip-column.md | 18 ++++++ .../tables/update-relationship-column.md | 17 ++++++ .../examples/tables/update-row.md | 17 ++++++ .../examples/tables/update-rows.md | 16 +++++ .../examples/tables/update-string-column.md | 19 ++++++ .../examples/tables/update-url-column.md | 18 ++++++ .../server-python/examples/tables/update.md | 18 ++++++ .../examples/tables/upsert-row.md | 16 +++++ .../examples/tables/upsert-rows.md | 14 +++++ .../examples/teams/create-membership.md | 19 ++++++ .../server-python/examples/teams/create.md | 15 +++++ .../examples/teams/delete-membership.md | 14 +++++ .../server-python/examples/teams/delete.md | 13 ++++ .../examples/teams/get-membership.md | 14 +++++ .../server-python/examples/teams/get-prefs.md | 13 ++++ .../1.8.x/server-python/examples/teams/get.md | 13 ++++ .../examples/teams/list-memberships.md | 15 +++++ .../server-python/examples/teams/list.md | 14 +++++ .../teams/update-membership-status.md | 16 +++++ .../examples/teams/update-membership.md | 15 +++++ .../examples/teams/update-name.md | 14 +++++ .../examples/teams/update-prefs.md | 14 +++++ .../examples/tokens/create-file-token.md | 15 +++++ .../server-python/examples/tokens/delete.md | 13 ++++ .../server-python/examples/tokens/get.md | 13 ++++ .../server-python/examples/tokens/list.md | 15 +++++ .../server-python/examples/tokens/update.md | 14 +++++ .../examples/users/create-argon2user.md | 16 +++++ .../examples/users/create-bcrypt-user.md | 16 +++++ .../examples/users/create-j-w-t.md | 15 +++++ .../examples/users/create-m-d5user.md | 16 +++++ .../users/create-mfa-recovery-codes.md | 13 ++++ .../examples/users/create-p-h-pass-user.md | 16 +++++ .../examples/users/create-s-h-a-user.md | 17 ++++++ .../users/create-scrypt-modified-user.md | 19 ++++++ .../examples/users/create-scrypt-user.md | 21 +++++++ .../examples/users/create-session.md | 13 ++++ .../examples/users/create-target.md | 19 ++++++ .../examples/users/create-token.md | 15 +++++ .../server-python/examples/users/create.md | 17 ++++++ .../examples/users/delete-identity.md | 13 ++++ .../users/delete-mfa-authenticator.md | 15 +++++ .../examples/users/delete-session.md | 14 +++++ .../examples/users/delete-sessions.md | 13 ++++ .../examples/users/delete-target.md | 14 +++++ .../server-python/examples/users/delete.md | 13 ++++ .../examples/users/get-mfa-recovery-codes.md | 13 ++++ .../server-python/examples/users/get-prefs.md | 13 ++++ .../examples/users/get-target.md | 14 +++++ .../1.8.x/server-python/examples/users/get.md | 13 ++++ .../examples/users/list-identities.md | 14 +++++ .../server-python/examples/users/list-logs.md | 14 +++++ .../examples/users/list-memberships.md | 15 +++++ .../examples/users/list-mfa-factors.md | 13 ++++ .../examples/users/list-sessions.md | 13 ++++ .../examples/users/list-targets.md | 14 +++++ .../server-python/examples/users/list.md | 14 +++++ .../users/update-email-verification.md | 14 +++++ .../examples/users/update-email.md | 14 +++++ .../examples/users/update-labels.md | 14 +++++ .../users/update-mfa-recovery-codes.md | 13 ++++ .../examples/users/update-mfa.md | 14 +++++ .../examples/users/update-name.md | 14 +++++ .../examples/users/update-password.md | 14 +++++ .../users/update-phone-verification.md | 14 +++++ .../examples/users/update-phone.md | 14 +++++ .../examples/users/update-prefs.md | 14 +++++ .../examples/users/update-status.md | 14 +++++ .../examples/users/update-target.md | 17 ++++++ .../account/create-anonymous-session.md | 6 ++ .../account/create-email-password-session.md | 10 +++ .../examples/account/create-email-token.md | 11 ++++ .../examples/account/create-j-w-t.md | 6 ++ .../account/create-magic-u-r-l-token.md | 12 ++++ .../account/create-mfa-authenticator.md | 8 +++ .../examples/account/create-mfa-challenge.md | 9 +++ .../account/create-mfa-recovery-codes.md | 8 +++ .../examples/account/create-o-auth2token.md | 4 ++ .../examples/account/create-phone-token.md | 10 +++ .../account/create-phone-verification.md | 8 +++ .../examples/account/create-recovery.md | 12 ++++ .../examples/account/create-session.md | 10 +++ .../examples/account/create-verification.md | 11 ++++ .../server-rest/examples/account/create.md | 12 ++++ .../examples/account/delete-identity.md | 8 +++ .../account/delete-mfa-authenticator.md | 8 +++ .../examples/account/delete-session.md | 8 +++ .../examples/account/delete-sessions.md | 8 +++ .../account/get-mfa-recovery-codes.md | 6 ++ .../server-rest/examples/account/get-prefs.md | 6 ++ .../examples/account/get-session.md | 6 ++ .../1.8.x/server-rest/examples/account/get.md | 6 ++ .../examples/account/list-identities.md | 6 ++ .../server-rest/examples/account/list-logs.md | 6 ++ .../examples/account/list-mfa-factors.md | 6 ++ .../examples/account/list-sessions.md | 6 ++ .../examples/account/update-email.md | 12 ++++ .../examples/account/update-m-f-a.md | 11 ++++ .../account/update-magic-u-r-l-session.md | 10 +++ .../account/update-mfa-authenticator.md | 11 ++++ .../examples/account/update-mfa-challenge.md | 12 ++++ .../account/update-mfa-recovery-codes.md | 8 +++ .../examples/account/update-name.md | 11 ++++ .../examples/account/update-password.md | 12 ++++ .../examples/account/update-phone-session.md | 10 +++ .../account/update-phone-verification.md | 12 ++++ .../examples/account/update-phone.md | 12 ++++ .../examples/account/update-prefs.md | 11 ++++ .../examples/account/update-recovery.md | 13 ++++ .../examples/account/update-session.md | 8 +++ .../examples/account/update-status.md | 8 +++ .../examples/account/update-verification.md | 12 ++++ .../examples/avatars/get-browser.md | 7 +++ .../examples/avatars/get-credit-card.md | 7 +++ .../examples/avatars/get-favicon.md | 7 +++ .../server-rest/examples/avatars/get-flag.md | 7 +++ .../server-rest/examples/avatars/get-image.md | 7 +++ .../examples/avatars/get-initials.md | 7 +++ .../server-rest/examples/avatars/get-q-r.md | 7 +++ .../databases/create-boolean-attribute.md | 13 ++++ .../examples/databases/create-collection.md | 14 +++++ .../databases/create-datetime-attribute.md | 13 ++++ .../examples/databases/create-document.md | 14 +++++ .../examples/databases/create-documents.md | 12 ++++ .../databases/create-email-attribute.md | 13 ++++ .../databases/create-enum-attribute.md | 14 +++++ .../databases/create-float-attribute.md | 15 +++++ .../examples/databases/create-index.md | 14 +++++ .../databases/create-integer-attribute.md | 15 +++++ .../examples/databases/create-ip-attribute.md | 13 ++++ .../create-relationship-attribute.md | 15 +++++ .../databases/create-string-attribute.md | 15 +++++ .../databases/create-url-attribute.md | 13 ++++ .../server-rest/examples/databases/create.md | 12 ++++ .../databases/decrement-document-attribute.md | 11 ++++ .../examples/databases/delete-attribute.md | 7 +++ .../examples/databases/delete-collection.md | 7 +++ .../examples/databases/delete-document.md | 9 +++ .../examples/databases/delete-documents.md | 10 +++ .../examples/databases/delete-index.md | 7 +++ .../server-rest/examples/databases/delete.md | 7 +++ .../examples/databases/get-attribute.md | 5 ++ .../examples/databases/get-collection.md | 5 ++ .../examples/databases/get-document.md | 7 +++ .../examples/databases/get-index.md | 5 ++ .../server-rest/examples/databases/get.md | 5 ++ .../databases/increment-document-attribute.md | 11 ++++ .../examples/databases/list-attributes.md | 5 ++ .../examples/databases/list-collections.md | 5 ++ .../examples/databases/list-documents.md | 7 +++ .../examples/databases/list-indexes.md | 5 ++ .../server-rest/examples/databases/list.md | 5 ++ .../databases/update-boolean-attribute.md | 12 ++++ .../examples/databases/update-collection.md | 13 ++++ .../databases/update-datetime-attribute.md | 12 ++++ .../examples/databases/update-document.md | 13 ++++ .../examples/databases/update-documents.md | 11 ++++ .../databases/update-email-attribute.md | 12 ++++ .../databases/update-enum-attribute.md | 13 ++++ .../databases/update-float-attribute.md | 14 +++++ .../databases/update-integer-attribute.md | 14 +++++ .../examples/databases/update-ip-attribute.md | 12 ++++ .../update-relationship-attribute.md | 11 ++++ .../databases/update-string-attribute.md | 13 ++++ .../databases/update-url-attribute.md | 12 ++++ .../server-rest/examples/databases/update.md | 11 ++++ .../examples/databases/upsert-document.md | 9 +++ .../examples/databases/upsert-documents.md | 7 +++ .../examples/functions/create-deployment.md | 30 +++++++++ .../functions/create-duplicate-deployment.md | 11 ++++ .../examples/functions/create-execution.md | 17 ++++++ .../functions/create-template-deployment.md | 14 +++++ .../examples/functions/create-variable.md | 12 ++++ .../functions/create-vcs-deployment.md | 12 ++++ .../server-rest/examples/functions/create.md | 27 ++++++++ .../examples/functions/delete-deployment.md | 7 +++ .../examples/functions/delete-execution.md | 7 +++ .../examples/functions/delete-variable.md | 7 +++ .../server-rest/examples/functions/delete.md | 7 +++ .../functions/get-deployment-download.md | 6 ++ .../examples/functions/get-deployment.md | 5 ++ .../examples/functions/get-execution.md | 7 +++ .../examples/functions/get-variable.md | 5 ++ .../server-rest/examples/functions/get.md | 5 ++ .../examples/functions/list-deployments.md | 5 ++ .../examples/functions/list-executions.md | 7 +++ .../examples/functions/list-runtimes.md | 5 ++ .../examples/functions/list-specifications.md | 5 ++ .../examples/functions/list-variables.md | 5 ++ .../server-rest/examples/functions/list.md | 5 ++ .../functions/update-deployment-status.md | 7 +++ .../functions/update-function-deployment.md | 10 +++ .../examples/functions/update-variable.md | 12 ++++ .../server-rest/examples/functions/update.md | 26 ++++++++ .../server-rest/examples/graphql/mutation.md | 13 ++++ .../server-rest/examples/graphql/query.md | 13 ++++ .../examples/health/get-antivirus.md | 5 ++ .../server-rest/examples/health/get-cache.md | 5 ++ .../examples/health/get-certificate.md | 5 ++ .../server-rest/examples/health/get-d-b.md | 5 ++ .../examples/health/get-failed-jobs.md | 5 ++ .../examples/health/get-pub-sub.md | 5 ++ .../examples/health/get-queue-builds.md | 5 ++ .../examples/health/get-queue-certificates.md | 5 ++ .../examples/health/get-queue-databases.md | 5 ++ .../examples/health/get-queue-deletes.md | 5 ++ .../examples/health/get-queue-functions.md | 5 ++ .../examples/health/get-queue-logs.md | 5 ++ .../examples/health/get-queue-mails.md | 5 ++ .../examples/health/get-queue-messaging.md | 5 ++ .../examples/health/get-queue-migrations.md | 5 ++ .../health/get-queue-stats-resources.md | 5 ++ .../examples/health/get-queue-usage.md | 5 ++ .../examples/health/get-queue-webhooks.md | 5 ++ .../examples/health/get-storage-local.md | 5 ++ .../examples/health/get-storage.md | 5 ++ .../server-rest/examples/health/get-time.md | 5 ++ .../1.8.x/server-rest/examples/health/get.md | 5 ++ .../1.8.x/server-rest/examples/locale/get.md | 7 +++ .../server-rest/examples/locale/list-codes.md | 7 +++ .../examples/locale/list-continents.md | 7 +++ .../examples/locale/list-countries-e-u.md | 7 +++ .../examples/locale/list-countries-phones.md | 7 +++ .../examples/locale/list-countries.md | 7 +++ .../examples/locale/list-currencies.md | 7 +++ .../examples/locale/list-languages.md | 7 +++ .../messaging/create-apns-provider.md | 17 ++++++ .../examples/messaging/create-email.md | 21 +++++++ .../examples/messaging/create-fcm-provider.md | 13 ++++ .../messaging/create-mailgun-provider.md | 19 ++++++ .../messaging/create-msg91provider.md | 15 +++++ .../examples/messaging/create-push.md | 28 +++++++++ .../messaging/create-sendgrid-provider.md | 17 ++++++ .../examples/messaging/create-sms.md | 16 +++++ .../messaging/create-smtp-provider.md | 23 +++++++ .../examples/messaging/create-subscriber.md | 13 ++++ .../messaging/create-telesign-provider.md | 15 +++++ .../messaging/create-textmagic-provider.md | 15 +++++ .../examples/messaging/create-topic.md | 12 ++++ .../messaging/create-twilio-provider.md | 15 +++++ .../messaging/create-vonage-provider.md | 15 +++++ .../examples/messaging/delete-provider.md | 7 +++ .../examples/messaging/delete-subscriber.md | 9 +++ .../examples/messaging/delete-topic.md | 7 +++ .../server-rest/examples/messaging/delete.md | 7 +++ .../examples/messaging/get-message.md | 5 ++ .../examples/messaging/get-provider.md | 5 ++ .../examples/messaging/get-subscriber.md | 5 ++ .../examples/messaging/get-topic.md | 5 ++ .../examples/messaging/list-message-logs.md | 5 ++ .../examples/messaging/list-messages.md | 5 ++ .../examples/messaging/list-provider-logs.md | 5 ++ .../examples/messaging/list-providers.md | 5 ++ .../messaging/list-subscriber-logs.md | 5 ++ .../examples/messaging/list-subscribers.md | 5 ++ .../examples/messaging/list-targets.md | 5 ++ .../examples/messaging/list-topic-logs.md | 5 ++ .../examples/messaging/list-topics.md | 5 ++ .../messaging/update-apns-provider.md | 16 +++++ .../examples/messaging/update-email.md | 20 ++++++ .../examples/messaging/update-fcm-provider.md | 12 ++++ .../messaging/update-mailgun-provider.md | 18 ++++++ .../messaging/update-msg91provider.md | 14 +++++ .../examples/messaging/update-push.md | 27 ++++++++ .../messaging/update-sendgrid-provider.md | 16 +++++ .../examples/messaging/update-sms.md | 15 +++++ .../messaging/update-smtp-provider.md | 22 +++++++ .../messaging/update-telesign-provider.md | 14 +++++ .../messaging/update-textmagic-provider.md | 14 +++++ .../examples/messaging/update-topic.md | 11 ++++ .../messaging/update-twilio-provider.md | 14 +++++ .../messaging/update-vonage-provider.md | 14 +++++ .../examples/sites/create-deployment.md | 35 +++++++++++ .../sites/create-duplicate-deployment.md | 10 +++ .../sites/create-template-deployment.md | 14 +++++ .../examples/sites/create-variable.md | 12 ++++ .../examples/sites/create-vcs-deployment.md | 12 ++++ .../server-rest/examples/sites/create.md | 27 ++++++++ .../examples/sites/delete-deployment.md | 7 +++ .../server-rest/examples/sites/delete-log.md | 7 +++ .../examples/sites/delete-variable.md | 7 +++ .../server-rest/examples/sites/delete.md | 7 +++ .../examples/sites/get-deployment-download.md | 6 ++ .../examples/sites/get-deployment.md | 5 ++ .../server-rest/examples/sites/get-log.md | 5 ++ .../examples/sites/get-variable.md | 5 ++ .../1.8.x/server-rest/examples/sites/get.md | 5 ++ .../examples/sites/list-deployments.md | 5 ++ .../examples/sites/list-frameworks.md | 5 ++ .../server-rest/examples/sites/list-logs.md | 5 ++ .../examples/sites/list-specifications.md | 5 ++ .../examples/sites/list-variables.md | 5 ++ .../1.8.x/server-rest/examples/sites/list.md | 5 ++ .../sites/update-deployment-status.md | 7 +++ .../examples/sites/update-site-deployment.md | 10 +++ .../examples/sites/update-variable.md | 12 ++++ .../server-rest/examples/sites/update.md | 26 ++++++++ .../examples/storage/create-bucket.md | 19 ++++++ .../examples/storage/create-file.md | 27 ++++++++ .../examples/storage/delete-bucket.md | 7 +++ .../examples/storage/delete-file.md | 9 +++ .../examples/storage/get-bucket.md | 5 ++ .../examples/storage/get-file-download.md | 7 +++ .../examples/storage/get-file-preview.md | 7 +++ .../examples/storage/get-file-view.md | 7 +++ .../server-rest/examples/storage/get-file.md | 7 +++ .../examples/storage/list-buckets.md | 5 ++ .../examples/storage/list-files.md | 7 +++ .../examples/storage/update-bucket.md | 18 ++++++ .../examples/storage/update-file.md | 13 ++++ .../examples/tables/create-boolean-column.md | 13 ++++ .../examples/tables/create-datetime-column.md | 13 ++++ .../examples/tables/create-email-column.md | 13 ++++ .../examples/tables/create-enum-column.md | 14 +++++ .../examples/tables/create-float-column.md | 15 +++++ .../examples/tables/create-index.md | 14 +++++ .../examples/tables/create-integer-column.md | 15 +++++ .../examples/tables/create-ip-column.md | 13 ++++ .../tables/create-relationship-column.md | 15 +++++ .../server-rest/examples/tables/create-row.md | 14 +++++ .../examples/tables/create-rows.md | 12 ++++ .../examples/tables/create-string-column.md | 15 +++++ .../examples/tables/create-url-column.md | 13 ++++ .../server-rest/examples/tables/create.md | 14 +++++ .../examples/tables/decrement-row-column.md | 11 ++++ .../examples/tables/delete-column.md | 7 +++ .../examples/tables/delete-index.md | 7 +++ .../server-rest/examples/tables/delete-row.md | 9 +++ .../examples/tables/delete-rows.md | 10 +++ .../server-rest/examples/tables/delete.md | 7 +++ .../server-rest/examples/tables/get-column.md | 5 ++ .../server-rest/examples/tables/get-index.md | 5 ++ .../server-rest/examples/tables/get-row.md | 7 +++ .../1.8.x/server-rest/examples/tables/get.md | 5 ++ .../examples/tables/increment-row-column.md | 11 ++++ .../examples/tables/list-columns.md | 5 ++ .../examples/tables/list-indexes.md | 5 ++ .../server-rest/examples/tables/list-rows.md | 7 +++ .../1.8.x/server-rest/examples/tables/list.md | 5 ++ .../examples/tables/update-boolean-column.md | 12 ++++ .../examples/tables/update-datetime-column.md | 12 ++++ .../examples/tables/update-email-column.md | 12 ++++ .../examples/tables/update-enum-column.md | 13 ++++ .../examples/tables/update-float-column.md | 14 +++++ .../examples/tables/update-integer-column.md | 14 +++++ .../examples/tables/update-ip-column.md | 12 ++++ .../tables/update-relationship-column.md | 11 ++++ .../server-rest/examples/tables/update-row.md | 13 ++++ .../examples/tables/update-rows.md | 11 ++++ .../examples/tables/update-string-column.md | 13 ++++ .../examples/tables/update-url-column.md | 12 ++++ .../server-rest/examples/tables/update.md | 13 ++++ .../server-rest/examples/tables/upsert-row.md | 9 +++ .../examples/tables/upsert-rows.md | 7 +++ .../examples/teams/create-membership.md | 17 ++++++ .../server-rest/examples/teams/create.md | 14 +++++ .../examples/teams/delete-membership.md | 9 +++ .../server-rest/examples/teams/delete.md | 9 +++ .../examples/teams/get-membership.md | 7 +++ .../server-rest/examples/teams/get-prefs.md | 6 ++ .../1.8.x/server-rest/examples/teams/get.md | 7 +++ .../examples/teams/list-memberships.md | 7 +++ .../1.8.x/server-rest/examples/teams/list.md | 7 +++ .../teams/update-membership-status.md | 12 ++++ .../examples/teams/update-membership.md | 12 ++++ .../server-rest/examples/teams/update-name.md | 12 ++++ .../examples/teams/update-prefs.md | 11 ++++ .../examples/tokens/create-file-token.md | 10 +++ .../server-rest/examples/tokens/delete.md | 7 +++ .../1.8.x/server-rest/examples/tokens/get.md | 5 ++ .../1.8.x/server-rest/examples/tokens/list.md | 5 ++ .../server-rest/examples/tokens/update.md | 10 +++ .../examples/users/create-argon2user.md | 13 ++++ .../examples/users/create-bcrypt-user.md | 13 ++++ .../examples/users/create-j-w-t.md | 11 ++++ .../examples/users/create-m-d5user.md | 13 ++++ .../users/create-mfa-recovery-codes.md | 7 +++ .../examples/users/create-p-h-pass-user.md | 13 ++++ .../examples/users/create-s-h-a-user.md | 14 +++++ .../users/create-scrypt-modified-user.md | 16 +++++ .../examples/users/create-scrypt-user.md | 18 ++++++ .../examples/users/create-session.md | 7 +++ .../examples/users/create-target.md | 14 +++++ .../examples/users/create-token.md | 11 ++++ .../server-rest/examples/users/create.md | 14 +++++ .../examples/users/delete-identity.md | 7 +++ .../users/delete-mfa-authenticator.md | 7 +++ .../examples/users/delete-session.md | 7 +++ .../examples/users/delete-sessions.md | 7 +++ .../examples/users/delete-target.md | 7 +++ .../server-rest/examples/users/delete.md | 7 +++ .../examples/users/get-mfa-recovery-codes.md | 5 ++ .../server-rest/examples/users/get-prefs.md | 5 ++ .../server-rest/examples/users/get-target.md | 5 ++ .../1.8.x/server-rest/examples/users/get.md | 5 ++ .../examples/users/list-identities.md | 5 ++ .../server-rest/examples/users/list-logs.md | 5 ++ .../examples/users/list-memberships.md | 5 ++ .../examples/users/list-mfa-factors.md | 5 ++ .../examples/users/list-sessions.md | 5 ++ .../examples/users/list-targets.md | 5 ++ .../1.8.x/server-rest/examples/users/list.md | 5 ++ .../users/update-email-verification.md | 10 +++ .../examples/users/update-email.md | 10 +++ .../examples/users/update-labels.md | 10 +++ .../users/update-mfa-recovery-codes.md | 7 +++ .../server-rest/examples/users/update-mfa.md | 10 +++ .../server-rest/examples/users/update-name.md | 10 +++ .../examples/users/update-password.md | 10 +++ .../users/update-phone-verification.md | 10 +++ .../examples/users/update-phone.md | 10 +++ .../examples/users/update-prefs.md | 10 +++ .../examples/users/update-status.md | 10 +++ .../examples/users/update-target.md | 12 ++++ .../account/create-anonymous-session.md | 11 ++++ .../account/create-email-password-session.md | 14 +++++ .../examples/account/create-email-token.md | 15 +++++ .../examples/account/create-j-w-t.md | 11 ++++ .../account/create-magic-u-r-l-token.md | 16 +++++ .../account/create-mfa-authenticator.md | 15 +++++ .../examples/account/create-mfa-challenge.md | 14 +++++ .../account/create-mfa-recovery-codes.md | 12 ++++ .../examples/account/create-o-auth2token.md | 17 ++++++ .../examples/account/create-phone-token.md | 14 +++++ .../account/create-phone-verification.md | 12 ++++ .../examples/account/create-recovery.md | 15 +++++ .../examples/account/create-session.md | 14 +++++ .../examples/account/create-verification.md | 14 +++++ .../server-ruby/examples/account/create.md | 16 +++++ .../examples/account/delete-identity.md | 14 +++++ .../account/delete-mfa-authenticator.md | 15 +++++ .../examples/account/delete-session.md | 14 +++++ .../examples/account/delete-sessions.md | 12 ++++ .../account/get-mfa-recovery-codes.md | 12 ++++ .../server-ruby/examples/account/get-prefs.md | 12 ++++ .../examples/account/get-session.md | 14 +++++ .../1.8.x/server-ruby/examples/account/get.md | 12 ++++ .../examples/account/list-identities.md | 14 +++++ .../server-ruby/examples/account/list-logs.md | 14 +++++ .../examples/account/list-mfa-factors.md | 12 ++++ .../examples/account/list-sessions.md | 12 ++++ .../examples/account/update-email.md | 15 +++++ .../examples/account/update-m-f-a.md | 14 +++++ .../account/update-magic-u-r-l-session.md | 14 +++++ .../account/update-mfa-authenticator.md | 16 +++++ .../examples/account/update-mfa-challenge.md | 15 +++++ .../account/update-mfa-recovery-codes.md | 12 ++++ .../examples/account/update-name.md | 14 +++++ .../examples/account/update-password.md | 15 +++++ .../examples/account/update-phone-session.md | 14 +++++ .../account/update-phone-verification.md | 15 +++++ .../examples/account/update-phone.md | 15 +++++ .../examples/account/update-prefs.md | 14 +++++ .../examples/account/update-recovery.md | 16 +++++ .../examples/account/update-session.md | 14 +++++ .../examples/account/update-status.md | 12 ++++ .../examples/account/update-verification.md | 15 +++++ .../examples/avatars/get-browser.md | 18 ++++++ .../examples/avatars/get-credit-card.md | 18 ++++++ .../examples/avatars/get-favicon.md | 14 +++++ .../server-ruby/examples/avatars/get-flag.md | 18 ++++++ .../server-ruby/examples/avatars/get-image.md | 16 +++++ .../examples/avatars/get-initials.md | 17 ++++++ .../server-ruby/examples/avatars/get-q-r.md | 17 ++++++ .../databases/create-boolean-attribute.md | 19 ++++++ .../examples/databases/create-collection.md | 19 ++++++ .../databases/create-datetime-attribute.md | 19 ++++++ .../examples/databases/create-document.md | 19 ++++++ .../examples/databases/create-documents.md | 16 +++++ .../databases/create-email-attribute.md | 19 ++++++ .../databases/create-enum-attribute.md | 20 ++++++ .../databases/create-float-attribute.md | 21 +++++++ .../examples/databases/create-index.md | 21 +++++++ .../databases/create-integer-attribute.md | 21 +++++++ .../examples/databases/create-ip-attribute.md | 19 ++++++ .../create-relationship-attribute.md | 22 +++++++ .../databases/create-string-attribute.md | 21 +++++++ .../databases/create-url-attribute.md | 19 ++++++ .../server-ruby/examples/databases/create.md | 16 +++++ .../databases/decrement-document-attribute.md | 19 ++++++ .../examples/databases/delete-attribute.md | 16 +++++ .../examples/databases/delete-collection.md | 15 +++++ .../examples/databases/delete-document.md | 16 +++++ .../examples/databases/delete-documents.md | 16 +++++ .../examples/databases/delete-index.md | 16 +++++ .../server-ruby/examples/databases/delete.md | 14 +++++ .../examples/databases/get-attribute.md | 16 +++++ .../examples/databases/get-collection.md | 15 +++++ .../examples/databases/get-document.md | 17 ++++++ .../examples/databases/get-index.md | 16 +++++ .../server-ruby/examples/databases/get.md | 14 +++++ .../databases/increment-document-attribute.md | 19 ++++++ .../examples/databases/list-attributes.md | 16 +++++ .../examples/databases/list-collections.md | 16 +++++ .../examples/databases/list-documents.md | 16 +++++ .../examples/databases/list-indexes.md | 16 +++++ .../server-ruby/examples/databases/list.md | 15 +++++ .../databases/update-boolean-attribute.md | 19 ++++++ .../examples/databases/update-collection.md | 19 ++++++ .../databases/update-datetime-attribute.md | 19 ++++++ .../examples/databases/update-document.md | 18 ++++++ .../examples/databases/update-documents.md | 17 ++++++ .../databases/update-email-attribute.md | 19 ++++++ .../databases/update-enum-attribute.md | 20 ++++++ .../databases/update-float-attribute.md | 21 +++++++ .../databases/update-integer-attribute.md | 21 +++++++ .../examples/databases/update-ip-attribute.md | 19 ++++++ .../update-relationship-attribute.md | 18 ++++++ .../databases/update-string-attribute.md | 20 ++++++ .../databases/update-url-attribute.md | 19 ++++++ .../server-ruby/examples/databases/update.md | 16 +++++ .../examples/databases/upsert-document.md | 17 ++++++ .../examples/databases/upsert-documents.md | 15 +++++ .../examples/functions/create-deployment.md | 18 ++++++ .../functions/create-duplicate-deployment.md | 16 +++++ .../examples/functions/create-execution.md | 20 ++++++ .../functions/create-template-deployment.md | 19 ++++++ .../examples/functions/create-variable.md | 17 ++++++ .../functions/create-vcs-deployment.md | 18 ++++++ .../server-ruby/examples/functions/create.md | 32 ++++++++++ .../examples/functions/delete-deployment.md | 15 +++++ .../examples/functions/delete-execution.md | 15 +++++ .../examples/functions/delete-variable.md | 15 +++++ .../server-ruby/examples/functions/delete.md | 14 +++++ .../functions/get-deployment-download.md | 16 +++++ .../examples/functions/get-deployment.md | 15 +++++ .../examples/functions/get-execution.md | 15 +++++ .../examples/functions/get-variable.md | 15 +++++ .../server-ruby/examples/functions/get.md | 14 +++++ .../examples/functions/list-deployments.md | 16 +++++ .../examples/functions/list-executions.md | 15 +++++ .../examples/functions/list-runtimes.md | 12 ++++ .../examples/functions/list-specifications.md | 12 ++++ .../examples/functions/list-variables.md | 14 +++++ .../server-ruby/examples/functions/list.md | 15 +++++ .../functions/update-deployment-status.md | 15 +++++ .../functions/update-function-deployment.md | 15 +++++ .../examples/functions/update-variable.md | 18 ++++++ .../server-ruby/examples/functions/update.md | 31 ++++++++++ .../server-ruby/examples/graphql/mutation.md | 14 +++++ .../server-ruby/examples/graphql/query.md | 14 +++++ .../examples/health/get-antivirus.md | 12 ++++ .../server-ruby/examples/health/get-cache.md | 12 ++++ .../examples/health/get-certificate.md | 14 +++++ .../server-ruby/examples/health/get-d-b.md | 12 ++++ .../examples/health/get-failed-jobs.md | 16 +++++ .../examples/health/get-pub-sub.md | 12 ++++ .../examples/health/get-queue-builds.md | 14 +++++ .../examples/health/get-queue-certificates.md | 14 +++++ .../examples/health/get-queue-databases.md | 15 +++++ .../examples/health/get-queue-deletes.md | 14 +++++ .../examples/health/get-queue-functions.md | 14 +++++ .../examples/health/get-queue-logs.md | 14 +++++ .../examples/health/get-queue-mails.md | 14 +++++ .../examples/health/get-queue-messaging.md | 14 +++++ .../examples/health/get-queue-migrations.md | 14 +++++ .../health/get-queue-stats-resources.md | 14 +++++ .../examples/health/get-queue-usage.md | 14 +++++ .../examples/health/get-queue-webhooks.md | 14 +++++ .../examples/health/get-storage-local.md | 12 ++++ .../examples/health/get-storage.md | 12 ++++ .../server-ruby/examples/health/get-time.md | 12 ++++ .../1.8.x/server-ruby/examples/health/get.md | 12 ++++ .../1.8.x/server-ruby/examples/locale/get.md | 12 ++++ .../server-ruby/examples/locale/list-codes.md | 12 ++++ .../examples/locale/list-continents.md | 12 ++++ .../examples/locale/list-countries-e-u.md | 12 ++++ .../examples/locale/list-countries-phones.md | 12 ++++ .../examples/locale/list-countries.md | 12 ++++ .../examples/locale/list-currencies.md | 12 ++++ .../examples/locale/list-languages.md | 12 ++++ .../messaging/create-apns-provider.md | 21 +++++++ .../examples/messaging/create-email.md | 25 ++++++++ .../examples/messaging/create-fcm-provider.md | 17 ++++++ .../messaging/create-mailgun-provider.md | 23 +++++++ .../messaging/create-msg91provider.md | 19 ++++++ .../examples/messaging/create-push.md | 32 ++++++++++ .../messaging/create-sendgrid-provider.md | 21 +++++++ .../examples/messaging/create-sms.md | 20 ++++++ .../messaging/create-smtp-provider.md | 27 ++++++++ .../examples/messaging/create-subscriber.md | 16 +++++ .../messaging/create-telesign-provider.md | 19 ++++++ .../messaging/create-textmagic-provider.md | 19 ++++++ .../examples/messaging/create-topic.md | 16 +++++ .../messaging/create-twilio-provider.md | 19 ++++++ .../messaging/create-vonage-provider.md | 19 ++++++ .../examples/messaging/delete-provider.md | 14 +++++ .../examples/messaging/delete-subscriber.md | 15 +++++ .../examples/messaging/delete-topic.md | 14 +++++ .../server-ruby/examples/messaging/delete.md | 14 +++++ .../examples/messaging/get-message.md | 14 +++++ .../examples/messaging/get-provider.md | 14 +++++ .../examples/messaging/get-subscriber.md | 15 +++++ .../examples/messaging/get-topic.md | 14 +++++ .../examples/messaging/list-message-logs.md | 15 +++++ .../examples/messaging/list-messages.md | 15 +++++ .../examples/messaging/list-provider-logs.md | 15 +++++ .../examples/messaging/list-providers.md | 15 +++++ .../messaging/list-subscriber-logs.md | 15 +++++ .../examples/messaging/list-subscribers.md | 16 +++++ .../examples/messaging/list-targets.md | 15 +++++ .../examples/messaging/list-topic-logs.md | 15 +++++ .../examples/messaging/list-topics.md | 15 +++++ .../messaging/update-apns-provider.md | 21 +++++++ .../examples/messaging/update-email.md | 25 ++++++++ .../examples/messaging/update-fcm-provider.md | 17 ++++++ .../messaging/update-mailgun-provider.md | 23 +++++++ .../messaging/update-msg91provider.md | 19 ++++++ .../examples/messaging/update-push.md | 32 ++++++++++ .../messaging/update-sendgrid-provider.md | 21 +++++++ .../examples/messaging/update-sms.md | 20 ++++++ .../messaging/update-smtp-provider.md | 27 ++++++++ .../messaging/update-telesign-provider.md | 19 ++++++ .../messaging/update-textmagic-provider.md | 19 ++++++ .../examples/messaging/update-topic.md | 16 +++++ .../messaging/update-twilio-provider.md | 19 ++++++ .../messaging/update-vonage-provider.md | 19 ++++++ .../examples/sites/create-deployment.md | 19 ++++++ .../sites/create-duplicate-deployment.md | 15 +++++ .../sites/create-template-deployment.md | 19 ++++++ .../examples/sites/create-variable.md | 17 ++++++ .../examples/sites/create-vcs-deployment.md | 18 ++++++ .../server-ruby/examples/sites/create.md | 32 ++++++++++ .../examples/sites/delete-deployment.md | 15 +++++ .../server-ruby/examples/sites/delete-log.md | 15 +++++ .../examples/sites/delete-variable.md | 15 +++++ .../server-ruby/examples/sites/delete.md | 14 +++++ .../examples/sites/get-deployment-download.md | 16 +++++ .../examples/sites/get-deployment.md | 15 +++++ .../server-ruby/examples/sites/get-log.md | 15 +++++ .../examples/sites/get-variable.md | 15 +++++ .../1.8.x/server-ruby/examples/sites/get.md | 14 +++++ .../examples/sites/list-deployments.md | 16 +++++ .../examples/sites/list-frameworks.md | 12 ++++ .../server-ruby/examples/sites/list-logs.md | 15 +++++ .../examples/sites/list-specifications.md | 12 ++++ .../examples/sites/list-variables.md | 14 +++++ .../1.8.x/server-ruby/examples/sites/list.md | 15 +++++ .../sites/update-deployment-status.md | 15 +++++ .../examples/sites/update-site-deployment.md | 15 +++++ .../examples/sites/update-variable.md | 18 ++++++ .../server-ruby/examples/sites/update.md | 32 ++++++++++ .../examples/storage/create-bucket.md | 23 +++++++ .../examples/storage/create-file.md | 17 ++++++ .../examples/storage/delete-bucket.md | 14 +++++ .../examples/storage/delete-file.md | 15 +++++ .../examples/storage/get-bucket.md | 14 +++++ .../examples/storage/get-file-download.md | 16 +++++ .../examples/storage/get-file-preview.md | 27 ++++++++ .../examples/storage/get-file-view.md | 16 +++++ .../server-ruby/examples/storage/get-file.md | 15 +++++ .../examples/storage/list-buckets.md | 15 +++++ .../examples/storage/list-files.md | 16 +++++ .../examples/storage/update-bucket.md | 23 +++++++ .../examples/storage/update-file.md | 17 ++++++ .../examples/tables/create-boolean-column.md | 19 ++++++ .../examples/tables/create-datetime-column.md | 19 ++++++ .../examples/tables/create-email-column.md | 19 ++++++ .../examples/tables/create-enum-column.md | 20 ++++++ .../examples/tables/create-float-column.md | 21 +++++++ .../examples/tables/create-index.md | 21 +++++++ .../examples/tables/create-integer-column.md | 21 +++++++ .../examples/tables/create-ip-column.md | 19 ++++++ .../tables/create-relationship-column.md | 22 +++++++ .../server-ruby/examples/tables/create-row.md | 19 ++++++ .../examples/tables/create-rows.md | 16 +++++ .../examples/tables/create-string-column.md | 21 +++++++ .../examples/tables/create-url-column.md | 19 ++++++ .../server-ruby/examples/tables/create.md | 19 ++++++ .../examples/tables/decrement-row-column.md | 19 ++++++ .../examples/tables/delete-column.md | 16 +++++ .../examples/tables/delete-index.md | 16 +++++ .../server-ruby/examples/tables/delete-row.md | 16 +++++ .../examples/tables/delete-rows.md | 16 +++++ .../server-ruby/examples/tables/delete.md | 15 +++++ .../server-ruby/examples/tables/get-column.md | 16 +++++ .../server-ruby/examples/tables/get-index.md | 16 +++++ .../server-ruby/examples/tables/get-row.md | 17 ++++++ .../1.8.x/server-ruby/examples/tables/get.md | 15 +++++ .../examples/tables/increment-row-column.md | 19 ++++++ .../examples/tables/list-columns.md | 16 +++++ .../examples/tables/list-indexes.md | 16 +++++ .../server-ruby/examples/tables/list-rows.md | 16 +++++ .../1.8.x/server-ruby/examples/tables/list.md | 16 +++++ .../examples/tables/update-boolean-column.md | 19 ++++++ .../examples/tables/update-datetime-column.md | 19 ++++++ .../examples/tables/update-email-column.md | 19 ++++++ .../examples/tables/update-enum-column.md | 20 ++++++ .../examples/tables/update-float-column.md | 21 +++++++ .../examples/tables/update-integer-column.md | 21 +++++++ .../examples/tables/update-ip-column.md | 19 ++++++ .../tables/update-relationship-column.md | 18 ++++++ .../server-ruby/examples/tables/update-row.md | 18 ++++++ .../examples/tables/update-rows.md | 17 ++++++ .../examples/tables/update-string-column.md | 20 ++++++ .../examples/tables/update-url-column.md | 19 ++++++ .../server-ruby/examples/tables/update.md | 19 ++++++ .../server-ruby/examples/tables/upsert-row.md | 17 ++++++ .../examples/tables/upsert-rows.md | 15 +++++ .../examples/teams/create-membership.md | 20 ++++++ .../server-ruby/examples/teams/create.md | 16 +++++ .../examples/teams/delete-membership.md | 15 +++++ .../server-ruby/examples/teams/delete.md | 14 +++++ .../examples/teams/get-membership.md | 15 +++++ .../server-ruby/examples/teams/get-prefs.md | 14 +++++ .../1.8.x/server-ruby/examples/teams/get.md | 14 +++++ .../examples/teams/list-memberships.md | 16 +++++ .../1.8.x/server-ruby/examples/teams/list.md | 15 +++++ .../teams/update-membership-status.md | 17 ++++++ .../examples/teams/update-membership.md | 16 +++++ .../server-ruby/examples/teams/update-name.md | 15 +++++ .../examples/teams/update-prefs.md | 15 +++++ .../examples/tokens/create-file-token.md | 16 +++++ .../server-ruby/examples/tokens/delete.md | 14 +++++ .../1.8.x/server-ruby/examples/tokens/get.md | 14 +++++ .../1.8.x/server-ruby/examples/tokens/list.md | 16 +++++ .../server-ruby/examples/tokens/update.md | 15 +++++ .../examples/users/create-argon2user.md | 17 ++++++ .../examples/users/create-bcrypt-user.md | 17 ++++++ .../examples/users/create-j-w-t.md | 16 +++++ .../examples/users/create-m-d5user.md | 17 ++++++ .../users/create-mfa-recovery-codes.md | 14 +++++ .../examples/users/create-p-h-pass-user.md | 17 ++++++ .../examples/users/create-s-h-a-user.md | 18 ++++++ .../users/create-scrypt-modified-user.md | 20 ++++++ .../examples/users/create-scrypt-user.md | 22 +++++++ .../examples/users/create-session.md | 14 +++++ .../examples/users/create-target.md | 20 ++++++ .../examples/users/create-token.md | 16 +++++ .../server-ruby/examples/users/create.md | 18 ++++++ .../examples/users/delete-identity.md | 14 +++++ .../users/delete-mfa-authenticator.md | 16 +++++ .../examples/users/delete-session.md | 15 +++++ .../examples/users/delete-sessions.md | 14 +++++ .../examples/users/delete-target.md | 15 +++++ .../server-ruby/examples/users/delete.md | 14 +++++ .../examples/users/get-mfa-recovery-codes.md | 14 +++++ .../server-ruby/examples/users/get-prefs.md | 14 +++++ .../server-ruby/examples/users/get-target.md | 15 +++++ .../1.8.x/server-ruby/examples/users/get.md | 14 +++++ .../examples/users/list-identities.md | 15 +++++ .../server-ruby/examples/users/list-logs.md | 15 +++++ .../examples/users/list-memberships.md | 16 +++++ .../examples/users/list-mfa-factors.md | 14 +++++ .../examples/users/list-sessions.md | 14 +++++ .../examples/users/list-targets.md | 15 +++++ .../1.8.x/server-ruby/examples/users/list.md | 15 +++++ .../users/update-email-verification.md | 15 +++++ .../examples/users/update-email.md | 15 +++++ .../examples/users/update-labels.md | 15 +++++ .../users/update-mfa-recovery-codes.md | 14 +++++ .../server-ruby/examples/users/update-mfa.md | 15 +++++ .../server-ruby/examples/users/update-name.md | 15 +++++ .../examples/users/update-password.md | 15 +++++ .../users/update-phone-verification.md | 15 +++++ .../examples/users/update-phone.md | 15 +++++ .../examples/users/update-prefs.md | 15 +++++ .../examples/users/update-status.md | 15 +++++ .../examples/users/update-target.md | 18 ++++++ .../account/create-anonymous-session.md | 10 +++ .../account/create-email-password-session.md | 13 ++++ .../examples/account/create-email-token.md | 14 +++++ .../examples/account/create-j-w-t.md | 10 +++ .../account/create-magic-u-r-l-token.md | 15 +++++ .../account/create-mfa-authenticator.md | 14 +++++ .../examples/account/create-mfa-challenge.md | 13 ++++ .../account/create-mfa-recovery-codes.md | 11 ++++ .../examples/account/create-o-auth2token.md | 16 +++++ .../examples/account/create-phone-token.md | 13 ++++ .../account/create-phone-verification.md | 11 ++++ .../examples/account/create-recovery.md | 14 +++++ .../examples/account/create-session.md | 13 ++++ .../examples/account/create-verification.md | 13 ++++ .../server-swift/examples/account/create.md | 15 +++++ .../examples/account/delete-identity.md | 13 ++++ .../account/delete-mfa-authenticator.md | 14 +++++ .../examples/account/delete-session.md | 13 ++++ .../examples/account/delete-sessions.md | 11 ++++ .../account/get-mfa-recovery-codes.md | 11 ++++ .../examples/account/get-prefs.md | 11 ++++ .../examples/account/get-session.md | 13 ++++ .../server-swift/examples/account/get.md | 11 ++++ .../examples/account/list-identities.md | 13 ++++ .../examples/account/list-logs.md | 13 ++++ .../examples/account/list-mfa-factors.md | 11 ++++ .../examples/account/list-sessions.md | 11 ++++ .../examples/account/update-email.md | 14 +++++ .../examples/account/update-m-f-a.md | 13 ++++ .../account/update-magic-u-r-l-session.md | 13 ++++ .../account/update-mfa-authenticator.md | 15 +++++ .../examples/account/update-mfa-challenge.md | 14 +++++ .../account/update-mfa-recovery-codes.md | 11 ++++ .../examples/account/update-name.md | 13 ++++ .../examples/account/update-password.md | 14 +++++ .../examples/account/update-phone-session.md | 13 ++++ .../account/update-phone-verification.md | 14 +++++ .../examples/account/update-phone.md | 14 +++++ .../examples/account/update-prefs.md | 13 ++++ .../examples/account/update-recovery.md | 15 +++++ .../examples/account/update-session.md | 13 ++++ .../examples/account/update-status.md | 11 ++++ .../examples/account/update-verification.md | 14 +++++ .../examples/avatars/get-browser.md | 17 ++++++ .../examples/avatars/get-credit-card.md | 17 ++++++ .../examples/avatars/get-favicon.md | 13 ++++ .../server-swift/examples/avatars/get-flag.md | 17 ++++++ .../examples/avatars/get-image.md | 15 +++++ .../examples/avatars/get-initials.md | 16 +++++ .../server-swift/examples/avatars/get-q-r.md | 16 +++++ .../databases/create-boolean-attribute.md | 18 ++++++ .../examples/databases/create-collection.md | 18 ++++++ .../databases/create-datetime-attribute.md | 18 ++++++ .../examples/databases/create-document.md | 18 ++++++ .../examples/databases/create-documents.md | 15 +++++ .../databases/create-email-attribute.md | 18 ++++++ .../databases/create-enum-attribute.md | 19 ++++++ .../databases/create-float-attribute.md | 20 ++++++ .../examples/databases/create-index.md | 20 ++++++ .../databases/create-integer-attribute.md | 20 ++++++ .../examples/databases/create-ip-attribute.md | 18 ++++++ .../create-relationship-attribute.md | 21 +++++++ .../databases/create-string-attribute.md | 20 ++++++ .../databases/create-url-attribute.md | 18 ++++++ .../server-swift/examples/databases/create.md | 15 +++++ .../databases/decrement-document-attribute.md | 18 ++++++ .../examples/databases/delete-attribute.md | 15 +++++ .../examples/databases/delete-collection.md | 14 +++++ .../examples/databases/delete-document.md | 15 +++++ .../examples/databases/delete-documents.md | 15 +++++ .../examples/databases/delete-index.md | 15 +++++ .../server-swift/examples/databases/delete.md | 13 ++++ .../examples/databases/get-attribute.md | 15 +++++ .../examples/databases/get-collection.md | 14 +++++ .../examples/databases/get-document.md | 16 +++++ .../examples/databases/get-index.md | 15 +++++ .../server-swift/examples/databases/get.md | 13 ++++ .../databases/increment-document-attribute.md | 18 ++++++ .../examples/databases/list-attributes.md | 15 +++++ .../examples/databases/list-collections.md | 15 +++++ .../examples/databases/list-documents.md | 15 +++++ .../examples/databases/list-indexes.md | 15 +++++ .../server-swift/examples/databases/list.md | 14 +++++ .../databases/update-boolean-attribute.md | 18 ++++++ .../examples/databases/update-collection.md | 18 ++++++ .../databases/update-datetime-attribute.md | 18 ++++++ .../examples/databases/update-document.md | 17 ++++++ .../examples/databases/update-documents.md | 16 +++++ .../databases/update-email-attribute.md | 18 ++++++ .../databases/update-enum-attribute.md | 19 ++++++ .../databases/update-float-attribute.md | 20 ++++++ .../databases/update-integer-attribute.md | 20 ++++++ .../examples/databases/update-ip-attribute.md | 18 ++++++ .../update-relationship-attribute.md | 18 ++++++ .../databases/update-string-attribute.md | 19 ++++++ .../databases/update-url-attribute.md | 18 ++++++ .../server-swift/examples/databases/update.md | 15 +++++ .../examples/databases/upsert-document.md | 16 +++++ .../examples/databases/upsert-documents.md | 14 +++++ .../examples/functions/create-deployment.md | 17 ++++++ .../functions/create-duplicate-deployment.md | 15 +++++ .../examples/functions/create-execution.md | 20 ++++++ .../functions/create-template-deployment.md | 18 ++++++ .../examples/functions/create-variable.md | 16 +++++ .../functions/create-vcs-deployment.md | 17 ++++++ .../server-swift/examples/functions/create.md | 31 ++++++++++ .../examples/functions/delete-deployment.md | 14 +++++ .../examples/functions/delete-execution.md | 14 +++++ .../examples/functions/delete-variable.md | 14 +++++ .../server-swift/examples/functions/delete.md | 13 ++++ .../functions/get-deployment-download.md | 16 +++++ .../examples/functions/get-deployment.md | 14 +++++ .../examples/functions/get-execution.md | 14 +++++ .../examples/functions/get-variable.md | 14 +++++ .../server-swift/examples/functions/get.md | 13 ++++ .../examples/functions/list-deployments.md | 15 +++++ .../examples/functions/list-executions.md | 14 +++++ .../examples/functions/list-runtimes.md | 11 ++++ .../examples/functions/list-specifications.md | 11 ++++ .../examples/functions/list-variables.md | 13 ++++ .../server-swift/examples/functions/list.md | 14 +++++ .../functions/update-deployment-status.md | 14 +++++ .../functions/update-function-deployment.md | 14 +++++ .../examples/functions/update-variable.md | 17 ++++++ .../server-swift/examples/functions/update.md | 31 ++++++++++ .../server-swift/examples/graphql/mutation.md | 13 ++++ .../server-swift/examples/graphql/query.md | 13 ++++ .../examples/health/get-antivirus.md | 11 ++++ .../server-swift/examples/health/get-cache.md | 11 ++++ .../examples/health/get-certificate.md | 13 ++++ .../server-swift/examples/health/get-d-b.md | 11 ++++ .../examples/health/get-failed-jobs.md | 15 +++++ .../examples/health/get-pub-sub.md | 11 ++++ .../examples/health/get-queue-builds.md | 13 ++++ .../examples/health/get-queue-certificates.md | 13 ++++ .../examples/health/get-queue-databases.md | 14 +++++ .../examples/health/get-queue-deletes.md | 13 ++++ .../examples/health/get-queue-functions.md | 13 ++++ .../examples/health/get-queue-logs.md | 13 ++++ .../examples/health/get-queue-mails.md | 13 ++++ .../examples/health/get-queue-messaging.md | 13 ++++ .../examples/health/get-queue-migrations.md | 13 ++++ .../health/get-queue-stats-resources.md | 13 ++++ .../examples/health/get-queue-usage.md | 13 ++++ .../examples/health/get-queue-webhooks.md | 13 ++++ .../examples/health/get-storage-local.md | 11 ++++ .../examples/health/get-storage.md | 11 ++++ .../server-swift/examples/health/get-time.md | 11 ++++ .../1.8.x/server-swift/examples/health/get.md | 11 ++++ .../1.8.x/server-swift/examples/locale/get.md | 11 ++++ .../examples/locale/list-codes.md | 11 ++++ .../examples/locale/list-continents.md | 11 ++++ .../examples/locale/list-countries-e-u.md | 11 ++++ .../examples/locale/list-countries-phones.md | 11 ++++ .../examples/locale/list-countries.md | 11 ++++ .../examples/locale/list-currencies.md | 11 ++++ .../examples/locale/list-languages.md | 11 ++++ .../messaging/create-apns-provider.md | 20 ++++++ .../examples/messaging/create-email.md | 24 ++++++++ .../examples/messaging/create-fcm-provider.md | 16 +++++ .../messaging/create-mailgun-provider.md | 22 +++++++ .../messaging/create-msg91provider.md | 18 ++++++ .../examples/messaging/create-push.md | 32 ++++++++++ .../messaging/create-sendgrid-provider.md | 20 ++++++ .../examples/messaging/create-sms.md | 19 ++++++ .../messaging/create-smtp-provider.md | 27 ++++++++ .../examples/messaging/create-subscriber.md | 15 +++++ .../messaging/create-telesign-provider.md | 18 ++++++ .../messaging/create-textmagic-provider.md | 18 ++++++ .../examples/messaging/create-topic.md | 15 +++++ .../messaging/create-twilio-provider.md | 18 ++++++ .../messaging/create-vonage-provider.md | 18 ++++++ .../examples/messaging/delete-provider.md | 13 ++++ .../examples/messaging/delete-subscriber.md | 14 +++++ .../examples/messaging/delete-topic.md | 13 ++++ .../server-swift/examples/messaging/delete.md | 13 ++++ .../examples/messaging/get-message.md | 13 ++++ .../examples/messaging/get-provider.md | 13 ++++ .../examples/messaging/get-subscriber.md | 14 +++++ .../examples/messaging/get-topic.md | 13 ++++ .../examples/messaging/list-message-logs.md | 14 +++++ .../examples/messaging/list-messages.md | 14 +++++ .../examples/messaging/list-provider-logs.md | 14 +++++ .../examples/messaging/list-providers.md | 14 +++++ .../messaging/list-subscriber-logs.md | 14 +++++ .../examples/messaging/list-subscribers.md | 15 +++++ .../examples/messaging/list-targets.md | 14 +++++ .../examples/messaging/list-topic-logs.md | 14 +++++ .../examples/messaging/list-topics.md | 14 +++++ .../messaging/update-apns-provider.md | 20 ++++++ .../examples/messaging/update-email.md | 24 ++++++++ .../examples/messaging/update-fcm-provider.md | 16 +++++ .../messaging/update-mailgun-provider.md | 22 +++++++ .../messaging/update-msg91provider.md | 18 ++++++ .../examples/messaging/update-push.md | 32 ++++++++++ .../messaging/update-sendgrid-provider.md | 20 ++++++ .../examples/messaging/update-sms.md | 19 ++++++ .../messaging/update-smtp-provider.md | 27 ++++++++ .../messaging/update-telesign-provider.md | 18 ++++++ .../messaging/update-textmagic-provider.md | 18 ++++++ .../examples/messaging/update-topic.md | 15 +++++ .../messaging/update-twilio-provider.md | 18 ++++++ .../messaging/update-vonage-provider.md | 18 ++++++ .../examples/sites/create-deployment.md | 18 ++++++ .../sites/create-duplicate-deployment.md | 14 +++++ .../sites/create-template-deployment.md | 18 ++++++ .../examples/sites/create-variable.md | 16 +++++ .../examples/sites/create-vcs-deployment.md | 17 ++++++ .../server-swift/examples/sites/create.md | 31 ++++++++++ .../examples/sites/delete-deployment.md | 14 +++++ .../server-swift/examples/sites/delete-log.md | 14 +++++ .../examples/sites/delete-variable.md | 14 +++++ .../server-swift/examples/sites/delete.md | 13 ++++ .../examples/sites/get-deployment-download.md | 16 +++++ .../examples/sites/get-deployment.md | 14 +++++ .../server-swift/examples/sites/get-log.md | 14 +++++ .../examples/sites/get-variable.md | 14 +++++ .../1.8.x/server-swift/examples/sites/get.md | 13 ++++ .../examples/sites/list-deployments.md | 15 +++++ .../examples/sites/list-frameworks.md | 11 ++++ .../server-swift/examples/sites/list-logs.md | 14 +++++ .../examples/sites/list-specifications.md | 11 ++++ .../examples/sites/list-variables.md | 13 ++++ .../1.8.x/server-swift/examples/sites/list.md | 14 +++++ .../sites/update-deployment-status.md | 14 +++++ .../examples/sites/update-site-deployment.md | 14 +++++ .../examples/sites/update-variable.md | 17 ++++++ .../server-swift/examples/sites/update.md | 31 ++++++++++ .../examples/storage/create-bucket.md | 23 +++++++ .../examples/storage/create-file.md | 16 +++++ .../examples/storage/delete-bucket.md | 13 ++++ .../examples/storage/delete-file.md | 14 +++++ .../examples/storage/get-bucket.md | 13 ++++ .../examples/storage/get-file-download.md | 15 +++++ .../examples/storage/get-file-preview.md | 27 ++++++++ .../examples/storage/get-file-view.md | 15 +++++ .../server-swift/examples/storage/get-file.md | 14 +++++ .../examples/storage/list-buckets.md | 14 +++++ .../examples/storage/list-files.md | 15 +++++ .../examples/storage/update-bucket.md | 23 +++++++ .../examples/storage/update-file.md | 16 +++++ .../examples/tables/create-boolean-column.md | 18 ++++++ .../examples/tables/create-datetime-column.md | 18 ++++++ .../examples/tables/create-email-column.md | 18 ++++++ .../examples/tables/create-enum-column.md | 19 ++++++ .../examples/tables/create-float-column.md | 20 ++++++ .../examples/tables/create-index.md | 20 ++++++ .../examples/tables/create-integer-column.md | 20 ++++++ .../examples/tables/create-ip-column.md | 18 ++++++ .../tables/create-relationship-column.md | 21 +++++++ .../examples/tables/create-row.md | 18 ++++++ .../examples/tables/create-rows.md | 15 +++++ .../examples/tables/create-string-column.md | 20 ++++++ .../examples/tables/create-url-column.md | 18 ++++++ .../server-swift/examples/tables/create.md | 18 ++++++ .../examples/tables/decrement-row-column.md | 18 ++++++ .../examples/tables/delete-column.md | 15 +++++ .../examples/tables/delete-index.md | 15 +++++ .../examples/tables/delete-row.md | 15 +++++ .../examples/tables/delete-rows.md | 15 +++++ .../server-swift/examples/tables/delete.md | 14 +++++ .../examples/tables/get-column.md | 15 +++++ .../server-swift/examples/tables/get-index.md | 15 +++++ .../server-swift/examples/tables/get-row.md | 16 +++++ .../1.8.x/server-swift/examples/tables/get.md | 14 +++++ .../examples/tables/increment-row-column.md | 18 ++++++ .../examples/tables/list-columns.md | 15 +++++ .../examples/tables/list-indexes.md | 15 +++++ .../server-swift/examples/tables/list-rows.md | 15 +++++ .../server-swift/examples/tables/list.md | 15 +++++ .../examples/tables/update-boolean-column.md | 18 ++++++ .../examples/tables/update-datetime-column.md | 18 ++++++ .../examples/tables/update-email-column.md | 18 ++++++ .../examples/tables/update-enum-column.md | 19 ++++++ .../examples/tables/update-float-column.md | 20 ++++++ .../examples/tables/update-integer-column.md | 20 ++++++ .../examples/tables/update-ip-column.md | 18 ++++++ .../tables/update-relationship-column.md | 18 ++++++ .../examples/tables/update-row.md | 17 ++++++ .../examples/tables/update-rows.md | 16 +++++ .../examples/tables/update-string-column.md | 19 ++++++ .../examples/tables/update-url-column.md | 18 ++++++ .../server-swift/examples/tables/update.md | 18 ++++++ .../examples/tables/upsert-row.md | 16 +++++ .../examples/tables/upsert-rows.md | 14 +++++ .../examples/teams/create-membership.md | 19 ++++++ .../server-swift/examples/teams/create.md | 15 +++++ .../examples/teams/delete-membership.md | 14 +++++ .../server-swift/examples/teams/delete.md | 13 ++++ .../examples/teams/get-membership.md | 14 +++++ .../server-swift/examples/teams/get-prefs.md | 13 ++++ .../1.8.x/server-swift/examples/teams/get.md | 13 ++++ .../examples/teams/list-memberships.md | 15 +++++ .../1.8.x/server-swift/examples/teams/list.md | 14 +++++ .../teams/update-membership-status.md | 16 +++++ .../examples/teams/update-membership.md | 15 +++++ .../examples/teams/update-name.md | 14 +++++ .../examples/teams/update-prefs.md | 14 +++++ .../examples/tokens/create-file-token.md | 15 +++++ .../server-swift/examples/tokens/delete.md | 13 ++++ .../1.8.x/server-swift/examples/tokens/get.md | 13 ++++ .../server-swift/examples/tokens/list.md | 15 +++++ .../server-swift/examples/tokens/update.md | 14 +++++ .../examples/users/create-argon2user.md | 16 +++++ .../examples/users/create-bcrypt-user.md | 16 +++++ .../examples/users/create-j-w-t.md | 15 +++++ .../examples/users/create-m-d5user.md | 16 +++++ .../users/create-mfa-recovery-codes.md | 13 ++++ .../examples/users/create-p-h-pass-user.md | 16 +++++ .../examples/users/create-s-h-a-user.md | 18 ++++++ .../users/create-scrypt-modified-user.md | 19 ++++++ .../examples/users/create-scrypt-user.md | 21 +++++++ .../examples/users/create-session.md | 13 ++++ .../examples/users/create-target.md | 19 ++++++ .../examples/users/create-token.md | 15 +++++ .../server-swift/examples/users/create.md | 17 ++++++ .../examples/users/delete-identity.md | 13 ++++ .../users/delete-mfa-authenticator.md | 15 +++++ .../examples/users/delete-session.md | 14 +++++ .../examples/users/delete-sessions.md | 13 ++++ .../examples/users/delete-target.md | 14 +++++ .../server-swift/examples/users/delete.md | 13 ++++ .../examples/users/get-mfa-recovery-codes.md | 13 ++++ .../server-swift/examples/users/get-prefs.md | 13 ++++ .../server-swift/examples/users/get-target.md | 14 +++++ .../1.8.x/server-swift/examples/users/get.md | 13 ++++ .../examples/users/list-identities.md | 14 +++++ .../server-swift/examples/users/list-logs.md | 14 +++++ .../examples/users/list-memberships.md | 15 +++++ .../examples/users/list-mfa-factors.md | 13 ++++ .../examples/users/list-sessions.md | 13 ++++ .../examples/users/list-targets.md | 14 +++++ .../1.8.x/server-swift/examples/users/list.md | 14 +++++ .../users/update-email-verification.md | 14 +++++ .../examples/users/update-email.md | 14 +++++ .../examples/users/update-labels.md | 14 +++++ .../users/update-mfa-recovery-codes.md | 13 ++++ .../server-swift/examples/users/update-mfa.md | 14 +++++ .../examples/users/update-name.md | 14 +++++ .../examples/users/update-password.md | 14 +++++ .../users/update-phone-verification.md | 14 +++++ .../examples/users/update-phone.md | 14 +++++ .../examples/users/update-prefs.md | 14 +++++ .../examples/users/update-status.md | 14 +++++ .../examples/users/update-target.md | 17 ++++++ 6235 files changed, 96496 insertions(+) create mode 100644 docs/examples/1.8.x/client-android/java/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-email-token.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-o-auth2session.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-push-target.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-recovery.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-session.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create-verification.md create mode 100644 docs/examples/1.8.x/client-android/java/account/create.md create mode 100644 docs/examples/1.8.x/client-android/java/account/delete-identity.md create mode 100644 docs/examples/1.8.x/client-android/java/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-android/java/account/delete-push-target.md create mode 100644 docs/examples/1.8.x/client-android/java/account/delete-session.md create mode 100644 docs/examples/1.8.x/client-android/java/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/client-android/java/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-android/java/account/get-prefs.md create mode 100644 docs/examples/1.8.x/client-android/java/account/get-session.md create mode 100644 docs/examples/1.8.x/client-android/java/account/get.md create mode 100644 docs/examples/1.8.x/client-android/java/account/list-identities.md create mode 100644 docs/examples/1.8.x/client-android/java/account/list-logs.md create mode 100644 docs/examples/1.8.x/client-android/java/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/client-android/java/account/list-sessions.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-email.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-name.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-password.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-phone.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-prefs.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-push-target.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-recovery.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-session.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-status.md create mode 100644 docs/examples/1.8.x/client-android/java/account/update-verification.md create mode 100644 docs/examples/1.8.x/client-android/java/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/client-android/java/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/client-android/java/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/client-android/java/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/client-android/java/avatars/get-image.md create mode 100644 docs/examples/1.8.x/client-android/java/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/client-android/java/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/client-android/java/databases/create-document.md create mode 100644 docs/examples/1.8.x/client-android/java/databases/create-documents.md create mode 100644 docs/examples/1.8.x/client-android/java/databases/delete-document.md create mode 100644 docs/examples/1.8.x/client-android/java/databases/get-document.md create mode 100644 docs/examples/1.8.x/client-android/java/databases/list-documents.md create mode 100644 docs/examples/1.8.x/client-android/java/databases/update-document.md create mode 100644 docs/examples/1.8.x/client-android/java/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/client-android/java/functions/create-execution.md create mode 100644 docs/examples/1.8.x/client-android/java/functions/get-execution.md create mode 100644 docs/examples/1.8.x/client-android/java/functions/list-executions.md create mode 100644 docs/examples/1.8.x/client-android/java/graphql/mutation.md create mode 100644 docs/examples/1.8.x/client-android/java/graphql/query.md create mode 100644 docs/examples/1.8.x/client-android/java/locale/get.md create mode 100644 docs/examples/1.8.x/client-android/java/locale/list-codes.md create mode 100644 docs/examples/1.8.x/client-android/java/locale/list-continents.md create mode 100644 docs/examples/1.8.x/client-android/java/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/client-android/java/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/client-android/java/locale/list-countries.md create mode 100644 docs/examples/1.8.x/client-android/java/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/client-android/java/locale/list-languages.md create mode 100644 docs/examples/1.8.x/client-android/java/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/client-android/java/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/client-android/java/storage/create-file.md create mode 100644 docs/examples/1.8.x/client-android/java/storage/delete-file.md create mode 100644 docs/examples/1.8.x/client-android/java/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/client-android/java/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/client-android/java/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/client-android/java/storage/get-file.md create mode 100644 docs/examples/1.8.x/client-android/java/storage/list-files.md create mode 100644 docs/examples/1.8.x/client-android/java/storage/update-file.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/create-membership.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/create.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/delete.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/get-membership.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/get.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/list.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/update-membership.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/update-name.md create mode 100644 docs/examples/1.8.x/client-android/java/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-email-token.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2session.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-push-target.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-recovery.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-session.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create-verification.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/create.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/delete-identity.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/delete-push-target.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/delete-session.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/get-prefs.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/get-session.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/get.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/list-identities.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/list-logs.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/list-sessions.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-email.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-name.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-password.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-phone.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-prefs.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-push-target.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-recovery.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-session.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-status.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/account/update-verification.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/avatars/get-image.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/databases/create-document.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/databases/create-documents.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/databases/delete-document.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/databases/get-document.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/databases/list-documents.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/databases/update-document.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/functions/get-execution.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/functions/list-executions.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/graphql/mutation.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/graphql/query.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/locale/get.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/locale/list-codes.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/locale/list-continents.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/locale/list-countries.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/locale/list-languages.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/storage/create-file.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/storage/delete-file.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/storage/get-file.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/storage/list-files.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/storage/update-file.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/create-membership.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/create.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/delete.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/get-membership.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/get.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/list.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/update-membership.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/update-name.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-push-target.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/create.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/delete-push-target.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/get.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-push-target.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/client-apple/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/client-apple/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/client-apple/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/client-apple/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/client-apple/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/client-apple/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/client-apple/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/client-apple/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/client-apple/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/client-apple/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/client-apple/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/client-apple/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/client-apple/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/client-apple/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/client-apple/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/client-apple/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/client-apple/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/client-apple/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/client-apple/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/client-apple/examples/locale/get.md create mode 100644 docs/examples/1.8.x/client-apple/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/client-apple/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/client-apple/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/client-apple/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/client-apple/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/client-apple/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/client-apple/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/client-apple/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/client-apple/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/client-apple/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/client-apple/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/client-apple/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/client-apple/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/client-apple/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/client-apple/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/client-apple/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/client-apple/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/create.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/get.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/list.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/client-apple/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-push-target.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/create.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/delete-push-target.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/get.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-push-target.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/locale/get.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/create.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/get.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/list.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-push-target.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/create.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/delete-push-target.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/get.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-push-target.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/locale/get.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/create.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/get.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/list.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-push-target.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/create.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/delete-push-target.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/get.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-push-target.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/locale/get.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/create.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/get.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/list.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-push-target.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/create.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/get.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-push-target.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/client-rest/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/client-rest/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/client-rest/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/client-rest/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/client-rest/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/client-rest/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/client-rest/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/client-rest/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/client-rest/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/client-rest/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/client-rest/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/client-rest/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/client-rest/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/client-rest/examples/locale/get.md create mode 100644 docs/examples/1.8.x/client-rest/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/client-rest/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/client-rest/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/client-rest/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/client-rest/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/client-rest/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/client-rest/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/client-rest/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/client-rest/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/create.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/get.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/list.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-push-target.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/create.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/delete-push-target.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/get.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-push-target.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/client-web/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/client-web/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/client-web/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/client-web/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/client-web/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/client-web/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/client-web/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/client-web/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/client-web/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/client-web/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/client-web/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/client-web/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/client-web/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/client-web/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/client-web/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/client-web/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/client-web/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/client-web/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/client-web/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/client-web/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/client-web/examples/locale/get.md create mode 100644 docs/examples/1.8.x/client-web/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/client-web/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/client-web/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/client-web/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/client-web/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/client-web/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/client-web/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/client-web/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/client-web/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/client-web/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/client-web/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/client-web/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/client-web/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/client-web/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/client-web/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/client-web/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/client-web/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/create.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/get.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/list.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/client-web/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-push-target.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/create.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/delete-push-target.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/delete.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-push-target.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/console-cli/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/console-cli/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/console-cli/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/console-cli/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/console-cli/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/console-cli/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/console-cli/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/console-cli/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/console-cli/examples/console/get-resource.md create mode 100644 docs/examples/1.8.x/console-cli/examples/console/variables.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/create.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/get-collection-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/get-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/list-collection-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/list-document-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/list-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/list-table-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/list-usages.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/list.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/update.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/create.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/get-template.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/get-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/list-templates.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/list-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/list.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/console-cli/examples/functions/update.md create mode 100644 docs/examples/1.8.x/console-cli/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/console-cli/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/console-cli/examples/health/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/locale/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/console-cli/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/console-cli/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/console-cli/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/console-cli/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/console-cli/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/create-appwrite-migration.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/create-csv-migration.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/create-firebase-migration.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/create-n-host-migration.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/create-supabase-migration.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/delete.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/get-appwrite-report.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/get-firebase-report.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/get-n-host-report.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/get-supabase-report.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/list.md create mode 100644 docs/examples/1.8.x/console-cli/examples/migrations/retry.md create mode 100644 docs/examples/1.8.x/console-cli/examples/project/create-variable.md create mode 100644 docs/examples/1.8.x/console-cli/examples/project/delete-variable.md create mode 100644 docs/examples/1.8.x/console-cli/examples/project/get-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/project/get-variable.md create mode 100644 docs/examples/1.8.x/console-cli/examples/project/list-variables.md create mode 100644 docs/examples/1.8.x/console-cli/examples/project/update-variable.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/create-dev-key.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/create-j-w-t.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/create-key.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/create-platform.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/create-smtp-test.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/create-webhook.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/create.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/delete-dev-key.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/delete-email-template.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/delete-key.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/delete-platform.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/delete-sms-template.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/delete-webhook.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/delete.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/get-dev-key.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/get-email-template.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/get-key.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/get-platform.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/get-sms-template.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/get-webhook.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/list-dev-keys.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/list-keys.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/list-platforms.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/list-webhooks.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/list.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-api-status-all.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-api-status.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-auth-duration.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-auth-limit.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-dictionary.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-history.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-auth-sessions-limit.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-auth-status.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-dev-key.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-email-template.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-key.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-memberships-privacy.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-mock-numbers.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-o-auth2.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-personal-data-check.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-platform.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-service-status-all.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-service-status.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-session-alerts.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-session-invalidation.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-sms-template.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-smtp.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-team.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-webhook-signature.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update-webhook.md create mode 100644 docs/examples/1.8.x/console-cli/examples/projects/update.md create mode 100644 docs/examples/1.8.x/console-cli/examples/proxy/create-a-p-i-rule.md create mode 100644 docs/examples/1.8.x/console-cli/examples/proxy/create-function-rule.md create mode 100644 docs/examples/1.8.x/console-cli/examples/proxy/create-redirect-rule.md create mode 100644 docs/examples/1.8.x/console-cli/examples/proxy/create-site-rule.md create mode 100644 docs/examples/1.8.x/console-cli/examples/proxy/delete-rule.md create mode 100644 docs/examples/1.8.x/console-cli/examples/proxy/get-rule.md create mode 100644 docs/examples/1.8.x/console-cli/examples/proxy/list-rules.md create mode 100644 docs/examples/1.8.x/console-cli/examples/proxy/update-rule-verification.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/create.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/get-template.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/get-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/list-templates.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/list-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/list.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/console-cli/examples/sites/update.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/get-bucket-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/get-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/console-cli/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/create.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/list-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/list.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/console-cli/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/create.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/delete.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/get-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/list.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/console-cli/examples/users/update-target.md create mode 100644 docs/examples/1.8.x/console-cli/examples/vcs/create-repository-detection.md create mode 100644 docs/examples/1.8.x/console-cli/examples/vcs/create-repository.md create mode 100644 docs/examples/1.8.x/console-cli/examples/vcs/delete-installation.md create mode 100644 docs/examples/1.8.x/console-cli/examples/vcs/get-installation.md create mode 100644 docs/examples/1.8.x/console-cli/examples/vcs/get-repository-contents.md create mode 100644 docs/examples/1.8.x/console-cli/examples/vcs/get-repository.md create mode 100644 docs/examples/1.8.x/console-cli/examples/vcs/list-installations.md create mode 100644 docs/examples/1.8.x/console-cli/examples/vcs/list-repositories.md create mode 100644 docs/examples/1.8.x/console-cli/examples/vcs/list-repository-branches.md create mode 100644 docs/examples/1.8.x/console-cli/examples/vcs/update-external-deployments.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-o-auth2session.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-push-target.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/create.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/delete-push-target.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/delete.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-push-target.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/console-web/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/console-web/examples/assistant/chat.md create mode 100644 docs/examples/1.8.x/console-web/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/console-web/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/console-web/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/console-web/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/console-web/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/console-web/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/console-web/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/console-web/examples/console/get-resource.md create mode 100644 docs/examples/1.8.x/console-web/examples/console/variables.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/create.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/get-collection-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/get-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/list-collection-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/list-document-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/list-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/list-table-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/list-usages.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/list.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/update.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/create.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/get-template.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/get-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/list-templates.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/list-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/list.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/console-web/examples/functions/update.md create mode 100644 docs/examples/1.8.x/console-web/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/console-web/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/console-web/examples/health/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/locale/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/console-web/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/console-web/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/console-web/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/console-web/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/console-web/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/console-web/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/create-appwrite-migration.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/create-csv-migration.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/create-firebase-migration.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/create-n-host-migration.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/create-supabase-migration.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/delete.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/get-appwrite-report.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/get-firebase-report.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/get-n-host-report.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/get-supabase-report.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/list.md create mode 100644 docs/examples/1.8.x/console-web/examples/migrations/retry.md create mode 100644 docs/examples/1.8.x/console-web/examples/project/create-variable.md create mode 100644 docs/examples/1.8.x/console-web/examples/project/delete-variable.md create mode 100644 docs/examples/1.8.x/console-web/examples/project/get-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/project/get-variable.md create mode 100644 docs/examples/1.8.x/console-web/examples/project/list-variables.md create mode 100644 docs/examples/1.8.x/console-web/examples/project/update-variable.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/create-dev-key.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/create-j-w-t.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/create-key.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/create-platform.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/create-smtp-test.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/create-webhook.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/create.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/delete-dev-key.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/delete-email-template.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/delete-key.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/delete-platform.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/delete-sms-template.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/delete-webhook.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/delete.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/get-dev-key.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/get-email-template.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/get-key.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/get-platform.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/get-sms-template.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/get-webhook.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/list-dev-keys.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/list-keys.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/list-platforms.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/list-webhooks.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/list.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-api-status-all.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-api-status.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-auth-duration.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-auth-limit.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-auth-password-dictionary.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-auth-password-history.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-auth-sessions-limit.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-auth-status.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-dev-key.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-email-template.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-key.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-memberships-privacy.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-mock-numbers.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-o-auth2.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-personal-data-check.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-platform.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-service-status-all.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-service-status.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-session-alerts.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-session-invalidation.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-sms-template.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-smtp.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-team.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-webhook-signature.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update-webhook.md create mode 100644 docs/examples/1.8.x/console-web/examples/projects/update.md create mode 100644 docs/examples/1.8.x/console-web/examples/proxy/create-a-p-i-rule.md create mode 100644 docs/examples/1.8.x/console-web/examples/proxy/create-function-rule.md create mode 100644 docs/examples/1.8.x/console-web/examples/proxy/create-redirect-rule.md create mode 100644 docs/examples/1.8.x/console-web/examples/proxy/create-site-rule.md create mode 100644 docs/examples/1.8.x/console-web/examples/proxy/delete-rule.md create mode 100644 docs/examples/1.8.x/console-web/examples/proxy/get-rule.md create mode 100644 docs/examples/1.8.x/console-web/examples/proxy/list-rules.md create mode 100644 docs/examples/1.8.x/console-web/examples/proxy/update-rule-verification.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/create.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/get-template.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/get-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/list-templates.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/list-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/list.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/console-web/examples/sites/update.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/get-bucket-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/get-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/console-web/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/list.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/create.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/list-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/list.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/console-web/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/console-web/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/console-web/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/console-web/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/console-web/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/create.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/delete.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/get-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/list.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/console-web/examples/users/update-target.md create mode 100644 docs/examples/1.8.x/console-web/examples/vcs/create-repository-detection.md create mode 100644 docs/examples/1.8.x/console-web/examples/vcs/create-repository.md create mode 100644 docs/examples/1.8.x/console-web/examples/vcs/delete-installation.md create mode 100644 docs/examples/1.8.x/console-web/examples/vcs/get-installation.md create mode 100644 docs/examples/1.8.x/console-web/examples/vcs/get-repository-contents.md create mode 100644 docs/examples/1.8.x/console-web/examples/vcs/get-repository.md create mode 100644 docs/examples/1.8.x/console-web/examples/vcs/list-installations.md create mode 100644 docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md create mode 100644 docs/examples/1.8.x/console-web/examples/vcs/list-repository-branches.md create mode 100644 docs/examples/1.8.x/console-web/examples/vcs/update-external-deployments.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/create.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/get.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/server-dart/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-dart/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-dart/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-dart/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-dart/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-dart/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-dart/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-dart/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/create.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/get.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/list.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/update.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/create.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/get.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/list.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-dart/examples/functions/update.md create mode 100644 docs/examples/1.8.x/server-dart/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/server-dart/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/server-dart/examples/health/get.md create mode 100644 docs/examples/1.8.x/server-dart/examples/locale/get.md create mode 100644 docs/examples/1.8.x/server-dart/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-dart/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-dart/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-dart/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-dart/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-dart/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/create.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/get.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/list.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-dart/examples/sites/update.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-dart/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/create.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/get.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/list.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-dart/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/create.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/delete.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/get.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/list.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/server-dart/examples/users/update-target.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/create.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/get.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/server-deno/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-deno/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-deno/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-deno/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-deno/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-deno/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-deno/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-deno/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/create.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/get.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/list.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/update.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/create.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/get.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/list.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-deno/examples/functions/update.md create mode 100644 docs/examples/1.8.x/server-deno/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/server-deno/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/server-deno/examples/health/get.md create mode 100644 docs/examples/1.8.x/server-deno/examples/locale/get.md create mode 100644 docs/examples/1.8.x/server-deno/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-deno/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-deno/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-deno/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-deno/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-deno/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/create.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/get.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/list.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-deno/examples/sites/update.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-deno/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/create.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/get.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/list.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-deno/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/create.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/delete.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/get.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/list.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/server-deno/examples/users/update-target.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/create.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/get.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/create.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/get.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/list.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/update.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/create.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/get.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/list.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/functions/update.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/health/get.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/locale/get.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/create.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/get.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/list.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/sites/update.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/create.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/get.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/list.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/create.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/delete.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/get.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/list.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/users/update-target.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/create.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/get.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/server-go/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-go/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-go/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-go/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-go/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-go/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-go/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-go/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/create.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/get.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/list.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/update.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/create.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/get.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/list.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-go/examples/functions/update.md create mode 100644 docs/examples/1.8.x/server-go/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/server-go/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/server-go/examples/health/get.md create mode 100644 docs/examples/1.8.x/server-go/examples/locale/get.md create mode 100644 docs/examples/1.8.x/server-go/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-go/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-go/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-go/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-go/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-go/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-go/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/create.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/get.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/list.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-go/examples/sites/update.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-go/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/create.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/get.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/list.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-go/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-go/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-go/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-go/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/server-go/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/server-go/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/create.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/delete.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/get.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/list.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/server-go/examples/users/update-target.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/create.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/get.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/create.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/get.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/list.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/update.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/create.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/get.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/list.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/functions/update.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/health/get.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/locale/get.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/create.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/get.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/list.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/sites/update.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/create.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/get.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/list.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/create.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/delete.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/get.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/list.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/users/update-target.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/get-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-email.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-name.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-password.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-status.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/update.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/functions/update.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/graphql/mutation.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/graphql/query.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get-time.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/health/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/locale/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/sites/update.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tokens/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tokens/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tokens/update.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create-target.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create-token.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/get-target.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/update-email.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/update-name.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/update-password.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/update-status.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/users/update-target.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/get-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-email.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-name.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-password.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-status.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/update.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/functions/update.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/graphql/mutation.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/graphql/query.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get-time.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/health/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/locale/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/sites/update.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tokens/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tokens/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tokens/update.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create-target.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create-token.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/get-target.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/update-email.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/update-name.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/update-password.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/update-status.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/users/update-target.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/create.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/get.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/create.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/get.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/list.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/update.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/create.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/get.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/list.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/functions/update.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/health/get.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/locale/get.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/create.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/get.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/list.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/sites/update.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/create.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/get.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/list.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/create.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/delete.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/get.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/list.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/users/update-target.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/create.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/get.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/server-php/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-php/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-php/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-php/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-php/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-php/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-php/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-php/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/create.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/get.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/list.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/update.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/create.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/get.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/list.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-php/examples/functions/update.md create mode 100644 docs/examples/1.8.x/server-php/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/server-php/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/server-php/examples/health/get.md create mode 100644 docs/examples/1.8.x/server-php/examples/locale/get.md create mode 100644 docs/examples/1.8.x/server-php/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-php/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-php/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-php/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-php/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-php/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-php/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/create.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/get.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/list.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-php/examples/sites/update.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-php/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/create.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/get.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/list.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-php/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-php/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-php/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-php/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/server-php/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/server-php/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/create.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/delete.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/get.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/list.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/server-php/examples/users/update-target.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/create.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/get.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/server-python/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-python/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-python/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-python/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-python/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-python/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-python/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-python/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/create.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/get.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/list.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/update.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/create.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/get.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/list.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-python/examples/functions/update.md create mode 100644 docs/examples/1.8.x/server-python/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/server-python/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/server-python/examples/health/get.md create mode 100644 docs/examples/1.8.x/server-python/examples/locale/get.md create mode 100644 docs/examples/1.8.x/server-python/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-python/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-python/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-python/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-python/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-python/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-python/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/create.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/get.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/list.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-python/examples/sites/update.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-python/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/create.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/get.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/list.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-python/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-python/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-python/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-python/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/server-python/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/server-python/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/create.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/delete.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/get.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/list.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/server-python/examples/users/update-target.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/create.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/get.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/server-rest/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-rest/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/create.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/get.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/list.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/update.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/create.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/get.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/list.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-rest/examples/functions/update.md create mode 100644 docs/examples/1.8.x/server-rest/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/server-rest/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/server-rest/examples/health/get.md create mode 100644 docs/examples/1.8.x/server-rest/examples/locale/get.md create mode 100644 docs/examples/1.8.x/server-rest/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-rest/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-rest/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/create.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/get.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/list.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-rest/examples/sites/update.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-rest/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/create.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/get.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/list.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/create.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/delete.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/get.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/list.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/server-rest/examples/users/update-target.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/create.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/get.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/create.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/get.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/list.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/update.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/create.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/get.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/list.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/functions/update.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/health/get.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/locale/get.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/create.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/get.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/list.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/sites/update.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/create.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/get.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/list.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/create.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/delete.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/get.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/list.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/users/update-target.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-anonymous-session.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-email-password-session.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-email-token.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-magic-u-r-l-token.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-o-auth2token.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-phone-token.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-phone-verification.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-recovery.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-session.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create-verification.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/create.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/delete-identity.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/delete-session.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/get-prefs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/get-session.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/get.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/list-identities.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/list-logs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/list-sessions.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-email.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-m-f-a.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-magic-u-r-l-session.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-mfa-challenge.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-name.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-password.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-phone-session.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-phone.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-prefs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-recovery.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-session.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-status.md create mode 100644 docs/examples/1.8.x/server-swift/examples/account/update-verification.md create mode 100644 docs/examples/1.8.x/server-swift/examples/avatars/get-browser.md create mode 100644 docs/examples/1.8.x/server-swift/examples/avatars/get-credit-card.md create mode 100644 docs/examples/1.8.x/server-swift/examples/avatars/get-favicon.md create mode 100644 docs/examples/1.8.x/server-swift/examples/avatars/get-flag.md create mode 100644 docs/examples/1.8.x/server-swift/examples/avatars/get-image.md create mode 100644 docs/examples/1.8.x/server-swift/examples/avatars/get-initials.md create mode 100644 docs/examples/1.8.x/server-swift/examples/avatars/get-q-r.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-collection.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-document.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-documents.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-email-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-float-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-string-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create-url-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/create.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/decrement-document-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/delete-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/delete-collection.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/delete-document.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/delete-documents.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/delete-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/delete.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/get-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/get-collection.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/get-document.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/get-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/get.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/increment-document-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/list-attributes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/list-collections.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/list-documents.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/list-indexes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/list.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-boolean-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-collection.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-datetime-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-document.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-documents.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-email-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-enum-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-float-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-integer-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-ip-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-relationship-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-string-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update-url-attribute.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/update.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md create mode 100644 docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/create-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/create-execution.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/create-variable.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/create.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/delete-execution.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/delete-variable.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/delete.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/get-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/get-execution.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/get-variable.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/get.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/list-deployments.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/list-executions.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/list-runtimes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/list-specifications.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/list-variables.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/list.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/update-function-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/update-variable.md create mode 100644 docs/examples/1.8.x/server-swift/examples/functions/update.md create mode 100644 docs/examples/1.8.x/server-swift/examples/graphql/mutation.md create mode 100644 docs/examples/1.8.x/server-swift/examples/graphql/query.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-antivirus.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-cache.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-certificate.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-d-b.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-failed-jobs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-pub-sub.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-queue-builds.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-queue-certificates.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-queue-databases.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-queue-deletes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-queue-functions.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-queue-logs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-queue-mails.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-queue-messaging.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-queue-migrations.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-queue-stats-resources.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-queue-usage.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-queue-webhooks.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-storage-local.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-storage.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get-time.md create mode 100644 docs/examples/1.8.x/server-swift/examples/health/get.md create mode 100644 docs/examples/1.8.x/server-swift/examples/locale/get.md create mode 100644 docs/examples/1.8.x/server-swift/examples/locale/list-codes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/locale/list-continents.md create mode 100644 docs/examples/1.8.x/server-swift/examples/locale/list-countries-e-u.md create mode 100644 docs/examples/1.8.x/server-swift/examples/locale/list-countries-phones.md create mode 100644 docs/examples/1.8.x/server-swift/examples/locale/list-countries.md create mode 100644 docs/examples/1.8.x/server-swift/examples/locale/list-currencies.md create mode 100644 docs/examples/1.8.x/server-swift/examples/locale/list-languages.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-apns-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-email.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-msg91provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-push.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-sms.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-subscriber.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-topic.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/create-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/delete-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/delete-subscriber.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/delete-topic.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/delete.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/get-message.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/get-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/get-subscriber.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/get-topic.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/list-message-logs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/list-messages.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/list-provider-logs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/list-providers.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/list-subscriber-logs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/list-subscribers.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/list-targets.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/list-topic-logs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/list-topics.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-apns-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-email.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-fcm-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-mailgun-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-msg91provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-push.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-sendgrid-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-sms.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-smtp-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-telesign-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-textmagic-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-topic.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-twilio-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/messaging/update-vonage-provider.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/create-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/create-duplicate-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/create-template-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/create-variable.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/create-vcs-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/create.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/delete-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/delete-log.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/delete-variable.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/delete.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/get-deployment-download.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/get-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/get-log.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/get-variable.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/get.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/list-deployments.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/list-frameworks.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/list-logs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/list-specifications.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/list-variables.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/list.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/update-deployment-status.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/update-site-deployment.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/update-variable.md create mode 100644 docs/examples/1.8.x/server-swift/examples/sites/update.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/create-file.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/delete-bucket.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/delete-file.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/get-bucket.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/get-file-download.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/get-file-preview.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/get-file-view.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/get-file.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/list-buckets.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/list-files.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md create mode 100644 docs/examples/1.8.x/server-swift/examples/storage/update-file.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/create-membership.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/create.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/delete-membership.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/delete.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/get-membership.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/get-prefs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/get.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/list-memberships.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/list.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/update-membership-status.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/update-membership.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/update-name.md create mode 100644 docs/examples/1.8.x/server-swift/examples/teams/update-prefs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tokens/create-file-token.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tokens/delete.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tokens/get.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tokens/list.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tokens/update.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create-argon2user.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create-bcrypt-user.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create-j-w-t.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create-m-d5user.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create-p-h-pass-user.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create-s-h-a-user.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create-scrypt-modified-user.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create-scrypt-user.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create-session.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create-target.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create-token.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/create.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/delete-identity.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/delete-mfa-authenticator.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/delete-session.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/delete-sessions.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/delete-target.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/delete.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/get-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/get-prefs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/get-target.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/get.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/list-identities.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/list-logs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/list-memberships.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/list-mfa-factors.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/list-sessions.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/list-targets.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/list.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/update-email-verification.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/update-email.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/update-labels.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/update-mfa-recovery-codes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/update-mfa.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/update-name.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/update-password.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/update-phone-verification.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/update-phone.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/update-prefs.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/update-status.md create mode 100644 docs/examples/1.8.x/server-swift/examples/users/update-target.md diff --git a/docs/examples/1.8.x/client-android/java/account/create-anonymous-session.md b/docs/examples/1.8.x/client-android/java/account/create-anonymous-session.md new file mode 100644 index 0000000000..9d805882b8 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-anonymous-session.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createAnonymousSession(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/create-email-password-session.md b/docs/examples/1.8.x/client-android/java/account/create-email-password-session.md new file mode 100644 index 0000000000..428b6fddb6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-email-password-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createEmailPasswordSession( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-email-token.md b/docs/examples/1.8.x/client-android/java/account/create-email-token.md new file mode 100644 index 0000000000..869f4a8991 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-email-token.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createEmailToken( + "", // userId + "email@example.com", // email + false, // phrase (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-j-w-t.md b/docs/examples/1.8.x/client-android/java/account/create-j-w-t.md new file mode 100644 index 0000000000..9e3bd287f3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-j-w-t.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createJWT(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-android/java/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..6253e00d58 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-magic-u-r-l-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMagicURLToken( + "", // userId + "email@example.com", // email + "https://example.com", // url (optional) + false, // phrase (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-android/java/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..54781f2dc8 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-mfa-authenticator.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMfaAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-android/java/account/create-mfa-challenge.md new file mode 100644 index 0000000000..87a56fe350 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-mfa-challenge.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticationFactor; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMfaChallenge( + AuthenticationFactor.EMAIL, // factor + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/java/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..ab50734215 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-mfa-recovery-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/create-o-auth2session.md b/docs/examples/1.8.x/client-android/java/account/create-o-auth2session.md new file mode 100644 index 0000000000..4420859ce3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-o-auth2session.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.OAuthProvider; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.AMAZON, // provider + "https://example.com", // success (optional) + "https://example.com", // failure (optional) + listOf(), // scopes (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-o-auth2token.md b/docs/examples/1.8.x/client-android/java/account/create-o-auth2token.md new file mode 100644 index 0000000000..e5590c8ceb --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-o-auth2token.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.OAuthProvider; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.AMAZON, // provider + "https://example.com", // success (optional) + "https://example.com", // failure (optional) + listOf(), // scopes (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-phone-token.md b/docs/examples/1.8.x/client-android/java/account/create-phone-token.md new file mode 100644 index 0000000000..19d90b3475 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-phone-token.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createPhoneToken( + "", // userId + "+12065550100", // phone + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-phone-verification.md b/docs/examples/1.8.x/client-android/java/account/create-phone-verification.md new file mode 100644 index 0000000000..8c16b6c268 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-phone-verification.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createPhoneVerification(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/create-push-target.md b/docs/examples/1.8.x/client-android/java/account/create-push-target.md new file mode 100644 index 0000000000..d434a5c6f6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-push-target.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createPushTarget( + "", // targetId + "", // identifier + "", // providerId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-recovery.md b/docs/examples/1.8.x/client-android/java/account/create-recovery.md new file mode 100644 index 0000000000..5592c6eb66 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-recovery.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createRecovery( + "email@example.com", // email + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-session.md b/docs/examples/1.8.x/client-android/java/account/create-session.md new file mode 100644 index 0000000000..0c59a802b1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createSession( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create-verification.md b/docs/examples/1.8.x/client-android/java/account/create-verification.md new file mode 100644 index 0000000000..e91acc85f9 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create-verification.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.createVerification( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/create.md b/docs/examples/1.8.x/client-android/java/account/create.md new file mode 100644 index 0000000000..ad04805ce3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.create( + "", // userId + "email@example.com", // email + "", // password + "", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/delete-identity.md b/docs/examples/1.8.x/client-android/java/account/delete-identity.md new file mode 100644 index 0000000000..d556722769 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/delete-identity.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteIdentity( + "", // identityId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-android/java/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..4a9693bf8c --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/delete-mfa-authenticator.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteMfaAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/delete-push-target.md b/docs/examples/1.8.x/client-android/java/account/delete-push-target.md new file mode 100644 index 0000000000..00ab902792 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/delete-push-target.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deletePushTarget( + "", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/delete-session.md b/docs/examples/1.8.x/client-android/java/account/delete-session.md new file mode 100644 index 0000000000..99d2f8e888 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/delete-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteSession( + "", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/delete-sessions.md b/docs/examples/1.8.x/client-android/java/account/delete-sessions.md new file mode 100644 index 0000000000..e93f3e33ac --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/delete-sessions.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.deleteSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/java/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..8274bb351a --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/get-mfa-recovery-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/get-prefs.md b/docs/examples/1.8.x/client-android/java/account/get-prefs.md new file mode 100644 index 0000000000..5bb11a4a95 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/get-prefs.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getPrefs(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/get-session.md b/docs/examples/1.8.x/client-android/java/account/get-session.md new file mode 100644 index 0000000000..288cd3b3ba --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/get-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.getSession( + "", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/get.md b/docs/examples/1.8.x/client-android/java/account/get.md new file mode 100644 index 0000000000..6b5eb3b7fa --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/get.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/list-identities.md b/docs/examples/1.8.x/client-android/java/account/list-identities.md new file mode 100644 index 0000000000..d4a6f9f31d --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/list-identities.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listIdentities( + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/list-logs.md b/docs/examples/1.8.x/client-android/java/account/list-logs.md new file mode 100644 index 0000000000..951a479f98 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/list-logs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listLogs( + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/list-mfa-factors.md b/docs/examples/1.8.x/client-android/java/account/list-mfa-factors.md new file mode 100644 index 0000000000..9ea8331620 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/list-mfa-factors.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listMfaFactors(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/list-sessions.md b/docs/examples/1.8.x/client-android/java/account/list-sessions.md new file mode 100644 index 0000000000..8946d96e7c --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/list-sessions.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.listSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/update-email.md b/docs/examples/1.8.x/client-android/java/account/update-email.md new file mode 100644 index 0000000000..ac80e451d0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-email.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateEmail( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-m-f-a.md b/docs/examples/1.8.x/client-android/java/account/update-m-f-a.md new file mode 100644 index 0000000000..b765cda94a --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-m-f-a.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMFA( + false, // mfa + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-android/java/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..5893aa6e6b --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-magic-u-r-l-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMagicURLSession( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-android/java/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..b8016e75f2 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-mfa-authenticator.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMfaAuthenticator( + AuthenticatorType.TOTP, // type + "", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-android/java/account/update-mfa-challenge.md new file mode 100644 index 0000000000..c6401504d8 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-mfa-challenge.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMfaChallenge( + "", // challengeId + "", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/java/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..650ae24128 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-mfa-recovery-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/update-name.md b/docs/examples/1.8.x/client-android/java/account/update-name.md new file mode 100644 index 0000000000..47582c2b30 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-name.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateName( + "", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-password.md b/docs/examples/1.8.x/client-android/java/account/update-password.md new file mode 100644 index 0000000000..09f572eb31 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-password.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePassword( + "", // password + "password", // oldPassword (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-phone-session.md b/docs/examples/1.8.x/client-android/java/account/update-phone-session.md new file mode 100644 index 0000000000..2e1b880017 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-phone-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePhoneSession( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-phone-verification.md b/docs/examples/1.8.x/client-android/java/account/update-phone-verification.md new file mode 100644 index 0000000000..f93ae6906f --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-phone-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePhoneVerification( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-phone.md b/docs/examples/1.8.x/client-android/java/account/update-phone.md new file mode 100644 index 0000000000..fae9bfaaec --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-phone.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePhone( + "+12065550100", // phone + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-prefs.md b/docs/examples/1.8.x/client-android/java/account/update-prefs.md new file mode 100644 index 0000000000..f1a16c7de0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-prefs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePrefs( + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-push-target.md b/docs/examples/1.8.x/client-android/java/account/update-push-target.md new file mode 100644 index 0000000000..197a9095a7 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-push-target.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updatePushTarget( + "", // targetId + "", // identifier + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-recovery.md b/docs/examples/1.8.x/client-android/java/account/update-recovery.md new file mode 100644 index 0000000000..953bde4f26 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-recovery.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateRecovery( + "", // userId + "", // secret + "", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-session.md b/docs/examples/1.8.x/client-android/java/account/update-session.md new file mode 100644 index 0000000000..ed82840836 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-session.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateSession( + "", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/account/update-status.md b/docs/examples/1.8.x/client-android/java/account/update-status.md new file mode 100644 index 0000000000..9a283c092c --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-status.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateStatus(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/account/update-verification.md b/docs/examples/1.8.x/client-android/java/account/update-verification.md new file mode 100644 index 0000000000..caa3869e25 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/account/update-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Account account = new Account(client); + +account.updateVerification( + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-browser.md b/docs/examples/1.8.x/client-android/java/avatars/get-browser.md new file mode 100644 index 0000000000..1b6632f30a --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-browser.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Browser; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getBrowser( + Browser.AVANT_BROWSER, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-credit-card.md b/docs/examples/1.8.x/client-android/java/avatars/get-credit-card.md new file mode 100644 index 0000000000..e2ac2c26cd --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-credit-card.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.CreditCard; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getCreditCard( + CreditCard.AMERICAN_EXPRESS, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-favicon.md b/docs/examples/1.8.x/client-android/java/avatars/get-favicon.md new file mode 100644 index 0000000000..70373a607b --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-favicon.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getFavicon( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-flag.md b/docs/examples/1.8.x/client-android/java/avatars/get-flag.md new file mode 100644 index 0000000000..689e27fe35 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-flag.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Flag; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getFlag( + Flag.AFGHANISTAN, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-image.md b/docs/examples/1.8.x/client-android/java/avatars/get-image.md new file mode 100644 index 0000000000..71a90dd1c2 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-image.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getImage( + "https://example.com", // url + 0, // width (optional) + 0, // height (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-initials.md b/docs/examples/1.8.x/client-android/java/avatars/get-initials.md new file mode 100644 index 0000000000..ca16ee7e36 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-initials.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getInitials( + "", // name (optional) + 0, // width (optional) + 0, // height (optional) + "", // background (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/avatars/get-q-r.md b/docs/examples/1.8.x/client-android/java/avatars/get-q-r.md new file mode 100644 index 0000000000..781acf6741 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/avatars/get-q-r.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.getQR( + "", // text + 1, // size (optional) + 0, // margin (optional) + false, // download (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/create-document.md b/docs/examples/1.8.x/client-android/java/databases/create-document.md new file mode 100644 index 0000000000..7fb129bb0b --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/create-document.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT(""); // Your secret JSON Web Token + +Databases databases = new Databases(client); + +databases.createDocument( + "", // databaseId + "", // collectionId + "", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/create-documents.md b/docs/examples/1.8.x/client-android/java/databases/create-documents.md new file mode 100644 index 0000000000..d5629b803f --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/create-documents.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey(""); // + +Databases databases = new Databases(client); + +databases.createDocuments( + "", // databaseId + "", // collectionId + listOf(), // documents + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/delete-document.md b/docs/examples/1.8.x/client-android/java/databases/delete-document.md new file mode 100644 index 0000000000..5288e53bed --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/delete-document.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.deleteDocument( + "", // databaseId + "", // collectionId + "", // documentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/get-document.md b/docs/examples/1.8.x/client-android/java/databases/get-document.md new file mode 100644 index 0000000000..e7ae2079ed --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/get-document.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.getDocument( + "", // databaseId + "", // collectionId + "", // documentId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/list-documents.md b/docs/examples/1.8.x/client-android/java/databases/list-documents.md new file mode 100644 index 0000000000..606d67705d --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/list-documents.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.listDocuments( + "", // databaseId + "", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/update-document.md b/docs/examples/1.8.x/client-android/java/databases/update-document.md new file mode 100644 index 0000000000..baa827cdf5 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/update-document.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Databases databases = new Databases(client); + +databases.updateDocument( + "", // databaseId + "", // collectionId + "", // documentId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/databases/upsert-document.md b/docs/examples/1.8.x/client-android/java/databases/upsert-document.md new file mode 100644 index 0000000000..ba7336f3f9 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/databases/upsert-document.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT(""); // Your secret JSON Web Token + +Databases databases = new Databases(client); + +databases.upsertDocument( + "", // databaseId + "", // collectionId + "", // documentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/functions/create-execution.md b/docs/examples/1.8.x/client-android/java/functions/create-execution.md new file mode 100644 index 0000000000..c138b0ef86 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/functions/create-execution.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Functions functions = new Functions(client); + +functions.createExecution( + "", // functionId + "", // body (optional) + false, // async (optional) + "", // path (optional) + ExecutionMethod.GET, // method (optional) + mapOf( "a" to "b" ), // headers (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/functions/get-execution.md b/docs/examples/1.8.x/client-android/java/functions/get-execution.md new file mode 100644 index 0000000000..f3195fa126 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/functions/get-execution.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Functions functions = new Functions(client); + +functions.getExecution( + "", // functionId + "", // executionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/functions/list-executions.md b/docs/examples/1.8.x/client-android/java/functions/list-executions.md new file mode 100644 index 0000000000..0270cf0ead --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/functions/list-executions.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Functions functions = new Functions(client); + +functions.listExecutions( + "", // functionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/graphql/mutation.md b/docs/examples/1.8.x/client-android/java/graphql/mutation.md new file mode 100644 index 0000000000..25f095e1b1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/graphql/mutation.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Graphql graphql = new Graphql(client); + +graphql.mutation( + mapOf( "a" to "b" ), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/graphql/query.md b/docs/examples/1.8.x/client-android/java/graphql/query.md new file mode 100644 index 0000000000..6b2a04d0b6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/graphql/query.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Graphql graphql = new Graphql(client); + +graphql.query( + mapOf( "a" to "b" ), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/locale/get.md b/docs/examples/1.8.x/client-android/java/locale/get.md new file mode 100644 index 0000000000..89e1e88b26 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/get.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-codes.md b/docs/examples/1.8.x/client-android/java/locale/list-codes.md new file mode 100644 index 0000000000..85a96fce77 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-codes.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-continents.md b/docs/examples/1.8.x/client-android/java/locale/list-continents.md new file mode 100644 index 0000000000..6f4572d572 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-continents.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listContinents(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-android/java/locale/list-countries-e-u.md new file mode 100644 index 0000000000..51458a929d --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-countries-e-u.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-countries-phones.md b/docs/examples/1.8.x/client-android/java/locale/list-countries-phones.md new file mode 100644 index 0000000000..93438d2130 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-countries-phones.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-countries.md b/docs/examples/1.8.x/client-android/java/locale/list-countries.md new file mode 100644 index 0000000000..5cd5525e93 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-countries.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCountries(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-currencies.md b/docs/examples/1.8.x/client-android/java/locale/list-currencies.md new file mode 100644 index 0000000000..d3ef02c865 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-currencies.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listCurrencies(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/locale/list-languages.md b/docs/examples/1.8.x/client-android/java/locale/list-languages.md new file mode 100644 index 0000000000..0d724943a9 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/locale/list-languages.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Locale locale = new Locale(client); + +locale.listLanguages(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); diff --git a/docs/examples/1.8.x/client-android/java/messaging/create-subscriber.md b/docs/examples/1.8.x/client-android/java/messaging/create-subscriber.md new file mode 100644 index 0000000000..5616435ab5 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/messaging/create-subscriber.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Messaging messaging = new Messaging(client); + +messaging.createSubscriber( + "", // topicId + "", // subscriberId + "", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-android/java/messaging/delete-subscriber.md new file mode 100644 index 0000000000..9adae5e7df --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/messaging/delete-subscriber.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Messaging messaging = new Messaging(client); + +messaging.deleteSubscriber( + "", // topicId + "", // subscriberId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/create-file.md b/docs/examples/1.8.x/client-android/java/storage/create-file.md new file mode 100644 index 0000000000..598e683150 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/create-file.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.createFile( + "", // bucketId + "", // fileId + InputFile.fromPath("file.png"), // file + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/delete-file.md b/docs/examples/1.8.x/client-android/java/storage/delete-file.md new file mode 100644 index 0000000000..5c63ae7cd5 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/delete-file.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.deleteFile( + "", // bucketId + "", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/get-file-download.md b/docs/examples/1.8.x/client-android/java/storage/get-file-download.md new file mode 100644 index 0000000000..73a8617fdd --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/get-file-download.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFileDownload( + "", // bucketId + "", // fileId + "", // token (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/get-file-preview.md b/docs/examples/1.8.x/client-android/java/storage/get-file-preview.md new file mode 100644 index 0000000000..67b92ebf85 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/get-file-preview.md @@ -0,0 +1,35 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFilePreview( + "", // bucketId + "", // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.CENTER, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + "", // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + "", // background (optional) + ImageFormat.JPG, // output (optional) + "", // token (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/get-file-view.md b/docs/examples/1.8.x/client-android/java/storage/get-file-view.md new file mode 100644 index 0000000000..b042b1f451 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/get-file-view.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFileView( + "", // bucketId + "", // fileId + "", // token (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/get-file.md b/docs/examples/1.8.x/client-android/java/storage/get-file.md new file mode 100644 index 0000000000..c9cc00d8f7 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/get-file.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.getFile( + "", // bucketId + "", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/list-files.md b/docs/examples/1.8.x/client-android/java/storage/list-files.md new file mode 100644 index 0000000000..a87286c6d6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/list-files.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.listFiles( + "", // bucketId + listOf(), // queries (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/storage/update-file.md b/docs/examples/1.8.x/client-android/java/storage/update-file.md new file mode 100644 index 0000000000..14fa77939d --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/storage/update-file.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Storage storage = new Storage(client); + +storage.updateFile( + "", // bucketId + "", // fileId + "", // name (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/create-row.md b/docs/examples/1.8.x/client-android/java/tables/create-row.md new file mode 100644 index 0000000000..8102b82c75 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/create-row.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT(""); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.createRow( + "", // databaseId + "", // tableId + "", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/create-rows.md b/docs/examples/1.8.x/client-android/java/tables/create-rows.md new file mode 100644 index 0000000000..26f5d67789 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/create-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey(""); // + +Tables tables = new Tables(client); + +tables.createRows( + "", // databaseId + "", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/delete-row.md b/docs/examples/1.8.x/client-android/java/tables/delete-row.md new file mode 100644 index 0000000000..596a8b7aca --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/delete-row.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tables tables = new Tables(client); + +tables.deleteRow( + "", // databaseId + "", // tableId + "", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/get-row.md b/docs/examples/1.8.x/client-android/java/tables/get-row.md new file mode 100644 index 0000000000..882a195376 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/get-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tables tables = new Tables(client); + +tables.getRow( + "", // databaseId + "", // tableId + "", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/list-rows.md b/docs/examples/1.8.x/client-android/java/tables/list-rows.md new file mode 100644 index 0000000000..4d37570246 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/list-rows.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tables tables = new Tables(client); + +tables.listRows( + "", // databaseId + "", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/update-row.md b/docs/examples/1.8.x/client-android/java/tables/update-row.md new file mode 100644 index 0000000000..0421c9cffb --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/update-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Tables tables = new Tables(client); + +tables.updateRow( + "", // databaseId + "", // tableId + "", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/upsert-row.md b/docs/examples/1.8.x/client-android/java/tables/upsert-row.md new file mode 100644 index 0000000000..a8be0cfc6c --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/upsert-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT(""); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.upsertRow( + "", // databaseId + "", // tableId + "", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/create-membership.md b/docs/examples/1.8.x/client-android/java/teams/create-membership.md new file mode 100644 index 0000000000..bb5293ef63 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/create-membership.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.createMembership( + "", // teamId + listOf(), // roles + "email@example.com", // email (optional) + "", // userId (optional) + "+12065550100", // phone (optional) + "https://example.com", // url (optional) + "", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/create.md b/docs/examples/1.8.x/client-android/java/teams/create.md new file mode 100644 index 0000000000..ae2fdf32c8 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/create.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.create( + "", // teamId + "", // name + listOf(), // roles (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/delete-membership.md b/docs/examples/1.8.x/client-android/java/teams/delete-membership.md new file mode 100644 index 0000000000..c8bb088cc6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/delete-membership.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.deleteMembership( + "", // teamId + "", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/delete.md b/docs/examples/1.8.x/client-android/java/teams/delete.md new file mode 100644 index 0000000000..74f6a4f997 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/delete.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.delete( + "", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/get-membership.md b/docs/examples/1.8.x/client-android/java/teams/get-membership.md new file mode 100644 index 0000000000..e9dc5786d6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/get-membership.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.getMembership( + "", // teamId + "", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/get-prefs.md b/docs/examples/1.8.x/client-android/java/teams/get-prefs.md new file mode 100644 index 0000000000..8ba14355a1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/get-prefs.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.getPrefs( + "", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/get.md b/docs/examples/1.8.x/client-android/java/teams/get.md new file mode 100644 index 0000000000..f00057a822 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/get.md @@ -0,0 +1,22 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.get( + "", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/list-memberships.md b/docs/examples/1.8.x/client-android/java/teams/list-memberships.md new file mode 100644 index 0000000000..216ca40e6d --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/list-memberships.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.listMemberships( + "", // teamId + listOf(), // queries (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/list.md b/docs/examples/1.8.x/client-android/java/teams/list.md new file mode 100644 index 0000000000..b69f21ed43 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/list.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.list( + listOf(), // queries (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/update-membership-status.md b/docs/examples/1.8.x/client-android/java/teams/update-membership-status.md new file mode 100644 index 0000000000..4b31ed55ec --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/update-membership-status.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateMembershipStatus( + "", // teamId + "", // membershipId + "", // userId + "", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/update-membership.md b/docs/examples/1.8.x/client-android/java/teams/update-membership.md new file mode 100644 index 0000000000..481be43107 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/update-membership.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateMembership( + "", // teamId + "", // membershipId + listOf(), // roles + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/update-name.md b/docs/examples/1.8.x/client-android/java/teams/update-name.md new file mode 100644 index 0000000000..207bcc81e3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/update-name.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateName( + "", // teamId + "", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/teams/update-prefs.md b/docs/examples/1.8.x/client-android/java/teams/update-prefs.md new file mode 100644 index 0000000000..5a0186ff31 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/teams/update-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updatePrefs( + "", // teamId + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-anonymous-session.md b/docs/examples/1.8.x/client-android/kotlin/account/create-anonymous-session.md new file mode 100644 index 0000000000..d2966a18cd --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createAnonymousSession() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-email-password-session.md b/docs/examples/1.8.x/client-android/kotlin/account/create-email-password-session.md new file mode 100644 index 0000000000..a327cf280e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createEmailPasswordSession( + email = "email@example.com", + password = "password", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-email-token.md b/docs/examples/1.8.x/client-android/kotlin/account/create-email-token.md new file mode 100644 index 0000000000..37c9e1b380 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-email-token.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createEmailToken( + userId = "", + email = "email@example.com", + phrase = false, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-j-w-t.md b/docs/examples/1.8.x/client-android/kotlin/account/create-j-w-t.md new file mode 100644 index 0000000000..c87eaf3128 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createJWT() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-android/kotlin/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..76f4c91884 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMagicURLToken( + userId = "", + email = "email@example.com", + url = "https://example.com", // (optional) + phrase = false, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..ffb2f2f9bf --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-authenticator.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMfaAuthenticator( + type = AuthenticatorType.TOTP, +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-challenge.md new file mode 100644 index 0000000000..36b12d3f98 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticationFactor + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMfaChallenge( + factor = AuthenticationFactor.EMAIL, +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..974c8f25a0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createMfaRecoveryCodes() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2session.md b/docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2session.md new file mode 100644 index 0000000000..61ea634ad7 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2session.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.OAuthProvider + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +account.createOAuth2Session( + provider = OAuthProvider.AMAZON, + success = "https://example.com", // (optional) + failure = "https://example.com", // (optional) + scopes = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2token.md b/docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2token.md new file mode 100644 index 0000000000..cdd2ef3445 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-o-auth2token.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.OAuthProvider + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +account.createOAuth2Token( + provider = OAuthProvider.AMAZON, + success = "https://example.com", // (optional) + failure = "https://example.com", // (optional) + scopes = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-phone-token.md b/docs/examples/1.8.x/client-android/kotlin/account/create-phone-token.md new file mode 100644 index 0000000000..4eb1a9ac4e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-phone-token.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createPhoneToken( + userId = "", + phone = "+12065550100", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-phone-verification.md b/docs/examples/1.8.x/client-android/kotlin/account/create-phone-verification.md new file mode 100644 index 0000000000..f7594668fa --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createPhoneVerification() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-push-target.md b/docs/examples/1.8.x/client-android/kotlin/account/create-push-target.md new file mode 100644 index 0000000000..59b252be15 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-push-target.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createPushTarget( + targetId = "", + identifier = "", + providerId = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-recovery.md b/docs/examples/1.8.x/client-android/kotlin/account/create-recovery.md new file mode 100644 index 0000000000..7e13138111 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-recovery.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createRecovery( + email = "email@example.com", + url = "https://example.com", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-session.md b/docs/examples/1.8.x/client-android/kotlin/account/create-session.md new file mode 100644 index 0000000000..ab9e20e7e2 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createSession( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create-verification.md b/docs/examples/1.8.x/client-android/kotlin/account/create-verification.md new file mode 100644 index 0000000000..669b00ba18 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create-verification.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.createVerification( + url = "https://example.com", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/create.md b/docs/examples/1.8.x/client-android/kotlin/account/create.md new file mode 100644 index 0000000000..16f3a60ded --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.create( + userId = "", + email = "email@example.com", + password = "", + name = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/delete-identity.md b/docs/examples/1.8.x/client-android/kotlin/account/delete-identity.md new file mode 100644 index 0000000000..c8d7463685 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/delete-identity.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteIdentity( + identityId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-android/kotlin/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..057e021f6d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteMfaAuthenticator( + type = AuthenticatorType.TOTP, +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/delete-push-target.md b/docs/examples/1.8.x/client-android/kotlin/account/delete-push-target.md new file mode 100644 index 0000000000..8e0b418c90 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/delete-push-target.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deletePushTarget( + targetId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/delete-session.md b/docs/examples/1.8.x/client-android/kotlin/account/delete-session.md new file mode 100644 index 0000000000..6af414be27 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/delete-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteSession( + sessionId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/delete-sessions.md b/docs/examples/1.8.x/client-android/kotlin/account/delete-sessions.md new file mode 100644 index 0000000000..f7e6c71c10 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/delete-sessions.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.deleteSessions() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/kotlin/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..6201658fe3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getMfaRecoveryCodes() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/get-prefs.md b/docs/examples/1.8.x/client-android/kotlin/account/get-prefs.md new file mode 100644 index 0000000000..85dbb18b43 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/get-prefs.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getPrefs() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/get-session.md b/docs/examples/1.8.x/client-android/kotlin/account/get-session.md new file mode 100644 index 0000000000..4de64a1487 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/get-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.getSession( + sessionId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/get.md b/docs/examples/1.8.x/client-android/kotlin/account/get.md new file mode 100644 index 0000000000..3e85e79ad0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/get.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.get() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/list-identities.md b/docs/examples/1.8.x/client-android/kotlin/account/list-identities.md new file mode 100644 index 0000000000..5908a44a9c --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/list-identities.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listIdentities( + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/list-logs.md b/docs/examples/1.8.x/client-android/kotlin/account/list-logs.md new file mode 100644 index 0000000000..385ccc0116 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/list-logs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listLogs( + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/list-mfa-factors.md b/docs/examples/1.8.x/client-android/kotlin/account/list-mfa-factors.md new file mode 100644 index 0000000000..09119ab65a --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listMfaFactors() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/list-sessions.md b/docs/examples/1.8.x/client-android/kotlin/account/list-sessions.md new file mode 100644 index 0000000000..573dd865e2 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/list-sessions.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.listSessions() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-email.md b/docs/examples/1.8.x/client-android/kotlin/account/update-email.md new file mode 100644 index 0000000000..0862f112c0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-email.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateEmail( + email = "email@example.com", + password = "password", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-m-f-a.md b/docs/examples/1.8.x/client-android/kotlin/account/update-m-f-a.md new file mode 100644 index 0000000000..f214e78f44 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMFA( + mfa = false, +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-android/kotlin/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..2c1a0b0a38 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMagicURLSession( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..987825e589 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-authenticator.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMfaAuthenticator( + type = AuthenticatorType.TOTP, + otp = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-challenge.md new file mode 100644 index 0000000000..c7f8139f15 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMfaChallenge( + challengeId = "", + otp = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..c0ee3c386f --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateMfaRecoveryCodes() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-name.md b/docs/examples/1.8.x/client-android/kotlin/account/update-name.md new file mode 100644 index 0000000000..2cb5327ebe --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-name.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateName( + name = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-password.md b/docs/examples/1.8.x/client-android/kotlin/account/update-password.md new file mode 100644 index 0000000000..140ca8b219 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-password.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePassword( + password = "", + oldPassword = "password", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-phone-session.md b/docs/examples/1.8.x/client-android/kotlin/account/update-phone-session.md new file mode 100644 index 0000000000..b3911dd5e0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-phone-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePhoneSession( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-phone-verification.md b/docs/examples/1.8.x/client-android/kotlin/account/update-phone-verification.md new file mode 100644 index 0000000000..ad0d5d73eb --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePhoneVerification( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-phone.md b/docs/examples/1.8.x/client-android/kotlin/account/update-phone.md new file mode 100644 index 0000000000..84ff508184 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-phone.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePhone( + phone = "+12065550100", + password = "password", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-prefs.md b/docs/examples/1.8.x/client-android/kotlin/account/update-prefs.md new file mode 100644 index 0000000000..fdfed577ac --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-prefs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePrefs( + prefs = mapOf( "a" to "b" ), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-push-target.md b/docs/examples/1.8.x/client-android/kotlin/account/update-push-target.md new file mode 100644 index 0000000000..5c3816860f --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-push-target.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updatePushTarget( + targetId = "", + identifier = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-recovery.md b/docs/examples/1.8.x/client-android/kotlin/account/update-recovery.md new file mode 100644 index 0000000000..d505d1afb1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-recovery.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateRecovery( + userId = "", + secret = "", + password = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-session.md b/docs/examples/1.8.x/client-android/kotlin/account/update-session.md new file mode 100644 index 0000000000..6fc9a9f9d2 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-session.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateSession( + sessionId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-status.md b/docs/examples/1.8.x/client-android/kotlin/account/update-status.md new file mode 100644 index 0000000000..b86a25ad4d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-status.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateStatus() diff --git a/docs/examples/1.8.x/client-android/kotlin/account/update-verification.md b/docs/examples/1.8.x/client-android/kotlin/account/update-verification.md new file mode 100644 index 0000000000..028eb7c4ce --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/account/update-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val account = Account(client) + +val result = account.updateVerification( + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-browser.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-browser.md new file mode 100644 index 0000000000..d04adfbbdc --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-browser.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Browser + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getBrowser( + code = Browser.AVANT_BROWSER, + width = 0, // (optional) + height = 0, // (optional) + quality = -1, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-credit-card.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-credit-card.md new file mode 100644 index 0000000000..91c88da5dd --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-credit-card.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.CreditCard + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getCreditCard( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, // (optional) + height = 0, // (optional) + quality = -1, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-favicon.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-favicon.md new file mode 100644 index 0000000000..01df8cb54b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getFavicon( + url = "https://example.com", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-flag.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-flag.md new file mode 100644 index 0000000000..1dbc1cdf4b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-flag.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Flag + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getFlag( + code = Flag.AFGHANISTAN, + width = 0, // (optional) + height = 0, // (optional) + quality = -1, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-image.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-image.md new file mode 100644 index 0000000000..64166c0a6d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-image.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getImage( + url = "https://example.com", + width = 0, // (optional) + height = 0, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-initials.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-initials.md new file mode 100644 index 0000000000..883da02744 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-initials.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getInitials( + name = "", // (optional) + width = 0, // (optional) + height = 0, // (optional) + background = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/avatars/get-q-r.md b/docs/examples/1.8.x/client-android/kotlin/avatars/get-q-r.md new file mode 100644 index 0000000000..fa8a38cabb --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.getQR( + text = "", + size = 1, // (optional) + margin = 0, // (optional) + download = false, // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md new file mode 100644 index 0000000000..0bafb315e7 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +val databases = Databases(client) + +val result = databases.createDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/create-documents.md b/docs/examples/1.8.x/client-android/kotlin/databases/create-documents.md new file mode 100644 index 0000000000..6f9e1f98f7 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/create-documents.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("") // + +val databases = Databases(client) + +val result = databases.createDocuments( + databaseId = "", + collectionId = "", + documents = listOf(), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/delete-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/delete-document.md new file mode 100644 index 0000000000..052bf97f89 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/delete-document.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.deleteDocument( + databaseId = "", + collectionId = "", + documentId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/get-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/get-document.md new file mode 100644 index 0000000000..157af2b562 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/get-document.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.getDocument( + databaseId = "", + collectionId = "", + documentId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/list-documents.md b/docs/examples/1.8.x/client-android/kotlin/databases/list-documents.md new file mode 100644 index 0000000000..1cc785fab1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/list-documents.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.listDocuments( + databaseId = "", + collectionId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/update-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/update-document.md new file mode 100644 index 0000000000..d61fdea5b1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/update-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val databases = Databases(client) + +val result = databases.updateDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md new file mode 100644 index 0000000000..7939fde2be --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +val databases = Databases(client) + +val result = databases.upsertDocument( + databaseId = "", + collectionId = "", + documentId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md b/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md new file mode 100644 index 0000000000..cb7c60bac1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val functions = Functions(client) + +val result = functions.createExecution( + functionId = "", + body = "", // (optional) + async = false, // (optional) + path = "", // (optional) + method = ExecutionMethod.GET, // (optional) + headers = mapOf( "a" to "b" ), // (optional) + scheduledAt = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/functions/get-execution.md b/docs/examples/1.8.x/client-android/kotlin/functions/get-execution.md new file mode 100644 index 0000000000..267be53cbb --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/functions/get-execution.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val functions = Functions(client) + +val result = functions.getExecution( + functionId = "", + executionId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/functions/list-executions.md b/docs/examples/1.8.x/client-android/kotlin/functions/list-executions.md new file mode 100644 index 0000000000..37ea8b8228 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/functions/list-executions.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val functions = Functions(client) + +val result = functions.listExecutions( + functionId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/graphql/mutation.md b/docs/examples/1.8.x/client-android/kotlin/graphql/mutation.md new file mode 100644 index 0000000000..a3a762203d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/graphql/mutation.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val graphql = Graphql(client) + +val result = graphql.mutation( + query = mapOf( "a" to "b" ), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/graphql/query.md b/docs/examples/1.8.x/client-android/kotlin/graphql/query.md new file mode 100644 index 0000000000..13f149cbf0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/graphql/query.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val graphql = Graphql(client) + +val result = graphql.query( + query = mapOf( "a" to "b" ), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/get.md b/docs/examples/1.8.x/client-android/kotlin/locale/get.md new file mode 100644 index 0000000000..a116aed349 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/get.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.get() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-codes.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-codes.md new file mode 100644 index 0000000000..0b63b06e3e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-codes.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCodes() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-continents.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-continents.md new file mode 100644 index 0000000000..98acdc9b6a --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-continents.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listContinents() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-countries-e-u.md new file mode 100644 index 0000000000..c01602598b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCountriesEU() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-countries-phones.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-countries-phones.md new file mode 100644 index 0000000000..d95c1c6ff6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCountriesPhones() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-countries.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-countries.md new file mode 100644 index 0000000000..4775161159 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-countries.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCountries() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-currencies.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-currencies.md new file mode 100644 index 0000000000..6d0a04f808 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-currencies.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listCurrencies() diff --git a/docs/examples/1.8.x/client-android/kotlin/locale/list-languages.md b/docs/examples/1.8.x/client-android/kotlin/locale/list-languages.md new file mode 100644 index 0000000000..de588aa077 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/locale/list-languages.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val locale = Locale(client) + +val result = locale.listLanguages() diff --git a/docs/examples/1.8.x/client-android/kotlin/messaging/create-subscriber.md b/docs/examples/1.8.x/client-android/kotlin/messaging/create-subscriber.md new file mode 100644 index 0000000000..b7e244f041 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val messaging = Messaging(client) + +val result = messaging.createSubscriber( + topicId = "", + subscriberId = "", + targetId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-android/kotlin/messaging/delete-subscriber.md new file mode 100644 index 0000000000..9e102d6faa --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val messaging = Messaging(client) + +val result = messaging.deleteSubscriber( + topicId = "", + subscriberId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/create-file.md b/docs/examples/1.8.x/client-android/kotlin/storage/create-file.md new file mode 100644 index 0000000000..1c78c51e67 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/create-file.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.createFile( + bucketId = "", + fileId = "", + file = InputFile.fromPath("file.png"), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/delete-file.md b/docs/examples/1.8.x/client-android/kotlin/storage/delete-file.md new file mode 100644 index 0000000000..ca40f41b71 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/delete-file.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.deleteFile( + bucketId = "", + fileId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/get-file-download.md b/docs/examples/1.8.x/client-android/kotlin/storage/get-file-download.md new file mode 100644 index 0000000000..89c6e8a992 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/get-file-download.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFileDownload( + bucketId = "", + fileId = "", + token = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/get-file-preview.md b/docs/examples/1.8.x/client-android/kotlin/storage/get-file-preview.md new file mode 100644 index 0000000000..d766dc7174 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFilePreview( + bucketId = "", + fileId = "", + width = 0, // (optional) + height = 0, // (optional) + gravity = ImageGravity.CENTER, // (optional) + quality = -1, // (optional) + borderWidth = 0, // (optional) + borderColor = "", // (optional) + borderRadius = 0, // (optional) + opacity = 0, // (optional) + rotation = -360, // (optional) + background = "", // (optional) + output = ImageFormat.JPG, // (optional) + token = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/get-file-view.md b/docs/examples/1.8.x/client-android/kotlin/storage/get-file-view.md new file mode 100644 index 0000000000..513e1f9a90 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/get-file-view.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFileView( + bucketId = "", + fileId = "", + token = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/get-file.md b/docs/examples/1.8.x/client-android/kotlin/storage/get-file.md new file mode 100644 index 0000000000..1e9943059b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/get-file.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.getFile( + bucketId = "", + fileId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/list-files.md b/docs/examples/1.8.x/client-android/kotlin/storage/list-files.md new file mode 100644 index 0000000000..06f6cda4eb --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/list-files.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.listFiles( + bucketId = "", + queries = listOf(), // (optional) + search = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/storage/update-file.md b/docs/examples/1.8.x/client-android/kotlin/storage/update-file.md new file mode 100644 index 0000000000..116d156ead --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/storage/update-file.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val storage = Storage(client) + +val result = storage.updateFile( + bucketId = "", + fileId = "", + name = "", // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md new file mode 100644 index 0000000000..8c581bf1d5 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +val tables = Tables(client) + +val result = tables.createRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md b/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md new file mode 100644 index 0000000000..1fde9c50cf --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("") // + +val tables = Tables(client) + +val result = tables.createRows( + databaseId = "", + tableId = "", + rows = listOf(), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md new file mode 100644 index 0000000000..ffa3229f30 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tables = Tables(client) + +val result = tables.deleteRow( + databaseId = "", + tableId = "", + rowId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md new file mode 100644 index 0000000000..15dabff397 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tables = Tables(client) + +val result = tables.getRow( + databaseId = "", + tableId = "", + rowId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md b/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md new file mode 100644 index 0000000000..ff36543938 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tables = Tables(client) + +val result = tables.listRows( + databaseId = "", + tableId = "", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md new file mode 100644 index 0000000000..e9b515cef4 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val tables = Tables(client) + +val result = tables.updateRow( + databaseId = "", + tableId = "", + rowId = "", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md new file mode 100644 index 0000000000..6b7cb6666b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +val tables = Tables(client) + +val result = tables.upsertRow( + databaseId = "", + tableId = "", + rowId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/create-membership.md b/docs/examples/1.8.x/client-android/kotlin/teams/create-membership.md new file mode 100644 index 0000000000..70eb7ddd19 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/create-membership.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.createMembership( + teamId = "", + roles = listOf(), + email = "email@example.com", // (optional) + userId = "", // (optional) + phone = "+12065550100", // (optional) + url = "https://example.com", // (optional) + name = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/create.md b/docs/examples/1.8.x/client-android/kotlin/teams/create.md new file mode 100644 index 0000000000..dfa4df446e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/create.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.create( + teamId = "", + name = "", + roles = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/delete-membership.md b/docs/examples/1.8.x/client-android/kotlin/teams/delete-membership.md new file mode 100644 index 0000000000..adf1119761 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/delete-membership.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.deleteMembership( + teamId = "", + membershipId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/delete.md b/docs/examples/1.8.x/client-android/kotlin/teams/delete.md new file mode 100644 index 0000000000..e144a78e3d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/delete.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.delete( + teamId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/get-membership.md b/docs/examples/1.8.x/client-android/kotlin/teams/get-membership.md new file mode 100644 index 0000000000..8fb8c54c3b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/get-membership.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.getMembership( + teamId = "", + membershipId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/get-prefs.md b/docs/examples/1.8.x/client-android/kotlin/teams/get-prefs.md new file mode 100644 index 0000000000..5e892fb49d --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/get-prefs.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.getPrefs( + teamId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/get.md b/docs/examples/1.8.x/client-android/kotlin/teams/get.md new file mode 100644 index 0000000000..dbb487d3d6 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/get.md @@ -0,0 +1,13 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.get( + teamId = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/list-memberships.md b/docs/examples/1.8.x/client-android/kotlin/teams/list-memberships.md new file mode 100644 index 0000000000..e305403a52 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/list-memberships.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.listMemberships( + teamId = "", + queries = listOf(), // (optional) + search = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/list.md b/docs/examples/1.8.x/client-android/kotlin/teams/list.md new file mode 100644 index 0000000000..984858d26c --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/list.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.list( + queries = listOf(), // (optional) + search = "", // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/update-membership-status.md b/docs/examples/1.8.x/client-android/kotlin/teams/update-membership-status.md new file mode 100644 index 0000000000..c3770c7f1e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateMembershipStatus( + teamId = "", + membershipId = "", + userId = "", + secret = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/update-membership.md b/docs/examples/1.8.x/client-android/kotlin/teams/update-membership.md new file mode 100644 index 0000000000..86216a8692 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/update-membership.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateMembership( + teamId = "", + membershipId = "", + roles = listOf(), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/update-name.md b/docs/examples/1.8.x/client-android/kotlin/teams/update-name.md new file mode 100644 index 0000000000..abeb6dc7c1 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/update-name.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateName( + teamId = "", + name = "", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/teams/update-prefs.md b/docs/examples/1.8.x/client-android/kotlin/teams/update-prefs.md new file mode 100644 index 0000000000..d0066a94b3 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/teams/update-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updatePrefs( + teamId = "", + prefs = mapOf( "a" to "b" ), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-apple/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..22020a16d9 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-anonymous-session.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.createAnonymousSession() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-apple/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..5f541a8a15 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-email-password-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.createEmailPasswordSession( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-email-token.md b/docs/examples/1.8.x/client-apple/examples/account/create-email-token.md new file mode 100644 index 0000000000..cf82afde8f --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createEmailToken( + userId: "", + email: "email@example.com", + phrase: false // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-apple/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..fbcd50401c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-j-w-t.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let jwt = try await account.createJWT() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-apple/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..27bbe4137e --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createMagicURLToken( + userId: "", + email: "email@example.com", + url: "https://example.com", // optional + phrase: false // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-apple/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..56799e327e --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaType = try await account.createMfaAuthenticator( + type: .totp +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-apple/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..0b5d385999 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaChallenge = try await account.createMfaChallenge( + factor: .email +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-apple/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..c0ccb39e86 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaRecoveryCodes = try await account.createMfaRecoveryCodes() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-apple/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..756112e701 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-o-auth2session.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let success = try await account.createOAuth2Session( + provider: .amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-apple/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..21b54e8c9a --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-o-auth2token.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let success = try await account.createOAuth2Token( + provider: .amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-apple/examples/account/create-phone-token.md new file mode 100644 index 0000000000..12b2d4b223 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createPhoneToken( + userId: "", + phone: "+12065550100" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-apple/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..f0eb94b6fc --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createPhoneVerification() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-push-target.md b/docs/examples/1.8.x/client-apple/examples/account/create-push-target.md new file mode 100644 index 0000000000..ce2d194272 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-push-target.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let target = try await account.createPushTarget( + targetId: "", + identifier: "", + providerId: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-recovery.md b/docs/examples/1.8.x/client-apple/examples/account/create-recovery.md new file mode 100644 index 0000000000..ccfd5ac519 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createRecovery( + email: "email@example.com", + url: "https://example.com" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-session.md b/docs/examples/1.8.x/client-apple/examples/account/create-session.md new file mode 100644 index 0000000000..2065692a16 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.createSession( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create-verification.md b/docs/examples/1.8.x/client-apple/examples/account/create-verification.md new file mode 100644 index 0000000000..d3ca74c7c0 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create-verification.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.createVerification( + url: "https://example.com" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/create.md b/docs/examples/1.8.x/client-apple/examples/account/create.md new file mode 100644 index 0000000000..79b4db64ba --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.create( + userId: "", + email: "email@example.com", + password: "", + name: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/delete-identity.md b/docs/examples/1.8.x/client-apple/examples/account/delete-identity.md new file mode 100644 index 0000000000..04a3ee5f47 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteIdentity( + identityId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-apple/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..16cbbe3b72 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteMfaAuthenticator( + type: .totp +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-apple/examples/account/delete-push-target.md new file mode 100644 index 0000000000..a96a1b1d05 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/delete-push-target.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deletePushTarget( + targetId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/delete-session.md b/docs/examples/1.8.x/client-apple/examples/account/delete-session.md new file mode 100644 index 0000000000..ea353e8723 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/delete-session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteSession( + sessionId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-apple/examples/account/delete-sessions.md new file mode 100644 index 0000000000..51a86bdcc3 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let result = try await account.deleteSessions() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-apple/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..2f5d623304 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaRecoveryCodes = try await account.getMfaRecoveryCodes() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/get-prefs.md b/docs/examples/1.8.x/client-apple/examples/account/get-prefs.md new file mode 100644 index 0000000000..65ce5f5908 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let preferences = try await account.getPrefs() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/get-session.md b/docs/examples/1.8.x/client-apple/examples/account/get-session.md new file mode 100644 index 0000000000..bd491ff4d7 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/get-session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.getSession( + sessionId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/get.md b/docs/examples/1.8.x/client-apple/examples/account/get.md new file mode 100644 index 0000000000..1b1213e1da --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/get.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.get() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/list-identities.md b/docs/examples/1.8.x/client-apple/examples/account/list-identities.md new file mode 100644 index 0000000000..1d3a999d4a --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/list-identities.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let identityList = try await account.listIdentities( + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/list-logs.md b/docs/examples/1.8.x/client-apple/examples/account/list-logs.md new file mode 100644 index 0000000000..2c42307f96 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/list-logs.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let logList = try await account.listLogs( + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-apple/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..f6d7a6fe75 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/list-mfa-factors.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaFactors = try await account.listMfaFactors() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/list-sessions.md b/docs/examples/1.8.x/client-apple/examples/account/list-sessions.md new file mode 100644 index 0000000000..99f6930cd2 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let sessionList = try await account.listSessions() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-email.md b/docs/examples/1.8.x/client-apple/examples/account/update-email.md new file mode 100644 index 0000000000..037133282b --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-email.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateEmail( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-apple/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..fe2b04f9a3 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-m-f-a.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateMFA( + mfa: false +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-apple/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..507006b230 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.updateMagicURLSession( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-apple/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..6a42fb9b6d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateMfaAuthenticator( + type: .totp, + otp: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-apple/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..db9753b777 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.updateMfaChallenge( + challengeId: "", + otp: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-apple/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..c3b8d412c5 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let mfaRecoveryCodes = try await account.updateMfaRecoveryCodes() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-name.md b/docs/examples/1.8.x/client-apple/examples/account/update-name.md new file mode 100644 index 0000000000..7f8abf54fb --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-name.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateName( + name: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-password.md b/docs/examples/1.8.x/client-apple/examples/account/update-password.md new file mode 100644 index 0000000000..7fa03caebc --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-password.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updatePassword( + password: "", + oldPassword: "password" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-apple/examples/account/update-phone-session.md new file mode 100644 index 0000000000..f6776d1de1 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-phone-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.updatePhoneSession( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-apple/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..0bf2db1f0a --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.updatePhoneVerification( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-phone.md b/docs/examples/1.8.x/client-apple/examples/account/update-phone.md new file mode 100644 index 0000000000..604fc85377 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-phone.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updatePhone( + phone: "+12065550100", + password: "password" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-prefs.md b/docs/examples/1.8.x/client-apple/examples/account/update-prefs.md new file mode 100644 index 0000000000..fea527337b --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updatePrefs( + prefs: [:] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-push-target.md b/docs/examples/1.8.x/client-apple/examples/account/update-push-target.md new file mode 100644 index 0000000000..549c4d6c16 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-push-target.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let target = try await account.updatePushTarget( + targetId: "", + identifier: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-recovery.md b/docs/examples/1.8.x/client-apple/examples/account/update-recovery.md new file mode 100644 index 0000000000..536da69b8a --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.updateRecovery( + userId: "", + secret: "", + password: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-session.md b/docs/examples/1.8.x/client-apple/examples/account/update-session.md new file mode 100644 index 0000000000..8999b0a310 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-session.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let session = try await account.updateSession( + sessionId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-status.md b/docs/examples/1.8.x/client-apple/examples/account/update-status.md new file mode 100644 index 0000000000..892858dfbc --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-status.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let user = try await account.updateStatus() + diff --git a/docs/examples/1.8.x/client-apple/examples/account/update-verification.md b/docs/examples/1.8.x/client-apple/examples/account/update-verification.md new file mode 100644 index 0000000000..094e10f33c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/account/update-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let account = Account(client) + +let token = try await account.updateVerification( + userId: "", + secret: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-browser.md new file mode 100644 index 0000000000..ee0cc99f91 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getBrowser( + code: .avantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..779fce3f60 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getCreditCard( + code: .americanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..b7dc6830c3 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getFavicon( + url: "https://example.com" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-flag.md new file mode 100644 index 0000000000..ba1d77be27 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getFlag( + code: .afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-image.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-image.md new file mode 100644 index 0000000000..0fe71e1765 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getImage( + url: "https://example.com", + width: 0, // optional + height: 0 // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-initials.md new file mode 100644 index 0000000000..2bbfbe6a47 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-initials.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getInitials( + name: "", // optional + width: 0, // optional + height: 0, // optional + background: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-apple/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..3cc650c1b9 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let bytes = try await avatars.getQR( + text: "", + size: 1, // optional + margin: 0, // optional + download: false // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/create-document.md b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md new file mode 100644 index 0000000000..6c2baee728 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +let databases = Databases(client) + +let document = try await databases.createDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/create-documents.md b/docs/examples/1.8.x/client-apple/examples/databases/create-documents.md new file mode 100644 index 0000000000..d60cf01cd9 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/create-documents.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("") // + +let databases = Databases(client) + +let documentList = try await databases.createDocuments( + databaseId: "", + collectionId: "", + documents: [] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/delete-document.md b/docs/examples/1.8.x/client-apple/examples/databases/delete-document.md new file mode 100644 index 0000000000..301203dc7f --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let result = try await databases.deleteDocument( + databaseId: "", + collectionId: "", + documentId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/get-document.md b/docs/examples/1.8.x/client-apple/examples/databases/get-document.md new file mode 100644 index 0000000000..6e4dc55c6d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/get-document.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.getDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/list-documents.md b/docs/examples/1.8.x/client-apple/examples/databases/list-documents.md new file mode 100644 index 0000000000..0d624f3a92 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let documentList = try await databases.listDocuments( + databaseId: "", + collectionId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/update-document.md b/docs/examples/1.8.x/client-apple/examples/databases/update-document.md new file mode 100644 index 0000000000..af224c8e09 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/update-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let databases = Databases(client) + +let document = try await databases.updateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md new file mode 100644 index 0000000000..bb713146ec --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +let databases = Databases(client) + +let document = try await databases.upsertDocument( + databaseId: "", + collectionId: "", + documentId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md b/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md new file mode 100644 index 0000000000..7470e9ebf6 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let functions = Functions(client) + +let execution = try await functions.createExecution( + functionId: "", + body: "", // optional + async: false, // optional + path: "", // optional + method: .gET, // optional + headers: [:], // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/functions/get-execution.md b/docs/examples/1.8.x/client-apple/examples/functions/get-execution.md new file mode 100644 index 0000000000..787f297b2c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let functions = Functions(client) + +let execution = try await functions.getExecution( + functionId: "", + executionId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/functions/list-executions.md b/docs/examples/1.8.x/client-apple/examples/functions/list-executions.md new file mode 100644 index 0000000000..1636d96c6d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let functions = Functions(client) + +let executionList = try await functions.listExecutions( + functionId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/graphql/mutation.md b/docs/examples/1.8.x/client-apple/examples/graphql/mutation.md new file mode 100644 index 0000000000..6cd2e588f9 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let graphql = Graphql(client) + +let any = try await graphql.mutation( + query: [:] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/graphql/query.md b/docs/examples/1.8.x/client-apple/examples/graphql/query.md new file mode 100644 index 0000000000..47e4c243fa --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/graphql/query.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let graphql = Graphql(client) + +let any = try await graphql.query( + query: [:] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/get.md b/docs/examples/1.8.x/client-apple/examples/locale/get.md new file mode 100644 index 0000000000..9c48317a1d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/get.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let locale = try await locale.get() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-codes.md b/docs/examples/1.8.x/client-apple/examples/locale/list-codes.md new file mode 100644 index 0000000000..21d693a7b8 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let localeCodeList = try await locale.listCodes() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-continents.md b/docs/examples/1.8.x/client-apple/examples/locale/list-continents.md new file mode 100644 index 0000000000..bd44915a34 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let continentList = try await locale.listContinents() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-apple/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..2dc24e5a63 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let countryList = try await locale.listCountriesEU() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-apple/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..f3ab6b1f6d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let phoneList = try await locale.listCountriesPhones() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-countries.md b/docs/examples/1.8.x/client-apple/examples/locale/list-countries.md new file mode 100644 index 0000000000..dadcd3ee26 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let countryList = try await locale.listCountries() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-apple/examples/locale/list-currencies.md new file mode 100644 index 0000000000..dc20ead45e --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let currencyList = try await locale.listCurrencies() + diff --git a/docs/examples/1.8.x/client-apple/examples/locale/list-languages.md b/docs/examples/1.8.x/client-apple/examples/locale/list-languages.md new file mode 100644 index 0000000000..92c1d7b1dc --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let locale = Locale(client) + +let languageList = try await locale.listLanguages() + diff --git a/docs/examples/1.8.x/client-apple/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-apple/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..f85d5e6fb1 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/messaging/create-subscriber.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let messaging = Messaging(client) + +let subscriber = try await messaging.createSubscriber( + topicId: "", + subscriberId: "", + targetId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-apple/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..f1cdda95c7 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/messaging/delete-subscriber.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let messaging = Messaging(client) + +let result = try await messaging.deleteSubscriber( + topicId: "", + subscriberId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/create-file.md b/docs/examples/1.8.x/client-apple/examples/storage/create-file.md new file mode 100644 index 0000000000..2db9b20e1b --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/create-file.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let file = try await storage.createFile( + bucketId: "", + fileId: "", + file: InputFile.fromPath("file.png"), + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/delete-file.md b/docs/examples/1.8.x/client-apple/examples/storage/delete-file.md new file mode 100644 index 0000000000..ca721a4a41 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let result = try await storage.deleteFile( + bucketId: "", + fileId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-apple/examples/storage/get-file-download.md new file mode 100644 index 0000000000..9338958ede --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let bytes = try await storage.getFileDownload( + bucketId: "", + fileId: "", + token: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-apple/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..1395d7e782 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let bytes = try await storage.getFilePreview( + bucketId: "", + fileId: "", + width: 0, // optional + height: 0, // optional + gravity: .center, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: "", // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: "", // optional + output: .jpg, // optional + token: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-apple/examples/storage/get-file-view.md new file mode 100644 index 0000000000..bc5ad02727 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let bytes = try await storage.getFileView( + bucketId: "", + fileId: "", + token: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/get-file.md b/docs/examples/1.8.x/client-apple/examples/storage/get-file.md new file mode 100644 index 0000000000..2730b4d528 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/get-file.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let file = try await storage.getFile( + bucketId: "", + fileId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/list-files.md b/docs/examples/1.8.x/client-apple/examples/storage/list-files.md new file mode 100644 index 0000000000..48bd0d065f --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/list-files.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let fileList = try await storage.listFiles( + bucketId: "", + queries: [], // optional + search: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/storage/update-file.md b/docs/examples/1.8.x/client-apple/examples/storage/update-file.md new file mode 100644 index 0000000000..adef969845 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/storage/update-file.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let storage = Storage(client) + +let file = try await storage.updateFile( + bucketId: "", + fileId: "", + name: "", // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/create-row.md b/docs/examples/1.8.x/client-apple/examples/tables/create-row.md new file mode 100644 index 0000000000..533cf2d555 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/create-row.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +let tables = Tables(client) + +let row = try await tables.createRow( + databaseId: "", + tableId: "", + rowId: "", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md b/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md new file mode 100644 index 0000000000..effd748aa0 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("") // + +let tables = Tables(client) + +let rowList = try await tables.createRows( + databaseId: "", + tableId: "", + rows: [] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md b/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md new file mode 100644 index 0000000000..7d12ec4f4c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tables = Tables(client) + +let result = try await tables.deleteRow( + databaseId: "", + tableId: "", + rowId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/get-row.md b/docs/examples/1.8.x/client-apple/examples/tables/get-row.md new file mode 100644 index 0000000000..93fbef9e7c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/get-row.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tables = Tables(client) + +let row = try await tables.getRow( + databaseId: "", + tableId: "", + rowId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md b/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md new file mode 100644 index 0000000000..31545cce4d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tables = Tables(client) + +let rowList = try await tables.listRows( + databaseId: "", + tableId: "", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/update-row.md b/docs/examples/1.8.x/client-apple/examples/tables/update-row.md new file mode 100644 index 0000000000..601c4f0a77 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/update-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let tables = Tables(client) + +let row = try await tables.updateRow( + databaseId: "", + tableId: "", + rowId: "", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md new file mode 100644 index 0000000000..eabcb181c3 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("") // Your secret JSON Web Token + +let tables = Tables(client) + +let row = try await tables.upsertRow( + databaseId: "", + tableId: "", + rowId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/create-membership.md b/docs/examples/1.8.x/client-apple/examples/teams/create-membership.md new file mode 100644 index 0000000000..3c6d093c64 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.createMembership( + teamId: "", + roles: [], + email: "email@example.com", // optional + userId: "", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/create.md b/docs/examples/1.8.x/client-apple/examples/teams/create.md new file mode 100644 index 0000000000..b9f5ea4080 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/create.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let team = try await teams.create( + teamId: "", + name: "", + roles: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-apple/examples/teams/delete-membership.md new file mode 100644 index 0000000000..7c21410bf3 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let result = try await teams.deleteMembership( + teamId: "", + membershipId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/delete.md b/docs/examples/1.8.x/client-apple/examples/teams/delete.md new file mode 100644 index 0000000000..1787b4c749 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/delete.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let result = try await teams.delete( + teamId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/get-membership.md b/docs/examples/1.8.x/client-apple/examples/teams/get-membership.md new file mode 100644 index 0000000000..837a92dd04 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.getMembership( + teamId: "", + membershipId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-apple/examples/teams/get-prefs.md new file mode 100644 index 0000000000..b5b17a3bc2 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let preferences = try await teams.getPrefs( + teamId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/get.md b/docs/examples/1.8.x/client-apple/examples/teams/get.md new file mode 100644 index 0000000000..af358fbb67 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/get.md @@ -0,0 +1,12 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let team = try await teams.get( + teamId: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-apple/examples/teams/list-memberships.md new file mode 100644 index 0000000000..5c8669a3d8 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membershipList = try await teams.listMemberships( + teamId: "", + queries: [], // optional + search: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/list.md b/docs/examples/1.8.x/client-apple/examples/teams/list.md new file mode 100644 index 0000000000..be81e9c5aa --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/list.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let teamList = try await teams.list( + queries: [], // optional + search: "" // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-apple/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..1f3cb39d92 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.updateMembershipStatus( + teamId: "", + membershipId: "", + userId: "", + secret: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/update-membership.md b/docs/examples/1.8.x/client-apple/examples/teams/update-membership.md new file mode 100644 index 0000000000..eaa61799c2 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let membership = try await teams.updateMembership( + teamId: "", + membershipId: "", + roles: [] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/update-name.md b/docs/examples/1.8.x/client-apple/examples/teams/update-name.md new file mode 100644 index 0000000000..ce5188b950 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/update-name.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let team = try await teams.updateName( + teamId: "", + name: "" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-apple/examples/teams/update-prefs.md new file mode 100644 index 0000000000..e20ec2ea18 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let preferences = try await teams.updatePrefs( + teamId: "", + prefs: [:] +) + diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-flutter/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..cdcd98ddb2 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.createAnonymousSession(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-flutter/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..66bc2ab5f4 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-email-password-session.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.createEmailPasswordSession( + email: 'email@example.com', + password: 'password', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-email-token.md b/docs/examples/1.8.x/client-flutter/examples/account/create-email-token.md new file mode 100644 index 0000000000..2640894502 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-email-token.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createEmailToken( + userId: '', + email: 'email@example.com', + phrase: false, // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-flutter/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..b9cbc8f5a5 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-j-w-t.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Jwt result = await account.createJWT(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-flutter/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..454a951022 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createMagicURLToken( + userId: '', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false, // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..ca66149654 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-authenticator.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaType result = await account.createMfaAuthenticator( + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..6815e5c52f --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-challenge.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaChallenge result = await account.createMfaChallenge( + factor: AuthenticationFactor.email, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..274dc598a8 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaRecoveryCodes result = await account.createMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..ab53f4a777 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2session.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.createOAuth2Session( + provider: OAuthProvider.amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..d6b6c72c7e --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-o-auth2token.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.createOAuth2Token( + provider: OAuthProvider.amazon, + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-flutter/examples/account/create-phone-token.md new file mode 100644 index 0000000000..ff0187f0dc --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-phone-token.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createPhoneToken( + userId: '', + phone: '+12065550100', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-flutter/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..11e215a060 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-phone-verification.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createPhoneVerification(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-push-target.md b/docs/examples/1.8.x/client-flutter/examples/account/create-push-target.md new file mode 100644 index 0000000000..fd1755e3c5 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-push-target.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Target result = await account.createPushTarget( + targetId: '', + identifier: '', + providerId: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-recovery.md b/docs/examples/1.8.x/client-flutter/examples/account/create-recovery.md new file mode 100644 index 0000000000..44985beb80 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-recovery.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-session.md b/docs/examples/1.8.x/client-flutter/examples/account/create-session.md new file mode 100644 index 0000000000..e54e68a317 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-session.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.createSession( + userId: '', + secret: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create-verification.md b/docs/examples/1.8.x/client-flutter/examples/account/create-verification.md new file mode 100644 index 0000000000..8f96997249 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create-verification.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.createVerification( + url: 'https://example.com', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/create.md b/docs/examples/1.8.x/client-flutter/examples/account/create.md new file mode 100644 index 0000000000..ae0d526944 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/create.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.create( + userId: '', + email: 'email@example.com', + password: '', + name: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/delete-identity.md b/docs/examples/1.8.x/client-flutter/examples/account/delete-identity.md new file mode 100644 index 0000000000..849fa726a4 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/delete-identity.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteIdentity( + identityId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-flutter/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..bf4b0c509b --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteMfaAuthenticator( + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-flutter/examples/account/delete-push-target.md new file mode 100644 index 0000000000..6393d4ed4e --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/delete-push-target.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deletePushTarget( + targetId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/delete-session.md b/docs/examples/1.8.x/client-flutter/examples/account/delete-session.md new file mode 100644 index 0000000000..55abb18c85 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/delete-session.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteSession( + sessionId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-flutter/examples/account/delete-sessions.md new file mode 100644 index 0000000000..c50b611cac --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/delete-sessions.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +await account.deleteSessions(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-flutter/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..f9d50131e5 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaRecoveryCodes result = await account.getMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/get-prefs.md b/docs/examples/1.8.x/client-flutter/examples/account/get-prefs.md new file mode 100644 index 0000000000..9332da3a63 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/get-prefs.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Preferences result = await account.getPrefs(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/get-session.md b/docs/examples/1.8.x/client-flutter/examples/account/get-session.md new file mode 100644 index 0000000000..d68afcecd2 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/get-session.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.getSession( + sessionId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/get.md b/docs/examples/1.8.x/client-flutter/examples/account/get.md new file mode 100644 index 0000000000..a318617f78 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/get.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.get(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/list-identities.md b/docs/examples/1.8.x/client-flutter/examples/account/list-identities.md new file mode 100644 index 0000000000..9d2ad83c17 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/list-identities.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +IdentityList result = await account.listIdentities( + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/list-logs.md b/docs/examples/1.8.x/client-flutter/examples/account/list-logs.md new file mode 100644 index 0000000000..6d9b120991 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/list-logs.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +LogList result = await account.listLogs( + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-flutter/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..9f945400ac --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/list-mfa-factors.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaFactors result = await account.listMfaFactors(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/list-sessions.md b/docs/examples/1.8.x/client-flutter/examples/account/list-sessions.md new file mode 100644 index 0000000000..fd1d0e080c --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/list-sessions.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +SessionList result = await account.listSessions(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-email.md b/docs/examples/1.8.x/client-flutter/examples/account/update-email.md new file mode 100644 index 0000000000..0f3d998284 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-email.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateEmail( + email: 'email@example.com', + password: 'password', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-flutter/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..fc81c565ed --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-m-f-a.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateMFA( + mfa: false, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-flutter/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..d0f91eb0a4 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.updateMagicURLSession( + userId: '', + secret: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..7f026578c5 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-authenticator.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateMfaAuthenticator( + type: AuthenticatorType.totp, + otp: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..a938f0af68 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-challenge.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.updateMfaChallenge( + challengeId: '', + otp: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..37334ef69a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +MfaRecoveryCodes result = await account.updateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-name.md b/docs/examples/1.8.x/client-flutter/examples/account/update-name.md new file mode 100644 index 0000000000..303a12351f --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-name.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateName( + name: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-password.md b/docs/examples/1.8.x/client-flutter/examples/account/update-password.md new file mode 100644 index 0000000000..835d2383ca --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-password.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updatePassword( + password: '', + oldPassword: 'password', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-flutter/examples/account/update-phone-session.md new file mode 100644 index 0000000000..36801792f6 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-phone-session.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.updatePhoneSession( + userId: '', + secret: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-flutter/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..f5bbb773d0 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-phone-verification.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.updatePhoneVerification( + userId: '', + secret: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-phone.md b/docs/examples/1.8.x/client-flutter/examples/account/update-phone.md new file mode 100644 index 0000000000..6390d14245 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-phone.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updatePhone( + phone: '+12065550100', + password: 'password', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-prefs.md b/docs/examples/1.8.x/client-flutter/examples/account/update-prefs.md new file mode 100644 index 0000000000..81fa362f89 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-prefs.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updatePrefs( + prefs: {}, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-push-target.md b/docs/examples/1.8.x/client-flutter/examples/account/update-push-target.md new file mode 100644 index 0000000000..c695ea0984 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-push-target.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Target result = await account.updatePushTarget( + targetId: '', + identifier: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-recovery.md b/docs/examples/1.8.x/client-flutter/examples/account/update-recovery.md new file mode 100644 index 0000000000..5ca0239f47 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-recovery.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.updateRecovery( + userId: '', + secret: '', + password: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-session.md b/docs/examples/1.8.x/client-flutter/examples/account/update-session.md new file mode 100644 index 0000000000..4c78ebb187 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-session.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Session result = await account.updateSession( + sessionId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-status.md b/docs/examples/1.8.x/client-flutter/examples/account/update-status.md new file mode 100644 index 0000000000..289a3f0a96 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-status.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +User result = await account.updateStatus(); diff --git a/docs/examples/1.8.x/client-flutter/examples/account/update-verification.md b/docs/examples/1.8.x/client-flutter/examples/account/update-verification.md new file mode 100644 index 0000000000..15c7ed1928 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/account/update-verification.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Account account = Account(client); + +Token result = await account.updateVerification( + userId: '', + secret: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-browser.md new file mode 100644 index 0000000000..e97d24ab4f --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-browser.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getBrowser( + code: Browser.avantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getBrowser( + code: Browser.avantBrowser, + width:0 , // optional + height:0 , // optional + quality:-1 , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..9ec42588b4 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-credit-card.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getCreditCard( + code: CreditCard.americanExpress, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getCreditCard( + code: CreditCard.americanExpress, + width:0 , // optional + height:0 , // optional + quality:-1 , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..0df5ed0d2a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-favicon.md @@ -0,0 +1,27 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getFavicon( + url: 'https://example.com', +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getFavicon( + url:'https://example.com' , +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-flag.md new file mode 100644 index 0000000000..99d43409a0 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-flag.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getFlag( + code: Flag.afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getFlag( + code: Flag.afghanistan, + width:0 , // optional + height:0 , // optional + quality:-1 , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-image.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-image.md new file mode 100644 index 0000000000..5b9d1b58c1 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-image.md @@ -0,0 +1,31 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getImage( + url: 'https://example.com', + width: 0, // optional + height: 0, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getImage( + url:'https://example.com' , + width:0 , // optional + height:0 , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-initials.md new file mode 100644 index 0000000000..0c5b62a309 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-initials.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getInitials( + name: '', // optional + width: 0, // optional + height: 0, // optional + background: '', // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getInitials( + name:'' , // optional + width:0 , // optional + height:0 , // optional + background:'' , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-flutter/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..d9a533c886 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/avatars/get-q-r.md @@ -0,0 +1,33 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +// Downloading file +UInt8List bytes = await avatars.getQR( + text: '', + size: 1, // optional + margin: 0, // optional + download: false, // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: avatars.getQR( + text:'' , + size:1 , // optional + margin:0 , // optional + download:false , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md new file mode 100644 index 0000000000..4f286fff95 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +Databases databases = Databases(client); + +Document result = await databases.createDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/create-documents.md b/docs/examples/1.8.x/client-flutter/examples/databases/create-documents.md new file mode 100644 index 0000000000..29014be0e2 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/create-documents.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +Databases databases = Databases(client); + +DocumentList result = await databases.createDocuments( + databaseId: '', + collectionId: '', + documents: [], +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/delete-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/delete-document.md new file mode 100644 index 0000000000..3354917c20 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/delete-document.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +await databases.deleteDocument( + databaseId: '', + collectionId: '', + documentId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/get-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/get-document.md new file mode 100644 index 0000000000..f85c1f9b5a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/get-document.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.getDocument( + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/list-documents.md b/docs/examples/1.8.x/client-flutter/examples/databases/list-documents.md new file mode 100644 index 0000000000..31fec1f522 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/list-documents.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +DocumentList result = await databases.listDocuments( + databaseId: '', + collectionId: '', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/update-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/update-document.md new file mode 100644 index 0000000000..1f444d875a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/update-document.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Databases databases = Databases(client); + +Document result = await databases.updateDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md new file mode 100644 index 0000000000..ec3af47c3a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +Databases databases = Databases(client); + +Document result = await databases.upsertDocument( + databaseId: '', + collectionId: '', + documentId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md b/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md new file mode 100644 index 0000000000..d2a3d9e00a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Functions functions = Functions(client); + +Execution result = await functions.createExecution( + functionId: '', + body: '', // optional + xasync: false, // optional + path: '', // optional + method: ExecutionMethod.gET, // optional + headers: {}, // optional + scheduledAt: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/functions/get-execution.md b/docs/examples/1.8.x/client-flutter/examples/functions/get-execution.md new file mode 100644 index 0000000000..714933be32 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/functions/get-execution.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Functions functions = Functions(client); + +Execution result = await functions.getExecution( + functionId: '', + executionId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/functions/list-executions.md b/docs/examples/1.8.x/client-flutter/examples/functions/list-executions.md new file mode 100644 index 0000000000..232f3250d3 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/functions/list-executions.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Functions functions = Functions(client); + +ExecutionList result = await functions.listExecutions( + functionId: '', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/graphql/mutation.md b/docs/examples/1.8.x/client-flutter/examples/graphql/mutation.md new file mode 100644 index 0000000000..60f0c29703 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/graphql/mutation.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Graphql graphql = Graphql(client); + +Any result = await graphql.mutation( + query: {}, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/graphql/query.md b/docs/examples/1.8.x/client-flutter/examples/graphql/query.md new file mode 100644 index 0000000000..d90c3432e9 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/graphql/query.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Graphql graphql = Graphql(client); + +Any result = await graphql.query( + query: {}, +); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/get.md b/docs/examples/1.8.x/client-flutter/examples/locale/get.md new file mode 100644 index 0000000000..b284699046 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/get.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +Locale result = await locale.get(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-codes.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-codes.md new file mode 100644 index 0000000000..0227471571 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-codes.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +LocaleCodeList result = await locale.listCodes(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-continents.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-continents.md new file mode 100644 index 0000000000..1098bd1d58 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-continents.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +ContinentList result = await locale.listContinents(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..7d6571f4ee --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-countries-e-u.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +CountryList result = await locale.listCountriesEU(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..395f240fd7 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-countries-phones.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +PhoneList result = await locale.listCountriesPhones(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-countries.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-countries.md new file mode 100644 index 0000000000..a322eb2078 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-countries.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +CountryList result = await locale.listCountries(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-currencies.md new file mode 100644 index 0000000000..8884bf45b2 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-currencies.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +CurrencyList result = await locale.listCurrencies(); diff --git a/docs/examples/1.8.x/client-flutter/examples/locale/list-languages.md b/docs/examples/1.8.x/client-flutter/examples/locale/list-languages.md new file mode 100644 index 0000000000..0444d94151 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/locale/list-languages.md @@ -0,0 +1,9 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Locale locale = Locale(client); + +LanguageList result = await locale.listLanguages(); diff --git a/docs/examples/1.8.x/client-flutter/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-flutter/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..2a278a0481 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/messaging/create-subscriber.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Messaging messaging = Messaging(client); + +Subscriber result = await messaging.createSubscriber( + topicId: '', + subscriberId: '', + targetId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-flutter/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..02c1f61535 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/messaging/delete-subscriber.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Messaging messaging = Messaging(client); + +await messaging.deleteSubscriber( + topicId: '', + subscriberId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/create-file.md b/docs/examples/1.8.x/client-flutter/examples/storage/create-file.md new file mode 100644 index 0000000000..661f6b8b1e --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/create-file.md @@ -0,0 +1,15 @@ +import 'dart:io'; +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +File result = await storage.createFile( + bucketId: '', + fileId: '', + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/delete-file.md b/docs/examples/1.8.x/client-flutter/examples/storage/delete-file.md new file mode 100644 index 0000000000..b2c6a78f75 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/delete-file.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +await storage.deleteFile( + bucketId: '', + fileId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-flutter/examples/storage/get-file-download.md new file mode 100644 index 0000000000..5bef06ee7d --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/get-file-download.md @@ -0,0 +1,31 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +// Downloading file +UInt8List bytes = await storage.getFileDownload( + bucketId: '', + fileId: '', + token: '', // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: storage.getFileDownload( + bucketId:'' , + fileId:'' , + token:'' , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-flutter/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..96338bd25a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/get-file-preview.md @@ -0,0 +1,53 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +// Downloading file +UInt8List bytes = await storage.getFilePreview( + bucketId: '', + fileId: '', + width: 0, // optional + height: 0, // optional + gravity: ImageGravity.center, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: '', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: '', // optional + output: ImageFormat.jpg, // optional + token: '', // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: storage.getFilePreview( + bucketId:'' , + fileId:'' , + width:0 , // optional + height:0 , // optional + gravity: ImageGravity.center, // optional + quality:-1 , // optional + borderWidth:0 , // optional + borderColor:'' , // optional + borderRadius:0 , // optional + opacity:0 , // optional + rotation:-360 , // optional + background:'' , // optional + output: ImageFormat.jpg, // optional + token:'' , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-flutter/examples/storage/get-file-view.md new file mode 100644 index 0000000000..6587f086bd --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/get-file-view.md @@ -0,0 +1,31 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +// Downloading file +UInt8List bytes = await storage.getFileView( + bucketId: '', + fileId: '', + token: '', // optional +) + +final file = File('path_to_file/filename.ext'); +file.writeAsBytesSync(bytes); + +// Displaying image preview +FutureBuilder( + future: storage.getFileView( + bucketId:'' , + fileId:'' , + token:'' , // optional +), // Works for both public file and private file, for private files you need to be logged in + builder: (context, snapshot) { + return snapshot.hasData && snapshot.data != null + ? Image.memory(snapshot.data) + : CircularProgressIndicator(); + } +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/get-file.md b/docs/examples/1.8.x/client-flutter/examples/storage/get-file.md new file mode 100644 index 0000000000..f4b541ffd1 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/get-file.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +File result = await storage.getFile( + bucketId: '', + fileId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/list-files.md b/docs/examples/1.8.x/client-flutter/examples/storage/list-files.md new file mode 100644 index 0000000000..7950005b6a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/list-files.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +FileList result = await storage.listFiles( + bucketId: '', + queries: [], // optional + search: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/storage/update-file.md b/docs/examples/1.8.x/client-flutter/examples/storage/update-file.md new file mode 100644 index 0000000000..8e598121c1 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/storage/update-file.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Storage storage = Storage(client); + +File result = await storage.updateFile( + bucketId: '', + fileId: '', + name: '', // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md new file mode 100644 index 0000000000..ac9923d813 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +Tables tables = Tables(client); + +Row result = await tables.createRow( + databaseId: '', + tableId: '', + rowId: '', + data: {}, + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md b/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md new file mode 100644 index 0000000000..38c4c7503d --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +Tables tables = Tables(client); + +RowList result = await tables.createRows( + databaseId: '', + tableId: '', + rows: [], +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md new file mode 100644 index 0000000000..4187c4766d --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tables tables = Tables(client); + +await tables.deleteRow( + databaseId: '', + tableId: '', + rowId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md new file mode 100644 index 0000000000..8d8c52caa6 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tables tables = Tables(client); + +Row result = await tables.getRow( + databaseId: '', + tableId: '', + rowId: '', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md b/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md new file mode 100644 index 0000000000..f770bbbd92 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tables tables = Tables(client); + +RowList result = await tables.listRows( + databaseId: '', + tableId: '', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md new file mode 100644 index 0000000000..f43ba5e689 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Tables tables = Tables(client); + +Row result = await tables.updateRow( + databaseId: '', + tableId: '', + rowId: '', + data: {}, // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md new file mode 100644 index 0000000000..26a872b692 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +Tables tables = Tables(client); + +Row result = await tables.upsertRow( + databaseId: '', + tableId: '', + rowId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/create-membership.md b/docs/examples/1.8.x/client-flutter/examples/teams/create-membership.md new file mode 100644 index 0000000000..8026521408 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/create-membership.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.createMembership( + teamId: '', + roles: [], + email: 'email@example.com', // optional + userId: '', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/create.md b/docs/examples/1.8.x/client-flutter/examples/teams/create.md new file mode 100644 index 0000000000..637e216a04 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/create.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Team result = await teams.create( + teamId: '', + name: '', + roles: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-flutter/examples/teams/delete-membership.md new file mode 100644 index 0000000000..0f1941d88b --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/delete-membership.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +await teams.deleteMembership( + teamId: '', + membershipId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/delete.md b/docs/examples/1.8.x/client-flutter/examples/teams/delete.md new file mode 100644 index 0000000000..74c74c9cf1 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/delete.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +await teams.delete( + teamId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/get-membership.md b/docs/examples/1.8.x/client-flutter/examples/teams/get-membership.md new file mode 100644 index 0000000000..468e02cf32 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/get-membership.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.getMembership( + teamId: '', + membershipId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-flutter/examples/teams/get-prefs.md new file mode 100644 index 0000000000..a22c78869c --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/get-prefs.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Preferences result = await teams.getPrefs( + teamId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/get.md b/docs/examples/1.8.x/client-flutter/examples/teams/get.md new file mode 100644 index 0000000000..5e8c3463ea --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/get.md @@ -0,0 +1,11 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Team result = await teams.get( + teamId: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-flutter/examples/teams/list-memberships.md new file mode 100644 index 0000000000..374dd49069 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/list-memberships.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +MembershipList result = await teams.listMemberships( + teamId: '', + queries: [], // optional + search: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/list.md b/docs/examples/1.8.x/client-flutter/examples/teams/list.md new file mode 100644 index 0000000000..3aa972fb5f --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/list.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +TeamList result = await teams.list( + queries: [], // optional + search: '', // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-flutter/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..1ce3eacb79 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/update-membership-status.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.updateMembershipStatus( + teamId: '', + membershipId: '', + userId: '', + secret: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/update-membership.md b/docs/examples/1.8.x/client-flutter/examples/teams/update-membership.md new file mode 100644 index 0000000000..bc2bbae75c --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/update-membership.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Membership result = await teams.updateMembership( + teamId: '', + membershipId: '', + roles: [], +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/update-name.md b/docs/examples/1.8.x/client-flutter/examples/teams/update-name.md new file mode 100644 index 0000000000..8f1794587e --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/update-name.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Team result = await teams.updateName( + teamId: '', + name: '', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-flutter/examples/teams/update-prefs.md new file mode 100644 index 0000000000..7b33c8c313 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/teams/update-prefs.md @@ -0,0 +1,12 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +Preferences result = await teams.updatePrefs( + teamId: '', + prefs: {}, +); diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-graphql/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..92c12acee5 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-anonymous-session.md @@ -0,0 +1,33 @@ +mutation { + accountCreateAnonymousSession { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-graphql/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..931bb4add0 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-email-password-session.md @@ -0,0 +1,36 @@ +mutation { + accountCreateEmailPasswordSession( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-email-token.md b/docs/examples/1.8.x/client-graphql/examples/account/create-email-token.md new file mode 100644 index 0000000000..de320b45ed --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +mutation { + accountCreateEmailToken( + userId: "", + email: "email@example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-graphql/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a5204f1256 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-j-w-t.md @@ -0,0 +1,5 @@ +mutation { + accountCreateJWT { + jwt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-graphql/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..4024a5b3a9 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +mutation { + accountCreateMagicURLToken( + userId: "", + email: "email@example.com", + url: "https://example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..6b29292494 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-authenticator.md @@ -0,0 +1,8 @@ +mutation { + accountCreateMfaAuthenticator( + type: "totp" + ) { + secret + uri + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..eb5cba127d --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-challenge.md @@ -0,0 +1,10 @@ +mutation { + accountCreateMfaChallenge( + factor: "email" + ) { + _id + _createdAt + userId + expire + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..f39b7d080d --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +mutation { + accountCreateMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-graphql/examples/account/create-phone-token.md new file mode 100644 index 0000000000..b56c4eb4e4 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +mutation { + accountCreatePhoneToken( + userId: "", + phone: "+12065550100" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-graphql/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..a4cad59b1a --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +mutation { + accountCreatePhoneVerification { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-push-target.md b/docs/examples/1.8.x/client-graphql/examples/account/create-push-target.md new file mode 100644 index 0000000000..63802a782e --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-push-target.md @@ -0,0 +1,17 @@ +mutation { + accountCreatePushTarget( + targetId: "", + identifier: "", + providerId: "" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-recovery.md b/docs/examples/1.8.x/client-graphql/examples/account/create-recovery.md new file mode 100644 index 0000000000..ad31fd82d7 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +mutation { + accountCreateRecovery( + email: "email@example.com", + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-session.md b/docs/examples/1.8.x/client-graphql/examples/account/create-session.md new file mode 100644 index 0000000000..f473d14207 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-session.md @@ -0,0 +1,36 @@ +mutation { + accountCreateSession( + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create-verification.md b/docs/examples/1.8.x/client-graphql/examples/account/create-verification.md new file mode 100644 index 0000000000..df50dda529 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create-verification.md @@ -0,0 +1,12 @@ +mutation { + accountCreateVerification( + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/create.md b/docs/examples/1.8.x/client-graphql/examples/account/create.md new file mode 100644 index 0000000000..0d39394a3d --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/create.md @@ -0,0 +1,40 @@ +mutation { + accountCreate( + userId: "", + email: "email@example.com", + password: "", + name: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/delete-identity.md b/docs/examples/1.8.x/client-graphql/examples/account/delete-identity.md new file mode 100644 index 0000000000..f3c2e2e7b9 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/delete-identity.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteIdentity( + identityId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-graphql/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..fc5486623a --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteMfaAuthenticator( + type: "totp" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-graphql/examples/account/delete-push-target.md new file mode 100644 index 0000000000..894c0b2e02 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/delete-push-target.md @@ -0,0 +1,7 @@ +mutation { + accountDeletePushTarget( + targetId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/delete-session.md b/docs/examples/1.8.x/client-graphql/examples/account/delete-session.md new file mode 100644 index 0000000000..09aff38fdd --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/delete-session.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteSession( + sessionId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-graphql/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b0d61daa81 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/delete-sessions.md @@ -0,0 +1,5 @@ +mutation { + accountDeleteSessions { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-graphql/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/get-prefs.md b/docs/examples/1.8.x/client-graphql/examples/account/get-prefs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/get-session.md b/docs/examples/1.8.x/client-graphql/examples/account/get-session.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/get.md b/docs/examples/1.8.x/client-graphql/examples/account/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/list-identities.md b/docs/examples/1.8.x/client-graphql/examples/account/list-identities.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/list-logs.md b/docs/examples/1.8.x/client-graphql/examples/account/list-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-graphql/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/list-sessions.md b/docs/examples/1.8.x/client-graphql/examples/account/list-sessions.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-email.md b/docs/examples/1.8.x/client-graphql/examples/account/update-email.md new file mode 100644 index 0000000000..c879e24a43 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-email.md @@ -0,0 +1,38 @@ +mutation { + accountUpdateEmail( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-graphql/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..787c2e0860 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-m-f-a.md @@ -0,0 +1,37 @@ +mutation { + accountUpdateMFA( + mfa: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-graphql/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..075bc91d17 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,36 @@ +mutation { + accountUpdateMagicURLSession( + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9cfe9150be --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-authenticator.md @@ -0,0 +1,38 @@ +mutation { + accountUpdateMfaAuthenticator( + type: "totp", + otp: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..0bcec2157f --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-challenge.md @@ -0,0 +1,36 @@ +mutation { + accountUpdateMfaChallenge( + challengeId: "", + otp: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e706d2b9d7 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +mutation { + accountUpdateMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-name.md b/docs/examples/1.8.x/client-graphql/examples/account/update-name.md new file mode 100644 index 0000000000..8ba2c99d9c --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-name.md @@ -0,0 +1,37 @@ +mutation { + accountUpdateName( + name: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-password.md b/docs/examples/1.8.x/client-graphql/examples/account/update-password.md new file mode 100644 index 0000000000..f3619a10d2 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-password.md @@ -0,0 +1,38 @@ +mutation { + accountUpdatePassword( + password: "", + oldPassword: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-graphql/examples/account/update-phone-session.md new file mode 100644 index 0000000000..199e774ab0 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-phone-session.md @@ -0,0 +1,36 @@ +mutation { + accountUpdatePhoneSession( + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-graphql/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..dd62298bb9 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +mutation { + accountUpdatePhoneVerification( + userId: "", + secret: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-phone.md b/docs/examples/1.8.x/client-graphql/examples/account/update-phone.md new file mode 100644 index 0000000000..adecb71168 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-phone.md @@ -0,0 +1,38 @@ +mutation { + accountUpdatePhone( + phone: "+12065550100", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-prefs.md b/docs/examples/1.8.x/client-graphql/examples/account/update-prefs.md new file mode 100644 index 0000000000..57280247e4 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-prefs.md @@ -0,0 +1,37 @@ +mutation { + accountUpdatePrefs( + prefs: "{}" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-push-target.md b/docs/examples/1.8.x/client-graphql/examples/account/update-push-target.md new file mode 100644 index 0000000000..3c402cdf12 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-push-target.md @@ -0,0 +1,16 @@ +mutation { + accountUpdatePushTarget( + targetId: "", + identifier: "" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-recovery.md b/docs/examples/1.8.x/client-graphql/examples/account/update-recovery.md new file mode 100644 index 0000000000..2d15fdcaa1 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +mutation { + accountUpdateRecovery( + userId: "", + secret: "", + password: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-session.md b/docs/examples/1.8.x/client-graphql/examples/account/update-session.md new file mode 100644 index 0000000000..29a8979872 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-session.md @@ -0,0 +1,35 @@ +mutation { + accountUpdateSession( + sessionId: "" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-status.md b/docs/examples/1.8.x/client-graphql/examples/account/update-status.md new file mode 100644 index 0000000000..c17f556842 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-status.md @@ -0,0 +1,35 @@ +mutation { + accountUpdateStatus { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/account/update-verification.md b/docs/examples/1.8.x/client-graphql/examples/account/update-verification.md new file mode 100644 index 0000000000..11e63c7da3 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/account/update-verification.md @@ -0,0 +1,13 @@ +mutation { + accountUpdateVerification( + userId: "", + secret: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-browser.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-flag.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-image.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-image.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-initials.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-graphql/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/create-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/create-document.md new file mode 100644 index 0000000000..4f525d6b1f --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/create-document.md @@ -0,0 +1,18 @@ +mutation { + databasesCreateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/create-documents.md b/docs/examples/1.8.x/client-graphql/examples/databases/create-documents.md new file mode 100644 index 0000000000..8ce79dcbb5 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/create-documents.md @@ -0,0 +1,19 @@ +mutation { + databasesCreateDocuments( + databaseId: "", + collectionId: "", + documents: [] + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/delete-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/delete-document.md new file mode 100644 index 0000000000..848371bca0 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteDocument( + databaseId: "", + collectionId: "", + documentId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/get-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/get-document.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/list-documents.md b/docs/examples/1.8.x/client-graphql/examples/databases/list-documents.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/update-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/update-document.md new file mode 100644 index 0000000000..aea605d9d7 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/update-document.md @@ -0,0 +1,18 @@ +mutation { + databasesUpdateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md new file mode 100644 index 0000000000..c381fe35a3 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md @@ -0,0 +1,16 @@ +mutation { + databasesUpsertDocument( + databaseId: "", + collectionId: "", + documentId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md b/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md new file mode 100644 index 0000000000..1479aa3bb6 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md @@ -0,0 +1,35 @@ +mutation { + functionsCreateExecution( + functionId: "", + body: "", + async: false, + path: "", + method: "GET", + headers: "{}", + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/functions/get-execution.md b/docs/examples/1.8.x/client-graphql/examples/functions/get-execution.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/functions/list-executions.md b/docs/examples/1.8.x/client-graphql/examples/functions/list-executions.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/get.md b/docs/examples/1.8.x/client-graphql/examples/locale/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-codes.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-codes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-continents.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-continents.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-countries.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-countries.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-currencies.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/locale/list-languages.md b/docs/examples/1.8.x/client-graphql/examples/locale/list-languages.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-graphql/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..bab53612b7 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/messaging/create-subscriber.md @@ -0,0 +1,27 @@ +mutation { + messagingCreateSubscriber( + topicId: "", + subscriberId: "", + targetId: "" + ) { + _id + _createdAt + _updatedAt + targetId + target { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + userId + userName + topicId + providerType + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-graphql/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..ededffcaac --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/messaging/delete-subscriber.md @@ -0,0 +1,8 @@ +mutation { + messagingDeleteSubscriber( + topicId: "", + subscriberId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md b/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md new file mode 100644 index 0000000000..97e2150c39 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md @@ -0,0 +1,25 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file, permissions: $permissions) { id }" }, "variables": { "bucketId": "", "fileId": "", "file": null, "permissions": ["read("any")"] } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.file"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="file.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/delete-file.md b/docs/examples/1.8.x/client-graphql/examples/storage/delete-file.md new file mode 100644 index 0000000000..17ec89931a --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/storage/delete-file.md @@ -0,0 +1,8 @@ +mutation { + storageDeleteFile( + bucketId: "", + fileId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-graphql/examples/storage/get-file-download.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-graphql/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-graphql/examples/storage/get-file-view.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/get-file.md b/docs/examples/1.8.x/client-graphql/examples/storage/get-file.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/list-files.md b/docs/examples/1.8.x/client-graphql/examples/storage/list-files.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/update-file.md b/docs/examples/1.8.x/client-graphql/examples/storage/update-file.md new file mode 100644 index 0000000000..b7832048c7 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/storage/update-file.md @@ -0,0 +1,20 @@ +mutation { + storageUpdateFile( + bucketId: "", + fileId: "", + name: "", + permissions: ["read("any")"] + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md new file mode 100644 index 0000000000..c88a7f36cf --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md @@ -0,0 +1,18 @@ +mutation { + tablesCreateRow( + databaseId: "", + tableId: "", + rowId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md b/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md new file mode 100644 index 0000000000..a4ae62cfae --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md @@ -0,0 +1,19 @@ +mutation { + tablesCreateRows( + databaseId: "", + tableId: "", + rows: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md new file mode 100644 index 0000000000..f3a35c1df1 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md @@ -0,0 +1,9 @@ +mutation { + tablesDeleteRow( + databaseId: "", + tableId: "", + rowId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/get-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/get-row.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md b/docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md new file mode 100644 index 0000000000..8449d8499b --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md @@ -0,0 +1,18 @@ +mutation { + tablesUpdateRow( + databaseId: "", + tableId: "", + rowId: "", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md new file mode 100644 index 0000000000..480d7651bd --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +mutation { + tablesUpsertRow( + databaseId: "", + tableId: "", + rowId: "" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/create-membership.md b/docs/examples/1.8.x/client-graphql/examples/teams/create-membership.md new file mode 100644 index 0000000000..fe741f080d --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/create-membership.md @@ -0,0 +1,25 @@ +mutation { + teamsCreateMembership( + teamId: "", + roles: [], + email: "email@example.com", + userId: "", + phone: "+12065550100", + url: "https://example.com", + name: "" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/create.md b/docs/examples/1.8.x/client-graphql/examples/teams/create.md new file mode 100644 index 0000000000..1f2a7ab3f2 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/create.md @@ -0,0 +1,16 @@ +mutation { + teamsCreate( + teamId: "", + name: "", + roles: [] + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-graphql/examples/teams/delete-membership.md new file mode 100644 index 0000000000..e391b6f6fa --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/delete-membership.md @@ -0,0 +1,8 @@ +mutation { + teamsDeleteMembership( + teamId: "", + membershipId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/delete.md b/docs/examples/1.8.x/client-graphql/examples/teams/delete.md new file mode 100644 index 0000000000..df0d36c5b5 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/delete.md @@ -0,0 +1,7 @@ +mutation { + teamsDelete( + teamId: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/get-membership.md b/docs/examples/1.8.x/client-graphql/examples/teams/get-membership.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-graphql/examples/teams/get-prefs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/get.md b/docs/examples/1.8.x/client-graphql/examples/teams/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-graphql/examples/teams/list-memberships.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/list.md b/docs/examples/1.8.x/client-graphql/examples/teams/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-graphql/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9b24450a86 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/update-membership-status.md @@ -0,0 +1,22 @@ +mutation { + teamsUpdateMembershipStatus( + teamId: "", + membershipId: "", + userId: "", + secret: "" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/update-membership.md b/docs/examples/1.8.x/client-graphql/examples/teams/update-membership.md new file mode 100644 index 0000000000..1c6a04f078 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/update-membership.md @@ -0,0 +1,21 @@ +mutation { + teamsUpdateMembership( + teamId: "", + membershipId: "", + roles: [] + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/update-name.md b/docs/examples/1.8.x/client-graphql/examples/teams/update-name.md new file mode 100644 index 0000000000..c40543b5cd --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/update-name.md @@ -0,0 +1,15 @@ +mutation { + teamsUpdateName( + teamId: "", + name: "" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-graphql/examples/teams/update-prefs.md new file mode 100644 index 0000000000..95737e33f9 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/teams/update-prefs.md @@ -0,0 +1,8 @@ +mutation { + teamsUpdatePrefs( + teamId: "", + prefs: "{}" + ) { + data + } +} diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-react-native/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..4baad33e9d --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-react-native/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..217d7873ae --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-email-token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-email-token.md new file mode 100644 index 0000000000..b9bdf3bbe2 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailToken( + '', // userId + 'email@example.com', // email + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-react-native/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..217dc78785 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createJWT(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..413e347aef --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMagicURLToken( + '', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..ec243490aa --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..04de25863f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticationFactor } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..f256be308b --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..84bddb4777 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2session.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..cd4ee86aa1 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-o-auth2token.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-react-native/examples/account/create-phone-token.md new file mode 100644 index 0000000000..d03e5ea4bc --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneToken( + '', // userId + '+12065550100' // phone +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-react-native/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..62bcc48113 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-push-target.md b/docs/examples/1.8.x/client-react-native/examples/account/create-push-target.md new file mode 100644 index 0000000000..83211ab9f3 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-push-target.md @@ -0,0 +1,15 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPushTarget( + '', // targetId + '', // identifier + '' // providerId (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-recovery.md b/docs/examples/1.8.x/client-react-native/examples/account/create-recovery.md new file mode 100644 index 0000000000..802af82fb7 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-session.md b/docs/examples/1.8.x/client-react-native/examples/account/create-session.md new file mode 100644 index 0000000000..bb3040aef6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create-verification.md b/docs/examples/1.8.x/client-react-native/examples/account/create-verification.md new file mode 100644 index 0000000000..5fdffcba5c --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/create.md b/docs/examples/1.8.x/client-react-native/examples/account/create.md new file mode 100644 index 0000000000..eb3d04ac54 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/create.md @@ -0,0 +1,16 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.create( + '', // userId + 'email@example.com', // email + '', // password + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-identity.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-identity.md new file mode 100644 index 0000000000..df492a528d --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteIdentity( + '' // identityId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..093ba4d5a2 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-push-target.md new file mode 100644 index 0000000000..a926ede9c6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-push-target.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deletePushTarget( + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-session.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-session.md new file mode 100644 index 0000000000..134a2caa56 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-react-native/examples/account/delete-sessions.md new file mode 100644 index 0000000000..830eb273a8 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-react-native/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..c660a17ab8 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/get-prefs.md b/docs/examples/1.8.x/client-react-native/examples/account/get-prefs.md new file mode 100644 index 0000000000..b26a7b09f0 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/get-session.md b/docs/examples/1.8.x/client-react-native/examples/account/get-session.md new file mode 100644 index 0000000000..1db05d5c26 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/get-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/get.md b/docs/examples/1.8.x/client-react-native/examples/account/get.md new file mode 100644 index 0000000000..21d2401601 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/get.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/list-identities.md b/docs/examples/1.8.x/client-react-native/examples/account/list-identities.md new file mode 100644 index 0000000000..239dbbf21f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/list-logs.md b/docs/examples/1.8.x/client-react-native/examples/account/list-logs.md new file mode 100644 index 0000000000..9cf441453c --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-react-native/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..51b76c90e4 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listMfaFactors(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/list-sessions.md b/docs/examples/1.8.x/client-react-native/examples/account/list-sessions.md new file mode 100644 index 0000000000..68232be292 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-email.md b/docs/examples/1.8.x/client-react-native/examples/account/update-email.md new file mode 100644 index 0000000000..4bbe0b03e7 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-email.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-react-native/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..ebbfc0c8cd --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFA( + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-react-native/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..c5e6b61395 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMagicURLSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..07a798e7a6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Account, AuthenticatorType } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..b93e0bf520 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaChallenge( + '', // challengeId + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..2ed9bb0204 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-name.md b/docs/examples/1.8.x/client-react-native/examples/account/update-name.md new file mode 100644 index 0000000000..adbbcab5be --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-name.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateName( + '' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-password.md b/docs/examples/1.8.x/client-react-native/examples/account/update-password.md new file mode 100644 index 0000000000..3bde58e68a --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-password.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-react-native/examples/account/update-phone-session.md new file mode 100644 index 0000000000..c9c82696fc --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-react-native/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..0ef7e53e66 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-phone.md b/docs/examples/1.8.x/client-react-native/examples/account/update-phone.md new file mode 100644 index 0000000000..bf8aae2a3d --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-prefs.md b/docs/examples/1.8.x/client-react-native/examples/account/update-prefs.md new file mode 100644 index 0000000000..01d4fd6878 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePrefs( + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-push-target.md b/docs/examples/1.8.x/client-react-native/examples/account/update-push-target.md new file mode 100644 index 0000000000..d88e22e04d --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-push-target.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePushTarget( + '', // targetId + '' // identifier +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-recovery.md b/docs/examples/1.8.x/client-react-native/examples/account/update-recovery.md new file mode 100644 index 0000000000..9a5ef04f3a --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecovery( + '', // userId + '', // secret + '' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-session.md b/docs/examples/1.8.x/client-react-native/examples/account/update-session.md new file mode 100644 index 0000000000..0c8a9e5df3 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-status.md b/docs/examples/1.8.x/client-react-native/examples/account/update-status.md new file mode 100644 index 0000000000..8d3a2b0698 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-status.md @@ -0,0 +1,11 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/account/update-verification.md b/docs/examples/1.8.x/client-react-native/examples/account/update-verification.md new file mode 100644 index 0000000000..c956d5fcd6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-browser.md new file mode 100644 index 0000000000..433cbe5999 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Browser } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..bbd0007fe0 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import { Client, Avatars, CreditCard } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..ff48c76ffc --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import { Client, Avatars } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-flag.md new file mode 100644 index 0000000000..4e6070d190 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Flag } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-image.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-image.md new file mode 100644 index 0000000000..006155effd --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-initials.md new file mode 100644 index 0000000000..a87a643450 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-react-native/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..177759d9ef --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md new file mode 100644 index 0000000000..ec768fcfaf --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.createDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/create-documents.md b/docs/examples/1.8.x/client-react-native/examples/databases/create-documents.md new file mode 100644 index 0000000000..c0a8f1d03c --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/create-documents.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +const databases = new Databases(client); + +const result = await databases.createDocuments( + '', // databaseId + '', // collectionId + [] // documents +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/delete-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/delete-document.md new file mode 100644 index 0000000000..9136107a3c --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/get-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/get-document.md new file mode 100644 index 0000000000..9993e2c941 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDocument( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/list-documents.md b/docs/examples/1.8.x/client-react-native/examples/databases/list-documents.md new file mode 100644 index 0000000000..b2f377e53c --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/update-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/update-document.md new file mode 100644 index 0000000000..7676ee109b --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md new file mode 100644 index 0000000000..56d3af23ae --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.upsertDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md b/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md new file mode 100644 index 0000000000..72c71f7767 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import { Client, Functions, ExecutionMethod } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createExecution( + '', // functionId + '', // body (optional) + false, // async (optional) + '', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/functions/get-execution.md b/docs/examples/1.8.x/client-react-native/examples/functions/get-execution.md new file mode 100644 index 0000000000..848747ea2f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/functions/list-executions.md b/docs/examples/1.8.x/client-react-native/examples/functions/list-executions.md new file mode 100644 index 0000000000..346f8c7ea8 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listExecutions( + '', // functionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/graphql/mutation.md b/docs/examples/1.8.x/client-react-native/examples/graphql/mutation.md new file mode 100644 index 0000000000..3292a5dad2 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.mutation( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/graphql/query.md b/docs/examples/1.8.x/client-react-native/examples/graphql/query.md new file mode 100644 index 0000000000..a00c517a46 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/graphql/query.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.query( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/get.md b/docs/examples/1.8.x/client-react-native/examples/locale/get.md new file mode 100644 index 0000000000..34c1672c53 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/get.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-codes.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-codes.md new file mode 100644 index 0000000000..29cec5a5cf --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-continents.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-continents.md new file mode 100644 index 0000000000..c98ba19af3 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listContinents(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..7fb71a548d --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..612debc5ab --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-countries.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-countries.md new file mode 100644 index 0000000000..8b1f636fa6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountries(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-currencies.md new file mode 100644 index 0000000000..4b96a5fdbc --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCurrencies(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/locale/list-languages.md b/docs/examples/1.8.x/client-react-native/examples/locale/list-languages.md new file mode 100644 index 0000000000..54166afb1e --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-react-native/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..c950e90bae --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSubscriber( + '', // topicId + '', // subscriberId + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-react-native/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..5004b59cac --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber( + '', // topicId + '' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/create-file.md b/docs/examples/1.8.x/client-react-native/examples/storage/create-file.md new file mode 100644 index 0000000000..efbfd607c1 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createFile( + '', // bucketId + '', // fileId + await pickSingle(), // file + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/delete-file.md b/docs/examples/1.8.x/client-react-native/examples/storage/delete-file.md new file mode 100644 index 0000000000..1a436ac8a8 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteFile( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-download.md new file mode 100644 index 0000000000..e21bad67eb --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '', // bucketId + '', // fileId + '' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..6f116c5df6 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '', // bucketId + '', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg, // output (optional) + '' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-view.md new file mode 100644 index 0000000000..9b229f6a54 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileView( + '', // bucketId + '', // fileId + '' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/get-file.md b/docs/examples/1.8.x/client-react-native/examples/storage/get-file.md new file mode 100644 index 0000000000..6d358adabd --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getFile( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/list-files.md b/docs/examples/1.8.x/client-react-native/examples/storage/list-files.md new file mode 100644 index 0000000000..19099b1288 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listFiles( + '', // bucketId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/storage/update-file.md b/docs/examples/1.8.x/client-react-native/examples/storage/update-file.md new file mode 100644 index 0000000000..d4ed68a337 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateFile( + '', // bucketId + '', // fileId + '', // name (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md new file mode 100644 index 0000000000..75de1c2a39 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.createRow( + '', // databaseId + '', // tableId + '', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md b/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md new file mode 100644 index 0000000000..165aa4cb71 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +const tables = new Tables(client); + +const result = await tables.createRows( + '', // databaseId + '', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md new file mode 100644 index 0000000000..9746f85ea0 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteRow( + '', // databaseId + '', // tableId + '' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md new file mode 100644 index 0000000000..b9434e3957 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getRow( + '', // databaseId + '', // tableId + '', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md b/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md new file mode 100644 index 0000000000..75f81a1435 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listRows( + '', // databaseId + '', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md new file mode 100644 index 0000000000..7bb36dd254 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRow( + '', // databaseId + '', // tableId + '', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md new file mode 100644 index 0000000000..f176425abb --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.upsertRow( + '', // databaseId + '', // tableId + '' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/create-membership.md b/docs/examples/1.8.x/client-react-native/examples/teams/create-membership.md new file mode 100644 index 0000000000..680fdb2ad8 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createMembership( + '', // teamId + [], // roles + 'email@example.com', // email (optional) + '', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/create.md b/docs/examples/1.8.x/client-react-native/examples/teams/create.md new file mode 100644 index 0000000000..51aaee358e --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/create.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.create( + '', // teamId + '', // name + [] // roles (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-react-native/examples/teams/delete-membership.md new file mode 100644 index 0000000000..37bdc7f87f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteMembership( + '', // teamId + '' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/delete.md b/docs/examples/1.8.x/client-react-native/examples/teams/delete.md new file mode 100644 index 0000000000..fe67eaffd1 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/delete.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.delete( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/get-membership.md b/docs/examples/1.8.x/client-react-native/examples/teams/get-membership.md new file mode 100644 index 0000000000..2b253c8b51 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getMembership( + '', // teamId + '' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-react-native/examples/teams/get-prefs.md new file mode 100644 index 0000000000..943ed1a181 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getPrefs( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/get.md b/docs/examples/1.8.x/client-react-native/examples/teams/get.md new file mode 100644 index 0000000000..9267b57e2f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/get.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.get( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-react-native/examples/teams/list-memberships.md new file mode 100644 index 0000000000..4444bcd664 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listMemberships( + '', // teamId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/list.md b/docs/examples/1.8.x/client-react-native/examples/teams/list.md new file mode 100644 index 0000000000..779538a70a --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/list.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-react-native/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c8edbf08c7 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembershipStatus( + '', // teamId + '', // membershipId + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/update-membership.md b/docs/examples/1.8.x/client-react-native/examples/teams/update-membership.md new file mode 100644 index 0000000000..347cbdd095 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembership( + '', // teamId + '', // membershipId + [] // roles +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/update-name.md b/docs/examples/1.8.x/client-react-native/examples/teams/update-name.md new file mode 100644 index 0000000000..0ab4aa1c84 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateName( + '', // teamId + '' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-react-native/examples/teams/update-prefs.md new file mode 100644 index 0000000000..fda16a05db --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updatePrefs( + '', // teamId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..2079b045d1 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md @@ -0,0 +1,6 @@ +POST /v1/account/sessions/anonymous HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..8aee0e5b15 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md new file mode 100644 index 0000000000..98c5c9b454 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md @@ -0,0 +1,11 @@ +POST /v1/account/tokens/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "email": "email@example.com", + "phrase": false +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a8da4695c3 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md @@ -0,0 +1,6 @@ +POST /v1/account/jwts HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..a3db43516a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,12 @@ +POST /v1/account/tokens/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "email": "email@example.com", + "url": "https://example.com", + "phrase": false +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..8d6b52b877 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md @@ -0,0 +1,8 @@ +POST /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..9a84c0ef69 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md @@ -0,0 +1,9 @@ +POST /v1/account/mfa/challenge HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "factor": "email" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..797824d5d7 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +POST /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..293170b490 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md @@ -0,0 +1,4 @@ +GET /v1/account/sessions/oauth2/{provider} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..dd1dd3ec5e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md @@ -0,0 +1,4 @@ +GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md new file mode 100644 index 0000000000..eef1021d9e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md @@ -0,0 +1,10 @@ +POST /v1/account/tokens/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "phone": "+12065550100" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..d161e580ff --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md @@ -0,0 +1,8 @@ +POST /v1/account/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md new file mode 100644 index 0000000000..5844ccc19e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md @@ -0,0 +1,12 @@ +POST /v1/account/targets/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: + +{ + "targetId": "", + "identifier": "", + "providerId": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md b/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md new file mode 100644 index 0000000000..c195b96a5e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md @@ -0,0 +1,12 @@ +POST /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "email": "email@example.com", + "url": "https://example.com" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-session.md new file mode 100644 index 0000000000..18e3b1acdd --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/token HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-verification.md b/docs/examples/1.8.x/client-rest/examples/account/create-verification.md new file mode 100644 index 0000000000..1185d3a875 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create-verification.md @@ -0,0 +1,11 @@ +POST /v1/account/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "url": "https://example.com" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/create.md b/docs/examples/1.8.x/client-rest/examples/account/create.md new file mode 100644 index 0000000000..f546c07de5 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/create.md @@ -0,0 +1,12 @@ +POST /v1/account HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "email": "email@example.com", + "password": , + "name": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md b/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md new file mode 100644 index 0000000000..edb036a593 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md @@ -0,0 +1,8 @@ +DELETE /v1/account/identities/{identityId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..de58948195 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,8 @@ +DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md new file mode 100644 index 0000000000..fdfc75a41b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md @@ -0,0 +1,7 @@ +DELETE /v1/account/targets/{targetId}/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-session.md b/docs/examples/1.8.x/client-rest/examples/account/delete-session.md new file mode 100644 index 0000000000..9454a84913 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-session.md @@ -0,0 +1,8 @@ +DELETE /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md new file mode 100644 index 0000000000..97931c12e5 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md @@ -0,0 +1,8 @@ +DELETE /v1/account/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..81edee5234 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,6 @@ +GET /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md b/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md new file mode 100644 index 0000000000..13a0b74d8f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md @@ -0,0 +1,6 @@ +GET /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-session.md b/docs/examples/1.8.x/client-rest/examples/account/get-session.md new file mode 100644 index 0000000000..9417755b04 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/get-session.md @@ -0,0 +1,6 @@ +GET /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/get.md b/docs/examples/1.8.x/client-rest/examples/account/get.md new file mode 100644 index 0000000000..023a6d116f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/get.md @@ -0,0 +1,6 @@ +GET /v1/account HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-identities.md b/docs/examples/1.8.x/client-rest/examples/account/list-identities.md new file mode 100644 index 0000000000..65edceb8d6 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/list-identities.md @@ -0,0 +1,6 @@ +GET /v1/account/identities HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-logs.md b/docs/examples/1.8.x/client-rest/examples/account/list-logs.md new file mode 100644 index 0000000000..71e2e138ef --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/list-logs.md @@ -0,0 +1,6 @@ +GET /v1/account/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..217ec6cb30 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md @@ -0,0 +1,6 @@ +GET /v1/account/mfa/factors HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md b/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md new file mode 100644 index 0000000000..7bff23f25b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md @@ -0,0 +1,6 @@ +GET /v1/account/sessions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-email.md b/docs/examples/1.8.x/client-rest/examples/account/update-email.md new file mode 100644 index 0000000000..fc3baaf4a4 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-email.md @@ -0,0 +1,12 @@ +PATCH /v1/account/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..803c47a857 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md @@ -0,0 +1,11 @@ +PATCH /v1/account/mfa HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "mfa": false +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..3238322e0f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9d3e5dceea --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md @@ -0,0 +1,11 @@ +PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "otp": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..ddc27ae334 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md @@ -0,0 +1,12 @@ +PUT /v1/account/mfa/challenge HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "challengeId": "", + "otp": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e4ab8abb3b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +PATCH /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-name.md b/docs/examples/1.8.x/client-rest/examples/account/update-name.md new file mode 100644 index 0000000000..f2f7caa204 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-name.md @@ -0,0 +1,11 @@ +PATCH /v1/account/name HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "name": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-password.md b/docs/examples/1.8.x/client-rest/examples/account/update-password.md new file mode 100644 index 0000000000..4f69b9ab3f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-password.md @@ -0,0 +1,12 @@ +PATCH /v1/account/password HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "password": , + "oldPassword": "password" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md new file mode 100644 index 0000000000..f1bc27d201 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..ee6f5a68ff --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md @@ -0,0 +1,12 @@ +PUT /v1/account/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone.md new file mode 100644 index 0000000000..bbe602a181 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone.md @@ -0,0 +1,12 @@ +PATCH /v1/account/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "phone": "+12065550100", + "password": "password" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md b/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md new file mode 100644 index 0000000000..aeabc2b68f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md @@ -0,0 +1,11 @@ +PATCH /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "prefs": {} +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md new file mode 100644 index 0000000000..2e42a2d67f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md @@ -0,0 +1,10 @@ +PUT /v1/account/targets/{targetId}/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: + +{ + "identifier": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md b/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md new file mode 100644 index 0000000000..054aacc8ed --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md @@ -0,0 +1,13 @@ +PUT /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "userId": "", + "secret": "", + "password": +} diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-session.md new file mode 100644 index 0000000000..9b2ba0e4a7 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-session.md @@ -0,0 +1,8 @@ +PATCH /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-status.md b/docs/examples/1.8.x/client-rest/examples/account/update-status.md new file mode 100644 index 0000000000..8a3e01db0b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-status.md @@ -0,0 +1,8 @@ +PATCH /v1/account/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-verification.md b/docs/examples/1.8.x/client-rest/examples/account/update-verification.md new file mode 100644 index 0000000000..0c5ed8b55d --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/account/update-verification.md @@ -0,0 +1,12 @@ +PUT /v1/account/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md new file mode 100644 index 0000000000..e5f6f22ab5 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md @@ -0,0 +1,6 @@ +GET /v1/avatars/browsers/{code} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..ab513115f8 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md @@ -0,0 +1,6 @@ +GET /v1/avatars/credit-cards/{code} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..837dba633c --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md @@ -0,0 +1,6 @@ +GET /v1/avatars/favicon HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md new file mode 100644 index 0000000000..d0c92d7c02 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md @@ -0,0 +1,6 @@ +GET /v1/avatars/flags/{code} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md new file mode 100644 index 0000000000..2f80018f20 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md @@ -0,0 +1,6 @@ +GET /v1/avatars/image HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md new file mode 100644 index 0000000000..f3879b5d52 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md @@ -0,0 +1,6 @@ +GET /v1/avatars/initials HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..263c54742c --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md @@ -0,0 +1,6 @@ +GET /v1/avatars/qr HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/databases/create-document.md b/docs/examples/1.8.x/client-rest/examples/databases/create-document.md new file mode 100644 index 0000000000..3126197555 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/create-document.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "documentId": "", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/databases/create-documents.md b/docs/examples/1.8.x/client-rest/examples/databases/create-documents.md new file mode 100644 index 0000000000..e4d2b956e0 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/create-documents.md @@ -0,0 +1,11 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "documents": [] +} diff --git a/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md b/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md new file mode 100644 index 0000000000..6b86aba853 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md @@ -0,0 +1,8 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/databases/get-document.md b/docs/examples/1.8.x/client-rest/examples/databases/get-document.md new file mode 100644 index 0000000000..a32db40087 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/get-document.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md b/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md new file mode 100644 index 0000000000..22ca529e89 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/databases/update-document.md b/docs/examples/1.8.x/client-rest/examples/databases/update-document.md new file mode 100644 index 0000000000..945b957c6e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/update-document.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md new file mode 100644 index 0000000000..7cfa380a40 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md @@ -0,0 +1,8 @@ +PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md b/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md new file mode 100644 index 0000000000..fec92ddab0 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md @@ -0,0 +1,16 @@ +POST /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "body": "", + "async": false, + "path": "", + "method": "GET", + "headers": {}, + "scheduledAt": +} diff --git a/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md b/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md new file mode 100644 index 0000000000..7df2f3acbe --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md @@ -0,0 +1,6 @@ +GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md b/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md new file mode 100644 index 0000000000..b2ab0e05d1 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md @@ -0,0 +1,6 @@ +GET /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md b/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md new file mode 100644 index 0000000000..db3b1c0c78 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +POST /v1/graphql/mutation HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "query": {} +} diff --git a/docs/examples/1.8.x/client-rest/examples/graphql/query.md b/docs/examples/1.8.x/client-rest/examples/graphql/query.md new file mode 100644 index 0000000000..8fc41efcfe --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/graphql/query.md @@ -0,0 +1,12 @@ +POST /v1/graphql HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "query": {} +} diff --git a/docs/examples/1.8.x/client-rest/examples/locale/get.md b/docs/examples/1.8.x/client-rest/examples/locale/get.md new file mode 100644 index 0000000000..0d67644583 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/get.md @@ -0,0 +1,6 @@ +GET /v1/locale HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md b/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md new file mode 100644 index 0000000000..f362c5987e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md @@ -0,0 +1,6 @@ +GET /v1/locale/codes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md b/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md new file mode 100644 index 0000000000..93db4fb302 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md @@ -0,0 +1,6 @@ +GET /v1/locale/continents HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..09eba6168f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md @@ -0,0 +1,6 @@ +GET /v1/locale/countries/eu HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..94ef0bb943 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md @@ -0,0 +1,6 @@ +GET /v1/locale/countries/phones HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md new file mode 100644 index 0000000000..dc8289980a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md @@ -0,0 +1,6 @@ +GET /v1/locale/countries HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md new file mode 100644 index 0000000000..9a3af20c94 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md @@ -0,0 +1,6 @@ +GET /v1/locale/currencies HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md b/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md new file mode 100644 index 0000000000..7d90c8b40a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md @@ -0,0 +1,6 @@ +GET /v1/locale/languages HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..94e98c4438 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md @@ -0,0 +1,12 @@ +POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-JWT: +X-Appwrite-Session: + +{ + "subscriberId": "", + "targetId": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..e5ac0830a3 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md @@ -0,0 +1,8 @@ +DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-JWT: +X-Appwrite-Session: + diff --git a/docs/examples/1.8.x/client-rest/examples/storage/create-file.md b/docs/examples/1.8.x/client-rest/examples/storage/create-file.md new file mode 100644 index 0000000000..f044b577b2 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/create-file.md @@ -0,0 +1,26 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="fileId" + +"" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="file" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="permissions[]" + +["read(\"any\")"] + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md b/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md new file mode 100644 index 0000000000..8d074341fe --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md @@ -0,0 +1,8 @@ +DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md new file mode 100644 index 0000000000..58c9c6d276 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md @@ -0,0 +1,6 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..ff24de4ec4 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md @@ -0,0 +1,6 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md new file mode 100644 index 0000000000..9c95a2b48f --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md @@ -0,0 +1,6 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file.md new file mode 100644 index 0000000000..ffb3703fe1 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file.md @@ -0,0 +1,6 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/list-files.md b/docs/examples/1.8.x/client-rest/examples/storage/list-files.md new file mode 100644 index 0000000000..d1258b97de --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/list-files.md @@ -0,0 +1,6 @@ +GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/update-file.md b/docs/examples/1.8.x/client-rest/examples/storage/update-file.md new file mode 100644 index 0000000000..210433622b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/storage/update-file.md @@ -0,0 +1,12 @@ +PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "name": "", + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/create-row.md b/docs/examples/1.8.x/client-rest/examples/tables/create-row.md new file mode 100644 index 0000000000..c4166b8b80 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/create-row.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "rowId": "", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md b/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md new file mode 100644 index 0000000000..0935afd11e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md @@ -0,0 +1,11 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "rows": [] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md b/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md new file mode 100644 index 0000000000..954303d17a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md @@ -0,0 +1,8 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/tables/get-row.md b/docs/examples/1.8.x/client-rest/examples/tables/get-row.md new file mode 100644 index 0000000000..fc09601df7 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/get-row.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md b/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md new file mode 100644 index 0000000000..de214e7cea --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/tables/update-row.md b/docs/examples/1.8.x/client-rest/examples/tables/update-row.md new file mode 100644 index 0000000000..f09f639e60 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/update-row.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md new file mode 100644 index 0000000000..60528077ef --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md @@ -0,0 +1,8 @@ +PUT /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md new file mode 100644 index 0000000000..83e4803502 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md @@ -0,0 +1,16 @@ +POST /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "email": "email@example.com", + "userId": "", + "phone": "+12065550100", + "roles": [], + "url": "https://example.com", + "name": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/teams/create.md b/docs/examples/1.8.x/client-rest/examples/teams/create.md new file mode 100644 index 0000000000..c80b2bda8e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/create.md @@ -0,0 +1,13 @@ +POST /v1/teams HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "teamId": "", + "name": "", + "roles": [] +} diff --git a/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md new file mode 100644 index 0000000000..0fc17e11ee --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md @@ -0,0 +1,8 @@ +DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/teams/delete.md b/docs/examples/1.8.x/client-rest/examples/teams/delete.md new file mode 100644 index 0000000000..ad614b17d1 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/delete.md @@ -0,0 +1,8 @@ +DELETE /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md new file mode 100644 index 0000000000..dbe034f34b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md @@ -0,0 +1,6 @@ +GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md new file mode 100644 index 0000000000..ddb863181d --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md @@ -0,0 +1,6 @@ +GET /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get.md b/docs/examples/1.8.x/client-rest/examples/teams/get.md new file mode 100644 index 0000000000..730d23a03b --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/get.md @@ -0,0 +1,6 @@ +GET /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md new file mode 100644 index 0000000000..82a9f82c33 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md @@ -0,0 +1,6 @@ +GET /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/teams/list.md b/docs/examples/1.8.x/client-rest/examples/teams/list.md new file mode 100644 index 0000000000..00a419269a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/list.md @@ -0,0 +1,6 @@ +GET /v1/teams HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9d828118f0 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md @@ -0,0 +1,12 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "userId": "", + "secret": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md new file mode 100644 index 0000000000..3768499d16 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md @@ -0,0 +1,11 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "roles": [] +} diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-name.md b/docs/examples/1.8.x/client-rest/examples/teams/update-name.md new file mode 100644 index 0000000000..ec381348e8 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-name.md @@ -0,0 +1,11 @@ +PUT /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "name": "" +} diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md new file mode 100644 index 0000000000..1db6300350 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md @@ -0,0 +1,11 @@ +PUT /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: +X-Appwrite-Session: +X-Appwrite-JWT: + +{ + "prefs": {} +} diff --git a/docs/examples/1.8.x/client-web/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-web/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..42279c0312 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-web/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..3438ffbe54 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-email-token.md b/docs/examples/1.8.x/client-web/examples/account/create-email-token.md new file mode 100644 index 0000000000..e7cab7c360 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailToken( + '', // userId + 'email@example.com', // email + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-web/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..ff17d60661 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createJWT(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-web/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..ba87bd9a3f --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMagicURLToken( + '', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-web/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..510481511d --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-web/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..e9f6f08b48 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticationFactor } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-web/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..2cc744175e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-web/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..caad309ffd --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-o-auth2session.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.8.x/client-web/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-web/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..5f0aab36d8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-o-auth2token.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.8.x/client-web/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-web/examples/account/create-phone-token.md new file mode 100644 index 0000000000..481e57d353 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneToken( + '', // userId + '+12065550100' // phone +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-web/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..00373a3dd4 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-push-target.md b/docs/examples/1.8.x/client-web/examples/account/create-push-target.md new file mode 100644 index 0000000000..c987e3d2a8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-push-target.md @@ -0,0 +1,15 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPushTarget( + '', // targetId + '', // identifier + '' // providerId (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-recovery.md b/docs/examples/1.8.x/client-web/examples/account/create-recovery.md new file mode 100644 index 0000000000..f0a400d86d --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-session.md b/docs/examples/1.8.x/client-web/examples/account/create-session.md new file mode 100644 index 0000000000..b6d7ef8bbb --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create-verification.md b/docs/examples/1.8.x/client-web/examples/account/create-verification.md new file mode 100644 index 0000000000..4a3b3144b6 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/create.md b/docs/examples/1.8.x/client-web/examples/account/create.md new file mode 100644 index 0000000000..bf2dbec02a --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/create.md @@ -0,0 +1,16 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.create( + '', // userId + 'email@example.com', // email + '', // password + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-identity.md b/docs/examples/1.8.x/client-web/examples/account/delete-identity.md new file mode 100644 index 0000000000..f34baaaf5e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteIdentity( + '' // identityId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-web/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..d11351442c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-web/examples/account/delete-push-target.md new file mode 100644 index 0000000000..79bb06ed5d --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/delete-push-target.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deletePushTarget( + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-session.md b/docs/examples/1.8.x/client-web/examples/account/delete-session.md new file mode 100644 index 0000000000..4d27221d85 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-web/examples/account/delete-sessions.md new file mode 100644 index 0000000000..c0fdf13924 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-web/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..850488b0c8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/get-prefs.md b/docs/examples/1.8.x/client-web/examples/account/get-prefs.md new file mode 100644 index 0000000000..f283832896 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/get-session.md b/docs/examples/1.8.x/client-web/examples/account/get-session.md new file mode 100644 index 0000000000..29af11052e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/get-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/get.md b/docs/examples/1.8.x/client-web/examples/account/get.md new file mode 100644 index 0000000000..ea605914ce --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/get.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/list-identities.md b/docs/examples/1.8.x/client-web/examples/account/list-identities.md new file mode 100644 index 0000000000..54c569b836 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/list-logs.md b/docs/examples/1.8.x/client-web/examples/account/list-logs.md new file mode 100644 index 0000000000..17c214f949 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-web/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..c9fa7da1bc --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listMfaFactors(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/list-sessions.md b/docs/examples/1.8.x/client-web/examples/account/list-sessions.md new file mode 100644 index 0000000000..453e606517 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-email.md b/docs/examples/1.8.x/client-web/examples/account/update-email.md new file mode 100644 index 0000000000..9e02fc9416 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-email.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-web/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..58b6a061b1 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFA( + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-web/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..47501c528f --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMagicURLSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-web/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..74eedd8dc7 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Account, AuthenticatorType } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-web/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..01a09dd354 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaChallenge( + '', // challengeId + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-web/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..24ff10b1e4 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-name.md b/docs/examples/1.8.x/client-web/examples/account/update-name.md new file mode 100644 index 0000000000..d6a6946795 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-name.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateName( + '' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-password.md b/docs/examples/1.8.x/client-web/examples/account/update-password.md new file mode 100644 index 0000000000..575779e35c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-password.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-web/examples/account/update-phone-session.md new file mode 100644 index 0000000000..092205ec6a --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-web/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..1b85178e76 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-phone.md b/docs/examples/1.8.x/client-web/examples/account/update-phone.md new file mode 100644 index 0000000000..0c5ff216d8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-prefs.md b/docs/examples/1.8.x/client-web/examples/account/update-prefs.md new file mode 100644 index 0000000000..b9e88eac28 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePrefs( + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-push-target.md b/docs/examples/1.8.x/client-web/examples/account/update-push-target.md new file mode 100644 index 0000000000..3475a22ba9 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-push-target.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePushTarget( + '', // targetId + '' // identifier +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-recovery.md b/docs/examples/1.8.x/client-web/examples/account/update-recovery.md new file mode 100644 index 0000000000..328e50ea4f --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecovery( + '', // userId + '', // secret + '' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-session.md b/docs/examples/1.8.x/client-web/examples/account/update-session.md new file mode 100644 index 0000000000..4ccc8295d9 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-status.md b/docs/examples/1.8.x/client-web/examples/account/update-status.md new file mode 100644 index 0000000000..932f167033 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-status.md @@ -0,0 +1,11 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/account/update-verification.md b/docs/examples/1.8.x/client-web/examples/account/update-verification.md new file mode 100644 index 0000000000..6d15aeec2e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-web/examples/avatars/get-browser.md new file mode 100644 index 0000000000..08512d1dc7 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Browser } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-web/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..fb631a4e3e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import { Client, Avatars, CreditCard } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-web/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..85317f1383 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-web/examples/avatars/get-flag.md new file mode 100644 index 0000000000..bfbc6c2865 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Flag } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-image.md b/docs/examples/1.8.x/client-web/examples/avatars/get-image.md new file mode 100644 index 0000000000..36f88ecb52 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-web/examples/avatars/get-initials.md new file mode 100644 index 0000000000..321c448807 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-web/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..cbbabbc2c8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/create-document.md b/docs/examples/1.8.x/client-web/examples/databases/create-document.md new file mode 100644 index 0000000000..401a67488c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/create-document.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.createDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/create-documents.md b/docs/examples/1.8.x/client-web/examples/databases/create-documents.md new file mode 100644 index 0000000000..85b1c4cb0a --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/create-documents.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +const databases = new Databases(client); + +const result = await databases.createDocuments( + '', // databaseId + '', // collectionId + [] // documents +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/delete-document.md b/docs/examples/1.8.x/client-web/examples/databases/delete-document.md new file mode 100644 index 0000000000..c9a1e9f759 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/get-document.md b/docs/examples/1.8.x/client-web/examples/databases/get-document.md new file mode 100644 index 0000000000..a2836fc6ef --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDocument( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/list-documents.md b/docs/examples/1.8.x/client-web/examples/databases/list-documents.md new file mode 100644 index 0000000000..d00ac56390 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/update-document.md b/docs/examples/1.8.x/client-web/examples/databases/update-document.md new file mode 100644 index 0000000000..c0e06fce40 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md new file mode 100644 index 0000000000..a581396da8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.upsertDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/functions/create-execution.md b/docs/examples/1.8.x/client-web/examples/functions/create-execution.md new file mode 100644 index 0000000000..8f07523b2b --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import { Client, Functions, ExecutionMethod } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createExecution( + '', // functionId + '', // body (optional) + false, // async (optional) + '', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/functions/get-execution.md b/docs/examples/1.8.x/client-web/examples/functions/get-execution.md new file mode 100644 index 0000000000..9b88f81f6c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/functions/list-executions.md b/docs/examples/1.8.x/client-web/examples/functions/list-executions.md new file mode 100644 index 0000000000..9ec506346c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listExecutions( + '', // functionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/graphql/mutation.md b/docs/examples/1.8.x/client-web/examples/graphql/mutation.md new file mode 100644 index 0000000000..0e7466ac13 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.mutation( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/graphql/query.md b/docs/examples/1.8.x/client-web/examples/graphql/query.md new file mode 100644 index 0000000000..f9cd9b740f --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/graphql/query.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.query( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/get.md b/docs/examples/1.8.x/client-web/examples/locale/get.md new file mode 100644 index 0000000000..bdd74722f4 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/get.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-codes.md b/docs/examples/1.8.x/client-web/examples/locale/list-codes.md new file mode 100644 index 0000000000..547bb056c0 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-continents.md b/docs/examples/1.8.x/client-web/examples/locale/list-continents.md new file mode 100644 index 0000000000..217ffc116c --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listContinents(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-web/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..515a3040ab --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-web/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..72a6a31d08 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-countries.md b/docs/examples/1.8.x/client-web/examples/locale/list-countries.md new file mode 100644 index 0000000000..a127521f36 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountries(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-web/examples/locale/list-currencies.md new file mode 100644 index 0000000000..e6ff0e1fce --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCurrencies(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/locale/list-languages.md b/docs/examples/1.8.x/client-web/examples/locale/list-languages.md new file mode 100644 index 0000000000..03b4e7d2c1 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-web/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..254870985d --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSubscriber( + '', // topicId + '', // subscriberId + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-web/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..3d5d0a4b42 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber( + '', // topicId + '' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/create-file.md b/docs/examples/1.8.x/client-web/examples/storage/create-file.md new file mode 100644 index 0000000000..20a42206a2 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createFile( + '', // bucketId + '', // fileId + document.getElementById('uploader').files[0], // file + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/delete-file.md b/docs/examples/1.8.x/client-web/examples/storage/delete-file.md new file mode 100644 index 0000000000..373cdc03fc --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteFile( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-web/examples/storage/get-file-download.md new file mode 100644 index 0000000000..3ebb8f8f71 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '', // bucketId + '', // fileId + '' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-web/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..ffc64c9f3a --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '', // bucketId + '', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg, // output (optional) + '' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-web/examples/storage/get-file-view.md new file mode 100644 index 0000000000..add5a6fba5 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileView( + '', // bucketId + '', // fileId + '' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/get-file.md b/docs/examples/1.8.x/client-web/examples/storage/get-file.md new file mode 100644 index 0000000000..10bd9fb775 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getFile( + '', // bucketId + '' // fileId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/list-files.md b/docs/examples/1.8.x/client-web/examples/storage/list-files.md new file mode 100644 index 0000000000..f2c3ccb2b8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listFiles( + '', // bucketId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/storage/update-file.md b/docs/examples/1.8.x/client-web/examples/storage/update-file.md new file mode 100644 index 0000000000..1432b85099 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateFile( + '', // bucketId + '', // fileId + '', // name (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/create-row.md b/docs/examples/1.8.x/client-web/examples/tables/create-row.md new file mode 100644 index 0000000000..f7b54d1894 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/create-row.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.createRow( + '', // databaseId + '', // tableId + '', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/create-rows.md b/docs/examples/1.8.x/client-web/examples/tables/create-rows.md new file mode 100644 index 0000000000..79d7d3f311 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +const tables = new Tables(client); + +const result = await tables.createRows( + '', // databaseId + '', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/delete-row.md b/docs/examples/1.8.x/client-web/examples/tables/delete-row.md new file mode 100644 index 0000000000..5c6c4b96d9 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteRow( + '', // databaseId + '', // tableId + '' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/get-row.md b/docs/examples/1.8.x/client-web/examples/tables/get-row.md new file mode 100644 index 0000000000..708b3d96cc --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/get-row.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getRow( + '', // databaseId + '', // tableId + '', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/list-rows.md b/docs/examples/1.8.x/client-web/examples/tables/list-rows.md new file mode 100644 index 0000000000..f82d358f0d --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listRows( + '', // databaseId + '', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/update-row.md b/docs/examples/1.8.x/client-web/examples/tables/update-row.md new file mode 100644 index 0000000000..0e0c5a012e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/update-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRow( + '', // databaseId + '', // tableId + '', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md new file mode 100644 index 0000000000..f111fefd71 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT(''); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.upsertRow( + '', // databaseId + '', // tableId + '' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/create-membership.md b/docs/examples/1.8.x/client-web/examples/teams/create-membership.md new file mode 100644 index 0000000000..8802e25af9 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createMembership( + '', // teamId + [], // roles + 'email@example.com', // email (optional) + '', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/create.md b/docs/examples/1.8.x/client-web/examples/teams/create.md new file mode 100644 index 0000000000..b23f2201ac --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/create.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.create( + '', // teamId + '', // name + [] // roles (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-web/examples/teams/delete-membership.md new file mode 100644 index 0000000000..2f360c3547 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteMembership( + '', // teamId + '' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/delete.md b/docs/examples/1.8.x/client-web/examples/teams/delete.md new file mode 100644 index 0000000000..5fd7f5d858 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/delete.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.delete( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/get-membership.md b/docs/examples/1.8.x/client-web/examples/teams/get-membership.md new file mode 100644 index 0000000000..cd253fd6ef --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getMembership( + '', // teamId + '' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-web/examples/teams/get-prefs.md new file mode 100644 index 0000000000..a7f346f11f --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getPrefs( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/get.md b/docs/examples/1.8.x/client-web/examples/teams/get.md new file mode 100644 index 0000000000..539bdcf051 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/get.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.get( + '' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-web/examples/teams/list-memberships.md new file mode 100644 index 0000000000..e8cc39b5d8 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listMemberships( + '', // teamId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/list.md b/docs/examples/1.8.x/client-web/examples/teams/list.md new file mode 100644 index 0000000000..4ca13ce8dd --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/list.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-web/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..89cc13cac2 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembershipStatus( + '', // teamId + '', // membershipId + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/update-membership.md b/docs/examples/1.8.x/client-web/examples/teams/update-membership.md new file mode 100644 index 0000000000..fd6fffffcb --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembership( + '', // teamId + '', // membershipId + [] // roles +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/update-name.md b/docs/examples/1.8.x/client-web/examples/teams/update-name.md new file mode 100644 index 0000000000..d91939ff73 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateName( + '', // teamId + '' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-web/examples/teams/update-prefs.md new file mode 100644 index 0000000000..d7d4c36759 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updatePrefs( + '', // teamId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/console-cli/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..a7eb9c5be3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-anonymous-session.md @@ -0,0 +1 @@ +appwrite account createAnonymousSession diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-email-password-session.md b/docs/examples/1.8.x/console-cli/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..951293b4b2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-email-password-session.md @@ -0,0 +1,3 @@ +appwrite account createEmailPasswordSession \ + --email email@example.com \ + --password password diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-email-token.md b/docs/examples/1.8.x/console-cli/examples/account/create-email-token.md new file mode 100644 index 0000000000..0aaf2476c9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-email-token.md @@ -0,0 +1,4 @@ +appwrite account createEmailToken \ + --userId \ + --email email@example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-j-w-t.md b/docs/examples/1.8.x/console-cli/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..7b5337993d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-j-w-t.md @@ -0,0 +1 @@ +appwrite account createJWT diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/console-cli/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..69203b085d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,5 @@ +appwrite account createMagicURLToken \ + --userId \ + --email email@example.com \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/console-cli/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..7634217700 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-mfa-authenticator.md @@ -0,0 +1,2 @@ +appwrite account createMfaAuthenticator \ + --type totp diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/console-cli/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..8696be7ec1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-mfa-challenge.md @@ -0,0 +1,2 @@ +appwrite account createMfaChallenge \ + --factor email diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/console-cli/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..0ef25446fd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1 @@ +appwrite account createMfaRecoveryCodes diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..9159b8f25f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2session.md @@ -0,0 +1,5 @@ +appwrite account createOAuth2Session \ + --provider amazon \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..b36f350d99 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-o-auth2token.md @@ -0,0 +1,5 @@ +appwrite account createOAuth2Token \ + --provider amazon \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-phone-token.md b/docs/examples/1.8.x/console-cli/examples/account/create-phone-token.md new file mode 100644 index 0000000000..23f7f19cac --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-phone-token.md @@ -0,0 +1,3 @@ +appwrite account createPhoneToken \ + --userId \ + --phone +12065550100 diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-phone-verification.md b/docs/examples/1.8.x/console-cli/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..3c4402ba1f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-phone-verification.md @@ -0,0 +1 @@ +appwrite account createPhoneVerification diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-push-target.md b/docs/examples/1.8.x/console-cli/examples/account/create-push-target.md new file mode 100644 index 0000000000..41c380b288 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-push-target.md @@ -0,0 +1,4 @@ +appwrite account createPushTarget \ + --targetId \ + --identifier \ + diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-recovery.md b/docs/examples/1.8.x/console-cli/examples/account/create-recovery.md new file mode 100644 index 0000000000..ea8c145abb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-recovery.md @@ -0,0 +1,3 @@ +appwrite account createRecovery \ + --email email@example.com \ + --url https://example.com diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-session.md b/docs/examples/1.8.x/console-cli/examples/account/create-session.md new file mode 100644 index 0000000000..426713ef50 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-session.md @@ -0,0 +1,3 @@ +appwrite account createSession \ + --userId \ + --secret diff --git a/docs/examples/1.8.x/console-cli/examples/account/create-verification.md b/docs/examples/1.8.x/console-cli/examples/account/create-verification.md new file mode 100644 index 0000000000..402038b4b6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create-verification.md @@ -0,0 +1,2 @@ +appwrite account createVerification \ + --url https://example.com diff --git a/docs/examples/1.8.x/console-cli/examples/account/create.md b/docs/examples/1.8.x/console-cli/examples/account/create.md new file mode 100644 index 0000000000..09686a2454 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/create.md @@ -0,0 +1,5 @@ +appwrite account create \ + --userId \ + --email email@example.com \ + --password '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/account/delete-identity.md b/docs/examples/1.8.x/console-cli/examples/account/delete-identity.md new file mode 100644 index 0000000000..acd8511dfb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/delete-identity.md @@ -0,0 +1,2 @@ +appwrite account deleteIdentity \ + --identityId diff --git a/docs/examples/1.8.x/console-cli/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/console-cli/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..d4664855b5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,2 @@ +appwrite account deleteMfaAuthenticator \ + --type totp diff --git a/docs/examples/1.8.x/console-cli/examples/account/delete-push-target.md b/docs/examples/1.8.x/console-cli/examples/account/delete-push-target.md new file mode 100644 index 0000000000..610ea232d8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/delete-push-target.md @@ -0,0 +1,2 @@ +appwrite account deletePushTarget \ + --targetId diff --git a/docs/examples/1.8.x/console-cli/examples/account/delete-session.md b/docs/examples/1.8.x/console-cli/examples/account/delete-session.md new file mode 100644 index 0000000000..9774552408 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/delete-session.md @@ -0,0 +1,2 @@ +appwrite account deleteSession \ + --sessionId diff --git a/docs/examples/1.8.x/console-cli/examples/account/delete-sessions.md b/docs/examples/1.8.x/console-cli/examples/account/delete-sessions.md new file mode 100644 index 0000000000..dd11877a5d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/delete-sessions.md @@ -0,0 +1 @@ +appwrite account deleteSessions diff --git a/docs/examples/1.8.x/console-cli/examples/account/delete.md b/docs/examples/1.8.x/console-cli/examples/account/delete.md new file mode 100644 index 0000000000..dac412f7c2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/delete.md @@ -0,0 +1 @@ +appwrite account delete diff --git a/docs/examples/1.8.x/console-cli/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/console-cli/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..0e61d658de --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1 @@ +appwrite account getMfaRecoveryCodes diff --git a/docs/examples/1.8.x/console-cli/examples/account/get-prefs.md b/docs/examples/1.8.x/console-cli/examples/account/get-prefs.md new file mode 100644 index 0000000000..6569925d99 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/get-prefs.md @@ -0,0 +1 @@ +appwrite account getPrefs diff --git a/docs/examples/1.8.x/console-cli/examples/account/get-session.md b/docs/examples/1.8.x/console-cli/examples/account/get-session.md new file mode 100644 index 0000000000..120dc8277f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/get-session.md @@ -0,0 +1,2 @@ +appwrite account getSession \ + --sessionId diff --git a/docs/examples/1.8.x/console-cli/examples/account/get.md b/docs/examples/1.8.x/console-cli/examples/account/get.md new file mode 100644 index 0000000000..c8b46e34c7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/get.md @@ -0,0 +1 @@ +appwrite account get diff --git a/docs/examples/1.8.x/console-cli/examples/account/list-identities.md b/docs/examples/1.8.x/console-cli/examples/account/list-identities.md new file mode 100644 index 0000000000..877b443ea8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/list-identities.md @@ -0,0 +1,2 @@ +appwrite account listIdentities \ + diff --git a/docs/examples/1.8.x/console-cli/examples/account/list-logs.md b/docs/examples/1.8.x/console-cli/examples/account/list-logs.md new file mode 100644 index 0000000000..e92f49063a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/list-logs.md @@ -0,0 +1,2 @@ +appwrite account listLogs \ + diff --git a/docs/examples/1.8.x/console-cli/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/console-cli/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..a29f287d24 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/list-mfa-factors.md @@ -0,0 +1 @@ +appwrite account listMfaFactors diff --git a/docs/examples/1.8.x/console-cli/examples/account/list-sessions.md b/docs/examples/1.8.x/console-cli/examples/account/list-sessions.md new file mode 100644 index 0000000000..87cbab0f66 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/list-sessions.md @@ -0,0 +1 @@ +appwrite account listSessions diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-email.md b/docs/examples/1.8.x/console-cli/examples/account/update-email.md new file mode 100644 index 0000000000..81938ff3a9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-email.md @@ -0,0 +1,3 @@ +appwrite account updateEmail \ + --email email@example.com \ + --password password diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-m-f-a.md b/docs/examples/1.8.x/console-cli/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..f714d4dbe9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-m-f-a.md @@ -0,0 +1,2 @@ +appwrite account updateMFA \ + --mfa false diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/console-cli/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..919bd70a30 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,3 @@ +appwrite account updateMagicURLSession \ + --userId \ + --secret diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/console-cli/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..b51796a79e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-mfa-authenticator.md @@ -0,0 +1,3 @@ +appwrite account updateMfaAuthenticator \ + --type totp \ + --otp diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/console-cli/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..37e09ef4e8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-mfa-challenge.md @@ -0,0 +1,3 @@ +appwrite account updateMfaChallenge \ + --challengeId \ + --otp diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/console-cli/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..a129ca6f98 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1 @@ +appwrite account updateMfaRecoveryCodes diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-name.md b/docs/examples/1.8.x/console-cli/examples/account/update-name.md new file mode 100644 index 0000000000..6f3b5977f4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-name.md @@ -0,0 +1,2 @@ +appwrite account updateName \ + --name diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-password.md b/docs/examples/1.8.x/console-cli/examples/account/update-password.md new file mode 100644 index 0000000000..340baec562 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-password.md @@ -0,0 +1,3 @@ +appwrite account updatePassword \ + --password '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-phone-session.md b/docs/examples/1.8.x/console-cli/examples/account/update-phone-session.md new file mode 100644 index 0000000000..d70f33fab5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-phone-session.md @@ -0,0 +1,3 @@ +appwrite account updatePhoneSession \ + --userId \ + --secret diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-phone-verification.md b/docs/examples/1.8.x/console-cli/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..cef2b5a40d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-phone-verification.md @@ -0,0 +1,3 @@ +appwrite account updatePhoneVerification \ + --userId \ + --secret diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-phone.md b/docs/examples/1.8.x/console-cli/examples/account/update-phone.md new file mode 100644 index 0000000000..93a619a801 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-phone.md @@ -0,0 +1,3 @@ +appwrite account updatePhone \ + --phone +12065550100 \ + --password password diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-prefs.md b/docs/examples/1.8.x/console-cli/examples/account/update-prefs.md new file mode 100644 index 0000000000..568ac66e48 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-prefs.md @@ -0,0 +1,2 @@ +appwrite account updatePrefs \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-push-target.md b/docs/examples/1.8.x/console-cli/examples/account/update-push-target.md new file mode 100644 index 0000000000..f3aa1a906a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-push-target.md @@ -0,0 +1,3 @@ +appwrite account updatePushTarget \ + --targetId \ + --identifier diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-recovery.md b/docs/examples/1.8.x/console-cli/examples/account/update-recovery.md new file mode 100644 index 0000000000..903a99cc99 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-recovery.md @@ -0,0 +1,4 @@ +appwrite account updateRecovery \ + --userId \ + --secret \ + --password '' diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-session.md b/docs/examples/1.8.x/console-cli/examples/account/update-session.md new file mode 100644 index 0000000000..5fb6a2e8d5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-session.md @@ -0,0 +1,2 @@ +appwrite account updateSession \ + --sessionId diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-status.md b/docs/examples/1.8.x/console-cli/examples/account/update-status.md new file mode 100644 index 0000000000..8886dbbc6a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-status.md @@ -0,0 +1 @@ +appwrite account updateStatus diff --git a/docs/examples/1.8.x/console-cli/examples/account/update-verification.md b/docs/examples/1.8.x/console-cli/examples/account/update-verification.md new file mode 100644 index 0000000000..afdfaa8372 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/account/update-verification.md @@ -0,0 +1,3 @@ +appwrite account updateVerification \ + --userId \ + --secret diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-browser.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-browser.md new file mode 100644 index 0000000000..6b4f0b8007 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-browser.md @@ -0,0 +1,5 @@ +appwrite avatars getBrowser \ + --code aa \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..365568ba19 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-credit-card.md @@ -0,0 +1,5 @@ +appwrite avatars getCreditCard \ + --code amex \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-favicon.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..c658f1a483 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-favicon.md @@ -0,0 +1,2 @@ +appwrite avatars getFavicon \ + --url https://example.com diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-flag.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-flag.md new file mode 100644 index 0000000000..9f11fef840 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-flag.md @@ -0,0 +1,5 @@ +appwrite avatars getFlag \ + --code af \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-image.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-image.md new file mode 100644 index 0000000000..7df150610c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-image.md @@ -0,0 +1,4 @@ +appwrite avatars getImage \ + --url https://example.com \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-initials.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-initials.md new file mode 100644 index 0000000000..b0b3da71c9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-initials.md @@ -0,0 +1,5 @@ +appwrite avatars getInitials \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/avatars/get-q-r.md b/docs/examples/1.8.x/console-cli/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..01e5085732 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/avatars/get-q-r.md @@ -0,0 +1,5 @@ +appwrite avatars getQR \ + --text \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/console/get-resource.md b/docs/examples/1.8.x/console-cli/examples/console/get-resource.md new file mode 100644 index 0000000000..3e55163966 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/console/get-resource.md @@ -0,0 +1,3 @@ +appwrite console getResource \ + --value \ + --type rules diff --git a/docs/examples/1.8.x/console-cli/examples/console/variables.md b/docs/examples/1.8.x/console-cli/examples/console/variables.md new file mode 100644 index 0000000000..1c67cf5ad8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/console/variables.md @@ -0,0 +1 @@ +appwrite console variables diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..6babbfb5af --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-boolean-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createBooleanAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-collection.md b/docs/examples/1.8.x/console-cli/examples/databases/create-collection.md new file mode 100644 index 0000000000..d97c424d16 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-collection.md @@ -0,0 +1,7 @@ +appwrite databases createCollection \ + --databaseId \ + --collectionId \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..f6aaf54fa2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-datetime-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createDatetimeAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-document.md b/docs/examples/1.8.x/console-cli/examples/databases/create-document.md new file mode 100644 index 0000000000..513cfc4f33 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-document.md @@ -0,0 +1,6 @@ +appwrite databases createDocument \ + --databaseId \ + --collectionId \ + --documentId \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/create-documents.md new file mode 100644 index 0000000000..e9e65b5c3c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-documents.md @@ -0,0 +1,4 @@ +appwrite databases createDocuments \ + --databaseId \ + --collectionId \ + --documents one two three diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..5c23f940de --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-email-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createEmailAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..5d3c614410 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-enum-attribute.md @@ -0,0 +1,8 @@ +appwrite databases createEnumAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..5a6ef4e4ef --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-float-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createFloatAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-index.md b/docs/examples/1.8.x/console-cli/examples/databases/create-index.md new file mode 100644 index 0000000000..2dc95ea921 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-index.md @@ -0,0 +1,8 @@ +appwrite databases createIndex \ + --databaseId \ + --collectionId \ + --key '' \ + --type key \ + --attributes one two three \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..791f3770c9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-integer-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createIntegerAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..4f39d84bab --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-ip-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createIpAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..c7d8ae568a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-relationship-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createRelationshipAttribute \ + --databaseId \ + --collectionId \ + --relatedCollectionId \ + --type oneToOne \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..37b1db644a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-string-attribute.md @@ -0,0 +1,9 @@ +appwrite databases createStringAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --size 1 \ + --required false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..4406ed7879 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create-url-attribute.md @@ -0,0 +1,7 @@ +appwrite databases createUrlAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/create.md b/docs/examples/1.8.x/console-cli/examples/databases/create.md new file mode 100644 index 0000000000..9e7523974f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/create.md @@ -0,0 +1,4 @@ +appwrite databases create \ + --databaseId \ + --name \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..e6607ea833 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/decrement-document-attribute.md @@ -0,0 +1,7 @@ +appwrite databases decrementDocumentAttribute \ + --databaseId \ + --collectionId \ + --documentId \ + --attribute '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/delete-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..88e7df985f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete-attribute.md @@ -0,0 +1,4 @@ +appwrite databases deleteAttribute \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/databases/delete-collection.md b/docs/examples/1.8.x/console-cli/examples/databases/delete-collection.md new file mode 100644 index 0000000000..0db185a7d7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete-collection.md @@ -0,0 +1,3 @@ +appwrite databases deleteCollection \ + --databaseId \ + --collectionId diff --git a/docs/examples/1.8.x/console-cli/examples/databases/delete-document.md b/docs/examples/1.8.x/console-cli/examples/databases/delete-document.md new file mode 100644 index 0000000000..3a96d35798 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete-document.md @@ -0,0 +1,4 @@ +appwrite databases deleteDocument \ + --databaseId \ + --collectionId \ + --documentId diff --git a/docs/examples/1.8.x/console-cli/examples/databases/delete-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/delete-documents.md new file mode 100644 index 0000000000..6f3463cbf9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete-documents.md @@ -0,0 +1,4 @@ +appwrite databases deleteDocuments \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/delete-index.md b/docs/examples/1.8.x/console-cli/examples/databases/delete-index.md new file mode 100644 index 0000000000..56485e7a78 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete-index.md @@ -0,0 +1,4 @@ +appwrite databases deleteIndex \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/databases/delete.md b/docs/examples/1.8.x/console-cli/examples/databases/delete.md new file mode 100644 index 0000000000..a24a3a04d3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/delete.md @@ -0,0 +1,2 @@ +appwrite databases delete \ + --databaseId diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/get-attribute.md new file mode 100644 index 0000000000..821698011f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-attribute.md @@ -0,0 +1,4 @@ +appwrite databases getAttribute \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-collection-usage.md b/docs/examples/1.8.x/console-cli/examples/databases/get-collection-usage.md new file mode 100644 index 0000000000..b57e6c92a9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-collection-usage.md @@ -0,0 +1,4 @@ +appwrite databases getCollectionUsage \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-collection.md b/docs/examples/1.8.x/console-cli/examples/databases/get-collection.md new file mode 100644 index 0000000000..e763b5bbfb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-collection.md @@ -0,0 +1,3 @@ +appwrite databases getCollection \ + --databaseId \ + --collectionId diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-document.md b/docs/examples/1.8.x/console-cli/examples/databases/get-document.md new file mode 100644 index 0000000000..35d9615503 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-document.md @@ -0,0 +1,5 @@ +appwrite databases getDocument \ + --databaseId \ + --collectionId \ + --documentId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-index.md b/docs/examples/1.8.x/console-cli/examples/databases/get-index.md new file mode 100644 index 0000000000..0071834a8c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-index.md @@ -0,0 +1,4 @@ +appwrite databases getIndex \ + --databaseId \ + --collectionId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-usage.md b/docs/examples/1.8.x/console-cli/examples/databases/get-usage.md new file mode 100644 index 0000000000..95263455e9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-usage.md @@ -0,0 +1,3 @@ +appwrite databases getUsage \ + --databaseId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get.md b/docs/examples/1.8.x/console-cli/examples/databases/get.md new file mode 100644 index 0000000000..35480b64cc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get.md @@ -0,0 +1,2 @@ +appwrite databases get \ + --databaseId diff --git a/docs/examples/1.8.x/console-cli/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..8a5150eebd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/increment-document-attribute.md @@ -0,0 +1,7 @@ +appwrite databases incrementDocumentAttribute \ + --databaseId \ + --collectionId \ + --documentId \ + --attribute '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-attributes.md b/docs/examples/1.8.x/console-cli/examples/databases/list-attributes.md new file mode 100644 index 0000000000..a2382feb3a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-attributes.md @@ -0,0 +1,4 @@ +appwrite databases listAttributes \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-collection-logs.md b/docs/examples/1.8.x/console-cli/examples/databases/list-collection-logs.md new file mode 100644 index 0000000000..eadac47a6b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-collection-logs.md @@ -0,0 +1,4 @@ +appwrite databases listCollectionLogs \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-collections.md b/docs/examples/1.8.x/console-cli/examples/databases/list-collections.md new file mode 100644 index 0000000000..b05c330be2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-collections.md @@ -0,0 +1,4 @@ +appwrite databases listCollections \ + --databaseId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-document-logs.md b/docs/examples/1.8.x/console-cli/examples/databases/list-document-logs.md new file mode 100644 index 0000000000..63b5394647 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-document-logs.md @@ -0,0 +1,5 @@ +appwrite databases listDocumentLogs \ + --databaseId \ + --collectionId \ + --documentId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/list-documents.md new file mode 100644 index 0000000000..98e389579d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-documents.md @@ -0,0 +1,4 @@ +appwrite databases listDocuments \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-indexes.md b/docs/examples/1.8.x/console-cli/examples/databases/list-indexes.md new file mode 100644 index 0000000000..50acb4d7ad --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-indexes.md @@ -0,0 +1,4 @@ +appwrite databases listIndexes \ + --databaseId \ + --collectionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-logs.md b/docs/examples/1.8.x/console-cli/examples/databases/list-logs.md new file mode 100644 index 0000000000..38547c7c3c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-logs.md @@ -0,0 +1,3 @@ +appwrite databases listLogs \ + --databaseId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-table-logs.md b/docs/examples/1.8.x/console-cli/examples/databases/list-table-logs.md new file mode 100644 index 0000000000..15bd1167cc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-table-logs.md @@ -0,0 +1,4 @@ +appwrite databases listTableLogs \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-usages.md b/docs/examples/1.8.x/console-cli/examples/databases/list-usages.md new file mode 100644 index 0000000000..e909446e71 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-usages.md @@ -0,0 +1,2 @@ +appwrite databases listUsages \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list.md b/docs/examples/1.8.x/console-cli/examples/databases/list.md new file mode 100644 index 0000000000..e723bc32ec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list.md @@ -0,0 +1,3 @@ +appwrite databases list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..f5adb497ec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-boolean-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateBooleanAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default false \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-collection.md b/docs/examples/1.8.x/console-cli/examples/databases/update-collection.md new file mode 100644 index 0000000000..eab3617c80 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-collection.md @@ -0,0 +1,7 @@ +appwrite databases updateCollection \ + --databaseId \ + --collectionId \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..fe4a462664 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-datetime-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateDatetimeAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-document.md b/docs/examples/1.8.x/console-cli/examples/databases/update-document.md new file mode 100644 index 0000000000..a4ac55bf6b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-document.md @@ -0,0 +1,6 @@ +appwrite databases updateDocument \ + --databaseId \ + --collectionId \ + --documentId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/update-documents.md new file mode 100644 index 0000000000..935f664440 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-documents.md @@ -0,0 +1,5 @@ +appwrite databases updateDocuments \ + --databaseId \ + --collectionId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..58510a6f8e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-email-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateEmailAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default email@example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..21d56d3e64 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-enum-attribute.md @@ -0,0 +1,8 @@ +appwrite databases updateEnumAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --elements one two three \ + --required false \ + --default \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..a9bba3eb5e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-float-attribute.md @@ -0,0 +1,9 @@ +appwrite databases updateFloatAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..660cd4d148 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-integer-attribute.md @@ -0,0 +1,9 @@ +appwrite databases updateIntegerAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..a400eadc1e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-ip-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateIpAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..6e2dbd927d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-relationship-attribute.md @@ -0,0 +1,6 @@ +appwrite databases updateRelationshipAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..526ece0b72 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-string-attribute.md @@ -0,0 +1,8 @@ +appwrite databases updateStringAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/console-cli/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..e6f401b8ca --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update-url-attribute.md @@ -0,0 +1,7 @@ +appwrite databases updateUrlAttribute \ + --databaseId \ + --collectionId \ + --key '' \ + --required false \ + --default https://example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/update.md b/docs/examples/1.8.x/console-cli/examples/databases/update.md new file mode 100644 index 0000000000..a1e0a844e5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/update.md @@ -0,0 +1,4 @@ +appwrite databases update \ + --databaseId \ + --name \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md b/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md new file mode 100644 index 0000000000..151e466d02 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md @@ -0,0 +1,4 @@ +appwrite databases upsertDocument \ + --databaseId \ + --collectionId \ + --documentId diff --git a/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..30c7dc5b4b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md @@ -0,0 +1,3 @@ +appwrite databases upsertDocuments \ + --databaseId \ + --collectionId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/create-deployment.md new file mode 100644 index 0000000000..6ac80bd73a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create-deployment.md @@ -0,0 +1,6 @@ +appwrite functions createDeployment \ + --functionId \ + --code 'path/to/file.png' \ + --activate false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..4839155bd2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,4 @@ +appwrite functions createDuplicateDeployment \ + --functionId \ + --deploymentId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create-execution.md b/docs/examples/1.8.x/console-cli/examples/functions/create-execution.md new file mode 100644 index 0000000000..febe88c541 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create-execution.md @@ -0,0 +1,8 @@ +appwrite functions createExecution \ + --functionId \ + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..a6164a3d0b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create-template-deployment.md @@ -0,0 +1,7 @@ +appwrite functions createTemplateDeployment \ + --functionId \ + --repository \ + --owner \ + --rootDirectory \ + --version \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create-variable.md b/docs/examples/1.8.x/console-cli/examples/functions/create-variable.md new file mode 100644 index 0000000000..f35f228d41 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create-variable.md @@ -0,0 +1,5 @@ +appwrite functions createVariable \ + --functionId \ + --key \ + --value \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..89f4caca66 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create-vcs-deployment.md @@ -0,0 +1,5 @@ +appwrite functions createVcsDeployment \ + --functionId \ + --type branch \ + --reference \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/create.md b/docs/examples/1.8.x/console-cli/examples/functions/create.md new file mode 100644 index 0000000000..ebca5741ed --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/create.md @@ -0,0 +1,19 @@ +appwrite functions create \ + --functionId \ + --name \ + --runtime node-14.5 \ + + + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/delete-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..2c9a6aa04a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/delete-deployment.md @@ -0,0 +1,3 @@ +appwrite functions deleteDeployment \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/delete-execution.md b/docs/examples/1.8.x/console-cli/examples/functions/delete-execution.md new file mode 100644 index 0000000000..2926b5aaf1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/delete-execution.md @@ -0,0 +1,3 @@ +appwrite functions deleteExecution \ + --functionId \ + --executionId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/delete-variable.md b/docs/examples/1.8.x/console-cli/examples/functions/delete-variable.md new file mode 100644 index 0000000000..835d125dc6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/delete-variable.md @@ -0,0 +1,3 @@ +appwrite functions deleteVariable \ + --functionId \ + --variableId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/delete.md b/docs/examples/1.8.x/console-cli/examples/functions/delete.md new file mode 100644 index 0000000000..0eea41c849 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/delete.md @@ -0,0 +1,2 @@ +appwrite functions delete \ + --functionId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/console-cli/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..485b608623 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get-deployment-download.md @@ -0,0 +1,4 @@ +appwrite functions getDeploymentDownload \ + --functionId \ + --deploymentId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/get-deployment.md new file mode 100644 index 0000000000..3da1605fea --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get-deployment.md @@ -0,0 +1,3 @@ +appwrite functions getDeployment \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get-execution.md b/docs/examples/1.8.x/console-cli/examples/functions/get-execution.md new file mode 100644 index 0000000000..d593f07c43 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get-execution.md @@ -0,0 +1,3 @@ +appwrite functions getExecution \ + --functionId \ + --executionId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get-template.md b/docs/examples/1.8.x/console-cli/examples/functions/get-template.md new file mode 100644 index 0000000000..15c6068f35 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get-template.md @@ -0,0 +1,2 @@ +appwrite functions getTemplate \ + --templateId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get-usage.md b/docs/examples/1.8.x/console-cli/examples/functions/get-usage.md new file mode 100644 index 0000000000..469db0f171 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get-usage.md @@ -0,0 +1,3 @@ +appwrite functions getUsage \ + --functionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get-variable.md b/docs/examples/1.8.x/console-cli/examples/functions/get-variable.md new file mode 100644 index 0000000000..241a91d936 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get-variable.md @@ -0,0 +1,3 @@ +appwrite functions getVariable \ + --functionId \ + --variableId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/get.md b/docs/examples/1.8.x/console-cli/examples/functions/get.md new file mode 100644 index 0000000000..f678ef7663 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/get.md @@ -0,0 +1,2 @@ +appwrite functions get \ + --functionId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-deployments.md b/docs/examples/1.8.x/console-cli/examples/functions/list-deployments.md new file mode 100644 index 0000000000..2befb86abc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-deployments.md @@ -0,0 +1,4 @@ +appwrite functions listDeployments \ + --functionId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-executions.md b/docs/examples/1.8.x/console-cli/examples/functions/list-executions.md new file mode 100644 index 0000000000..8d3136e6a4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-executions.md @@ -0,0 +1,3 @@ +appwrite functions listExecutions \ + --functionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-runtimes.md b/docs/examples/1.8.x/console-cli/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..15dc019c44 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-runtimes.md @@ -0,0 +1 @@ +appwrite functions listRuntimes diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-specifications.md b/docs/examples/1.8.x/console-cli/examples/functions/list-specifications.md new file mode 100644 index 0000000000..1d64bc68e7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-specifications.md @@ -0,0 +1 @@ +appwrite functions listSpecifications diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-templates.md b/docs/examples/1.8.x/console-cli/examples/functions/list-templates.md new file mode 100644 index 0000000000..b48bab53e1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-templates.md @@ -0,0 +1,5 @@ +appwrite functions listTemplates \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-usage.md b/docs/examples/1.8.x/console-cli/examples/functions/list-usage.md new file mode 100644 index 0000000000..8ae7855f45 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-usage.md @@ -0,0 +1,2 @@ +appwrite functions listUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list-variables.md b/docs/examples/1.8.x/console-cli/examples/functions/list-variables.md new file mode 100644 index 0000000000..21bf2eb506 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list-variables.md @@ -0,0 +1,2 @@ +appwrite functions listVariables \ + --functionId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/list.md b/docs/examples/1.8.x/console-cli/examples/functions/list.md new file mode 100644 index 0000000000..3b7551266e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/list.md @@ -0,0 +1,3 @@ +appwrite functions list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/console-cli/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..06d2dcdcf0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/update-deployment-status.md @@ -0,0 +1,3 @@ +appwrite functions updateDeploymentStatus \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/console-cli/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..652bfe809e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/update-function-deployment.md @@ -0,0 +1,3 @@ +appwrite functions updateFunctionDeployment \ + --functionId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/functions/update-variable.md b/docs/examples/1.8.x/console-cli/examples/functions/update-variable.md new file mode 100644 index 0000000000..a2b10491c6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/update-variable.md @@ -0,0 +1,6 @@ +appwrite functions updateVariable \ + --functionId \ + --variableId \ + --key \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/functions/update.md b/docs/examples/1.8.x/console-cli/examples/functions/update.md new file mode 100644 index 0000000000..7ac63e0cd1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/functions/update.md @@ -0,0 +1,19 @@ +appwrite functions update \ + --functionId \ + --name \ + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/graphql/mutation.md b/docs/examples/1.8.x/console-cli/examples/graphql/mutation.md new file mode 100644 index 0000000000..f6127a175c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/graphql/mutation.md @@ -0,0 +1,2 @@ +appwrite graphql mutation \ + --query '{ "key": "value" }' diff --git a/docs/examples/1.8.x/console-cli/examples/graphql/query.md b/docs/examples/1.8.x/console-cli/examples/graphql/query.md new file mode 100644 index 0000000000..1d84bcaa6a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/graphql/query.md @@ -0,0 +1,2 @@ +appwrite graphql query \ + --query '{ "key": "value" }' diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-antivirus.md b/docs/examples/1.8.x/console-cli/examples/health/get-antivirus.md new file mode 100644 index 0000000000..96dd7e78b2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-antivirus.md @@ -0,0 +1 @@ +appwrite health getAntivirus diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-cache.md b/docs/examples/1.8.x/console-cli/examples/health/get-cache.md new file mode 100644 index 0000000000..ad1111ccf0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-cache.md @@ -0,0 +1 @@ +appwrite health getCache diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-certificate.md b/docs/examples/1.8.x/console-cli/examples/health/get-certificate.md new file mode 100644 index 0000000000..4659415822 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-certificate.md @@ -0,0 +1,2 @@ +appwrite health getCertificate \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-d-b.md b/docs/examples/1.8.x/console-cli/examples/health/get-d-b.md new file mode 100644 index 0000000000..b0ea2d3eac --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-d-b.md @@ -0,0 +1 @@ +appwrite health getDB diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/console-cli/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..724299e384 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-failed-jobs.md @@ -0,0 +1,3 @@ +appwrite health getFailedJobs \ + --name v1-database \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-pub-sub.md b/docs/examples/1.8.x/console-cli/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..aa1773b35b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-pub-sub.md @@ -0,0 +1 @@ +appwrite health getPubSub diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-builds.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..7204c2c896 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-builds.md @@ -0,0 +1,2 @@ +appwrite health getQueueBuilds \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..203e8650cc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-certificates.md @@ -0,0 +1,2 @@ +appwrite health getQueueCertificates \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-databases.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..f30b941cbc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-databases.md @@ -0,0 +1,3 @@ +appwrite health getQueueDatabases \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..1d44146dc4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-deletes.md @@ -0,0 +1,2 @@ +appwrite health getQueueDeletes \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-functions.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..4aca467306 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-functions.md @@ -0,0 +1,2 @@ +appwrite health getQueueFunctions \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-logs.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..3f1386b73a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-logs.md @@ -0,0 +1,2 @@ +appwrite health getQueueLogs \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-mails.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..a41f4c308b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-mails.md @@ -0,0 +1,2 @@ +appwrite health getQueueMails \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..11b7ff832b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-messaging.md @@ -0,0 +1,2 @@ +appwrite health getQueueMessaging \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..2f17bb56f4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-migrations.md @@ -0,0 +1,2 @@ +appwrite health getQueueMigrations \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..9cce963748 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-stats-resources.md @@ -0,0 +1,2 @@ +appwrite health getQueueStatsResources \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-usage.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..d021a3faa1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-usage.md @@ -0,0 +1,2 @@ +appwrite health getQueueUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/console-cli/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..471175bbe4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-queue-webhooks.md @@ -0,0 +1,2 @@ +appwrite health getQueueWebhooks \ + diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-storage-local.md b/docs/examples/1.8.x/console-cli/examples/health/get-storage-local.md new file mode 100644 index 0000000000..b5df39fae0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-storage-local.md @@ -0,0 +1 @@ +appwrite health getStorageLocal diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-storage.md b/docs/examples/1.8.x/console-cli/examples/health/get-storage.md new file mode 100644 index 0000000000..eccd21acc3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-storage.md @@ -0,0 +1 @@ +appwrite health getStorage diff --git a/docs/examples/1.8.x/console-cli/examples/health/get-time.md b/docs/examples/1.8.x/console-cli/examples/health/get-time.md new file mode 100644 index 0000000000..067e5daf9e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get-time.md @@ -0,0 +1 @@ +appwrite health getTime diff --git a/docs/examples/1.8.x/console-cli/examples/health/get.md b/docs/examples/1.8.x/console-cli/examples/health/get.md new file mode 100644 index 0000000000..94c08e5aa3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/health/get.md @@ -0,0 +1 @@ +appwrite health get diff --git a/docs/examples/1.8.x/console-cli/examples/locale/get.md b/docs/examples/1.8.x/console-cli/examples/locale/get.md new file mode 100644 index 0000000000..2002a06c20 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/get.md @@ -0,0 +1 @@ +appwrite locale get diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-codes.md b/docs/examples/1.8.x/console-cli/examples/locale/list-codes.md new file mode 100644 index 0000000000..5586d1566c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-codes.md @@ -0,0 +1 @@ +appwrite locale listCodes diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-continents.md b/docs/examples/1.8.x/console-cli/examples/locale/list-continents.md new file mode 100644 index 0000000000..775af5d9df --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-continents.md @@ -0,0 +1 @@ +appwrite locale listContinents diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/console-cli/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..43b7eff7ad --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-countries-e-u.md @@ -0,0 +1 @@ +appwrite locale listCountriesEU diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/console-cli/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..072516bf71 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-countries-phones.md @@ -0,0 +1 @@ +appwrite locale listCountriesPhones diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-countries.md b/docs/examples/1.8.x/console-cli/examples/locale/list-countries.md new file mode 100644 index 0000000000..ee7101df68 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-countries.md @@ -0,0 +1 @@ +appwrite locale listCountries diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-currencies.md b/docs/examples/1.8.x/console-cli/examples/locale/list-currencies.md new file mode 100644 index 0000000000..01b1b3c4b2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-currencies.md @@ -0,0 +1 @@ +appwrite locale listCurrencies diff --git a/docs/examples/1.8.x/console-cli/examples/locale/list-languages.md b/docs/examples/1.8.x/console-cli/examples/locale/list-languages.md new file mode 100644 index 0000000000..d47622c570 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/locale/list-languages.md @@ -0,0 +1 @@ +appwrite locale listLanguages diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..8b369f403d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-apns-provider.md @@ -0,0 +1,9 @@ +appwrite messaging createApnsProvider \ + --providerId \ + --name \ + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-email.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-email.md new file mode 100644 index 0000000000..2a8e03b7da --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-email.md @@ -0,0 +1,13 @@ +appwrite messaging createEmail \ + --messageId \ + --subject \ + --content \ + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..a19dcbe28c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-fcm-provider.md @@ -0,0 +1,5 @@ +appwrite messaging createFcmProvider \ + --providerId \ + --name \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..6b07359194 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,11 @@ +appwrite messaging createMailgunProvider \ + --providerId \ + --name \ + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..f687e36472 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-msg91provider.md @@ -0,0 +1,7 @@ +appwrite messaging createMsg91Provider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-push.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-push.md new file mode 100644 index 0000000000..18d8ec5aec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-push.md @@ -0,0 +1,20 @@ +appwrite messaging createPush \ + --messageId \ + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..de8d059abb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,9 @@ +appwrite messaging createSendgridProvider \ + --providerId \ + --name \ + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-sms.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-sms.md new file mode 100644 index 0000000000..dfc9b27ff3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-sms.md @@ -0,0 +1,8 @@ +appwrite messaging createSms \ + --messageId \ + --content \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..13f04fe648 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-smtp-provider.md @@ -0,0 +1,15 @@ +appwrite messaging createSmtpProvider \ + --providerId \ + --name \ + --host \ + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..5e65c36df7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-subscriber.md @@ -0,0 +1,4 @@ +appwrite messaging createSubscriber \ + --topicId \ + --subscriberId \ + --targetId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..783f7594fd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-telesign-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createTelesignProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..77185c71de --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createTextmagicProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-topic.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-topic.md new file mode 100644 index 0000000000..1d57e1cee0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-topic.md @@ -0,0 +1,4 @@ +appwrite messaging createTopic \ + --topicId \ + --name \ + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..91fdaae96b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-twilio-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createTwilioProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..1939d1c04b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/create-vonage-provider.md @@ -0,0 +1,7 @@ +appwrite messaging createVonageProvider \ + --providerId \ + --name \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/delete-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..a93885573c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/delete-provider.md @@ -0,0 +1,2 @@ +appwrite messaging deleteProvider \ + --providerId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/console-cli/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..c535154df6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/delete-subscriber.md @@ -0,0 +1,3 @@ +appwrite messaging deleteSubscriber \ + --topicId \ + --subscriberId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/delete-topic.md b/docs/examples/1.8.x/console-cli/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..1fa387c6ab --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/delete-topic.md @@ -0,0 +1,2 @@ +appwrite messaging deleteTopic \ + --topicId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/delete.md b/docs/examples/1.8.x/console-cli/examples/messaging/delete.md new file mode 100644 index 0000000000..82ff141b03 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/delete.md @@ -0,0 +1,2 @@ +appwrite messaging delete \ + --messageId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/get-message.md b/docs/examples/1.8.x/console-cli/examples/messaging/get-message.md new file mode 100644 index 0000000000..0144f79699 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/get-message.md @@ -0,0 +1,2 @@ +appwrite messaging getMessage \ + --messageId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/get-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/get-provider.md new file mode 100644 index 0000000000..9da9f2d864 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/get-provider.md @@ -0,0 +1,2 @@ +appwrite messaging getProvider \ + --providerId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/console-cli/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..02f8bc0e57 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/get-subscriber.md @@ -0,0 +1,3 @@ +appwrite messaging getSubscriber \ + --topicId \ + --subscriberId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/get-topic.md b/docs/examples/1.8.x/console-cli/examples/messaging/get-topic.md new file mode 100644 index 0000000000..feb2dc66b6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/get-topic.md @@ -0,0 +1,2 @@ +appwrite messaging getTopic \ + --topicId diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..91366f35f7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-message-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listMessageLogs \ + --messageId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-messages.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-messages.md new file mode 100644 index 0000000000..6ab04b0fd2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-messages.md @@ -0,0 +1,3 @@ +appwrite messaging listMessages \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..0dee2e3f4b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-provider-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listProviderLogs \ + --providerId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-providers.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-providers.md new file mode 100644 index 0000000000..0a2ce47a3f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-providers.md @@ -0,0 +1,3 @@ +appwrite messaging listProviders \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..4a04ac4373 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listSubscriberLogs \ + --subscriberId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..2eed8bd3f0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-subscribers.md @@ -0,0 +1,4 @@ +appwrite messaging listSubscribers \ + --topicId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-targets.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-targets.md new file mode 100644 index 0000000000..7efa50ee3b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-targets.md @@ -0,0 +1,3 @@ +appwrite messaging listTargets \ + --messageId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..f23c10aba6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-topic-logs.md @@ -0,0 +1,3 @@ +appwrite messaging listTopicLogs \ + --topicId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/list-topics.md b/docs/examples/1.8.x/console-cli/examples/messaging/list-topics.md new file mode 100644 index 0000000000..1810a7bd7b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/list-topics.md @@ -0,0 +1,3 @@ +appwrite messaging listTopics \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..9e895a066a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-apns-provider.md @@ -0,0 +1,9 @@ +appwrite messaging updateApnsProvider \ + --providerId \ + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-email.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-email.md new file mode 100644 index 0000000000..934fd29213 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-email.md @@ -0,0 +1,13 @@ +appwrite messaging updateEmail \ + --messageId \ + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..000022361f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-fcm-provider.md @@ -0,0 +1,5 @@ +appwrite messaging updateFcmProvider \ + --providerId \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..f35c5e9157 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,11 @@ +appwrite messaging updateMailgunProvider \ + --providerId \ + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..8e2d604a19 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-msg91provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateMsg91Provider \ + --providerId \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-push.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-push.md new file mode 100644 index 0000000000..1f4427cee7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-push.md @@ -0,0 +1,20 @@ +appwrite messaging updatePush \ + --messageId \ + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..7f2e97dbf7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,9 @@ +appwrite messaging updateSendgridProvider \ + --providerId \ + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-sms.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-sms.md new file mode 100644 index 0000000000..a30ff43d0c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-sms.md @@ -0,0 +1,8 @@ +appwrite messaging updateSms \ + --messageId \ + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..4e0f7b6b8d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-smtp-provider.md @@ -0,0 +1,15 @@ +appwrite messaging updateSmtpProvider \ + --providerId \ + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..0a92f2cacd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-telesign-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateTelesignProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..79160b2461 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateTextmagicProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-topic.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-topic.md new file mode 100644 index 0000000000..d10b0edde3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-topic.md @@ -0,0 +1,4 @@ +appwrite messaging updateTopic \ + --topicId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..c967d724af --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-twilio-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateTwilioProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/console-cli/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..11f7963be2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/messaging/update-vonage-provider.md @@ -0,0 +1,7 @@ +appwrite messaging updateVonageProvider \ + --providerId \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-appwrite-migration.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-appwrite-migration.md new file mode 100644 index 0000000000..73e9ee62d8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-appwrite-migration.md @@ -0,0 +1,5 @@ +appwrite migrations createAppwriteMigration \ + --resources one two three \ + --endpoint https://example.com \ + --projectId \ + --apiKey diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-migration.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-migration.md new file mode 100644 index 0000000000..594bc85052 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-csv-migration.md @@ -0,0 +1,4 @@ +appwrite migrations createCsvMigration \ + --bucketId \ + --fileId \ + --resourceId [ID1:ID2] diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-firebase-migration.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-firebase-migration.md new file mode 100644 index 0000000000..3dfb3aeac6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-firebase-migration.md @@ -0,0 +1,3 @@ +appwrite migrations createFirebaseMigration \ + --resources one two three \ + --serviceAccount diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-n-host-migration.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-n-host-migration.md new file mode 100644 index 0000000000..d959897109 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-n-host-migration.md @@ -0,0 +1,9 @@ +appwrite migrations createNHostMigration \ + --resources one two three \ + --subdomain \ + --region \ + --adminSecret \ + --database \ + --username \ + --password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/create-supabase-migration.md b/docs/examples/1.8.x/console-cli/examples/migrations/create-supabase-migration.md new file mode 100644 index 0000000000..0620f3ba2e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/create-supabase-migration.md @@ -0,0 +1,8 @@ +appwrite migrations createSupabaseMigration \ + --resources one two three \ + --endpoint https://example.com \ + --apiKey \ + --databaseHost \ + --username \ + --password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/delete.md b/docs/examples/1.8.x/console-cli/examples/migrations/delete.md new file mode 100644 index 0000000000..9dac1aa3db --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/delete.md @@ -0,0 +1,2 @@ +appwrite migrations delete \ + --migrationId diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/get-appwrite-report.md b/docs/examples/1.8.x/console-cli/examples/migrations/get-appwrite-report.md new file mode 100644 index 0000000000..745e9fb98c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/get-appwrite-report.md @@ -0,0 +1,5 @@ +appwrite migrations getAppwriteReport \ + --resources one two three \ + --endpoint https://example.com \ + --projectID \ + --key diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/get-firebase-report.md b/docs/examples/1.8.x/console-cli/examples/migrations/get-firebase-report.md new file mode 100644 index 0000000000..73c7e1ca14 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/get-firebase-report.md @@ -0,0 +1,3 @@ +appwrite migrations getFirebaseReport \ + --resources one two three \ + --serviceAccount diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/get-n-host-report.md b/docs/examples/1.8.x/console-cli/examples/migrations/get-n-host-report.md new file mode 100644 index 0000000000..6b7e2eaff2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/get-n-host-report.md @@ -0,0 +1,9 @@ +appwrite migrations getNHostReport \ + --resources one two three \ + --subdomain \ + --region \ + --adminSecret \ + --database \ + --username \ + --password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/get-supabase-report.md b/docs/examples/1.8.x/console-cli/examples/migrations/get-supabase-report.md new file mode 100644 index 0000000000..9754f38e24 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/get-supabase-report.md @@ -0,0 +1,8 @@ +appwrite migrations getSupabaseReport \ + --resources one two three \ + --endpoint https://example.com \ + --apiKey \ + --databaseHost \ + --username \ + --password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/get.md b/docs/examples/1.8.x/console-cli/examples/migrations/get.md new file mode 100644 index 0000000000..8810646c7e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/get.md @@ -0,0 +1,2 @@ +appwrite migrations get \ + --migrationId diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/list.md b/docs/examples/1.8.x/console-cli/examples/migrations/list.md new file mode 100644 index 0000000000..c120a61e80 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/list.md @@ -0,0 +1,3 @@ +appwrite migrations list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/migrations/retry.md b/docs/examples/1.8.x/console-cli/examples/migrations/retry.md new file mode 100644 index 0000000000..518f86cee7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/migrations/retry.md @@ -0,0 +1,2 @@ +appwrite migrations retry \ + --migrationId diff --git a/docs/examples/1.8.x/console-cli/examples/project/create-variable.md b/docs/examples/1.8.x/console-cli/examples/project/create-variable.md new file mode 100644 index 0000000000..253d6ddf75 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/project/create-variable.md @@ -0,0 +1,4 @@ +appwrite project createVariable \ + --key \ + --value \ + diff --git a/docs/examples/1.8.x/console-cli/examples/project/delete-variable.md b/docs/examples/1.8.x/console-cli/examples/project/delete-variable.md new file mode 100644 index 0000000000..7fdda874fd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/project/delete-variable.md @@ -0,0 +1,2 @@ +appwrite project deleteVariable \ + --variableId diff --git a/docs/examples/1.8.x/console-cli/examples/project/get-usage.md b/docs/examples/1.8.x/console-cli/examples/project/get-usage.md new file mode 100644 index 0000000000..9b4c296a8c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/project/get-usage.md @@ -0,0 +1,4 @@ +appwrite project getUsage \ + --startDate '' \ + --endDate '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/project/get-variable.md b/docs/examples/1.8.x/console-cli/examples/project/get-variable.md new file mode 100644 index 0000000000..b2d482586b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/project/get-variable.md @@ -0,0 +1,2 @@ +appwrite project getVariable \ + --variableId diff --git a/docs/examples/1.8.x/console-cli/examples/project/list-variables.md b/docs/examples/1.8.x/console-cli/examples/project/list-variables.md new file mode 100644 index 0000000000..bd26c7db6b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/project/list-variables.md @@ -0,0 +1 @@ +appwrite project listVariables diff --git a/docs/examples/1.8.x/console-cli/examples/project/update-variable.md b/docs/examples/1.8.x/console-cli/examples/project/update-variable.md new file mode 100644 index 0000000000..4365b64888 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/project/update-variable.md @@ -0,0 +1,5 @@ +appwrite project updateVariable \ + --variableId \ + --key \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-dev-key.md b/docs/examples/1.8.x/console-cli/examples/projects/create-dev-key.md new file mode 100644 index 0000000000..8b9ec8969a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-dev-key.md @@ -0,0 +1,4 @@ +appwrite projects createDevKey \ + --projectId \ + --name \ + --expire '' diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-j-w-t.md b/docs/examples/1.8.x/console-cli/examples/projects/create-j-w-t.md new file mode 100644 index 0000000000..d703d36b65 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-j-w-t.md @@ -0,0 +1,4 @@ +appwrite projects createJWT \ + --projectId \ + --scopes one two three \ + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-key.md b/docs/examples/1.8.x/console-cli/examples/projects/create-key.md new file mode 100644 index 0000000000..fb986dcebc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-key.md @@ -0,0 +1,5 @@ +appwrite projects createKey \ + --projectId \ + --name \ + --scopes one two three \ + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-platform.md b/docs/examples/1.8.x/console-cli/examples/projects/create-platform.md new file mode 100644 index 0000000000..8727d21d64 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-platform.md @@ -0,0 +1,7 @@ +appwrite projects createPlatform \ + --projectId \ + --type web \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-smtp-test.md b/docs/examples/1.8.x/console-cli/examples/projects/create-smtp-test.md new file mode 100644 index 0000000000..66ce5880aa --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-smtp-test.md @@ -0,0 +1,11 @@ +appwrite projects createSmtpTest \ + --projectId \ + --emails one two three \ + --senderName \ + --senderEmail email@example.com \ + --host '' \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create-webhook.md b/docs/examples/1.8.x/console-cli/examples/projects/create-webhook.md new file mode 100644 index 0000000000..03ecf4110d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create-webhook.md @@ -0,0 +1,9 @@ +appwrite projects createWebhook \ + --projectId \ + --name \ + --events one two three \ + --url '' \ + --security false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/create.md b/docs/examples/1.8.x/console-cli/examples/projects/create.md new file mode 100644 index 0000000000..0504785503 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/create.md @@ -0,0 +1,14 @@ +appwrite projects create \ + --projectId '' \ + --name \ + --teamId \ + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete-dev-key.md b/docs/examples/1.8.x/console-cli/examples/projects/delete-dev-key.md new file mode 100644 index 0000000000..2859a3309f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete-dev-key.md @@ -0,0 +1,3 @@ +appwrite projects deleteDevKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete-email-template.md b/docs/examples/1.8.x/console-cli/examples/projects/delete-email-template.md new file mode 100644 index 0000000000..01ce0fac68 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete-email-template.md @@ -0,0 +1,4 @@ +appwrite projects deleteEmailTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete-key.md b/docs/examples/1.8.x/console-cli/examples/projects/delete-key.md new file mode 100644 index 0000000000..6baf05706e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete-key.md @@ -0,0 +1,3 @@ +appwrite projects deleteKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete-platform.md b/docs/examples/1.8.x/console-cli/examples/projects/delete-platform.md new file mode 100644 index 0000000000..a85bd865ba --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete-platform.md @@ -0,0 +1,3 @@ +appwrite projects deletePlatform \ + --projectId \ + --platformId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete-sms-template.md b/docs/examples/1.8.x/console-cli/examples/projects/delete-sms-template.md new file mode 100644 index 0000000000..3afcf649c7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete-sms-template.md @@ -0,0 +1,4 @@ +appwrite projects deleteSmsTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete-webhook.md b/docs/examples/1.8.x/console-cli/examples/projects/delete-webhook.md new file mode 100644 index 0000000000..a67301ef07 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete-webhook.md @@ -0,0 +1,3 @@ +appwrite projects deleteWebhook \ + --projectId \ + --webhookId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/delete.md b/docs/examples/1.8.x/console-cli/examples/projects/delete.md new file mode 100644 index 0000000000..a4ffc70c91 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/delete.md @@ -0,0 +1,2 @@ +appwrite projects delete \ + --projectId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-dev-key.md b/docs/examples/1.8.x/console-cli/examples/projects/get-dev-key.md new file mode 100644 index 0000000000..cfc37ed437 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-dev-key.md @@ -0,0 +1,3 @@ +appwrite projects getDevKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-email-template.md b/docs/examples/1.8.x/console-cli/examples/projects/get-email-template.md new file mode 100644 index 0000000000..6e4c21e52b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-email-template.md @@ -0,0 +1,4 @@ +appwrite projects getEmailTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-key.md b/docs/examples/1.8.x/console-cli/examples/projects/get-key.md new file mode 100644 index 0000000000..f69b51bbe2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-key.md @@ -0,0 +1,3 @@ +appwrite projects getKey \ + --projectId \ + --keyId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-platform.md b/docs/examples/1.8.x/console-cli/examples/projects/get-platform.md new file mode 100644 index 0000000000..67648be035 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-platform.md @@ -0,0 +1,3 @@ +appwrite projects getPlatform \ + --projectId \ + --platformId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-sms-template.md b/docs/examples/1.8.x/console-cli/examples/projects/get-sms-template.md new file mode 100644 index 0000000000..c655953c8e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-sms-template.md @@ -0,0 +1,4 @@ +appwrite projects getSmsTemplate \ + --projectId \ + --type verification \ + --locale af diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get-webhook.md b/docs/examples/1.8.x/console-cli/examples/projects/get-webhook.md new file mode 100644 index 0000000000..890bf37069 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get-webhook.md @@ -0,0 +1,3 @@ +appwrite projects getWebhook \ + --projectId \ + --webhookId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/get.md b/docs/examples/1.8.x/console-cli/examples/projects/get.md new file mode 100644 index 0000000000..919321b81d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/get.md @@ -0,0 +1,2 @@ +appwrite projects get \ + --projectId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/list-dev-keys.md b/docs/examples/1.8.x/console-cli/examples/projects/list-dev-keys.md new file mode 100644 index 0000000000..d552cb3bca --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/list-dev-keys.md @@ -0,0 +1,3 @@ +appwrite projects listDevKeys \ + --projectId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/list-keys.md b/docs/examples/1.8.x/console-cli/examples/projects/list-keys.md new file mode 100644 index 0000000000..cc37680b5b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/list-keys.md @@ -0,0 +1,2 @@ +appwrite projects listKeys \ + --projectId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/list-platforms.md b/docs/examples/1.8.x/console-cli/examples/projects/list-platforms.md new file mode 100644 index 0000000000..5fc2ea4106 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/list-platforms.md @@ -0,0 +1,2 @@ +appwrite projects listPlatforms \ + --projectId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/list-webhooks.md b/docs/examples/1.8.x/console-cli/examples/projects/list-webhooks.md new file mode 100644 index 0000000000..dcf9953f80 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/list-webhooks.md @@ -0,0 +1,2 @@ +appwrite projects listWebhooks \ + --projectId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/list.md b/docs/examples/1.8.x/console-cli/examples/projects/list.md new file mode 100644 index 0000000000..0d3dd7a539 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/list.md @@ -0,0 +1,3 @@ +appwrite projects list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-api-status-all.md b/docs/examples/1.8.x/console-cli/examples/projects/update-api-status-all.md new file mode 100644 index 0000000000..e5f63c59a3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-api-status-all.md @@ -0,0 +1,3 @@ +appwrite projects updateApiStatusAll \ + --projectId \ + --status false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-api-status.md b/docs/examples/1.8.x/console-cli/examples/projects/update-api-status.md new file mode 100644 index 0000000000..01120957af --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-api-status.md @@ -0,0 +1,4 @@ +appwrite projects updateApiStatus \ + --projectId \ + --api rest \ + --status false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-auth-duration.md b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-duration.md new file mode 100644 index 0000000000..ad6f8ac97c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-duration.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthDuration \ + --projectId \ + --duration 0 diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-auth-limit.md b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-limit.md new file mode 100644 index 0000000000..9d01fa5a1a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-limit.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthLimit \ + --projectId \ + --limit 0 diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-dictionary.md b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-dictionary.md new file mode 100644 index 0000000000..f477bba56d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-dictionary.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthPasswordDictionary \ + --projectId \ + --enabled false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-history.md b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-history.md new file mode 100644 index 0000000000..8b9b90a32a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-password-history.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthPasswordHistory \ + --projectId \ + --limit 0 diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-auth-sessions-limit.md b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-sessions-limit.md new file mode 100644 index 0000000000..2a1294d17b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-sessions-limit.md @@ -0,0 +1,3 @@ +appwrite projects updateAuthSessionsLimit \ + --projectId \ + --limit 1 diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-auth-status.md b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-status.md new file mode 100644 index 0000000000..848987b2f8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-auth-status.md @@ -0,0 +1,4 @@ +appwrite projects updateAuthStatus \ + --projectId \ + --method email-password \ + --status false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-dev-key.md b/docs/examples/1.8.x/console-cli/examples/projects/update-dev-key.md new file mode 100644 index 0000000000..cc95030389 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-dev-key.md @@ -0,0 +1,5 @@ +appwrite projects updateDevKey \ + --projectId \ + --keyId \ + --name \ + --expire '' diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-email-template.md b/docs/examples/1.8.x/console-cli/examples/projects/update-email-template.md new file mode 100644 index 0000000000..a3acd066ec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-email-template.md @@ -0,0 +1,9 @@ +appwrite projects updateEmailTemplate \ + --projectId \ + --type verification \ + --locale af \ + --subject \ + --message \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-key.md b/docs/examples/1.8.x/console-cli/examples/projects/update-key.md new file mode 100644 index 0000000000..6d3dc198da --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-key.md @@ -0,0 +1,6 @@ +appwrite projects updateKey \ + --projectId \ + --keyId \ + --name \ + --scopes one two three \ + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-memberships-privacy.md b/docs/examples/1.8.x/console-cli/examples/projects/update-memberships-privacy.md new file mode 100644 index 0000000000..6c811ccfce --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-memberships-privacy.md @@ -0,0 +1,5 @@ +appwrite projects updateMembershipsPrivacy \ + --projectId \ + --userName false \ + --userEmail false \ + --mfa false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-mock-numbers.md b/docs/examples/1.8.x/console-cli/examples/projects/update-mock-numbers.md new file mode 100644 index 0000000000..733cc16887 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-mock-numbers.md @@ -0,0 +1,3 @@ +appwrite projects updateMockNumbers \ + --projectId \ + --numbers one two three diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-o-auth2.md b/docs/examples/1.8.x/console-cli/examples/projects/update-o-auth2.md new file mode 100644 index 0000000000..92f6718962 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-o-auth2.md @@ -0,0 +1,6 @@ +appwrite projects updateOAuth2 \ + --projectId \ + --provider amazon \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-personal-data-check.md b/docs/examples/1.8.x/console-cli/examples/projects/update-personal-data-check.md new file mode 100644 index 0000000000..21dca78369 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-personal-data-check.md @@ -0,0 +1,3 @@ +appwrite projects updatePersonalDataCheck \ + --projectId \ + --enabled false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-platform.md b/docs/examples/1.8.x/console-cli/examples/projects/update-platform.md new file mode 100644 index 0000000000..05b1602ae9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-platform.md @@ -0,0 +1,7 @@ +appwrite projects updatePlatform \ + --projectId \ + --platformId \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-service-status-all.md b/docs/examples/1.8.x/console-cli/examples/projects/update-service-status-all.md new file mode 100644 index 0000000000..1ffb77e085 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-service-status-all.md @@ -0,0 +1,3 @@ +appwrite projects updateServiceStatusAll \ + --projectId \ + --status false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-service-status.md b/docs/examples/1.8.x/console-cli/examples/projects/update-service-status.md new file mode 100644 index 0000000000..03963a1214 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-service-status.md @@ -0,0 +1,4 @@ +appwrite projects updateServiceStatus \ + --projectId \ + --service account \ + --status false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-session-alerts.md b/docs/examples/1.8.x/console-cli/examples/projects/update-session-alerts.md new file mode 100644 index 0000000000..bd23b7417a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-session-alerts.md @@ -0,0 +1,3 @@ +appwrite projects updateSessionAlerts \ + --projectId \ + --alerts false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-session-invalidation.md b/docs/examples/1.8.x/console-cli/examples/projects/update-session-invalidation.md new file mode 100644 index 0000000000..21e8511f64 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-session-invalidation.md @@ -0,0 +1,3 @@ +appwrite projects updateSessionInvalidation \ + --projectId \ + --enabled false diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-sms-template.md b/docs/examples/1.8.x/console-cli/examples/projects/update-sms-template.md new file mode 100644 index 0000000000..fc8310eb25 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-sms-template.md @@ -0,0 +1,5 @@ +appwrite projects updateSmsTemplate \ + --projectId \ + --type verification \ + --locale af \ + --message diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-smtp.md b/docs/examples/1.8.x/console-cli/examples/projects/update-smtp.md new file mode 100644 index 0000000000..0afbe9cec9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-smtp.md @@ -0,0 +1,11 @@ +appwrite projects updateSmtp \ + --projectId \ + --enabled false \ + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-team.md b/docs/examples/1.8.x/console-cli/examples/projects/update-team.md new file mode 100644 index 0000000000..49214ad9f3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-team.md @@ -0,0 +1,3 @@ +appwrite projects updateTeam \ + --projectId \ + --teamId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-webhook-signature.md b/docs/examples/1.8.x/console-cli/examples/projects/update-webhook-signature.md new file mode 100644 index 0000000000..6034ef01f6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-webhook-signature.md @@ -0,0 +1,3 @@ +appwrite projects updateWebhookSignature \ + --projectId \ + --webhookId diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update-webhook.md b/docs/examples/1.8.x/console-cli/examples/projects/update-webhook.md new file mode 100644 index 0000000000..51c536d74c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update-webhook.md @@ -0,0 +1,10 @@ +appwrite projects updateWebhook \ + --projectId \ + --webhookId \ + --name \ + --events one two three \ + --url '' \ + --security false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/projects/update.md b/docs/examples/1.8.x/console-cli/examples/projects/update.md new file mode 100644 index 0000000000..d4df289636 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/projects/update.md @@ -0,0 +1,12 @@ +appwrite projects update \ + --projectId \ + --name \ + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/create-a-p-i-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/create-a-p-i-rule.md new file mode 100644 index 0000000000..5746b94b1e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/create-a-p-i-rule.md @@ -0,0 +1,2 @@ +appwrite proxy createAPIRule \ + --domain '' diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/create-function-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/create-function-rule.md new file mode 100644 index 0000000000..380650c208 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/create-function-rule.md @@ -0,0 +1,4 @@ +appwrite proxy createFunctionRule \ + --domain '' \ + --functionId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/create-redirect-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/create-redirect-rule.md new file mode 100644 index 0000000000..ec9098a748 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/create-redirect-rule.md @@ -0,0 +1,6 @@ +appwrite proxy createRedirectRule \ + --domain '' \ + --url https://example.com \ + --statusCode 301 \ + --resourceId \ + --resourceType site diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/create-site-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/create-site-rule.md new file mode 100644 index 0000000000..eb41bd7158 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/create-site-rule.md @@ -0,0 +1,4 @@ +appwrite proxy createSiteRule \ + --domain '' \ + --siteId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/delete-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/delete-rule.md new file mode 100644 index 0000000000..b11b6ca23e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/delete-rule.md @@ -0,0 +1,2 @@ +appwrite proxy deleteRule \ + --ruleId diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/get-rule.md b/docs/examples/1.8.x/console-cli/examples/proxy/get-rule.md new file mode 100644 index 0000000000..85d11a50b1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/get-rule.md @@ -0,0 +1,2 @@ +appwrite proxy getRule \ + --ruleId diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/list-rules.md b/docs/examples/1.8.x/console-cli/examples/proxy/list-rules.md new file mode 100644 index 0000000000..bc654bac5c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/list-rules.md @@ -0,0 +1,3 @@ +appwrite proxy listRules \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/proxy/update-rule-verification.md b/docs/examples/1.8.x/console-cli/examples/proxy/update-rule-verification.md new file mode 100644 index 0000000000..8200d15702 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/proxy/update-rule-verification.md @@ -0,0 +1,2 @@ +appwrite proxy updateRuleVerification \ + --ruleId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/create-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/create-deployment.md new file mode 100644 index 0000000000..a83d7f3cfe --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/create-deployment.md @@ -0,0 +1,7 @@ +appwrite sites createDeployment \ + --siteId \ + --code 'path/to/file.png' \ + --activate false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..bab63ca8a3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,3 @@ +appwrite sites createDuplicateDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..2aaaf445db --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/create-template-deployment.md @@ -0,0 +1,7 @@ +appwrite sites createTemplateDeployment \ + --siteId \ + --repository \ + --owner \ + --rootDirectory \ + --version \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/create-variable.md b/docs/examples/1.8.x/console-cli/examples/sites/create-variable.md new file mode 100644 index 0000000000..b640321317 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/create-variable.md @@ -0,0 +1,5 @@ +appwrite sites createVariable \ + --siteId \ + --key \ + --value \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..85c96f93ec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/create-vcs-deployment.md @@ -0,0 +1,5 @@ +appwrite sites createVcsDeployment \ + --siteId \ + --type branch \ + --reference \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/create.md b/docs/examples/1.8.x/console-cli/examples/sites/create.md new file mode 100644 index 0000000000..bd7e86e70f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/create.md @@ -0,0 +1,19 @@ +appwrite sites create \ + --siteId \ + --name \ + --framework analog \ + --buildRuntime node-14.5 \ + + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/delete-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..c1cbf49637 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/delete-deployment.md @@ -0,0 +1,3 @@ +appwrite sites deleteDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/delete-log.md b/docs/examples/1.8.x/console-cli/examples/sites/delete-log.md new file mode 100644 index 0000000000..6769be255c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/delete-log.md @@ -0,0 +1,3 @@ +appwrite sites deleteLog \ + --siteId \ + --logId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/delete-variable.md b/docs/examples/1.8.x/console-cli/examples/sites/delete-variable.md new file mode 100644 index 0000000000..60d9ecf4eb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/delete-variable.md @@ -0,0 +1,3 @@ +appwrite sites deleteVariable \ + --siteId \ + --variableId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/delete.md b/docs/examples/1.8.x/console-cli/examples/sites/delete.md new file mode 100644 index 0000000000..9071454850 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/delete.md @@ -0,0 +1,2 @@ +appwrite sites delete \ + --siteId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/console-cli/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..1fae298796 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get-deployment-download.md @@ -0,0 +1,4 @@ +appwrite sites getDeploymentDownload \ + --siteId \ + --deploymentId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/get-deployment.md new file mode 100644 index 0000000000..93680ff70d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get-deployment.md @@ -0,0 +1,3 @@ +appwrite sites getDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get-log.md b/docs/examples/1.8.x/console-cli/examples/sites/get-log.md new file mode 100644 index 0000000000..7867aba05e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get-log.md @@ -0,0 +1,3 @@ +appwrite sites getLog \ + --siteId \ + --logId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get-template.md b/docs/examples/1.8.x/console-cli/examples/sites/get-template.md new file mode 100644 index 0000000000..e04dd2e120 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get-template.md @@ -0,0 +1,2 @@ +appwrite sites getTemplate \ + --templateId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get-usage.md b/docs/examples/1.8.x/console-cli/examples/sites/get-usage.md new file mode 100644 index 0000000000..6de7d6bde8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get-usage.md @@ -0,0 +1,3 @@ +appwrite sites getUsage \ + --siteId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get-variable.md b/docs/examples/1.8.x/console-cli/examples/sites/get-variable.md new file mode 100644 index 0000000000..b60b577c38 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get-variable.md @@ -0,0 +1,3 @@ +appwrite sites getVariable \ + --siteId \ + --variableId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/get.md b/docs/examples/1.8.x/console-cli/examples/sites/get.md new file mode 100644 index 0000000000..7922efa5f0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/get.md @@ -0,0 +1,2 @@ +appwrite sites get \ + --siteId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-deployments.md b/docs/examples/1.8.x/console-cli/examples/sites/list-deployments.md new file mode 100644 index 0000000000..5ab2cdc104 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-deployments.md @@ -0,0 +1,4 @@ +appwrite sites listDeployments \ + --siteId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-frameworks.md b/docs/examples/1.8.x/console-cli/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..1d9b6b4b87 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-frameworks.md @@ -0,0 +1 @@ +appwrite sites listFrameworks diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-logs.md b/docs/examples/1.8.x/console-cli/examples/sites/list-logs.md new file mode 100644 index 0000000000..f13864fe6b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-logs.md @@ -0,0 +1,3 @@ +appwrite sites listLogs \ + --siteId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-specifications.md b/docs/examples/1.8.x/console-cli/examples/sites/list-specifications.md new file mode 100644 index 0000000000..dc1a16c9dc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-specifications.md @@ -0,0 +1 @@ +appwrite sites listSpecifications diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-templates.md b/docs/examples/1.8.x/console-cli/examples/sites/list-templates.md new file mode 100644 index 0000000000..9d93913d94 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-templates.md @@ -0,0 +1,5 @@ +appwrite sites listTemplates \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-usage.md b/docs/examples/1.8.x/console-cli/examples/sites/list-usage.md new file mode 100644 index 0000000000..a6f43f61e7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-usage.md @@ -0,0 +1,2 @@ +appwrite sites listUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list-variables.md b/docs/examples/1.8.x/console-cli/examples/sites/list-variables.md new file mode 100644 index 0000000000..13a258b054 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list-variables.md @@ -0,0 +1,2 @@ +appwrite sites listVariables \ + --siteId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/list.md b/docs/examples/1.8.x/console-cli/examples/sites/list.md new file mode 100644 index 0000000000..0cad70e894 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/list.md @@ -0,0 +1,3 @@ +appwrite sites list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/console-cli/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..7923b384f6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/update-deployment-status.md @@ -0,0 +1,3 @@ +appwrite sites updateDeploymentStatus \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/console-cli/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..de877d8ae7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/update-site-deployment.md @@ -0,0 +1,3 @@ +appwrite sites updateSiteDeployment \ + --siteId \ + --deploymentId diff --git a/docs/examples/1.8.x/console-cli/examples/sites/update-variable.md b/docs/examples/1.8.x/console-cli/examples/sites/update-variable.md new file mode 100644 index 0000000000..e968771056 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/update-variable.md @@ -0,0 +1,6 @@ +appwrite sites updateVariable \ + --siteId \ + --variableId \ + --key \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/sites/update.md b/docs/examples/1.8.x/console-cli/examples/sites/update.md new file mode 100644 index 0000000000..192ee26e3e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/sites/update.md @@ -0,0 +1,19 @@ +appwrite sites update \ + --siteId \ + --name \ + --framework analog \ + + + + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/create-bucket.md b/docs/examples/1.8.x/console-cli/examples/storage/create-bucket.md new file mode 100644 index 0000000000..878c10d253 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/create-bucket.md @@ -0,0 +1,11 @@ +appwrite storage createBucket \ + --bucketId \ + --name \ + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/create-file.md b/docs/examples/1.8.x/console-cli/examples/storage/create-file.md new file mode 100644 index 0000000000..67bd4da2c0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/create-file.md @@ -0,0 +1,5 @@ +appwrite storage createFile \ + --bucketId \ + --fileId \ + --file 'path/to/file.png' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/delete-bucket.md b/docs/examples/1.8.x/console-cli/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..e51797e12c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/delete-bucket.md @@ -0,0 +1,2 @@ +appwrite storage deleteBucket \ + --bucketId diff --git a/docs/examples/1.8.x/console-cli/examples/storage/delete-file.md b/docs/examples/1.8.x/console-cli/examples/storage/delete-file.md new file mode 100644 index 0000000000..79c03e8288 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/delete-file.md @@ -0,0 +1,3 @@ +appwrite storage deleteFile \ + --bucketId \ + --fileId diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-bucket-usage.md b/docs/examples/1.8.x/console-cli/examples/storage/get-bucket-usage.md new file mode 100644 index 0000000000..df3659c60a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-bucket-usage.md @@ -0,0 +1,3 @@ +appwrite storage getBucketUsage \ + --bucketId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-bucket.md b/docs/examples/1.8.x/console-cli/examples/storage/get-bucket.md new file mode 100644 index 0000000000..cf8725b35d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-bucket.md @@ -0,0 +1,2 @@ +appwrite storage getBucket \ + --bucketId diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-file-download.md b/docs/examples/1.8.x/console-cli/examples/storage/get-file-download.md new file mode 100644 index 0000000000..79f3368d87 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-file-download.md @@ -0,0 +1,4 @@ +appwrite storage getFileDownload \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-file-preview.md b/docs/examples/1.8.x/console-cli/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..de437af65b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-file-preview.md @@ -0,0 +1,15 @@ +appwrite storage getFilePreview \ + --bucketId \ + --fileId \ + + + + + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-file-view.md b/docs/examples/1.8.x/console-cli/examples/storage/get-file-view.md new file mode 100644 index 0000000000..689cf1233b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-file-view.md @@ -0,0 +1,4 @@ +appwrite storage getFileView \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-file.md b/docs/examples/1.8.x/console-cli/examples/storage/get-file.md new file mode 100644 index 0000000000..641c20d2b0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-file.md @@ -0,0 +1,3 @@ +appwrite storage getFile \ + --bucketId \ + --fileId diff --git a/docs/examples/1.8.x/console-cli/examples/storage/get-usage.md b/docs/examples/1.8.x/console-cli/examples/storage/get-usage.md new file mode 100644 index 0000000000..29466e02f0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/get-usage.md @@ -0,0 +1,2 @@ +appwrite storage getUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/list-buckets.md b/docs/examples/1.8.x/console-cli/examples/storage/list-buckets.md new file mode 100644 index 0000000000..a5cad1988f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/list-buckets.md @@ -0,0 +1,3 @@ +appwrite storage listBuckets \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/list-files.md b/docs/examples/1.8.x/console-cli/examples/storage/list-files.md new file mode 100644 index 0000000000..0e1c2f09c0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/list-files.md @@ -0,0 +1,4 @@ +appwrite storage listFiles \ + --bucketId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/update-bucket.md b/docs/examples/1.8.x/console-cli/examples/storage/update-bucket.md new file mode 100644 index 0000000000..b006a7bf74 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/update-bucket.md @@ -0,0 +1,11 @@ +appwrite storage updateBucket \ + --bucketId \ + --name \ + + + + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/storage/update-file.md b/docs/examples/1.8.x/console-cli/examples/storage/update-file.md new file mode 100644 index 0000000000..593ea658a0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/storage/update-file.md @@ -0,0 +1,5 @@ +appwrite storage updateFile \ + --bucketId \ + --fileId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..88e6bf8853 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md @@ -0,0 +1,7 @@ +appwrite tables createBooleanColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..de28b7537c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md @@ -0,0 +1,7 @@ +appwrite tables createDatetimeColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md new file mode 100644 index 0000000000..23b672e62d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md @@ -0,0 +1,7 @@ +appwrite tables createEmailColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..4cd3e1d241 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md @@ -0,0 +1,8 @@ +appwrite tables createEnumColumn \ + --databaseId \ + --tableId \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md new file mode 100644 index 0000000000..9c69e29e91 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md @@ -0,0 +1,9 @@ +appwrite tables createFloatColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-index.md b/docs/examples/1.8.x/console-cli/examples/tables/create-index.md new file mode 100644 index 0000000000..4c6d641727 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-index.md @@ -0,0 +1,8 @@ +appwrite tables createIndex \ + --databaseId \ + --tableId \ + --key '' \ + --type key \ + --columns one two three \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..afab48e803 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md @@ -0,0 +1,9 @@ +appwrite tables createIntegerColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..000b54b918 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md @@ -0,0 +1,7 @@ +appwrite tables createIpColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..4ce3342768 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md @@ -0,0 +1,9 @@ +appwrite tables createRelationshipColumn \ + --databaseId \ + --tableId \ + --relatedTableId \ + --type oneToOne \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-row.md b/docs/examples/1.8.x/console-cli/examples/tables/create-row.md new file mode 100644 index 0000000000..e446de157b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-row.md @@ -0,0 +1,6 @@ +appwrite tables createRow \ + --databaseId \ + --tableId \ + --rowId \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md new file mode 100644 index 0000000000..cb7c68dd7b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md @@ -0,0 +1,4 @@ +appwrite tables createRows \ + --databaseId \ + --tableId \ + --rows one two three diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md new file mode 100644 index 0000000000..4df1792a34 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md @@ -0,0 +1,9 @@ +appwrite tables createStringColumn \ + --databaseId \ + --tableId \ + --key '' \ + --size 1 \ + --required false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md new file mode 100644 index 0000000000..fcb81491bd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md @@ -0,0 +1,7 @@ +appwrite tables createUrlColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create.md b/docs/examples/1.8.x/console-cli/examples/tables/create.md new file mode 100644 index 0000000000..09f52f16a1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create.md @@ -0,0 +1,7 @@ +appwrite tables create \ + --databaseId \ + --tableId \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..73743c21ce --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md @@ -0,0 +1,7 @@ +appwrite tables decrementRowColumn \ + --databaseId \ + --tableId \ + --rowId \ + --column '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md new file mode 100644 index 0000000000..e659af54d0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md @@ -0,0 +1,4 @@ +appwrite tables deleteColumn \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md new file mode 100644 index 0000000000..0de1e417d3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md @@ -0,0 +1,4 @@ +appwrite tables deleteIndex \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md new file mode 100644 index 0000000000..d6918be89e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md @@ -0,0 +1,4 @@ +appwrite tables deleteRow \ + --databaseId \ + --tableId \ + --rowId diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md new file mode 100644 index 0000000000..579586b561 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md @@ -0,0 +1,4 @@ +appwrite tables deleteRows \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete.md b/docs/examples/1.8.x/console-cli/examples/tables/delete.md new file mode 100644 index 0000000000..0f189e09f1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete.md @@ -0,0 +1,3 @@ +appwrite tables delete \ + --databaseId \ + --tableId diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-column.md b/docs/examples/1.8.x/console-cli/examples/tables/get-column.md new file mode 100644 index 0000000000..33a94b5ebc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-column.md @@ -0,0 +1,4 @@ +appwrite tables getColumn \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-index.md b/docs/examples/1.8.x/console-cli/examples/tables/get-index.md new file mode 100644 index 0000000000..e956175e09 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-index.md @@ -0,0 +1,4 @@ +appwrite tables getIndex \ + --databaseId \ + --tableId \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-row.md b/docs/examples/1.8.x/console-cli/examples/tables/get-row.md new file mode 100644 index 0000000000..5b3b64bfbc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-row.md @@ -0,0 +1,5 @@ +appwrite tables getRow \ + --databaseId \ + --tableId \ + --rowId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md b/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md new file mode 100644 index 0000000000..f766a418a0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md @@ -0,0 +1,4 @@ +appwrite tables getTableUsage \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get.md b/docs/examples/1.8.x/console-cli/examples/tables/get.md new file mode 100644 index 0000000000..a41e6c10ed --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get.md @@ -0,0 +1,3 @@ +appwrite tables get \ + --databaseId \ + --tableId diff --git a/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md b/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..da73950231 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md @@ -0,0 +1,7 @@ +appwrite tables incrementRowColumn \ + --databaseId \ + --tableId \ + --rowId \ + --column '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md b/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md new file mode 100644 index 0000000000..0439d58127 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md @@ -0,0 +1,4 @@ +appwrite tables listColumns \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md b/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md new file mode 100644 index 0000000000..b5fd85b911 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md @@ -0,0 +1,4 @@ +appwrite tables listIndexes \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md b/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md new file mode 100644 index 0000000000..e7a8c5b8ce --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md @@ -0,0 +1,5 @@ +appwrite tables listRowLogs \ + --databaseId \ + --tableId \ + --rowId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md new file mode 100644 index 0000000000..2a6d69d574 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md @@ -0,0 +1,4 @@ +appwrite tables listRows \ + --databaseId \ + --tableId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list.md b/docs/examples/1.8.x/console-cli/examples/tables/list.md new file mode 100644 index 0000000000..1c58d9ed03 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list.md @@ -0,0 +1,4 @@ +appwrite tables list \ + --databaseId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..7d736f35e5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md @@ -0,0 +1,7 @@ +appwrite tables updateBooleanColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default false \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..3da3e4a919 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md @@ -0,0 +1,7 @@ +appwrite tables updateDatetimeColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md new file mode 100644 index 0000000000..df718b8d9a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md @@ -0,0 +1,7 @@ +appwrite tables updateEmailColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default email@example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..55c55fc2bd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md @@ -0,0 +1,8 @@ +appwrite tables updateEnumColumn \ + --databaseId \ + --tableId \ + --key '' \ + --elements one two three \ + --required false \ + --default \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md new file mode 100644 index 0000000000..99667a8447 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md @@ -0,0 +1,9 @@ +appwrite tables updateFloatColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..098efa0e3e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md @@ -0,0 +1,9 @@ +appwrite tables updateIntegerColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..50eadc3fff --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md @@ -0,0 +1,7 @@ +appwrite tables updateIpColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..43e0c0ae6e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md @@ -0,0 +1,6 @@ +appwrite tables updateRelationshipColumn \ + --databaseId \ + --tableId \ + --key '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-row.md b/docs/examples/1.8.x/console-cli/examples/tables/update-row.md new file mode 100644 index 0000000000..d5cd0fe4ee --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-row.md @@ -0,0 +1,6 @@ +appwrite tables updateRow \ + --databaseId \ + --tableId \ + --rowId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md new file mode 100644 index 0000000000..173d608d5a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md @@ -0,0 +1,5 @@ +appwrite tables updateRows \ + --databaseId \ + --tableId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md new file mode 100644 index 0000000000..3feaa734ec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md @@ -0,0 +1,8 @@ +appwrite tables updateStringColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md new file mode 100644 index 0000000000..2df1ab14d7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md @@ -0,0 +1,7 @@ +appwrite tables updateUrlColumn \ + --databaseId \ + --tableId \ + --key '' \ + --required false \ + --default https://example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update.md b/docs/examples/1.8.x/console-cli/examples/tables/update.md new file mode 100644 index 0000000000..a1550287c8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update.md @@ -0,0 +1,7 @@ +appwrite tables update \ + --databaseId \ + --tableId \ + --name \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md b/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md new file mode 100644 index 0000000000..0281a89b20 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md @@ -0,0 +1,4 @@ +appwrite tables upsertRow \ + --databaseId \ + --tableId \ + --rowId diff --git a/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..828caf8f10 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md @@ -0,0 +1,3 @@ +appwrite tables upsertRows \ + --databaseId \ + --tableId diff --git a/docs/examples/1.8.x/console-cli/examples/teams/create-membership.md b/docs/examples/1.8.x/console-cli/examples/teams/create-membership.md new file mode 100644 index 0000000000..0d0fc8df09 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/create-membership.md @@ -0,0 +1,8 @@ +appwrite teams createMembership \ + --teamId \ + --roles one two three \ + + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/teams/create.md b/docs/examples/1.8.x/console-cli/examples/teams/create.md new file mode 100644 index 0000000000..e0f9a126f2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/create.md @@ -0,0 +1,4 @@ +appwrite teams create \ + --teamId \ + --name \ + diff --git a/docs/examples/1.8.x/console-cli/examples/teams/delete-membership.md b/docs/examples/1.8.x/console-cli/examples/teams/delete-membership.md new file mode 100644 index 0000000000..58d0adbac7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/delete-membership.md @@ -0,0 +1,3 @@ +appwrite teams deleteMembership \ + --teamId \ + --membershipId diff --git a/docs/examples/1.8.x/console-cli/examples/teams/delete.md b/docs/examples/1.8.x/console-cli/examples/teams/delete.md new file mode 100644 index 0000000000..5b018158cd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/delete.md @@ -0,0 +1,2 @@ +appwrite teams delete \ + --teamId diff --git a/docs/examples/1.8.x/console-cli/examples/teams/get-membership.md b/docs/examples/1.8.x/console-cli/examples/teams/get-membership.md new file mode 100644 index 0000000000..5e6af4c1a1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/get-membership.md @@ -0,0 +1,3 @@ +appwrite teams getMembership \ + --teamId \ + --membershipId diff --git a/docs/examples/1.8.x/console-cli/examples/teams/get-prefs.md b/docs/examples/1.8.x/console-cli/examples/teams/get-prefs.md new file mode 100644 index 0000000000..2ab1f1dc01 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/get-prefs.md @@ -0,0 +1,2 @@ +appwrite teams getPrefs \ + --teamId diff --git a/docs/examples/1.8.x/console-cli/examples/teams/get.md b/docs/examples/1.8.x/console-cli/examples/teams/get.md new file mode 100644 index 0000000000..c8e75b7543 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/get.md @@ -0,0 +1,2 @@ +appwrite teams get \ + --teamId diff --git a/docs/examples/1.8.x/console-cli/examples/teams/list-logs.md b/docs/examples/1.8.x/console-cli/examples/teams/list-logs.md new file mode 100644 index 0000000000..66149350d8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/list-logs.md @@ -0,0 +1,3 @@ +appwrite teams listLogs \ + --teamId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/teams/list-memberships.md b/docs/examples/1.8.x/console-cli/examples/teams/list-memberships.md new file mode 100644 index 0000000000..050ea961d2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/list-memberships.md @@ -0,0 +1,4 @@ +appwrite teams listMemberships \ + --teamId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/teams/list.md b/docs/examples/1.8.x/console-cli/examples/teams/list.md new file mode 100644 index 0000000000..dfffc4d4dd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/list.md @@ -0,0 +1,3 @@ +appwrite teams list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/teams/update-membership-status.md b/docs/examples/1.8.x/console-cli/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..aa4acf9457 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/update-membership-status.md @@ -0,0 +1,5 @@ +appwrite teams updateMembershipStatus \ + --teamId \ + --membershipId \ + --userId \ + --secret diff --git a/docs/examples/1.8.x/console-cli/examples/teams/update-membership.md b/docs/examples/1.8.x/console-cli/examples/teams/update-membership.md new file mode 100644 index 0000000000..6cfda92920 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/update-membership.md @@ -0,0 +1,4 @@ +appwrite teams updateMembership \ + --teamId \ + --membershipId \ + --roles one two three diff --git a/docs/examples/1.8.x/console-cli/examples/teams/update-name.md b/docs/examples/1.8.x/console-cli/examples/teams/update-name.md new file mode 100644 index 0000000000..8c73e00d7b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/update-name.md @@ -0,0 +1,3 @@ +appwrite teams updateName \ + --teamId \ + --name diff --git a/docs/examples/1.8.x/console-cli/examples/teams/update-prefs.md b/docs/examples/1.8.x/console-cli/examples/teams/update-prefs.md new file mode 100644 index 0000000000..b6fc5a8f6e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/teams/update-prefs.md @@ -0,0 +1,3 @@ +appwrite teams updatePrefs \ + --teamId \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.8.x/console-cli/examples/tokens/create-file-token.md b/docs/examples/1.8.x/console-cli/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..8de8d7ac6c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tokens/create-file-token.md @@ -0,0 +1,4 @@ +appwrite tokens createFileToken \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tokens/delete.md b/docs/examples/1.8.x/console-cli/examples/tokens/delete.md new file mode 100644 index 0000000000..c25ea4a4b4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tokens/delete.md @@ -0,0 +1,2 @@ +appwrite tokens delete \ + --tokenId diff --git a/docs/examples/1.8.x/console-cli/examples/tokens/get.md b/docs/examples/1.8.x/console-cli/examples/tokens/get.md new file mode 100644 index 0000000000..2c48280b0d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tokens/get.md @@ -0,0 +1,2 @@ +appwrite tokens get \ + --tokenId diff --git a/docs/examples/1.8.x/console-cli/examples/tokens/list.md b/docs/examples/1.8.x/console-cli/examples/tokens/list.md new file mode 100644 index 0000000000..a808e545ca --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tokens/list.md @@ -0,0 +1,4 @@ +appwrite tokens list \ + --bucketId \ + --fileId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tokens/update.md b/docs/examples/1.8.x/console-cli/examples/tokens/update.md new file mode 100644 index 0000000000..73f21609b6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tokens/update.md @@ -0,0 +1,3 @@ +appwrite tokens update \ + --tokenId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-argon2user.md b/docs/examples/1.8.x/console-cli/examples/users/create-argon2user.md new file mode 100644 index 0000000000..b0c7494e20 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-argon2user.md @@ -0,0 +1,5 @@ +appwrite users createArgon2User \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..b5686721b5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-bcrypt-user.md @@ -0,0 +1,5 @@ +appwrite users createBcryptUser \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-j-w-t.md b/docs/examples/1.8.x/console-cli/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..220086bb1a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-j-w-t.md @@ -0,0 +1,4 @@ +appwrite users createJWT \ + --userId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-m-d5user.md b/docs/examples/1.8.x/console-cli/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..ba37a78be2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-m-d5user.md @@ -0,0 +1,5 @@ +appwrite users createMD5User \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/console-cli/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..4dbd98ff8a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users createMfaRecoveryCodes \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..9dc378dc99 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-p-h-pass-user.md @@ -0,0 +1,5 @@ +appwrite users createPHPassUser \ + --userId \ + --email email@example.com \ + --password password \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..57483625e9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-s-h-a-user.md @@ -0,0 +1,6 @@ +appwrite users createSHAUser \ + --userId \ + --email email@example.com \ + --password password \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..25fc60b6e1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,8 @@ +appwrite users createScryptModifiedUser \ + --userId \ + --email email@example.com \ + --password password \ + --passwordSalt \ + --passwordSaltSeparator \ + --passwordSignerKey \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/console-cli/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..3fc56b1ee3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-scrypt-user.md @@ -0,0 +1,10 @@ +appwrite users createScryptUser \ + --userId \ + --email email@example.com \ + --password password \ + --passwordSalt \ + --passwordCpu null \ + --passwordMemory null \ + --passwordParallel null \ + --passwordLength null \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-session.md b/docs/examples/1.8.x/console-cli/examples/users/create-session.md new file mode 100644 index 0000000000..c8938fa706 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-session.md @@ -0,0 +1,2 @@ +appwrite users createSession \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-target.md b/docs/examples/1.8.x/console-cli/examples/users/create-target.md new file mode 100644 index 0000000000..8d9306b00e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-target.md @@ -0,0 +1,7 @@ +appwrite users createTarget \ + --userId \ + --targetId \ + --providerType email \ + --identifier \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create-token.md b/docs/examples/1.8.x/console-cli/examples/users/create-token.md new file mode 100644 index 0000000000..9962e72c73 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create-token.md @@ -0,0 +1,4 @@ +appwrite users createToken \ + --userId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/create.md b/docs/examples/1.8.x/console-cli/examples/users/create.md new file mode 100644 index 0000000000..e828f56ecb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/create.md @@ -0,0 +1,6 @@ +appwrite users create \ + --userId \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/delete-identity.md b/docs/examples/1.8.x/console-cli/examples/users/delete-identity.md new file mode 100644 index 0000000000..f3d2d6d980 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/delete-identity.md @@ -0,0 +1,2 @@ +appwrite users deleteIdentity \ + --identityId diff --git a/docs/examples/1.8.x/console-cli/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/console-cli/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..edc67d0b9a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,3 @@ +appwrite users deleteMfaAuthenticator \ + --userId \ + --type totp diff --git a/docs/examples/1.8.x/console-cli/examples/users/delete-session.md b/docs/examples/1.8.x/console-cli/examples/users/delete-session.md new file mode 100644 index 0000000000..9f1fbdbfb3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/delete-session.md @@ -0,0 +1,3 @@ +appwrite users deleteSession \ + --userId \ + --sessionId diff --git a/docs/examples/1.8.x/console-cli/examples/users/delete-sessions.md b/docs/examples/1.8.x/console-cli/examples/users/delete-sessions.md new file mode 100644 index 0000000000..4c683d270a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/delete-sessions.md @@ -0,0 +1,2 @@ +appwrite users deleteSessions \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/delete-target.md b/docs/examples/1.8.x/console-cli/examples/users/delete-target.md new file mode 100644 index 0000000000..e9780911fd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/delete-target.md @@ -0,0 +1,3 @@ +appwrite users deleteTarget \ + --userId \ + --targetId diff --git a/docs/examples/1.8.x/console-cli/examples/users/delete.md b/docs/examples/1.8.x/console-cli/examples/users/delete.md new file mode 100644 index 0000000000..293a5b040d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/delete.md @@ -0,0 +1,2 @@ +appwrite users delete \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/console-cli/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..cefcce607a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users getMfaRecoveryCodes \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/get-prefs.md b/docs/examples/1.8.x/console-cli/examples/users/get-prefs.md new file mode 100644 index 0000000000..324aa4f508 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/get-prefs.md @@ -0,0 +1,2 @@ +appwrite users getPrefs \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/get-target.md b/docs/examples/1.8.x/console-cli/examples/users/get-target.md new file mode 100644 index 0000000000..b80dbd9728 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/get-target.md @@ -0,0 +1,3 @@ +appwrite users getTarget \ + --userId \ + --targetId diff --git a/docs/examples/1.8.x/console-cli/examples/users/get-usage.md b/docs/examples/1.8.x/console-cli/examples/users/get-usage.md new file mode 100644 index 0000000000..ad7895d3aa --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/get-usage.md @@ -0,0 +1,2 @@ +appwrite users getUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/get.md b/docs/examples/1.8.x/console-cli/examples/users/get.md new file mode 100644 index 0000000000..47002c5063 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/get.md @@ -0,0 +1,2 @@ +appwrite users get \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/list-identities.md b/docs/examples/1.8.x/console-cli/examples/users/list-identities.md new file mode 100644 index 0000000000..c6cd6d5e28 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list-identities.md @@ -0,0 +1,3 @@ +appwrite users listIdentities \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/list-logs.md b/docs/examples/1.8.x/console-cli/examples/users/list-logs.md new file mode 100644 index 0000000000..0b0bc1f50f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list-logs.md @@ -0,0 +1,3 @@ +appwrite users listLogs \ + --userId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/list-memberships.md b/docs/examples/1.8.x/console-cli/examples/users/list-memberships.md new file mode 100644 index 0000000000..119f446ec9 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list-memberships.md @@ -0,0 +1,4 @@ +appwrite users listMemberships \ + --userId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/console-cli/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..e5d111b8ee --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list-mfa-factors.md @@ -0,0 +1,2 @@ +appwrite users listMfaFactors \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/list-sessions.md b/docs/examples/1.8.x/console-cli/examples/users/list-sessions.md new file mode 100644 index 0000000000..cb85d15ff6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list-sessions.md @@ -0,0 +1,2 @@ +appwrite users listSessions \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/list-targets.md b/docs/examples/1.8.x/console-cli/examples/users/list-targets.md new file mode 100644 index 0000000000..9b5614bd32 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list-targets.md @@ -0,0 +1,3 @@ +appwrite users listTargets \ + --userId \ + diff --git a/docs/examples/1.8.x/console-cli/examples/users/list.md b/docs/examples/1.8.x/console-cli/examples/users/list.md new file mode 100644 index 0000000000..e5fdb9e5c5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/list.md @@ -0,0 +1,3 @@ +appwrite users list \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-email-verification.md b/docs/examples/1.8.x/console-cli/examples/users/update-email-verification.md new file mode 100644 index 0000000000..990436f38b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-email-verification.md @@ -0,0 +1,3 @@ +appwrite users updateEmailVerification \ + --userId \ + --emailVerification false diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-email.md b/docs/examples/1.8.x/console-cli/examples/users/update-email.md new file mode 100644 index 0000000000..cce20e9ebf --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-email.md @@ -0,0 +1,3 @@ +appwrite users updateEmail \ + --userId \ + --email email@example.com diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-labels.md b/docs/examples/1.8.x/console-cli/examples/users/update-labels.md new file mode 100644 index 0000000000..ca60c59683 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-labels.md @@ -0,0 +1,3 @@ +appwrite users updateLabels \ + --userId \ + --labels one two three diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/console-cli/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..63fb7f25eb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,2 @@ +appwrite users updateMfaRecoveryCodes \ + --userId diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-mfa.md b/docs/examples/1.8.x/console-cli/examples/users/update-mfa.md new file mode 100644 index 0000000000..3ccdbd8fdf --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-mfa.md @@ -0,0 +1,3 @@ +appwrite users updateMfa \ + --userId \ + --mfa false diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-name.md b/docs/examples/1.8.x/console-cli/examples/users/update-name.md new file mode 100644 index 0000000000..9bf20eb117 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-name.md @@ -0,0 +1,3 @@ +appwrite users updateName \ + --userId \ + --name diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-password.md b/docs/examples/1.8.x/console-cli/examples/users/update-password.md new file mode 100644 index 0000000000..c05197b3c2 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-password.md @@ -0,0 +1,3 @@ +appwrite users updatePassword \ + --userId \ + --password '' diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-phone-verification.md b/docs/examples/1.8.x/console-cli/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..b88a282d48 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-phone-verification.md @@ -0,0 +1,3 @@ +appwrite users updatePhoneVerification \ + --userId \ + --phoneVerification false diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-phone.md b/docs/examples/1.8.x/console-cli/examples/users/update-phone.md new file mode 100644 index 0000000000..118c8e3557 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-phone.md @@ -0,0 +1,3 @@ +appwrite users updatePhone \ + --userId \ + --number +12065550100 diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-prefs.md b/docs/examples/1.8.x/console-cli/examples/users/update-prefs.md new file mode 100644 index 0000000000..f3fa995e4d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-prefs.md @@ -0,0 +1,3 @@ +appwrite users updatePrefs \ + --userId \ + --prefs '{ "key": "value" }' diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-status.md b/docs/examples/1.8.x/console-cli/examples/users/update-status.md new file mode 100644 index 0000000000..b587b70e9e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-status.md @@ -0,0 +1,3 @@ +appwrite users updateStatus \ + --userId \ + --status false diff --git a/docs/examples/1.8.x/console-cli/examples/users/update-target.md b/docs/examples/1.8.x/console-cli/examples/users/update-target.md new file mode 100644 index 0000000000..d6541a0600 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/users/update-target.md @@ -0,0 +1,6 @@ +appwrite users updateTarget \ + --userId \ + --targetId \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/create-repository-detection.md b/docs/examples/1.8.x/console-cli/examples/vcs/create-repository-detection.md new file mode 100644 index 0000000000..d12a093d2d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/create-repository-detection.md @@ -0,0 +1,5 @@ +appwrite vcs createRepositoryDetection \ + --installationId \ + --providerRepositoryId \ + --type runtime \ + diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/create-repository.md b/docs/examples/1.8.x/console-cli/examples/vcs/create-repository.md new file mode 100644 index 0000000000..a4934d5ef5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/create-repository.md @@ -0,0 +1,4 @@ +appwrite vcs createRepository \ + --installationId \ + --name \ + --private false diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/delete-installation.md b/docs/examples/1.8.x/console-cli/examples/vcs/delete-installation.md new file mode 100644 index 0000000000..f7d3a92001 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/delete-installation.md @@ -0,0 +1,2 @@ +appwrite vcs deleteInstallation \ + --installationId diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/get-installation.md b/docs/examples/1.8.x/console-cli/examples/vcs/get-installation.md new file mode 100644 index 0000000000..df51853ea4 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/get-installation.md @@ -0,0 +1,2 @@ +appwrite vcs getInstallation \ + --installationId diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/get-repository-contents.md b/docs/examples/1.8.x/console-cli/examples/vcs/get-repository-contents.md new file mode 100644 index 0000000000..3ba8d75c91 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/get-repository-contents.md @@ -0,0 +1,5 @@ +appwrite vcs getRepositoryContents \ + --installationId \ + --providerRepositoryId \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/get-repository.md b/docs/examples/1.8.x/console-cli/examples/vcs/get-repository.md new file mode 100644 index 0000000000..9f88e18eef --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/get-repository.md @@ -0,0 +1,3 @@ +appwrite vcs getRepository \ + --installationId \ + --providerRepositoryId diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/list-installations.md b/docs/examples/1.8.x/console-cli/examples/vcs/list-installations.md new file mode 100644 index 0000000000..a0af28dfbb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/list-installations.md @@ -0,0 +1,3 @@ +appwrite vcs listInstallations \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/list-repositories.md b/docs/examples/1.8.x/console-cli/examples/vcs/list-repositories.md new file mode 100644 index 0000000000..15c3a643bb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/list-repositories.md @@ -0,0 +1,4 @@ +appwrite vcs listRepositories \ + --installationId \ + --type runtime \ + diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/list-repository-branches.md b/docs/examples/1.8.x/console-cli/examples/vcs/list-repository-branches.md new file mode 100644 index 0000000000..ea2fbd29fb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/list-repository-branches.md @@ -0,0 +1,3 @@ +appwrite vcs listRepositoryBranches \ + --installationId \ + --providerRepositoryId diff --git a/docs/examples/1.8.x/console-cli/examples/vcs/update-external-deployments.md b/docs/examples/1.8.x/console-cli/examples/vcs/update-external-deployments.md new file mode 100644 index 0000000000..417b59431d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/vcs/update-external-deployments.md @@ -0,0 +1,4 @@ +appwrite vcs updateExternalDeployments \ + --installationId \ + --repositoryId \ + --providerPullRequestId diff --git a/docs/examples/1.8.x/console-web/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/console-web/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..113f882e80 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createAnonymousSession(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-email-password-session.md b/docs/examples/1.8.x/console-web/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..36a503164b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-email-token.md b/docs/examples/1.8.x/console-web/examples/account/create-email-token.md new file mode 100644 index 0000000000..9517000af3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createEmailToken( + '', // userId + 'email@example.com', // email + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-j-w-t.md b/docs/examples/1.8.x/console-web/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..9fc0e6da5e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createJWT(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/console-web/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..6b1891855e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMagicURLToken( + '', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/console-web/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..923eb1ee3c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/console-web/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..fd6af6ec19 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticationFactor } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..d7c122b79c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/console-web/examples/account/create-o-auth2session.md new file mode 100644 index 0000000000..a11bd9880b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-o-auth2session.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Session( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.8.x/console-web/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/console-web/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..9eb7cfab67 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-o-auth2token.md @@ -0,0 +1,15 @@ +import { Client, Account, OAuthProvider } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); + diff --git a/docs/examples/1.8.x/console-web/examples/account/create-phone-token.md b/docs/examples/1.8.x/console-web/examples/account/create-phone-token.md new file mode 100644 index 0000000000..25216ca73c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneToken( + '', // userId + '+12065550100' // phone +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-phone-verification.md b/docs/examples/1.8.x/console-web/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..03185e3e91 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPhoneVerification(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-push-target.md b/docs/examples/1.8.x/console-web/examples/account/create-push-target.md new file mode 100644 index 0000000000..ee35566f8a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-push-target.md @@ -0,0 +1,15 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createPushTarget( + '', // targetId + '', // identifier + '' // providerId (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-recovery.md b/docs/examples/1.8.x/console-web/examples/account/create-recovery.md new file mode 100644 index 0000000000..c2bb4422fa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-session.md b/docs/examples/1.8.x/console-web/examples/account/create-session.md new file mode 100644 index 0000000000..1c8d8a4480 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create-verification.md b/docs/examples/1.8.x/console-web/examples/account/create-verification.md new file mode 100644 index 0000000000..f6eacdce1f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/create.md b/docs/examples/1.8.x/console-web/examples/account/create.md new file mode 100644 index 0000000000..d220aed8d0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/create.md @@ -0,0 +1,16 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.create( + '', // userId + 'email@example.com', // email + '', // password + '' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-identity.md b/docs/examples/1.8.x/console-web/examples/account/delete-identity.md new file mode 100644 index 0000000000..6808b32a1d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteIdentity( + '' // identityId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/console-web/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..54610a810c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-push-target.md b/docs/examples/1.8.x/console-web/examples/account/delete-push-target.md new file mode 100644 index 0000000000..f530b64dad --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/delete-push-target.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deletePushTarget( + '' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-session.md b/docs/examples/1.8.x/console-web/examples/account/delete-session.md new file mode 100644 index 0000000000..4eba0515e4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete-sessions.md b/docs/examples/1.8.x/console-web/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b9904d612f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.deleteSessions(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/delete.md b/docs/examples/1.8.x/console-web/examples/account/delete.md new file mode 100644 index 0000000000..2fc730f9f0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/delete.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.delete(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..bee039c48d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/get-prefs.md b/docs/examples/1.8.x/console-web/examples/account/get-prefs.md new file mode 100644 index 0000000000..3a013e6615 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getPrefs(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/get-session.md b/docs/examples/1.8.x/console-web/examples/account/get-session.md new file mode 100644 index 0000000000..d5da237783 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/get-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.getSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/get.md b/docs/examples/1.8.x/console-web/examples/account/get.md new file mode 100644 index 0000000000..35661e483b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/get.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/list-identities.md b/docs/examples/1.8.x/console-web/examples/account/list-identities.md new file mode 100644 index 0000000000..675e902c9f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/list-logs.md b/docs/examples/1.8.x/console-web/examples/account/list-logs.md new file mode 100644 index 0000000000..72a0ee12dd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/console-web/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..7cbc52ec71 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listMfaFactors(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/list-sessions.md b/docs/examples/1.8.x/console-web/examples/account/list-sessions.md new file mode 100644 index 0000000000..6a24e372c5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.listSessions(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-email.md b/docs/examples/1.8.x/console-web/examples/account/update-email.md new file mode 100644 index 0000000000..df1c7f480a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-email.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-m-f-a.md b/docs/examples/1.8.x/console-web/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..b813b60bb4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMFA( + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/console-web/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..e0ecd66740 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMagicURLSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/console-web/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..b960675914 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Account, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/console-web/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..5314959f25 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaChallenge( + '', // challengeId + '' // otp +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..654d9fb0fa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateMfaRecoveryCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-name.md b/docs/examples/1.8.x/console-web/examples/account/update-name.md new file mode 100644 index 0000000000..cd36ece113 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-name.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateName( + '' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-password.md b/docs/examples/1.8.x/console-web/examples/account/update-password.md new file mode 100644 index 0000000000..863c5f28b3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-password.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-phone-session.md b/docs/examples/1.8.x/console-web/examples/account/update-phone-session.md new file mode 100644 index 0000000000..d23c10bbda --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneSession( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-phone-verification.md b/docs/examples/1.8.x/console-web/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..1a05386a9d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhoneVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-phone.md b/docs/examples/1.8.x/console-web/examples/account/update-phone.md new file mode 100644 index 0000000000..380279d057 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-prefs.md b/docs/examples/1.8.x/console-web/examples/account/update-prefs.md new file mode 100644 index 0000000000..13d857468d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePrefs( + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-push-target.md b/docs/examples/1.8.x/console-web/examples/account/update-push-target.md new file mode 100644 index 0000000000..566d754db7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-push-target.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updatePushTarget( + '', // targetId + '' // identifier +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-recovery.md b/docs/examples/1.8.x/console-web/examples/account/update-recovery.md new file mode 100644 index 0000000000..53d75f95d2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateRecovery( + '', // userId + '', // secret + '' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-session.md b/docs/examples/1.8.x/console-web/examples/account/update-session.md new file mode 100644 index 0000000000..207fc026d8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-session.md @@ -0,0 +1,13 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateSession( + '' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-status.md b/docs/examples/1.8.x/console-web/examples/account/update-status.md new file mode 100644 index 0000000000..c1377dc4a6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-status.md @@ -0,0 +1,11 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateStatus(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/account/update-verification.md b/docs/examples/1.8.x/console-web/examples/account/update-verification.md new file mode 100644 index 0000000000..4861ca2b81 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import { Client, Account } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const account = new Account(client); + +const result = await account.updateVerification( + '', // userId + '' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/assistant/chat.md b/docs/examples/1.8.x/console-web/examples/assistant/chat.md new file mode 100644 index 0000000000..98032043a5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/assistant/chat.md @@ -0,0 +1,13 @@ +import { Client, Assistant } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const assistant = new Assistant(client); + +const result = await assistant.chat( + '' // prompt +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-browser.md b/docs/examples/1.8.x/console-web/examples/avatars/get-browser.md new file mode 100644 index 0000000000..65e7c826ff --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-browser.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Browser } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/console-web/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..bda5407b27 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-credit-card.md @@ -0,0 +1,16 @@ +import { Client, Avatars, CreditCard } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-favicon.md b/docs/examples/1.8.x/console-web/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..b23e99a551 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-flag.md b/docs/examples/1.8.x/console-web/examples/avatars/get-flag.md new file mode 100644 index 0000000000..f6c0814abd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-flag.md @@ -0,0 +1,16 @@ +import { Client, Avatars, Flag } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-image.md b/docs/examples/1.8.x/console-web/examples/avatars/get-image.md new file mode 100644 index 0000000000..209e1ea836 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-initials.md b/docs/examples/1.8.x/console-web/examples/avatars/get-initials.md new file mode 100644 index 0000000000..6ec70b2143 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/avatars/get-q-r.md b/docs/examples/1.8.x/console-web/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..a255cdc531 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import { Client, Avatars } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/console/get-resource.md b/docs/examples/1.8.x/console-web/examples/console/get-resource.md new file mode 100644 index 0000000000..94a4707081 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/console/get-resource.md @@ -0,0 +1,14 @@ +import { Client, Console, ConsoleResourceType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const console = new Console(client); + +const result = await console.getResource( + '', // value + ConsoleResourceType.Rules // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/console/variables.md b/docs/examples/1.8.x/console-web/examples/console/variables.md new file mode 100644 index 0000000000..1dce6c0260 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/console/variables.md @@ -0,0 +1,11 @@ +import { Client, Console } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const console = new Console(client); + +const result = await console.variables(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..5b161c6f51 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-boolean-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createBooleanAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-collection.md b/docs/examples/1.8.x/console-web/examples/databases/create-collection.md new file mode 100644 index 0000000000..cd28cf8616 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-collection.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createCollection( + '', // databaseId + '', // collectionId + '', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..c431105bdf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-datetime-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createDatetimeAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-document.md b/docs/examples/1.8.x/console-web/examples/databases/create-document.md new file mode 100644 index 0000000000..4524017dd5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-document.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // + .setKey('') // Your secret API key + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.createDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-documents.md b/docs/examples/1.8.x/console-web/examples/databases/create-documents.md new file mode 100644 index 0000000000..f7ffbe809c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-documents.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // Your secret API key + +const databases = new Databases(client); + +const result = await databases.createDocuments( + '', // databaseId + '', // collectionId + [] // documents +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..f11c1a9649 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-email-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createEmailAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..d180b1b9f2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-enum-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createEnumAttribute( + '', // databaseId + '', // collectionId + '', // key + [], // elements + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..036d3fc201 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-float-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createFloatAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-index.md b/docs/examples/1.8.x/console-web/examples/databases/create-index.md new file mode 100644 index 0000000000..6a35f55349 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-index.md @@ -0,0 +1,19 @@ +import { Client, Databases, IndexType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createIndex( + '', // databaseId + '', // collectionId + '', // key + IndexType.Key, // type + [], // attributes + [], // orders (optional) + [] // lengths (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..25f474d0aa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-integer-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createIntegerAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..e8abc80f91 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-ip-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createIpAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..358a2df5fc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-relationship-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases, RelationshipType, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createRelationshipAttribute( + '', // databaseId + '', // collectionId + '', // relatedCollectionId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..ba94b0348b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-string-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createStringAttribute( + '', // databaseId + '', // collectionId + '', // key + 1, // size + false, // required + '', // default (optional) + false, // array (optional) + false // encrypt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..da80e392d3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create-url-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.createUrlAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create.md b/docs/examples/1.8.x/console-web/examples/databases/create.md new file mode 100644 index 0000000000..6d709ddd56 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/create.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.create( + '', // databaseId + '', // name + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..f090f53b49 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/decrement-document-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.decrementDocumentAttribute( + '', // databaseId + '', // collectionId + '', // documentId + '', // attribute + null, // value (optional) + null // min (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..df12b0d2f0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteAttribute( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-collection.md b/docs/examples/1.8.x/console-web/examples/databases/delete-collection.md new file mode 100644 index 0000000000..f490ae1096 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteCollection( + '', // databaseId + '' // collectionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-document.md b/docs/examples/1.8.x/console-web/examples/databases/delete-document.md new file mode 100644 index 0000000000..a56a4f23c5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-documents.md b/docs/examples/1.8.x/console-web/examples/databases/delete-documents.md new file mode 100644 index 0000000000..ec520c6cf9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete-index.md b/docs/examples/1.8.x/console-web/examples/databases/delete-index.md new file mode 100644 index 0000000000..cdd96a31f0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.deleteIndex( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/delete.md b/docs/examples/1.8.x/console-web/examples/databases/delete.md new file mode 100644 index 0000000000..3bd69657f9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/delete.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.delete( + '' // databaseId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/get-attribute.md new file mode 100644 index 0000000000..9dac2ad133 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getAttribute( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-collection-usage.md b/docs/examples/1.8.x/console-web/examples/databases/get-collection-usage.md new file mode 100644 index 0000000000..a2f736377a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-collection-usage.md @@ -0,0 +1,15 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getCollectionUsage( + '', // databaseId + '', // collectionId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-collection.md b/docs/examples/1.8.x/console-web/examples/databases/get-collection.md new file mode 100644 index 0000000000..56d29f05cb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getCollection( + '', // databaseId + '' // collectionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-document.md b/docs/examples/1.8.x/console-web/examples/databases/get-document.md new file mode 100644 index 0000000000..0e90cf785e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDocument( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-index.md b/docs/examples/1.8.x/console-web/examples/databases/get-index.md new file mode 100644 index 0000000000..4c8c3794af --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-index.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getIndex( + '', // databaseId + '', // collectionId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-usage.md b/docs/examples/1.8.x/console-web/examples/databases/get-usage.md new file mode 100644 index 0000000000..b02b0687b2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-usage.md @@ -0,0 +1,14 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getUsage( + '', // databaseId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get.md b/docs/examples/1.8.x/console-web/examples/databases/get.md new file mode 100644 index 0000000000..5c72c5639c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.get( + '' // databaseId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..62ebd6fe3c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.incrementDocumentAttribute( + '', // databaseId + '', // collectionId + '', // documentId + '', // attribute + null, // value (optional) + null // max (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-attributes.md b/docs/examples/1.8.x/console-web/examples/databases/list-attributes.md new file mode 100644 index 0000000000..0c2cd4092c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-attributes.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listAttributes( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-collection-logs.md b/docs/examples/1.8.x/console-web/examples/databases/list-collection-logs.md new file mode 100644 index 0000000000..b2ef92d677 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-collection-logs.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listCollectionLogs( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-collections.md b/docs/examples/1.8.x/console-web/examples/databases/list-collections.md new file mode 100644 index 0000000000..f9a0511e3e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-collections.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listCollections( + '', // databaseId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-document-logs.md b/docs/examples/1.8.x/console-web/examples/databases/list-document-logs.md new file mode 100644 index 0000000000..ddb789b3f0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-document-logs.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocumentLogs( + '', // databaseId + '', // collectionId + '', // documentId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-documents.md b/docs/examples/1.8.x/console-web/examples/databases/list-documents.md new file mode 100644 index 0000000000..3a77c05faa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listDocuments( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-indexes.md b/docs/examples/1.8.x/console-web/examples/databases/list-indexes.md new file mode 100644 index 0000000000..fbbef1a9d8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-indexes.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listIndexes( + '', // databaseId + '', // collectionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-logs.md b/docs/examples/1.8.x/console-web/examples/databases/list-logs.md new file mode 100644 index 0000000000..12ccccf87e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listLogs( + '', // databaseId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-table-logs.md b/docs/examples/1.8.x/console-web/examples/databases/list-table-logs.md new file mode 100644 index 0000000000..1681fc917c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-table-logs.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listTableLogs( + '', // databaseId + '', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-usages.md b/docs/examples/1.8.x/console-web/examples/databases/list-usages.md new file mode 100644 index 0000000000..5832c387bd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-usages.md @@ -0,0 +1,13 @@ +import { Client, Databases, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listUsages( + .24h // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list.md b/docs/examples/1.8.x/console-web/examples/databases/list.md new file mode 100644 index 0000000000..58ec7209a3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..95207fd2ab --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-boolean-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateBooleanAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + false, // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-collection.md b/docs/examples/1.8.x/console-web/examples/databases/update-collection.md new file mode 100644 index 0000000000..ced992baf4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-collection.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateCollection( + '', // databaseId + '', // collectionId + '', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..7c413ee532 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-datetime-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDatetimeAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-document.md b/docs/examples/1.8.x/console-web/examples/databases/update-document.md new file mode 100644 index 0000000000..85898ea2a7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocument( + '', // databaseId + '', // collectionId + '', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-documents.md b/docs/examples/1.8.x/console-web/examples/databases/update-documents.md new file mode 100644 index 0000000000..67be1e405c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-documents.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateDocuments( + '', // databaseId + '', // collectionId + {}, // data (optional) + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..e54dba99bd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-email-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateEmailAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..aa5330af04 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-enum-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateEnumAttribute( + '', // databaseId + '', // collectionId + '', // key + [], // elements + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..344ddb8815 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-float-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateFloatAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..72565bd5f4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-integer-attribute.md @@ -0,0 +1,20 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateIntegerAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..ff6dded552 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-ip-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateIpAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..acce3fd741 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-relationship-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateRelationshipAttribute( + '', // databaseId + '', // collectionId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..05601bd4a2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-string-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateStringAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + '', // default + 1, // size (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/console-web/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..78b4d92a28 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update-url-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.updateUrlAttribute( + '', // databaseId + '', // collectionId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/update.md b/docs/examples/1.8.x/console-web/examples/databases/update.md new file mode 100644 index 0000000000..a29475b816 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/update.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const databases = new Databases(client); + +const result = await databases.update( + '', // databaseId + '', // name + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md b/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md new file mode 100644 index 0000000000..6d92656543 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // + .setKey('') // Your secret API key + .setJWT(''); // Your secret JSON Web Token + +const databases = new Databases(client); + +const result = await databases.upsertDocument( + '', // databaseId + '', // collectionId + '' // documentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md b/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..519b0ec160 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // Your secret API key + +const databases = new Databases(client); + +const result = await databases.upsertDocuments( + '', // databaseId + '' // collectionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/create-deployment.md new file mode 100644 index 0000000000..62309d5e98 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createDeployment( + '', // functionId + document.getElementById('uploader').files[0], // code + false, // activate + '', // entrypoint (optional) + '' // commands (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..1b48c27a6f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createDuplicateDeployment( + '', // functionId + '', // deploymentId + '' // buildId (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-execution.md b/docs/examples/1.8.x/console-web/examples/functions/create-execution.md new file mode 100644 index 0000000000..813e1fd0a7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +import { Client, Functions, ExecutionMethod } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createExecution( + '', // functionId + '', // body (optional) + false, // async (optional) + '', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..98bf957eb1 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create-template-deployment.md @@ -0,0 +1,18 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createTemplateDeployment( + '', // functionId + '', // repository + '', // owner + '', // rootDirectory + '', // version + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-variable.md b/docs/examples/1.8.x/console-web/examples/functions/create-variable.md new file mode 100644 index 0000000000..0b562cb93d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create-variable.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createVariable( + '', // functionId + '', // key + '', // value + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..6a12653de4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create-vcs-deployment.md @@ -0,0 +1,16 @@ +import { Client, Functions, VCSDeploymentType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.createVcsDeployment( + '', // functionId + VCSDeploymentType.Branch, // type + '', // reference + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create.md b/docs/examples/1.8.x/console-web/examples/functions/create.md new file mode 100644 index 0000000000..1d9915f978 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/create.md @@ -0,0 +1,30 @@ +import { Client, Functions, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.create( + '', // functionId + '', // name + .Node145, // runtime + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '', // entrypoint (optional) + '', // commands (optional) + [], // scopes (optional) + '', // installationId (optional) + '', // providerRepositoryId (optional) + '', // providerBranch (optional) + false, // providerSilentMode (optional) + '', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/delete-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..1bc26feab0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.deleteDeployment( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/delete-execution.md b/docs/examples/1.8.x/console-web/examples/functions/delete-execution.md new file mode 100644 index 0000000000..0816434637 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/delete-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.deleteExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/delete-variable.md b/docs/examples/1.8.x/console-web/examples/functions/delete-variable.md new file mode 100644 index 0000000000..878d15d235 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.deleteVariable( + '', // functionId + '' // variableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/delete.md b/docs/examples/1.8.x/console-web/examples/functions/delete.md new file mode 100644 index 0000000000..86d616d267 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/delete.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.delete( + '' // functionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/console-web/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..1ad8fd30cd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get-deployment-download.md @@ -0,0 +1,15 @@ +import { Client, Functions, DeploymentDownloadType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = functions.getDeploymentDownload( + '', // functionId + '', // deploymentId + DeploymentDownloadType.Source // type (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/get-deployment.md new file mode 100644 index 0000000000..75cb11f741 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getDeployment( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-execution.md b/docs/examples/1.8.x/console-web/examples/functions/get-execution.md new file mode 100644 index 0000000000..58ab917bbd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getExecution( + '', // functionId + '' // executionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-template.md b/docs/examples/1.8.x/console-web/examples/functions/get-template.md new file mode 100644 index 0000000000..13c95210ab --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get-template.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getTemplate( + '' // templateId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-usage.md b/docs/examples/1.8.x/console-web/examples/functions/get-usage.md new file mode 100644 index 0000000000..bc010c3bd9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get-usage.md @@ -0,0 +1,14 @@ +import { Client, Functions, FunctionUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getUsage( + '', // functionId + FunctionUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get-variable.md b/docs/examples/1.8.x/console-web/examples/functions/get-variable.md new file mode 100644 index 0000000000..d80b2bccbf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.getVariable( + '', // functionId + '' // variableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/get.md b/docs/examples/1.8.x/console-web/examples/functions/get.md new file mode 100644 index 0000000000..9b852849eb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/get.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.get( + '' // functionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-deployments.md b/docs/examples/1.8.x/console-web/examples/functions/list-deployments.md new file mode 100644 index 0000000000..b9f2ec0eaf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-deployments.md @@ -0,0 +1,15 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listDeployments( + '', // functionId + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-executions.md b/docs/examples/1.8.x/console-web/examples/functions/list-executions.md new file mode 100644 index 0000000000..7d8a6c7a98 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listExecutions( + '', // functionId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-runtimes.md b/docs/examples/1.8.x/console-web/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..cdd1e08cad --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-runtimes.md @@ -0,0 +1,11 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listRuntimes(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-specifications.md b/docs/examples/1.8.x/console-web/examples/functions/list-specifications.md new file mode 100644 index 0000000000..fe671c54bb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-specifications.md @@ -0,0 +1,11 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listSpecifications(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-templates.md b/docs/examples/1.8.x/console-web/examples/functions/list-templates.md new file mode 100644 index 0000000000..ab7f84b34d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-templates.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listTemplates( + [], // runtimes (optional) + [], // useCases (optional) + 1, // limit (optional) + 0 // offset (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-usage.md b/docs/examples/1.8.x/console-web/examples/functions/list-usage.md new file mode 100644 index 0000000000..14a880692b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-usage.md @@ -0,0 +1,13 @@ +import { Client, Functions, FunctionUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listUsage( + FunctionUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list-variables.md b/docs/examples/1.8.x/console-web/examples/functions/list-variables.md new file mode 100644 index 0000000000..5651dbd1c5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.listVariables( + '' // functionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/list.md b/docs/examples/1.8.x/console-web/examples/functions/list.md new file mode 100644 index 0000000000..462214449d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/list.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.list( + [], // queries (optional) + '' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/console-web/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..ba4f37fabf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/update-deployment-status.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.updateDeploymentStatus( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/console-web/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..2d714fb43c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/update-function-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.updateFunctionDeployment( + '', // functionId + '' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/update-variable.md b/docs/examples/1.8.x/console-web/examples/functions/update-variable.md new file mode 100644 index 0000000000..a6be7c0dd2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/update-variable.md @@ -0,0 +1,17 @@ +import { Client, Functions } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.updateVariable( + '', // functionId + '', // variableId + '', // key + '', // value (optional) + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/update.md b/docs/examples/1.8.x/console-web/examples/functions/update.md new file mode 100644 index 0000000000..66d3cd8e8f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/functions/update.md @@ -0,0 +1,30 @@ +import { Client, Functions, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const functions = new Functions(client); + +const result = await functions.update( + '', // functionId + '', // name + .Node145, // runtime (optional) + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '', // entrypoint (optional) + '', // commands (optional) + [], // scopes (optional) + '', // installationId (optional) + '', // providerRepositoryId (optional) + '', // providerBranch (optional) + false, // providerSilentMode (optional) + '', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/graphql/mutation.md b/docs/examples/1.8.x/console-web/examples/graphql/mutation.md new file mode 100644 index 0000000000..5360139b07 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.mutation( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/graphql/query.md b/docs/examples/1.8.x/console-web/examples/graphql/query.md new file mode 100644 index 0000000000..15434872ab --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/graphql/query.md @@ -0,0 +1,13 @@ +import { Client, Graphql } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const graphql = new Graphql(client); + +const result = await graphql.query( + {} // query +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-antivirus.md b/docs/examples/1.8.x/console-web/examples/health/get-antivirus.md new file mode 100644 index 0000000000..30e142a63d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-antivirus.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getAntivirus(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-cache.md b/docs/examples/1.8.x/console-web/examples/health/get-cache.md new file mode 100644 index 0000000000..1c0bb182e2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-cache.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getCache(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-certificate.md b/docs/examples/1.8.x/console-web/examples/health/get-certificate.md new file mode 100644 index 0000000000..288c0f8732 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-certificate.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getCertificate( + '' // domain (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-d-b.md b/docs/examples/1.8.x/console-web/examples/health/get-d-b.md new file mode 100644 index 0000000000..855e73466c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-d-b.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getDB(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/console-web/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..d96a5545aa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-failed-jobs.md @@ -0,0 +1,14 @@ +import { Client, Health, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getFailedJobs( + .V1Database, // name + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-pub-sub.md b/docs/examples/1.8.x/console-web/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..0ccce8e4d8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-pub-sub.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getPubSub(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-builds.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..dfbbfd91a6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-builds.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueBuilds( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..b0397f4422 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueCertificates( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-databases.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..1b958a9c75 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-databases.md @@ -0,0 +1,14 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueDatabases( + '', // name (optional) + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..3f34bc2228 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-deletes.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueDeletes( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-functions.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..2ea3701462 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueFunctions( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-logs.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..73bd18589a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-logs.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueLogs( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-mails.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..a6d86c04c7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-mails.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueMails( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..d25979713d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-messaging.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueMessaging( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..3619c56028 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-migrations.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueMigrations( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..cf1c3ee5df --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-stats-resources.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueStatsResources( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-usage.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..f79fd3b5ad --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-usage.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueUsage( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/console-web/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..72bcc44c9a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getQueueWebhooks( + null // threshold (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-storage-local.md b/docs/examples/1.8.x/console-web/examples/health/get-storage-local.md new file mode 100644 index 0000000000..e6bdf62c50 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-storage-local.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getStorageLocal(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-storage.md b/docs/examples/1.8.x/console-web/examples/health/get-storage.md new file mode 100644 index 0000000000..1d8941490e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-storage.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getStorage(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get-time.md b/docs/examples/1.8.x/console-web/examples/health/get-time.md new file mode 100644 index 0000000000..826eaf5a8c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get-time.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.getTime(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/health/get.md b/docs/examples/1.8.x/console-web/examples/health/get.md new file mode 100644 index 0000000000..b510d8a891 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/health/get.md @@ -0,0 +1,11 @@ +import { Client, Health } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const health = new Health(client); + +const result = await health.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/get.md b/docs/examples/1.8.x/console-web/examples/locale/get.md new file mode 100644 index 0000000000..4b0331787e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/get.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.get(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-codes.md b/docs/examples/1.8.x/console-web/examples/locale/list-codes.md new file mode 100644 index 0000000000..d20399af4a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCodes(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-continents.md b/docs/examples/1.8.x/console-web/examples/locale/list-continents.md new file mode 100644 index 0000000000..d769e88f1c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listContinents(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/console-web/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..ce8746421b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesEU(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/console-web/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..457867707c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountriesPhones(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-countries.md b/docs/examples/1.8.x/console-web/examples/locale/list-countries.md new file mode 100644 index 0000000000..298e25ee81 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCountries(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-currencies.md b/docs/examples/1.8.x/console-web/examples/locale/list-currencies.md new file mode 100644 index 0000000000..05ff041cbb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listCurrencies(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/locale/list-languages.md b/docs/examples/1.8.x/console-web/examples/locale/list-languages.md new file mode 100644 index 0000000000..1a2db31b55 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import { Client, Locale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const locale = new Locale(client); + +const result = await locale.listLanguages(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..9b238afc9e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-apns-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createApnsProvider( + '', // providerId + '', // name + '', // authKey (optional) + '', // authKeyId (optional) + '', // teamId (optional) + '', // bundleId (optional) + false, // sandbox (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-email.md b/docs/examples/1.8.x/console-web/examples/messaging/create-email.md new file mode 100644 index 0000000000..108517c89d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-email.md @@ -0,0 +1,24 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createEmail( + '', // messageId + '', // subject + '', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + [], // cc (optional) + [], // bcc (optional) + [], // attachments (optional) + false, // draft (optional) + false, // html (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..9d67e89fd6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-fcm-provider.md @@ -0,0 +1,16 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createFcmProvider( + '', // providerId + '', // name + {}, // serviceAccountJSON (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..dc165af859 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,22 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createMailgunProvider( + '', // providerId + '', // name + '', // apiKey (optional) + '', // domain (optional) + false, // isEuRegion (optional) + '', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..cab468a089 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-msg91provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createMsg91Provider( + '', // providerId + '', // name + '', // templateId (optional) + '', // senderId (optional) + '', // authKey (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-push.md b/docs/examples/1.8.x/console-web/examples/messaging/create-push.md new file mode 100644 index 0000000000..79c3a20e83 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-push.md @@ -0,0 +1,31 @@ +import { Client, Messaging, MessagePriority } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createPush( + '', // messageId + '', // title (optional) + '<BODY>', // body (optional) + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..b93c84b258 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-sms.md b/docs/examples/1.8.x/console-web/examples/messaging/create-sms.md new file mode 100644 index 0000000000..7146ee4ac9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-sms.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSms( + '<MESSAGE_ID>', // messageId + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..b4bcf14d0b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-smtp-provider.md @@ -0,0 +1,26 @@ +import { Client, Messaging, SmtpEncryption } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<HOST>', // host + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/console-web/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..b1f7239413 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>', // subscriberId + '<TARGET_ID>' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..355bc22f85 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-telesign-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..d79cffc316 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-topic.md b/docs/examples/1.8.x/console-web/examples/messaging/create-topic.md new file mode 100644 index 0000000000..274714a63b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-topic.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name + ["any"] // subscribe (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..9b8f440743 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-twilio-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..6e115e8eb9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/create-vonage-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.createVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/delete-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..f71eb65f29 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete-provider.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteProvider( + '<PROVIDER_ID>' // providerId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/console-web/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..ace9670211 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/delete-topic.md b/docs/examples/1.8.x/console-web/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..8f8e5460d3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete-topic.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.deleteTopic( + '<TOPIC_ID>' // topicId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/delete.md b/docs/examples/1.8.x/console-web/examples/messaging/delete.md new file mode 100644 index 0000000000..17324cca7e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/delete.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.delete( + '<MESSAGE_ID>' // messageId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/get-message.md b/docs/examples/1.8.x/console-web/examples/messaging/get-message.md new file mode 100644 index 0000000000..3282adbe57 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/get-message.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getMessage( + '<MESSAGE_ID>' // messageId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/get-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/get-provider.md new file mode 100644 index 0000000000..97ac5fd127 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/get-provider.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getProvider( + '<PROVIDER_ID>' // providerId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/console-web/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..b718558d71 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/get-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/get-topic.md b/docs/examples/1.8.x/console-web/examples/messaging/get-topic.md new file mode 100644 index 0000000000..802ec1fba4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/get-topic.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.getTopic( + '<TOPIC_ID>' // topicId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/console-web/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..8679b267ce --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-message-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listMessageLogs( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-messages.md b/docs/examples/1.8.x/console-web/examples/messaging/list-messages.md new file mode 100644 index 0000000000..a537844f81 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-messages.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listMessages( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/console-web/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..2e4acb38cf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-provider-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listProviderLogs( + '<PROVIDER_ID>', // providerId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-providers.md b/docs/examples/1.8.x/console-web/examples/messaging/list-providers.md new file mode 100644 index 0000000000..5c91f01bbc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-providers.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listProviders( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/console-web/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..f722c9a9ed --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listSubscriberLogs( + '<SUBSCRIBER_ID>', // subscriberId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/console-web/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..f120e9d96d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-subscribers.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listSubscribers( + '<TOPIC_ID>', // topicId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-targets.md b/docs/examples/1.8.x/console-web/examples/messaging/list-targets.md new file mode 100644 index 0000000000..89baf87cb0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-targets.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listTargets( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/console-web/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..bc23a09a91 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-topic-logs.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listTopicLogs( + '<TOPIC_ID>', // topicId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/list-topics.md b/docs/examples/1.8.x/console-web/examples/messaging/list-topics.md new file mode 100644 index 0000000000..d23cca3171 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/list-topics.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.listTopics( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..bc69c3ad1e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-apns-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false // sandbox (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-email.md b/docs/examples/1.8.x/console-web/examples/messaging/update-email.md new file mode 100644 index 0000000000..ba9bc7eb48 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-email.md @@ -0,0 +1,24 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateEmail( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<SUBJECT>', // subject (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + false, // html (optional) + [], // cc (optional) + [], // bcc (optional) + '', // scheduledAt (optional) + [] // attachments (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..d2e7382561 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-fcm-provider.md @@ -0,0 +1,16 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + {} // serviceAccountJSON (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..cc48ac52f3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,22 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..c2a6faec24 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-msg91provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>' // authKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-push.md b/docs/examples/1.8.x/console-web/examples/messaging/update-push.md new file mode 100644 index 0000000000..e479dcc425 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-push.md @@ -0,0 +1,31 @@ +import { Client, Messaging, MessagePriority } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updatePush( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..efe8263718 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,20 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-sms.md b/docs/examples/1.8.x/console-web/examples/messaging/update-sms.md new file mode 100644 index 0000000000..2c535a014e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-sms.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateSms( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..0274337a7b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-smtp-provider.md @@ -0,0 +1,26 @@ +import { Client, Messaging, SmtpEncryption } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<HOST>', // host (optional) + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>', // replyToEmail (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..5d8bc1602d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-telesign-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..564ad4fc69 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-topic.md b/docs/examples/1.8.x/console-web/examples/messaging/update-topic.md new file mode 100644 index 0000000000..e0edbae714 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-topic.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name (optional) + ["any"] // subscribe (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..544a52e4fd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-twilio-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/console-web/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..e831c03184 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/messaging/update-vonage-provider.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const messaging = new Messaging(client); + +const result = await messaging.updateVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + '<FROM>' // from (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-appwrite-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-appwrite-migration.md new file mode 100644 index 0000000000..db9a4cd0e0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-appwrite-migration.md @@ -0,0 +1,16 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createAppwriteMigration( + [], // resources + 'https://example.com', // endpoint + '<PROJECT_ID>', // projectId + '<API_KEY>' // apiKey +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-csv-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-csv-migration.md new file mode 100644 index 0000000000..544f6c8ef6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-csv-migration.md @@ -0,0 +1,15 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createCsvMigration( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '[ID1:ID2]' // resourceId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-firebase-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-firebase-migration.md new file mode 100644 index 0000000000..20ce3a8b3c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-firebase-migration.md @@ -0,0 +1,14 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createFirebaseMigration( + [], // resources + '<SERVICE_ACCOUNT>' // serviceAccount +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-n-host-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-n-host-migration.md new file mode 100644 index 0000000000..23b22ff371 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-n-host-migration.md @@ -0,0 +1,20 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createNHostMigration( + [], // resources + '<SUBDOMAIN>', // subdomain + '<REGION>', // region + '<ADMIN_SECRET>', // adminSecret + '<DATABASE>', // database + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/create-supabase-migration.md b/docs/examples/1.8.x/console-web/examples/migrations/create-supabase-migration.md new file mode 100644 index 0000000000..18c326ca7e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/create-supabase-migration.md @@ -0,0 +1,19 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.createSupabaseMigration( + [], // resources + 'https://example.com', // endpoint + '<API_KEY>', // apiKey + '<DATABASE_HOST>', // databaseHost + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/delete.md b/docs/examples/1.8.x/console-web/examples/migrations/delete.md new file mode 100644 index 0000000000..bb013ddf27 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/delete.md @@ -0,0 +1,13 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.delete( + '<MIGRATION_ID>' // migrationId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get-appwrite-report.md b/docs/examples/1.8.x/console-web/examples/migrations/get-appwrite-report.md new file mode 100644 index 0000000000..a70b6a45fb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/get-appwrite-report.md @@ -0,0 +1,16 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getAppwriteReport( + [], // resources + 'https://example.com', // endpoint + '<PROJECT_ID>', // projectID + '<KEY>' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get-firebase-report.md b/docs/examples/1.8.x/console-web/examples/migrations/get-firebase-report.md new file mode 100644 index 0000000000..bf1c85eeb6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/get-firebase-report.md @@ -0,0 +1,14 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getFirebaseReport( + [], // resources + '<SERVICE_ACCOUNT>' // serviceAccount +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get-n-host-report.md b/docs/examples/1.8.x/console-web/examples/migrations/get-n-host-report.md new file mode 100644 index 0000000000..a983088f0d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/get-n-host-report.md @@ -0,0 +1,20 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getNHostReport( + [], // resources + '<SUBDOMAIN>', // subdomain + '<REGION>', // region + '<ADMIN_SECRET>', // adminSecret + '<DATABASE>', // database + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get-supabase-report.md b/docs/examples/1.8.x/console-web/examples/migrations/get-supabase-report.md new file mode 100644 index 0000000000..d6ea7a9712 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/get-supabase-report.md @@ -0,0 +1,19 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.getSupabaseReport( + [], // resources + 'https://example.com', // endpoint + '<API_KEY>', // apiKey + '<DATABASE_HOST>', // databaseHost + '<USERNAME>', // username + '<PASSWORD>', // password + null // port (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/get.md b/docs/examples/1.8.x/console-web/examples/migrations/get.md new file mode 100644 index 0000000000..e2c67eb884 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/get.md @@ -0,0 +1,13 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.get( + '<MIGRATION_ID>' // migrationId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/list.md b/docs/examples/1.8.x/console-web/examples/migrations/list.md new file mode 100644 index 0000000000..a978e1843e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/list.md @@ -0,0 +1,14 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/migrations/retry.md b/docs/examples/1.8.x/console-web/examples/migrations/retry.md new file mode 100644 index 0000000000..f489168d7e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/migrations/retry.md @@ -0,0 +1,13 @@ +import { Client, Migrations } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const migrations = new Migrations(client); + +const result = await migrations.retry( + '<MIGRATION_ID>' // migrationId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/create-variable.md b/docs/examples/1.8.x/console-web/examples/project/create-variable.md new file mode 100644 index 0000000000..aa7361ffc2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/project/create-variable.md @@ -0,0 +1,15 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.createVariable( + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/delete-variable.md b/docs/examples/1.8.x/console-web/examples/project/delete-variable.md new file mode 100644 index 0000000000..224691691d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/project/delete-variable.md @@ -0,0 +1,13 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.deleteVariable( + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/get-usage.md b/docs/examples/1.8.x/console-web/examples/project/get-usage.md new file mode 100644 index 0000000000..300311dd8f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/project/get-usage.md @@ -0,0 +1,15 @@ +import { Client, Project, ProjectUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.getUsage( + '', // startDate + '', // endDate + ProjectUsageRange.OneHour // period (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/get-variable.md b/docs/examples/1.8.x/console-web/examples/project/get-variable.md new file mode 100644 index 0000000000..bc30baa325 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/project/get-variable.md @@ -0,0 +1,13 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.getVariable( + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/list-variables.md b/docs/examples/1.8.x/console-web/examples/project/list-variables.md new file mode 100644 index 0000000000..9c17f8514e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/project/list-variables.md @@ -0,0 +1,11 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.listVariables(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/project/update-variable.md b/docs/examples/1.8.x/console-web/examples/project/update-variable.md new file mode 100644 index 0000000000..9dcd62a7c2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/project/update-variable.md @@ -0,0 +1,16 @@ +import { Client, Project } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.updateVariable( + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-dev-key.md b/docs/examples/1.8.x/console-web/examples/projects/create-dev-key.md new file mode 100644 index 0000000000..28f89aea49 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create-dev-key.md @@ -0,0 +1,15 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createDevKey( + '<PROJECT_ID>', // projectId + '<NAME>', // name + '' // expire +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-j-w-t.md b/docs/examples/1.8.x/console-web/examples/projects/create-j-w-t.md new file mode 100644 index 0000000000..7175e266ae --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create-j-w-t.md @@ -0,0 +1,15 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createJWT( + '<PROJECT_ID>', // projectId + [], // scopes + 0 // duration (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-key.md b/docs/examples/1.8.x/console-web/examples/projects/create-key.md new file mode 100644 index 0000000000..25bcc125ed --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create-key.md @@ -0,0 +1,16 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createKey( + '<PROJECT_ID>', // projectId + '<NAME>', // name + [], // scopes + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-platform.md b/docs/examples/1.8.x/console-web/examples/projects/create-platform.md new file mode 100644 index 0000000000..7e23dd6f9e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create-platform.md @@ -0,0 +1,18 @@ +import { Client, Projects, PlatformType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createPlatform( + '<PROJECT_ID>', // projectId + PlatformType.Web, // type + '<NAME>', // name + '<KEY>', // key (optional) + '<STORE>', // store (optional) + '' // hostname (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-smtp-test.md b/docs/examples/1.8.x/console-web/examples/projects/create-smtp-test.md new file mode 100644 index 0000000000..ab0e184432 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create-smtp-test.md @@ -0,0 +1,22 @@ +import { Client, Projects, SMTPSecure } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createSmtpTest( + '<PROJECT_ID>', // projectId + [], // emails + '<SENDER_NAME>', // senderName + 'email@example.com', // senderEmail + '', // host + 'email@example.com', // replyTo (optional) + null, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SMTPSecure.Tls // secure (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create-webhook.md b/docs/examples/1.8.x/console-web/examples/projects/create-webhook.md new file mode 100644 index 0000000000..62fdac56cd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create-webhook.md @@ -0,0 +1,20 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.createWebhook( + '<PROJECT_ID>', // projectId + '<NAME>', // name + [], // events + '', // url + false, // security + false, // enabled (optional) + '<HTTP_USER>', // httpUser (optional) + '<HTTP_PASS>' // httpPass (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/create.md b/docs/examples/1.8.x/console-web/examples/projects/create.md new file mode 100644 index 0000000000..58efd0b75f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/create.md @@ -0,0 +1,25 @@ +import { Client, Projects, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.create( + '', // projectId + '<NAME>', // name + '<TEAM_ID>', // teamId + .Default, // region (optional) + '<DESCRIPTION>', // description (optional) + '<LOGO>', // logo (optional) + 'https://example.com', // url (optional) + '<LEGAL_NAME>', // legalName (optional) + '<LEGAL_COUNTRY>', // legalCountry (optional) + '<LEGAL_STATE>', // legalState (optional) + '<LEGAL_CITY>', // legalCity (optional) + '<LEGAL_ADDRESS>', // legalAddress (optional) + '<LEGAL_TAX_ID>' // legalTaxId (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-dev-key.md b/docs/examples/1.8.x/console-web/examples/projects/delete-dev-key.md new file mode 100644 index 0000000000..fc2ca4f1a7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-dev-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteDevKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-email-template.md b/docs/examples/1.8.x/console-web/examples/projects/delete-email-template.md new file mode 100644 index 0000000000..10e3d302ae --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-email-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteEmailTemplate( + '<PROJECT_ID>', // projectId + EmailTemplateType.Verification, // type + EmailTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-key.md b/docs/examples/1.8.x/console-web/examples/projects/delete-key.md new file mode 100644 index 0000000000..7ea7dc6fdc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-platform.md b/docs/examples/1.8.x/console-web/examples/projects/delete-platform.md new file mode 100644 index 0000000000..5c71747a64 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-platform.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deletePlatform( + '<PROJECT_ID>', // projectId + '<PLATFORM_ID>' // platformId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-sms-template.md b/docs/examples/1.8.x/console-web/examples/projects/delete-sms-template.md new file mode 100644 index 0000000000..eef3cccae9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-sms-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteSmsTemplate( + '<PROJECT_ID>', // projectId + SmsTemplateType.Verification, // type + SmsTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete-webhook.md b/docs/examples/1.8.x/console-web/examples/projects/delete-webhook.md new file mode 100644 index 0000000000..24abaafc66 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete-webhook.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.deleteWebhook( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>' // webhookId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/delete.md b/docs/examples/1.8.x/console-web/examples/projects/delete.md new file mode 100644 index 0000000000..d868616db2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/delete.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.delete( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-dev-key.md b/docs/examples/1.8.x/console-web/examples/projects/get-dev-key.md new file mode 100644 index 0000000000..a9c38df45a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get-dev-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getDevKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-email-template.md b/docs/examples/1.8.x/console-web/examples/projects/get-email-template.md new file mode 100644 index 0000000000..1d27c8c682 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get-email-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getEmailTemplate( + '<PROJECT_ID>', // projectId + EmailTemplateType.Verification, // type + EmailTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-key.md b/docs/examples/1.8.x/console-web/examples/projects/get-key.md new file mode 100644 index 0000000000..79359e298b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get-key.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>' // keyId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-platform.md b/docs/examples/1.8.x/console-web/examples/projects/get-platform.md new file mode 100644 index 0000000000..a17bcb122d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get-platform.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getPlatform( + '<PROJECT_ID>', // projectId + '<PLATFORM_ID>' // platformId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-sms-template.md b/docs/examples/1.8.x/console-web/examples/projects/get-sms-template.md new file mode 100644 index 0000000000..0badf1cca4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get-sms-template.md @@ -0,0 +1,15 @@ +import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getSmsTemplate( + '<PROJECT_ID>', // projectId + SmsTemplateType.Verification, // type + SmsTemplateLocale.Af // locale +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get-webhook.md b/docs/examples/1.8.x/console-web/examples/projects/get-webhook.md new file mode 100644 index 0000000000..6b6530a04e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get-webhook.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.getWebhook( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>' // webhookId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/get.md b/docs/examples/1.8.x/console-web/examples/projects/get.md new file mode 100644 index 0000000000..dbec5dd543 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/get.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.get( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list-dev-keys.md b/docs/examples/1.8.x/console-web/examples/projects/list-dev-keys.md new file mode 100644 index 0000000000..d3b17706cd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/list-dev-keys.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listDevKeys( + '<PROJECT_ID>', // projectId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list-keys.md b/docs/examples/1.8.x/console-web/examples/projects/list-keys.md new file mode 100644 index 0000000000..5701133ba4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/list-keys.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listKeys( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list-platforms.md b/docs/examples/1.8.x/console-web/examples/projects/list-platforms.md new file mode 100644 index 0000000000..214092b6b3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/list-platforms.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listPlatforms( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list-webhooks.md b/docs/examples/1.8.x/console-web/examples/projects/list-webhooks.md new file mode 100644 index 0000000000..11639bfccf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/list-webhooks.md @@ -0,0 +1,13 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.listWebhooks( + '<PROJECT_ID>' // projectId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/list.md b/docs/examples/1.8.x/console-web/examples/projects/list.md new file mode 100644 index 0000000000..0ade65189a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/list.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-api-status-all.md b/docs/examples/1.8.x/console-web/examples/projects/update-api-status-all.md new file mode 100644 index 0000000000..a51ed2df2b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-api-status-all.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateApiStatusAll( + '<PROJECT_ID>', // projectId + false // status +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-api-status.md b/docs/examples/1.8.x/console-web/examples/projects/update-api-status.md new file mode 100644 index 0000000000..9cc7dfe8ab --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-api-status.md @@ -0,0 +1,15 @@ +import { Client, Projects, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateApiStatus( + '<PROJECT_ID>', // projectId + .Rest, // api + false // status +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-duration.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-duration.md new file mode 100644 index 0000000000..d0d8c67b28 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-duration.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthDuration( + '<PROJECT_ID>', // projectId + 0 // duration +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-limit.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-limit.md new file mode 100644 index 0000000000..80f73f871f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-limit.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthLimit( + '<PROJECT_ID>', // projectId + 0 // limit +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-dictionary.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-dictionary.md new file mode 100644 index 0000000000..1e878c2246 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-dictionary.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthPasswordDictionary( + '<PROJECT_ID>', // projectId + false // enabled +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-history.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-history.md new file mode 100644 index 0000000000..26a3adcfde --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-password-history.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthPasswordHistory( + '<PROJECT_ID>', // projectId + 0 // limit +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-sessions-limit.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-sessions-limit.md new file mode 100644 index 0000000000..c1b0e14e91 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-sessions-limit.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthSessionsLimit( + '<PROJECT_ID>', // projectId + 1 // limit +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-auth-status.md b/docs/examples/1.8.x/console-web/examples/projects/update-auth-status.md new file mode 100644 index 0000000000..d4862282a6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-auth-status.md @@ -0,0 +1,15 @@ +import { Client, Projects, AuthMethod } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateAuthStatus( + '<PROJECT_ID>', // projectId + AuthMethod.EmailPassword, // method + false // status +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-dev-key.md b/docs/examples/1.8.x/console-web/examples/projects/update-dev-key.md new file mode 100644 index 0000000000..9c00474262 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-dev-key.md @@ -0,0 +1,16 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateDevKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>', // keyId + '<NAME>', // name + '' // expire +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-email-template.md b/docs/examples/1.8.x/console-web/examples/projects/update-email-template.md new file mode 100644 index 0000000000..44467c4f8a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-email-template.md @@ -0,0 +1,20 @@ +import { Client, Projects, EmailTemplateType, EmailTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateEmailTemplate( + '<PROJECT_ID>', // projectId + EmailTemplateType.Verification, // type + EmailTemplateLocale.Af, // locale + '<SUBJECT>', // subject + '<MESSAGE>', // message + '<SENDER_NAME>', // senderName (optional) + 'email@example.com', // senderEmail (optional) + 'email@example.com' // replyTo (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-key.md b/docs/examples/1.8.x/console-web/examples/projects/update-key.md new file mode 100644 index 0000000000..492a0ac23d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-key.md @@ -0,0 +1,17 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateKey( + '<PROJECT_ID>', // projectId + '<KEY_ID>', // keyId + '<NAME>', // name + [], // scopes + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-memberships-privacy.md b/docs/examples/1.8.x/console-web/examples/projects/update-memberships-privacy.md new file mode 100644 index 0000000000..31adcd3855 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-memberships-privacy.md @@ -0,0 +1,16 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateMembershipsPrivacy( + '<PROJECT_ID>', // projectId + false, // userName + false, // userEmail + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-mock-numbers.md b/docs/examples/1.8.x/console-web/examples/projects/update-mock-numbers.md new file mode 100644 index 0000000000..245a20c19b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-mock-numbers.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateMockNumbers( + '<PROJECT_ID>', // projectId + [] // numbers +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-o-auth2.md b/docs/examples/1.8.x/console-web/examples/projects/update-o-auth2.md new file mode 100644 index 0000000000..0671ee38bd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-o-auth2.md @@ -0,0 +1,17 @@ +import { Client, Projects, OAuthProvider } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateOAuth2( + '<PROJECT_ID>', // projectId + OAuthProvider.Amazon, // provider + '<APP_ID>', // appId (optional) + '<SECRET>', // secret (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-personal-data-check.md b/docs/examples/1.8.x/console-web/examples/projects/update-personal-data-check.md new file mode 100644 index 0000000000..fb0fcffc16 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-personal-data-check.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updatePersonalDataCheck( + '<PROJECT_ID>', // projectId + false // enabled +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-platform.md b/docs/examples/1.8.x/console-web/examples/projects/update-platform.md new file mode 100644 index 0000000000..2f9cc0a4fd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-platform.md @@ -0,0 +1,18 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updatePlatform( + '<PROJECT_ID>', // projectId + '<PLATFORM_ID>', // platformId + '<NAME>', // name + '<KEY>', // key (optional) + '<STORE>', // store (optional) + '' // hostname (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-service-status-all.md b/docs/examples/1.8.x/console-web/examples/projects/update-service-status-all.md new file mode 100644 index 0000000000..672a1491bc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-service-status-all.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateServiceStatusAll( + '<PROJECT_ID>', // projectId + false // status +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-service-status.md b/docs/examples/1.8.x/console-web/examples/projects/update-service-status.md new file mode 100644 index 0000000000..5d2189e339 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-service-status.md @@ -0,0 +1,15 @@ +import { Client, Projects, ApiService } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateServiceStatus( + '<PROJECT_ID>', // projectId + ApiService.Account, // service + false // status +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-session-alerts.md b/docs/examples/1.8.x/console-web/examples/projects/update-session-alerts.md new file mode 100644 index 0000000000..65aa353b2b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-session-alerts.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSessionAlerts( + '<PROJECT_ID>', // projectId + false // alerts +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-session-invalidation.md b/docs/examples/1.8.x/console-web/examples/projects/update-session-invalidation.md new file mode 100644 index 0000000000..b0e3ad3e0f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-session-invalidation.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSessionInvalidation( + '<PROJECT_ID>', // projectId + false // enabled +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-sms-template.md b/docs/examples/1.8.x/console-web/examples/projects/update-sms-template.md new file mode 100644 index 0000000000..cc801a67c5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-sms-template.md @@ -0,0 +1,16 @@ +import { Client, Projects, SmsTemplateType, SmsTemplateLocale } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSmsTemplate( + '<PROJECT_ID>', // projectId + SmsTemplateType.Verification, // type + SmsTemplateLocale.Af, // locale + '<MESSAGE>' // message +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-smtp.md b/docs/examples/1.8.x/console-web/examples/projects/update-smtp.md new file mode 100644 index 0000000000..605ba0f5e3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-smtp.md @@ -0,0 +1,22 @@ +import { Client, Projects, SMTPSecure } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateSmtp( + '<PROJECT_ID>', // projectId + false, // enabled + '<SENDER_NAME>', // senderName (optional) + 'email@example.com', // senderEmail (optional) + 'email@example.com', // replyTo (optional) + '', // host (optional) + null, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SMTPSecure.Tls // secure (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-team.md b/docs/examples/1.8.x/console-web/examples/projects/update-team.md new file mode 100644 index 0000000000..b7c5d934e2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-team.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateTeam( + '<PROJECT_ID>', // projectId + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-webhook-signature.md b/docs/examples/1.8.x/console-web/examples/projects/update-webhook-signature.md new file mode 100644 index 0000000000..593c6c0fce --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-webhook-signature.md @@ -0,0 +1,14 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateWebhookSignature( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>' // webhookId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update-webhook.md b/docs/examples/1.8.x/console-web/examples/projects/update-webhook.md new file mode 100644 index 0000000000..18d10051e9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update-webhook.md @@ -0,0 +1,21 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.updateWebhook( + '<PROJECT_ID>', // projectId + '<WEBHOOK_ID>', // webhookId + '<NAME>', // name + [], // events + '', // url + false, // security + false, // enabled (optional) + '<HTTP_USER>', // httpUser (optional) + '<HTTP_PASS>' // httpPass (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/projects/update.md b/docs/examples/1.8.x/console-web/examples/projects/update.md new file mode 100644 index 0000000000..8b2d2823ca --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/projects/update.md @@ -0,0 +1,23 @@ +import { Client, Projects } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const projects = new Projects(client); + +const result = await projects.update( + '<PROJECT_ID>', // projectId + '<NAME>', // name + '<DESCRIPTION>', // description (optional) + '<LOGO>', // logo (optional) + 'https://example.com', // url (optional) + '<LEGAL_NAME>', // legalName (optional) + '<LEGAL_COUNTRY>', // legalCountry (optional) + '<LEGAL_STATE>', // legalState (optional) + '<LEGAL_CITY>', // legalCity (optional) + '<LEGAL_ADDRESS>', // legalAddress (optional) + '<LEGAL_TAX_ID>' // legalTaxId (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/create-a-p-i-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/create-a-p-i-rule.md new file mode 100644 index 0000000000..e248ebea3d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/create-a-p-i-rule.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createAPIRule( + '' // domain +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/create-function-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/create-function-rule.md new file mode 100644 index 0000000000..2bb0b83f08 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/create-function-rule.md @@ -0,0 +1,15 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createFunctionRule( + '', // domain + '<FUNCTION_ID>', // functionId + '<BRANCH>' // branch (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/create-redirect-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/create-redirect-rule.md new file mode 100644 index 0000000000..294e496987 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/create-redirect-rule.md @@ -0,0 +1,17 @@ +import { Client, Proxy, , ProxyResourceType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createRedirectRule( + '', // domain + 'https://example.com', // url + .MovedPermanently301, // statusCode + '<RESOURCE_ID>', // resourceId + ProxyResourceType.Site // resourceType +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/create-site-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/create-site-rule.md new file mode 100644 index 0000000000..4ea806eceb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/create-site-rule.md @@ -0,0 +1,15 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.createSiteRule( + '', // domain + '<SITE_ID>', // siteId + '<BRANCH>' // branch (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/delete-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/delete-rule.md new file mode 100644 index 0000000000..783f06d95c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/delete-rule.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.deleteRule( + '<RULE_ID>' // ruleId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/get-rule.md b/docs/examples/1.8.x/console-web/examples/proxy/get-rule.md new file mode 100644 index 0000000000..e69c8210ce --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/get-rule.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.getRule( + '<RULE_ID>' // ruleId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/list-rules.md b/docs/examples/1.8.x/console-web/examples/proxy/list-rules.md new file mode 100644 index 0000000000..8c07168292 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/list-rules.md @@ -0,0 +1,14 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.listRules( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/proxy/update-rule-verification.md b/docs/examples/1.8.x/console-web/examples/proxy/update-rule-verification.md new file mode 100644 index 0000000000..349535cec8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/proxy/update-rule-verification.md @@ -0,0 +1,13 @@ +import { Client, Proxy } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const proxy = new Proxy(client); + +const result = await proxy.updateRuleVerification( + '<RULE_ID>' // ruleId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/create-deployment.md new file mode 100644 index 0000000000..5bc597c20e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createDeployment( + '<SITE_ID>', // siteId + document.getElementById('uploader').files[0], // code + false, // activate + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>' // outputDirectory (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..3b8347fbf6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createDuplicateDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..990d7cf98b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/create-template-deployment.md @@ -0,0 +1,18 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createTemplateDeployment( + '<SITE_ID>', // siteId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-variable.md b/docs/examples/1.8.x/console-web/examples/sites/create-variable.md new file mode 100644 index 0000000000..d605f2e4aa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/create-variable.md @@ -0,0 +1,16 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createVariable( + '<SITE_ID>', // siteId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..dd595db14d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/create-vcs-deployment.md @@ -0,0 +1,16 @@ +import { Client, Sites, VCSDeploymentType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.createVcsDeployment( + '<SITE_ID>', // siteId + VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/create.md b/docs/examples/1.8.x/console-web/examples/sites/create.md new file mode 100644 index 0000000000..7880ba361b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/create.md @@ -0,0 +1,30 @@ +import { Client, Sites, , , } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.create( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + .Node145, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Static, // adapter (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/delete-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..357b69c04e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/delete-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.deleteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/delete-log.md b/docs/examples/1.8.x/console-web/examples/sites/delete-log.md new file mode 100644 index 0000000000..25defd1546 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/delete-log.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.deleteLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/delete-variable.md b/docs/examples/1.8.x/console-web/examples/sites/delete-variable.md new file mode 100644 index 0000000000..f6201738d8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/delete-variable.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.deleteVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/delete.md b/docs/examples/1.8.x/console-web/examples/sites/delete.md new file mode 100644 index 0000000000..e3eff9cbb9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/delete.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.delete( + '<SITE_ID>' // siteId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/console-web/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..17707eded0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get-deployment-download.md @@ -0,0 +1,15 @@ +import { Client, Sites, DeploymentDownloadType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = sites.getDeploymentDownload( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>', // deploymentId + DeploymentDownloadType.Source // type (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/get-deployment.md new file mode 100644 index 0000000000..c3453446e8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-log.md b/docs/examples/1.8.x/console-web/examples/sites/get-log.md new file mode 100644 index 0000000000..eb1cd654c9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get-log.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-template.md b/docs/examples/1.8.x/console-web/examples/sites/get-template.md new file mode 100644 index 0000000000..4220390d95 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get-template.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getTemplate( + '<TEMPLATE_ID>' // templateId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-usage.md b/docs/examples/1.8.x/console-web/examples/sites/get-usage.md new file mode 100644 index 0000000000..582a754e07 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get-usage.md @@ -0,0 +1,14 @@ +import { Client, Sites, SiteUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getUsage( + '<SITE_ID>', // siteId + SiteUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get-variable.md b/docs/examples/1.8.x/console-web/examples/sites/get-variable.md new file mode 100644 index 0000000000..c0d95326cc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get-variable.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.getVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/get.md b/docs/examples/1.8.x/console-web/examples/sites/get.md new file mode 100644 index 0000000000..102cade4c6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/get.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.get( + '<SITE_ID>' // siteId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-deployments.md b/docs/examples/1.8.x/console-web/examples/sites/list-deployments.md new file mode 100644 index 0000000000..8c0bd8ea2d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-deployments.md @@ -0,0 +1,15 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listDeployments( + '<SITE_ID>', // siteId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-frameworks.md b/docs/examples/1.8.x/console-web/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..aceadcc8c9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-frameworks.md @@ -0,0 +1,11 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listFrameworks(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-logs.md b/docs/examples/1.8.x/console-web/examples/sites/list-logs.md new file mode 100644 index 0000000000..458cc69b2b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listLogs( + '<SITE_ID>', // siteId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-specifications.md b/docs/examples/1.8.x/console-web/examples/sites/list-specifications.md new file mode 100644 index 0000000000..9bbb35d76d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-specifications.md @@ -0,0 +1,11 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listSpecifications(); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-templates.md b/docs/examples/1.8.x/console-web/examples/sites/list-templates.md new file mode 100644 index 0000000000..58f46bbb4a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-templates.md @@ -0,0 +1,16 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listTemplates( + [], // frameworks (optional) + [], // useCases (optional) + 1, // limit (optional) + 0 // offset (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-usage.md b/docs/examples/1.8.x/console-web/examples/sites/list-usage.md new file mode 100644 index 0000000000..7182d78880 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-usage.md @@ -0,0 +1,13 @@ +import { Client, Sites, SiteUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listUsage( + SiteUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list-variables.md b/docs/examples/1.8.x/console-web/examples/sites/list-variables.md new file mode 100644 index 0000000000..de62195aea --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list-variables.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.listVariables( + '<SITE_ID>' // siteId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/list.md b/docs/examples/1.8.x/console-web/examples/sites/list.md new file mode 100644 index 0000000000..fafe3cb229 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/list.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/console-web/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..8205c863b0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/update-deployment-status.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.updateDeploymentStatus( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/console-web/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..d63541702e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/update-site-deployment.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.updateSiteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/update-variable.md b/docs/examples/1.8.x/console-web/examples/sites/update-variable.md new file mode 100644 index 0000000000..1ea9481737 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/update-variable.md @@ -0,0 +1,17 @@ +import { Client, Sites } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.updateVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/sites/update.md b/docs/examples/1.8.x/console-web/examples/sites/update.md new file mode 100644 index 0000000000..b20a19526d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/sites/update.md @@ -0,0 +1,30 @@ +import { Client, Sites, , , } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const sites = new Sites(client); + +const result = await sites.update( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Node145, // buildRuntime (optional) + .Static, // adapter (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/create-bucket.md b/docs/examples/1.8.x/console-web/examples/storage/create-bucket.md new file mode 100644 index 0000000000..a01bb0945f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/create-bucket.md @@ -0,0 +1,22 @@ +import { Client, Storage, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/create-file.md b/docs/examples/1.8.x/console-web/examples/storage/create-file.md new file mode 100644 index 0000000000..8048772389 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.createFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + document.getElementById('uploader').files[0], // file + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/delete-bucket.md b/docs/examples/1.8.x/console-web/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..20084fd7e3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteBucket( + '<BUCKET_ID>' // bucketId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/delete-file.md b/docs/examples/1.8.x/console-web/examples/storage/delete-file.md new file mode 100644 index 0000000000..41afa9e375 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.deleteFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-bucket-usage.md b/docs/examples/1.8.x/console-web/examples/storage/get-bucket-usage.md new file mode 100644 index 0000000000..1007454c2e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-bucket-usage.md @@ -0,0 +1,14 @@ +import { Client, Storage, StorageUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getBucketUsage( + '<BUCKET_ID>', // bucketId + StorageUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-bucket.md b/docs/examples/1.8.x/console-web/examples/storage/get-bucket.md new file mode 100644 index 0000000000..ec77dd2bf5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getBucket( + '<BUCKET_ID>' // bucketId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-file-download.md b/docs/examples/1.8.x/console-web/examples/storage/get-file-download.md new file mode 100644 index 0000000000..8e98105ef3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-file-preview.md b/docs/examples/1.8.x/console-web/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..b14a02769e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg, // output (optional) + '<TOKEN>' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-file-view.md b/docs/examples/1.8.x/console-web/examples/storage/get-file-view.md new file mode 100644 index 0000000000..03db75f044 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = storage.getFileView( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-file.md b/docs/examples/1.8.x/console-web/examples/storage/get-file.md new file mode 100644 index 0000000000..76658edb0b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/get-usage.md b/docs/examples/1.8.x/console-web/examples/storage/get-usage.md new file mode 100644 index 0000000000..b57f8f8b03 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/get-usage.md @@ -0,0 +1,13 @@ +import { Client, Storage, StorageUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.getUsage( + StorageUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/list-buckets.md b/docs/examples/1.8.x/console-web/examples/storage/list-buckets.md new file mode 100644 index 0000000000..f82c01a879 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listBuckets( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/list-files.md b/docs/examples/1.8.x/console-web/examples/storage/list-files.md new file mode 100644 index 0000000000..9076b8997f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.listFiles( + '<BUCKET_ID>', // bucketId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/update-bucket.md b/docs/examples/1.8.x/console-web/examples/storage/update-bucket.md new file mode 100644 index 0000000000..d6c125a213 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/update-bucket.md @@ -0,0 +1,22 @@ +import { Client, Storage, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/storage/update-file.md b/docs/examples/1.8.x/console-web/examples/storage/update-file.md new file mode 100644 index 0000000000..79830f77d2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import { Client, Storage } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const storage = new Storage(client); + +const result = await storage.updateFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<NAME>', // name (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..bf0cca08c1 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..c9eb3af82c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md new file mode 100644 index 0000000000..3952161779 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..7b16da6c14 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md new file mode 100644 index 0000000000..6608864efe --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-index.md b/docs/examples/1.8.x/console-web/examples/tables/create-index.md new file mode 100644 index 0000000000..b24575b6c5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-index.md @@ -0,0 +1,19 @@ +import { Client, Tables, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + .Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..0490b71189 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..644f520032 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..e6a27d6747 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md @@ -0,0 +1,20 @@ +import { Client, Tables, , } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + .OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + .Cascade // onDelete (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-row.md b/docs/examples/1.8.x/console-web/examples/tables/create-row.md new file mode 100644 index 0000000000..ba18cb6fba --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-row.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-rows.md b/docs/examples/1.8.x/console-web/examples/tables/create-rows.md new file mode 100644 index 0000000000..bd7f984ee3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const result = await tables.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md new file mode 100644 index 0000000000..6c1fbd7c99 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md new file mode 100644 index 0000000000..88e1fc584d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create.md b/docs/examples/1.8.x/console-web/examples/tables/create.md new file mode 100644 index 0000000000..a7bda74508 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.create( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..35cb78686c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-column.md b/docs/examples/1.8.x/console-web/examples/tables/delete-column.md new file mode 100644 index 0000000000..642856448a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete-column.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-index.md b/docs/examples/1.8.x/console-web/examples/tables/delete-index.md new file mode 100644 index 0000000000..f517513909 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete-index.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-row.md b/docs/examples/1.8.x/console-web/examples/tables/delete-row.md new file mode 100644 index 0000000000..accbb3092a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md b/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md new file mode 100644 index 0000000000..adbb613a35 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete.md b/docs/examples/1.8.x/console-web/examples/tables/delete.md new file mode 100644 index 0000000000..f235d8dda0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.delete( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-column.md b/docs/examples/1.8.x/console-web/examples/tables/get-column.md new file mode 100644 index 0000000000..7bd7f2db30 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-column.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-index.md b/docs/examples/1.8.x/console-web/examples/tables/get-index.md new file mode 100644 index 0000000000..dc8c3362cf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-index.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-row.md b/docs/examples/1.8.x/console-web/examples/tables/get-row.md new file mode 100644 index 0000000000..f37558d4ff --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-row.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md b/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md new file mode 100644 index 0000000000..4e6ca3270d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md @@ -0,0 +1,15 @@ +import { Client, Tables, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getTableUsage( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + .24h // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get.md b/docs/examples/1.8.x/console-web/examples/tables/get.md new file mode 100644 index 0000000000..2b8951582a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.get( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md b/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..ed9710a0e3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-columns.md b/docs/examples/1.8.x/console-web/examples/tables/list-columns.md new file mode 100644 index 0000000000..91348c4e61 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-columns.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md b/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md new file mode 100644 index 0000000000..0ae874663d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md b/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md new file mode 100644 index 0000000000..691e589a77 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listRowLogs( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-rows.md b/docs/examples/1.8.x/console-web/examples/tables/list-rows.md new file mode 100644 index 0000000000..79f5e242a5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list.md b/docs/examples/1.8.x/console-web/examples/tables/list.md new file mode 100644 index 0000000000..e8eb3c3dd6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.list( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..e4bb9012e6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..d24683aafb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md new file mode 100644 index 0000000000..b9e2483191 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..bfe084212c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md new file mode 100644 index 0000000000..9075e31e69 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..c45e4735a9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..f7cdb490dc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..1847e3459e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md @@ -0,0 +1,17 @@ +import { Client, Tables, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + .Cascade, // onDelete (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-row.md b/docs/examples/1.8.x/console-web/examples/tables/update-row.md new file mode 100644 index 0000000000..0db00657c2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-rows.md b/docs/examples/1.8.x/console-web/examples/tables/update-rows.md new file mode 100644 index 0000000000..72b2244f75 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-rows.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md new file mode 100644 index 0000000000..8f6b3b5dad --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md new file mode 100644 index 0000000000..a2cb65d700 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update.md b/docs/examples/1.8.x/console-web/examples/tables/update.md new file mode 100644 index 0000000000..f0552604af --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.update( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md b/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md new file mode 100644 index 0000000000..f1cb65e675 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md b/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..2d818cdbca --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const result = await tables.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/create-membership.md b/docs/examples/1.8.x/console-web/examples/teams/create-membership.md new file mode 100644 index 0000000000..18f6b0ab4d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createMembership( + '<TEAM_ID>', // teamId + [], // roles + 'email@example.com', // email (optional) + '<USER_ID>', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/create.md b/docs/examples/1.8.x/console-web/examples/teams/create.md new file mode 100644 index 0000000000..a33e71ad5f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/create.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.create( + '<TEAM_ID>', // teamId + '<NAME>', // name + [] // roles (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/delete-membership.md b/docs/examples/1.8.x/console-web/examples/teams/delete-membership.md new file mode 100644 index 0000000000..a63ed46749 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/delete.md b/docs/examples/1.8.x/console-web/examples/teams/delete.md new file mode 100644 index 0000000000..e97cc05cc7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/delete.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.delete( + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/get-membership.md b/docs/examples/1.8.x/console-web/examples/teams/get-membership.md new file mode 100644 index 0000000000..bc31ee1470 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/get-prefs.md b/docs/examples/1.8.x/console-web/examples/teams/get-prefs.md new file mode 100644 index 0000000000..394848c5c3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getPrefs( + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/get.md b/docs/examples/1.8.x/console-web/examples/teams/get.md new file mode 100644 index 0000000000..8c752a9828 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/get.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.get( + '<TEAM_ID>' // teamId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/list-logs.md b/docs/examples/1.8.x/console-web/examples/teams/list-logs.md new file mode 100644 index 0000000000..004e627f0d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listLogs( + '<TEAM_ID>', // teamId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/list-memberships.md b/docs/examples/1.8.x/console-web/examples/teams/list-memberships.md new file mode 100644 index 0000000000..22fb731175 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listMemberships( + '<TEAM_ID>', // teamId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/list.md b/docs/examples/1.8.x/console-web/examples/teams/list.md new file mode 100644 index 0000000000..c51dfaf389 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/list.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/update-membership-status.md b/docs/examples/1.8.x/console-web/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c8e608278e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembershipStatus( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + '<USER_ID>', // userId + '<SECRET>' // secret +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/update-membership.md b/docs/examples/1.8.x/console-web/examples/teams/update-membership.md new file mode 100644 index 0000000000..d3e0164a17 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + [] // roles +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/update-name.md b/docs/examples/1.8.x/console-web/examples/teams/update-name.md new file mode 100644 index 0000000000..43703d0c98 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateName( + '<TEAM_ID>', // teamId + '<NAME>' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/teams/update-prefs.md b/docs/examples/1.8.x/console-web/examples/teams/update-prefs.md new file mode 100644 index 0000000000..e0acff0a30 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updatePrefs( + '<TEAM_ID>', // teamId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/create-file-token.md b/docs/examples/1.8.x/console-web/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..bac4863159 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.createFileToken( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/delete.md b/docs/examples/1.8.x/console-web/examples/tokens/delete.md new file mode 100644 index 0000000000..0a871d0fe4 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tokens/delete.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.delete( + '<TOKEN_ID>' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/get.md b/docs/examples/1.8.x/console-web/examples/tokens/get.md new file mode 100644 index 0000000000..ee83fb83c2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tokens/get.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.get( + '<TOKEN_ID>' // tokenId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/list.md b/docs/examples/1.8.x/console-web/examples/tokens/list.md new file mode 100644 index 0000000000..33077e26dd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tokens/list.md @@ -0,0 +1,15 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.list( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tokens/update.md b/docs/examples/1.8.x/console-web/examples/tokens/update.md new file mode 100644 index 0000000000..ce3b80dd22 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tokens/update.md @@ -0,0 +1,14 @@ +import { Client, Tokens } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tokens = new Tokens(client); + +const result = await tokens.update( + '<TOKEN_ID>', // tokenId + '' // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-argon2user.md b/docs/examples/1.8.x/console-web/examples/users/create-argon2user.md new file mode 100644 index 0000000000..c190225d4b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-argon2user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createArgon2User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/console-web/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..9c51181890 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-bcrypt-user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createBcryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-j-w-t.md b/docs/examples/1.8.x/console-web/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..7d50fbce03 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-j-w-t.md @@ -0,0 +1,15 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createJWT( + '<USER_ID>', // userId + '<SESSION_ID>', // sessionId (optional) + 0 // duration (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-m-d5user.md b/docs/examples/1.8.x/console-web/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..610f795ab0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-m-d5user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createMD5User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..ea52af9cf8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createMfaRecoveryCodes( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/console-web/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..c9437c5c38 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-p-h-pass-user.md @@ -0,0 +1,16 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createPHPassUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/console-web/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..b70f09c133 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-s-h-a-user.md @@ -0,0 +1,17 @@ +import { Client, Users, PasswordHash } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createSHAUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + PasswordHash.Sha1, // passwordVersion (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/console-web/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..c0a0435b67 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,19 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createScryptModifiedUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator + '<PASSWORD_SIGNER_KEY>', // passwordSignerKey + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/console-web/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..f1cb93637a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-scrypt-user.md @@ -0,0 +1,21 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createScryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + null, // passwordCpu + null, // passwordMemory + null, // passwordParallel + null, // passwordLength + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-session.md b/docs/examples/1.8.x/console-web/examples/users/create-session.md new file mode 100644 index 0000000000..5393c4408d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-session.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createSession( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-target.md b/docs/examples/1.8.x/console-web/examples/users/create-target.md new file mode 100644 index 0000000000..4c8eac9c45 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-target.md @@ -0,0 +1,18 @@ +import { Client, Users, MessagingProviderType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + MessagingProviderType.Email, // providerType + '<IDENTIFIER>', // identifier + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create-token.md b/docs/examples/1.8.x/console-web/examples/users/create-token.md new file mode 100644 index 0000000000..58e8c9f035 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create-token.md @@ -0,0 +1,15 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.createToken( + '<USER_ID>', // userId + 4, // length (optional) + 60 // expire (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/create.md b/docs/examples/1.8.x/console-web/examples/users/create.md new file mode 100644 index 0000000000..131ef1290c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/create.md @@ -0,0 +1,17 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.create( + '<USER_ID>', // userId + 'email@example.com', // email (optional) + '+12065550100', // phone (optional) + '', // password (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-identity.md b/docs/examples/1.8.x/console-web/examples/users/delete-identity.md new file mode 100644 index 0000000000..cf7425c843 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/delete-identity.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteIdentity( + '<IDENTITY_ID>' // identityId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/console-web/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..023686ae26 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +import { Client, Users, AuthenticatorType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteMfaAuthenticator( + '<USER_ID>', // userId + AuthenticatorType.Totp // type +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-session.md b/docs/examples/1.8.x/console-web/examples/users/delete-session.md new file mode 100644 index 0000000000..ca6880431b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/delete-session.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteSession( + '<USER_ID>', // userId + '<SESSION_ID>' // sessionId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-sessions.md b/docs/examples/1.8.x/console-web/examples/users/delete-sessions.md new file mode 100644 index 0000000000..1137a8b29b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteSessions( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete-target.md b/docs/examples/1.8.x/console-web/examples/users/delete-target.md new file mode 100644 index 0000000000..386d8a90b5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/delete-target.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.deleteTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/delete.md b/docs/examples/1.8.x/console-web/examples/users/delete.md new file mode 100644 index 0000000000..1d4b1d0e1c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/delete.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.delete( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..02d17649c8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getMfaRecoveryCodes( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get-prefs.md b/docs/examples/1.8.x/console-web/examples/users/get-prefs.md new file mode 100644 index 0000000000..b24f2bd3ae --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getPrefs( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get-target.md b/docs/examples/1.8.x/console-web/examples/users/get-target.md new file mode 100644 index 0000000000..cfa7d3d5cd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/get-target.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get-usage.md b/docs/examples/1.8.x/console-web/examples/users/get-usage.md new file mode 100644 index 0000000000..bd87faf10f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/get-usage.md @@ -0,0 +1,13 @@ +import { Client, Users, UserUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.getUsage( + UserUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/get.md b/docs/examples/1.8.x/console-web/examples/users/get.md new file mode 100644 index 0000000000..77f5006890 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/get.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.get( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-identities.md b/docs/examples/1.8.x/console-web/examples/users/list-identities.md new file mode 100644 index 0000000000..34b92900a7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list-identities.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listIdentities( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-logs.md b/docs/examples/1.8.x/console-web/examples/users/list-logs.md new file mode 100644 index 0000000000..85e6cf5071 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list-logs.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listLogs( + '<USER_ID>', // userId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-memberships.md b/docs/examples/1.8.x/console-web/examples/users/list-memberships.md new file mode 100644 index 0000000000..01ce244361 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list-memberships.md @@ -0,0 +1,15 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listMemberships( + '<USER_ID>', // userId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/console-web/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..fe1dd23594 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list-mfa-factors.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listMfaFactors( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-sessions.md b/docs/examples/1.8.x/console-web/examples/users/list-sessions.md new file mode 100644 index 0000000000..e3d5d6e51d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listSessions( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list-targets.md b/docs/examples/1.8.x/console-web/examples/users/list-targets.md new file mode 100644 index 0000000000..58f4079aee --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list-targets.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.listTargets( + '<USER_ID>', // userId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/list.md b/docs/examples/1.8.x/console-web/examples/users/list.md new file mode 100644 index 0000000000..d2189b9c93 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/list.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-email-verification.md b/docs/examples/1.8.x/console-web/examples/users/update-email-verification.md new file mode 100644 index 0000000000..3fedd4b86f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateEmailVerification( + '<USER_ID>', // userId + false // emailVerification +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-email.md b/docs/examples/1.8.x/console-web/examples/users/update-email.md new file mode 100644 index 0000000000..9922376778 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-email.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateEmail( + '<USER_ID>', // userId + 'email@example.com' // email +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-labels.md b/docs/examples/1.8.x/console-web/examples/users/update-labels.md new file mode 100644 index 0000000000..4fc268fc3c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-labels.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateLabels( + '<USER_ID>', // userId + [] // labels +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/console-web/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..041cd9098b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateMfaRecoveryCodes( + '<USER_ID>' // userId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-mfa.md b/docs/examples/1.8.x/console-web/examples/users/update-mfa.md new file mode 100644 index 0000000000..af710ecd48 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-mfa.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateMfa( + '<USER_ID>', // userId + false // mfa +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-name.md b/docs/examples/1.8.x/console-web/examples/users/update-name.md new file mode 100644 index 0000000000..b57cb33730 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-name.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateName( + '<USER_ID>', // userId + '<NAME>' // name +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-password.md b/docs/examples/1.8.x/console-web/examples/users/update-password.md new file mode 100644 index 0000000000..e9c7f9b51d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-password.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePassword( + '<USER_ID>', // userId + '' // password +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-phone-verification.md b/docs/examples/1.8.x/console-web/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..a29e38591c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePhoneVerification( + '<USER_ID>', // userId + false // phoneVerification +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-phone.md b/docs/examples/1.8.x/console-web/examples/users/update-phone.md new file mode 100644 index 0000000000..a87780161b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-phone.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePhone( + '<USER_ID>', // userId + '+12065550100' // number +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-prefs.md b/docs/examples/1.8.x/console-web/examples/users/update-prefs.md new file mode 100644 index 0000000000..7d9993bbb1 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updatePrefs( + '<USER_ID>', // userId + {} // prefs +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-status.md b/docs/examples/1.8.x/console-web/examples/users/update-status.md new file mode 100644 index 0000000000..5e823e7a48 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-status.md @@ -0,0 +1,14 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateStatus( + '<USER_ID>', // userId + false // status +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/users/update-target.md b/docs/examples/1.8.x/console-web/examples/users/update-target.md new file mode 100644 index 0000000000..ed33fe9bb0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/users/update-target.md @@ -0,0 +1,17 @@ +import { Client, Users } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const users = new Users(client); + +const result = await users.updateTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + '<IDENTIFIER>', // identifier (optional) + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/create-repository-detection.md b/docs/examples/1.8.x/console-web/examples/vcs/create-repository-detection.md new file mode 100644 index 0000000000..84de3ffb26 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/create-repository-detection.md @@ -0,0 +1,16 @@ +import { Client, Vcs, VCSDetectionType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.createRepositoryDetection( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId + VCSDetectionType.Runtime, // type + '<PROVIDER_ROOT_DIRECTORY>' // providerRootDirectory (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/create-repository.md b/docs/examples/1.8.x/console-web/examples/vcs/create-repository.md new file mode 100644 index 0000000000..1d08ac5b09 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/create-repository.md @@ -0,0 +1,15 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.createRepository( + '<INSTALLATION_ID>', // installationId + '<NAME>', // name + false // private +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/delete-installation.md b/docs/examples/1.8.x/console-web/examples/vcs/delete-installation.md new file mode 100644 index 0000000000..3f760c09b6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/delete-installation.md @@ -0,0 +1,13 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.deleteInstallation( + '<INSTALLATION_ID>' // installationId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/get-installation.md b/docs/examples/1.8.x/console-web/examples/vcs/get-installation.md new file mode 100644 index 0000000000..4230f2bd9a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/get-installation.md @@ -0,0 +1,13 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.getInstallation( + '<INSTALLATION_ID>' // installationId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/get-repository-contents.md b/docs/examples/1.8.x/console-web/examples/vcs/get-repository-contents.md new file mode 100644 index 0000000000..6d0cbd19ee --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/get-repository-contents.md @@ -0,0 +1,16 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.getRepositoryContents( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '<PROVIDER_REFERENCE>' // providerReference (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/get-repository.md b/docs/examples/1.8.x/console-web/examples/vcs/get-repository.md new file mode 100644 index 0000000000..516265a0c8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/get-repository.md @@ -0,0 +1,14 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.getRepository( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>' // providerRepositoryId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/list-installations.md b/docs/examples/1.8.x/console-web/examples/vcs/list-installations.md new file mode 100644 index 0000000000..1ba1e64615 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/list-installations.md @@ -0,0 +1,14 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.listInstallations( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md b/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md new file mode 100644 index 0000000000..f414ec316b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md @@ -0,0 +1,15 @@ +import { Client, Vcs, VCSDetectionType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.listRepositories( + '<INSTALLATION_ID>', // installationId + VCSDetectionType.Runtime, // type + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/list-repository-branches.md b/docs/examples/1.8.x/console-web/examples/vcs/list-repository-branches.md new file mode 100644 index 0000000000..ba6b86a053 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/list-repository-branches.md @@ -0,0 +1,14 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.listRepositoryBranches( + '<INSTALLATION_ID>', // installationId + '<PROVIDER_REPOSITORY_ID>' // providerRepositoryId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/vcs/update-external-deployments.md b/docs/examples/1.8.x/console-web/examples/vcs/update-external-deployments.md new file mode 100644 index 0000000000..31425cb883 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/vcs/update-external-deployments.md @@ -0,0 +1,15 @@ +import { Client, Vcs } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const vcs = new Vcs(client); + +const result = await vcs.updateExternalDeployments( + '<INSTALLATION_ID>', // installationId + '<REPOSITORY_ID>', // repositoryId + '<PROVIDER_PULL_REQUEST_ID>' // providerPullRequestId +); + +console.log(result); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-dart/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..7b1cc08304 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.createAnonymousSession(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-dart/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..2305367d94 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-email-password-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.createEmailPasswordSession( + email: 'email@example.com', + password: 'password', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-email-token.md b/docs/examples/1.8.x/server-dart/examples/account/create-email-token.md new file mode 100644 index 0000000000..e9696f92bf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-email-token.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Token result = await account.createEmailToken( + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-dart/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..4288c71ce1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-j-w-t.md @@ -0,0 +1,9 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Jwt result = await account.createJWT(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-dart/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..791b9cbd4f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Token result = await account.createMagicURLToken( + userId: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', // (optional) + phrase: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-dart/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..87797fa645 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-mfa-authenticator.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaType result = await account.createMfaAuthenticator( + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-dart/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..62f3eaf2c2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-mfa-challenge.md @@ -0,0 +1,11 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +MfaChallenge result = await account.createMfaChallenge( + factor: AuthenticationFactor.email, +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dart/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..5ebe0e9e92 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaRecoveryCodes result = await account.createMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-dart/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..4a26a9fd7f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-o-auth2token.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +await account.createOAuth2Token( + provider: OAuthProvider.amazon, + success: 'https://example.com', // (optional) + failure: 'https://example.com', // (optional) + scopes: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-dart/examples/account/create-phone-token.md new file mode 100644 index 0000000000..7011b3cf48 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-phone-token.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Token result = await account.createPhoneToken( + userId: '<USER_ID>', + phone: '+12065550100', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-dart/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..8616834b27 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createPhoneVerification(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-recovery.md b/docs/examples/1.8.x/server-dart/examples/account/create-recovery.md new file mode 100644 index 0000000000..f56d4227a9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createRecovery( + email: 'email@example.com', + url: 'https://example.com', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-session.md b/docs/examples/1.8.x/server-dart/examples/account/create-session.md new file mode 100644 index 0000000000..1e56fc71bb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.createSession( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create-verification.md b/docs/examples/1.8.x/server-dart/examples/account/create-verification.md new file mode 100644 index 0000000000..150833cd6b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create-verification.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.createVerification( + url: 'https://example.com', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/create.md b/docs/examples/1.8.x/server-dart/examples/account/create.md new file mode 100644 index 0000000000..f0384f46f4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/create.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +User result = await account.create( + userId: '<USER_ID>', + email: 'email@example.com', + password: '', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/delete-identity.md b/docs/examples/1.8.x/server-dart/examples/account/delete-identity.md new file mode 100644 index 0000000000..124e6adad4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteIdentity( + identityId: '<IDENTITY_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-dart/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..efd5263e22 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteMfaAuthenticator( + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/delete-session.md b/docs/examples/1.8.x/server-dart/examples/account/delete-session.md new file mode 100644 index 0000000000..d02808bbe9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/delete-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteSession( + sessionId: '<SESSION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-dart/examples/account/delete-sessions.md new file mode 100644 index 0000000000..9406ca39d0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +await account.deleteSessions(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dart/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..b073d40238 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaRecoveryCodes result = await account.getMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/get-prefs.md b/docs/examples/1.8.x/server-dart/examples/account/get-prefs.md new file mode 100644 index 0000000000..94e10db1b6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Preferences result = await account.getPrefs(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/get-session.md b/docs/examples/1.8.x/server-dart/examples/account/get-session.md new file mode 100644 index 0000000000..3a81954bd9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/get-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Session result = await account.getSession( + sessionId: '<SESSION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/get.md b/docs/examples/1.8.x/server-dart/examples/account/get.md new file mode 100644 index 0000000000..76a139a46a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/get.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.get(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/list-identities.md b/docs/examples/1.8.x/server-dart/examples/account/list-identities.md new file mode 100644 index 0000000000..a0b67851c2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/list-identities.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +IdentityList result = await account.listIdentities( + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/list-logs.md b/docs/examples/1.8.x/server-dart/examples/account/list-logs.md new file mode 100644 index 0000000000..d3c50af1d5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/list-logs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +LogList result = await account.listLogs( + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-dart/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..32b269fbd7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/list-mfa-factors.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaFactors result = await account.listMfaFactors(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/list-sessions.md b/docs/examples/1.8.x/server-dart/examples/account/list-sessions.md new file mode 100644 index 0000000000..73cf462af6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +SessionList result = await account.listSessions(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-email.md b/docs/examples/1.8.x/server-dart/examples/account/update-email.md new file mode 100644 index 0000000000..cf6a56edcc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-email.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateEmail( + email: 'email@example.com', + password: 'password', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-dart/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..947d862e46 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-m-f-a.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateMFA( + mfa: false, +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-dart/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..475e464ff0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.updateMagicURLSession( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-dart/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..5a0f98f578 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-mfa-authenticator.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateMfaAuthenticator( + type: AuthenticatorType.totp, + otp: '<OTP>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-dart/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..749c4cd6a0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Session result = await account.updateMfaChallenge( + challengeId: '<CHALLENGE_ID>', + otp: '<OTP>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dart/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..7e274f0ead --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +MfaRecoveryCodes result = await account.updateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-name.md b/docs/examples/1.8.x/server-dart/examples/account/update-name.md new file mode 100644 index 0000000000..82cc3358a1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-name.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateName( + name: '<NAME>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-password.md b/docs/examples/1.8.x/server-dart/examples/account/update-password.md new file mode 100644 index 0000000000..27d360ba51 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-password.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updatePassword( + password: '', + oldPassword: 'password', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-dart/examples/account/update-phone-session.md new file mode 100644 index 0000000000..046dd0a701 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-phone-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Account account = Account(client); + +Session result = await account.updatePhoneSession( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-dart/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..f4b0c6fe6a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.updatePhoneVerification( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-phone.md b/docs/examples/1.8.x/server-dart/examples/account/update-phone.md new file mode 100644 index 0000000000..d861561b60 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-phone.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updatePhone( + phone: '+12065550100', + password: 'password', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-prefs.md b/docs/examples/1.8.x/server-dart/examples/account/update-prefs.md new file mode 100644 index 0000000000..f4533cbea6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updatePrefs( + prefs: {}, +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-recovery.md b/docs/examples/1.8.x/server-dart/examples/account/update-recovery.md new file mode 100644 index 0000000000..162ad58ac9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.updateRecovery( + userId: '<USER_ID>', + secret: '<SECRET>', + password: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-session.md b/docs/examples/1.8.x/server-dart/examples/account/update-session.md new file mode 100644 index 0000000000..a317a0840a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Session result = await account.updateSession( + sessionId: '<SESSION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-status.md b/docs/examples/1.8.x/server-dart/examples/account/update-status.md new file mode 100644 index 0000000000..2ee15d603c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-status.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +User result = await account.updateStatus(); diff --git a/docs/examples/1.8.x/server-dart/examples/account/update-verification.md b/docs/examples/1.8.x/server-dart/examples/account/update-verification.md new file mode 100644 index 0000000000..61904fd3f0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/account/update-verification.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Account account = Account(client); + +Token result = await account.updateVerification( + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-browser.md new file mode 100644 index 0000000000..8d5287511d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-browser.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getBrowser( + code: Browser.avantBrowser, + width: 0, // (optional) + height: 0, // (optional) + quality: -1, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..88fe35ebd9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-credit-card.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getCreditCard( + code: CreditCard.americanExpress, + width: 0, // (optional) + height: 0, // (optional) + quality: -1, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..d4cd8eae83 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getFavicon( + url: 'https://example.com', +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-flag.md new file mode 100644 index 0000000000..56046681bc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-flag.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getFlag( + code: Flag.afghanistan, + width: 0, // (optional) + height: 0, // (optional) + quality: -1, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-image.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-image.md new file mode 100644 index 0000000000..b6db1858c5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getImage( + url: 'https://example.com', + width: 0, // (optional) + height: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-initials.md new file mode 100644 index 0000000000..7dc0989b4d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-initials.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getInitials( + name: '<NAME>', // (optional) + width: 0, // (optional) + height: 0, // (optional) + background: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-dart/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..f64fe8a4ff --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +UInt8List result = await avatars.getQR( + text: '<TEXT>', + size: 1, // (optional) + margin: 0, // (optional) + download: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..13ca992889 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-boolean-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeBoolean result = await databases.createBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: false, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-collection.md b/docs/examples/1.8.x/server-dart/examples/databases/create-collection.md new file mode 100644 index 0000000000..61401761ec --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-collection.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Collection result = await databases.createCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..2591011423 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-datetime-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeDatetime result = await databases.createDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-document.md b/docs/examples/1.8.x/server-dart/examples/databases/create-document.md new file mode 100644 index 0000000000..1c9af5112c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-document.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Databases databases = Databases(client); + +Document result = await databases.createDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md new file mode 100644 index 0000000000..f66ef9f1a9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +DocumentList result = await databases.createDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [], +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..216d020260 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-email-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeEmail result = await databases.createEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..d45ca4476c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-enum-attribute.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeEnum result = await databases.createEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..75d47f44ad --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-float-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeFloat result = await databases.createFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-index.md b/docs/examples/1.8.x/server-dart/examples/databases/create-index.md new file mode 100644 index 0000000000..c3fa1abd60 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-index.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Index result = await databases.createIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + type: IndexType.key, + attributes: [], + orders: [], // (optional) + lengths: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..6511696f92 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-integer-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeInteger result = await databases.createIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..10ddb47bdf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-ip-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeIp result = await databases.createIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..dcdf34fcb8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-relationship-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeRelationship result = await databases.createRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: RelationshipType.oneToOne, + twoWay: false, // (optional) + key: '', // (optional) + twoWayKey: '', // (optional) + onDelete: RelationMutate.cascade, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..8785ea7647 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-string-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeString result = await databases.createStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + size: 1, + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..9088f8dfeb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-url-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeUrl result = await databases.createUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create.md b/docs/examples/1.8.x/server-dart/examples/databases/create.md new file mode 100644 index 0000000000..a2e978bd30 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/create.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Database result = await databases.create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..c8ec38dab8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/decrement-document-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Document result = await databases.decrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: 0, // (optional) + min: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..f9cbbd42ef --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/delete-attribute.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.deleteAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-dart/examples/databases/delete-collection.md new file mode 100644 index 0000000000..919e17891b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/delete-collection.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.deleteCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/delete-document.md b/docs/examples/1.8.x/server-dart/examples/databases/delete-document.md new file mode 100644 index 0000000000..dd04d89959 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +await databases.deleteDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/delete-documents.md new file mode 100644 index 0000000000..66bd5584c7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/delete-documents.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.deleteDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/delete-index.md b/docs/examples/1.8.x/server-dart/examples/databases/delete-index.md new file mode 100644 index 0000000000..f16c84b9a7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/delete-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.deleteIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/delete.md b/docs/examples/1.8.x/server-dart/examples/databases/delete.md new file mode 100644 index 0000000000..5e9042e542 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +await databases.delete( + databaseId: '<DATABASE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/get-attribute.md new file mode 100644 index 0000000000..8329f8db05 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/get-attribute.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + + result = await databases.getAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/get-collection.md b/docs/examples/1.8.x/server-dart/examples/databases/get-collection.md new file mode 100644 index 0000000000..b678420128 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/get-collection.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Collection result = await databases.getCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/get-document.md b/docs/examples/1.8.x/server-dart/examples/databases/get-document.md new file mode 100644 index 0000000000..45745186e6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/get-document.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +Document result = await databases.getDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/get-index.md b/docs/examples/1.8.x/server-dart/examples/databases/get-index.md new file mode 100644 index 0000000000..848257960a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/get-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Index result = await databases.getIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/get.md b/docs/examples/1.8.x/server-dart/examples/databases/get.md new file mode 100644 index 0000000000..28d3d2bd14 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Database result = await databases.get( + databaseId: '<DATABASE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..6e5134b03a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/increment-document-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Document result = await databases.incrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: 0, // (optional) + max: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-dart/examples/databases/list-attributes.md new file mode 100644 index 0000000000..64aaf331b8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeList result = await databases.listAttributes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/list-collections.md b/docs/examples/1.8.x/server-dart/examples/databases/list-collections.md new file mode 100644 index 0000000000..69c2a0fe61 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/list-collections.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +CollectionList result = await databases.listCollections( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/list-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/list-documents.md new file mode 100644 index 0000000000..cdecc59e33 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +DocumentList result = await databases.listDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-dart/examples/databases/list-indexes.md new file mode 100644 index 0000000000..38b95d5d5b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +IndexList result = await databases.listIndexes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/list.md b/docs/examples/1.8.x/server-dart/examples/databases/list.md new file mode 100644 index 0000000000..2de4e97cf2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +DatabaseList result = await databases.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..46e3ef4ce3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeBoolean result = await databases.updateBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: false, + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-collection.md b/docs/examples/1.8.x/server-dart/examples/databases/update-collection.md new file mode 100644 index 0000000000..c3c565b231 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-collection.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Collection result = await databases.updateCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..ddc8f26a70 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeDatetime result = await databases.updateDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-document.md b/docs/examples/1.8.x/server-dart/examples/databases/update-document.md new file mode 100644 index 0000000000..47a1867c10 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-document.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Databases databases = Databases(client); + +Document result = await databases.updateDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: {}, // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/update-documents.md new file mode 100644 index 0000000000..70b7cbf86d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-documents.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +DocumentList result = await databases.updateDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: {}, // (optional) + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..ee0e09719e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeEmail result = await databases.updateEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..61ef4d0835 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeEnum result = await databases.updateEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..36f360eebc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeFloat result = await databases.updateFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..9089cc8bf6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeInteger result = await databases.updateIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..e698a59e3a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeIp result = await databases.updateIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..28aac9643f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-relationship-attribute.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeRelationship result = await databases.updateRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + onDelete: RelationMutate.cascade, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..7674f51c5b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-string-attribute.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeString result = await databases.updateStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: '<DEFAULT>', + size: 1, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-dart/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..3aaa01b441 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +AttributeUrl result = await databases.updateUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/update.md b/docs/examples/1.8.x/server-dart/examples/databases/update.md new file mode 100644 index 0000000000..a46f116389 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/update.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +Database result = await databases.update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md new file mode 100644 index 0000000000..f17f6cbbbd --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Databases databases = Databases(client); + +Document result = await databases.upsertDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..f60a37935a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Databases databases = Databases(client); + +DocumentList result = await databases.upsertDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/create-deployment.md new file mode 100644 index 0000000000..f459b3dd89 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createDeployment( + functionId: '<FUNCTION_ID>', + code: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + activate: false, + entrypoint: '<ENTRYPOINT>', // (optional) + commands: '<COMMANDS>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..34ff5b2067 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createDuplicateDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md b/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md new file mode 100644 index 0000000000..2ae64bce55 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Functions functions = Functions(client); + +Execution result = await functions.createExecution( + functionId: '<FUNCTION_ID>', + body: '<BODY>', // (optional) + xasync: false, // (optional) + path: '<PATH>', // (optional) + method: ExecutionMethod.gET, // (optional) + headers: {}, // (optional) + scheduledAt: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..cc293b0c3b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-template-deployment.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createTemplateDeployment( + functionId: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-variable.md b/docs/examples/1.8.x/server-dart/examples/functions/create-variable.md new file mode 100644 index 0000000000..03e36d8275 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Variable result = await functions.createVariable( + functionId: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..ed315a54e3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-vcs-deployment.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.createVcsDeployment( + functionId: '<FUNCTION_ID>', + type: VCSDeploymentType.branch, + reference: '<REFERENCE>', + activate: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create.md b/docs/examples/1.8.x/server-dart/examples/functions/create.md new file mode 100644 index 0000000000..f3f2683000 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/create.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Func result = await functions.create( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: .node145, + execute: ["any"], // (optional) + events: [], // (optional) + schedule: '', // (optional) + timeout: 1, // (optional) + enabled: false, // (optional) + logging: false, // (optional) + entrypoint: '<ENTRYPOINT>', // (optional) + commands: '<COMMANDS>', // (optional) + scopes: [], // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + specification: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..8e4167f756 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/delete-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +await functions.deleteDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-dart/examples/functions/delete-execution.md new file mode 100644 index 0000000000..d077bc9328 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/delete-execution.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +await functions.deleteExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-dart/examples/functions/delete-variable.md new file mode 100644 index 0000000000..d4b2832830 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/delete-variable.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +await functions.deleteVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/delete.md b/docs/examples/1.8.x/server-dart/examples/functions/delete.md new file mode 100644 index 0000000000..38d360b764 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +await functions.delete( + functionId: '<FUNCTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-dart/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..e7bbacf344 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/get-deployment-download.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +UInt8List result = await functions.getDeploymentDownload( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.source, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/get-deployment.md new file mode 100644 index 0000000000..805ca0b634 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/get-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.getDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/get-execution.md b/docs/examples/1.8.x/server-dart/examples/functions/get-execution.md new file mode 100644 index 0000000000..e0026e0c4b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Functions functions = Functions(client); + +Execution result = await functions.getExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/get-variable.md b/docs/examples/1.8.x/server-dart/examples/functions/get-variable.md new file mode 100644 index 0000000000..fe61cee587 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/get-variable.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Variable result = await functions.getVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/get.md b/docs/examples/1.8.x/server-dart/examples/functions/get.md new file mode 100644 index 0000000000..c92a4f746c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Func result = await functions.get( + functionId: '<FUNCTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-dart/examples/functions/list-deployments.md new file mode 100644 index 0000000000..d07d2b32f3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +DeploymentList result = await functions.listDeployments( + functionId: '<FUNCTION_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/list-executions.md b/docs/examples/1.8.x/server-dart/examples/functions/list-executions.md new file mode 100644 index 0000000000..1dfd39093d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Functions functions = Functions(client); + +ExecutionList result = await functions.listExecutions( + functionId: '<FUNCTION_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-dart/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..a99f872b7e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/list-runtimes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +RuntimeList result = await functions.listRuntimes(); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-dart/examples/functions/list-specifications.md new file mode 100644 index 0000000000..bec5d5e635 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/list-specifications.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +SpecificationList result = await functions.listSpecifications(); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/list-variables.md b/docs/examples/1.8.x/server-dart/examples/functions/list-variables.md new file mode 100644 index 0000000000..0fa3b002bf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/list-variables.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +VariableList result = await functions.listVariables( + functionId: '<FUNCTION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/list.md b/docs/examples/1.8.x/server-dart/examples/functions/list.md new file mode 100644 index 0000000000..8eaeec0625 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +FunctionList result = await functions.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-dart/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..2b068098af --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/update-deployment-status.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Deployment result = await functions.updateDeploymentStatus( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-dart/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..0a5c09dd96 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/update-function-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Func result = await functions.updateFunctionDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/update-variable.md b/docs/examples/1.8.x/server-dart/examples/functions/update-variable.md new file mode 100644 index 0000000000..7330d9f850 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/update-variable.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Variable result = await functions.updateVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // (optional) + secret: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/update.md b/docs/examples/1.8.x/server-dart/examples/functions/update.md new file mode 100644 index 0000000000..ebe3be8cc6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/functions/update.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Functions functions = Functions(client); + +Func result = await functions.update( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: .node145, // (optional) + execute: ["any"], // (optional) + events: [], // (optional) + schedule: '', // (optional) + timeout: 1, // (optional) + enabled: false, // (optional) + logging: false, // (optional) + entrypoint: '<ENTRYPOINT>', // (optional) + commands: '<COMMANDS>', // (optional) + scopes: [], // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + specification: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/graphql/mutation.md b/docs/examples/1.8.x/server-dart/examples/graphql/mutation.md new file mode 100644 index 0000000000..a88749851c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Graphql graphql = Graphql(client); + +Any result = await graphql.mutation( + query: {}, +); diff --git a/docs/examples/1.8.x/server-dart/examples/graphql/query.md b/docs/examples/1.8.x/server-dart/examples/graphql/query.md new file mode 100644 index 0000000000..2dca8f2929 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/graphql/query.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Graphql graphql = Graphql(client); + +Any result = await graphql.query( + query: {}, +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-dart/examples/health/get-antivirus.md new file mode 100644 index 0000000000..395d1f84d1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-antivirus.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthAntivirus result = await health.getAntivirus(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-cache.md b/docs/examples/1.8.x/server-dart/examples/health/get-cache.md new file mode 100644 index 0000000000..6312e3cbe6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-cache.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getCache(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-certificate.md b/docs/examples/1.8.x/server-dart/examples/health/get-certificate.md new file mode 100644 index 0000000000..eac30a6aef --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-certificate.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthCertificate result = await health.getCertificate( + domain: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-d-b.md b/docs/examples/1.8.x/server-dart/examples/health/get-d-b.md new file mode 100644 index 0000000000..25ad9607f5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-d-b.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getDB(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-dart/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..6f80718f6b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-failed-jobs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getFailedJobs( + name: .v1Database, + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-dart/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..d544fbfc40 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-pub-sub.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getPubSub(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..b48623ec18 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-builds.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueBuilds( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..d72ac97b14 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-certificates.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueCertificates( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..b9d8e8bc66 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-databases.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueDatabases( + name: '<NAME>', // (optional) + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..3074cbb8ab --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-deletes.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueDeletes( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..727fd239cc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-functions.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueFunctions( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..32d3e3bb7b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-logs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueLogs( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..93ec993845 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-mails.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueMails( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..4ffd769d3c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-messaging.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueMessaging( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..fab19875e5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-migrations.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueMigrations( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..89a3d03179 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-stats-resources.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueStatsResources( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..473dcd15ee --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-usage.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueUsage( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-dart/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..523c1007f5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-queue-webhooks.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthQueue result = await health.getQueueWebhooks( + threshold: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-dart/examples/health/get-storage-local.md new file mode 100644 index 0000000000..c33cf555f3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-storage-local.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getStorageLocal(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-storage.md b/docs/examples/1.8.x/server-dart/examples/health/get-storage.md new file mode 100644 index 0000000000..cb6c572154 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-storage.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.getStorage(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get-time.md b/docs/examples/1.8.x/server-dart/examples/health/get-time.md new file mode 100644 index 0000000000..f4439957d9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get-time.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthTime result = await health.getTime(); diff --git a/docs/examples/1.8.x/server-dart/examples/health/get.md b/docs/examples/1.8.x/server-dart/examples/health/get.md new file mode 100644 index 0000000000..3134490848 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/health/get.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Health health = Health(client); + +HealthStatus result = await health.get(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/get.md b/docs/examples/1.8.x/server-dart/examples/locale/get.md new file mode 100644 index 0000000000..dec6f068c6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/get.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +Locale result = await locale.get(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-codes.md b/docs/examples/1.8.x/server-dart/examples/locale/list-codes.md new file mode 100644 index 0000000000..9f9eac9f29 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +LocaleCodeList result = await locale.listCodes(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-continents.md b/docs/examples/1.8.x/server-dart/examples/locale/list-continents.md new file mode 100644 index 0000000000..276738eac7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +ContinentList result = await locale.listContinents(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-dart/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..59596c624c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +CountryList result = await locale.listCountriesEU(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-dart/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..2a2d32eaca --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +PhoneList result = await locale.listCountriesPhones(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-countries.md b/docs/examples/1.8.x/server-dart/examples/locale/list-countries.md new file mode 100644 index 0000000000..6b8343c6b3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +CountryList result = await locale.listCountries(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-dart/examples/locale/list-currencies.md new file mode 100644 index 0000000000..48247d98fe --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +CurrencyList result = await locale.listCurrencies(); diff --git a/docs/examples/1.8.x/server-dart/examples/locale/list-languages.md b/docs/examples/1.8.x/server-dart/examples/locale/list-languages.md new file mode 100644 index 0000000000..2376f18917 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Locale locale = Locale(client); + +LanguageList result = await locale.listLanguages(); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..82c1eb5da6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-apns-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createApnsProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + authKey: '<AUTH_KEY>', // (optional) + authKeyId: '<AUTH_KEY_ID>', // (optional) + teamId: '<TEAM_ID>', // (optional) + bundleId: '<BUNDLE_ID>', // (optional) + sandbox: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-email.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-email.md new file mode 100644 index 0000000000..78c695c7ed --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-email.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.createEmail( + messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + cc: [], // (optional) + bcc: [], // (optional) + attachments: [], // (optional) + draft: false, // (optional) + html: false, // (optional) + scheduledAt: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..25c2cb8cfa --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-fcm-provider.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createFcmProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: {}, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..10d803d624 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // (optional) + domain: '<DOMAIN>', // (optional) + isEuRegion: false, // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..b283b75325 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-msg91provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + templateId: '<TEMPLATE_ID>', // (optional) + senderId: '<SENDER_ID>', // (optional) + authKey: '<AUTH_KEY>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-push.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-push.md new file mode 100644 index 0000000000..58d82c7a0a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-push.md @@ -0,0 +1,30 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.createPush( + messageId: '<MESSAGE_ID>', + title: '<TITLE>', // (optional) + body: '<BODY>', // (optional) + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + data: {}, // (optional) + action: '<ACTION>', // (optional) + image: '[ID1:ID2]', // (optional) + icon: '<ICON>', // (optional) + sound: '<SOUND>', // (optional) + color: '<COLOR>', // (optional) + tag: '<TAG>', // (optional) + badge: 0, // (optional) + draft: false, // (optional) + scheduledAt: '', // (optional) + contentAvailable: false, // (optional) + critical: false, // (optional) + priority: MessagePriority.normal, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..e759a26094 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-sms.md new file mode 100644 index 0000000000..04a715870f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-sms.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.createSms( + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + draft: false, // (optional) + scheduledAt: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..6201987fbb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-smtp-provider.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createSmtpProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, // (optional) + username: '<USERNAME>', // (optional) + password: '<PASSWORD>', // (optional) + encryption: SmtpEncryption.none, // (optional) + autoTLS: false, // (optional) + mailer: '<MAILER>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: 'email@example.com', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..5fd4859fb9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-subscriber.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Messaging messaging = Messaging(client); + +Subscriber result = await messaging.createSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..5417b951dd --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-telesign-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + customerId: '<CUSTOMER_ID>', // (optional) + apiKey: '<API_KEY>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..4cf6463b6e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + username: '<USERNAME>', // (optional) + apiKey: '<API_KEY>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-topic.md new file mode 100644 index 0000000000..67e47412a1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-topic.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Topic result = await messaging.createTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..8c3370baa7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-twilio-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + accountSid: '<ACCOUNT_SID>', // (optional) + authToken: '<AUTH_TOKEN>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..d625f38230 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/create-vonage-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.createVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // (optional) + apiKey: '<API_KEY>', // (optional) + apiSecret: '<API_SECRET>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..361bacc2c3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/delete-provider.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +await messaging.deleteProvider( + providerId: '<PROVIDER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-dart/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..e4a044c280 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/delete-subscriber.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Messaging messaging = Messaging(client); + +await messaging.deleteSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-dart/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..59c5592c93 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/delete-topic.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +await messaging.deleteTopic( + topicId: '<TOPIC_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/delete.md b/docs/examples/1.8.x/server-dart/examples/messaging/delete.md new file mode 100644 index 0000000000..14b680ae99 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +await messaging.delete( + messageId: '<MESSAGE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/get-message.md b/docs/examples/1.8.x/server-dart/examples/messaging/get-message.md new file mode 100644 index 0000000000..ccc98961e7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/get-message.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.getMessage( + messageId: '<MESSAGE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/get-provider.md new file mode 100644 index 0000000000..a82ef15775 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/get-provider.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.getProvider( + providerId: '<PROVIDER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-dart/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..03f78b7fa4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/get-subscriber.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Subscriber result = await messaging.getSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-dart/examples/messaging/get-topic.md new file mode 100644 index 0000000000..204f875793 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/get-topic.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Topic result = await messaging.getTopic( + topicId: '<TOPIC_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..1d2b1805b4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-message-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +LogList result = await messaging.listMessageLogs( + messageId: '<MESSAGE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-messages.md new file mode 100644 index 0000000000..2c0a142ee8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-messages.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +MessageList result = await messaging.listMessages( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..9f40a5fa49 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-provider-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +LogList result = await messaging.listProviderLogs( + providerId: '<PROVIDER_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-providers.md new file mode 100644 index 0000000000..df7a8a022c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-providers.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +ProviderList result = await messaging.listProviders( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..3a9593ca89 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +LogList result = await messaging.listSubscriberLogs( + subscriberId: '<SUBSCRIBER_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..19d907cd9a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-subscribers.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +SubscriberList result = await messaging.listSubscribers( + topicId: '<TOPIC_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-targets.md new file mode 100644 index 0000000000..5a327773c2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-targets.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +TargetList result = await messaging.listTargets( + messageId: '<MESSAGE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..0ab02eaa74 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-topic-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +LogList result = await messaging.listTopicLogs( + topicId: '<TOPIC_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-dart/examples/messaging/list-topics.md new file mode 100644 index 0000000000..c5fdb4901f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/list-topics.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +TopicList result = await messaging.listTopics( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..edc0a1f769 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-apns-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateApnsProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + authKey: '<AUTH_KEY>', // (optional) + authKeyId: '<AUTH_KEY_ID>', // (optional) + teamId: '<TEAM_ID>', // (optional) + bundleId: '<BUNDLE_ID>', // (optional) + sandbox: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-email.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-email.md new file mode 100644 index 0000000000..b725cee5f0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-email.md @@ -0,0 +1,23 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.updateEmail( + messageId: '<MESSAGE_ID>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + subject: '<SUBJECT>', // (optional) + content: '<CONTENT>', // (optional) + draft: false, // (optional) + html: false, // (optional) + cc: [], // (optional) + bcc: [], // (optional) + scheduledAt: '', // (optional) + attachments: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..1e2d8a8ca2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-fcm-provider.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateFcmProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + serviceAccountJSON: {}, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..c042a6faaa --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + apiKey: '<API_KEY>', // (optional) + domain: '<DOMAIN>', // (optional) + isEuRegion: false, // (optional) + enabled: false, // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..24290e958f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-msg91provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + templateId: '<TEMPLATE_ID>', // (optional) + senderId: '<SENDER_ID>', // (optional) + authKey: '<AUTH_KEY>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-push.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-push.md new file mode 100644 index 0000000000..f7cc117b64 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-push.md @@ -0,0 +1,30 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.updatePush( + messageId: '<MESSAGE_ID>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + title: '<TITLE>', // (optional) + body: '<BODY>', // (optional) + data: {}, // (optional) + action: '<ACTION>', // (optional) + image: '[ID1:ID2]', // (optional) + icon: '<ICON>', // (optional) + sound: '<SOUND>', // (optional) + color: '<COLOR>', // (optional) + tag: '<TAG>', // (optional) + badge: 0, // (optional) + draft: false, // (optional) + scheduledAt: '', // (optional) + contentAvailable: false, // (optional) + critical: false, // (optional) + priority: MessagePriority.normal, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..53b8c33df4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + apiKey: '<API_KEY>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-sms.md new file mode 100644 index 0000000000..f4356deed3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-sms.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Message result = await messaging.updateSms( + messageId: '<MESSAGE_ID>', + topics: [], // (optional) + users: [], // (optional) + targets: [], // (optional) + content: '<CONTENT>', // (optional) + draft: false, // (optional) + scheduledAt: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..16530c01c8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-smtp-provider.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateSmtpProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + host: '<HOST>', // (optional) + port: 1, // (optional) + username: '<USERNAME>', // (optional) + password: '<PASSWORD>', // (optional) + encryption: SmtpEncryption.none, // (optional) + autoTLS: false, // (optional) + mailer: '<MAILER>', // (optional) + fromName: '<FROM_NAME>', // (optional) + fromEmail: 'email@example.com', // (optional) + replyToName: '<REPLY_TO_NAME>', // (optional) + replyToEmail: '<REPLY_TO_EMAIL>', // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..4bf76fbcfe --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-telesign-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + customerId: '<CUSTOMER_ID>', // (optional) + apiKey: '<API_KEY>', // (optional) + from: '<FROM>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..86bb985778 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + username: '<USERNAME>', // (optional) + apiKey: '<API_KEY>', // (optional) + from: '<FROM>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-topic.md new file mode 100644 index 0000000000..5311fd5e9b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-topic.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Topic result = await messaging.updateTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', // (optional) + subscribe: ["any"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..8ace97521b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-twilio-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + accountSid: '<ACCOUNT_SID>', // (optional) + authToken: '<AUTH_TOKEN>', // (optional) + from: '<FROM>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-dart/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..e0d95d1cb4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/messaging/update-vonage-provider.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Messaging messaging = Messaging(client); + +Provider result = await messaging.updateVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // (optional) + enabled: false, // (optional) + apiKey: '<API_KEY>', // (optional) + apiSecret: '<API_SECRET>', // (optional) + from: '<FROM>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/create-deployment.md new file mode 100644 index 0000000000..93f9615b8b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createDeployment( + siteId: '<SITE_ID>', + code: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + activate: false, + installCommand: '<INSTALL_COMMAND>', // (optional) + buildCommand: '<BUILD_COMMAND>', // (optional) + outputDirectory: '<OUTPUT_DIRECTORY>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..1a3e84a33c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createDuplicateDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..348b4652b6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/create-template-deployment.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createTemplateDeployment( + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/create-variable.md b/docs/examples/1.8.x/server-dart/examples/sites/create-variable.md new file mode 100644 index 0000000000..aa3c876174 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/create-variable.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Variable result = await sites.createVariable( + siteId: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..50f65b9603 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/create-vcs-deployment.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.createVcsDeployment( + siteId: '<SITE_ID>', + type: VCSDeploymentType.branch, + reference: '<REFERENCE>', + activate: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/create.md b/docs/examples/1.8.x/server-dart/examples/sites/create.md new file mode 100644 index 0000000000..448abab1df --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/create.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Site result = await sites.create( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: .analog, + buildRuntime: .node145, + enabled: false, // (optional) + logging: false, // (optional) + timeout: 1, // (optional) + installCommand: '<INSTALL_COMMAND>', // (optional) + buildCommand: '<BUILD_COMMAND>', // (optional) + outputDirectory: '<OUTPUT_DIRECTORY>', // (optional) + adapter: .static, // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + fallbackFile: '<FALLBACK_FILE>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + specification: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..ca93ac668d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/delete-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +await sites.deleteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/delete-log.md b/docs/examples/1.8.x/server-dart/examples/sites/delete-log.md new file mode 100644 index 0000000000..c11ecab71e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/delete-log.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +await sites.deleteLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-dart/examples/sites/delete-variable.md new file mode 100644 index 0000000000..f04b9451ae --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/delete-variable.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +await sites.deleteVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/delete.md b/docs/examples/1.8.x/server-dart/examples/sites/delete.md new file mode 100644 index 0000000000..e81df372bc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +await sites.delete( + siteId: '<SITE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-dart/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..ad21070b8a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/get-deployment-download.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +UInt8List result = await sites.getDeploymentDownload( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType.source, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/get-deployment.md new file mode 100644 index 0000000000..9acc89b56f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/get-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.getDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/get-log.md b/docs/examples/1.8.x/server-dart/examples/sites/get-log.md new file mode 100644 index 0000000000..195f8aad2d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/get-log.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Execution result = await sites.getLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/get-variable.md b/docs/examples/1.8.x/server-dart/examples/sites/get-variable.md new file mode 100644 index 0000000000..637e08a58c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/get-variable.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Variable result = await sites.getVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/get.md b/docs/examples/1.8.x/server-dart/examples/sites/get.md new file mode 100644 index 0000000000..32abcfcffc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Site result = await sites.get( + siteId: '<SITE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-dart/examples/sites/list-deployments.md new file mode 100644 index 0000000000..6f6c9ce3f0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/list-deployments.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +DeploymentList result = await sites.listDeployments( + siteId: '<SITE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-dart/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..72a600fad3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/list-frameworks.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +FrameworkList result = await sites.listFrameworks(); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/list-logs.md b/docs/examples/1.8.x/server-dart/examples/sites/list-logs.md new file mode 100644 index 0000000000..4ccf170f8b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/list-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +ExecutionList result = await sites.listLogs( + siteId: '<SITE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-dart/examples/sites/list-specifications.md new file mode 100644 index 0000000000..b81faf0e43 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/list-specifications.md @@ -0,0 +1,10 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +SpecificationList result = await sites.listSpecifications(); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/list-variables.md b/docs/examples/1.8.x/server-dart/examples/sites/list-variables.md new file mode 100644 index 0000000000..14be96629c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/list-variables.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +VariableList result = await sites.listVariables( + siteId: '<SITE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/list.md b/docs/examples/1.8.x/server-dart/examples/sites/list.md new file mode 100644 index 0000000000..0dd52262f1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +SiteList result = await sites.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-dart/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..bd031cf27a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/update-deployment-status.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Deployment result = await sites.updateDeploymentStatus( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-dart/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..dbb4e27aa6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/update-site-deployment.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Site result = await sites.updateSiteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/update-variable.md b/docs/examples/1.8.x/server-dart/examples/sites/update-variable.md new file mode 100644 index 0000000000..af2123c989 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/update-variable.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Variable result = await sites.updateVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // (optional) + secret: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/sites/update.md b/docs/examples/1.8.x/server-dart/examples/sites/update.md new file mode 100644 index 0000000000..c13acfb25b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/sites/update.md @@ -0,0 +1,29 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Sites sites = Sites(client); + +Site result = await sites.update( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: .analog, + enabled: false, // (optional) + logging: false, // (optional) + timeout: 1, // (optional) + installCommand: '<INSTALL_COMMAND>', // (optional) + buildCommand: '<BUILD_COMMAND>', // (optional) + outputDirectory: '<OUTPUT_DIRECTORY>', // (optional) + buildRuntime: .node145, // (optional) + adapter: .static, // (optional) + fallbackFile: '<FALLBACK_FILE>', // (optional) + installationId: '<INSTALLATION_ID>', // (optional) + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // (optional) + providerBranch: '<PROVIDER_BRANCH>', // (optional) + providerSilentMode: false, // (optional) + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // (optional) + specification: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-dart/examples/storage/create-bucket.md new file mode 100644 index 0000000000..c09a4f2c5d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/create-bucket.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +Bucket result = await storage.createBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + fileSecurity: false, // (optional) + enabled: false, // (optional) + maximumFileSize: 1, // (optional) + allowedFileExtensions: [], // (optional) + compression: .none, // (optional) + encryption: false, // (optional) + antivirus: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/create-file.md b/docs/examples/1.8.x/server-dart/examples/storage/create-file.md new file mode 100644 index 0000000000..e631416ecb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +File result = await storage.createFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-dart/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..1eb1b51ca2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/delete-bucket.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +await storage.deleteBucket( + bucketId: '<BUCKET_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/delete-file.md b/docs/examples/1.8.x/server-dart/examples/storage/delete-file.md new file mode 100644 index 0000000000..26dd602c7e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +await storage.deleteFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-dart/examples/storage/get-bucket.md new file mode 100644 index 0000000000..3464d2233b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/get-bucket.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +Bucket result = await storage.getBucket( + bucketId: '<BUCKET_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-dart/examples/storage/get-file-download.md new file mode 100644 index 0000000000..8c119c386c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +UInt8List result = await storage.getFileDownload( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-dart/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..a1f3c09b33 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/get-file-preview.md @@ -0,0 +1,25 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +UInt8List result = await storage.getFilePreview( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, // (optional) + height: 0, // (optional) + gravity: ImageGravity.center, // (optional) + quality: -1, // (optional) + borderWidth: 0, // (optional) + borderColor: '', // (optional) + borderRadius: 0, // (optional) + opacity: 0, // (optional) + rotation: -360, // (optional) + background: '', // (optional) + output: ImageFormat.jpg, // (optional) + token: '<TOKEN>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-dart/examples/storage/get-file-view.md new file mode 100644 index 0000000000..d48b51c19c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +UInt8List result = await storage.getFileView( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/get-file.md b/docs/examples/1.8.x/server-dart/examples/storage/get-file.md new file mode 100644 index 0000000000..f765c62356 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/get-file.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +File result = await storage.getFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-dart/examples/storage/list-buckets.md new file mode 100644 index 0000000000..c20dac1968 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/list-buckets.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +BucketList result = await storage.listBuckets( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/list-files.md b/docs/examples/1.8.x/server-dart/examples/storage/list-files.md new file mode 100644 index 0000000000..28f85b091a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/list-files.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +FileList result = await storage.listFiles( + bucketId: '<BUCKET_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-dart/examples/storage/update-bucket.md new file mode 100644 index 0000000000..b4e45e059c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/update-bucket.md @@ -0,0 +1,21 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Storage storage = Storage(client); + +Bucket result = await storage.updateBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + fileSecurity: false, // (optional) + enabled: false, // (optional) + maximumFileSize: 1, // (optional) + allowedFileExtensions: [], // (optional) + compression: .none, // (optional) + encryption: false, // (optional) + antivirus: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/storage/update-file.md b/docs/examples/1.8.x/server-dart/examples/storage/update-file.md new file mode 100644 index 0000000000..966883a1f9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/storage/update-file.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Storage storage = Storage(client); + +File result = await storage.updateFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..5b3e987b9b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnBoolean result = await tables.createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: false, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..1ad3fa250d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnDatetime result = await tables.createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md new file mode 100644 index 0000000000..fa7ec71410 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnEmail result = await tables.createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..5ab6bcc774 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnEnum result = await tables.createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md new file mode 100644 index 0000000000..43331187ea --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnFloat result = await tables.createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-index.md b/docs/examples/1.8.x/server-dart/examples/tables/create-index.md new file mode 100644 index 0000000000..63417fd3be --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-index.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIndex result = await tables.createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: .key, + columns: [], + orders: [], // (optional) + lengths: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..3304325af7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnInteger result = await tables.createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..68c7abf754 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIp result = await tables.createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..30a7f12342 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnRelationship result = await tables.createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: .oneToOne, + twoWay: false, // (optional) + key: '', // (optional) + twoWayKey: '', // (optional) + onDelete: .cascade, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-row.md b/docs/examples/1.8.x/server-dart/examples/tables/create-row.md new file mode 100644 index 0000000000..1ce1e1db7a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-row.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Tables tables = Tables(client); + +Row result = await tables.createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md new file mode 100644 index 0000000000..219f2d2d33 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +RowList result = await tables.createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md new file mode 100644 index 0000000000..17e192b27e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnString result = await tables.createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md new file mode 100644 index 0000000000..d3692fc7ac --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnUrl result = await tables.createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create.md b/docs/examples/1.8.x/server-dart/examples/tables/create.md new file mode 100644 index 0000000000..c3a4b2a989 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Table result = await tables.create( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..33d296110c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Row result = await tables.decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: 0, // (optional) + min: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md new file mode 100644 index 0000000000..466564f618 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +await tables.deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md new file mode 100644 index 0000000000..f2dfdbe74b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +await tables.deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md new file mode 100644 index 0000000000..b84c1b7a9f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tables tables = Tables(client); + +await tables.deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md new file mode 100644 index 0000000000..41dc3a9520 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +await tables.deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete.md b/docs/examples/1.8.x/server-dart/examples/tables/delete.md new file mode 100644 index 0000000000..07c9815422 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +await tables.delete( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-column.md b/docs/examples/1.8.x/server-dart/examples/tables/get-column.md new file mode 100644 index 0000000000..087139c87d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/get-column.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + + result = await tables.getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-index.md b/docs/examples/1.8.x/server-dart/examples/tables/get-index.md new file mode 100644 index 0000000000..3f79deef2f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/get-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIndex result = await tables.getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-row.md b/docs/examples/1.8.x/server-dart/examples/tables/get-row.md new file mode 100644 index 0000000000..7efd04a69d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/get-row.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tables tables = Tables(client); + +Row result = await tables.getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get.md b/docs/examples/1.8.x/server-dart/examples/tables/get.md new file mode 100644 index 0000000000..d02f9ff9d2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/get.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Table result = await tables.get( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..188ab5d1ad --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Row result = await tables.incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: 0, // (optional) + max: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md b/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md new file mode 100644 index 0000000000..7b2d479ea3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnList result = await tables.listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md new file mode 100644 index 0000000000..e7418de3bc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIndexList result = await tables.listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md new file mode 100644 index 0000000000..05f9567ac2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tables tables = Tables(client); + +RowList result = await tables.listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list.md b/docs/examples/1.8.x/server-dart/examples/tables/list.md new file mode 100644 index 0000000000..51a19c099d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/list.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +TableList result = await tables.list( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..c452238d7c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnBoolean result = await tables.updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: false, + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..5b41d7e532 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnDatetime result = await tables.updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md new file mode 100644 index 0000000000..444649a4fd --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnEmail result = await tables.updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..2e0566418a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnEnum result = await tables.updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md new file mode 100644 index 0000000000..199d3840d6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnFloat result = await tables.updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..479e63d870 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnInteger result = await tables.updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..837ae4e606 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIp result = await tables.updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..ea6799ed46 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnRelationship result = await tables.updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: .cascade, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-row.md b/docs/examples/1.8.x/server-dart/examples/tables/update-row.md new file mode 100644 index 0000000000..436329235a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-row.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tables tables = Tables(client); + +Row result = await tables.updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md new file mode 100644 index 0000000000..3d2aaf3e28 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +RowList result = await tables.updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: {}, // (optional) + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md new file mode 100644 index 0000000000..dbd569feac --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnString result = await tables.updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '<DEFAULT>', + size: 1, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md new file mode 100644 index 0000000000..8630c718b5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnUrl result = await tables.updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update.md b/docs/examples/1.8.x/server-dart/examples/tables/update.md new file mode 100644 index 0000000000..28ce03cd6c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Table result = await tables.update( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md new file mode 100644 index 0000000000..47f93f2434 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Tables tables = Tables(client); + +Row result = await tables.upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..73ceffa917 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +RowList result = await tables.upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/create-membership.md b/docs/examples/1.8.x/server-dart/examples/teams/create-membership.md new file mode 100644 index 0000000000..f13a6e69bb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.createMembership( + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', // (optional) + userId: '<USER_ID>', // (optional) + phone: '+12065550100', // (optional) + url: 'https://example.com', // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/create.md b/docs/examples/1.8.x/server-dart/examples/teams/create.md new file mode 100644 index 0000000000..772f3cfa86 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/create.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Team result = await teams.create( + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-dart/examples/teams/delete-membership.md new file mode 100644 index 0000000000..9d99cbbd3d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +await teams.deleteMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/delete.md b/docs/examples/1.8.x/server-dart/examples/teams/delete.md new file mode 100644 index 0000000000..1c08ab8ed9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +await teams.delete( + teamId: '<TEAM_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/get-membership.md b/docs/examples/1.8.x/server-dart/examples/teams/get-membership.md new file mode 100644 index 0000000000..0bdc63f8d4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.getMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-dart/examples/teams/get-prefs.md new file mode 100644 index 0000000000..e206393320 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Preferences result = await teams.getPrefs( + teamId: '<TEAM_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/get.md b/docs/examples/1.8.x/server-dart/examples/teams/get.md new file mode 100644 index 0000000000..bb3bcaf7e2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Team result = await teams.get( + teamId: '<TEAM_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-dart/examples/teams/list-memberships.md new file mode 100644 index 0000000000..3c01dec4c5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +MembershipList result = await teams.listMemberships( + teamId: '<TEAM_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/list.md b/docs/examples/1.8.x/server-dart/examples/teams/list.md new file mode 100644 index 0000000000..093a139f71 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +TeamList result = await teams.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-dart/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c947162fa4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.updateMembershipStatus( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/update-membership.md b/docs/examples/1.8.x/server-dart/examples/teams/update-membership.md new file mode 100644 index 0000000000..87a4325857 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Membership result = await teams.updateMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [], +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/update-name.md b/docs/examples/1.8.x/server-dart/examples/teams/update-name.md new file mode 100644 index 0000000000..fe3a9faabf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/update-name.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Team result = await teams.updateName( + teamId: '<TEAM_ID>', + name: '<NAME>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-dart/examples/teams/update-prefs.md new file mode 100644 index 0000000000..57518ada43 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +Preferences result = await teams.updatePrefs( + teamId: '<TEAM_ID>', + prefs: {}, +); diff --git a/docs/examples/1.8.x/server-dart/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-dart/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..cc75a91726 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tokens/create-file-token.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.createFileToken( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + expire: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tokens/delete.md b/docs/examples/1.8.x/server-dart/examples/tokens/delete.md new file mode 100644 index 0000000000..ce95e7b752 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tokens/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tokens tokens = Tokens(client); + +await tokens.delete( + tokenId: '<TOKEN_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tokens/get.md b/docs/examples/1.8.x/server-dart/examples/tokens/get.md new file mode 100644 index 0000000000..3112b5e1e5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tokens/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.get( + tokenId: '<TOKEN_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tokens/list.md b/docs/examples/1.8.x/server-dart/examples/tokens/list.md new file mode 100644 index 0000000000..5331e44de3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tokens/list.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tokens tokens = Tokens(client); + +ResourceTokenList result = await tokens.list( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tokens/update.md b/docs/examples/1.8.x/server-dart/examples/tokens/update.md new file mode 100644 index 0000000000..47e910d574 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tokens/update.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tokens tokens = Tokens(client); + +ResourceToken result = await tokens.update( + tokenId: '<TOKEN_ID>', + expire: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-dart/examples/users/create-argon2user.md new file mode 100644 index 0000000000..38b0255ea4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-argon2user.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createArgon2User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-dart/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..aa898ba22f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createBcryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-dart/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..6e8b7a2bac --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-j-w-t.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Jwt result = await users.createJWT( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', // (optional) + duration: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-dart/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..e08edd617f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-m-d5user.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createMD5User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dart/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..c2b9562e4e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MfaRecoveryCodes result = await users.createMfaRecoveryCodes( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-dart/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..9f23baaef2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createPHPassUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-dart/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..628cf3297e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-s-h-a-user.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createSHAUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: PasswordHash.sha1, // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-dart/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..34bfbf66c4 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createScryptModifiedUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-dart/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..20cf911a09 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.createScryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-session.md b/docs/examples/1.8.x/server-dart/examples/users/create-session.md new file mode 100644 index 0000000000..4293e7edf6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-session.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Session result = await users.createSession( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-target.md b/docs/examples/1.8.x/server-dart/examples/users/create-target.md new file mode 100644 index 0000000000..354a8dbb48 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-target.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Target result = await users.createTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: MessagingProviderType.email, + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create-token.md b/docs/examples/1.8.x/server-dart/examples/users/create-token.md new file mode 100644 index 0000000000..ab7acba3dd --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create-token.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Token result = await users.createToken( + userId: '<USER_ID>', + length: 4, // (optional) + expire: 60, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/create.md b/docs/examples/1.8.x/server-dart/examples/users/create.md new file mode 100644 index 0000000000..b4953748e5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/create.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.create( + userId: '<USER_ID>', + email: 'email@example.com', // (optional) + phone: '+12065550100', // (optional) + password: '', // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/delete-identity.md b/docs/examples/1.8.x/server-dart/examples/users/delete-identity.md new file mode 100644 index 0000000000..7ac2da9000 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/delete-identity.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteIdentity( + identityId: '<IDENTITY_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-dart/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..eed7dbd41b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteMfaAuthenticator( + userId: '<USER_ID>', + type: AuthenticatorType.totp, +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/delete-session.md b/docs/examples/1.8.x/server-dart/examples/users/delete-session.md new file mode 100644 index 0000000000..68d243e52f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/delete-session.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteSession( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-dart/examples/users/delete-sessions.md new file mode 100644 index 0000000000..07c3566a7c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/delete-sessions.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteSessions( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/delete-target.md b/docs/examples/1.8.x/server-dart/examples/users/delete-target.md new file mode 100644 index 0000000000..aa27b32d38 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/delete-target.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.deleteTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/delete.md b/docs/examples/1.8.x/server-dart/examples/users/delete.md new file mode 100644 index 0000000000..93819b72d7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/delete.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +await users.delete( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dart/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..cf66c67610 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MfaRecoveryCodes result = await users.getMfaRecoveryCodes( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/get-prefs.md b/docs/examples/1.8.x/server-dart/examples/users/get-prefs.md new file mode 100644 index 0000000000..146cff6820 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/get-prefs.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Preferences result = await users.getPrefs( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/get-target.md b/docs/examples/1.8.x/server-dart/examples/users/get-target.md new file mode 100644 index 0000000000..9ddaafb55f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/get-target.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Target result = await users.getTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/get.md b/docs/examples/1.8.x/server-dart/examples/users/get.md new file mode 100644 index 0000000000..a171b79582 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/get.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.get( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list-identities.md b/docs/examples/1.8.x/server-dart/examples/users/list-identities.md new file mode 100644 index 0000000000..2c14775e9a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list-identities.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +IdentityList result = await users.listIdentities( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list-logs.md b/docs/examples/1.8.x/server-dart/examples/users/list-logs.md new file mode 100644 index 0000000000..5885dcb874 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list-logs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +LogList result = await users.listLogs( + userId: '<USER_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list-memberships.md b/docs/examples/1.8.x/server-dart/examples/users/list-memberships.md new file mode 100644 index 0000000000..dabe5a123c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list-memberships.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MembershipList result = await users.listMemberships( + userId: '<USER_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-dart/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..7134ee5dab --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list-mfa-factors.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MfaFactors result = await users.listMfaFactors( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list-sessions.md b/docs/examples/1.8.x/server-dart/examples/users/list-sessions.md new file mode 100644 index 0000000000..22a37c05a0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list-sessions.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +SessionList result = await users.listSessions( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list-targets.md b/docs/examples/1.8.x/server-dart/examples/users/list-targets.md new file mode 100644 index 0000000000..971fbea0e1 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list-targets.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +TargetList result = await users.listTargets( + userId: '<USER_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/list.md b/docs/examples/1.8.x/server-dart/examples/users/list.md new file mode 100644 index 0000000000..6d34bb470b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/list.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +UserList result = await users.list( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-dart/examples/users/update-email-verification.md new file mode 100644 index 0000000000..9930e30be5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-email-verification.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateEmailVerification( + userId: '<USER_ID>', + emailVerification: false, +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-email.md b/docs/examples/1.8.x/server-dart/examples/users/update-email.md new file mode 100644 index 0000000000..129a8e2437 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-email.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateEmail( + userId: '<USER_ID>', + email: 'email@example.com', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-labels.md b/docs/examples/1.8.x/server-dart/examples/users/update-labels.md new file mode 100644 index 0000000000..d247bf5e74 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-labels.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateLabels( + userId: '<USER_ID>', + labels: [], +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dart/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..3b7d81f57c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +MfaRecoveryCodes result = await users.updateMfaRecoveryCodes( + userId: '<USER_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-mfa.md b/docs/examples/1.8.x/server-dart/examples/users/update-mfa.md new file mode 100644 index 0000000000..f26b105534 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-mfa.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateMfa( + userId: '<USER_ID>', + mfa: false, +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-name.md b/docs/examples/1.8.x/server-dart/examples/users/update-name.md new file mode 100644 index 0000000000..905cee0e49 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-name.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateName( + userId: '<USER_ID>', + name: '<NAME>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-password.md b/docs/examples/1.8.x/server-dart/examples/users/update-password.md new file mode 100644 index 0000000000..14e27482ec --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-password.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updatePassword( + userId: '<USER_ID>', + password: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-dart/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..b57aafab1f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-phone-verification.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updatePhoneVerification( + userId: '<USER_ID>', + phoneVerification: false, +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-phone.md b/docs/examples/1.8.x/server-dart/examples/users/update-phone.md new file mode 100644 index 0000000000..aa891d2351 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-phone.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updatePhone( + userId: '<USER_ID>', + number: '+12065550100', +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-prefs.md b/docs/examples/1.8.x/server-dart/examples/users/update-prefs.md new file mode 100644 index 0000000000..87fc2968f5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-prefs.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Preferences result = await users.updatePrefs( + userId: '<USER_ID>', + prefs: {}, +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-status.md b/docs/examples/1.8.x/server-dart/examples/users/update-status.md new file mode 100644 index 0000000000..4d8dca03ad --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-status.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +User result = await users.updateStatus( + userId: '<USER_ID>', + status: false, +); diff --git a/docs/examples/1.8.x/server-dart/examples/users/update-target.md b/docs/examples/1.8.x/server-dart/examples/users/update-target.md new file mode 100644 index 0000000000..f66f0b7475 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/users/update-target.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Users users = Users(client); + +Target result = await users.updateTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', // (optional) + providerId: '<PROVIDER_ID>', // (optional) + name: '<NAME>', // (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-deno/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..62ad345304 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createAnonymousSession(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-deno/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..d08a92d2c3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-email-password-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-email-token.md b/docs/examples/1.8.x/server-deno/examples/account/create-email-token.md new file mode 100644 index 0000000000..384a3fbbea --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-email-token.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createEmailToken( + '<USER_ID>', // userId + 'email@example.com', // email + false // phrase (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-deno/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a0a7f722cc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-j-w-t.md @@ -0,0 +1,9 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createJWT(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-deno/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..29e552a819 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,14 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createMagicURLToken( + '<USER_ID>', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..52c193a848 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-authenticator.md @@ -0,0 +1,12 @@ +import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createMfaAuthenticator( + AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..296e36dec4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-challenge.md @@ -0,0 +1,11 @@ +import { Client, Account, AuthenticationFactor } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createMfaChallenge( + AuthenticationFactor.Email // factor +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..cfd9aa2ba8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-deno/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..24e43a9d9c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-o-auth2token.md @@ -0,0 +1,14 @@ +import { Client, Account, OAuthProvider } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-deno/examples/account/create-phone-token.md new file mode 100644 index 0000000000..77e4adcb9c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-phone-token.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createPhoneToken( + '<USER_ID>', // userId + '+12065550100' // phone +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-deno/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..8f01304f5b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createPhoneVerification(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-recovery.md b/docs/examples/1.8.x/server-deno/examples/account/create-recovery.md new file mode 100644 index 0000000000..a3d92d866e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-session.md b/docs/examples/1.8.x/server-deno/examples/account/create-session.md new file mode 100644 index 0000000000..888493a21a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.createSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create-verification.md b/docs/examples/1.8.x/server-deno/examples/account/create-verification.md new file mode 100644 index 0000000000..438feee807 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create-verification.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.createVerification( + 'https://example.com' // url +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/create.md b/docs/examples/1.8.x/server-deno/examples/account/create.md new file mode 100644 index 0000000000..c410a0f7c7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/create.md @@ -0,0 +1,14 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.create( + '<USER_ID>', // userId + 'email@example.com', // email + '', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/delete-identity.md b/docs/examples/1.8.x/server-deno/examples/account/delete-identity.md new file mode 100644 index 0000000000..359c7a3cfa --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.deleteIdentity( + '<IDENTITY_ID>' // identityId +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..f4b164b43d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,12 @@ +import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.deleteMfaAuthenticator( + AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/delete-session.md b/docs/examples/1.8.x/server-deno/examples/account/delete-session.md new file mode 100644 index 0000000000..a0b7d19687 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/delete-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.deleteSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-deno/examples/account/delete-sessions.md new file mode 100644 index 0000000000..864c50535b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.deleteSessions(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..73fc143978 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.getMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/get-prefs.md b/docs/examples/1.8.x/server-deno/examples/account/get-prefs.md new file mode 100644 index 0000000000..4479df71f7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.getPrefs(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/get-session.md b/docs/examples/1.8.x/server-deno/examples/account/get-session.md new file mode 100644 index 0000000000..c380b72ed5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/get-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.getSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/get.md b/docs/examples/1.8.x/server-deno/examples/account/get.md new file mode 100644 index 0000000000..5abdc95ec7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/get.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.get(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/list-identities.md b/docs/examples/1.8.x/server-deno/examples/account/list-identities.md new file mode 100644 index 0000000000..1c612f9737 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/list-identities.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.listIdentities( + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/list-logs.md b/docs/examples/1.8.x/server-deno/examples/account/list-logs.md new file mode 100644 index 0000000000..28ab351f5a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/list-logs.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.listLogs( + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-deno/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..35fb7497de --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/list-mfa-factors.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.listMfaFactors(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/list-sessions.md b/docs/examples/1.8.x/server-deno/examples/account/list-sessions.md new file mode 100644 index 0000000000..e34da16995 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.listSessions(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-email.md b/docs/examples/1.8.x/server-deno/examples/account/update-email.md new file mode 100644 index 0000000000..0753cff9fd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-email.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-deno/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..24611aa43a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-m-f-a.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateMFA( + false // mfa +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-deno/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..a83c1d91a4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.updateMagicURLSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..6b95818e06 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Account, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateMfaAuthenticator( + AuthenticatorType.Totp, // type + '<OTP>' // otp +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..61a7b44fd0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateMfaChallenge( + '<CHALLENGE_ID>', // challengeId + '<OTP>' // otp +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..2030e1c551 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-name.md b/docs/examples/1.8.x/server-deno/examples/account/update-name.md new file mode 100644 index 0000000000..a02591b3b5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-name.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateName( + '<NAME>' // name +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-password.md b/docs/examples/1.8.x/server-deno/examples/account/update-password.md new file mode 100644 index 0000000000..088bea88ac --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-password.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-deno/examples/account/update-phone-session.md new file mode 100644 index 0000000000..4710a451a8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-phone-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new Account(client); + +const response = await account.updatePhoneSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-deno/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..3b150c8c4a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updatePhoneVerification( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-phone.md b/docs/examples/1.8.x/server-deno/examples/account/update-phone.md new file mode 100644 index 0000000000..9c1923c217 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-phone.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-prefs.md b/docs/examples/1.8.x/server-deno/examples/account/update-prefs.md new file mode 100644 index 0000000000..4b37a64fe7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updatePrefs( + {} // prefs +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-recovery.md b/docs/examples/1.8.x/server-deno/examples/account/update-recovery.md new file mode 100644 index 0000000000..5d0d80f956 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateRecovery( + '<USER_ID>', // userId + '<SECRET>', // secret + '' // password +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-session.md b/docs/examples/1.8.x/server-deno/examples/account/update-session.md new file mode 100644 index 0000000000..cb36b9491e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-session.md @@ -0,0 +1,12 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-status.md b/docs/examples/1.8.x/server-deno/examples/account/update-status.md new file mode 100644 index 0000000000..0c70c88b51 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-status.md @@ -0,0 +1,10 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateStatus(); diff --git a/docs/examples/1.8.x/server-deno/examples/account/update-verification.md b/docs/examples/1.8.x/server-deno/examples/account/update-verification.md new file mode 100644 index 0000000000..96370858cd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/account/update-verification.md @@ -0,0 +1,13 @@ +import { Client, Account } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new Account(client); + +const response = await account.updateVerification( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-browser.md new file mode 100644 index 0000000000..5443200b39 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-browser.md @@ -0,0 +1,15 @@ +import { Client, Avatars, Browser } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getBrowser( + Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..8bcc67e08c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-credit-card.md @@ -0,0 +1,15 @@ +import { Client, Avatars, CreditCard } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getCreditCard( + CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..cca313a9a2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +import { Client, Avatars } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getFavicon( + 'https://example.com' // url +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-flag.md new file mode 100644 index 0000000000..6837438c10 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-flag.md @@ -0,0 +1,15 @@ +import { Client, Avatars, Flag } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getFlag( + Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-image.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-image.md new file mode 100644 index 0000000000..2960daba8d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +import { Client, Avatars } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-initials.md new file mode 100644 index 0000000000..10eb2d80b8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-initials.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getInitials( + '<NAME>', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-deno/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..d9ccc0dbca --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +import { Client, Avatars } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new Avatars(client); + +const result = avatars.getQR( + '<TEXT>', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..b216c2ead3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-boolean-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createBooleanAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/create-collection.md new file mode 100644 index 0000000000..c7e8026758 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-collection.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..664da19de2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-datetime-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createDatetimeAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-document.md b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md new file mode 100644 index 0000000000..f18b4f30dc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const databases = new Databases(client); + +const response = await databases.createDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md new file mode 100644 index 0000000000..fa3fe84731 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // documents +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..6c667ed38a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-email-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createEmailAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..6fdd2773c8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-enum-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createEnumAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..c5991d49f6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-float-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createFloatAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-index.md b/docs/examples/1.8.x/server-deno/examples/databases/create-index.md new file mode 100644 index 0000000000..3ab3c7a3aa --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-index.md @@ -0,0 +1,18 @@ +import { Client, Databases, IndexType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + IndexType.Key, // type + [], // attributes + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..4a306cd50d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-integer-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createIntegerAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..c043b25207 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-ip-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createIpAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..d96ee59a4d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-relationship-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createRelationshipAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<RELATED_COLLECTION_ID>', // relatedCollectionId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..5f8e955541 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-string-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createStringAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..4639f75f5b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-url-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.createUrlAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create.md b/docs/examples/1.8.x/server-deno/examples/databases/create.md new file mode 100644 index 0000000000..86795eb750 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/create.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.create( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..0142188185 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/decrement-document-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.decrementDocumentAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + '', // attribute + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..f7ad6b105a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-attribute.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.deleteAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-collection.md new file mode 100644 index 0000000000..828d48a7bc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-collection.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.deleteCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-document.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-document.md new file mode 100644 index 0000000000..47d5df49f1 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.deleteDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>' // documentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-documents.md new file mode 100644 index 0000000000..4768ed426b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-documents.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.deleteDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete-index.md b/docs/examples/1.8.x/server-deno/examples/databases/delete-index.md new file mode 100644 index 0000000000..eee1613a87 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete-index.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.deleteIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/delete.md b/docs/examples/1.8.x/server-deno/examples/databases/delete.md new file mode 100644 index 0000000000..39b3f5395e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/delete.md @@ -0,0 +1,12 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.delete( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/get-attribute.md new file mode 100644 index 0000000000..f2b801b5f1 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/get-attribute.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.getAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/get-collection.md new file mode 100644 index 0000000000..b94f4fd5ff --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/get-collection.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.getCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get-document.md b/docs/examples/1.8.x/server-deno/examples/databases/get-document.md new file mode 100644 index 0000000000..5cb02c4de3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/get-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.getDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get-index.md b/docs/examples/1.8.x/server-deno/examples/databases/get-index.md new file mode 100644 index 0000000000..6c3a3dec1a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/get-index.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.getIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/get.md b/docs/examples/1.8.x/server-deno/examples/databases/get.md new file mode 100644 index 0000000000..403e467e04 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/get.md @@ -0,0 +1,12 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.get( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..9202a94bb9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/increment-document-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.incrementDocumentAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + '', // attribute + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-deno/examples/databases/list-attributes.md new file mode 100644 index 0000000000..2171ffe4ad --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.listAttributes( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list-collections.md b/docs/examples/1.8.x/server-deno/examples/databases/list-collections.md new file mode 100644 index 0000000000..408ea2d601 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/list-collections.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.listCollections( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/list-documents.md new file mode 100644 index 0000000000..528e979517 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.listDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/databases/list-indexes.md new file mode 100644 index 0000000000..88af3b7f28 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.listIndexes( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/list.md b/docs/examples/1.8.x/server-deno/examples/databases/list.md new file mode 100644 index 0000000000..dcae151617 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/list.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..fe1b80073a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateBooleanAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-collection.md b/docs/examples/1.8.x/server-deno/examples/databases/update-collection.md new file mode 100644 index 0000000000..47f1c02783 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-collection.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..ad18d93865 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateDatetimeAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-document.md b/docs/examples/1.8.x/server-deno/examples/databases/update-document.md new file mode 100644 index 0000000000..31cce5ed1c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-document.md @@ -0,0 +1,16 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new Databases(client); + +const response = await databases.updateDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/update-documents.md new file mode 100644 index 0000000000..1eef7794fb --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-documents.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..116fadc6c7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateEmailAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..663e44b530 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateEnumAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..d9eab5aac5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateFloatAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..369b49d574 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateIntegerAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..049a527993 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateIpAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..7fae26b535 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-relationship-attribute.md @@ -0,0 +1,16 @@ +import { Client, Databases, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateRelationshipAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..ec91d3367e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-string-attribute.md @@ -0,0 +1,18 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateStringAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-deno/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..32f44b7eaf --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.updateUrlAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/update.md b/docs/examples/1.8.x/server-deno/examples/databases/update.md new file mode 100644 index 0000000000..b87ad82ec0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/update.md @@ -0,0 +1,14 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.update( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md new file mode 100644 index 0000000000..a8a61ca43c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md @@ -0,0 +1,15 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const databases = new Databases(client); + +const response = await databases.upsertDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>' // documentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..bf9e7ded89 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md @@ -0,0 +1,13 @@ +import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new Databases(client); + +const response = await databases.upsertDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/create-deployment.md new file mode 100644 index 0000000000..a134a382fa --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-deployment.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createDeployment( + '<FUNCTION_ID>', // functionId + InputFile.fromPath('/path/to/file.png', 'file.png'), // code + false, // activate + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>' // commands (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..e22d1da72a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createDuplicateDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>', // deploymentId + '<BUILD_ID>' // buildId (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md b/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md new file mode 100644 index 0000000000..bec6a17db2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md @@ -0,0 +1,18 @@ +import { Client, Functions, ExecutionMethod } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new Functions(client); + +const response = await functions.createExecution( + '<FUNCTION_ID>', // functionId + '<BODY>', // body (optional) + false, // async (optional) + '<PATH>', // path (optional) + ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..69503da6a9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-template-deployment.md @@ -0,0 +1,17 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createTemplateDeployment( + '<FUNCTION_ID>', // functionId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/create-variable.md new file mode 100644 index 0000000000..28648901ee --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createVariable( + '<FUNCTION_ID>', // functionId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..d501b0ee26 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-vcs-deployment.md @@ -0,0 +1,15 @@ +import { Client, Functions, VCSDeploymentType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.createVcsDeployment( + '<FUNCTION_ID>', // functionId + VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create.md b/docs/examples/1.8.x/server-deno/examples/functions/create.md new file mode 100644 index 0000000000..32265deb0b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/create.md @@ -0,0 +1,29 @@ +import { Client, Functions, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.create( + '<FUNCTION_ID>', // functionId + '<NAME>', // name + .Node145, // runtime + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>', // commands (optional) + [], // scopes (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..179bbaf303 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete-deployment.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.deleteDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-deno/examples/functions/delete-execution.md new file mode 100644 index 0000000000..4ab7c37785 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete-execution.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.deleteExecution( + '<FUNCTION_ID>', // functionId + '<EXECUTION_ID>' // executionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/delete-variable.md new file mode 100644 index 0000000000..39a9428ed3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete-variable.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.deleteVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/delete.md b/docs/examples/1.8.x/server-deno/examples/functions/delete.md new file mode 100644 index 0000000000..94d58c33dd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/delete.md @@ -0,0 +1,12 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.delete( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-deno/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..d153036c9a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/get-deployment-download.md @@ -0,0 +1,14 @@ +import { Client, Functions, DeploymentDownloadType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const result = functions.getDeploymentDownload( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>', // deploymentId + DeploymentDownloadType.Source // type (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/get-deployment.md new file mode 100644 index 0000000000..339b99d4f1 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/get-deployment.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.getDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get-execution.md b/docs/examples/1.8.x/server-deno/examples/functions/get-execution.md new file mode 100644 index 0000000000..adeff0256a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new Functions(client); + +const response = await functions.getExecution( + '<FUNCTION_ID>', // functionId + '<EXECUTION_ID>' // executionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/get-variable.md new file mode 100644 index 0000000000..cbbdd2f847 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/get-variable.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.getVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/get.md b/docs/examples/1.8.x/server-deno/examples/functions/get.md new file mode 100644 index 0000000000..8fec17ed15 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/get.md @@ -0,0 +1,12 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.get( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-deno/examples/functions/list-deployments.md new file mode 100644 index 0000000000..849fe232b8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.listDeployments( + '<FUNCTION_ID>', // functionId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-executions.md b/docs/examples/1.8.x/server-deno/examples/functions/list-executions.md new file mode 100644 index 0000000000..cd597fb7a5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new Functions(client); + +const response = await functions.listExecutions( + '<FUNCTION_ID>', // functionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-deno/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..a45afe4aa7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-runtimes.md @@ -0,0 +1,10 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.listRuntimes(); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-deno/examples/functions/list-specifications.md new file mode 100644 index 0000000000..3bf0d08e7c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-specifications.md @@ -0,0 +1,10 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.listSpecifications(); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list-variables.md b/docs/examples/1.8.x/server-deno/examples/functions/list-variables.md new file mode 100644 index 0000000000..173d5aa9ef --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/list-variables.md @@ -0,0 +1,12 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.listVariables( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/list.md b/docs/examples/1.8.x/server-deno/examples/functions/list.md new file mode 100644 index 0000000000..ecc43d1a7c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/list.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-deno/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..4c7e8052c1 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/update-deployment-status.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.updateDeploymentStatus( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-deno/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..55196c148d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/update-function-deployment.md @@ -0,0 +1,13 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.updateFunctionDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/update-variable.md b/docs/examples/1.8.x/server-deno/examples/functions/update-variable.md new file mode 100644 index 0000000000..3da706d5f4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/update-variable.md @@ -0,0 +1,16 @@ +import { Client, Functions } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.updateVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/update.md b/docs/examples/1.8.x/server-deno/examples/functions/update.md new file mode 100644 index 0000000000..399af05841 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/functions/update.md @@ -0,0 +1,29 @@ +import { Client, Functions, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new Functions(client); + +const response = await functions.update( + '<FUNCTION_ID>', // functionId + '<NAME>', // name + .Node145, // runtime (optional) + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>', // commands (optional) + [], // scopes (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md b/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md new file mode 100644 index 0000000000..200120f1e8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +import { Client, Graphql } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const graphql = new Graphql(client); + +const response = await graphql.mutation( + {} // query +); diff --git a/docs/examples/1.8.x/server-deno/examples/graphql/query.md b/docs/examples/1.8.x/server-deno/examples/graphql/query.md new file mode 100644 index 0000000000..bb0116278c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/graphql/query.md @@ -0,0 +1,12 @@ +import { Client, Graphql } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const graphql = new Graphql(client); + +const response = await graphql.query( + {} // query +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-deno/examples/health/get-antivirus.md new file mode 100644 index 0000000000..d8dcc1fe3a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-antivirus.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getAntivirus(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-cache.md b/docs/examples/1.8.x/server-deno/examples/health/get-cache.md new file mode 100644 index 0000000000..e138b50b26 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-cache.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getCache(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-certificate.md b/docs/examples/1.8.x/server-deno/examples/health/get-certificate.md new file mode 100644 index 0000000000..828e53dd7b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-certificate.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getCertificate( + '' // domain (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-d-b.md b/docs/examples/1.8.x/server-deno/examples/health/get-d-b.md new file mode 100644 index 0000000000..bded9eb81b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-d-b.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getDB(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-deno/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..5e40f762e4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-failed-jobs.md @@ -0,0 +1,13 @@ +import { Client, Health, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getFailedJobs( + .V1Database, // name + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-deno/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..ecc05a3e21 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-pub-sub.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getPubSub(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..f6b9388bb3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-builds.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueBuilds( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..e783fa52b3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-certificates.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueCertificates( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..e33c7a2929 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-databases.md @@ -0,0 +1,13 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueDatabases( + '<NAME>', // name (optional) + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..ea7da5b587 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-deletes.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueDeletes( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..e075a65602 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-functions.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueFunctions( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..eb7ffb028a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-logs.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueLogs( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..d9f61bc088 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-mails.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueMails( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..8bc76398d9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-messaging.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueMessaging( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..e6f7bf543c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-migrations.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueMigrations( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..ecc7ebd322 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-stats-resources.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueStatsResources( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..46aa4db5be --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-usage.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueUsage( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-deno/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..75a1c1f833 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-queue-webhooks.md @@ -0,0 +1,12 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getQueueWebhooks( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-deno/examples/health/get-storage-local.md new file mode 100644 index 0000000000..0e64e1a6dd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-storage-local.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getStorageLocal(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-storage.md b/docs/examples/1.8.x/server-deno/examples/health/get-storage.md new file mode 100644 index 0000000000..698e33b999 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-storage.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getStorage(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get-time.md b/docs/examples/1.8.x/server-deno/examples/health/get-time.md new file mode 100644 index 0000000000..1bb1ae0e56 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get-time.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.getTime(); diff --git a/docs/examples/1.8.x/server-deno/examples/health/get.md b/docs/examples/1.8.x/server-deno/examples/health/get.md new file mode 100644 index 0000000000..87d7ea5396 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/health/get.md @@ -0,0 +1,10 @@ +import { Client, Health } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new Health(client); + +const response = await health.get(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/get.md b/docs/examples/1.8.x/server-deno/examples/locale/get.md new file mode 100644 index 0000000000..960ee6f4f3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/get.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.get(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-codes.md b/docs/examples/1.8.x/server-deno/examples/locale/list-codes.md new file mode 100644 index 0000000000..8f91c212df --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCodes(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-continents.md b/docs/examples/1.8.x/server-deno/examples/locale/list-continents.md new file mode 100644 index 0000000000..55b208c741 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listContinents(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-deno/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..b4fbfa0e37 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCountriesEU(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-deno/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..19ac0a06cf --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCountriesPhones(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-countries.md b/docs/examples/1.8.x/server-deno/examples/locale/list-countries.md new file mode 100644 index 0000000000..67ba0fedd7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCountries(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-deno/examples/locale/list-currencies.md new file mode 100644 index 0000000000..986f09d237 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listCurrencies(); diff --git a/docs/examples/1.8.x/server-deno/examples/locale/list-languages.md b/docs/examples/1.8.x/server-deno/examples/locale/list-languages.md new file mode 100644 index 0000000000..91b4a857b9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +import { Client, Locale } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new Locale(client); + +const response = await locale.listLanguages(); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..e2c33feff8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-apns-provider.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false, // sandbox (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-email.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-email.md new file mode 100644 index 0000000000..8db2879f9c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-email.md @@ -0,0 +1,23 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createEmail( + '<MESSAGE_ID>', // messageId + '<SUBJECT>', // subject + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + [], // cc (optional) + [], // bcc (optional) + [], // attachments (optional) + false, // draft (optional) + false, // html (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..3f443d6bf5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-fcm-provider.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + {}, // serviceAccountJSON (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..32f7c94f21 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,21 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..57e94188b9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-msg91provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>', // authKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-push.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-push.md new file mode 100644 index 0000000000..7523c2978f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-push.md @@ -0,0 +1,30 @@ +import { Client, Messaging, MessagePriority } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createPush( + '<MESSAGE_ID>', // messageId + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..15fe7b8c7b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-sms.md new file mode 100644 index 0000000000..264203a8be --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-sms.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createSms( + '<MESSAGE_ID>', // messageId + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..2d6d33c62a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-smtp-provider.md @@ -0,0 +1,25 @@ +import { Client, Messaging, SmtpEncryption } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<HOST>', // host + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..8be79f3f9e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-subscriber.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new Messaging(client); + +const response = await messaging.createSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>', // subscriberId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..2bb95c4e2d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-telesign-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..4657493664 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-topic.md new file mode 100644 index 0000000000..c2ca3a4ed2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-topic.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name + ["any"] // subscribe (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..aa7bbf6a18 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-twilio-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..5fe734fb0c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/create-vonage-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.createVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..7bc99ef3b5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete-provider.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.deleteProvider( + '<PROVIDER_ID>' // providerId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..147456887d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete-subscriber.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new Messaging(client); + +const response = await messaging.deleteSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..aa1359cf28 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete-topic.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.deleteTopic( + '<TOPIC_ID>' // topicId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/delete.md b/docs/examples/1.8.x/server-deno/examples/messaging/delete.md new file mode 100644 index 0000000000..0442da1e8b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/delete.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.delete( + '<MESSAGE_ID>' // messageId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/get-message.md b/docs/examples/1.8.x/server-deno/examples/messaging/get-message.md new file mode 100644 index 0000000000..9565a611ae --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/get-message.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.getMessage( + '<MESSAGE_ID>' // messageId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/get-provider.md new file mode 100644 index 0000000000..8e5d426418 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/get-provider.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.getProvider( + '<PROVIDER_ID>' // providerId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-deno/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..e9377a532f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/get-subscriber.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.getSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/get-topic.md new file mode 100644 index 0000000000..35f1853ada --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/get-topic.md @@ -0,0 +1,12 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.getTopic( + '<TOPIC_ID>' // topicId +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..f39a90037a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-message-logs.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listMessageLogs( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-messages.md new file mode 100644 index 0000000000..50b1a10f4b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-messages.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listMessages( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..c4b20a8306 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-provider-logs.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listProviderLogs( + '<PROVIDER_ID>', // providerId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-providers.md new file mode 100644 index 0000000000..7c877c25de --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-providers.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listProviders( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..0d14f85777 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listSubscriberLogs( + '<SUBSCRIBER_ID>', // subscriberId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..384bb8fe4f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-subscribers.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listSubscribers( + '<TOPIC_ID>', // topicId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-targets.md new file mode 100644 index 0000000000..5ce2082236 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-targets.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listTargets( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..d2c771d480 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-topic-logs.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listTopicLogs( + '<TOPIC_ID>', // topicId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-deno/examples/messaging/list-topics.md new file mode 100644 index 0000000000..1d0ec43066 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/list-topics.md @@ -0,0 +1,13 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.listTopics( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..71bd038edb --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-apns-provider.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false // sandbox (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-email.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-email.md new file mode 100644 index 0000000000..c8b0558250 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-email.md @@ -0,0 +1,23 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateEmail( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<SUBJECT>', // subject (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + false, // html (optional) + [], // cc (optional) + [], // bcc (optional) + '', // scheduledAt (optional) + [] // attachments (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..eb71dddd1a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-fcm-provider.md @@ -0,0 +1,15 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + {} // serviceAccountJSON (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..f80d6a4b1d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,21 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..36943f2fa0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-msg91provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>' // authKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-push.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-push.md new file mode 100644 index 0000000000..c7f068604b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-push.md @@ -0,0 +1,30 @@ +import { Client, Messaging, MessagePriority } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updatePush( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..0ec96db2f8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,19 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-sms.md new file mode 100644 index 0000000000..9c1dc4a5dc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-sms.md @@ -0,0 +1,18 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateSms( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..9d59bb3646 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-smtp-provider.md @@ -0,0 +1,25 @@ +import { Client, Messaging, SmtpEncryption } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<HOST>', // host (optional) + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..052d394f05 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-telesign-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..2163792f83 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-topic.md new file mode 100644 index 0000000000..5f7f77901b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-topic.md @@ -0,0 +1,14 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name (optional) + ["any"] // subscribe (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..5abdd65a9c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-twilio-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-deno/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..c8fa90d9ab --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/messaging/update-vonage-provider.md @@ -0,0 +1,17 @@ +import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new Messaging(client); + +const response = await messaging.updateVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-deployment.md new file mode 100644 index 0000000000..f674553a10 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-deployment.md @@ -0,0 +1,17 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createDeployment( + '<SITE_ID>', // siteId + InputFile.fromPath('/path/to/file.png', 'file.png'), // code + false, // activate + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>' // outputDirectory (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..317e80b312 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createDuplicateDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..4ef245bd16 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-template-deployment.md @@ -0,0 +1,17 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createTemplateDeployment( + '<SITE_ID>', // siteId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/create-variable.md new file mode 100644 index 0000000000..7b07a088ce --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-variable.md @@ -0,0 +1,15 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createVariable( + '<SITE_ID>', // siteId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..5c49808811 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/create-vcs-deployment.md @@ -0,0 +1,15 @@ +import { Client, Sites, VCSDeploymentType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.createVcsDeployment( + '<SITE_ID>', // siteId + VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/create.md b/docs/examples/1.8.x/server-deno/examples/sites/create.md new file mode 100644 index 0000000000..420b36290b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/create.md @@ -0,0 +1,29 @@ +import { Client, Sites, , , } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.create( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + .Node145, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Static, // adapter (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..cd97673387 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete-deployment.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.deleteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/delete-log.md b/docs/examples/1.8.x/server-deno/examples/sites/delete-log.md new file mode 100644 index 0000000000..0b70eb30b6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete-log.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.deleteLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/delete-variable.md new file mode 100644 index 0000000000..0bbc2e33dc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete-variable.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.deleteVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/delete.md b/docs/examples/1.8.x/server-deno/examples/sites/delete.md new file mode 100644 index 0000000000..af5dbed3f2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/delete.md @@ -0,0 +1,12 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.delete( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-deno/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..4c3ceca8ae --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/get-deployment-download.md @@ -0,0 +1,14 @@ +import { Client, Sites, DeploymentDownloadType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const result = sites.getDeploymentDownload( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>', // deploymentId + DeploymentDownloadType.Source // type (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/get-deployment.md new file mode 100644 index 0000000000..4e614b0de9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/get-deployment.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.getDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get-log.md b/docs/examples/1.8.x/server-deno/examples/sites/get-log.md new file mode 100644 index 0000000000..9495030fa3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/get-log.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.getLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/get-variable.md new file mode 100644 index 0000000000..12ab553026 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/get-variable.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.getVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/get.md b/docs/examples/1.8.x/server-deno/examples/sites/get.md new file mode 100644 index 0000000000..769f426d1e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/get.md @@ -0,0 +1,12 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.get( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-deno/examples/sites/list-deployments.md new file mode 100644 index 0000000000..09cc52194f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-deployments.md @@ -0,0 +1,14 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listDeployments( + '<SITE_ID>', // siteId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-deno/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..5623960463 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-frameworks.md @@ -0,0 +1,10 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listFrameworks(); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-logs.md b/docs/examples/1.8.x/server-deno/examples/sites/list-logs.md new file mode 100644 index 0000000000..3249903c07 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listLogs( + '<SITE_ID>', // siteId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-deno/examples/sites/list-specifications.md new file mode 100644 index 0000000000..a1b0b334ed --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-specifications.md @@ -0,0 +1,10 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listSpecifications(); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list-variables.md b/docs/examples/1.8.x/server-deno/examples/sites/list-variables.md new file mode 100644 index 0000000000..0aac319816 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/list-variables.md @@ -0,0 +1,12 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.listVariables( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/list.md b/docs/examples/1.8.x/server-deno/examples/sites/list.md new file mode 100644 index 0000000000..f21433d794 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/list.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-deno/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..83fe6f85a0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/update-deployment-status.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.updateDeploymentStatus( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-deno/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..1d9d697d39 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/update-site-deployment.md @@ -0,0 +1,13 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.updateSiteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/update-variable.md b/docs/examples/1.8.x/server-deno/examples/sites/update-variable.md new file mode 100644 index 0000000000..6776af7a65 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/update-variable.md @@ -0,0 +1,16 @@ +import { Client, Sites } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.updateVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/sites/update.md b/docs/examples/1.8.x/server-deno/examples/sites/update.md new file mode 100644 index 0000000000..ba7d195cd3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/sites/update.md @@ -0,0 +1,29 @@ +import { Client, Sites, , , } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new Sites(client); + +const response = await sites.update( + '<SITE_ID>', // siteId + '<NAME>', // name + .Analog, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + .Node145, // buildRuntime (optional) + .Static, // adapter (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/create-bucket.md new file mode 100644 index 0000000000..e7d3e9006a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/create-bucket.md @@ -0,0 +1,21 @@ +import { Client, Storage, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.createBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/create-file.md b/docs/examples/1.8.x/server-deno/examples/storage/create-file.md new file mode 100644 index 0000000000..d8912c6c1e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/create-file.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.createFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + InputFile.fromPath('/path/to/file.png', 'file.png'), // file + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..f0d71467d4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/delete-bucket.md @@ -0,0 +1,12 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.deleteBucket( + '<BUCKET_ID>' // bucketId +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/delete-file.md b/docs/examples/1.8.x/server-deno/examples/storage/delete-file.md new file mode 100644 index 0000000000..2a1f95ed18 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.deleteFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/get-bucket.md new file mode 100644 index 0000000000..a695021b72 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-bucket.md @@ -0,0 +1,12 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.getBucket( + '<BUCKET_ID>' // bucketId +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-deno/examples/storage/get-file-download.md new file mode 100644 index 0000000000..df11f40b80 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const result = storage.getFileDownload( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-deno/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..6457c7831b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-file-preview.md @@ -0,0 +1,25 @@ +import { Client, Storage, ImageGravity, ImageFormat } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const result = storage.getFilePreview( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.Center, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + ImageFormat.Jpg, // output (optional) + '<TOKEN>' // token (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-deno/examples/storage/get-file-view.md new file mode 100644 index 0000000000..5a1dbac86a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const result = storage.getFileView( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/get-file.md b/docs/examples/1.8.x/server-deno/examples/storage/get-file.md new file mode 100644 index 0000000000..5479dc569d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/get-file.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.getFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-deno/examples/storage/list-buckets.md new file mode 100644 index 0000000000..9286bd488c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/list-buckets.md @@ -0,0 +1,13 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.listBuckets( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/list-files.md b/docs/examples/1.8.x/server-deno/examples/storage/list-files.md new file mode 100644 index 0000000000..316875cf51 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/list-files.md @@ -0,0 +1,14 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.listFiles( + '<BUCKET_ID>', // bucketId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-deno/examples/storage/update-bucket.md new file mode 100644 index 0000000000..1e70f16ef3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/update-bucket.md @@ -0,0 +1,21 @@ +import { Client, Storage, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new Storage(client); + +const response = await storage.updateBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + .None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/storage/update-file.md b/docs/examples/1.8.x/server-deno/examples/storage/update-file.md new file mode 100644 index 0000000000..683b0b7304 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/storage/update-file.md @@ -0,0 +1,15 @@ +import { Client, Storage } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new Storage(client); + +const response = await storage.updateFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<NAME>', // name (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..3f9abc8c05 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..898b67a787 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md new file mode 100644 index 0000000000..82872e4087 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..afbb8d00aa --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md new file mode 100644 index 0000000000..44658bbaa9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-index.md b/docs/examples/1.8.x/server-deno/examples/tables/create-index.md new file mode 100644 index 0000000000..e3a330e4c7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-index.md @@ -0,0 +1,18 @@ +import { Client, Tables, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + .Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..0f1721b24a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..ca96de6293 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..8e2c5e6173 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md @@ -0,0 +1,19 @@ +import { Client, Tables, , } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + .OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + .Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-row.md b/docs/examples/1.8.x/server-deno/examples/tables/create-row.md new file mode 100644 index 0000000000..12cec49af0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const response = await tables.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md new file mode 100644 index 0000000000..6c4f7d5627 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md new file mode 100644 index 0000000000..db7ac8a760 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md new file mode 100644 index 0000000000..8d6f127c00 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create.md b/docs/examples/1.8.x/server-deno/examples/tables/create.md new file mode 100644 index 0000000000..9c75c22c3d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.create( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..e561acc529 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md new file mode 100644 index 0000000000..89900bfbf0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md new file mode 100644 index 0000000000..a17791cef2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md new file mode 100644 index 0000000000..8f30eae2d2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new Tables(client); + +const response = await tables.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md new file mode 100644 index 0000000000..c5aa88f9a2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete.md b/docs/examples/1.8.x/server-deno/examples/tables/delete.md new file mode 100644 index 0000000000..36df1373dc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete.md @@ -0,0 +1,13 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.delete( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-column.md b/docs/examples/1.8.x/server-deno/examples/tables/get-column.md new file mode 100644 index 0000000000..8a56af67e7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/get-column.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-index.md b/docs/examples/1.8.x/server-deno/examples/tables/get-index.md new file mode 100644 index 0000000000..61105dc661 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/get-index.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-row.md b/docs/examples/1.8.x/server-deno/examples/tables/get-row.md new file mode 100644 index 0000000000..674ea3e648 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/get-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new Tables(client); + +const response = await tables.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get.md b/docs/examples/1.8.x/server-deno/examples/tables/get.md new file mode 100644 index 0000000000..cc1dcb8c51 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/get.md @@ -0,0 +1,13 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.get( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..9779d8776e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md b/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md new file mode 100644 index 0000000000..63ec0777bb --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md new file mode 100644 index 0000000000..587d19f362 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md new file mode 100644 index 0000000000..6db6bea439 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new Tables(client); + +const response = await tables.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list.md b/docs/examples/1.8.x/server-deno/examples/tables/list.md new file mode 100644 index 0000000000..d4da8409c9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/list.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.list( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..8710c27ede --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..e1ca760e31 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md new file mode 100644 index 0000000000..b0e25348d4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..8771213a79 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md new file mode 100644 index 0000000000..a2e6f55c1f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..51ea17f943 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..4a5a1d0f81 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..99609c333e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md @@ -0,0 +1,16 @@ +import { Client, Tables, } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + .Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-row.md b/docs/examples/1.8.x/server-deno/examples/tables/update-row.md new file mode 100644 index 0000000000..13da5615e7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-row.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new Tables(client); + +const response = await tables.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md new file mode 100644 index 0000000000..1bc0a18b98 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md new file mode 100644 index 0000000000..00dd310b1e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md new file mode 100644 index 0000000000..2ebf80a356 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update.md b/docs/examples/1.8.x/server-deno/examples/tables/update.md new file mode 100644 index 0000000000..43b51bd284 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.update( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md new file mode 100644 index 0000000000..45e932c7f6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const response = await tables.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..9e3f542051 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md @@ -0,0 +1,13 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/create-membership.md b/docs/examples/1.8.x/server-deno/examples/teams/create-membership.md new file mode 100644 index 0000000000..d8e855f852 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.createMembership( + '<TEAM_ID>', // teamId + [], // roles + 'email@example.com', // email (optional) + '<USER_ID>', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/create.md b/docs/examples/1.8.x/server-deno/examples/teams/create.md new file mode 100644 index 0000000000..495f26e006 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/create.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.create( + '<TEAM_ID>', // teamId + '<NAME>', // name + [] // roles (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-deno/examples/teams/delete-membership.md new file mode 100644 index 0000000000..a5b03875d5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.deleteMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/delete.md b/docs/examples/1.8.x/server-deno/examples/teams/delete.md new file mode 100644 index 0000000000..556fbb5ea5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/delete.md @@ -0,0 +1,12 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.delete( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/get-membership.md b/docs/examples/1.8.x/server-deno/examples/teams/get-membership.md new file mode 100644 index 0000000000..75283bffc7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.getMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-deno/examples/teams/get-prefs.md new file mode 100644 index 0000000000..442d8b139a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.getPrefs( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/get.md b/docs/examples/1.8.x/server-deno/examples/teams/get.md new file mode 100644 index 0000000000..2e5803ca7b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/get.md @@ -0,0 +1,12 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.get( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-deno/examples/teams/list-memberships.md new file mode 100644 index 0000000000..0b7e6638e6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.listMemberships( + '<TEAM_ID>', // teamId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/list.md b/docs/examples/1.8.x/server-deno/examples/teams/list.md new file mode 100644 index 0000000000..6c08b5c80a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/list.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-deno/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..48fc9cd8be --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.updateMembershipStatus( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/update-membership.md b/docs/examples/1.8.x/server-deno/examples/teams/update-membership.md new file mode 100644 index 0000000000..be8651d724 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.updateMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + [] // roles +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/update-name.md b/docs/examples/1.8.x/server-deno/examples/teams/update-name.md new file mode 100644 index 0000000000..6e2144b897 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/update-name.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.updateName( + '<TEAM_ID>', // teamId + '<NAME>' // name +); diff --git a/docs/examples/1.8.x/server-deno/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-deno/examples/teams/update-prefs.md new file mode 100644 index 0000000000..dea8a368c4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Teams } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new Teams(client); + +const response = await teams.updatePrefs( + '<TEAM_ID>', // teamId + {} // prefs +); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-deno/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..7c24738cb5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tokens/create-file-token.md @@ -0,0 +1,14 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new Tokens(client); + +const response = await tokens.createFileToken( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '' // expire (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/delete.md b/docs/examples/1.8.x/server-deno/examples/tokens/delete.md new file mode 100644 index 0000000000..b5e3adfa35 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tokens/delete.md @@ -0,0 +1,12 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new Tokens(client); + +const response = await tokens.delete( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/get.md b/docs/examples/1.8.x/server-deno/examples/tokens/get.md new file mode 100644 index 0000000000..2bb827d870 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tokens/get.md @@ -0,0 +1,12 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new Tokens(client); + +const response = await tokens.get( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/list.md b/docs/examples/1.8.x/server-deno/examples/tokens/list.md new file mode 100644 index 0000000000..7208a53553 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tokens/list.md @@ -0,0 +1,14 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new Tokens(client); + +const response = await tokens.list( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tokens/update.md b/docs/examples/1.8.x/server-deno/examples/tokens/update.md new file mode 100644 index 0000000000..4464a0ccf8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tokens/update.md @@ -0,0 +1,13 @@ +import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new Tokens(client); + +const response = await tokens.update( + '<TOKEN_ID>', // tokenId + '' // expire (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md new file mode 100644 index 0000000000..7a6e0fb144 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-argon2user.md @@ -0,0 +1,15 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createArgon2User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..ddfb7f3b12 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createBcryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-deno/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..4c433aebdd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-j-w-t.md @@ -0,0 +1,14 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createJWT( + '<USER_ID>', // userId + '<SESSION_ID>', // sessionId (optional) + 0 // duration (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-deno/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..8cc63cedbd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-m-d5user.md @@ -0,0 +1,15 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createMD5User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..98ba71a845 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..750b299074 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createPHPassUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..e243a1d6ee --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-s-h-a-user.md @@ -0,0 +1,16 @@ +import { Client, Users, PasswordHash } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createSHAUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + PasswordHash.Sha1, // passwordVersion (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..0d6a65b8b4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createScryptModifiedUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator + '<PASSWORD_SIGNER_KEY>', // passwordSignerKey + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..87f2dbb09e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createScryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + null, // passwordCpu + null, // passwordMemory + null, // passwordParallel + null, // passwordLength + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-session.md b/docs/examples/1.8.x/server-deno/examples/users/create-session.md new file mode 100644 index 0000000000..37d6948942 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-session.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createSession( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-target.md b/docs/examples/1.8.x/server-deno/examples/users/create-target.md new file mode 100644 index 0000000000..a36072a5de --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-target.md @@ -0,0 +1,17 @@ +import { Client, Users, MessagingProviderType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + MessagingProviderType.Email, // providerType + '<IDENTIFIER>', // identifier + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create-token.md b/docs/examples/1.8.x/server-deno/examples/users/create-token.md new file mode 100644 index 0000000000..91885e15f3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create-token.md @@ -0,0 +1,14 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.createToken( + '<USER_ID>', // userId + 4, // length (optional) + 60 // expire (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/create.md b/docs/examples/1.8.x/server-deno/examples/users/create.md new file mode 100644 index 0000000000..e0eb5856d1 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/create.md @@ -0,0 +1,16 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.create( + '<USER_ID>', // userId + 'email@example.com', // email (optional) + '+12065550100', // phone (optional) + '', // password (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-identity.md b/docs/examples/1.8.x/server-deno/examples/users/delete-identity.md new file mode 100644 index 0000000000..7aea654645 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-identity.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteIdentity( + '<IDENTITY_ID>' // identityId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-deno/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..2d7595005e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +import { Client, Users, AuthenticatorType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteMfaAuthenticator( + '<USER_ID>', // userId + AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-session.md b/docs/examples/1.8.x/server-deno/examples/users/delete-session.md new file mode 100644 index 0000000000..0ce82fe50f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-session.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteSession( + '<USER_ID>', // userId + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-deno/examples/users/delete-sessions.md new file mode 100644 index 0000000000..f80300b205 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-sessions.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteSessions( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete-target.md b/docs/examples/1.8.x/server-deno/examples/users/delete-target.md new file mode 100644 index 0000000000..9080a962e6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/delete-target.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.deleteTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/delete.md b/docs/examples/1.8.x/server-deno/examples/users/delete.md new file mode 100644 index 0000000000..7ac1bf1d3a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/delete.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.delete( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..f78c0bf1b0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.getMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/get-prefs.md b/docs/examples/1.8.x/server-deno/examples/users/get-prefs.md new file mode 100644 index 0000000000..ef1be1e18b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/get-prefs.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.getPrefs( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/get-target.md b/docs/examples/1.8.x/server-deno/examples/users/get-target.md new file mode 100644 index 0000000000..301ee6e7ed --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/get-target.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.getTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/get.md b/docs/examples/1.8.x/server-deno/examples/users/get.md new file mode 100644 index 0000000000..8e41ed6350 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/get.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.get( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-identities.md b/docs/examples/1.8.x/server-deno/examples/users/list-identities.md new file mode 100644 index 0000000000..6ac439547b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list-identities.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listIdentities( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-logs.md b/docs/examples/1.8.x/server-deno/examples/users/list-logs.md new file mode 100644 index 0000000000..983ffba299 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list-logs.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listLogs( + '<USER_ID>', // userId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-memberships.md b/docs/examples/1.8.x/server-deno/examples/users/list-memberships.md new file mode 100644 index 0000000000..afdd4d4f2d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list-memberships.md @@ -0,0 +1,14 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listMemberships( + '<USER_ID>', // userId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-deno/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..34b65afac3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list-mfa-factors.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listMfaFactors( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-sessions.md b/docs/examples/1.8.x/server-deno/examples/users/list-sessions.md new file mode 100644 index 0000000000..314f277d7a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list-sessions.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listSessions( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list-targets.md b/docs/examples/1.8.x/server-deno/examples/users/list-targets.md new file mode 100644 index 0000000000..9ed2dda4ce --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list-targets.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.listTargets( + '<USER_ID>', // userId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/list.md b/docs/examples/1.8.x/server-deno/examples/users/list.md new file mode 100644 index 0000000000..488fbdc09c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/list.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-deno/examples/users/update-email-verification.md new file mode 100644 index 0000000000..3243f21c6f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-email-verification.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateEmailVerification( + '<USER_ID>', // userId + false // emailVerification +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-email.md b/docs/examples/1.8.x/server-deno/examples/users/update-email.md new file mode 100644 index 0000000000..f609cab463 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-email.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateEmail( + '<USER_ID>', // userId + 'email@example.com' // email +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-labels.md b/docs/examples/1.8.x/server-deno/examples/users/update-labels.md new file mode 100644 index 0000000000..5a23298179 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-labels.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateLabels( + '<USER_ID>', // userId + [] // labels +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-deno/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..a74577e9cc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-mfa.md b/docs/examples/1.8.x/server-deno/examples/users/update-mfa.md new file mode 100644 index 0000000000..717f8d6ab7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-mfa.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateMfa( + '<USER_ID>', // userId + false // mfa +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-name.md b/docs/examples/1.8.x/server-deno/examples/users/update-name.md new file mode 100644 index 0000000000..35fc853e3f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-name.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateName( + '<USER_ID>', // userId + '<NAME>' // name +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-password.md b/docs/examples/1.8.x/server-deno/examples/users/update-password.md new file mode 100644 index 0000000000..8366b5c4c2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-password.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updatePassword( + '<USER_ID>', // userId + '' // password +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-deno/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..088fd1eb57 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-phone-verification.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updatePhoneVerification( + '<USER_ID>', // userId + false // phoneVerification +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-phone.md b/docs/examples/1.8.x/server-deno/examples/users/update-phone.md new file mode 100644 index 0000000000..a8e47a62b8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-phone.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updatePhone( + '<USER_ID>', // userId + '+12065550100' // number +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-prefs.md b/docs/examples/1.8.x/server-deno/examples/users/update-prefs.md new file mode 100644 index 0000000000..cb8919a98f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-prefs.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updatePrefs( + '<USER_ID>', // userId + {} // prefs +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-status.md b/docs/examples/1.8.x/server-deno/examples/users/update-status.md new file mode 100644 index 0000000000..1c672a4d25 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-status.md @@ -0,0 +1,13 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateStatus( + '<USER_ID>', // userId + false // status +); diff --git a/docs/examples/1.8.x/server-deno/examples/users/update-target.md b/docs/examples/1.8.x/server-deno/examples/users/update-target.md new file mode 100644 index 0000000000..4524748c55 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/users/update-target.md @@ -0,0 +1,16 @@ +import { Client, Users } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new Users(client); + +const response = await users.updateTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + '<IDENTIFIER>', // identifier (optional) + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..fc807aa4e5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.CreateAnonymousSession(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..abf5a41317 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.CreateEmailPasswordSession( + email: "email@example.com", + password: "password" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-email-token.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-email-token.md new file mode 100644 index 0000000000..69862feed0 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Token result = await account.CreateEmailToken( + userId: "<USER_ID>", + email: "email@example.com", + phrase: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..423cbed2b3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +JWT result = await account.CreateJWT(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..21bcef6bed --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Token result = await account.CreateMagicURLToken( + userId: "<USER_ID>", + email: "email@example.com", + url: "https://example.com", // optional + phrase: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..bc54970469 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaType result = await account.CreateMfaAuthenticator( + type: AuthenticatorType.Totp +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..734133f2bd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +MfaChallenge result = await account.CreateMfaChallenge( + factor: AuthenticationFactor.Email +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..1922a45c0a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaRecoveryCodes result = await account.CreateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..5b405449b1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-o-auth2token.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +await account.CreateOAuth2Token( + provider: OAuthProvider.Amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-phone-token.md new file mode 100644 index 0000000000..0d17f5ecee --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Token result = await account.CreatePhoneToken( + userId: "<USER_ID>", + phone: "+12065550100" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..185fc46e0d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-phone-verification.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.CreatePhoneVerification(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-recovery.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-recovery.md new file mode 100644 index 0000000000..c2e3571d56 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-recovery.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.CreateRecovery( + email: "email@example.com", + url: "https://example.com" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-session.md new file mode 100644 index 0000000000..2da46ce62b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.CreateSession( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create-verification.md b/docs/examples/1.8.x/server-dotnet/examples/account/create-verification.md new file mode 100644 index 0000000000..92222ea88a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create-verification.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.CreateVerification( + url: "https://example.com" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/create.md b/docs/examples/1.8.x/server-dotnet/examples/account/create.md new file mode 100644 index 0000000000..83c1d54251 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/create.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +User result = await account.Create( + userId: "<USER_ID>", + email: "email@example.com", + password: "", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/delete-identity.md b/docs/examples/1.8.x/server-dotnet/examples/account/delete-identity.md new file mode 100644 index 0000000000..9b084800d4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/delete-identity.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteIdentity( + identityId: "<IDENTITY_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-dotnet/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..2b27cb6ad8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteMfaAuthenticator( + type: AuthenticatorType.Totp +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/delete-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/delete-session.md new file mode 100644 index 0000000000..0bca7c172a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/delete-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteSession( + sessionId: "<SESSION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-dotnet/examples/account/delete-sessions.md new file mode 100644 index 0000000000..5b0e7b5cba --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/delete-sessions.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +await account.DeleteSessions(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..cc39db191d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaRecoveryCodes result = await account.GetMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/get-prefs.md b/docs/examples/1.8.x/server-dotnet/examples/account/get-prefs.md new file mode 100644 index 0000000000..b0fce89a3f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/get-prefs.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Preferences result = await account.GetPrefs(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/get-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/get-session.md new file mode 100644 index 0000000000..9aa7abaee0 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/get-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Session result = await account.GetSession( + sessionId: "<SESSION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/get.md b/docs/examples/1.8.x/server-dotnet/examples/account/get.md new file mode 100644 index 0000000000..eecb890b30 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.Get(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/list-identities.md b/docs/examples/1.8.x/server-dotnet/examples/account/list-identities.md new file mode 100644 index 0000000000..661fab9f4e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/list-identities.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +IdentityList result = await account.ListIdentities( + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/list-logs.md b/docs/examples/1.8.x/server-dotnet/examples/account/list-logs.md new file mode 100644 index 0000000000..8e5eadf961 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/list-logs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +LogList result = await account.ListLogs( + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-dotnet/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..291534920f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/list-mfa-factors.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaFactors result = await account.ListMfaFactors(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/list-sessions.md b/docs/examples/1.8.x/server-dotnet/examples/account/list-sessions.md new file mode 100644 index 0000000000..6304383cb3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/list-sessions.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +SessionList result = await account.ListSessions(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-email.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-email.md new file mode 100644 index 0000000000..06e2a2a9df --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-email.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateEmail( + email: "email@example.com", + password: "password" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..b9405e7e2c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-m-f-a.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateMFA( + mfa: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..a8d8312e18 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.UpdateMagicURLSession( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..051653d19a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateMfaAuthenticator( + type: AuthenticatorType.Totp, + otp: "<OTP>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..d273505839 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-challenge.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Session result = await account.UpdateMfaChallenge( + challengeId: "<CHALLENGE_ID>", + otp: "<OTP>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..7daaf93213 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +MfaRecoveryCodes result = await account.UpdateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-name.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-name.md new file mode 100644 index 0000000000..6088226fc8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-name.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateName( + name: "<NAME>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-password.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-password.md new file mode 100644 index 0000000000..f24c703a9a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-password.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdatePassword( + password: "", + oldPassword: "password" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-phone-session.md new file mode 100644 index 0000000000..2f8b091999 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +Session result = await account.UpdatePhoneSession( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..a100c0f2e2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-phone-verification.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.UpdatePhoneVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-phone.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-phone.md new file mode 100644 index 0000000000..224001dd6e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-phone.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdatePhone( + phone: "+12065550100", + password: "password" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-prefs.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-prefs.md new file mode 100644 index 0000000000..0b348a9c74 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdatePrefs( + prefs: [object] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-recovery.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-recovery.md new file mode 100644 index 0000000000..188462229b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.UpdateRecovery( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-session.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-session.md new file mode 100644 index 0000000000..a98644c032 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Session result = await account.UpdateSession( + sessionId: "<SESSION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-status.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-status.md new file mode 100644 index 0000000000..d9c5b41d72 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-status.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +User result = await account.UpdateStatus(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/account/update-verification.md b/docs/examples/1.8.x/server-dotnet/examples/account/update-verification.md new file mode 100644 index 0000000000..b9dd1ded40 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/account/update-verification.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Account account = new Account(client); + +Token result = await account.UpdateVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-browser.md new file mode 100644 index 0000000000..9c7b643af1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetBrowser( + code: Browser.AvantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..a41ade1438 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetCreditCard( + code: CreditCard.AmericanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..345d856717 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetFavicon( + url: "https://example.com" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-flag.md new file mode 100644 index 0000000000..f7a3e05cee --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetFlag( + code: Flag.Afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-image.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-image.md new file mode 100644 index 0000000000..4a67e58517 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-image.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetImage( + url: "https://example.com", + width: 0, // optional + height: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-initials.md new file mode 100644 index 0000000000..55427ff622 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-initials.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetInitials( + name: "<NAME>", // optional + width: 0, // optional + height: 0, // optional + background: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..4591b7d99c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/avatars/get-q-r.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +byte[] result = await avatars.GetQR( + text: "<TEXT>", + size: 1, // optional + margin: 0, // optional + download: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..8807648521 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-boolean-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeBoolean result = await databases.CreateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md new file mode 100644 index 0000000000..75a1c5c311 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-collection.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Collection result = await databases.CreateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..7be723379e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-datetime-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeDatetime result = await databases.CreateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md new file mode 100644 index 0000000000..cb4bc62ced --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetKey("<YOUR_API_KEY>") // Your secret API key + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Databases databases = new Databases(client); + +Document result = await databases.CreateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [object], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md new file mode 100644 index 0000000000..c46715b25d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetAdmin("") // + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +DocumentList result = await databases.CreateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: new List<object>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..df00119ff9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-email-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeEmail result = await databases.CreateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..d85e8a72a9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-enum-attribute.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeEnum result = await databases.CreateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..bc03fac7ae --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-float-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeFloat result = await databases.CreateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-index.md new file mode 100644 index 0000000000..ae5583c68d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-index.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Index result = await databases.CreateIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + type: IndexType.Key, + attributes: new List<string>(), + orders: new List<string>(), // optional + lengths: new List<long>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..c8e7c13355 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-integer-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeInteger result = await databases.CreateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..f95c257089 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-ip-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeIp result = await databases.CreateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..b0f4d1194f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-relationship-attribute.md @@ -0,0 +1,22 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeRelationship result = await databases.CreateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + relatedCollectionId: "<RELATED_COLLECTION_ID>", + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: RelationMutate.Cascade // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..6cba31ff36 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-string-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeString result = await databases.CreateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..dce1ac496a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-url-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeUrl result = await databases.CreateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create.md new file mode 100644 index 0000000000..9b66c15cef --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Database result = await databases.Create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..c327458f61 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/decrement-document-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Document result = await databases.DecrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "", + value: 0, // optional + min: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..46eb44b4b8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.DeleteAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-collection.md new file mode 100644 index 0000000000..e05717dc6c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-collection.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.DeleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/delete-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-document.md new file mode 100644 index 0000000000..221b80e254 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-document.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +await databases.DeleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-documents.md new file mode 100644 index 0000000000..a9bc9c277b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-documents.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.DeleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/delete-index.md b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-index.md new file mode 100644 index 0000000000..02dcf5c66a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/delete-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.DeleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/delete.md b/docs/examples/1.8.x/server-dotnet/examples/databases/delete.md new file mode 100644 index 0000000000..a877eabc02 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +await databases.Delete( + databaseId: "<DATABASE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/get-attribute.md new file mode 100644 index 0000000000..d9e02e36b6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/get-attribute.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + + result = await databases.GetAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/get-collection.md b/docs/examples/1.8.x/server-dotnet/examples/databases/get-collection.md new file mode 100644 index 0000000000..79fe685cbc --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/get-collection.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Collection result = await databases.GetCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/get-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/get-document.md new file mode 100644 index 0000000000..d7e9b68807 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/get-document.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +Document result = await databases.GetDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/get-index.md b/docs/examples/1.8.x/server-dotnet/examples/databases/get-index.md new file mode 100644 index 0000000000..02f7b812c8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/get-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Index result = await databases.GetIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/get.md b/docs/examples/1.8.x/server-dotnet/examples/databases/get.md new file mode 100644 index 0000000000..174d74c4f0 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Database result = await databases.Get( + databaseId: "<DATABASE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..be52584aaf --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/increment-document-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Document result = await databases.IncrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "", + value: 0, // optional + max: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-dotnet/examples/databases/list-attributes.md new file mode 100644 index 0000000000..d2ac6c3afd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/list-attributes.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeList result = await databases.ListAttributes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/list-collections.md b/docs/examples/1.8.x/server-dotnet/examples/databases/list-collections.md new file mode 100644 index 0000000000..5dacb62e97 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/list-collections.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +CollectionList result = await databases.ListCollections( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/list-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/list-documents.md new file mode 100644 index 0000000000..f59e4576bd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/list-documents.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +DocumentList result = await databases.ListDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-dotnet/examples/databases/list-indexes.md new file mode 100644 index 0000000000..e6adab1f2d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/list-indexes.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +IndexList result = await databases.ListIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/list.md b/docs/examples/1.8.x/server-dotnet/examples/databases/list.md new file mode 100644 index 0000000000..d2b552b27c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +DatabaseList result = await databases.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..aa2ed498d2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-boolean-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeBoolean result = await databases.UpdateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md new file mode 100644 index 0000000000..7885ad3969 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-collection.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Collection result = await databases.UpdateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..e6b60c8753 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-datetime-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeDatetime result = await databases.UpdateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md new file mode 100644 index 0000000000..3121c15e08 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-document.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +Document result = await databases.UpdateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [object], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-documents.md new file mode 100644 index 0000000000..63ded21ac9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-documents.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +DocumentList result = await databases.UpdateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: [object], // optional + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..8d36a43780 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-email-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeEmail result = await databases.UpdateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..e3ca9fe124 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-enum-attribute.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeEnum result = await databases.UpdateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..46328d26f5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-float-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeFloat result = await databases.UpdateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..91ff1897c7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-integer-attribute.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeInteger result = await databases.UpdateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..dfcb5d214a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-ip-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeIp result = await databases.UpdateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..5b6dd71467 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-relationship-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeRelationship result = await databases.UpdateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + onDelete: RelationMutate.Cascade, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..918fdc0e3f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-string-attribute.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeString result = await databases.UpdateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..8766a3f2f7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update-url-attribute.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +AttributeUrl result = await databases.UpdateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/update.md b/docs/examples/1.8.x/server-dotnet/examples/databases/update.md new file mode 100644 index 0000000000..d4dd28aa2b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/update.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +Database result = await databases.Update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md new file mode 100644 index 0000000000..c809a497fe --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetKey("<YOUR_API_KEY>") // Your secret API key + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Databases databases = new Databases(client); + +Document result = await databases.UpsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..48c0aa7044 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetAdmin("") // + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +DocumentList result = await databases.UpsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-deployment.md new file mode 100644 index 0000000000..26c6ff4c42 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-deployment.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateDeployment( + functionId: "<FUNCTION_ID>", + code: InputFile.FromPath("./path-to-files/image.jpg"), + activate: false, + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..057fe12b10 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateDuplicateDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + buildId: "<BUILD_ID>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md new file mode 100644 index 0000000000..c8fd5595e9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +Execution result = await functions.CreateExecution( + functionId: "<FUNCTION_ID>", + body: "<BODY>", // optional + async: false, // optional + path: "<PATH>", // optional + method: ExecutionMethod.GET, // optional + headers: [object], // optional + scheduledAt: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..019a9bf256 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-template-deployment.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateTemplateDeployment( + functionId: "<FUNCTION_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-variable.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-variable.md new file mode 100644 index 0000000000..6d1f85b12e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-variable.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Variable result = await functions.CreateVariable( + functionId: "<FUNCTION_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..9651365912 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-vcs-deployment.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.CreateVcsDeployment( + functionId: "<FUNCTION_ID>", + type: VCSDeploymentType.Branch, + reference: "<REFERENCE>", + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create.md new file mode 100644 index 0000000000..6e705228f1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create.md @@ -0,0 +1,32 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Function result = await functions.Create( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .Node145, + execute: ["any"], // optional + events: new List<string>(), // optional + schedule: "", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: new List<string>(), // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..33c537ad0d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/delete-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +await functions.DeleteDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-dotnet/examples/functions/delete-execution.md new file mode 100644 index 0000000000..5d5ab8dee2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/delete-execution.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +await functions.DeleteExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-dotnet/examples/functions/delete-variable.md new file mode 100644 index 0000000000..263c3f6420 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/delete-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +await functions.DeleteVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/delete.md b/docs/examples/1.8.x/server-dotnet/examples/functions/delete.md new file mode 100644 index 0000000000..ed780ac15a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +await functions.Delete( + functionId: "<FUNCTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..bfc3209635 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment-download.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +byte[] result = await functions.GetDeploymentDownload( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: DeploymentDownloadType.Source // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment.md new file mode 100644 index 0000000000..5fe31a2f6e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/get-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.GetDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/get-execution.md b/docs/examples/1.8.x/server-dotnet/examples/functions/get-execution.md new file mode 100644 index 0000000000..8581b968af --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/get-execution.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +Execution result = await functions.GetExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/get-variable.md b/docs/examples/1.8.x/server-dotnet/examples/functions/get-variable.md new file mode 100644 index 0000000000..57ba993389 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/get-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Variable result = await functions.GetVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/get.md b/docs/examples/1.8.x/server-dotnet/examples/functions/get.md new file mode 100644 index 0000000000..baba5d0b4a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Function result = await functions.Get( + functionId: "<FUNCTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-dotnet/examples/functions/list-deployments.md new file mode 100644 index 0000000000..093befcf61 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/list-deployments.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +DeploymentList result = await functions.ListDeployments( + functionId: "<FUNCTION_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/list-executions.md b/docs/examples/1.8.x/server-dotnet/examples/functions/list-executions.md new file mode 100644 index 0000000000..6ec320eb7a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/list-executions.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +ExecutionList result = await functions.ListExecutions( + functionId: "<FUNCTION_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-dotnet/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..c238671670 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/list-runtimes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +RuntimeList result = await functions.ListRuntimes(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-dotnet/examples/functions/list-specifications.md new file mode 100644 index 0000000000..2d868d1343 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/list-specifications.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +SpecificationList result = await functions.ListSpecifications(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/list-variables.md b/docs/examples/1.8.x/server-dotnet/examples/functions/list-variables.md new file mode 100644 index 0000000000..4c85da8995 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/list-variables.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +VariableList result = await functions.ListVariables( + functionId: "<FUNCTION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/list.md b/docs/examples/1.8.x/server-dotnet/examples/functions/list.md new file mode 100644 index 0000000000..750642d498 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +FunctionList result = await functions.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-dotnet/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..4dd70b1932 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/update-deployment-status.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Deployment result = await functions.UpdateDeploymentStatus( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..7bdbd91b5c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/update-function-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Function result = await functions.UpdateFunctionDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/update-variable.md b/docs/examples/1.8.x/server-dotnet/examples/functions/update-variable.md new file mode 100644 index 0000000000..2b776d69ea --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/update-variable.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Variable result = await functions.UpdateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", // optional + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/update.md b/docs/examples/1.8.x/server-dotnet/examples/functions/update.md new file mode 100644 index 0000000000..7160795f77 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/update.md @@ -0,0 +1,32 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +Function result = await functions.Update( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .Node145, // optional + execute: ["any"], // optional + events: new List<string>(), // optional + schedule: "", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: new List<string>(), // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/graphql/mutation.md b/docs/examples/1.8.x/server-dotnet/examples/graphql/mutation.md new file mode 100644 index 0000000000..b153e34d51 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/graphql/mutation.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Graphql graphql = new Graphql(client); + +Any result = await graphql.Mutation( + query: [object] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/graphql/query.md b/docs/examples/1.8.x/server-dotnet/examples/graphql/query.md new file mode 100644 index 0000000000..61345d7665 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/graphql/query.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Graphql graphql = new Graphql(client); + +Any result = await graphql.Query( + query: [object] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-antivirus.md new file mode 100644 index 0000000000..115c0e5c7b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-antivirus.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthAntivirus result = await health.GetAntivirus(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-cache.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-cache.md new file mode 100644 index 0000000000..0c5ec37c2b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-cache.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetCache(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-certificate.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-certificate.md new file mode 100644 index 0000000000..457b70128a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-certificate.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthCertificate result = await health.GetCertificate( + domain: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-d-b.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-d-b.md new file mode 100644 index 0000000000..7ae8b14854 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-d-b.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetDB(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..4d43479831 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-failed-jobs.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetFailedJobs( + name: .V1Database, + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..4ffdd7e531 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-pub-sub.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetPubSub(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..5d522f03f2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-builds.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueBuilds( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..c7e186e5ee --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueCertificates( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..1db6fb518c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-databases.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueDatabases( + name: "<NAME>", // optional + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..487cee3411 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-deletes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueDeletes( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..949e3766a7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueFunctions( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..58ad1ac2fe --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-logs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueLogs( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..2c1008c7b1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-mails.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueMails( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..4116f19b1f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-messaging.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueMessaging( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..5a0c7a0337 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-migrations.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueMigrations( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..4002cca158 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-stats-resources.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueStatsResources( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..546e9a07de --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-usage.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueUsage( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..1fc8d4d63c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthQueue result = await health.GetQueueWebhooks( + threshold: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-storage-local.md new file mode 100644 index 0000000000..3e8539794a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-storage-local.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetStorageLocal(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-storage.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-storage.md new file mode 100644 index 0000000000..42d4aba45b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-storage.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.GetStorage(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get-time.md b/docs/examples/1.8.x/server-dotnet/examples/health/get-time.md new file mode 100644 index 0000000000..959060113b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get-time.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthTime result = await health.GetTime(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/health/get.md b/docs/examples/1.8.x/server-dotnet/examples/health/get.md new file mode 100644 index 0000000000..a926fe71e5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/health/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +HealthStatus result = await health.Get(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/get.md b/docs/examples/1.8.x/server-dotnet/examples/locale/get.md new file mode 100644 index 0000000000..48b9701801 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/get.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +Locale result = await locale.Get(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-codes.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-codes.md new file mode 100644 index 0000000000..0df7696da5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-codes.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +LocaleCodeList result = await locale.ListCodes(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-continents.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-continents.md new file mode 100644 index 0000000000..7cf74caec3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-continents.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +ContinentList result = await locale.ListContinents(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..106e140ee4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-e-u.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +CountryList result = await locale.ListCountriesEU(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..38fbe24ff3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +PhoneList result = await locale.ListCountriesPhones(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries.md new file mode 100644 index 0000000000..5e5d9f407f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-countries.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +CountryList result = await locale.ListCountries(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-currencies.md new file mode 100644 index 0000000000..e51a138813 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-currencies.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +CurrencyList result = await locale.ListCurrencies(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/locale/list-languages.md b/docs/examples/1.8.x/server-dotnet/examples/locale/list-languages.md new file mode 100644 index 0000000000..62aa15d1d9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/locale/list-languages.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +LanguageList result = await locale.ListLanguages(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..9cc37a17e0 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-apns-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-email.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-email.md new file mode 100644 index 0000000000..51c6db4ddb --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-email.md @@ -0,0 +1,25 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.CreateEmail( + messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + cc: new List<string>(), // optional + bcc: new List<string>(), // optional + attachments: new List<string>(), // optional + draft: false, // optional + html: false, // optional + scheduledAt: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..15fdace2d3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-fcm-provider.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + serviceAccountJSON: [object], // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..1bacbab8d5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,23 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + domain: "<DOMAIN>", // optional + isEuRegion: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..a0b7372709 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-msg91provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-push.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-push.md new file mode 100644 index 0000000000..1d2dbec1f2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-push.md @@ -0,0 +1,33 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.CreatePush( + messageId: "<MESSAGE_ID>", + title: "<TITLE>", // optional + body: "<BODY>", // optional + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + data: [object], // optional + action: "<ACTION>", // optional + image: "[ID1:ID2]", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 0, // optional + draft: false, // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..8464c47ae1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-sms.md new file mode 100644 index 0000000000..06e9e69e65 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-sms.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.CreateSms( + messageId: "<MESSAGE_ID>", + content: "<CONTENT>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + draft: false, // optional + scheduledAt: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..16b091f98e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-smtp-provider.md @@ -0,0 +1,28 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, // optional + username: "<USERNAME>", // optional + password: "<PASSWORD>", // optional + encryption: SmtpEncryption.None, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..8b37d31e68 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-subscriber.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +Subscriber result = await messaging.CreateSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>", + targetId: "<TARGET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..37e1bd1df9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-telesign-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..7dc0a6b26f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-topic.md new file mode 100644 index 0000000000..51eab0fd11 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-topic.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Topic result = await messaging.CreateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..0deba742ff --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-twilio-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..8f4855aab4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/create-vonage-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.CreateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..a1ca2a1450 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-provider.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +await messaging.DeleteProvider( + providerId: "<PROVIDER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..9424535c9f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-subscriber.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +await messaging.DeleteSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..0b4819a219 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete-topic.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +await messaging.DeleteTopic( + topicId: "<TOPIC_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/delete.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete.md new file mode 100644 index 0000000000..ff041e853a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +await messaging.Delete( + messageId: "<MESSAGE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/get-message.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-message.md new file mode 100644 index 0000000000..0dad3668f8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-message.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.GetMessage( + messageId: "<MESSAGE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-provider.md new file mode 100644 index 0000000000..fac5a07da5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-provider.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.GetProvider( + providerId: "<PROVIDER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..516aa682c8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-subscriber.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Subscriber result = await messaging.GetSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-topic.md new file mode 100644 index 0000000000..3a662b3111 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/get-topic.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Topic result = await messaging.GetTopic( + topicId: "<TOPIC_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..49d3513127 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-message-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +LogList result = await messaging.ListMessageLogs( + messageId: "<MESSAGE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-messages.md new file mode 100644 index 0000000000..4c17128e72 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-messages.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +MessageList result = await messaging.ListMessages( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..928c14845a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-provider-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +LogList result = await messaging.ListProviderLogs( + providerId: "<PROVIDER_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-providers.md new file mode 100644 index 0000000000..6cf5757fb6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-providers.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +ProviderList result = await messaging.ListProviders( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..815f1325d4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +LogList result = await messaging.ListSubscriberLogs( + subscriberId: "<SUBSCRIBER_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..b522be327c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-subscribers.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +SubscriberList result = await messaging.ListSubscribers( + topicId: "<TOPIC_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-targets.md new file mode 100644 index 0000000000..a8e8de567e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-targets.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +TargetList result = await messaging.ListTargets( + messageId: "<MESSAGE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..093db0ff2c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-topic-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +LogList result = await messaging.ListTopicLogs( + topicId: "<TOPIC_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-topics.md new file mode 100644 index 0000000000..cc88afab69 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/list-topics.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +TopicList result = await messaging.ListTopics( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..f06e134d02 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-apns-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-email.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-email.md new file mode 100644 index 0000000000..90d1555d8f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-email.md @@ -0,0 +1,25 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.UpdateEmail( + messageId: "<MESSAGE_ID>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + subject: "<SUBJECT>", // optional + content: "<CONTENT>", // optional + draft: false, // optional + html: false, // optional + cc: new List<string>(), // optional + bcc: new List<string>(), // optional + scheduledAt: "", // optional + attachments: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..0006fedf54 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-fcm-provider.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + serviceAccountJSON: [object] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..512cb0586b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,23 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + apiKey: "<API_KEY>", // optional + domain: "<DOMAIN>", // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..51355c5836 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-msg91provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-push.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-push.md new file mode 100644 index 0000000000..37da215e82 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-push.md @@ -0,0 +1,33 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.UpdatePush( + messageId: "<MESSAGE_ID>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + title: "<TITLE>", // optional + body: "<BODY>", // optional + data: [object], // optional + action: "<ACTION>", // optional + image: "[ID1:ID2]", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 0, // optional + draft: false, // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..d718a7158b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-sms.md new file mode 100644 index 0000000000..475d29923d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-sms.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Message result = await messaging.UpdateSms( + messageId: "<MESSAGE_ID>", + topics: new List<string>(), // optional + users: new List<string>(), // optional + targets: new List<string>(), // optional + content: "<CONTENT>", // optional + draft: false, // optional + scheduledAt: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..4e7ab6dfeb --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-smtp-provider.md @@ -0,0 +1,28 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + host: "<HOST>", // optional + port: 1, // optional + username: "<USERNAME>", // optional + password: "<PASSWORD>", // optional + encryption: SmtpEncryption.None, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>", // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..d4f1c5e015 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-telesign-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..3529f9b99c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-topic.md new file mode 100644 index 0000000000..11943f70e2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-topic.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Topic result = await messaging.UpdateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", // optional + subscribe: ["any"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..66fc7e27a3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-twilio-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + from: "<FROM>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..03addd3de6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/messaging/update-vonage-provider.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +Provider result = await messaging.UpdateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + from: "<FROM>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/create-deployment.md new file mode 100644 index 0000000000..1bcb5d5bac --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/create-deployment.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateDeployment( + siteId: "<SITE_ID>", + code: InputFile.FromPath("./path-to-files/image.jpg"), + activate: false, + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..1e45aca8ef --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateDuplicateDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..57f9a83d9c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/create-template-deployment.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateTemplateDeployment( + siteId: "<SITE_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/create-variable.md b/docs/examples/1.8.x/server-dotnet/examples/sites/create-variable.md new file mode 100644 index 0000000000..09feb0316e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/create-variable.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Variable result = await sites.CreateVariable( + siteId: "<SITE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..4d3e685176 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/create-vcs-deployment.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.CreateVcsDeployment( + siteId: "<SITE_ID>", + type: VCSDeploymentType.Branch, + reference: "<REFERENCE>", + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/create.md b/docs/examples/1.8.x/server-dotnet/examples/sites/create.md new file mode 100644 index 0000000000..025adca41d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/create.md @@ -0,0 +1,32 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Site result = await sites.Create( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .Analog, + buildRuntime: .Node145, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + adapter: .Static, // optional + installationId: "<INSTALLATION_ID>", // optional + fallbackFile: "<FALLBACK_FILE>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..f74be24acf --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/delete-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +await sites.DeleteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/delete-log.md b/docs/examples/1.8.x/server-dotnet/examples/sites/delete-log.md new file mode 100644 index 0000000000..83d1aa12ca --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/delete-log.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +await sites.DeleteLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-dotnet/examples/sites/delete-variable.md new file mode 100644 index 0000000000..9751512718 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/delete-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +await sites.DeleteVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/delete.md b/docs/examples/1.8.x/server-dotnet/examples/sites/delete.md new file mode 100644 index 0000000000..173c486499 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +await sites.Delete( + siteId: "<SITE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..27c9647629 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment-download.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +byte[] result = await sites.GetDeploymentDownload( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: DeploymentDownloadType.Source // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment.md new file mode 100644 index 0000000000..138c97ba42 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/get-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.GetDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/get-log.md b/docs/examples/1.8.x/server-dotnet/examples/sites/get-log.md new file mode 100644 index 0000000000..d90b6c8477 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/get-log.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Execution result = await sites.GetLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/get-variable.md b/docs/examples/1.8.x/server-dotnet/examples/sites/get-variable.md new file mode 100644 index 0000000000..01f57f3bf2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/get-variable.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Variable result = await sites.GetVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/get.md b/docs/examples/1.8.x/server-dotnet/examples/sites/get.md new file mode 100644 index 0000000000..87a91ae8e8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Site result = await sites.Get( + siteId: "<SITE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-dotnet/examples/sites/list-deployments.md new file mode 100644 index 0000000000..ac1cae9127 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/list-deployments.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +DeploymentList result = await sites.ListDeployments( + siteId: "<SITE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-dotnet/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..9220b2a7da --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/list-frameworks.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +FrameworkList result = await sites.ListFrameworks(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/list-logs.md b/docs/examples/1.8.x/server-dotnet/examples/sites/list-logs.md new file mode 100644 index 0000000000..692bd707b2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/list-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +ExecutionList result = await sites.ListLogs( + siteId: "<SITE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-dotnet/examples/sites/list-specifications.md new file mode 100644 index 0000000000..edf82da81b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/list-specifications.md @@ -0,0 +1,12 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +SpecificationList result = await sites.ListSpecifications(); diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/list-variables.md b/docs/examples/1.8.x/server-dotnet/examples/sites/list-variables.md new file mode 100644 index 0000000000..6eb0ff7093 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/list-variables.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +VariableList result = await sites.ListVariables( + siteId: "<SITE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/list.md b/docs/examples/1.8.x/server-dotnet/examples/sites/list.md new file mode 100644 index 0000000000..649ee50331 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +SiteList result = await sites.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-dotnet/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..c7415e7a0b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/update-deployment-status.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Deployment result = await sites.UpdateDeploymentStatus( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-dotnet/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..8706ff594a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/update-site-deployment.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Site result = await sites.UpdateSiteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/update-variable.md b/docs/examples/1.8.x/server-dotnet/examples/sites/update-variable.md new file mode 100644 index 0000000000..99718cd6cd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/update-variable.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Variable result = await sites.UpdateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", // optional + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/sites/update.md b/docs/examples/1.8.x/server-dotnet/examples/sites/update.md new file mode 100644 index 0000000000..c25e3f6df9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/sites/update.md @@ -0,0 +1,32 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +Site result = await sites.Update( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .Analog, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + buildRuntime: .Node145, // optional + adapter: .Static, // optional + fallbackFile: "<FALLBACK_FILE>", // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md new file mode 100644 index 0000000000..0cc317d9a6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/create-bucket.md @@ -0,0 +1,24 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +Bucket result = await storage.CreateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: new List<string>(), // optional + compression: .None, // optional + encryption: false, // optional + antivirus: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md b/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md new file mode 100644 index 0000000000..a4cedb8214 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/create-file.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +File result = await storage.CreateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + file: InputFile.FromPath("./path-to-files/image.jpg"), + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-dotnet/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..22aa2acf19 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +await storage.DeleteBucket( + bucketId: "<BUCKET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/delete-file.md b/docs/examples/1.8.x/server-dotnet/examples/storage/delete-file.md new file mode 100644 index 0000000000..a8cc310aa5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/delete-file.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +await storage.DeleteFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-dotnet/examples/storage/get-bucket.md new file mode 100644 index 0000000000..a6f74ebdae --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/get-bucket.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +Bucket result = await storage.GetBucket( + bucketId: "<BUCKET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-download.md new file mode 100644 index 0000000000..514fda9e9c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-download.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +byte[] result = await storage.GetFileDownload( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..c9ec508b4a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-preview.md @@ -0,0 +1,28 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +byte[] result = await storage.GetFilePreview( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + width: 0, // optional + height: 0, // optional + gravity: ImageGravity.Center, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: "", // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: "", // optional + output: ImageFormat.Jpg, // optional + token: "<TOKEN>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-view.md new file mode 100644 index 0000000000..1a27dc153c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file-view.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +byte[] result = await storage.GetFileView( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/get-file.md b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file.md new file mode 100644 index 0000000000..e4c05c1e6b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/get-file.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +File result = await storage.GetFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-dotnet/examples/storage/list-buckets.md new file mode 100644 index 0000000000..8e397729e6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/list-buckets.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +BucketList result = await storage.ListBuckets( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/list-files.md b/docs/examples/1.8.x/server-dotnet/examples/storage/list-files.md new file mode 100644 index 0000000000..2751da5244 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/list-files.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +FileList result = await storage.ListFiles( + bucketId: "<BUCKET_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md new file mode 100644 index 0000000000..2a439ba2af --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/update-bucket.md @@ -0,0 +1,24 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +Bucket result = await storage.UpdateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: new List<string>(), // optional + compression: .None, // optional + encryption: false, // optional + antivirus: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md b/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md new file mode 100644 index 0000000000..3f6ea608d7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/storage/update-file.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +File result = await storage.UpdateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + name: "<NAME>", // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..1492487721 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnBoolean result = await tables.CreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..6a1e07b907 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnDatetime result = await tables.CreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md new file mode 100644 index 0000000000..a4740484f5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnEmail result = await tables.CreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..9529ad1331 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnEnum result = await tables.CreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md new file mode 100644 index 0000000000..f8146ce272 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnFloat result = await tables.CreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md new file mode 100644 index 0000000000..e9480e1d29 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIndex result = await tables.CreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: .Key, + columns: new List<string>(), + orders: new List<string>(), // optional + lengths: new List<long>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..6090426792 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnInteger result = await tables.CreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..b5e5067e6f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIp result = await tables.CreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..54eb396748 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md @@ -0,0 +1,22 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnRelationship result = await tables.CreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: .OneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: .Cascade // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md new file mode 100644 index 0000000000..642bfe457c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetKey("<YOUR_API_KEY>") // Your secret API key + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +Row result = await tables.CreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md new file mode 100644 index 0000000000..1d44dc51ed --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetAdmin("") // + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +RowList result = await tables.CreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: new List<object>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md new file mode 100644 index 0000000000..e623ac0789 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnString result = await tables.CreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md new file mode 100644 index 0000000000..7a0fbd0a83 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnUrl result = await tables.CreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create.md new file mode 100644 index 0000000000..694f4101a7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Table result = await tables.Create( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..220fb2b18a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Row result = await tables.DecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + min: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md new file mode 100644 index 0000000000..ca8987eec9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +await tables.DeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md new file mode 100644 index 0000000000..ba7a024167 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +await tables.DeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md new file mode 100644 index 0000000000..95bae6ad6b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +await tables.DeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md new file mode 100644 index 0000000000..46a6e0ba94 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +await tables.DeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md new file mode 100644 index 0000000000..bcff3ea05a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +await tables.Delete( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md new file mode 100644 index 0000000000..71ebb81aef --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + + result = await tables.GetColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md new file mode 100644 index 0000000000..f5b886e3e9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIndex result = await tables.GetIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md new file mode 100644 index 0000000000..474b3342c9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +Row result = await tables.GetRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get.md new file mode 100644 index 0000000000..1e86d228a6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/get.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Table result = await tables.Get( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..e8ccd8ca78 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Row result = await tables.IncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + max: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md new file mode 100644 index 0000000000..fe8c739cf9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnList result = await tables.ListColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md new file mode 100644 index 0000000000..907a21048f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIndexList result = await tables.ListIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md new file mode 100644 index 0000000000..474c597a1c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +RowList result = await tables.ListRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list.md new file mode 100644 index 0000000000..2871a927c4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/list.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +TableList result = await tables.List( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..5c610fbe7a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnBoolean result = await tables.UpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..754d0f1ae6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnDatetime result = await tables.UpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md new file mode 100644 index 0000000000..6000c54e8f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnEmail result = await tables.UpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..2eaa1a51a1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnEnum result = await tables.UpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md new file mode 100644 index 0000000000..7d18d8e624 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnFloat result = await tables.UpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..0b3b85652c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnInteger result = await tables.UpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..ccdd0d5235 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIp result = await tables.UpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..3437bb2fa9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnRelationship result = await tables.UpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: .Cascade, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md new file mode 100644 index 0000000000..d049ccf805 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +Row result = await tables.UpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md new file mode 100644 index 0000000000..9d2c51c4b3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +RowList result = await tables.UpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [object], // optional + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md new file mode 100644 index 0000000000..da280e7d8c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnString result = await tables.UpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md new file mode 100644 index 0000000000..1ce961da2b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnUrl result = await tables.UpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update.md new file mode 100644 index 0000000000..584c61c6bb --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Table result = await tables.Update( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md new file mode 100644 index 0000000000..a73c4e2402 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetKey("<YOUR_API_KEY>") // Your secret API key + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +Row result = await tables.UpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..07e5e927c6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetAdmin("") // + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +RowList result = await tables.UpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/create-membership.md b/docs/examples/1.8.x/server-dotnet/examples/teams/create-membership.md new file mode 100644 index 0000000000..f3f5682cbf --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.CreateMembership( + teamId: "<TEAM_ID>", + roles: new List<string>(), + email: "email@example.com", // optional + userId: "<USER_ID>", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/create.md b/docs/examples/1.8.x/server-dotnet/examples/teams/create.md new file mode 100644 index 0000000000..07b102d70a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/create.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Team result = await teams.Create( + teamId: "<TEAM_ID>", + name: "<NAME>", + roles: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-dotnet/examples/teams/delete-membership.md new file mode 100644 index 0000000000..01a58aaa11 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +await teams.DeleteMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/delete.md b/docs/examples/1.8.x/server-dotnet/examples/teams/delete.md new file mode 100644 index 0000000000..ee525f23c9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +await teams.Delete( + teamId: "<TEAM_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/get-membership.md b/docs/examples/1.8.x/server-dotnet/examples/teams/get-membership.md new file mode 100644 index 0000000000..cb9109df14 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/get-membership.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.GetMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-dotnet/examples/teams/get-prefs.md new file mode 100644 index 0000000000..f95d73af77 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/get-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Preferences result = await teams.GetPrefs( + teamId: "<TEAM_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/get.md b/docs/examples/1.8.x/server-dotnet/examples/teams/get.md new file mode 100644 index 0000000000..339b33f657 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Team result = await teams.Get( + teamId: "<TEAM_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-dotnet/examples/teams/list-memberships.md new file mode 100644 index 0000000000..6072158100 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/list-memberships.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +MembershipList result = await teams.ListMemberships( + teamId: "<TEAM_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/list.md b/docs/examples/1.8.x/server-dotnet/examples/teams/list.md new file mode 100644 index 0000000000..b1ca72b82e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +TeamList result = await teams.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-dotnet/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..87609aa32e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/update-membership-status.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.UpdateMembershipStatus( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + userId: "<USER_ID>", + secret: "<SECRET>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/update-membership.md b/docs/examples/1.8.x/server-dotnet/examples/teams/update-membership.md new file mode 100644 index 0000000000..3583b4d0a9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/update-membership.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Membership result = await teams.UpdateMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + roles: new List<string>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/update-name.md b/docs/examples/1.8.x/server-dotnet/examples/teams/update-name.md new file mode 100644 index 0000000000..9a3fb1316a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/update-name.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Team result = await teams.UpdateName( + teamId: "<TEAM_ID>", + name: "<NAME>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-dotnet/examples/teams/update-prefs.md new file mode 100644 index 0000000000..55ff96e9e8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/teams/update-prefs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +Preferences result = await teams.UpdatePrefs( + teamId: "<TEAM_ID>", + prefs: [object] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-dotnet/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..70f4ed3900 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tokens/create-file-token.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +ResourceToken result = await tokens.CreateFileToken( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + expire: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tokens/delete.md b/docs/examples/1.8.x/server-dotnet/examples/tokens/delete.md new file mode 100644 index 0000000000..e88147c1c9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tokens/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +await tokens.Delete( + tokenId: "<TOKEN_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tokens/get.md b/docs/examples/1.8.x/server-dotnet/examples/tokens/get.md new file mode 100644 index 0000000000..da9b431017 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tokens/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +ResourceToken result = await tokens.Get( + tokenId: "<TOKEN_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tokens/list.md b/docs/examples/1.8.x/server-dotnet/examples/tokens/list.md new file mode 100644 index 0000000000..68579f237b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tokens/list.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +ResourceTokenList result = await tokens.List( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tokens/update.md b/docs/examples/1.8.x/server-dotnet/examples/tokens/update.md new file mode 100644 index 0000000000..b7604182ab --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tokens/update.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +ResourceToken result = await tokens.Update( + tokenId: "<TOKEN_ID>", + expire: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-argon2user.md new file mode 100644 index 0000000000..db6dd6486a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-argon2user.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateArgon2User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..bf8bf3dedd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-bcrypt-user.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateBcryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..a7c57ad642 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-j-w-t.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +JWT result = await users.CreateJWT( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>", // optional + duration: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..7b7d0e7760 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-m-d5user.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateMD5User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..9b43dc02af --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MfaRecoveryCodes result = await users.CreateMfaRecoveryCodes( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..9f5521ef2f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-p-h-pass-user.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreatePHPassUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..0821bf46e9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-s-h-a-user.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateSHAUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordVersion: PasswordHash.Sha1, // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..3af99e88c2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateScryptModifiedUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordSaltSeparator: "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey: "<PASSWORD_SIGNER_KEY>", + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..79085f7206 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-scrypt-user.md @@ -0,0 +1,22 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.CreateScryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-session.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-session.md new file mode 100644 index 0000000000..a021c2551f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-session.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Session result = await users.CreateSession( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-target.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-target.md new file mode 100644 index 0000000000..44ba48ac01 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-target.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Target result = await users.CreateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + providerType: MessagingProviderType.Email, + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create-token.md b/docs/examples/1.8.x/server-dotnet/examples/users/create-token.md new file mode 100644 index 0000000000..0e9cf43fd7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create-token.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Token result = await users.CreateToken( + userId: "<USER_ID>", + length: 4, // optional + expire: 60 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/create.md b/docs/examples/1.8.x/server-dotnet/examples/users/create.md new file mode 100644 index 0000000000..3cf1d3af29 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/create.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.Create( + userId: "<USER_ID>", + email: "email@example.com", // optional + phone: "+12065550100", // optional + password: "", // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/delete-identity.md b/docs/examples/1.8.x/server-dotnet/examples/users/delete-identity.md new file mode 100644 index 0000000000..d2bac6b797 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/delete-identity.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteIdentity( + identityId: "<IDENTITY_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-dotnet/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..bb33dbf9e4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteMfaAuthenticator( + userId: "<USER_ID>", + type: AuthenticatorType.Totp +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/delete-session.md b/docs/examples/1.8.x/server-dotnet/examples/users/delete-session.md new file mode 100644 index 0000000000..d9d36d20b4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/delete-session.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteSession( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-dotnet/examples/users/delete-sessions.md new file mode 100644 index 0000000000..7011e426bb --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteSessions( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/delete-target.md b/docs/examples/1.8.x/server-dotnet/examples/users/delete-target.md new file mode 100644 index 0000000000..ad900afa5a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/delete-target.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.DeleteTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/delete.md b/docs/examples/1.8.x/server-dotnet/examples/users/delete.md new file mode 100644 index 0000000000..00ed23cf5f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/delete.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +await users.Delete( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..213c3473a8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MfaRecoveryCodes result = await users.GetMfaRecoveryCodes( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/get-prefs.md b/docs/examples/1.8.x/server-dotnet/examples/users/get-prefs.md new file mode 100644 index 0000000000..36888651d9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Preferences result = await users.GetPrefs( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/get-target.md b/docs/examples/1.8.x/server-dotnet/examples/users/get-target.md new file mode 100644 index 0000000000..2bbf4d614c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/get-target.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Target result = await users.GetTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/get.md b/docs/examples/1.8.x/server-dotnet/examples/users/get.md new file mode 100644 index 0000000000..25971baddc --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/get.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.Get( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list-identities.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-identities.md new file mode 100644 index 0000000000..996edfba71 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list-identities.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +IdentityList result = await users.ListIdentities( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list-logs.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-logs.md new file mode 100644 index 0000000000..822d16fe64 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list-logs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +LogList result = await users.ListLogs( + userId: "<USER_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list-memberships.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-memberships.md new file mode 100644 index 0000000000..4296cd2dcd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list-memberships.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MembershipList result = await users.ListMemberships( + userId: "<USER_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..54f68ae516 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list-mfa-factors.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MfaFactors result = await users.ListMfaFactors( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list-sessions.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-sessions.md new file mode 100644 index 0000000000..97f92f3b07 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list-sessions.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +SessionList result = await users.ListSessions( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list-targets.md b/docs/examples/1.8.x/server-dotnet/examples/users/list-targets.md new file mode 100644 index 0000000000..aa59ce2983 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list-targets.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +TargetList result = await users.ListTargets( + userId: "<USER_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/list.md b/docs/examples/1.8.x/server-dotnet/examples/users/list.md new file mode 100644 index 0000000000..aae7ae27b3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/list.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +UserList result = await users.List( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-email-verification.md new file mode 100644 index 0000000000..8add2d4d6b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-email-verification.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateEmailVerification( + userId: "<USER_ID>", + emailVerification: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-email.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-email.md new file mode 100644 index 0000000000..d0d737cb80 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-email.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateEmail( + userId: "<USER_ID>", + email: "email@example.com" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-labels.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-labels.md new file mode 100644 index 0000000000..6637ad0438 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-labels.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateLabels( + userId: "<USER_ID>", + labels: new List<string>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..35be70777a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +MfaRecoveryCodes result = await users.UpdateMfaRecoveryCodes( + userId: "<USER_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa.md new file mode 100644 index 0000000000..d009df1759 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-mfa.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateMfa( + userId: "<USER_ID>", + mfa: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-name.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-name.md new file mode 100644 index 0000000000..ffa90f9657 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-name.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateName( + userId: "<USER_ID>", + name: "<NAME>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-password.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-password.md new file mode 100644 index 0000000000..6dc30d5bcf --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-password.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdatePassword( + userId: "<USER_ID>", + password: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..ba5ca253ee --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-phone-verification.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdatePhoneVerification( + userId: "<USER_ID>", + phoneVerification: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-phone.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-phone.md new file mode 100644 index 0000000000..e633740e94 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-phone.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdatePhone( + userId: "<USER_ID>", + number: "+12065550100" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-prefs.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-prefs.md new file mode 100644 index 0000000000..421a4c2314 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-prefs.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Preferences result = await users.UpdatePrefs( + userId: "<USER_ID>", + prefs: [object] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-status.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-status.md new file mode 100644 index 0000000000..3037d8dd0c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-status.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +User result = await users.UpdateStatus( + userId: "<USER_ID>", + status: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/users/update-target.md b/docs/examples/1.8.x/server-dotnet/examples/users/update-target.md new file mode 100644 index 0000000000..9863af19d8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/users/update-target.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +Target result = await users.UpdateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + identifier: "<IDENTIFIER>", // optional + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-go/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-go/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..ff8aea9751 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-anonymous-session.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateAnonymousSession( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-go/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..18d8dbc184 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-email-password-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateEmailPasswordSession( + "email@example.com", + "password", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-email-token.md b/docs/examples/1.8.x/server-go/examples/account/create-email-token.md new file mode 100644 index 0000000000..c057af5b9d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-email-token.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateEmailToken( + "<USER_ID>", + "email@example.com", + account.WithCreateEmailTokenPhrase(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-go/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..665f365e20 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-j-w-t.md @@ -0,0 +1,24 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateJWT( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-go/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..cad88c183d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateMagicURLToken( + "<USER_ID>", + "email@example.com", + account.WithCreateMagicURLTokenUrl("https://example.com"), + account.WithCreateMagicURLTokenPhrase(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-go/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..336a91d944 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-mfa-authenticator.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.CreateMfaAuthenticator( + "totp", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-go/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..4e17eb5ad9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-mfa-challenge.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateMfaChallenge( + "email", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..714d6106a0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.CreateMfaRecoveryCodes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-go/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..56a2acdbf1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-o-auth2token.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateOAuth2Token( + "amazon", + account.WithCreateOAuth2TokenSuccess("https://example.com"), + account.WithCreateOAuth2TokenFailure("https://example.com"), + account.WithCreateOAuth2TokenScopes([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-go/examples/account/create-phone-token.md new file mode 100644 index 0000000000..b6c2ec7db7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-phone-token.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreatePhoneToken( + "<USER_ID>", + "+12065550100", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-go/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..699cdb222e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-phone-verification.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.CreatePhoneVerification( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-recovery.md b/docs/examples/1.8.x/server-go/examples/account/create-recovery.md new file mode 100644 index 0000000000..923d2819a6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-recovery.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.CreateRecovery( + "email@example.com", + "https://example.com", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-session.md b/docs/examples/1.8.x/server-go/examples/account/create-session.md new file mode 100644 index 0000000000..f5949241ff --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.CreateSession( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create-verification.md b/docs/examples/1.8.x/server-go/examples/account/create-verification.md new file mode 100644 index 0000000000..b3c7fd8004 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create-verification.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.CreateVerification( + "https://example.com", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/create.md b/docs/examples/1.8.x/server-go/examples/account/create.md new file mode 100644 index 0000000000..dc4fdfe8f6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/create.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.Create( + "<USER_ID>", + "email@example.com", + "", + account.WithCreateName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/delete-identity.md b/docs/examples/1.8.x/server-go/examples/account/delete-identity.md new file mode 100644 index 0000000000..2155249894 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/delete-identity.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.DeleteIdentity( + "<IDENTITY_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-go/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..6eb956bdec --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.DeleteMfaAuthenticator( + "totp", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/delete-session.md b/docs/examples/1.8.x/server-go/examples/account/delete-session.md new file mode 100644 index 0000000000..3a1a9514bb --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/delete-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.DeleteSession( + "<SESSION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-go/examples/account/delete-sessions.md new file mode 100644 index 0000000000..718d149241 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/delete-sessions.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.DeleteSessions( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..fd07fe36d9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.GetMfaRecoveryCodes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/get-prefs.md b/docs/examples/1.8.x/server-go/examples/account/get-prefs.md new file mode 100644 index 0000000000..911b5786ce --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/get-prefs.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.GetPrefs( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/get-session.md b/docs/examples/1.8.x/server-go/examples/account/get-session.md new file mode 100644 index 0000000000..dc42c3c12d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/get-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.GetSession( + "<SESSION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/get.md b/docs/examples/1.8.x/server-go/examples/account/get.md new file mode 100644 index 0000000000..80fe2da7c0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.Get( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/list-identities.md b/docs/examples/1.8.x/server-go/examples/account/list-identities.md new file mode 100644 index 0000000000..3bfa0a7b60 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/list-identities.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.ListIdentities( + account.WithListIdentitiesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/list-logs.md b/docs/examples/1.8.x/server-go/examples/account/list-logs.md new file mode 100644 index 0000000000..67ee6de1c2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/list-logs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.ListLogs( + account.WithListLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-go/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..26fb516fed --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/list-mfa-factors.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.ListMfaFactors( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/list-sessions.md b/docs/examples/1.8.x/server-go/examples/account/list-sessions.md new file mode 100644 index 0000000000..96b8c10d4c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/list-sessions.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.ListSessions( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-email.md b/docs/examples/1.8.x/server-go/examples/account/update-email.md new file mode 100644 index 0000000000..7467080416 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-email.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateEmail( + "email@example.com", + "password", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-go/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..139eea3afd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-m-f-a.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateMFA( + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-go/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..4cda48878b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.UpdateMagicURLSession( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-go/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..ce4ebaffe7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-mfa-authenticator.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateMfaAuthenticator( + "totp", + "<OTP>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-go/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..d2bb0c92ec --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-mfa-challenge.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateMfaChallenge( + "<CHALLENGE_ID>", + "<OTP>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..9902b143f5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateMfaRecoveryCodes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-name.md b/docs/examples/1.8.x/server-go/examples/account/update-name.md new file mode 100644 index 0000000000..972873a17a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-name.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateName( + "<NAME>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-password.md b/docs/examples/1.8.x/server-go/examples/account/update-password.md new file mode 100644 index 0000000000..aedcd0ccbc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-password.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdatePassword( + "", + account.WithUpdatePasswordOldPassword("password"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-go/examples/account/update-phone-session.md new file mode 100644 index 0000000000..c937d9cd0d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-phone-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + ) + + service := account.New(client) + response, error := service.UpdatePhoneSession( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-go/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..462d98db9a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-phone-verification.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdatePhoneVerification( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-phone.md b/docs/examples/1.8.x/server-go/examples/account/update-phone.md new file mode 100644 index 0000000000..163ecedd22 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-phone.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdatePhone( + "+12065550100", + "password", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-prefs.md b/docs/examples/1.8.x/server-go/examples/account/update-prefs.md new file mode 100644 index 0000000000..ed566ba519 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-prefs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdatePrefs( + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-recovery.md b/docs/examples/1.8.x/server-go/examples/account/update-recovery.md new file mode 100644 index 0000000000..0d7820bfb9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-recovery.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateRecovery( + "<USER_ID>", + "<SECRET>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-session.md b/docs/examples/1.8.x/server-go/examples/account/update-session.md new file mode 100644 index 0000000000..61029a7157 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateSession( + "<SESSION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-status.md b/docs/examples/1.8.x/server-go/examples/account/update-status.md new file mode 100644 index 0000000000..05f6449a72 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-status.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateStatus( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/account/update-verification.md b/docs/examples/1.8.x/server-go/examples/account/update-verification.md new file mode 100644 index 0000000000..1c781659e4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/account/update-verification.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/account" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := account.New(client) + response, error := service.UpdateVerification( + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-go/examples/avatars/get-browser.md new file mode 100644 index 0000000000..98f405d6dd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-browser.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetBrowser( + "aa", + avatars.WithGetBrowserWidth(0), + avatars.WithGetBrowserHeight(0), + avatars.WithGetBrowserQuality(-1), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-go/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..efdfdbd5dc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-credit-card.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetCreditCard( + "amex", + avatars.WithGetCreditCardWidth(0), + avatars.WithGetCreditCardHeight(0), + avatars.WithGetCreditCardQuality(-1), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-go/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..35ea339097 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-favicon.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetFavicon( + "https://example.com", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-go/examples/avatars/get-flag.md new file mode 100644 index 0000000000..3af30f3cc3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-flag.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetFlag( + "af", + avatars.WithGetFlagWidth(0), + avatars.WithGetFlagHeight(0), + avatars.WithGetFlagQuality(-1), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-image.md b/docs/examples/1.8.x/server-go/examples/avatars/get-image.md new file mode 100644 index 0000000000..f4e0324c9d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-image.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetImage( + "https://example.com", + avatars.WithGetImageWidth(0), + avatars.WithGetImageHeight(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-go/examples/avatars/get-initials.md new file mode 100644 index 0000000000..a7519012e2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-initials.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetInitials( + avatars.WithGetInitialsName("<NAME>"), + avatars.WithGetInitialsWidth(0), + avatars.WithGetInitialsHeight(0), + avatars.WithGetInitialsBackground(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-go/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..edd84269e3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/avatars/get-q-r.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/avatars" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := avatars.New(client) + response, error := service.GetQR( + "<TEXT>", + avatars.WithGetQRSize(1), + avatars.WithGetQRMargin(0), + avatars.WithGetQRDownload(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..43b7aff721 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-boolean-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateBooleanAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateBooleanAttributeDefault(false), + databases.WithCreateBooleanAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-collection.md b/docs/examples/1.8.x/server-go/examples/databases/create-collection.md new file mode 100644 index 0000000000..f72c4b360d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-collection.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + databases.WithCreateCollectionPermissions(interface{}{"read("any")"}), + databases.WithCreateCollectionDocumentSecurity(false), + databases.WithCreateCollectionEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..7d0de22c7d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-datetime-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateDatetimeAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateDatetimeAttributeDefault(""), + databases.WithCreateDatetimeAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-document.md b/docs/examples/1.8.x/server-go/examples/databases/create-document.md new file mode 100644 index 0000000000..8990beaa8d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-document.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithSession("") // The user session to authenticate with + client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := databases.New(client) + response, error := service.CreateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + map[string]interface{}{}, + databases.WithCreateDocumentPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-documents.md b/docs/examples/1.8.x/server-go/examples/databases/create-documents.md new file mode 100644 index 0000000000..d85d0d5395 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-documents.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithAdmin("") // + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..7fa28adfb0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-email-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateEmailAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateEmailAttributeDefault("email@example.com"), + databases.WithCreateEmailAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..4921e2120b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-enum-attribute.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateEnumAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + []interface{}{}, + false, + databases.WithCreateEnumAttributeDefault("<DEFAULT>"), + databases.WithCreateEnumAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..b933bab5e5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-float-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateFloatAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateFloatAttributeMin(0), + databases.WithCreateFloatAttributeMax(0), + databases.WithCreateFloatAttributeDefault(0), + databases.WithCreateFloatAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-index.md b/docs/examples/1.8.x/server-go/examples/databases/create-index.md new file mode 100644 index 0000000000..0513490178 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-index.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + "key", + []interface{}{}, + databases.WithCreateIndexOrders([]interface{}{}), + databases.WithCreateIndexLengths([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..d84771dee7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-integer-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateIntegerAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateIntegerAttributeMin(0), + databases.WithCreateIntegerAttributeMax(0), + databases.WithCreateIntegerAttributeDefault(0), + databases.WithCreateIntegerAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..136a7e96e8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-ip-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateIpAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateIpAttributeDefault(""), + databases.WithCreateIpAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..7fa8c9fad9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-relationship-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateRelationshipAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<RELATED_COLLECTION_ID>", + "oneToOne", + databases.WithCreateRelationshipAttributeTwoWay(false), + databases.WithCreateRelationshipAttributeKey(""), + databases.WithCreateRelationshipAttributeTwoWayKey(""), + databases.WithCreateRelationshipAttributeOnDelete("cascade"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..25d3c1066a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-string-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateStringAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + 1, + false, + databases.WithCreateStringAttributeDefault("<DEFAULT>"), + databases.WithCreateStringAttributeArray(false), + databases.WithCreateStringAttributeEncrypt(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..dd77c93207 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create-url-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.CreateUrlAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + databases.WithCreateUrlAttributeDefault("https://example.com"), + databases.WithCreateUrlAttributeArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/create.md b/docs/examples/1.8.x/server-go/examples/databases/create.md new file mode 100644 index 0000000000..f51a5d70f3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/create.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.Create( + "<DATABASE_ID>", + "<NAME>", + databases.WithCreateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..1d9c094030 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/decrement-document-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.DecrementDocumentAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "", + databases.WithDecrementDocumentAttributeValue(0), + databases.WithDecrementDocumentAttributeMin(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..c34c83a6a5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-attribute.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.DeleteAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-go/examples/databases/delete-collection.md new file mode 100644 index 0000000000..01e7710c26 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-collection.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.DeleteCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-document.md b/docs/examples/1.8.x/server-go/examples/databases/delete-document.md new file mode 100644 index 0000000000..1fc4092ac6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-document.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := databases.New(client) + response, error := service.DeleteDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-go/examples/databases/delete-documents.md new file mode 100644 index 0000000000..fe018b1bbf --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-documents.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.DeleteDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithDeleteDocumentsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete-index.md b/docs/examples/1.8.x/server-go/examples/databases/delete-index.md new file mode 100644 index 0000000000..07bbb6f80c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/delete-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.DeleteIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/delete.md b/docs/examples/1.8.x/server-go/examples/databases/delete.md new file mode 100644 index 0000000000..60995b66f0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.Delete( + "<DATABASE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/get-attribute.md new file mode 100644 index 0000000000..560f34c018 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/get-attribute.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.GetAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/get-collection.md b/docs/examples/1.8.x/server-go/examples/databases/get-collection.md new file mode 100644 index 0000000000..75de4c6882 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/get-collection.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.GetCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/get-document.md b/docs/examples/1.8.x/server-go/examples/databases/get-document.md new file mode 100644 index 0000000000..8bdd26c351 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/get-document.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := databases.New(client) + response, error := service.GetDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + databases.WithGetDocumentQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/get-index.md b/docs/examples/1.8.x/server-go/examples/databases/get-index.md new file mode 100644 index 0000000000..ef38678361 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/get-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.GetIndex( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/get.md b/docs/examples/1.8.x/server-go/examples/databases/get.md new file mode 100644 index 0000000000..0d1eb87a29 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.Get( + "<DATABASE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..fa63e9c8df --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/increment-document-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.IncrementDocumentAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + "", + databases.WithIncrementDocumentAttributeValue(0), + databases.WithIncrementDocumentAttributeMax(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-go/examples/databases/list-attributes.md new file mode 100644 index 0000000000..e4748c6f90 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/list-attributes.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.ListAttributes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithListAttributesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/list-collections.md b/docs/examples/1.8.x/server-go/examples/databases/list-collections.md new file mode 100644 index 0000000000..91716dc40e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/list-collections.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.ListCollections( + "<DATABASE_ID>", + databases.WithListCollectionsQueries([]interface{}{}), + databases.WithListCollectionsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/list-documents.md b/docs/examples/1.8.x/server-go/examples/databases/list-documents.md new file mode 100644 index 0000000000..91d0408efc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/list-documents.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := databases.New(client) + response, error := service.ListDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithListDocumentsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-go/examples/databases/list-indexes.md new file mode 100644 index 0000000000..a5af8d2847 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/list-indexes.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.ListIndexes( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithListIndexesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/list.md b/docs/examples/1.8.x/server-go/examples/databases/list.md new file mode 100644 index 0000000000..f377c11df0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.List( + databases.WithListQueries([]interface{}{}), + databases.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..87e16a0e01 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-boolean-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateBooleanAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + false, + databases.WithUpdateBooleanAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-collection.md b/docs/examples/1.8.x/server-go/examples/databases/update-collection.md new file mode 100644 index 0000000000..07077ff0c0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-collection.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateCollection( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<NAME>", + databases.WithUpdateCollectionPermissions(interface{}{"read("any")"}), + databases.WithUpdateCollectionDocumentSecurity(false), + databases.WithUpdateCollectionEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..24017ff8b4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-datetime-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateDatetimeAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "", + databases.WithUpdateDatetimeAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-document.md b/docs/examples/1.8.x/server-go/examples/databases/update-document.md new file mode 100644 index 0000000000..b36c9694db --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-document.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := databases.New(client) + response, error := service.UpdateDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + databases.WithUpdateDocumentData(map[string]interface{}{}), + databases.WithUpdateDocumentPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-documents.md b/docs/examples/1.8.x/server-go/examples/databases/update-documents.md new file mode 100644 index 0000000000..e1b2a95bc9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-documents.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + databases.WithUpdateDocumentsData(map[string]interface{}{}), + databases.WithUpdateDocumentsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..e58ac912be --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-email-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateEmailAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "email@example.com", + databases.WithUpdateEmailAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..ea6ef4b5f8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-enum-attribute.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateEnumAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + []interface{}{}, + false, + "<DEFAULT>", + databases.WithUpdateEnumAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..db0915a5e2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-float-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateFloatAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + 0, + databases.WithUpdateFloatAttributeMin(0), + databases.WithUpdateFloatAttributeMax(0), + databases.WithUpdateFloatAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..ac956b61bc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-integer-attribute.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateIntegerAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + 0, + databases.WithUpdateIntegerAttributeMin(0), + databases.WithUpdateIntegerAttributeMax(0), + databases.WithUpdateIntegerAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..faaefd7180 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-ip-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateIpAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "", + databases.WithUpdateIpAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..db8057a728 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-relationship-attribute.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateRelationshipAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + databases.WithUpdateRelationshipAttributeOnDelete("cascade"), + databases.WithUpdateRelationshipAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..f9876a2305 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-string-attribute.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateStringAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "<DEFAULT>", + databases.WithUpdateStringAttributeSize(1), + databases.WithUpdateStringAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-go/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..d97cf205ef --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update-url-attribute.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpdateUrlAttribute( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "", + false, + "https://example.com", + databases.WithUpdateUrlAttributeNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/update.md b/docs/examples/1.8.x/server-go/examples/databases/update.md new file mode 100644 index 0000000000..c7fd49fcec --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/update.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.Update( + "<DATABASE_ID>", + "<NAME>", + databases.WithUpdateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md new file mode 100644 index 0000000000..c5304b1860 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithSession("") // The user session to authenticate with + client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := databases.New(client) + response, error := service.UpsertDocument( + "<DATABASE_ID>", + "<COLLECTION_ID>", + "<DOCUMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..5fe0fc5831 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/databases" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithAdmin("") // + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := databases.New(client) + response, error := service.UpsertDocuments( + "<DATABASE_ID>", + "<COLLECTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/create-deployment.md new file mode 100644 index 0000000000..53cdbf2038 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create-deployment.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.CreateDeployment( + "<FUNCTION_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + false, + functions.WithCreateDeploymentEntrypoint("<ENTRYPOINT>"), + functions.WithCreateDeploymentCommands("<COMMANDS>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..367ebd723d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.CreateDuplicateDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + functions.WithCreateDuplicateDeploymentBuildId("<BUILD_ID>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-execution.md b/docs/examples/1.8.x/server-go/examples/functions/create-execution.md new file mode 100644 index 0000000000..33657d2503 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create-execution.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := functions.New(client) + response, error := service.CreateExecution( + "<FUNCTION_ID>", + functions.WithCreateExecutionBody("<BODY>"), + functions.WithCreateExecutionAsync(false), + functions.WithCreateExecutionPath("<PATH>"), + functions.WithCreateExecutionMethod("GET"), + functions.WithCreateExecutionHeaders(map[string]interface{}{}), + functions.WithCreateExecutionScheduledAt(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..87940ce5d4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create-template-deployment.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.CreateTemplateDeployment( + "<FUNCTION_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + "<VERSION>", + functions.WithCreateTemplateDeploymentActivate(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-variable.md b/docs/examples/1.8.x/server-go/examples/functions/create-variable.md new file mode 100644 index 0000000000..68e4b7728e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create-variable.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.CreateVariable( + "<FUNCTION_ID>", + "<KEY>", + "<VALUE>", + functions.WithCreateVariableSecret(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..76d98acd56 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create-vcs-deployment.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.CreateVcsDeployment( + "<FUNCTION_ID>", + "branch", + "<REFERENCE>", + functions.WithCreateVcsDeploymentActivate(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/create.md b/docs/examples/1.8.x/server-go/examples/functions/create.md new file mode 100644 index 0000000000..63dc01c556 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/create.md @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.Create( + "<FUNCTION_ID>", + "<NAME>", + "node-14.5", + functions.WithCreateExecute(interface{}{"any"}), + functions.WithCreateEvents([]interface{}{}), + functions.WithCreateSchedule(""), + functions.WithCreateTimeout(1), + functions.WithCreateEnabled(false), + functions.WithCreateLogging(false), + functions.WithCreateEntrypoint("<ENTRYPOINT>"), + functions.WithCreateCommands("<COMMANDS>"), + functions.WithCreateScopes([]interface{}{}), + functions.WithCreateInstallationId("<INSTALLATION_ID>"), + functions.WithCreateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + functions.WithCreateProviderBranch("<PROVIDER_BRANCH>"), + functions.WithCreateProviderSilentMode(false), + functions.WithCreateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + functions.WithCreateSpecification(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..1763878c91 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/delete-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.DeleteDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-go/examples/functions/delete-execution.md new file mode 100644 index 0000000000..045f24ff1d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/delete-execution.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.DeleteExecution( + "<FUNCTION_ID>", + "<EXECUTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-go/examples/functions/delete-variable.md new file mode 100644 index 0000000000..cbc3cdd57e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/delete-variable.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.DeleteVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/delete.md b/docs/examples/1.8.x/server-go/examples/functions/delete.md new file mode 100644 index 0000000000..87bddcc6f3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.Delete( + "<FUNCTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-go/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..226537bc68 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/get-deployment-download.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.GetDeploymentDownload( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + functions.WithGetDeploymentDownloadType("source"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/get-deployment.md new file mode 100644 index 0000000000..d94d1a187a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/get-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.GetDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/get-execution.md b/docs/examples/1.8.x/server-go/examples/functions/get-execution.md new file mode 100644 index 0000000000..739af771ee --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/get-execution.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := functions.New(client) + response, error := service.GetExecution( + "<FUNCTION_ID>", + "<EXECUTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/get-variable.md b/docs/examples/1.8.x/server-go/examples/functions/get-variable.md new file mode 100644 index 0000000000..f96c84ced3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/get-variable.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.GetVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/get.md b/docs/examples/1.8.x/server-go/examples/functions/get.md new file mode 100644 index 0000000000..bfa5333e41 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.Get( + "<FUNCTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-go/examples/functions/list-deployments.md new file mode 100644 index 0000000000..8d040ce546 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/list-deployments.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.ListDeployments( + "<FUNCTION_ID>", + functions.WithListDeploymentsQueries([]interface{}{}), + functions.WithListDeploymentsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-executions.md b/docs/examples/1.8.x/server-go/examples/functions/list-executions.md new file mode 100644 index 0000000000..aa7e551c90 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/list-executions.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := functions.New(client) + response, error := service.ListExecutions( + "<FUNCTION_ID>", + functions.WithListExecutionsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-go/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..4e251247d3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/list-runtimes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.ListRuntimes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-go/examples/functions/list-specifications.md new file mode 100644 index 0000000000..9b554b1cde --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/list-specifications.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.ListSpecifications( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/list-variables.md b/docs/examples/1.8.x/server-go/examples/functions/list-variables.md new file mode 100644 index 0000000000..68df7f8aa2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/list-variables.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.ListVariables( + "<FUNCTION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/list.md b/docs/examples/1.8.x/server-go/examples/functions/list.md new file mode 100644 index 0000000000..bff9229c08 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.List( + functions.WithListQueries([]interface{}{}), + functions.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-go/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..75dce2fe74 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/update-deployment-status.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.UpdateDeploymentStatus( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-go/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..e8a1c8b2af --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/update-function-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.UpdateFunctionDeployment( + "<FUNCTION_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/update-variable.md b/docs/examples/1.8.x/server-go/examples/functions/update-variable.md new file mode 100644 index 0000000000..658540d027 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/update-variable.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.UpdateVariable( + "<FUNCTION_ID>", + "<VARIABLE_ID>", + "<KEY>", + functions.WithUpdateVariableValue("<VALUE>"), + functions.WithUpdateVariableSecret(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/functions/update.md b/docs/examples/1.8.x/server-go/examples/functions/update.md new file mode 100644 index 0000000000..7c2771efc8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/functions/update.md @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/functions" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := functions.New(client) + response, error := service.Update( + "<FUNCTION_ID>", + "<NAME>", + functions.WithUpdateRuntime("node-14.5"), + functions.WithUpdateExecute(interface{}{"any"}), + functions.WithUpdateEvents([]interface{}{}), + functions.WithUpdateSchedule(""), + functions.WithUpdateTimeout(1), + functions.WithUpdateEnabled(false), + functions.WithUpdateLogging(false), + functions.WithUpdateEntrypoint("<ENTRYPOINT>"), + functions.WithUpdateCommands("<COMMANDS>"), + functions.WithUpdateScopes([]interface{}{}), + functions.WithUpdateInstallationId("<INSTALLATION_ID>"), + functions.WithUpdateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + functions.WithUpdateProviderBranch("<PROVIDER_BRANCH>"), + functions.WithUpdateProviderSilentMode(false), + functions.WithUpdateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + functions.WithUpdateSpecification(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/graphql/mutation.md b/docs/examples/1.8.x/server-go/examples/graphql/mutation.md new file mode 100644 index 0000000000..12ac4aeae1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/graphql/mutation.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/graphql" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := graphql.New(client) + response, error := service.Mutation( + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/graphql/query.md b/docs/examples/1.8.x/server-go/examples/graphql/query.md new file mode 100644 index 0000000000..ff67e5e30f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/graphql/query.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/graphql" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := graphql.New(client) + response, error := service.Query( + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-go/examples/health/get-antivirus.md new file mode 100644 index 0000000000..ee880a756c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-antivirus.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetAntivirus( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-cache.md b/docs/examples/1.8.x/server-go/examples/health/get-cache.md new file mode 100644 index 0000000000..976a5b5a50 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-cache.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetCache( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-certificate.md b/docs/examples/1.8.x/server-go/examples/health/get-certificate.md new file mode 100644 index 0000000000..03cbbc190e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-certificate.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetCertificate( + health.WithGetCertificateDomain(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-d-b.md b/docs/examples/1.8.x/server-go/examples/health/get-d-b.md new file mode 100644 index 0000000000..2ab86d11c0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-d-b.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetDB( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-go/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..59d8baffca --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-failed-jobs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetFailedJobs( + "v1-database", + health.WithGetFailedJobsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-go/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..451c47c806 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-pub-sub.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetPubSub( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..e3a16fb1ae --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-builds.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueBuilds( + health.WithGetQueueBuildsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..42505bfc25 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-certificates.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueCertificates( + health.WithGetQueueCertificatesThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..1f1d3669fa --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-databases.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueDatabases( + health.WithGetQueueDatabasesName("<NAME>"), + health.WithGetQueueDatabasesThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..83c40caa4c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-deletes.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueDeletes( + health.WithGetQueueDeletesThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..d79f07e313 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-functions.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueFunctions( + health.WithGetQueueFunctionsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..b67123f8f8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-logs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueLogs( + health.WithGetQueueLogsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..efbdfe48bb --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-mails.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueMails( + health.WithGetQueueMailsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..65c167fc18 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-messaging.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueMessaging( + health.WithGetQueueMessagingThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..8a009960b1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-migrations.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueMigrations( + health.WithGetQueueMigrationsThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..ba3c71317a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-stats-resources.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueStatsResources( + health.WithGetQueueStatsResourcesThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..cdc175887f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-usage.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueUsage( + health.WithGetQueueUsageThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-go/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..06791aa229 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-queue-webhooks.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetQueueWebhooks( + health.WithGetQueueWebhooksThreshold(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-go/examples/health/get-storage-local.md new file mode 100644 index 0000000000..4e88e0a555 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-storage-local.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetStorageLocal( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-storage.md b/docs/examples/1.8.x/server-go/examples/health/get-storage.md new file mode 100644 index 0000000000..3ec9ed8f6d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-storage.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetStorage( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get-time.md b/docs/examples/1.8.x/server-go/examples/health/get-time.md new file mode 100644 index 0000000000..323746e93d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get-time.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.GetTime( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/health/get.md b/docs/examples/1.8.x/server-go/examples/health/get.md new file mode 100644 index 0000000000..50443c9430 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/health/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := health.New(client) + response, error := service.Get( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/get.md b/docs/examples/1.8.x/server-go/examples/locale/get.md new file mode 100644 index 0000000000..801df85bb4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/get.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.Get( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-codes.md b/docs/examples/1.8.x/server-go/examples/locale/list-codes.md new file mode 100644 index 0000000000..6625746b8a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-codes.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListCodes( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-continents.md b/docs/examples/1.8.x/server-go/examples/locale/list-continents.md new file mode 100644 index 0000000000..f6e05db3c5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-continents.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListContinents( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-go/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..9f85161f1e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-countries-e-u.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListCountriesEU( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-go/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..e7438be997 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-countries-phones.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListCountriesPhones( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-countries.md b/docs/examples/1.8.x/server-go/examples/locale/list-countries.md new file mode 100644 index 0000000000..5f00e6bca5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-countries.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListCountries( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-go/examples/locale/list-currencies.md new file mode 100644 index 0000000000..6971eb12ec --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-currencies.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListCurrencies( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/locale/list-languages.md b/docs/examples/1.8.x/server-go/examples/locale/list-languages.md new file mode 100644 index 0000000000..23bb409a61 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/locale/list-languages.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/locale" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := locale.New(client) + response, error := service.ListLanguages( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..36a5b747ce --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-apns-provider.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateApnsProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateApnsProviderAuthKey("<AUTH_KEY>"), + messaging.WithCreateApnsProviderAuthKeyId("<AUTH_KEY_ID>"), + messaging.WithCreateApnsProviderTeamId("<TEAM_ID>"), + messaging.WithCreateApnsProviderBundleId("<BUNDLE_ID>"), + messaging.WithCreateApnsProviderSandbox(false), + messaging.WithCreateApnsProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-email.md b/docs/examples/1.8.x/server-go/examples/messaging/create-email.md new file mode 100644 index 0000000000..9915ae1398 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-email.md @@ -0,0 +1,37 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateEmail( + "<MESSAGE_ID>", + "<SUBJECT>", + "<CONTENT>", + messaging.WithCreateEmailTopics([]interface{}{}), + messaging.WithCreateEmailUsers([]interface{}{}), + messaging.WithCreateEmailTargets([]interface{}{}), + messaging.WithCreateEmailCc([]interface{}{}), + messaging.WithCreateEmailBcc([]interface{}{}), + messaging.WithCreateEmailAttachments([]interface{}{}), + messaging.WithCreateEmailDraft(false), + messaging.WithCreateEmailHtml(false), + messaging.WithCreateEmailScheduledAt(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..266b11ce5f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-fcm-provider.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateFcmProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateFcmProviderServiceAccountJSON(map[string]interface{}{}), + messaging.WithCreateFcmProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..655cdbf4c3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateMailgunProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateMailgunProviderApiKey("<API_KEY>"), + messaging.WithCreateMailgunProviderDomain("<DOMAIN>"), + messaging.WithCreateMailgunProviderIsEuRegion(false), + messaging.WithCreateMailgunProviderFromName("<FROM_NAME>"), + messaging.WithCreateMailgunProviderFromEmail("email@example.com"), + messaging.WithCreateMailgunProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithCreateMailgunProviderReplyToEmail("email@example.com"), + messaging.WithCreateMailgunProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..85c17ff242 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-msg91provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateMsg91Provider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateMsg91ProviderTemplateId("<TEMPLATE_ID>"), + messaging.WithCreateMsg91ProviderSenderId("<SENDER_ID>"), + messaging.WithCreateMsg91ProviderAuthKey("<AUTH_KEY>"), + messaging.WithCreateMsg91ProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-push.md b/docs/examples/1.8.x/server-go/examples/messaging/create-push.md new file mode 100644 index 0000000000..86bd58bab6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-push.md @@ -0,0 +1,44 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreatePush( + "<MESSAGE_ID>", + messaging.WithCreatePushTitle("<TITLE>"), + messaging.WithCreatePushBody("<BODY>"), + messaging.WithCreatePushTopics([]interface{}{}), + messaging.WithCreatePushUsers([]interface{}{}), + messaging.WithCreatePushTargets([]interface{}{}), + messaging.WithCreatePushData(map[string]interface{}{}), + messaging.WithCreatePushAction("<ACTION>"), + messaging.WithCreatePushImage("[ID1:ID2]"), + messaging.WithCreatePushIcon("<ICON>"), + messaging.WithCreatePushSound("<SOUND>"), + messaging.WithCreatePushColor("<COLOR>"), + messaging.WithCreatePushTag("<TAG>"), + messaging.WithCreatePushBadge(0), + messaging.WithCreatePushDraft(false), + messaging.WithCreatePushScheduledAt(""), + messaging.WithCreatePushContentAvailable(false), + messaging.WithCreatePushCritical(false), + messaging.WithCreatePushPriority("normal"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..5bc3bd3e9b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateSendgridProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateSendgridProviderApiKey("<API_KEY>"), + messaging.WithCreateSendgridProviderFromName("<FROM_NAME>"), + messaging.WithCreateSendgridProviderFromEmail("email@example.com"), + messaging.WithCreateSendgridProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithCreateSendgridProviderReplyToEmail("email@example.com"), + messaging.WithCreateSendgridProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-go/examples/messaging/create-sms.md new file mode 100644 index 0000000000..0afa78f5f6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-sms.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateSms( + "<MESSAGE_ID>", + "<CONTENT>", + messaging.WithCreateSmsTopics([]interface{}{}), + messaging.WithCreateSmsUsers([]interface{}{}), + messaging.WithCreateSmsTargets([]interface{}{}), + messaging.WithCreateSmsDraft(false), + messaging.WithCreateSmsScheduledAt(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..9d84f98a9f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-smtp-provider.md @@ -0,0 +1,39 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateSmtpProvider( + "<PROVIDER_ID>", + "<NAME>", + "<HOST>", + messaging.WithCreateSmtpProviderPort(1), + messaging.WithCreateSmtpProviderUsername("<USERNAME>"), + messaging.WithCreateSmtpProviderPassword("<PASSWORD>"), + messaging.WithCreateSmtpProviderEncryption("none"), + messaging.WithCreateSmtpProviderAutoTLS(false), + messaging.WithCreateSmtpProviderMailer("<MAILER>"), + messaging.WithCreateSmtpProviderFromName("<FROM_NAME>"), + messaging.WithCreateSmtpProviderFromEmail("email@example.com"), + messaging.WithCreateSmtpProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithCreateSmtpProviderReplyToEmail("email@example.com"), + messaging.WithCreateSmtpProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-go/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..71a46d1cb2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-subscriber.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := messaging.New(client) + response, error := service.CreateSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + "<TARGET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..e5afce8a43 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-telesign-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateTelesignProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTelesignProviderFrom("+12065550100"), + messaging.WithCreateTelesignProviderCustomerId("<CUSTOMER_ID>"), + messaging.WithCreateTelesignProviderApiKey("<API_KEY>"), + messaging.WithCreateTelesignProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..8e36b21dd3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateTextmagicProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTextmagicProviderFrom("+12065550100"), + messaging.WithCreateTextmagicProviderUsername("<USERNAME>"), + messaging.WithCreateTextmagicProviderApiKey("<API_KEY>"), + messaging.WithCreateTextmagicProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-go/examples/messaging/create-topic.md new file mode 100644 index 0000000000..9ded515cf2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-topic.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateTopic( + "<TOPIC_ID>", + "<NAME>", + messaging.WithCreateTopicSubscribe(interface{}{"any"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..1a5d4c79b3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-twilio-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateTwilioProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateTwilioProviderFrom("+12065550100"), + messaging.WithCreateTwilioProviderAccountSid("<ACCOUNT_SID>"), + messaging.WithCreateTwilioProviderAuthToken("<AUTH_TOKEN>"), + messaging.WithCreateTwilioProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..10d72a2a5b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/create-vonage-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.CreateVonageProvider( + "<PROVIDER_ID>", + "<NAME>", + messaging.WithCreateVonageProviderFrom("+12065550100"), + messaging.WithCreateVonageProviderApiKey("<API_KEY>"), + messaging.WithCreateVonageProviderApiSecret("<API_SECRET>"), + messaging.WithCreateVonageProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..1b492df4a2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete-provider.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.DeleteProvider( + "<PROVIDER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-go/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..8bdbc6c26b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete-subscriber.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := messaging.New(client) + response, error := service.DeleteSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-go/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..4bfc03f504 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete-topic.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.DeleteTopic( + "<TOPIC_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/delete.md b/docs/examples/1.8.x/server-go/examples/messaging/delete.md new file mode 100644 index 0000000000..da0cc65cec --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.Delete( + "<MESSAGE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/get-message.md b/docs/examples/1.8.x/server-go/examples/messaging/get-message.md new file mode 100644 index 0000000000..0273ce7373 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/get-message.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.GetMessage( + "<MESSAGE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/get-provider.md new file mode 100644 index 0000000000..f3736147ea --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/get-provider.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.GetProvider( + "<PROVIDER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-go/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..da46b98e6e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/get-subscriber.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.GetSubscriber( + "<TOPIC_ID>", + "<SUBSCRIBER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-go/examples/messaging/get-topic.md new file mode 100644 index 0000000000..005acefe3d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/get-topic.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.GetTopic( + "<TOPIC_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-go/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..2af8b23fc8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-message-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListMessageLogs( + "<MESSAGE_ID>", + messaging.WithListMessageLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-go/examples/messaging/list-messages.md new file mode 100644 index 0000000000..afc5646f02 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-messages.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListMessages( + messaging.WithListMessagesQueries([]interface{}{}), + messaging.WithListMessagesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-go/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..665916c968 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-provider-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListProviderLogs( + "<PROVIDER_ID>", + messaging.WithListProviderLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-go/examples/messaging/list-providers.md new file mode 100644 index 0000000000..20c23231b2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-providers.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListProviders( + messaging.WithListProvidersQueries([]interface{}{}), + messaging.WithListProvidersSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-go/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..b794781ad1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListSubscriberLogs( + "<SUBSCRIBER_ID>", + messaging.WithListSubscriberLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-go/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..98c63eb0b6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-subscribers.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListSubscribers( + "<TOPIC_ID>", + messaging.WithListSubscribersQueries([]interface{}{}), + messaging.WithListSubscribersSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-go/examples/messaging/list-targets.md new file mode 100644 index 0000000000..3df399eab3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-targets.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListTargets( + "<MESSAGE_ID>", + messaging.WithListTargetsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-go/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..d972c202ed --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-topic-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListTopicLogs( + "<TOPIC_ID>", + messaging.WithListTopicLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-go/examples/messaging/list-topics.md new file mode 100644 index 0000000000..ca9dba1528 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/list-topics.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.ListTopics( + messaging.WithListTopicsQueries([]interface{}{}), + messaging.WithListTopicsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..74e4fa56f8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-apns-provider.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateApnsProvider( + "<PROVIDER_ID>", + messaging.WithUpdateApnsProviderName("<NAME>"), + messaging.WithUpdateApnsProviderEnabled(false), + messaging.WithUpdateApnsProviderAuthKey("<AUTH_KEY>"), + messaging.WithUpdateApnsProviderAuthKeyId("<AUTH_KEY_ID>"), + messaging.WithUpdateApnsProviderTeamId("<TEAM_ID>"), + messaging.WithUpdateApnsProviderBundleId("<BUNDLE_ID>"), + messaging.WithUpdateApnsProviderSandbox(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-email.md b/docs/examples/1.8.x/server-go/examples/messaging/update-email.md new file mode 100644 index 0000000000..7dd06e3ea2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-email.md @@ -0,0 +1,37 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateEmail( + "<MESSAGE_ID>", + messaging.WithUpdateEmailTopics([]interface{}{}), + messaging.WithUpdateEmailUsers([]interface{}{}), + messaging.WithUpdateEmailTargets([]interface{}{}), + messaging.WithUpdateEmailSubject("<SUBJECT>"), + messaging.WithUpdateEmailContent("<CONTENT>"), + messaging.WithUpdateEmailDraft(false), + messaging.WithUpdateEmailHtml(false), + messaging.WithUpdateEmailCc([]interface{}{}), + messaging.WithUpdateEmailBcc([]interface{}{}), + messaging.WithUpdateEmailScheduledAt(""), + messaging.WithUpdateEmailAttachments([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..c70327a022 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-fcm-provider.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateFcmProvider( + "<PROVIDER_ID>", + messaging.WithUpdateFcmProviderName("<NAME>"), + messaging.WithUpdateFcmProviderEnabled(false), + messaging.WithUpdateFcmProviderServiceAccountJSON(map[string]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..80f078b056 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateMailgunProvider( + "<PROVIDER_ID>", + messaging.WithUpdateMailgunProviderName("<NAME>"), + messaging.WithUpdateMailgunProviderApiKey("<API_KEY>"), + messaging.WithUpdateMailgunProviderDomain("<DOMAIN>"), + messaging.WithUpdateMailgunProviderIsEuRegion(false), + messaging.WithUpdateMailgunProviderEnabled(false), + messaging.WithUpdateMailgunProviderFromName("<FROM_NAME>"), + messaging.WithUpdateMailgunProviderFromEmail("email@example.com"), + messaging.WithUpdateMailgunProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithUpdateMailgunProviderReplyToEmail("<REPLY_TO_EMAIL>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..70dbad455b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-msg91provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateMsg91Provider( + "<PROVIDER_ID>", + messaging.WithUpdateMsg91ProviderName("<NAME>"), + messaging.WithUpdateMsg91ProviderEnabled(false), + messaging.WithUpdateMsg91ProviderTemplateId("<TEMPLATE_ID>"), + messaging.WithUpdateMsg91ProviderSenderId("<SENDER_ID>"), + messaging.WithUpdateMsg91ProviderAuthKey("<AUTH_KEY>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-push.md b/docs/examples/1.8.x/server-go/examples/messaging/update-push.md new file mode 100644 index 0000000000..e68bd77311 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-push.md @@ -0,0 +1,44 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdatePush( + "<MESSAGE_ID>", + messaging.WithUpdatePushTopics([]interface{}{}), + messaging.WithUpdatePushUsers([]interface{}{}), + messaging.WithUpdatePushTargets([]interface{}{}), + messaging.WithUpdatePushTitle("<TITLE>"), + messaging.WithUpdatePushBody("<BODY>"), + messaging.WithUpdatePushData(map[string]interface{}{}), + messaging.WithUpdatePushAction("<ACTION>"), + messaging.WithUpdatePushImage("[ID1:ID2]"), + messaging.WithUpdatePushIcon("<ICON>"), + messaging.WithUpdatePushSound("<SOUND>"), + messaging.WithUpdatePushColor("<COLOR>"), + messaging.WithUpdatePushTag("<TAG>"), + messaging.WithUpdatePushBadge(0), + messaging.WithUpdatePushDraft(false), + messaging.WithUpdatePushScheduledAt(""), + messaging.WithUpdatePushContentAvailable(false), + messaging.WithUpdatePushCritical(false), + messaging.WithUpdatePushPriority("normal"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..9c442e26e5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateSendgridProvider( + "<PROVIDER_ID>", + messaging.WithUpdateSendgridProviderName("<NAME>"), + messaging.WithUpdateSendgridProviderEnabled(false), + messaging.WithUpdateSendgridProviderApiKey("<API_KEY>"), + messaging.WithUpdateSendgridProviderFromName("<FROM_NAME>"), + messaging.WithUpdateSendgridProviderFromEmail("email@example.com"), + messaging.WithUpdateSendgridProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithUpdateSendgridProviderReplyToEmail("<REPLY_TO_EMAIL>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-go/examples/messaging/update-sms.md new file mode 100644 index 0000000000..f62798e298 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-sms.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateSms( + "<MESSAGE_ID>", + messaging.WithUpdateSmsTopics([]interface{}{}), + messaging.WithUpdateSmsUsers([]interface{}{}), + messaging.WithUpdateSmsTargets([]interface{}{}), + messaging.WithUpdateSmsContent("<CONTENT>"), + messaging.WithUpdateSmsDraft(false), + messaging.WithUpdateSmsScheduledAt(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..ccfb91b1b9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-smtp-provider.md @@ -0,0 +1,39 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateSmtpProvider( + "<PROVIDER_ID>", + messaging.WithUpdateSmtpProviderName("<NAME>"), + messaging.WithUpdateSmtpProviderHost("<HOST>"), + messaging.WithUpdateSmtpProviderPort(1), + messaging.WithUpdateSmtpProviderUsername("<USERNAME>"), + messaging.WithUpdateSmtpProviderPassword("<PASSWORD>"), + messaging.WithUpdateSmtpProviderEncryption("none"), + messaging.WithUpdateSmtpProviderAutoTLS(false), + messaging.WithUpdateSmtpProviderMailer("<MAILER>"), + messaging.WithUpdateSmtpProviderFromName("<FROM_NAME>"), + messaging.WithUpdateSmtpProviderFromEmail("email@example.com"), + messaging.WithUpdateSmtpProviderReplyToName("<REPLY_TO_NAME>"), + messaging.WithUpdateSmtpProviderReplyToEmail("<REPLY_TO_EMAIL>"), + messaging.WithUpdateSmtpProviderEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..77549380c8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-telesign-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateTelesignProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTelesignProviderName("<NAME>"), + messaging.WithUpdateTelesignProviderEnabled(false), + messaging.WithUpdateTelesignProviderCustomerId("<CUSTOMER_ID>"), + messaging.WithUpdateTelesignProviderApiKey("<API_KEY>"), + messaging.WithUpdateTelesignProviderFrom("<FROM>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..55350f7a1e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateTextmagicProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTextmagicProviderName("<NAME>"), + messaging.WithUpdateTextmagicProviderEnabled(false), + messaging.WithUpdateTextmagicProviderUsername("<USERNAME>"), + messaging.WithUpdateTextmagicProviderApiKey("<API_KEY>"), + messaging.WithUpdateTextmagicProviderFrom("<FROM>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-go/examples/messaging/update-topic.md new file mode 100644 index 0000000000..a83b5e4852 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-topic.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateTopic( + "<TOPIC_ID>", + messaging.WithUpdateTopicName("<NAME>"), + messaging.WithUpdateTopicSubscribe(interface{}{"any"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..61b95dabf1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-twilio-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateTwilioProvider( + "<PROVIDER_ID>", + messaging.WithUpdateTwilioProviderName("<NAME>"), + messaging.WithUpdateTwilioProviderEnabled(false), + messaging.WithUpdateTwilioProviderAccountSid("<ACCOUNT_SID>"), + messaging.WithUpdateTwilioProviderAuthToken("<AUTH_TOKEN>"), + messaging.WithUpdateTwilioProviderFrom("<FROM>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-go/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..4cfc03c2b5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/messaging/update-vonage-provider.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/messaging" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := messaging.New(client) + response, error := service.UpdateVonageProvider( + "<PROVIDER_ID>", + messaging.WithUpdateVonageProviderName("<NAME>"), + messaging.WithUpdateVonageProviderEnabled(false), + messaging.WithUpdateVonageProviderApiKey("<API_KEY>"), + messaging.WithUpdateVonageProviderApiSecret("<API_SECRET>"), + messaging.WithUpdateVonageProviderFrom("<FROM>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/create-deployment.md new file mode 100644 index 0000000000..5a13b3e152 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/create-deployment.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.CreateDeployment( + "<SITE_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + false, + sites.WithCreateDeploymentInstallCommand("<INSTALL_COMMAND>"), + sites.WithCreateDeploymentBuildCommand("<BUILD_COMMAND>"), + sites.WithCreateDeploymentOutputDirectory("<OUTPUT_DIRECTORY>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..84b4932b36 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.CreateDuplicateDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..b67f65f6c9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/create-template-deployment.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.CreateTemplateDeployment( + "<SITE_ID>", + "<REPOSITORY>", + "<OWNER>", + "<ROOT_DIRECTORY>", + "<VERSION>", + sites.WithCreateTemplateDeploymentActivate(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-variable.md b/docs/examples/1.8.x/server-go/examples/sites/create-variable.md new file mode 100644 index 0000000000..05148190e9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/create-variable.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.CreateVariable( + "<SITE_ID>", + "<KEY>", + "<VALUE>", + sites.WithCreateVariableSecret(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..c13edc5900 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/create-vcs-deployment.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.CreateVcsDeployment( + "<SITE_ID>", + "branch", + "<REFERENCE>", + sites.WithCreateVcsDeploymentActivate(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/create.md b/docs/examples/1.8.x/server-go/examples/sites/create.md new file mode 100644 index 0000000000..f87a3068a2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/create.md @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.Create( + "<SITE_ID>", + "<NAME>", + "analog", + "node-14.5", + sites.WithCreateEnabled(false), + sites.WithCreateLogging(false), + sites.WithCreateTimeout(1), + sites.WithCreateInstallCommand("<INSTALL_COMMAND>"), + sites.WithCreateBuildCommand("<BUILD_COMMAND>"), + sites.WithCreateOutputDirectory("<OUTPUT_DIRECTORY>"), + sites.WithCreateAdapter("static"), + sites.WithCreateInstallationId("<INSTALLATION_ID>"), + sites.WithCreateFallbackFile("<FALLBACK_FILE>"), + sites.WithCreateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + sites.WithCreateProviderBranch("<PROVIDER_BRANCH>"), + sites.WithCreateProviderSilentMode(false), + sites.WithCreateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + sites.WithCreateSpecification(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..5e5de1a888 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/delete-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.DeleteDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/delete-log.md b/docs/examples/1.8.x/server-go/examples/sites/delete-log.md new file mode 100644 index 0000000000..fe3add16fe --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/delete-log.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.DeleteLog( + "<SITE_ID>", + "<LOG_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-go/examples/sites/delete-variable.md new file mode 100644 index 0000000000..389d454c4c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/delete-variable.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.DeleteVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/delete.md b/docs/examples/1.8.x/server-go/examples/sites/delete.md new file mode 100644 index 0000000000..184276dc4b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.Delete( + "<SITE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-go/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..a90d358073 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/get-deployment-download.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.GetDeploymentDownload( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + sites.WithGetDeploymentDownloadType("source"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/get-deployment.md new file mode 100644 index 0000000000..17d066e8fe --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/get-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.GetDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/get-log.md b/docs/examples/1.8.x/server-go/examples/sites/get-log.md new file mode 100644 index 0000000000..ca0031546d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/get-log.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.GetLog( + "<SITE_ID>", + "<LOG_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/get-variable.md b/docs/examples/1.8.x/server-go/examples/sites/get-variable.md new file mode 100644 index 0000000000..55f8ddf6ca --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/get-variable.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.GetVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/get.md b/docs/examples/1.8.x/server-go/examples/sites/get.md new file mode 100644 index 0000000000..e876766da8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.Get( + "<SITE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-go/examples/sites/list-deployments.md new file mode 100644 index 0000000000..b6ab37ea79 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/list-deployments.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.ListDeployments( + "<SITE_ID>", + sites.WithListDeploymentsQueries([]interface{}{}), + sites.WithListDeploymentsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-go/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..dae9a1814d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/list-frameworks.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.ListFrameworks( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-logs.md b/docs/examples/1.8.x/server-go/examples/sites/list-logs.md new file mode 100644 index 0000000000..1c756cdbb6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/list-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.ListLogs( + "<SITE_ID>", + sites.WithListLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-go/examples/sites/list-specifications.md new file mode 100644 index 0000000000..96d74c7fc3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/list-specifications.md @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.ListSpecifications( + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/list-variables.md b/docs/examples/1.8.x/server-go/examples/sites/list-variables.md new file mode 100644 index 0000000000..c6d329736d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/list-variables.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.ListVariables( + "<SITE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/list.md b/docs/examples/1.8.x/server-go/examples/sites/list.md new file mode 100644 index 0000000000..e43442226a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.List( + sites.WithListQueries([]interface{}{}), + sites.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-go/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..3c8cd3201d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/update-deployment-status.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.UpdateDeploymentStatus( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-go/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..806fbb35a6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/update-site-deployment.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.UpdateSiteDeployment( + "<SITE_ID>", + "<DEPLOYMENT_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/update-variable.md b/docs/examples/1.8.x/server-go/examples/sites/update-variable.md new file mode 100644 index 0000000000..c2f0506b44 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/update-variable.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.UpdateVariable( + "<SITE_ID>", + "<VARIABLE_ID>", + "<KEY>", + sites.WithUpdateVariableValue("<VALUE>"), + sites.WithUpdateVariableSecret(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/sites/update.md b/docs/examples/1.8.x/server-go/examples/sites/update.md new file mode 100644 index 0000000000..3dd53e283a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/sites/update.md @@ -0,0 +1,43 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/sites" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := sites.New(client) + response, error := service.Update( + "<SITE_ID>", + "<NAME>", + "analog", + sites.WithUpdateEnabled(false), + sites.WithUpdateLogging(false), + sites.WithUpdateTimeout(1), + sites.WithUpdateInstallCommand("<INSTALL_COMMAND>"), + sites.WithUpdateBuildCommand("<BUILD_COMMAND>"), + sites.WithUpdateOutputDirectory("<OUTPUT_DIRECTORY>"), + sites.WithUpdateBuildRuntime("node-14.5"), + sites.WithUpdateAdapter("static"), + sites.WithUpdateFallbackFile("<FALLBACK_FILE>"), + sites.WithUpdateInstallationId("<INSTALLATION_ID>"), + sites.WithUpdateProviderRepositoryId("<PROVIDER_REPOSITORY_ID>"), + sites.WithUpdateProviderBranch("<PROVIDER_BRANCH>"), + sites.WithUpdateProviderSilentMode(false), + sites.WithUpdateProviderRootDirectory("<PROVIDER_ROOT_DIRECTORY>"), + sites.WithUpdateSpecification(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-go/examples/storage/create-bucket.md new file mode 100644 index 0000000000..a2679d9894 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/create-bucket.md @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := storage.New(client) + response, error := service.CreateBucket( + "<BUCKET_ID>", + "<NAME>", + storage.WithCreateBucketPermissions(interface{}{"read("any")"}), + storage.WithCreateBucketFileSecurity(false), + storage.WithCreateBucketEnabled(false), + storage.WithCreateBucketMaximumFileSize(1), + storage.WithCreateBucketAllowedFileExtensions([]interface{}{}), + storage.WithCreateBucketCompression("none"), + storage.WithCreateBucketEncryption(false), + storage.WithCreateBucketAntivirus(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/create-file.md b/docs/examples/1.8.x/server-go/examples/storage/create-file.md new file mode 100644 index 0000000000..4d87231490 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/create-file.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.CreateFile( + "<BUCKET_ID>", + "<FILE_ID>", + file.NewInputFile("/path/to/file.png", "file.png"), + storage.WithCreateFilePermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-go/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..28832a1187 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/delete-bucket.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := storage.New(client) + response, error := service.DeleteBucket( + "<BUCKET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/delete-file.md b/docs/examples/1.8.x/server-go/examples/storage/delete-file.md new file mode 100644 index 0000000000..e616054107 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/delete-file.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.DeleteFile( + "<BUCKET_ID>", + "<FILE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-go/examples/storage/get-bucket.md new file mode 100644 index 0000000000..acb722546e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/get-bucket.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := storage.New(client) + response, error := service.GetBucket( + "<BUCKET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-go/examples/storage/get-file-download.md new file mode 100644 index 0000000000..c0a1724eac --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/get-file-download.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.GetFileDownload( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithGetFileDownloadToken("<TOKEN>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-go/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..5d7d75a4f8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/get-file-preview.md @@ -0,0 +1,39 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.GetFilePreview( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithGetFilePreviewWidth(0), + storage.WithGetFilePreviewHeight(0), + storage.WithGetFilePreviewGravity("center"), + storage.WithGetFilePreviewQuality(-1), + storage.WithGetFilePreviewBorderWidth(0), + storage.WithGetFilePreviewBorderColor(""), + storage.WithGetFilePreviewBorderRadius(0), + storage.WithGetFilePreviewOpacity(0), + storage.WithGetFilePreviewRotation(-360), + storage.WithGetFilePreviewBackground(""), + storage.WithGetFilePreviewOutput("jpg"), + storage.WithGetFilePreviewToken("<TOKEN>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-go/examples/storage/get-file-view.md new file mode 100644 index 0000000000..ca59105821 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/get-file-view.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.GetFileView( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithGetFileViewToken("<TOKEN>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/get-file.md b/docs/examples/1.8.x/server-go/examples/storage/get-file.md new file mode 100644 index 0000000000..b33170e93c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/get-file.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.GetFile( + "<BUCKET_ID>", + "<FILE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-go/examples/storage/list-buckets.md new file mode 100644 index 0000000000..79f4c4b3e4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/list-buckets.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := storage.New(client) + response, error := service.ListBuckets( + storage.WithListBucketsQueries([]interface{}{}), + storage.WithListBucketsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/list-files.md b/docs/examples/1.8.x/server-go/examples/storage/list-files.md new file mode 100644 index 0000000000..2c2652a97e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/list-files.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.ListFiles( + "<BUCKET_ID>", + storage.WithListFilesQueries([]interface{}{}), + storage.WithListFilesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-go/examples/storage/update-bucket.md new file mode 100644 index 0000000000..ac28e5b649 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/update-bucket.md @@ -0,0 +1,35 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := storage.New(client) + response, error := service.UpdateBucket( + "<BUCKET_ID>", + "<NAME>", + storage.WithUpdateBucketPermissions(interface{}{"read("any")"}), + storage.WithUpdateBucketFileSecurity(false), + storage.WithUpdateBucketEnabled(false), + storage.WithUpdateBucketMaximumFileSize(1), + storage.WithUpdateBucketAllowedFileExtensions([]interface{}{}), + storage.WithUpdateBucketCompression("none"), + storage.WithUpdateBucketEncryption(false), + storage.WithUpdateBucketAntivirus(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/storage/update-file.md b/docs/examples/1.8.x/server-go/examples/storage/update-file.md new file mode 100644 index 0000000000..d6887a82c1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/storage/update-file.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/storage" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := storage.New(client) + response, error := service.UpdateFile( + "<BUCKET_ID>", + "<FILE_ID>", + storage.WithUpdateFileName("<NAME>"), + storage.WithUpdateFilePermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..70a666257f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateBooleanColumnDefault(false), + tables.WithCreateBooleanColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..beb8bd09e6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateDatetimeColumnDefault(""), + tables.WithCreateDatetimeColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md new file mode 100644 index 0000000000..449cc0e88a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateEmailColumnDefault("email@example.com"), + tables.WithCreateEmailColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..8f3bb84bb7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + tables.WithCreateEnumColumnDefault("<DEFAULT>"), + tables.WithCreateEnumColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md new file mode 100644 index 0000000000..eeabd851b9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateFloatColumnMin(0), + tables.WithCreateFloatColumnMax(0), + tables.WithCreateFloatColumnDefault(0), + tables.WithCreateFloatColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-index.md b/docs/examples/1.8.x/server-go/examples/tables/create-index.md new file mode 100644 index 0000000000..1737b29f6f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-index.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + "key", + []interface{}{}, + tables.WithCreateIndexOrders([]interface{}{}), + tables.WithCreateIndexLengths([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..45a81f6415 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateIntegerColumnMin(0), + tables.WithCreateIntegerColumnMax(0), + tables.WithCreateIntegerColumnDefault(0), + tables.WithCreateIntegerColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..f6d203d65e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateIpColumnDefault(""), + tables.WithCreateIpColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..e2e6de59de --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<RELATED_TABLE_ID>", + "oneToOne", + tables.WithCreateRelationshipColumnTwoWay(false), + tables.WithCreateRelationshipColumnKey(""), + tables.WithCreateRelationshipColumnTwoWayKey(""), + tables.WithCreateRelationshipColumnOnDelete("cascade"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-row.md b/docs/examples/1.8.x/server-go/examples/tables/create-row.md new file mode 100644 index 0000000000..329f2a1c9c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-row.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithSession("") // The user session to authenticate with + client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := tables.New(client) + response, error := service.CreateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + map[string]interface{}{}, + tables.WithCreateRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-rows.md b/docs/examples/1.8.x/server-go/examples/tables/create-rows.md new file mode 100644 index 0000000000..7d32206bea --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithAdmin("") // + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md new file mode 100644 index 0000000000..afb41e2728 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + 1, + false, + tables.WithCreateStringColumnDefault("<DEFAULT>"), + tables.WithCreateStringColumnArray(false), + tables.WithCreateStringColumnEncrypt(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md new file mode 100644 index 0000000000..c4e30e30cd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateUrlColumnDefault("https://example.com"), + tables.WithCreateUrlColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create.md b/docs/examples/1.8.x/server-go/examples/tables/create.md new file mode 100644 index 0000000000..672824daa6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.Create( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + tables.WithCreatePermissions(interface{}{"read("any")"}), + tables.WithCreateRowSecurity(false), + tables.WithCreateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..8ef1d26a59 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.DecrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + tables.WithDecrementRowColumnValue(0), + tables.WithDecrementRowColumnMin(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-column.md b/docs/examples/1.8.x/server-go/examples/tables/delete-column.md new file mode 100644 index 0000000000..f66fc199c3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete-column.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.DeleteColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-index.md b/docs/examples/1.8.x/server-go/examples/tables/delete-index.md new file mode 100644 index 0000000000..1dddeef4e8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.DeleteIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-row.md b/docs/examples/1.8.x/server-go/examples/tables/delete-row.md new file mode 100644 index 0000000000..9f55934e41 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete-row.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tables.New(client) + response, error := service.DeleteRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md new file mode 100644 index 0000000000..3ad38f8067 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.DeleteRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithDeleteRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete.md b/docs/examples/1.8.x/server-go/examples/tables/delete.md new file mode 100644 index 0000000000..9637acc51d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.Delete( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-column.md b/docs/examples/1.8.x/server-go/examples/tables/get-column.md new file mode 100644 index 0000000000..292d22800e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/get-column.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.GetColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-index.md b/docs/examples/1.8.x/server-go/examples/tables/get-index.md new file mode 100644 index 0000000000..077e823195 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/get-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.GetIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-row.md b/docs/examples/1.8.x/server-go/examples/tables/get-row.md new file mode 100644 index 0000000000..a224c60d98 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/get-row.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tables.New(client) + response, error := service.GetRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tables.WithGetRowQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get.md b/docs/examples/1.8.x/server-go/examples/tables/get.md new file mode 100644 index 0000000000..60304a8fd0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/get.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.Get( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..5d8b2f5578 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.IncrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + tables.WithIncrementRowColumnValue(0), + tables.WithIncrementRowColumnMax(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-columns.md b/docs/examples/1.8.x/server-go/examples/tables/list-columns.md new file mode 100644 index 0000000000..25712ef2a7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/list-columns.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.ListColumns( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithListColumnsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md new file mode 100644 index 0000000000..0be8e81164 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.ListIndexes( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithListIndexesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-rows.md b/docs/examples/1.8.x/server-go/examples/tables/list-rows.md new file mode 100644 index 0000000000..aadbcf1dad --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/list-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tables.New(client) + response, error := service.ListRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithListRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list.md b/docs/examples/1.8.x/server-go/examples/tables/list.md new file mode 100644 index 0000000000..1942b7a2d2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/list.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.List( + "<DATABASE_ID>", + tables.WithListQueries([]interface{}{}), + tables.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..c76c3bb1cc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + false, + tables.WithUpdateBooleanColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..e093904ad5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + tables.WithUpdateDatetimeColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md new file mode 100644 index 0000000000..08845b5149 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "email@example.com", + tables.WithUpdateEmailColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..e639f850ba --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + "<DEFAULT>", + tables.WithUpdateEnumColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md new file mode 100644 index 0000000000..83fa3777c2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + tables.WithUpdateFloatColumnMin(0), + tables.WithUpdateFloatColumnMax(0), + tables.WithUpdateFloatColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..5bbea02709 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + tables.WithUpdateIntegerColumnMin(0), + tables.WithUpdateIntegerColumnMax(0), + tables.WithUpdateIntegerColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..f67711aaed --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + tables.WithUpdateIpColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..1ec20edbb6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + tables.WithUpdateRelationshipColumnOnDelete("cascade"), + tables.WithUpdateRelationshipColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-row.md b/docs/examples/1.8.x/server-go/examples/tables/update-row.md new file mode 100644 index 0000000000..8ef1189769 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-row.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tables.New(client) + response, error := service.UpdateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tables.WithUpdateRowData(map[string]interface{}{}), + tables.WithUpdateRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-rows.md b/docs/examples/1.8.x/server-go/examples/tables/update-rows.md new file mode 100644 index 0000000000..7579e32851 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-rows.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithUpdateRowsData(map[string]interface{}{}), + tables.WithUpdateRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md new file mode 100644 index 0000000000..0a21b05e19 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "<DEFAULT>", + tables.WithUpdateStringColumnSize(1), + tables.WithUpdateStringColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md new file mode 100644 index 0000000000..aeb0541648 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "https://example.com", + tables.WithUpdateUrlColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update.md b/docs/examples/1.8.x/server-go/examples/tables/update.md new file mode 100644 index 0000000000..7a75c10713 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.Update( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + tables.WithUpdatePermissions(interface{}{"read("any")"}), + tables.WithUpdateRowSecurity(false), + tables.WithUpdateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md new file mode 100644 index 0000000000..9bc9f00f8b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithSession("") // The user session to authenticate with + client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := tables.New(client) + response, error := service.UpsertRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..bc5a4db007 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithAdmin("") // + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpsertRows( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/create-membership.md b/docs/examples/1.8.x/server-go/examples/teams/create-membership.md new file mode 100644 index 0000000000..e6cfb8b9c8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/create-membership.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.CreateMembership( + "<TEAM_ID>", + []interface{}{}, + teams.WithCreateMembershipEmail("email@example.com"), + teams.WithCreateMembershipUserId("<USER_ID>"), + teams.WithCreateMembershipPhone("+12065550100"), + teams.WithCreateMembershipUrl("https://example.com"), + teams.WithCreateMembershipName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/create.md b/docs/examples/1.8.x/server-go/examples/teams/create.md new file mode 100644 index 0000000000..773da7afcd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/create.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.Create( + "<TEAM_ID>", + "<NAME>", + teams.WithCreateRoles([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-go/examples/teams/delete-membership.md new file mode 100644 index 0000000000..5ffee885fb --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/delete-membership.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.DeleteMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/delete.md b/docs/examples/1.8.x/server-go/examples/teams/delete.md new file mode 100644 index 0000000000..c66c7056bd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.Delete( + "<TEAM_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/get-membership.md b/docs/examples/1.8.x/server-go/examples/teams/get-membership.md new file mode 100644 index 0000000000..466ab72059 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/get-membership.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.GetMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-go/examples/teams/get-prefs.md new file mode 100644 index 0000000000..d8400e420a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/get-prefs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.GetPrefs( + "<TEAM_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/get.md b/docs/examples/1.8.x/server-go/examples/teams/get.md new file mode 100644 index 0000000000..0f503c7f5b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.Get( + "<TEAM_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-go/examples/teams/list-memberships.md new file mode 100644 index 0000000000..90b2babcb0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/list-memberships.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.ListMemberships( + "<TEAM_ID>", + teams.WithListMembershipsQueries([]interface{}{}), + teams.WithListMembershipsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/list.md b/docs/examples/1.8.x/server-go/examples/teams/list.md new file mode 100644 index 0000000000..e70ca11587 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.List( + teams.WithListQueries([]interface{}{}), + teams.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-go/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..c9e1215971 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/update-membership-status.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.UpdateMembershipStatus( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + "<USER_ID>", + "<SECRET>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/update-membership.md b/docs/examples/1.8.x/server-go/examples/teams/update-membership.md new file mode 100644 index 0000000000..8721a5ed6d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/update-membership.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.UpdateMembership( + "<TEAM_ID>", + "<MEMBERSHIP_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/update-name.md b/docs/examples/1.8.x/server-go/examples/teams/update-name.md new file mode 100644 index 0000000000..0d75a7bb32 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/update-name.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.UpdateName( + "<TEAM_ID>", + "<NAME>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-go/examples/teams/update-prefs.md new file mode 100644 index 0000000000..e9631d5bf3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/teams/update-prefs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/teams" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := teams.New(client) + response, error := service.UpdatePrefs( + "<TEAM_ID>", + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-go/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..3109062d9e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tokens/create-file-token.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tokens.New(client) + response, error := service.CreateFileToken( + "<BUCKET_ID>", + "<FILE_ID>", + tokens.WithCreateFileTokenExpire(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tokens/delete.md b/docs/examples/1.8.x/server-go/examples/tokens/delete.md new file mode 100644 index 0000000000..a376bab09b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tokens/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tokens.New(client) + response, error := service.Delete( + "<TOKEN_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tokens/get.md b/docs/examples/1.8.x/server-go/examples/tokens/get.md new file mode 100644 index 0000000000..4c01f68669 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tokens/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tokens.New(client) + response, error := service.Get( + "<TOKEN_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tokens/list.md b/docs/examples/1.8.x/server-go/examples/tokens/list.md new file mode 100644 index 0000000000..99876af081 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tokens/list.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tokens.New(client) + response, error := service.List( + "<BUCKET_ID>", + "<FILE_ID>", + tokens.WithListQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tokens/update.md b/docs/examples/1.8.x/server-go/examples/tokens/update.md new file mode 100644 index 0000000000..eaba8eaafb --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tokens/update.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tokens" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tokens.New(client) + response, error := service.Update( + "<TOKEN_ID>", + tokens.WithUpdateExpire(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-go/examples/users/create-argon2user.md new file mode 100644 index 0000000000..28565ff01c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-argon2user.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateArgon2User( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateArgon2UserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-go/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..fedf00327e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-bcrypt-user.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateBcryptUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateBcryptUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-go/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..c335ab4ea1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-j-w-t.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateJWT( + "<USER_ID>", + users.WithCreateJWTSessionId("<SESSION_ID>"), + users.WithCreateJWTDuration(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-go/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..369aab7ac7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-m-d5user.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateMD5User( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateMD5UserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..1c2097e571 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateMfaRecoveryCodes( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-go/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..2a09bec811 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-p-h-pass-user.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreatePHPassUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreatePHPassUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-go/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..2bc05f91f9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-s-h-a-user.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateSHAUser( + "<USER_ID>", + "email@example.com", + "password", + users.WithCreateSHAUserPasswordVersion("sha1"), + users.WithCreateSHAUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-go/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..f815121290 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateScryptModifiedUser( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + "<PASSWORD_SALT_SEPARATOR>", + "<PASSWORD_SIGNER_KEY>", + users.WithCreateScryptModifiedUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-go/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..f2fde655d2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-scrypt-user.md @@ -0,0 +1,34 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateScryptUser( + "<USER_ID>", + "email@example.com", + "password", + "<PASSWORD_SALT>", + 0, + 0, + 0, + 0, + users.WithCreateScryptUserName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-session.md b/docs/examples/1.8.x/server-go/examples/users/create-session.md new file mode 100644 index 0000000000..b868319613 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-session.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateSession( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-target.md b/docs/examples/1.8.x/server-go/examples/users/create-target.md new file mode 100644 index 0000000000..71c449c603 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-target.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateTarget( + "<USER_ID>", + "<TARGET_ID>", + "email", + "<IDENTIFIER>", + users.WithCreateTargetProviderId("<PROVIDER_ID>"), + users.WithCreateTargetName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create-token.md b/docs/examples/1.8.x/server-go/examples/users/create-token.md new file mode 100644 index 0000000000..d50c7efc28 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create-token.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.CreateToken( + "<USER_ID>", + users.WithCreateTokenLength(4), + users.WithCreateTokenExpire(60), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/create.md b/docs/examples/1.8.x/server-go/examples/users/create.md new file mode 100644 index 0000000000..7cd8920bb2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/create.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.Create( + "<USER_ID>", + users.WithCreateEmail("email@example.com"), + users.WithCreatePhone("+12065550100"), + users.WithCreatePassword(""), + users.WithCreateName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-identity.md b/docs/examples/1.8.x/server-go/examples/users/delete-identity.md new file mode 100644 index 0000000000..f35a7917cc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/delete-identity.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.DeleteIdentity( + "<IDENTITY_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-go/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..bb845b90c1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.DeleteMfaAuthenticator( + "<USER_ID>", + "totp", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-session.md b/docs/examples/1.8.x/server-go/examples/users/delete-session.md new file mode 100644 index 0000000000..62f4bd5a89 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/delete-session.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.DeleteSession( + "<USER_ID>", + "<SESSION_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-go/examples/users/delete-sessions.md new file mode 100644 index 0000000000..235b2b1e9e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/delete-sessions.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.DeleteSessions( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/delete-target.md b/docs/examples/1.8.x/server-go/examples/users/delete-target.md new file mode 100644 index 0000000000..ce942a9ead --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/delete-target.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.DeleteTarget( + "<USER_ID>", + "<TARGET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/delete.md b/docs/examples/1.8.x/server-go/examples/users/delete.md new file mode 100644 index 0000000000..1654957c95 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/delete.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.Delete( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..8b16231be7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.GetMfaRecoveryCodes( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/get-prefs.md b/docs/examples/1.8.x/server-go/examples/users/get-prefs.md new file mode 100644 index 0000000000..4d3298fab8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/get-prefs.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.GetPrefs( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/get-target.md b/docs/examples/1.8.x/server-go/examples/users/get-target.md new file mode 100644 index 0000000000..481052d75d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/get-target.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.GetTarget( + "<USER_ID>", + "<TARGET_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/get.md b/docs/examples/1.8.x/server-go/examples/users/get.md new file mode 100644 index 0000000000..a4da4b741d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/get.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.Get( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list-identities.md b/docs/examples/1.8.x/server-go/examples/users/list-identities.md new file mode 100644 index 0000000000..a9916f5fa3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list-identities.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.ListIdentities( + users.WithListIdentitiesQueries([]interface{}{}), + users.WithListIdentitiesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list-logs.md b/docs/examples/1.8.x/server-go/examples/users/list-logs.md new file mode 100644 index 0000000000..bb36dc531c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list-logs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.ListLogs( + "<USER_ID>", + users.WithListLogsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list-memberships.md b/docs/examples/1.8.x/server-go/examples/users/list-memberships.md new file mode 100644 index 0000000000..1591603971 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list-memberships.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.ListMemberships( + "<USER_ID>", + users.WithListMembershipsQueries([]interface{}{}), + users.WithListMembershipsSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-go/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..8709b21ae7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list-mfa-factors.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.ListMfaFactors( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list-sessions.md b/docs/examples/1.8.x/server-go/examples/users/list-sessions.md new file mode 100644 index 0000000000..be4202400c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list-sessions.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.ListSessions( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list-targets.md b/docs/examples/1.8.x/server-go/examples/users/list-targets.md new file mode 100644 index 0000000000..ed78ade5a8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list-targets.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.ListTargets( + "<USER_ID>", + users.WithListTargetsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/list.md b/docs/examples/1.8.x/server-go/examples/users/list.md new file mode 100644 index 0000000000..c74a59a7e2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/list.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.List( + users.WithListQueries([]interface{}{}), + users.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-go/examples/users/update-email-verification.md new file mode 100644 index 0000000000..411cd831c5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-email-verification.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateEmailVerification( + "<USER_ID>", + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-email.md b/docs/examples/1.8.x/server-go/examples/users/update-email.md new file mode 100644 index 0000000000..1e01350731 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-email.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateEmail( + "<USER_ID>", + "email@example.com", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-labels.md b/docs/examples/1.8.x/server-go/examples/users/update-labels.md new file mode 100644 index 0000000000..0b735cdef5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-labels.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateLabels( + "<USER_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-go/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..d495b752de --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateMfaRecoveryCodes( + "<USER_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-mfa.md b/docs/examples/1.8.x/server-go/examples/users/update-mfa.md new file mode 100644 index 0000000000..cfcddbf5e1 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-mfa.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateMfa( + "<USER_ID>", + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-name.md b/docs/examples/1.8.x/server-go/examples/users/update-name.md new file mode 100644 index 0000000000..da9f3d5ac7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-name.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateName( + "<USER_ID>", + "<NAME>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-password.md b/docs/examples/1.8.x/server-go/examples/users/update-password.md new file mode 100644 index 0000000000..d09f5bb92c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-password.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdatePassword( + "<USER_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-go/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..fdf01898ea --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-phone-verification.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdatePhoneVerification( + "<USER_ID>", + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-phone.md b/docs/examples/1.8.x/server-go/examples/users/update-phone.md new file mode 100644 index 0000000000..f4f5b5d01d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-phone.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdatePhone( + "<USER_ID>", + "+12065550100", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-prefs.md b/docs/examples/1.8.x/server-go/examples/users/update-prefs.md new file mode 100644 index 0000000000..75cb55b868 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-prefs.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdatePrefs( + "<USER_ID>", + map[string]interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-status.md b/docs/examples/1.8.x/server-go/examples/users/update-status.md new file mode 100644 index 0000000000..964ed3bf92 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-status.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateStatus( + "<USER_ID>", + false, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/users/update-target.md b/docs/examples/1.8.x/server-go/examples/users/update-target.md new file mode 100644 index 0000000000..2c1ab3b71e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/users/update-target.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/users" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := users.New(client) + response, error := service.UpdateTarget( + "<USER_ID>", + "<TARGET_ID>", + users.WithUpdateTargetIdentifier("<IDENTIFIER>"), + users.WithUpdateTargetProviderId("<PROVIDER_ID>"), + users.WithUpdateTargetName("<NAME>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-graphql/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..92c12acee5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-anonymous-session.md @@ -0,0 +1,33 @@ +mutation { + accountCreateAnonymousSession { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-graphql/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..931bb4add0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-email-password-session.md @@ -0,0 +1,36 @@ +mutation { + accountCreateEmailPasswordSession( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-email-token.md b/docs/examples/1.8.x/server-graphql/examples/account/create-email-token.md new file mode 100644 index 0000000000..de320b45ed --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +mutation { + accountCreateEmailToken( + userId: "<USER_ID>", + email: "email@example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-graphql/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a5204f1256 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-j-w-t.md @@ -0,0 +1,5 @@ +mutation { + accountCreateJWT { + jwt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-graphql/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..4024a5b3a9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +mutation { + accountCreateMagicURLToken( + userId: "<USER_ID>", + email: "email@example.com", + url: "https://example.com", + phrase: false + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..6b29292494 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-authenticator.md @@ -0,0 +1,8 @@ +mutation { + accountCreateMfaAuthenticator( + type: "totp" + ) { + secret + uri + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..eb5cba127d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-challenge.md @@ -0,0 +1,10 @@ +mutation { + accountCreateMfaChallenge( + factor: "email" + ) { + _id + _createdAt + userId + expire + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..f39b7d080d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +mutation { + accountCreateMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-graphql/examples/account/create-phone-token.md new file mode 100644 index 0000000000..b56c4eb4e4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +mutation { + accountCreatePhoneToken( + userId: "<USER_ID>", + phone: "+12065550100" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-graphql/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..a4cad59b1a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +mutation { + accountCreatePhoneVerification { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-recovery.md b/docs/examples/1.8.x/server-graphql/examples/account/create-recovery.md new file mode 100644 index 0000000000..ad31fd82d7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +mutation { + accountCreateRecovery( + email: "email@example.com", + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-session.md b/docs/examples/1.8.x/server-graphql/examples/account/create-session.md new file mode 100644 index 0000000000..f473d14207 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-session.md @@ -0,0 +1,36 @@ +mutation { + accountCreateSession( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create-verification.md b/docs/examples/1.8.x/server-graphql/examples/account/create-verification.md new file mode 100644 index 0000000000..df50dda529 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create-verification.md @@ -0,0 +1,12 @@ +mutation { + accountCreateVerification( + url: "https://example.com" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/create.md b/docs/examples/1.8.x/server-graphql/examples/account/create.md new file mode 100644 index 0000000000..0d39394a3d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/create.md @@ -0,0 +1,40 @@ +mutation { + accountCreate( + userId: "<USER_ID>", + email: "email@example.com", + password: "", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/delete-identity.md b/docs/examples/1.8.x/server-graphql/examples/account/delete-identity.md new file mode 100644 index 0000000000..f3c2e2e7b9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/delete-identity.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteIdentity( + identityId: "<IDENTITY_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-graphql/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..fc5486623a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteMfaAuthenticator( + type: "totp" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/delete-session.md b/docs/examples/1.8.x/server-graphql/examples/account/delete-session.md new file mode 100644 index 0000000000..09aff38fdd --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/delete-session.md @@ -0,0 +1,7 @@ +mutation { + accountDeleteSession( + sessionId: "<SESSION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-graphql/examples/account/delete-sessions.md new file mode 100644 index 0000000000..b0d61daa81 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/delete-sessions.md @@ -0,0 +1,5 @@ +mutation { + accountDeleteSessions { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-graphql/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/get-prefs.md b/docs/examples/1.8.x/server-graphql/examples/account/get-prefs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/get-session.md b/docs/examples/1.8.x/server-graphql/examples/account/get-session.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/get.md b/docs/examples/1.8.x/server-graphql/examples/account/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/list-identities.md b/docs/examples/1.8.x/server-graphql/examples/account/list-identities.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/list-logs.md b/docs/examples/1.8.x/server-graphql/examples/account/list-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-graphql/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/list-sessions.md b/docs/examples/1.8.x/server-graphql/examples/account/list-sessions.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-email.md b/docs/examples/1.8.x/server-graphql/examples/account/update-email.md new file mode 100644 index 0000000000..c879e24a43 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-email.md @@ -0,0 +1,38 @@ +mutation { + accountUpdateEmail( + email: "email@example.com", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-graphql/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..787c2e0860 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-m-f-a.md @@ -0,0 +1,37 @@ +mutation { + accountUpdateMFA( + mfa: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-graphql/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..075bc91d17 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,36 @@ +mutation { + accountUpdateMagicURLSession( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9cfe9150be --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-authenticator.md @@ -0,0 +1,38 @@ +mutation { + accountUpdateMfaAuthenticator( + type: "totp", + otp: "<OTP>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..0bcec2157f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-challenge.md @@ -0,0 +1,36 @@ +mutation { + accountUpdateMfaChallenge( + challengeId: "<CHALLENGE_ID>", + otp: "<OTP>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e706d2b9d7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +mutation { + accountUpdateMfaRecoveryCodes { + recoveryCodes + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-name.md b/docs/examples/1.8.x/server-graphql/examples/account/update-name.md new file mode 100644 index 0000000000..8ba2c99d9c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-name.md @@ -0,0 +1,37 @@ +mutation { + accountUpdateName( + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-password.md b/docs/examples/1.8.x/server-graphql/examples/account/update-password.md new file mode 100644 index 0000000000..f3619a10d2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-password.md @@ -0,0 +1,38 @@ +mutation { + accountUpdatePassword( + password: "", + oldPassword: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-graphql/examples/account/update-phone-session.md new file mode 100644 index 0000000000..199e774ab0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-phone-session.md @@ -0,0 +1,36 @@ +mutation { + accountUpdatePhoneSession( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-graphql/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..dd62298bb9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +mutation { + accountUpdatePhoneVerification( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-phone.md b/docs/examples/1.8.x/server-graphql/examples/account/update-phone.md new file mode 100644 index 0000000000..adecb71168 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-phone.md @@ -0,0 +1,38 @@ +mutation { + accountUpdatePhone( + phone: "+12065550100", + password: "password" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-prefs.md b/docs/examples/1.8.x/server-graphql/examples/account/update-prefs.md new file mode 100644 index 0000000000..57280247e4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-prefs.md @@ -0,0 +1,37 @@ +mutation { + accountUpdatePrefs( + prefs: "{}" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-recovery.md b/docs/examples/1.8.x/server-graphql/examples/account/update-recovery.md new file mode 100644 index 0000000000..2d15fdcaa1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +mutation { + accountUpdateRecovery( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-session.md b/docs/examples/1.8.x/server-graphql/examples/account/update-session.md new file mode 100644 index 0000000000..29a8979872 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-session.md @@ -0,0 +1,35 @@ +mutation { + accountUpdateSession( + sessionId: "<SESSION_ID>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-status.md b/docs/examples/1.8.x/server-graphql/examples/account/update-status.md new file mode 100644 index 0000000000..c17f556842 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-status.md @@ -0,0 +1,35 @@ +mutation { + accountUpdateStatus { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/account/update-verification.md b/docs/examples/1.8.x/server-graphql/examples/account/update-verification.md new file mode 100644 index 0000000000..11e63c7da3 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/account/update-verification.md @@ -0,0 +1,13 @@ +mutation { + accountUpdateVerification( + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-browser.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-flag.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-image.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-image.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-initials.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-graphql/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..aa0bfa832e --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-boolean-attribute.md @@ -0,0 +1,20 @@ +mutation { + databasesCreateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md new file mode 100644 index 0000000000..00dfba1e7b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md @@ -0,0 +1,31 @@ +mutation { + databasesCreateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], + documentSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + key + type + status + error + attributes + lengths + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..47601df0d8 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-datetime-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-document.md new file mode 100644 index 0000000000..4f525d6b1f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-document.md @@ -0,0 +1,18 @@ +mutation { + databasesCreateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-documents.md new file mode 100644 index 0000000000..8ce79dcbb5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-documents.md @@ -0,0 +1,19 @@ +mutation { + databasesCreateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [] + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..e5845ccd47 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-email-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..d13c080e4a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-enum-attribute.md @@ -0,0 +1,23 @@ +mutation { + databasesCreateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..2a270c3aff --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-float-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesCreateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md new file mode 100644 index 0000000000..c647930943 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + type: "key", + attributes: [], + orders: [], + lengths: [] + ) { + key + type + status + error + attributes + lengths + orders + _createdAt + _updatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..8c79706817 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-integer-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesCreateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..0f4ad9e139 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-ip-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..f66b87d6af --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-relationship-attribute.md @@ -0,0 +1,27 @@ +mutation { + databasesCreateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + relatedCollectionId: "<RELATED_COLLECTION_ID>", + type: "oneToOne", + twoWay: false, + key: "", + twoWayKey: "", + onDelete: "cascade" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedCollection + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..489f9ce015 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-string-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesCreateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..89ad873e52 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-url-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesCreateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create.md b/docs/examples/1.8.x/server-graphql/examples/databases/create.md new file mode 100644 index 0000000000..c48e024e7c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create.md @@ -0,0 +1,13 @@ +mutation { + databasesCreate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..2e7970049d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/decrement-document-attribute.md @@ -0,0 +1,19 @@ +mutation { + databasesDecrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "", + value: 0, + min: 0 + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..af0f9d6615 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/delete-attribute.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/delete-collection.md new file mode 100644 index 0000000000..8683bd87a4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/delete-collection.md @@ -0,0 +1,8 @@ +mutation { + databasesDeleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/delete-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/delete-document.md new file mode 100644 index 0000000000..848371bca0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/delete-documents.md new file mode 100644 index 0000000000..5822d3b950 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/delete-documents.md @@ -0,0 +1,19 @@ +mutation { + databasesDeleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/delete-index.md b/docs/examples/1.8.x/server-graphql/examples/databases/delete-index.md new file mode 100644 index 0000000000..a2389cf9d4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/delete-index.md @@ -0,0 +1,9 @@ +mutation { + databasesDeleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/delete.md b/docs/examples/1.8.x/server-graphql/examples/databases/delete.md new file mode 100644 index 0000000000..7cd4c92341 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/delete.md @@ -0,0 +1,7 @@ +mutation { + databasesDelete( + databaseId: "<DATABASE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/get-attribute.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/get-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/get-collection.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/get-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/get-document.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/get-index.md b/docs/examples/1.8.x/server-graphql/examples/databases/get-index.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/get.md b/docs/examples/1.8.x/server-graphql/examples/databases/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..322ed69ced --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/increment-document-attribute.md @@ -0,0 +1,19 @@ +mutation { + databasesIncrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "", + value: 0, + max: 0 + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-graphql/examples/databases/list-attributes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/list-collections.md b/docs/examples/1.8.x/server-graphql/examples/databases/list-collections.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/list-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/list-documents.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-graphql/examples/databases/list-indexes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/list.md b/docs/examples/1.8.x/server-graphql/examples/databases/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..d508e62139 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-boolean-attribute.md @@ -0,0 +1,20 @@ +mutation { + databasesUpdateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md new file mode 100644 index 0000000000..040578ae9d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md @@ -0,0 +1,31 @@ +mutation { + databasesUpdateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], + documentSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + key + type + status + error + attributes + lengths + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..a21b910edc --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-datetime-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesUpdateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-document.md new file mode 100644 index 0000000000..aea605d9d7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-document.md @@ -0,0 +1,18 @@ +mutation { + databasesUpdateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-documents.md new file mode 100644 index 0000000000..83c0c07f84 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-documents.md @@ -0,0 +1,20 @@ +mutation { + databasesUpdateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: "{}", + queries: [] + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..6c83d80e16 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-email-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesUpdateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..378e32f9b8 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-enum-attribute.md @@ -0,0 +1,23 @@ +mutation { + databasesUpdateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..c70232e749 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-float-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesUpdateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..b24af5f260 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-integer-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesUpdateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..7a26224200 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-ip-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesUpdateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..6694540d93 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-relationship-attribute.md @@ -0,0 +1,24 @@ +mutation { + databasesUpdateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + onDelete: "cascade", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedCollection + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..f9398c9ca1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-string-attribute.md @@ -0,0 +1,23 @@ +mutation { + databasesUpdateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..f9f14a04f6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-url-attribute.md @@ -0,0 +1,21 @@ +mutation { + databasesUpdateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update.md b/docs/examples/1.8.x/server-graphql/examples/databases/update.md new file mode 100644 index 0000000000..88d286dc8a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update.md @@ -0,0 +1,13 @@ +mutation { + databasesUpdate( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md new file mode 100644 index 0000000000..c381fe35a3 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md @@ -0,0 +1,16 @@ +mutation { + databasesUpsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..b4bf914eca --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md @@ -0,0 +1,18 @@ +mutation { + databasesUpsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md new file mode 100644 index 0000000000..0e7cc7d19a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md @@ -0,0 +1,24 @@ +POST /v1/functions/{functionId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { functionsCreateDeployment(functionId: $functionId, code: $code, activate: $activate, entrypoint: $entrypoint, commands: $commands) { id }" }, "variables": { "functionId": "<FUNCTION_ID>", "code": null, "activate": false, "entrypoint": "<ENTRYPOINT>", "commands": "<COMMANDS>" } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.code"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="code.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..cdd92c2a02 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,35 @@ +mutation { + functionsCreateDuplicateDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + buildId: "<BUILD_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md new file mode 100644 index 0000000000..1479aa3bb6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md @@ -0,0 +1,35 @@ +mutation { + functionsCreateExecution( + functionId: "<FUNCTION_ID>", + body: "<BODY>", + async: false, + path: "<PATH>", + method: "GET", + headers: "{}", + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + _permissions + functionId + trigger + status + requestMethod + requestPath + requestHeaders { + name + value + } + responseStatusCode + responseBody + responseHeaders { + name + value + } + logs + errors + duration + scheduledAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..12c50c32f3 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-template-deployment.md @@ -0,0 +1,38 @@ +mutation { + functionsCreateTemplateDeployment( + functionId: "<FUNCTION_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-variable.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-variable.md new file mode 100644 index 0000000000..6c64922320 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-variable.md @@ -0,0 +1,17 @@ +mutation { + functionsCreateVariable( + functionId: "<FUNCTION_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..ebfced2c68 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-vcs-deployment.md @@ -0,0 +1,36 @@ +mutation { + functionsCreateVcsDeployment( + functionId: "<FUNCTION_ID>", + type: "branch", + reference: "<REFERENCE>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create.md b/docs/examples/1.8.x/server-graphql/examples/functions/create.md new file mode 100644 index 0000000000..2df77be8ec --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create.md @@ -0,0 +1,60 @@ +mutation { + functionsCreate( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: "node-14.5", + execute: ["any"], + events: [], + schedule: "", + timeout: 1, + enabled: false, + logging: false, + entrypoint: "<ENTRYPOINT>", + commands: "<COMMANDS>", + scopes: [], + installationId: "<INSTALLATION_ID>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + specification: "" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..8d83f28d4f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/delete-deployment.md @@ -0,0 +1,8 @@ +mutation { + functionsDeleteDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-graphql/examples/functions/delete-execution.md new file mode 100644 index 0000000000..c6e950afc9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/delete-execution.md @@ -0,0 +1,8 @@ +mutation { + functionsDeleteExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-graphql/examples/functions/delete-variable.md new file mode 100644 index 0000000000..9bc2d9b6e6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/delete-variable.md @@ -0,0 +1,8 @@ +mutation { + functionsDeleteVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/delete.md b/docs/examples/1.8.x/server-graphql/examples/functions/delete.md new file mode 100644 index 0000000000..db019bf376 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/delete.md @@ -0,0 +1,7 @@ +mutation { + functionsDelete( + functionId: "<FUNCTION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-graphql/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/get-deployment.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/get-execution.md b/docs/examples/1.8.x/server-graphql/examples/functions/get-execution.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/get-variable.md b/docs/examples/1.8.x/server-graphql/examples/functions/get-variable.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/get.md b/docs/examples/1.8.x/server-graphql/examples/functions/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-graphql/examples/functions/list-deployments.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/list-executions.md b/docs/examples/1.8.x/server-graphql/examples/functions/list-executions.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-graphql/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-graphql/examples/functions/list-specifications.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/list-variables.md b/docs/examples/1.8.x/server-graphql/examples/functions/list-variables.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/list.md b/docs/examples/1.8.x/server-graphql/examples/functions/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..50df97fd21 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/update-deployment-status.md @@ -0,0 +1,34 @@ +mutation { + functionsUpdateDeploymentStatus( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..3ff2220fda --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/update-function-deployment.md @@ -0,0 +1,44 @@ +mutation { + functionsUpdateFunctionDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/update-variable.md b/docs/examples/1.8.x/server-graphql/examples/functions/update-variable.md new file mode 100644 index 0000000000..15c8e3bdf3 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/update-variable.md @@ -0,0 +1,18 @@ +mutation { + functionsUpdateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/update.md b/docs/examples/1.8.x/server-graphql/examples/functions/update.md new file mode 100644 index 0000000000..7510cdc50d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/functions/update.md @@ -0,0 +1,60 @@ +mutation { + functionsUpdate( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: "node-14.5", + execute: ["any"], + events: [], + schedule: "", + timeout: 1, + enabled: false, + logging: false, + entrypoint: "<ENTRYPOINT>", + commands: "<COMMANDS>", + scopes: [], + installationId: "<INSTALLATION_ID>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + specification: "" + ) { + _id + _createdAt + _updatedAt + execute + name + enabled + live + logging + runtime + deploymentId + deploymentCreatedAt + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + scopes + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + events + schedule + timeout + entrypoint + commands + version + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-graphql/examples/health/get-antivirus.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-cache.md b/docs/examples/1.8.x/server-graphql/examples/health/get-cache.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-certificate.md b/docs/examples/1.8.x/server-graphql/examples/health/get-certificate.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-d-b.md b/docs/examples/1.8.x/server-graphql/examples/health/get-d-b.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-graphql/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-graphql/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-graphql/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-graphql/examples/health/get-storage-local.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-storage.md b/docs/examples/1.8.x/server-graphql/examples/health/get-storage.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get-time.md b/docs/examples/1.8.x/server-graphql/examples/health/get-time.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/health/get.md b/docs/examples/1.8.x/server-graphql/examples/health/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/get.md b/docs/examples/1.8.x/server-graphql/examples/locale/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-codes.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-codes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-continents.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-continents.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-countries.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-countries.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-currencies.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/locale/list-languages.md b/docs/examples/1.8.x/server-graphql/examples/locale/list-languages.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..425b3bb8dc --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-apns-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingCreateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + authKey: "<AUTH_KEY>", + authKeyId: "<AUTH_KEY_ID>", + teamId: "<TEAM_ID>", + bundleId: "<BUNDLE_ID>", + sandbox: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-email.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-email.md new file mode 100644 index 0000000000..a1e35aad19 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-email.md @@ -0,0 +1,30 @@ +mutation { + messagingCreateEmail( + messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", + topics: [], + users: [], + targets: [], + cc: [], + bcc: [], + attachments: [], + draft: false, + html: false, + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..0aa48a9e2f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-fcm-provider.md @@ -0,0 +1,18 @@ +mutation { + messagingCreateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + serviceAccountJSON: "{}", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..9da1e23847 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,24 @@ +mutation { + messagingCreateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + domain: "<DOMAIN>", + isEuRegion: false, + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..ddaf2d4c2b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-msg91provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + templateId: "<TEMPLATE_ID>", + senderId: "<SENDER_ID>", + authKey: "<AUTH_KEY>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-push.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-push.md new file mode 100644 index 0000000000..92264d1b67 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-push.md @@ -0,0 +1,37 @@ +mutation { + messagingCreatePush( + messageId: "<MESSAGE_ID>", + title: "<TITLE>", + body: "<BODY>", + topics: [], + users: [], + targets: [], + data: "{}", + action: "<ACTION>", + image: "[ID1:ID2]", + icon: "<ICON>", + sound: "<SOUND>", + color: "<COLOR>", + tag: "<TAG>", + badge: 0, + draft: false, + scheduledAt: "", + contentAvailable: false, + critical: false, + priority: "normal" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..cda0652d67 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingCreateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-sms.md new file mode 100644 index 0000000000..99af83b154 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-sms.md @@ -0,0 +1,25 @@ +mutation { + messagingCreateSms( + messageId: "<MESSAGE_ID>", + content: "<CONTENT>", + topics: [], + users: [], + targets: [], + draft: false, + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..b7b24bc1a5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-smtp-provider.md @@ -0,0 +1,28 @@ +mutation { + messagingCreateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, + username: "<USERNAME>", + password: "<PASSWORD>", + encryption: "none", + autoTLS: false, + mailer: "<MAILER>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "email@example.com", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..bab53612b7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-subscriber.md @@ -0,0 +1,27 @@ +mutation { + messagingCreateSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>", + targetId: "<TARGET_ID>" + ) { + _id + _createdAt + _updatedAt + targetId + target { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + userId + userName + topicId + providerType + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..7960a8427f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-telesign-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + customerId: "<CUSTOMER_ID>", + apiKey: "<API_KEY>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..e082097b70 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + username: "<USERNAME>", + apiKey: "<API_KEY>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-topic.md new file mode 100644 index 0000000000..6216c4cda5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-topic.md @@ -0,0 +1,16 @@ +mutation { + messagingCreateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"] + ) { + _id + _createdAt + _updatedAt + name + emailTotal + smsTotal + pushTotal + subscribe + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..ac14d1d32b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-twilio-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + accountSid: "<ACCOUNT_SID>", + authToken: "<AUTH_TOKEN>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..ca7a710896 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/create-vonage-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingCreateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", + apiKey: "<API_KEY>", + apiSecret: "<API_SECRET>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..8d9ac35953 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/delete-provider.md @@ -0,0 +1,7 @@ +mutation { + messagingDeleteProvider( + providerId: "<PROVIDER_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-graphql/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..ededffcaac --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/delete-subscriber.md @@ -0,0 +1,8 @@ +mutation { + messagingDeleteSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-graphql/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..e49cd1ed91 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/delete-topic.md @@ -0,0 +1,7 @@ +mutation { + messagingDeleteTopic( + topicId: "<TOPIC_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/delete.md b/docs/examples/1.8.x/server-graphql/examples/messaging/delete.md new file mode 100644 index 0000000000..495557ef18 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/delete.md @@ -0,0 +1,7 @@ +mutation { + messagingDelete( + messageId: "<MESSAGE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/get-message.md b/docs/examples/1.8.x/server-graphql/examples/messaging/get-message.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/get-provider.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-graphql/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-graphql/examples/messaging/get-topic.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-messages.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-providers.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-targets.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-graphql/examples/messaging/list-topics.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..b3d6e8745e --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-apns-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingUpdateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + authKey: "<AUTH_KEY>", + authKeyId: "<AUTH_KEY_ID>", + teamId: "<TEAM_ID>", + bundleId: "<BUNDLE_ID>", + sandbox: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-email.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-email.md new file mode 100644 index 0000000000..1d1302efc4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-email.md @@ -0,0 +1,30 @@ +mutation { + messagingUpdateEmail( + messageId: "<MESSAGE_ID>", + topics: [], + users: [], + targets: [], + subject: "<SUBJECT>", + content: "<CONTENT>", + draft: false, + html: false, + cc: [], + bcc: [], + scheduledAt: "", + attachments: [] + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..a0b3f9e3da --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-fcm-provider.md @@ -0,0 +1,18 @@ +mutation { + messagingUpdateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + serviceAccountJSON: "{}" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..6c26d52ff2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,24 @@ +mutation { + messagingUpdateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", + domain: "<DOMAIN>", + isEuRegion: false, + enabled: false, + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..a6552a4734 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-msg91provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + templateId: "<TEMPLATE_ID>", + senderId: "<SENDER_ID>", + authKey: "<AUTH_KEY>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-push.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-push.md new file mode 100644 index 0000000000..8ee2f57610 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-push.md @@ -0,0 +1,37 @@ +mutation { + messagingUpdatePush( + messageId: "<MESSAGE_ID>", + topics: [], + users: [], + targets: [], + title: "<TITLE>", + body: "<BODY>", + data: "{}", + action: "<ACTION>", + image: "[ID1:ID2]", + icon: "<ICON>", + sound: "<SOUND>", + color: "<COLOR>", + tag: "<TAG>", + badge: 0, + draft: false, + scheduledAt: "", + contentAvailable: false, + critical: false, + priority: "normal" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..319dcea461 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,22 @@ +mutation { + messagingUpdateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + apiKey: "<API_KEY>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-sms.md new file mode 100644 index 0000000000..7b45f09abc --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-sms.md @@ -0,0 +1,25 @@ +mutation { + messagingUpdateSms( + messageId: "<MESSAGE_ID>", + topics: [], + users: [], + targets: [], + content: "<CONTENT>", + draft: false, + scheduledAt: "" + ) { + _id + _createdAt + _updatedAt + providerType + topics + users + targets + scheduledAt + deliveredAt + deliveryErrors + deliveredTotal + data + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..a091685655 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-smtp-provider.md @@ -0,0 +1,28 @@ +mutation { + messagingUpdateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, + username: "<USERNAME>", + password: "<PASSWORD>", + encryption: "none", + autoTLS: false, + mailer: "<MAILER>", + fromName: "<FROM_NAME>", + fromEmail: "email@example.com", + replyToName: "<REPLY_TO_NAME>", + replyToEmail: "<REPLY_TO_EMAIL>", + enabled: false + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..c9c96c0d5d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-telesign-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + customerId: "<CUSTOMER_ID>", + apiKey: "<API_KEY>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..3fd68ed8e9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + username: "<USERNAME>", + apiKey: "<API_KEY>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-topic.md new file mode 100644 index 0000000000..8d3dc84c72 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-topic.md @@ -0,0 +1,16 @@ +mutation { + messagingUpdateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"] + ) { + _id + _createdAt + _updatedAt + name + emailTotal + smsTotal + pushTotal + subscribe + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..6f10839567 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-twilio-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + accountSid: "<ACCOUNT_SID>", + authToken: "<AUTH_TOKEN>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-graphql/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..f42670a428 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/messaging/update-vonage-provider.md @@ -0,0 +1,20 @@ +mutation { + messagingUpdateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + enabled: false, + apiKey: "<API_KEY>", + apiSecret: "<API_SECRET>", + from: "<FROM>" + ) { + _id + _createdAt + _updatedAt + name + provider + enabled + type + credentials + options + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md new file mode 100644 index 0000000000..8f77dd60eb --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md @@ -0,0 +1,24 @@ +POST /v1/sites/{siteId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { sitesCreateDeployment(siteId: $siteId, code: $code, activate: $activate, installCommand: $installCommand, buildCommand: $buildCommand, outputDirectory: $outputDirectory) { id }" }, "variables": { "siteId": "<SITE_ID>", "code": null, "activate": false, "installCommand": "<INSTALL_COMMAND>", "buildCommand": "<BUILD_COMMAND>", "outputDirectory": "<OUTPUT_DIRECTORY>" } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.code"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="code.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..6226282651 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,34 @@ +mutation { + sitesCreateDuplicateDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..72562556e4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-template-deployment.md @@ -0,0 +1,38 @@ +mutation { + sitesCreateTemplateDeployment( + siteId: "<SITE_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-variable.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-variable.md new file mode 100644 index 0000000000..6bc92de43a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-variable.md @@ -0,0 +1,17 @@ +mutation { + sitesCreateVariable( + siteId: "<SITE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..ccc18cf2e0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-vcs-deployment.md @@ -0,0 +1,36 @@ +mutation { + sitesCreateVcsDeployment( + siteId: "<SITE_ID>", + type: "branch", + reference: "<REFERENCE>", + activate: false + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create.md b/docs/examples/1.8.x/server-graphql/examples/sites/create.md new file mode 100644 index 0000000000..bb89ac9344 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create.md @@ -0,0 +1,61 @@ +mutation { + sitesCreate( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: "analog", + buildRuntime: "node-14.5", + enabled: false, + logging: false, + timeout: 1, + installCommand: "<INSTALL_COMMAND>", + buildCommand: "<BUILD_COMMAND>", + outputDirectory: "<OUTPUT_DIRECTORY>", + adapter: "static", + installationId: "<INSTALLATION_ID>", + fallbackFile: "<FALLBACK_FILE>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + specification: "" + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + buildRuntime + adapter + fallbackFile + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..443a951cee --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/delete-deployment.md @@ -0,0 +1,8 @@ +mutation { + sitesDeleteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/delete-log.md b/docs/examples/1.8.x/server-graphql/examples/sites/delete-log.md new file mode 100644 index 0000000000..60f27218c0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/delete-log.md @@ -0,0 +1,8 @@ +mutation { + sitesDeleteLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-graphql/examples/sites/delete-variable.md new file mode 100644 index 0000000000..2f86eddff1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/delete-variable.md @@ -0,0 +1,8 @@ +mutation { + sitesDeleteVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/delete.md b/docs/examples/1.8.x/server-graphql/examples/sites/delete.md new file mode 100644 index 0000000000..35138f6d4f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/delete.md @@ -0,0 +1,7 @@ +mutation { + sitesDelete( + siteId: "<SITE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-graphql/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/get-deployment.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/get-log.md b/docs/examples/1.8.x/server-graphql/examples/sites/get-log.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/get-variable.md b/docs/examples/1.8.x/server-graphql/examples/sites/get-variable.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/get.md b/docs/examples/1.8.x/server-graphql/examples/sites/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-graphql/examples/sites/list-deployments.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-graphql/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/list-logs.md b/docs/examples/1.8.x/server-graphql/examples/sites/list-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-graphql/examples/sites/list-specifications.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/list-variables.md b/docs/examples/1.8.x/server-graphql/examples/sites/list-variables.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/list.md b/docs/examples/1.8.x/server-graphql/examples/sites/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..92751c167f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/update-deployment-status.md @@ -0,0 +1,34 @@ +mutation { + sitesUpdateDeploymentStatus( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + type + resourceId + resourceType + entrypoint + sourceSize + buildSize + totalSize + buildId + activate + screenshotLight + screenshotDark + status + buildLogs + buildDuration + providerRepositoryName + providerRepositoryOwner + providerRepositoryUrl + providerBranch + providerCommitHash + providerCommitAuthorUrl + providerCommitAuthor + providerCommitMessage + providerCommitUrl + providerBranchUrl + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..6c09c03735 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/update-site-deployment.md @@ -0,0 +1,45 @@ +mutation { + sitesUpdateSiteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + buildRuntime + adapter + fallbackFile + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/update-variable.md b/docs/examples/1.8.x/server-graphql/examples/sites/update-variable.md new file mode 100644 index 0000000000..240dca60f3 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/update-variable.md @@ -0,0 +1,18 @@ +mutation { + sitesUpdateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false + ) { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/update.md b/docs/examples/1.8.x/server-graphql/examples/sites/update.md new file mode 100644 index 0000000000..801eca3161 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/sites/update.md @@ -0,0 +1,61 @@ +mutation { + sitesUpdate( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: "analog", + enabled: false, + logging: false, + timeout: 1, + installCommand: "<INSTALL_COMMAND>", + buildCommand: "<BUILD_COMMAND>", + outputDirectory: "<OUTPUT_DIRECTORY>", + buildRuntime: "node-14.5", + adapter: "static", + fallbackFile: "<FALLBACK_FILE>", + installationId: "<INSTALLATION_ID>", + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", + providerBranch: "<PROVIDER_BRANCH>", + providerSilentMode: false, + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", + specification: "" + ) { + _id + _createdAt + _updatedAt + name + enabled + live + logging + framework + deploymentId + deploymentCreatedAt + deploymentScreenshotLight + deploymentScreenshotDark + latestDeploymentId + latestDeploymentCreatedAt + latestDeploymentStatus + vars { + _id + _createdAt + _updatedAt + key + value + secret + resourceType + resourceId + } + timeout + installCommand + buildCommand + outputDirectory + installationId + providerRepositoryId + providerBranch + providerRootDirectory + providerSilentMode + specification + buildRuntime + adapter + fallbackFile + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-graphql/examples/storage/create-bucket.md new file mode 100644 index 0000000000..45d03802d2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/storage/create-bucket.md @@ -0,0 +1,27 @@ +mutation { + storageCreateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: "none", + encryption: false, + antivirus: false + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md b/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md new file mode 100644 index 0000000000..5b4f9a0c22 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md @@ -0,0 +1,26 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file, permissions: $permissions) { id }" }, "variables": { "bucketId": "<BUCKET_ID>", "fileId": "<FILE_ID>", "file": null, "permissions": ["read("any")"] } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.file"], } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="file.ext" + +File contents + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-graphql/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..3dadd1f072 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/storage/delete-bucket.md @@ -0,0 +1,7 @@ +mutation { + storageDeleteBucket( + bucketId: "<BUCKET_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/delete-file.md b/docs/examples/1.8.x/server-graphql/examples/storage/delete-file.md new file mode 100644 index 0000000000..17ec89931a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/storage/delete-file.md @@ -0,0 +1,8 @@ +mutation { + storageDeleteFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-graphql/examples/storage/get-bucket.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-graphql/examples/storage/get-file-download.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-graphql/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-graphql/examples/storage/get-file-view.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/get-file.md b/docs/examples/1.8.x/server-graphql/examples/storage/get-file.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-graphql/examples/storage/list-buckets.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/list-files.md b/docs/examples/1.8.x/server-graphql/examples/storage/list-files.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-graphql/examples/storage/update-bucket.md new file mode 100644 index 0000000000..8265a15a58 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/storage/update-bucket.md @@ -0,0 +1,27 @@ +mutation { + storageUpdateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], + fileSecurity: false, + enabled: false, + maximumFileSize: 1, + allowedFileExtensions: [], + compression: "none", + encryption: false, + antivirus: false + ) { + _id + _createdAt + _updatedAt + _permissions + fileSecurity + name + enabled + maximumFileSize + allowedFileExtensions + compression + encryption + antivirus + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/update-file.md b/docs/examples/1.8.x/server-graphql/examples/storage/update-file.md new file mode 100644 index 0000000000..b7832048c7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/storage/update-file.md @@ -0,0 +1,20 @@ +mutation { + storageUpdateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + name: "<NAME>", + permissions: ["read("any")"] + ) { + _id + bucketId + _createdAt + _updatedAt + _permissions + name + signature + mimeType + sizeOriginal + chunksTotal + chunksUploaded + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..564b1a964c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md @@ -0,0 +1,20 @@ +mutation { + tablesCreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..34055c27fa --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md new file mode 100644 index 0000000000..a45001d0be --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..5d1c516e3a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md @@ -0,0 +1,23 @@ +mutation { + tablesCreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md new file mode 100644 index 0000000000..09bf481a33 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md @@ -0,0 +1,24 @@ +mutation { + tablesCreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md new file mode 100644 index 0000000000..bc47403c64 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: "key", + columns: [], + orders: [], + lengths: [] + ) { + key + type + status + error + columns + lengths + orders + _createdAt + _updatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..04273b18b5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md @@ -0,0 +1,24 @@ +mutation { + tablesCreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..c2f07c760b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..8e56bd3867 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md @@ -0,0 +1,27 @@ +mutation { + tablesCreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: "oneToOne", + twoWay: false, + key: "", + twoWayKey: "", + onDelete: "cascade" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md new file mode 100644 index 0000000000..c88a7f36cf --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md @@ -0,0 +1,18 @@ +mutation { + tablesCreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md new file mode 100644 index 0000000000..a4ae62cfae --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md @@ -0,0 +1,19 @@ +mutation { + tablesCreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md new file mode 100644 index 0000000000..b0b11c2610 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md @@ -0,0 +1,24 @@ +mutation { + tablesCreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md new file mode 100644 index 0000000000..134208b432 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create.md b/docs/examples/1.8.x/server-graphql/examples/tables/create.md new file mode 100644 index 0000000000..73af2c4a8c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create.md @@ -0,0 +1,31 @@ +mutation { + tablesCreate( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], + rowSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + key + type + status + error + columns + lengths + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..4ee58849ff --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +mutation { + tablesDecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, + min: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md new file mode 100644 index 0000000000..2c2ab098d6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md @@ -0,0 +1,9 @@ +mutation { + tablesDeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md new file mode 100644 index 0000000000..c95db41fd6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md @@ -0,0 +1,9 @@ +mutation { + tablesDeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md new file mode 100644 index 0000000000..f3a35c1df1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md @@ -0,0 +1,9 @@ +mutation { + tablesDeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md new file mode 100644 index 0000000000..1ee227b7e5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md @@ -0,0 +1,19 @@ +mutation { + tablesDeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete.md new file mode 100644 index 0000000000..1749422f6a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete.md @@ -0,0 +1,8 @@ +mutation { + tablesDelete( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-column.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-index.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-row.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get.md b/docs/examples/1.8.x/server-graphql/examples/tables/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..f84f149672 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md @@ -0,0 +1,19 @@ +mutation { + tablesIncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, + max: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list.md b/docs/examples/1.8.x/server-graphql/examples/tables/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..541abd97cc --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md @@ -0,0 +1,20 @@ +mutation { + tablesUpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..01714377a4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md @@ -0,0 +1,21 @@ +mutation { + tablesUpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md new file mode 100644 index 0000000000..ffb3a21e66 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md @@ -0,0 +1,21 @@ +mutation { + tablesUpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..45ddb00d6f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md @@ -0,0 +1,23 @@ +mutation { + tablesUpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md new file mode 100644 index 0000000000..f592a53858 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md @@ -0,0 +1,24 @@ +mutation { + tablesUpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..a51f02d4d7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md @@ -0,0 +1,24 @@ +mutation { + tablesUpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..c353c79105 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md @@ -0,0 +1,21 @@ +mutation { + tablesUpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..e94800345b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md @@ -0,0 +1,24 @@ +mutation { + tablesUpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: "cascade", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md new file mode 100644 index 0000000000..8449d8499b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md @@ -0,0 +1,18 @@ +mutation { + tablesUpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md new file mode 100644 index 0000000000..510648f6e1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md @@ -0,0 +1,20 @@ +mutation { + tablesUpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: "{}", + queries: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md new file mode 100644 index 0000000000..0771d9a6af --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md @@ -0,0 +1,23 @@ +mutation { + tablesUpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md new file mode 100644 index 0000000000..a5c4a4432d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md @@ -0,0 +1,21 @@ +mutation { + tablesUpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update.md b/docs/examples/1.8.x/server-graphql/examples/tables/update.md new file mode 100644 index 0000000000..4aa434c3ed --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update.md @@ -0,0 +1,31 @@ +mutation { + tablesUpdate( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], + rowSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + key + type + status + error + columns + lengths + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md new file mode 100644 index 0000000000..480d7651bd --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +mutation { + tablesUpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..6015470c16 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md @@ -0,0 +1,18 @@ +mutation { + tablesUpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/create-membership.md b/docs/examples/1.8.x/server-graphql/examples/teams/create-membership.md new file mode 100644 index 0000000000..fe741f080d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/create-membership.md @@ -0,0 +1,25 @@ +mutation { + teamsCreateMembership( + teamId: "<TEAM_ID>", + roles: [], + email: "email@example.com", + userId: "<USER_ID>", + phone: "+12065550100", + url: "https://example.com", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/create.md b/docs/examples/1.8.x/server-graphql/examples/teams/create.md new file mode 100644 index 0000000000..1f2a7ab3f2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/create.md @@ -0,0 +1,16 @@ +mutation { + teamsCreate( + teamId: "<TEAM_ID>", + name: "<NAME>", + roles: [] + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-graphql/examples/teams/delete-membership.md new file mode 100644 index 0000000000..e391b6f6fa --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/delete-membership.md @@ -0,0 +1,8 @@ +mutation { + teamsDeleteMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/delete.md b/docs/examples/1.8.x/server-graphql/examples/teams/delete.md new file mode 100644 index 0000000000..df0d36c5b5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/delete.md @@ -0,0 +1,7 @@ +mutation { + teamsDelete( + teamId: "<TEAM_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/get-membership.md b/docs/examples/1.8.x/server-graphql/examples/teams/get-membership.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-graphql/examples/teams/get-prefs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/get.md b/docs/examples/1.8.x/server-graphql/examples/teams/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-graphql/examples/teams/list-memberships.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/list.md b/docs/examples/1.8.x/server-graphql/examples/teams/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-graphql/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9b24450a86 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/update-membership-status.md @@ -0,0 +1,22 @@ +mutation { + teamsUpdateMembershipStatus( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + userId: "<USER_ID>", + secret: "<SECRET>" + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/update-membership.md b/docs/examples/1.8.x/server-graphql/examples/teams/update-membership.md new file mode 100644 index 0000000000..1c6a04f078 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/update-membership.md @@ -0,0 +1,21 @@ +mutation { + teamsUpdateMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + roles: [] + ) { + _id + _createdAt + _updatedAt + userId + userName + userEmail + teamId + teamName + invited + joined + confirm + mfa + roles + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/update-name.md b/docs/examples/1.8.x/server-graphql/examples/teams/update-name.md new file mode 100644 index 0000000000..c40543b5cd --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/update-name.md @@ -0,0 +1,15 @@ +mutation { + teamsUpdateName( + teamId: "<TEAM_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + total + prefs { + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-graphql/examples/teams/update-prefs.md new file mode 100644 index 0000000000..95737e33f9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/teams/update-prefs.md @@ -0,0 +1,8 @@ +mutation { + teamsUpdatePrefs( + teamId: "<TEAM_ID>", + prefs: "{}" + ) { + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-graphql/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..22cff062fa --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +mutation { + tokensCreateFileToken( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + expire: "" + ) { + _id + _createdAt + resourceId + resourceType + expire + secret + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tokens/delete.md b/docs/examples/1.8.x/server-graphql/examples/tokens/delete.md new file mode 100644 index 0000000000..b13ad72f6b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tokens/delete.md @@ -0,0 +1,7 @@ +mutation { + tokensDelete( + tokenId: "<TOKEN_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tokens/get.md b/docs/examples/1.8.x/server-graphql/examples/tokens/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tokens/list.md b/docs/examples/1.8.x/server-graphql/examples/tokens/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tokens/update.md b/docs/examples/1.8.x/server-graphql/examples/tokens/update.md new file mode 100644 index 0000000000..2f7324fd04 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tokens/update.md @@ -0,0 +1,14 @@ +mutation { + tokensUpdate( + tokenId: "<TOKEN_ID>", + expire: "" + ) { + _id + _createdAt + resourceId + resourceType + expire + secret + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-argon2user.md new file mode 100644 index 0000000000..7f99622e52 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-argon2user.md @@ -0,0 +1,40 @@ +mutation { + usersCreateArgon2User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..26659176eb --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-bcrypt-user.md @@ -0,0 +1,40 @@ +mutation { + usersCreateBcryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-graphql/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..bf0b1bd638 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-j-w-t.md @@ -0,0 +1,9 @@ +mutation { + usersCreateJWT( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>", + duration: 0 + ) { + jwt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..7e642b8233 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-m-d5user.md @@ -0,0 +1,40 @@ +mutation { + usersCreateMD5User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-graphql/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..7c4f1c5575 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +mutation { + usersCreateMfaRecoveryCodes( + userId: "<USER_ID>" + ) { + recoveryCodes + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..4c06b007a2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-p-h-pass-user.md @@ -0,0 +1,40 @@ +mutation { + usersCreatePHPassUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..f99da2752d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-s-h-a-user.md @@ -0,0 +1,41 @@ +mutation { + usersCreateSHAUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordVersion: "sha1", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..624ffcdd38 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,43 @@ +mutation { + usersCreateScryptModifiedUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordSaltSeparator: "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey: "<PASSWORD_SIGNER_KEY>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..68a5f4c75f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-scrypt-user.md @@ -0,0 +1,45 @@ +mutation { + usersCreateScryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-session.md b/docs/examples/1.8.x/server-graphql/examples/users/create-session.md new file mode 100644 index 0000000000..701ddf501f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-session.md @@ -0,0 +1,35 @@ +mutation { + usersCreateSession( + userId: "<USER_ID>" + ) { + _id + _createdAt + _updatedAt + userId + expire + provider + providerUid + providerAccessToken + providerAccessTokenExpiry + providerRefreshToken + ip + osCode + osName + osVersion + clientType + clientCode + clientName + clientVersion + clientEngine + clientEngineVersion + deviceName + deviceBrand + deviceModel + countryCode + countryName + current + factors + secret + mfaUpdatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-target.md b/docs/examples/1.8.x/server-graphql/examples/users/create-target.md new file mode 100644 index 0000000000..7068c21aba --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-target.md @@ -0,0 +1,20 @@ +mutation { + usersCreateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + providerType: "email", + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create-token.md b/docs/examples/1.8.x/server-graphql/examples/users/create-token.md new file mode 100644 index 0000000000..78255f7676 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create-token.md @@ -0,0 +1,14 @@ +mutation { + usersCreateToken( + userId: "<USER_ID>", + length: 4, + expire: 60 + ) { + _id + _createdAt + userId + secret + expire + phrase + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/create.md b/docs/examples/1.8.x/server-graphql/examples/users/create.md new file mode 100644 index 0000000000..465da80432 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/create.md @@ -0,0 +1,41 @@ +mutation { + usersCreate( + userId: "<USER_ID>", + email: "email@example.com", + phone: "+12065550100", + password: "", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/delete-identity.md b/docs/examples/1.8.x/server-graphql/examples/users/delete-identity.md new file mode 100644 index 0000000000..1ea0d990b1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/delete-identity.md @@ -0,0 +1,7 @@ +mutation { + usersDeleteIdentity( + identityId: "<IDENTITY_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-graphql/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..43f73404f0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,8 @@ +mutation { + usersDeleteMfaAuthenticator( + userId: "<USER_ID>", + type: "totp" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/delete-session.md b/docs/examples/1.8.x/server-graphql/examples/users/delete-session.md new file mode 100644 index 0000000000..7e6538b34a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/delete-session.md @@ -0,0 +1,8 @@ +mutation { + usersDeleteSession( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-graphql/examples/users/delete-sessions.md new file mode 100644 index 0000000000..d1ccaa26f4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/delete-sessions.md @@ -0,0 +1,7 @@ +mutation { + usersDeleteSessions( + userId: "<USER_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/delete-target.md b/docs/examples/1.8.x/server-graphql/examples/users/delete-target.md new file mode 100644 index 0000000000..92d0a16ac5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/delete-target.md @@ -0,0 +1,8 @@ +mutation { + usersDeleteTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/delete.md b/docs/examples/1.8.x/server-graphql/examples/users/delete.md new file mode 100644 index 0000000000..2cf392b7f1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/delete.md @@ -0,0 +1,7 @@ +mutation { + usersDelete( + userId: "<USER_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-graphql/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/get-prefs.md b/docs/examples/1.8.x/server-graphql/examples/users/get-prefs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/get-target.md b/docs/examples/1.8.x/server-graphql/examples/users/get-target.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/get.md b/docs/examples/1.8.x/server-graphql/examples/users/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list-identities.md b/docs/examples/1.8.x/server-graphql/examples/users/list-identities.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list-logs.md b/docs/examples/1.8.x/server-graphql/examples/users/list-logs.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list-memberships.md b/docs/examples/1.8.x/server-graphql/examples/users/list-memberships.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-graphql/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list-sessions.md b/docs/examples/1.8.x/server-graphql/examples/users/list-sessions.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list-targets.md b/docs/examples/1.8.x/server-graphql/examples/users/list-targets.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/list.md b/docs/examples/1.8.x/server-graphql/examples/users/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-graphql/examples/users/update-email-verification.md new file mode 100644 index 0000000000..cda7278ac0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-email-verification.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateEmailVerification( + userId: "<USER_ID>", + emailVerification: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-email.md b/docs/examples/1.8.x/server-graphql/examples/users/update-email.md new file mode 100644 index 0000000000..408a74972b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-email.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateEmail( + userId: "<USER_ID>", + email: "email@example.com" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-labels.md b/docs/examples/1.8.x/server-graphql/examples/users/update-labels.md new file mode 100644 index 0000000000..cb3c5b6483 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-labels.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateLabels( + userId: "<USER_ID>", + labels: [] + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-graphql/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..dbef2bd345 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +mutation { + usersUpdateMfaRecoveryCodes( + userId: "<USER_ID>" + ) { + recoveryCodes + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-mfa.md b/docs/examples/1.8.x/server-graphql/examples/users/update-mfa.md new file mode 100644 index 0000000000..ac09ea19a4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-mfa.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateMfa( + userId: "<USER_ID>", + mfa: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-name.md b/docs/examples/1.8.x/server-graphql/examples/users/update-name.md new file mode 100644 index 0000000000..ec7e3dc27c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-name.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateName( + userId: "<USER_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-password.md b/docs/examples/1.8.x/server-graphql/examples/users/update-password.md new file mode 100644 index 0000000000..95ef74c83d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-password.md @@ -0,0 +1,38 @@ +mutation { + usersUpdatePassword( + userId: "<USER_ID>", + password: "" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-graphql/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..c6afa54ba4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-phone-verification.md @@ -0,0 +1,38 @@ +mutation { + usersUpdatePhoneVerification( + userId: "<USER_ID>", + phoneVerification: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-phone.md b/docs/examples/1.8.x/server-graphql/examples/users/update-phone.md new file mode 100644 index 0000000000..d3fc7d5f37 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-phone.md @@ -0,0 +1,38 @@ +mutation { + usersUpdatePhone( + userId: "<USER_ID>", + number: "+12065550100" + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-prefs.md b/docs/examples/1.8.x/server-graphql/examples/users/update-prefs.md new file mode 100644 index 0000000000..431664c2a1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-prefs.md @@ -0,0 +1,8 @@ +mutation { + usersUpdatePrefs( + userId: "<USER_ID>", + prefs: "{}" + ) { + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-status.md b/docs/examples/1.8.x/server-graphql/examples/users/update-status.md new file mode 100644 index 0000000000..2499c1c258 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-status.md @@ -0,0 +1,38 @@ +mutation { + usersUpdateStatus( + userId: "<USER_ID>", + status: false + ) { + _id + _createdAt + _updatedAt + name + password + hash + hashOptions + registration + status + labels + passwordUpdate + email + phone + emailVerification + phoneVerification + mfa + prefs { + data + } + targets { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } + accessedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/users/update-target.md b/docs/examples/1.8.x/server-graphql/examples/users/update-target.md new file mode 100644 index 0000000000..1f7cc1147a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/users/update-target.md @@ -0,0 +1,19 @@ +mutation { + usersUpdateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", + name: "<NAME>" + ) { + _id + _createdAt + _updatedAt + name + userId + providerId + providerType + identifier + expired + } +} diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-anonymous-session.md b/docs/examples/1.8.x/server-kotlin/java/account/create-anonymous-session.md new file mode 100644 index 0000000000..d65c20a600 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-anonymous-session.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createAnonymousSession(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-email-password-session.md b/docs/examples/1.8.x/server-kotlin/java/account/create-email-password-session.md new file mode 100644 index 0000000000..633931089f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-email-password-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createEmailPasswordSession( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-email-token.md b/docs/examples/1.8.x/server-kotlin/java/account/create-email-token.md new file mode 100644 index 0000000000..7a6a0d7fea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-email-token.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createEmailToken( + "<USER_ID>", // userId + "email@example.com", // email + false, // phrase (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-j-w-t.md b/docs/examples/1.8.x/server-kotlin/java/account/create-j-w-t.md new file mode 100644 index 0000000000..3756edee25 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-j-w-t.md @@ -0,0 +1,18 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createJWT(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-kotlin/java/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..df021f9568 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-magic-u-r-l-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createMagicURLToken( + "<USER_ID>", // userId + "email@example.com", // email + "https://example.com", // url (optional) + false, // phrase (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..ee37e48794 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-authenticator.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createMfaAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-challenge.md new file mode 100644 index 0000000000..4a07e26e49 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-challenge.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticationFactor; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createMfaChallenge( + AuthenticationFactor.EMAIL, // factor + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..eb76cdca9b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-mfa-recovery-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-o-auth2token.md b/docs/examples/1.8.x/server-kotlin/java/account/create-o-auth2token.md new file mode 100644 index 0000000000..5b325f5c61 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-o-auth2token.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.OAuthProvider; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createOAuth2Token( + OAuthProvider.AMAZON, // provider + "https://example.com", // success (optional) + "https://example.com", // failure (optional) + listOf(), // scopes (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-phone-token.md b/docs/examples/1.8.x/server-kotlin/java/account/create-phone-token.md new file mode 100644 index 0000000000..14fb812687 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-phone-token.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createPhoneToken( + "<USER_ID>", // userId + "+12065550100", // phone + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-phone-verification.md b/docs/examples/1.8.x/server-kotlin/java/account/create-phone-verification.md new file mode 100644 index 0000000000..9e49c62880 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-phone-verification.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createPhoneVerification(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-recovery.md b/docs/examples/1.8.x/server-kotlin/java/account/create-recovery.md new file mode 100644 index 0000000000..f529ea4cb7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-recovery.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createRecovery( + "email@example.com", // email + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-session.md b/docs/examples/1.8.x/server-kotlin/java/account/create-session.md new file mode 100644 index 0000000000..5bcdf99059 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.createSession( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create-verification.md b/docs/examples/1.8.x/server-kotlin/java/account/create-verification.md new file mode 100644 index 0000000000..65c8e8be49 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create-verification.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.createVerification( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/create.md b/docs/examples/1.8.x/server-kotlin/java/account/create.md new file mode 100644 index 0000000000..d24bfb8592 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.create( + "<USER_ID>", // userId + "email@example.com", // email + "", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/delete-identity.md b/docs/examples/1.8.x/server-kotlin/java/account/delete-identity.md new file mode 100644 index 0000000000..0d6f860a63 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/delete-identity.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteIdentity( + "<IDENTITY_ID>", // identityId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/java/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..06835f6680 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/delete-mfa-authenticator.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteMfaAuthenticator( + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/delete-session.md b/docs/examples/1.8.x/server-kotlin/java/account/delete-session.md new file mode 100644 index 0000000000..fd27d746b1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/delete-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteSession( + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/delete-sessions.md b/docs/examples/1.8.x/server-kotlin/java/account/delete-sessions.md new file mode 100644 index 0000000000..11076e72d2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/delete-sessions.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.deleteSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/java/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..c818c3ea74 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/get-mfa-recovery-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/get-prefs.md b/docs/examples/1.8.x/server-kotlin/java/account/get-prefs.md new file mode 100644 index 0000000000..6614f92aaa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/get-prefs.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.getPrefs(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/get-session.md b/docs/examples/1.8.x/server-kotlin/java/account/get-session.md new file mode 100644 index 0000000000..3f30d90256 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/get-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.getSession( + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/get.md b/docs/examples/1.8.x/server-kotlin/java/account/get.md new file mode 100644 index 0000000000..70e2dfb97f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/get.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/list-identities.md b/docs/examples/1.8.x/server-kotlin/java/account/list-identities.md new file mode 100644 index 0000000000..ceb4b3099a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/list-identities.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listIdentities( + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/list-logs.md b/docs/examples/1.8.x/server-kotlin/java/account/list-logs.md new file mode 100644 index 0000000000..de22fcec6a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/list-logs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listLogs( + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/list-mfa-factors.md b/docs/examples/1.8.x/server-kotlin/java/account/list-mfa-factors.md new file mode 100644 index 0000000000..d9f90a4127 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/list-mfa-factors.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listMfaFactors(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/list-sessions.md b/docs/examples/1.8.x/server-kotlin/java/account/list-sessions.md new file mode 100644 index 0000000000..557832df82 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/list-sessions.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.listSessions(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-email.md b/docs/examples/1.8.x/server-kotlin/java/account/update-email.md new file mode 100644 index 0000000000..8529ba6a26 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-email.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateEmail( + "email@example.com", // email + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-m-f-a.md b/docs/examples/1.8.x/server-kotlin/java/account/update-m-f-a.md new file mode 100644 index 0000000000..d1b60c5473 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-m-f-a.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMFA( + false, // mfa + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-kotlin/java/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..b4735f49ea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-magic-u-r-l-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.updateMagicURLSession( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..947c85a244 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-authenticator.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMfaAuthenticator( + AuthenticatorType.TOTP, // type + "<OTP>", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-challenge.md new file mode 100644 index 0000000000..b9b0ae9db5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-challenge.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMfaChallenge( + "<CHALLENGE_ID>", // challengeId + "<OTP>", // otp + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..4b3e52700b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-mfa-recovery-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-name.md b/docs/examples/1.8.x/server-kotlin/java/account/update-name.md new file mode 100644 index 0000000000..749fe268af --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-name.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateName( + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-password.md b/docs/examples/1.8.x/server-kotlin/java/account/update-password.md new file mode 100644 index 0000000000..8eaa08b460 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-password.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updatePassword( + "", // password + "password", // oldPassword (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-phone-session.md b/docs/examples/1.8.x/server-kotlin/java/account/update-phone-session.md new file mode 100644 index 0000000000..cbfdca58ec --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-phone-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Account account = new Account(client); + +account.updatePhoneSession( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-phone-verification.md b/docs/examples/1.8.x/server-kotlin/java/account/update-phone-verification.md new file mode 100644 index 0000000000..998826544a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-phone-verification.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updatePhoneVerification( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-phone.md b/docs/examples/1.8.x/server-kotlin/java/account/update-phone.md new file mode 100644 index 0000000000..d54aa9cfb2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-phone.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updatePhone( + "+12065550100", // phone + "password", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-prefs.md b/docs/examples/1.8.x/server-kotlin/java/account/update-prefs.md new file mode 100644 index 0000000000..0e900d0a66 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updatePrefs( + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-recovery.md b/docs/examples/1.8.x/server-kotlin/java/account/update-recovery.md new file mode 100644 index 0000000000..8ab16e18ce --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-recovery.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateRecovery( + "<USER_ID>", // userId + "<SECRET>", // secret + "", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-session.md b/docs/examples/1.8.x/server-kotlin/java/account/update-session.md new file mode 100644 index 0000000000..8233c054f5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateSession( + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-status.md b/docs/examples/1.8.x/server-kotlin/java/account/update-status.md new file mode 100644 index 0000000000..d5f4f79476 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-status.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateStatus(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/account/update-verification.md b/docs/examples/1.8.x/server-kotlin/java/account/update-verification.md new file mode 100644 index 0000000000..dafe6db457 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/account/update-verification.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Account; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Account account = new Account(client); + +account.updateVerification( + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-browser.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-browser.md new file mode 100644 index 0000000000..9c3433eef5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-browser.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Browser; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getBrowser( + Browser.AVANT_BROWSER, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-credit-card.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-credit-card.md new file mode 100644 index 0000000000..6904638106 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-credit-card.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.CreditCard; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getCreditCard( + CreditCard.AMERICAN_EXPRESS, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-favicon.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-favicon.md new file mode 100644 index 0000000000..f4e89cfadc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-favicon.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getFavicon( + "https://example.com", // url + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-flag.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-flag.md new file mode 100644 index 0000000000..159dcdcde6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-flag.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Flag; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getFlag( + Flag.AFGHANISTAN, // code + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-image.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-image.md new file mode 100644 index 0000000000..afad760c38 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-image.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getImage( + "https://example.com", // url + 0, // width (optional) + 0, // height (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-initials.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-initials.md new file mode 100644 index 0000000000..171b636f02 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-initials.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getInitials( + "<NAME>", // name (optional) + 0, // width (optional) + 0, // height (optional) + "", // background (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/avatars/get-q-r.md b/docs/examples/1.8.x/server-kotlin/java/avatars/get-q-r.md new file mode 100644 index 0000000000..113fd1fceb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/avatars/get-q-r.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getQR( + "<TEXT>", // text + 1, // size (optional) + 0, // margin (optional) + false, // download (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..7585471443 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-boolean-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createBooleanAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + false, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-collection.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-collection.md new file mode 100644 index 0000000000..8ec51e698a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-collection.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..d95e048b09 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-datetime-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createDatetimeAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md new file mode 100644 index 0000000000..368b816219 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Databases databases = new Databases(client); + +databases.createDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md new file mode 100644 index 0000000000..77d79812a9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // documents + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-email-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-email-attribute.md new file mode 100644 index 0000000000..b2ecc99a17 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-email-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createEmailAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "email@example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-enum-attribute.md new file mode 100644 index 0000000000..44202086b0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-enum-attribute.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createEnumAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-float-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-float-attribute.md new file mode 100644 index 0000000000..2263cdb5c6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-float-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createFloatAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-index.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-index.md new file mode 100644 index 0000000000..fe2d9bf66d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-index.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; +import io.appwrite.enums.IndexType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + IndexType.KEY, // type + listOf(), // attributes + listOf(), // orders (optional) + listOf(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-integer-attribute.md new file mode 100644 index 0000000000..b084e7c974 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-integer-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createIntegerAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-ip-attribute.md new file mode 100644 index 0000000000..ba62dba1d7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-ip-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createIpAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..a67f452647 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-relationship-attribute.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; +import io.appwrite.enums.RelationshipType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createRelationshipAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<RELATED_COLLECTION_ID>", // relatedCollectionId + RelationshipType.ONETOONE, // type + false, // twoWay (optional) + "", // key (optional) + "", // twoWayKey (optional) + RelationMutate.CASCADE, // onDelete (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-string-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-string-attribute.md new file mode 100644 index 0000000000..3286c7aa01 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-string-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createStringAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + 1, // size + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + false, // encrypt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-url-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-url-attribute.md new file mode 100644 index 0000000000..d445d67e33 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-url-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.createUrlAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "https://example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create.md b/docs/examples/1.8.x/server-kotlin/java/databases/create.md new file mode 100644 index 0000000000..31cd37e169 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.create( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..34b74726ff --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/decrement-document-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.decrementDocumentAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "", // attribute + 0, // value (optional) + 0, // min (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/delete-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/delete-attribute.md new file mode 100644 index 0000000000..236d492adb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/delete-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/delete-collection.md b/docs/examples/1.8.x/server-kotlin/java/databases/delete-collection.md new file mode 100644 index 0000000000..5da2a3d684 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/delete-collection.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/delete-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/delete-document.md new file mode 100644 index 0000000000..f6e6209f36 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/delete-document.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.deleteDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/delete-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/delete-documents.md new file mode 100644 index 0000000000..e8394b1ff9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/delete-documents.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/delete-index.md b/docs/examples/1.8.x/server-kotlin/java/databases/delete-index.md new file mode 100644 index 0000000000..6f68435779 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/delete-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.deleteIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/delete.md b/docs/examples/1.8.x/server-kotlin/java/databases/delete.md new file mode 100644 index 0000000000..b082491383 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.delete( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/get-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/get-attribute.md new file mode 100644 index 0000000000..672f0b062e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/get-attribute.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/get-collection.md b/docs/examples/1.8.x/server-kotlin/java/databases/get-collection.md new file mode 100644 index 0000000000..59401be370 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/get-collection.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/get-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/get-document.md new file mode 100644 index 0000000000..2719073a7d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/get-document.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.getDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/get-index.md b/docs/examples/1.8.x/server-kotlin/java/databases/get-index.md new file mode 100644 index 0000000000..61cfe84ee4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/get-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.getIndex( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/get.md b/docs/examples/1.8.x/server-kotlin/java/databases/get.md new file mode 100644 index 0000000000..b0e3742149 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.get( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/increment-document-attribute.md new file mode 100644 index 0000000000..ca9c357f19 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/increment-document-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.incrementDocumentAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + "", // attribute + 0, // value (optional) + 0, // max (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/list-attributes.md b/docs/examples/1.8.x/server-kotlin/java/databases/list-attributes.md new file mode 100644 index 0000000000..9681831a35 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/list-attributes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listAttributes( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/list-collections.md b/docs/examples/1.8.x/server-kotlin/java/databases/list-collections.md new file mode 100644 index 0000000000..32534474e1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/list-collections.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listCollections( + "<DATABASE_ID>", // databaseId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/list-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/list-documents.md new file mode 100644 index 0000000000..36982c0eb0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/list-documents.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.listDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/list-indexes.md b/docs/examples/1.8.x/server-kotlin/java/databases/list-indexes.md new file mode 100644 index 0000000000..8c912bb36c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/list-indexes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.listIndexes( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/list.md b/docs/examples/1.8.x/server-kotlin/java/databases/list.md new file mode 100644 index 0000000000..758b9f75fe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..3c95851027 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-boolean-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateBooleanAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + false, // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-collection.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-collection.md new file mode 100644 index 0000000000..6805c1149d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-collection.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateCollection( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..3f451b83f2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-datetime-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateDatetimeAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-document.md new file mode 100644 index 0000000000..f7b05c9601 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-document.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Databases databases = new Databases(client); + +databases.updateDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-documents.md new file mode 100644 index 0000000000..b4138b41d2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-documents.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + mapOf( "a" to "b" ), // data (optional) + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-email-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-email-attribute.md new file mode 100644 index 0000000000..1ff12217ba --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-email-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateEmailAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "email@example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-enum-attribute.md new file mode 100644 index 0000000000..89606806d9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-enum-attribute.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateEnumAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-float-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-float-attribute.md new file mode 100644 index 0000000000..0076987f85 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-float-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateFloatAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-integer-attribute.md new file mode 100644 index 0000000000..c39af22b36 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-integer-attribute.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateIntegerAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-ip-attribute.md new file mode 100644 index 0000000000..44b4da2abc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-ip-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateIpAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..8af20e91a9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-relationship-attribute.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateRelationshipAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + RelationMutate.CASCADE, // onDelete (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-string-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-string-attribute.md new file mode 100644 index 0000000000..1f156f3dbb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-string-attribute.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateStringAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "<DEFAULT>", // default + 1, // size (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update-url-attribute.md b/docs/examples/1.8.x/server-kotlin/java/databases/update-url-attribute.md new file mode 100644 index 0000000000..959054ab48 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update-url-attribute.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.updateUrlAttribute( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "", // key + false, // required + "https://example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/update.md b/docs/examples/1.8.x/server-kotlin/java/databases/update.md new file mode 100644 index 0000000000..9928dae6f6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/update.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.update( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md new file mode 100644 index 0000000000..b1b4de4db4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Databases databases = new Databases(client); + +databases.upsertDocument( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + "<DOCUMENT_ID>", // documentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md new file mode 100644 index 0000000000..0bf0c1778c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Databases; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Databases databases = new Databases(client); + +databases.upsertDocuments( + "<DATABASE_ID>", // databaseId + "<COLLECTION_ID>", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-deployment.md new file mode 100644 index 0000000000..6e435f41fa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-deployment.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createDeployment( + "<FUNCTION_ID>", // functionId + InputFile.fromPath("file.png"), // code + false, // activate + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..6b9d9a131a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-duplicate-deployment.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createDuplicateDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + "<BUILD_ID>", // buildId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md new file mode 100644 index 0000000000..82d48fa55b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +functions.createExecution( + "<FUNCTION_ID>", // functionId + "<BODY>", // body (optional) + false, // async (optional) + "<PATH>", // path (optional) + ExecutionMethod.GET, // method (optional) + mapOf( "a" to "b" ), // headers (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-template-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-template-deployment.md new file mode 100644 index 0000000000..53b5a9ae6a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-template-deployment.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createTemplateDeployment( + "<FUNCTION_ID>", // functionId + "<REPOSITORY>", // repository + "<OWNER>", // owner + "<ROOT_DIRECTORY>", // rootDirectory + "<VERSION>", // version + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-variable.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-variable.md new file mode 100644 index 0000000000..70764fbdc8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-variable.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createVariable( + "<FUNCTION_ID>", // functionId + "<KEY>", // key + "<VALUE>", // value + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..9274cd88c7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-vcs-deployment.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.VCSDeploymentType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.createVcsDeployment( + "<FUNCTION_ID>", // functionId + VCSDeploymentType.BRANCH, // type + "<REFERENCE>", // reference + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create.md b/docs/examples/1.8.x/server-kotlin/java/functions/create.md new file mode 100644 index 0000000000..71871287bb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; +import io.appwrite.enums.Runtime; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.create( + "<FUNCTION_ID>", // functionId + "<NAME>", // name + .NODE_14_5, // runtime + listOf("any"), // execute (optional) + listOf(), // events (optional) + "", // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) + listOf(), // scopes (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/delete-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/delete-deployment.md new file mode 100644 index 0000000000..1a6279ff3f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/delete-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.deleteDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/delete-execution.md b/docs/examples/1.8.x/server-kotlin/java/functions/delete-execution.md new file mode 100644 index 0000000000..68f81e8ee4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/delete-execution.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.deleteExecution( + "<FUNCTION_ID>", // functionId + "<EXECUTION_ID>", // executionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/delete-variable.md b/docs/examples/1.8.x/server-kotlin/java/functions/delete-variable.md new file mode 100644 index 0000000000..c881bdc800 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/delete-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.deleteVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/delete.md b/docs/examples/1.8.x/server-kotlin/java/functions/delete.md new file mode 100644 index 0000000000..255fc002fa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.delete( + "<FUNCTION_ID>", // functionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/get-deployment-download.md b/docs/examples/1.8.x/server-kotlin/java/functions/get-deployment-download.md new file mode 100644 index 0000000000..d522b12caf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/get-deployment-download.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getDeploymentDownload( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + DeploymentDownloadType.SOURCE, // type (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/get-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/get-deployment.md new file mode 100644 index 0000000000..b3000272b4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/get-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/get-execution.md b/docs/examples/1.8.x/server-kotlin/java/functions/get-execution.md new file mode 100644 index 0000000000..76e302fa82 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/get-execution.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +functions.getExecution( + "<FUNCTION_ID>", // functionId + "<EXECUTION_ID>", // executionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/get-variable.md b/docs/examples/1.8.x/server-kotlin/java/functions/get-variable.md new file mode 100644 index 0000000000..d54882b293 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/get-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.getVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/get.md b/docs/examples/1.8.x/server-kotlin/java/functions/get.md new file mode 100644 index 0000000000..aa55b93e07 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.get( + "<FUNCTION_ID>", // functionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/list-deployments.md b/docs/examples/1.8.x/server-kotlin/java/functions/list-deployments.md new file mode 100644 index 0000000000..16a10ca4a2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/list-deployments.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listDeployments( + "<FUNCTION_ID>", // functionId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/list-executions.md b/docs/examples/1.8.x/server-kotlin/java/functions/list-executions.md new file mode 100644 index 0000000000..25a9af80aa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/list-executions.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Functions functions = new Functions(client); + +functions.listExecutions( + "<FUNCTION_ID>", // functionId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/list-runtimes.md b/docs/examples/1.8.x/server-kotlin/java/functions/list-runtimes.md new file mode 100644 index 0000000000..304a90d0da --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/list-runtimes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listRuntimes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/list-specifications.md b/docs/examples/1.8.x/server-kotlin/java/functions/list-specifications.md new file mode 100644 index 0000000000..e6c9c091d7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/list-specifications.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/list-variables.md b/docs/examples/1.8.x/server-kotlin/java/functions/list-variables.md new file mode 100644 index 0000000000..98c9ff4527 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/list-variables.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.listVariables( + "<FUNCTION_ID>", // functionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/list.md b/docs/examples/1.8.x/server-kotlin/java/functions/list.md new file mode 100644 index 0000000000..a9a320660d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/update-deployment-status.md b/docs/examples/1.8.x/server-kotlin/java/functions/update-deployment-status.md new file mode 100644 index 0000000000..8755fd9305 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/update-deployment-status.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.updateDeploymentStatus( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/update-function-deployment.md b/docs/examples/1.8.x/server-kotlin/java/functions/update-function-deployment.md new file mode 100644 index 0000000000..b88e87c1b9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/update-function-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.updateFunctionDeployment( + "<FUNCTION_ID>", // functionId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/update-variable.md b/docs/examples/1.8.x/server-kotlin/java/functions/update-variable.md new file mode 100644 index 0000000000..3a2b281332 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/update-variable.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.updateVariable( + "<FUNCTION_ID>", // functionId + "<VARIABLE_ID>", // variableId + "<KEY>", // key + "<VALUE>", // value (optional) + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/update.md b/docs/examples/1.8.x/server-kotlin/java/functions/update.md new file mode 100644 index 0000000000..5956c57b73 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/functions/update.md @@ -0,0 +1,40 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Functions; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Functions functions = new Functions(client); + +functions.update( + "<FUNCTION_ID>", // functionId + "<NAME>", // name + .NODE_14_5, // runtime (optional) + listOf("any"), // execute (optional) + listOf(), // events (optional) + "", // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + "<ENTRYPOINT>", // entrypoint (optional) + "<COMMANDS>", // commands (optional) + listOf(), // scopes (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/graphql/mutation.md b/docs/examples/1.8.x/server-kotlin/java/graphql/mutation.md new file mode 100644 index 0000000000..778892457b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/graphql/mutation.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Graphql graphql = new Graphql(client); + +graphql.mutation( + mapOf( "a" to "b" ), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/graphql/query.md b/docs/examples/1.8.x/server-kotlin/java/graphql/query.md new file mode 100644 index 0000000000..e109d523f8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/graphql/query.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Graphql; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Graphql graphql = new Graphql(client); + +graphql.query( + mapOf( "a" to "b" ), // query + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-antivirus.md b/docs/examples/1.8.x/server-kotlin/java/health/get-antivirus.md new file mode 100644 index 0000000000..ca3abf7100 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-antivirus.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getAntivirus(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-cache.md b/docs/examples/1.8.x/server-kotlin/java/health/get-cache.md new file mode 100644 index 0000000000..24a584c04b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-cache.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getCache(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-certificate.md b/docs/examples/1.8.x/server-kotlin/java/health/get-certificate.md new file mode 100644 index 0000000000..f4cb5a4e1e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-certificate.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getCertificate( + "", // domain (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-d-b.md b/docs/examples/1.8.x/server-kotlin/java/health/get-d-b.md new file mode 100644 index 0000000000..c7a7bef903 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-d-b.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getDB(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-failed-jobs.md b/docs/examples/1.8.x/server-kotlin/java/health/get-failed-jobs.md new file mode 100644 index 0000000000..d2b81bd0bf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-failed-jobs.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; +import io.appwrite.enums.Name; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getFailedJobs( + .V1_DATABASE, // name + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-pub-sub.md b/docs/examples/1.8.x/server-kotlin/java/health/get-pub-sub.md new file mode 100644 index 0000000000..70210c4296 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-pub-sub.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getPubSub(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-builds.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-builds.md new file mode 100644 index 0000000000..2ca5d7f4e4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-builds.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueBuilds( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-certificates.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-certificates.md new file mode 100644 index 0000000000..519817ae46 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-certificates.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueCertificates( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-databases.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-databases.md new file mode 100644 index 0000000000..2f175668eb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-databases.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueDatabases( + "<NAME>", // name (optional) + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-deletes.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-deletes.md new file mode 100644 index 0000000000..e65aa9a528 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-deletes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueDeletes( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-functions.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-functions.md new file mode 100644 index 0000000000..720f114acb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-functions.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueFunctions( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-logs.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-logs.md new file mode 100644 index 0000000000..09b0de4e63 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-logs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueLogs( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-mails.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-mails.md new file mode 100644 index 0000000000..b1ae357aef --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-mails.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueMails( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-messaging.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-messaging.md new file mode 100644 index 0000000000..61c0b8cad7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-messaging.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueMessaging( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-migrations.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-migrations.md new file mode 100644 index 0000000000..0e7d669e7f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-migrations.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueMigrations( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..e2f8062fcc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-stats-resources.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueStatsResources( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-usage.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-usage.md new file mode 100644 index 0000000000..bfda61a544 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-usage.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueUsage( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-webhooks.md new file mode 100644 index 0000000000..d9aed66db6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-queue-webhooks.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getQueueWebhooks( + 0, // threshold (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-storage-local.md b/docs/examples/1.8.x/server-kotlin/java/health/get-storage-local.md new file mode 100644 index 0000000000..65367cc252 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-storage-local.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getStorageLocal(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-storage.md b/docs/examples/1.8.x/server-kotlin/java/health/get-storage.md new file mode 100644 index 0000000000..3a0f0f8ed3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-storage.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getStorage(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get-time.md b/docs/examples/1.8.x/server-kotlin/java/health/get-time.md new file mode 100644 index 0000000000..f0ba668ab8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get-time.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.getTime(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/health/get.md b/docs/examples/1.8.x/server-kotlin/java/health/get.md new file mode 100644 index 0000000000..87a7c0a32d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/health/get.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Health; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Health health = new Health(client); + +health.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/get.md b/docs/examples/1.8.x/server-kotlin/java/locale/get.md new file mode 100644 index 0000000000..2d5e0ac06d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/get.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.get(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-codes.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-codes.md new file mode 100644 index 0000000000..9f07d1dbf1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-codes.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCodes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-continents.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-continents.md new file mode 100644 index 0000000000..5d9e4b0fdb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-continents.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listContinents(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-countries-e-u.md new file mode 100644 index 0000000000..232a0ef8cf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-countries-e-u.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-countries-phones.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-countries-phones.md new file mode 100644 index 0000000000..a4739a5b93 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-countries-phones.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-countries.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-countries.md new file mode 100644 index 0000000000..5b8f250f3c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-countries.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCountries(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-currencies.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-currencies.md new file mode 100644 index 0000000000..adf1d787c1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-currencies.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listCurrencies(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/locale/list-languages.md b/docs/examples/1.8.x/server-kotlin/java/locale/list-languages.md new file mode 100644 index 0000000000..c92ea525f7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/locale/list-languages.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Locale; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Locale locale = new Locale(client); + +locale.listLanguages(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-apns-provider.md new file mode 100644 index 0000000000..0f6618079f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-apns-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createApnsProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<AUTH_KEY>", // authKey (optional) + "<AUTH_KEY_ID>", // authKeyId (optional) + "<TEAM_ID>", // teamId (optional) + "<BUNDLE_ID>", // bundleId (optional) + false, // sandbox (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-email.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-email.md new file mode 100644 index 0000000000..d6ab5ee1bf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-email.md @@ -0,0 +1,34 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createEmail( + "<MESSAGE_ID>", // messageId + "<SUBJECT>", // subject + "<CONTENT>", // content + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + listOf(), // cc (optional) + listOf(), // bcc (optional) + listOf(), // attachments (optional) + false, // draft (optional) + false, // html (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..636a1bdd39 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-fcm-provider.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createFcmProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + mapOf( "a" to "b" ), // serviceAccountJSON (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..272f9d2356 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-mailgun-provider.md @@ -0,0 +1,32 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createMailgunProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<API_KEY>", // apiKey (optional) + "<DOMAIN>", // domain (optional) + false, // isEuRegion (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-msg91provider.md new file mode 100644 index 0000000000..21005293ea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-msg91provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createMsg91Provider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<TEMPLATE_ID>", // templateId (optional) + "<SENDER_ID>", // senderId (optional) + "<AUTH_KEY>", // authKey (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-push.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-push.md new file mode 100644 index 0000000000..277ab9655c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-push.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createPush( + "<MESSAGE_ID>", // messageId + "<TITLE>", // title (optional) + "<BODY>", // body (optional) + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + mapOf( "a" to "b" ), // data (optional) + "<ACTION>", // action (optional) + "[ID1:ID2]", // image (optional) + "<ICON>", // icon (optional) + "<SOUND>", // sound (optional) + "<COLOR>", // color (optional) + "<TAG>", // tag (optional) + 0, // badge (optional) + false, // draft (optional) + "", // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.NORMAL, // priority (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..84c5bf42f9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-sendgrid-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createSendgridProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<API_KEY>", // apiKey (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-sms.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-sms.md new file mode 100644 index 0000000000..9e3e3bdf5d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-sms.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createSms( + "<MESSAGE_ID>", // messageId + "<CONTENT>", // content + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + false, // draft (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..ebd153c29c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-smtp-provider.md @@ -0,0 +1,36 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createSmtpProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "<HOST>", // host + 1, // port (optional) + "<USERNAME>", // username (optional) + "<PASSWORD>", // password (optional) + SmtpEncryption.NONE, // encryption (optional) + false, // autoTLS (optional) + "<MAILER>", // mailer (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "email@example.com", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-subscriber.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-subscriber.md new file mode 100644 index 0000000000..1ccb8fe60c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-subscriber.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +messaging.createSubscriber( + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + "<TARGET_ID>", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..6b64499419 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-telesign-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createTelesignProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<CUSTOMER_ID>", // customerId (optional) + "<API_KEY>", // apiKey (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..477d7d8c4b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-textmagic-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createTextmagicProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<USERNAME>", // username (optional) + "<API_KEY>", // apiKey (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-topic.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-topic.md new file mode 100644 index 0000000000..63a24b467d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-topic.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createTopic( + "<TOPIC_ID>", // topicId + "<NAME>", // name + listOf("any"), // subscribe (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..8d1b4da970 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-twilio-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createTwilioProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<ACCOUNT_SID>", // accountSid (optional) + "<AUTH_TOKEN>", // authToken (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..db1e476db2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/create-vonage-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.createVonageProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name + "+12065550100", // from (optional) + "<API_KEY>", // apiKey (optional) + "<API_SECRET>", // apiSecret (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/delete-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/delete-provider.md new file mode 100644 index 0000000000..b0fa837feb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/delete-provider.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.deleteProvider( + "<PROVIDER_ID>", // providerId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-kotlin/java/messaging/delete-subscriber.md new file mode 100644 index 0000000000..a3635b9db7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/delete-subscriber.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Messaging messaging = new Messaging(client); + +messaging.deleteSubscriber( + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/delete-topic.md b/docs/examples/1.8.x/server-kotlin/java/messaging/delete-topic.md new file mode 100644 index 0000000000..7b598b25f4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/delete-topic.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.deleteTopic( + "<TOPIC_ID>", // topicId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/delete.md b/docs/examples/1.8.x/server-kotlin/java/messaging/delete.md new file mode 100644 index 0000000000..1395a39245 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.delete( + "<MESSAGE_ID>", // messageId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/get-message.md b/docs/examples/1.8.x/server-kotlin/java/messaging/get-message.md new file mode 100644 index 0000000000..3860ff2347 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/get-message.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.getMessage( + "<MESSAGE_ID>", // messageId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/get-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/get-provider.md new file mode 100644 index 0000000000..9717b90b7d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/get-provider.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.getProvider( + "<PROVIDER_ID>", // providerId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/get-subscriber.md b/docs/examples/1.8.x/server-kotlin/java/messaging/get-subscriber.md new file mode 100644 index 0000000000..641a494b5c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/get-subscriber.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.getSubscriber( + "<TOPIC_ID>", // topicId + "<SUBSCRIBER_ID>", // subscriberId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/get-topic.md b/docs/examples/1.8.x/server-kotlin/java/messaging/get-topic.md new file mode 100644 index 0000000000..c9f2eff74b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/get-topic.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.getTopic( + "<TOPIC_ID>", // topicId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-message-logs.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-message-logs.md new file mode 100644 index 0000000000..0f94e46cd1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-message-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listMessageLogs( + "<MESSAGE_ID>", // messageId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-messages.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-messages.md new file mode 100644 index 0000000000..006ba7c27f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-messages.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listMessages( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-provider-logs.md new file mode 100644 index 0000000000..5f77f2d03d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-provider-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listProviderLogs( + "<PROVIDER_ID>", // providerId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-providers.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-providers.md new file mode 100644 index 0000000000..b069dda04c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-providers.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listProviders( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..b10e446a66 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-subscriber-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listSubscriberLogs( + "<SUBSCRIBER_ID>", // subscriberId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-subscribers.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-subscribers.md new file mode 100644 index 0000000000..52ca5b0d01 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-subscribers.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listSubscribers( + "<TOPIC_ID>", // topicId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-targets.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-targets.md new file mode 100644 index 0000000000..5b9f40e873 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-targets.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listTargets( + "<MESSAGE_ID>", // messageId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-topic-logs.md new file mode 100644 index 0000000000..b2e9444419 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-topic-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listTopicLogs( + "<TOPIC_ID>", // topicId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/list-topics.md b/docs/examples/1.8.x/server-kotlin/java/messaging/list-topics.md new file mode 100644 index 0000000000..e6408a60e1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/list-topics.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.listTopics( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-apns-provider.md new file mode 100644 index 0000000000..737a142495 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-apns-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateApnsProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<AUTH_KEY>", // authKey (optional) + "<AUTH_KEY_ID>", // authKeyId (optional) + "<TEAM_ID>", // teamId (optional) + "<BUNDLE_ID>", // bundleId (optional) + false, // sandbox (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-email.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-email.md new file mode 100644 index 0000000000..56e9767861 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-email.md @@ -0,0 +1,34 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateEmail( + "<MESSAGE_ID>", // messageId + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + "<SUBJECT>", // subject (optional) + "<CONTENT>", // content (optional) + false, // draft (optional) + false, // html (optional) + listOf(), // cc (optional) + listOf(), // bcc (optional) + "", // scheduledAt (optional) + listOf(), // attachments (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..68c56ef18e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-fcm-provider.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateFcmProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + mapOf( "a" to "b" ), // serviceAccountJSON (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..5547ae8575 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-mailgun-provider.md @@ -0,0 +1,32 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateMailgunProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + "<API_KEY>", // apiKey (optional) + "<DOMAIN>", // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-msg91provider.md new file mode 100644 index 0000000000..d8e485629b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-msg91provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateMsg91Provider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<TEMPLATE_ID>", // templateId (optional) + "<SENDER_ID>", // senderId (optional) + "<AUTH_KEY>", // authKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-push.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-push.md new file mode 100644 index 0000000000..b7038de6a4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-push.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updatePush( + "<MESSAGE_ID>", // messageId + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + "<TITLE>", // title (optional) + "<BODY>", // body (optional) + mapOf( "a" to "b" ), // data (optional) + "<ACTION>", // action (optional) + "[ID1:ID2]", // image (optional) + "<ICON>", // icon (optional) + "<SOUND>", // sound (optional) + "<COLOR>", // color (optional) + "<TAG>", // tag (optional) + 0, // badge (optional) + false, // draft (optional) + "", // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.NORMAL, // priority (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..14a4e99f5b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-sendgrid-provider.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSendgridProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<API_KEY>", // apiKey (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-sms.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-sms.md new file mode 100644 index 0000000000..c55cfdfddb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-sms.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSms( + "<MESSAGE_ID>", // messageId + listOf(), // topics (optional) + listOf(), // users (optional) + listOf(), // targets (optional) + "<CONTENT>", // content (optional) + false, // draft (optional) + "", // scheduledAt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..3f39661024 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-smtp-provider.md @@ -0,0 +1,36 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateSmtpProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + "<HOST>", // host (optional) + 1, // port (optional) + "<USERNAME>", // username (optional) + "<PASSWORD>", // password (optional) + SmtpEncryption.NONE, // encryption (optional) + false, // autoTLS (optional) + "<MAILER>", // mailer (optional) + "<FROM_NAME>", // fromName (optional) + "email@example.com", // fromEmail (optional) + "<REPLY_TO_NAME>", // replyToName (optional) + "<REPLY_TO_EMAIL>", // replyToEmail (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..8181bf1c82 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-telesign-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateTelesignProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<CUSTOMER_ID>", // customerId (optional) + "<API_KEY>", // apiKey (optional) + "<FROM>", // from (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..bc156b7a31 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-textmagic-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateTextmagicProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<USERNAME>", // username (optional) + "<API_KEY>", // apiKey (optional) + "<FROM>", // from (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-topic.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-topic.md new file mode 100644 index 0000000000..be9c44dc23 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-topic.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateTopic( + "<TOPIC_ID>", // topicId + "<NAME>", // name (optional) + listOf("any"), // subscribe (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..ed58ee9a24 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-twilio-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateTwilioProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<ACCOUNT_SID>", // accountSid (optional) + "<AUTH_TOKEN>", // authToken (optional) + "<FROM>", // from (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-kotlin/java/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..d5bfe3610c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/messaging/update-vonage-provider.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Messaging; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Messaging messaging = new Messaging(client); + +messaging.updateVonageProvider( + "<PROVIDER_ID>", // providerId + "<NAME>", // name (optional) + false, // enabled (optional) + "<API_KEY>", // apiKey (optional) + "<API_SECRET>", // apiSecret (optional) + "<FROM>", // from (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/create-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/create-deployment.md new file mode 100644 index 0000000000..f370f802eb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/create-deployment.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createDeployment( + "<SITE_ID>", // siteId + InputFile.fromPath("file.png"), // code + false, // activate + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..35e43b8943 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/create-duplicate-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createDuplicateDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/create-template-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/create-template-deployment.md new file mode 100644 index 0000000000..63aba4a067 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/create-template-deployment.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createTemplateDeployment( + "<SITE_ID>", // siteId + "<REPOSITORY>", // repository + "<OWNER>", // owner + "<ROOT_DIRECTORY>", // rootDirectory + "<VERSION>", // version + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/create-variable.md b/docs/examples/1.8.x/server-kotlin/java/sites/create-variable.md new file mode 100644 index 0000000000..c77bec3796 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/create-variable.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createVariable( + "<SITE_ID>", // siteId + "<KEY>", // key + "<VALUE>", // value + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..754eb26419 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/create-vcs-deployment.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.VCSDeploymentType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.createVcsDeployment( + "<SITE_ID>", // siteId + VCSDeploymentType.BRANCH, // type + "<REFERENCE>", // reference + false, // activate (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/create.md b/docs/examples/1.8.x/server-kotlin/java/sites/create.md new file mode 100644 index 0000000000..19664ec57b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/create.md @@ -0,0 +1,42 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.Framework; +import io.appwrite.enums.BuildRuntime; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.create( + "<SITE_ID>", // siteId + "<NAME>", // name + .ANALOG, // framework + .NODE_14_5, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + .STATIC, // adapter (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<FALLBACK_FILE>", // fallbackFile (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/delete-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/delete-deployment.md new file mode 100644 index 0000000000..97c08ab159 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/delete-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.deleteDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/delete-log.md b/docs/examples/1.8.x/server-kotlin/java/sites/delete-log.md new file mode 100644 index 0000000000..d7189373b0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/delete-log.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.deleteLog( + "<SITE_ID>", // siteId + "<LOG_ID>", // logId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/delete-variable.md b/docs/examples/1.8.x/server-kotlin/java/sites/delete-variable.md new file mode 100644 index 0000000000..4e2b3ab7d4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/delete-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.deleteVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/delete.md b/docs/examples/1.8.x/server-kotlin/java/sites/delete.md new file mode 100644 index 0000000000..fd07bb23c8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.delete( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/get-deployment-download.md b/docs/examples/1.8.x/server-kotlin/java/sites/get-deployment-download.md new file mode 100644 index 0000000000..5875c7262f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/get-deployment-download.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getDeploymentDownload( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + DeploymentDownloadType.SOURCE, // type (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/get-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/get-deployment.md new file mode 100644 index 0000000000..6af859ba9a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/get-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/get-log.md b/docs/examples/1.8.x/server-kotlin/java/sites/get-log.md new file mode 100644 index 0000000000..d33f2a658f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/get-log.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getLog( + "<SITE_ID>", // siteId + "<LOG_ID>", // logId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/get-variable.md b/docs/examples/1.8.x/server-kotlin/java/sites/get-variable.md new file mode 100644 index 0000000000..1c8df0c08a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/get-variable.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.getVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/get.md b/docs/examples/1.8.x/server-kotlin/java/sites/get.md new file mode 100644 index 0000000000..660cad3bdb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.get( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/list-deployments.md b/docs/examples/1.8.x/server-kotlin/java/sites/list-deployments.md new file mode 100644 index 0000000000..8bcec54efe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/list-deployments.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listDeployments( + "<SITE_ID>", // siteId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/list-frameworks.md b/docs/examples/1.8.x/server-kotlin/java/sites/list-frameworks.md new file mode 100644 index 0000000000..df597177dd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/list-frameworks.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listFrameworks(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/list-logs.md b/docs/examples/1.8.x/server-kotlin/java/sites/list-logs.md new file mode 100644 index 0000000000..3532882a8d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/list-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listLogs( + "<SITE_ID>", // siteId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/list-specifications.md b/docs/examples/1.8.x/server-kotlin/java/sites/list-specifications.md new file mode 100644 index 0000000000..caad7325cf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/list-specifications.md @@ -0,0 +1,19 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listSpecifications(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/list-variables.md b/docs/examples/1.8.x/server-kotlin/java/sites/list-variables.md new file mode 100644 index 0000000000..f2a38b7e60 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/list-variables.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.listVariables( + "<SITE_ID>", // siteId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/list.md b/docs/examples/1.8.x/server-kotlin/java/sites/list.md new file mode 100644 index 0000000000..39a1c06407 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/update-deployment-status.md b/docs/examples/1.8.x/server-kotlin/java/sites/update-deployment-status.md new file mode 100644 index 0000000000..8dc3041f76 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/update-deployment-status.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.updateDeploymentStatus( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/update-site-deployment.md b/docs/examples/1.8.x/server-kotlin/java/sites/update-site-deployment.md new file mode 100644 index 0000000000..edbda7cf93 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/update-site-deployment.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.updateSiteDeployment( + "<SITE_ID>", // siteId + "<DEPLOYMENT_ID>", // deploymentId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/update-variable.md b/docs/examples/1.8.x/server-kotlin/java/sites/update-variable.md new file mode 100644 index 0000000000..9735ae34af --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/update-variable.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.updateVariable( + "<SITE_ID>", // siteId + "<VARIABLE_ID>", // variableId + "<KEY>", // key + "<VALUE>", // value (optional) + false, // secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/sites/update.md b/docs/examples/1.8.x/server-kotlin/java/sites/update.md new file mode 100644 index 0000000000..9a8b577ce0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/sites/update.md @@ -0,0 +1,41 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Sites; +import io.appwrite.enums.Framework; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Sites sites = new Sites(client); + +sites.update( + "<SITE_ID>", // siteId + "<NAME>", // name + .ANALOG, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + "<INSTALL_COMMAND>", // installCommand (optional) + "<BUILD_COMMAND>", // buildCommand (optional) + "<OUTPUT_DIRECTORY>", // outputDirectory (optional) + .NODE_14_5, // buildRuntime (optional) + .STATIC, // adapter (optional) + "<FALLBACK_FILE>", // fallbackFile (optional) + "<INSTALLATION_ID>", // installationId (optional) + "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) + "<PROVIDER_BRANCH>", // providerBranch (optional) + false, // providerSilentMode (optional) + "<PROVIDER_ROOT_DIRECTORY>", // providerRootDirectory (optional) + "", // specification (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/create-bucket.md b/docs/examples/1.8.x/server-kotlin/java/storage/create-bucket.md new file mode 100644 index 0000000000..a3a3308420 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/create-bucket.md @@ -0,0 +1,32 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.createBucket( + "<BUCKET_ID>", // bucketId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + listOf(), // allowedFileExtensions (optional) + .NONE, // compression (optional) + false, // encryption (optional) + false, // antivirus (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/create-file.md b/docs/examples/1.8.x/server-kotlin/java/storage/create-file.md new file mode 100644 index 0000000000..583f8569a5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/create-file.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.createFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + InputFile.fromPath("file.png"), // file + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/delete-bucket.md b/docs/examples/1.8.x/server-kotlin/java/storage/delete-bucket.md new file mode 100644 index 0000000000..eb77754f92 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/delete-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.deleteBucket( + "<BUCKET_ID>", // bucketId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/delete-file.md b/docs/examples/1.8.x/server-kotlin/java/storage/delete-file.md new file mode 100644 index 0000000000..8976fd198f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/delete-file.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.deleteFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/get-bucket.md b/docs/examples/1.8.x/server-kotlin/java/storage/get-bucket.md new file mode 100644 index 0000000000..a099f33dd8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/get-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.getBucket( + "<BUCKET_ID>", // bucketId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/get-file-download.md b/docs/examples/1.8.x/server-kotlin/java/storage/get-file-download.md new file mode 100644 index 0000000000..edda2609b5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/get-file-download.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFileDownload( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "<TOKEN>", // token (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/get-file-preview.md b/docs/examples/1.8.x/server-kotlin/java/storage/get-file-preview.md new file mode 100644 index 0000000000..1a0ab596bc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/get-file-preview.md @@ -0,0 +1,36 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFilePreview( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + 0, // width (optional) + 0, // height (optional) + ImageGravity.CENTER, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + "", // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + "", // background (optional) + ImageFormat.JPG, // output (optional) + "<TOKEN>", // token (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/get-file-view.md b/docs/examples/1.8.x/server-kotlin/java/storage/get-file-view.md new file mode 100644 index 0000000000..178e50776c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/get-file-view.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFileView( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "<TOKEN>", // token (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/get-file.md b/docs/examples/1.8.x/server-kotlin/java/storage/get-file.md new file mode 100644 index 0000000000..7a04c80e9e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/get-file.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.getFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/list-buckets.md b/docs/examples/1.8.x/server-kotlin/java/storage/list-buckets.md new file mode 100644 index 0000000000..9d85957803 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/list-buckets.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.listBuckets( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/list-files.md b/docs/examples/1.8.x/server-kotlin/java/storage/list-files.md new file mode 100644 index 0000000000..f002754813 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/list-files.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.listFiles( + "<BUCKET_ID>", // bucketId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/update-bucket.md b/docs/examples/1.8.x/server-kotlin/java/storage/update-bucket.md new file mode 100644 index 0000000000..2d80e2648c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/update-bucket.md @@ -0,0 +1,32 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Storage storage = new Storage(client); + +storage.updateBucket( + "<BUCKET_ID>", // bucketId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + listOf(), // allowedFileExtensions (optional) + .NONE, // compression (optional) + false, // encryption (optional) + false, // antivirus (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/storage/update-file.md b/docs/examples/1.8.x/server-kotlin/java/storage/update-file.md new file mode 100644 index 0000000000..7f325f91fb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/storage/update-file.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Storage; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Storage storage = new Storage(client); + +storage.updateFile( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "<NAME>", // name (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md new file mode 100644 index 0000000000..2336ee90e0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md new file mode 100644 index 0000000000..dd3df83dbf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md new file mode 100644 index 0000000000..3b130d1ecd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md new file mode 100644 index 0000000000..73c6e1c7de --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md new file mode 100644 index 0000000000..dd6f207ff4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md new file mode 100644 index 0000000000..3044529f03 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; +import io.appwrite.enums.Type; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + .KEY, // type + listOf(), // columns + listOf(), // orders (optional) + listOf(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md new file mode 100644 index 0000000000..3546ac8174 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md new file mode 100644 index 0000000000..825d8b0c5c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md new file mode 100644 index 0000000000..ea23817aae --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; +import io.appwrite.enums.Type; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<RELATED_TABLE_ID>", // relatedTableId + .ONETOONE, // type + false, // twoWay (optional) + "", // key (optional) + "", // twoWayKey (optional) + .CASCADE, // onDelete (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md new file mode 100644 index 0000000000..7ba3678aad --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.createRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md new file mode 100644 index 0000000000..c20aa2c11f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md new file mode 100644 index 0000000000..b8cb626601 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + 1, // size + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + false, // encrypt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md new file mode 100644 index 0000000000..91e90c8bc4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create.md b/docs/examples/1.8.x/server-kotlin/java/tables/create.md new file mode 100644 index 0000000000..6a9faf06dd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.create( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md new file mode 100644 index 0000000000..9e79f36e14 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.decrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // min (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md new file mode 100644 index 0000000000..f14390c905 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.deleteColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md new file mode 100644 index 0000000000..1b22eb00d8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.deleteIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md new file mode 100644 index 0000000000..a48745a225 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.deleteRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md new file mode 100644 index 0000000000..6a86321fad --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.deleteRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete.md new file mode 100644 index 0000000000..e777c7292e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.delete( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md new file mode 100644 index 0000000000..b4f7e1298f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.getColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md new file mode 100644 index 0000000000..5bcd59d4cd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.getIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md new file mode 100644 index 0000000000..7f72c25cd8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.getRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get.md b/docs/examples/1.8.x/server-kotlin/java/tables/get.md new file mode 100644 index 0000000000..6f3c639450 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/get.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.get( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md new file mode 100644 index 0000000000..f9c828398a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.incrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // max (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md new file mode 100644 index 0000000000..05e1960021 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.listColumns( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md new file mode 100644 index 0000000000..c9bd445fe8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.listIndexes( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md new file mode 100644 index 0000000000..8cbc356556 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.listRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list.md b/docs/examples/1.8.x/server-kotlin/java/tables/list.md new file mode 100644 index 0000000000..c3e0c559aa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/list.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.list( + "<DATABASE_ID>", // databaseId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md new file mode 100644 index 0000000000..647190e7bc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md new file mode 100644 index 0000000000..38e0e60da5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md new file mode 100644 index 0000000000..918884e0b3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md new file mode 100644 index 0000000000..b1bbc83520 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md new file mode 100644 index 0000000000..977c23727c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md new file mode 100644 index 0000000000..d2ad81d0eb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md new file mode 100644 index 0000000000..cd6e67bc2c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md new file mode 100644 index 0000000000..06c27cc60b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + .CASCADE, // onDelete (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md new file mode 100644 index 0000000000..8270c3fa9b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.updateRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md new file mode 100644 index 0000000000..a51878508f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + mapOf( "a" to "b" ), // data (optional) + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md new file mode 100644 index 0000000000..31e279d068 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "<DEFAULT>", // default + 1, // size (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md new file mode 100644 index 0000000000..201e578ac6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update.md b/docs/examples/1.8.x/server-kotlin/java/tables/update.md new file mode 100644 index 0000000000..cf560cb461 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.update( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md new file mode 100644 index 0000000000..11127c5bfa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.upsertRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md new file mode 100644 index 0000000000..14b382263b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.upsertRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/create-membership.md b/docs/examples/1.8.x/server-kotlin/java/teams/create-membership.md new file mode 100644 index 0000000000..89e9d96ef6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/create-membership.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.createMembership( + "<TEAM_ID>", // teamId + listOf(), // roles + "email@example.com", // email (optional) + "<USER_ID>", // userId (optional) + "+12065550100", // phone (optional) + "https://example.com", // url (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/create.md b/docs/examples/1.8.x/server-kotlin/java/teams/create.md new file mode 100644 index 0000000000..28cc3dada1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/create.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.create( + "<TEAM_ID>", // teamId + "<NAME>", // name + listOf(), // roles (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/delete-membership.md b/docs/examples/1.8.x/server-kotlin/java/teams/delete-membership.md new file mode 100644 index 0000000000..3b414be028 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/delete-membership.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.deleteMembership( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/delete.md b/docs/examples/1.8.x/server-kotlin/java/teams/delete.md new file mode 100644 index 0000000000..07f5c12e4c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.delete( + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/get-membership.md b/docs/examples/1.8.x/server-kotlin/java/teams/get-membership.md new file mode 100644 index 0000000000..e7c1571af6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/get-membership.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.getMembership( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/get-prefs.md b/docs/examples/1.8.x/server-kotlin/java/teams/get-prefs.md new file mode 100644 index 0000000000..6d30814801 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/get-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.getPrefs( + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/get.md b/docs/examples/1.8.x/server-kotlin/java/teams/get.md new file mode 100644 index 0000000000..a479e9aff2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.get( + "<TEAM_ID>", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/list-memberships.md b/docs/examples/1.8.x/server-kotlin/java/teams/list-memberships.md new file mode 100644 index 0000000000..9694482008 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/list-memberships.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.listMemberships( + "<TEAM_ID>", // teamId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/list.md b/docs/examples/1.8.x/server-kotlin/java/teams/list.md new file mode 100644 index 0000000000..d0855ba841 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/update-membership-status.md b/docs/examples/1.8.x/server-kotlin/java/teams/update-membership-status.md new file mode 100644 index 0000000000..461cf4cbc3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/update-membership-status.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateMembershipStatus( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + "<USER_ID>", // userId + "<SECRET>", // secret + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/update-membership.md b/docs/examples/1.8.x/server-kotlin/java/teams/update-membership.md new file mode 100644 index 0000000000..d4816c57f1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/update-membership.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateMembership( + "<TEAM_ID>", // teamId + "<MEMBERSHIP_ID>", // membershipId + listOf(), // roles + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/update-name.md b/docs/examples/1.8.x/server-kotlin/java/teams/update-name.md new file mode 100644 index 0000000000..f2f1b02d93 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/update-name.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateName( + "<TEAM_ID>", // teamId + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/teams/update-prefs.md b/docs/examples/1.8.x/server-kotlin/java/teams/update-prefs.md new file mode 100644 index 0000000000..2ef05222df --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/teams/update-prefs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updatePrefs( + "<TEAM_ID>", // teamId + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tokens/create-file-token.md b/docs/examples/1.8.x/server-kotlin/java/tokens/create-file-token.md new file mode 100644 index 0000000000..6996641d40 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tokens/create-file-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.createFileToken( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + "", // expire (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tokens/delete.md b/docs/examples/1.8.x/server-kotlin/java/tokens/delete.md new file mode 100644 index 0000000000..bf1874d2f8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tokens/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.delete( + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tokens/get.md b/docs/examples/1.8.x/server-kotlin/java/tokens/get.md new file mode 100644 index 0000000000..c55563c2e1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tokens/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.get( + "<TOKEN_ID>", // tokenId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tokens/list.md b/docs/examples/1.8.x/server-kotlin/java/tokens/list.md new file mode 100644 index 0000000000..a59e9f5ee8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tokens/list.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.list( + "<BUCKET_ID>", // bucketId + "<FILE_ID>", // fileId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tokens/update.md b/docs/examples/1.8.x/server-kotlin/java/tokens/update.md new file mode 100644 index 0000000000..2a44f2d16e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tokens/update.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tokens; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tokens tokens = new Tokens(client); + +tokens.update( + "<TOKEN_ID>", // tokenId + "", // expire (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-argon2user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-argon2user.md new file mode 100644 index 0000000000..c78f236cec --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-argon2user.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createArgon2User( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-bcrypt-user.md new file mode 100644 index 0000000000..7b85f96054 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-bcrypt-user.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createBcryptUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-j-w-t.md b/docs/examples/1.8.x/server-kotlin/java/users/create-j-w-t.md new file mode 100644 index 0000000000..2b4d7e9c50 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-j-w-t.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createJWT( + "<USER_ID>", // userId + "<SESSION_ID>", // sessionId (optional) + 0, // duration (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-m-d5user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-m-d5user.md new file mode 100644 index 0000000000..666e10792e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-m-d5user.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createMD5User( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/java/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..62afec2a1f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-mfa-recovery-codes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createMfaRecoveryCodes( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..048ba39cca --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-p-h-pass-user.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createPHPassUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-s-h-a-user.md new file mode 100644 index 0000000000..ad729071c2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-s-h-a-user.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createSHAUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + PasswordHash.SHA1, // passwordVersion (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..77a7d5fdb3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-modified-user.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createScryptModifiedUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<PASSWORD_SALT>", // passwordSalt + "<PASSWORD_SALT_SEPARATOR>", // passwordSaltSeparator + "<PASSWORD_SIGNER_KEY>", // passwordSignerKey + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-user.md b/docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-user.md new file mode 100644 index 0000000000..0e81237ecf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-scrypt-user.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createScryptUser( + "<USER_ID>", // userId + "email@example.com", // email + "password", // password + "<PASSWORD_SALT>", // passwordSalt + 0, // passwordCpu + 0, // passwordMemory + 0, // passwordParallel + 0, // passwordLength + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-session.md b/docs/examples/1.8.x/server-kotlin/java/users/create-session.md new file mode 100644 index 0000000000..8d9ce03d8e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-session.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createSession( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-target.md b/docs/examples/1.8.x/server-kotlin/java/users/create-target.md new file mode 100644 index 0000000000..6681b170da --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-target.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; +import io.appwrite.enums.MessagingProviderType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + MessagingProviderType.EMAIL, // providerType + "<IDENTIFIER>", // identifier + "<PROVIDER_ID>", // providerId (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create-token.md b/docs/examples/1.8.x/server-kotlin/java/users/create-token.md new file mode 100644 index 0000000000..330b344b15 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create-token.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.createToken( + "<USER_ID>", // userId + 4, // length (optional) + 60, // expire (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/create.md b/docs/examples/1.8.x/server-kotlin/java/users/create.md new file mode 100644 index 0000000000..95a72bf7e0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/create.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.create( + "<USER_ID>", // userId + "email@example.com", // email (optional) + "+12065550100", // phone (optional) + "", // password (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/delete-identity.md b/docs/examples/1.8.x/server-kotlin/java/users/delete-identity.md new file mode 100644 index 0000000000..40c410db47 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/delete-identity.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteIdentity( + "<IDENTITY_ID>", // identityId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/java/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..7ed33d6d82 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/delete-mfa-authenticator.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; +import io.appwrite.enums.AuthenticatorType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteMfaAuthenticator( + "<USER_ID>", // userId + AuthenticatorType.TOTP, // type + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/delete-session.md b/docs/examples/1.8.x/server-kotlin/java/users/delete-session.md new file mode 100644 index 0000000000..0e0a52baf8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/delete-session.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteSession( + "<USER_ID>", // userId + "<SESSION_ID>", // sessionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/delete-sessions.md b/docs/examples/1.8.x/server-kotlin/java/users/delete-sessions.md new file mode 100644 index 0000000000..6a3bbbf46f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/delete-sessions.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteSessions( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/delete-target.md b/docs/examples/1.8.x/server-kotlin/java/users/delete-target.md new file mode 100644 index 0000000000..e38ee1d57d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/delete-target.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.deleteTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/delete.md b/docs/examples/1.8.x/server-kotlin/java/users/delete.md new file mode 100644 index 0000000000..d207f9af4b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/delete.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.delete( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/java/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..940dafee90 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/get-mfa-recovery-codes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.getMfaRecoveryCodes( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/get-prefs.md b/docs/examples/1.8.x/server-kotlin/java/users/get-prefs.md new file mode 100644 index 0000000000..9ff3e4b308 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/get-prefs.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.getPrefs( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/get-target.md b/docs/examples/1.8.x/server-kotlin/java/users/get-target.md new file mode 100644 index 0000000000..05c802835d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/get-target.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.getTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/get.md b/docs/examples/1.8.x/server-kotlin/java/users/get.md new file mode 100644 index 0000000000..d8cd707c9c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/get.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.get( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list-identities.md b/docs/examples/1.8.x/server-kotlin/java/users/list-identities.md new file mode 100644 index 0000000000..e0fc9d122a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list-identities.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listIdentities( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list-logs.md b/docs/examples/1.8.x/server-kotlin/java/users/list-logs.md new file mode 100644 index 0000000000..86c94ee3a4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list-logs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listLogs( + "<USER_ID>", // userId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list-memberships.md b/docs/examples/1.8.x/server-kotlin/java/users/list-memberships.md new file mode 100644 index 0000000000..d0cee13275 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list-memberships.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listMemberships( + "<USER_ID>", // userId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list-mfa-factors.md b/docs/examples/1.8.x/server-kotlin/java/users/list-mfa-factors.md new file mode 100644 index 0000000000..a377214d19 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list-mfa-factors.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listMfaFactors( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list-sessions.md b/docs/examples/1.8.x/server-kotlin/java/users/list-sessions.md new file mode 100644 index 0000000000..7e13cb31c9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list-sessions.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listSessions( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list-targets.md b/docs/examples/1.8.x/server-kotlin/java/users/list-targets.md new file mode 100644 index 0000000000..efa754273f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list-targets.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.listTargets( + "<USER_ID>", // userId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/list.md b/docs/examples/1.8.x/server-kotlin/java/users/list.md new file mode 100644 index 0000000000..d587eaf46b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/list.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.list( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-email-verification.md b/docs/examples/1.8.x/server-kotlin/java/users/update-email-verification.md new file mode 100644 index 0000000000..a79c87b4d6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-email-verification.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateEmailVerification( + "<USER_ID>", // userId + false, // emailVerification + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-email.md b/docs/examples/1.8.x/server-kotlin/java/users/update-email.md new file mode 100644 index 0000000000..24cdb00dff --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-email.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateEmail( + "<USER_ID>", // userId + "email@example.com", // email + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-labels.md b/docs/examples/1.8.x/server-kotlin/java/users/update-labels.md new file mode 100644 index 0000000000..379200a56b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-labels.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateLabels( + "<USER_ID>", // userId + listOf(), // labels + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/java/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..439561012f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-mfa-recovery-codes.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateMfaRecoveryCodes( + "<USER_ID>", // userId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-mfa.md b/docs/examples/1.8.x/server-kotlin/java/users/update-mfa.md new file mode 100644 index 0000000000..76a198f513 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-mfa.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateMfa( + "<USER_ID>", // userId + false, // mfa + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-name.md b/docs/examples/1.8.x/server-kotlin/java/users/update-name.md new file mode 100644 index 0000000000..b4f889cb6d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-name.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateName( + "<USER_ID>", // userId + "<NAME>", // name + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-password.md b/docs/examples/1.8.x/server-kotlin/java/users/update-password.md new file mode 100644 index 0000000000..94e24da45d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-password.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updatePassword( + "<USER_ID>", // userId + "", // password + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-phone-verification.md b/docs/examples/1.8.x/server-kotlin/java/users/update-phone-verification.md new file mode 100644 index 0000000000..4a1d5a2900 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-phone-verification.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updatePhoneVerification( + "<USER_ID>", // userId + false, // phoneVerification + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-phone.md b/docs/examples/1.8.x/server-kotlin/java/users/update-phone.md new file mode 100644 index 0000000000..49477fad43 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-phone.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updatePhone( + "<USER_ID>", // userId + "+12065550100", // number + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-prefs.md b/docs/examples/1.8.x/server-kotlin/java/users/update-prefs.md new file mode 100644 index 0000000000..c5a9677a20 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-prefs.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updatePrefs( + "<USER_ID>", // userId + mapOf( "a" to "b" ), // prefs + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-status.md b/docs/examples/1.8.x/server-kotlin/java/users/update-status.md new file mode 100644 index 0000000000..6e875b982f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-status.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateStatus( + "<USER_ID>", // userId + false, // status + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/users/update-target.md b/docs/examples/1.8.x/server-kotlin/java/users/update-target.md new file mode 100644 index 0000000000..67b90bfbac --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/users/update-target.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Users; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Users users = new Users(client); + +users.updateTarget( + "<USER_ID>", // userId + "<TARGET_ID>", // targetId + "<IDENTIFIER>", // identifier (optional) + "<PROVIDER_ID>", // providerId (optional) + "<NAME>", // name (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-anonymous-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-anonymous-session.md new file mode 100644 index 0000000000..0ddc3835dc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createAnonymousSession() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-password-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-password-session.md new file mode 100644 index 0000000000..9c7af95e13 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-password-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createEmailPasswordSession( + email = "email@example.com", + password = "password" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-token.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-token.md new file mode 100644 index 0000000000..84acd78a9c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-email-token.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createEmailToken( + userId = "<USER_ID>", + email = "email@example.com", + phrase = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-j-w-t.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-j-w-t.md new file mode 100644 index 0000000000..4c04aa1215 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-j-w-t.md @@ -0,0 +1,11 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createJWT() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..c1d8cba2cb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createMagicURLToken( + userId = "<USER_ID>", + email = "email@example.com", + url = "https://example.com", // optional + phrase = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..803579da03 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createMfaAuthenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-challenge.md new file mode 100644 index 0000000000..a3fbe25d75 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticationFactor + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createMfaChallenge( + factor = AuthenticationFactor.EMAIL +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..c21a382fcc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createMfaRecoveryCodes() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-o-auth2token.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-o-auth2token.md new file mode 100644 index 0000000000..1a8c1188b0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-o-auth2token.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.OAuthProvider + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +account.createOAuth2Token( + provider = OAuthProvider.AMAZON, + success = "https://example.com", // optional + failure = "https://example.com", // optional + scopes = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-token.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-token.md new file mode 100644 index 0000000000..be03e0659f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-token.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createPhoneToken( + userId = "<USER_ID>", + phone = "+12065550100" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-verification.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-verification.md new file mode 100644 index 0000000000..3ae45b3982 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-phone-verification.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createPhoneVerification() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-recovery.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-recovery.md new file mode 100644 index 0000000000..949219cfca --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-recovery.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createRecovery( + email = "email@example.com", + url = "https://example.com" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-session.md new file mode 100644 index 0000000000..5afb219ff0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.createSession( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create-verification.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-verification.md new file mode 100644 index 0000000000..f3441c9bdd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create-verification.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.createVerification( + url = "https://example.com" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/create.md new file mode 100644 index 0000000000..80640ba830 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.create( + userId = "<USER_ID>", + email = "email@example.com", + password = "", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-identity.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-identity.md new file mode 100644 index 0000000000..f9a5ce0a12 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-identity.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteIdentity( + identityId = "<IDENTITY_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..2068077f46 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteMfaAuthenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-session.md new file mode 100644 index 0000000000..31096ccc65 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteSession( + sessionId = "<SESSION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-sessions.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-sessions.md new file mode 100644 index 0000000000..dc29fb8aac --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/delete-sessions.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.deleteSessions() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..027c211230 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.getMfaRecoveryCodes() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/get-prefs.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/get-prefs.md new file mode 100644 index 0000000000..299abbd929 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/get-prefs.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.getPrefs() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/get-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/get-session.md new file mode 100644 index 0000000000..e40297e60c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/get-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.getSession( + sessionId = "<SESSION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/get.md new file mode 100644 index 0000000000..f65f4fd618 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/get.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.get() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/list-identities.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-identities.md new file mode 100644 index 0000000000..32eb86cb43 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-identities.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listIdentities( + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/list-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-logs.md new file mode 100644 index 0000000000..345b2f1f06 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-logs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listLogs( + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/list-mfa-factors.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-mfa-factors.md new file mode 100644 index 0000000000..ce47dcd752 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-mfa-factors.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listMfaFactors() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/list-sessions.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-sessions.md new file mode 100644 index 0000000000..899260cd5b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/list-sessions.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.listSessions() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-email.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-email.md new file mode 100644 index 0000000000..6ebe5e7ec9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-email.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateEmail( + email = "email@example.com", + password = "password" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-m-f-a.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-m-f-a.md new file mode 100644 index 0000000000..e12e8e00e2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-m-f-a.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMFA( + mfa = false +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..d4fe7f4861 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.updateMagicURLSession( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..521d133f6f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMfaAuthenticator( + type = AuthenticatorType.TOTP, + otp = "<OTP>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-challenge.md new file mode 100644 index 0000000000..6b978b765e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-challenge.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMfaChallenge( + challengeId = "<CHALLENGE_ID>", + otp = "<OTP>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..31da824bbf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateMfaRecoveryCodes() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-name.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-name.md new file mode 100644 index 0000000000..ecb7a2bd2f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-name.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateName( + name = "<NAME>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-password.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-password.md new file mode 100644 index 0000000000..159aa79aef --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-password.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updatePassword( + password = "", + oldPassword = "password" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-session.md new file mode 100644 index 0000000000..1bcc4c0955 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val account = Account(client) + +val response = account.updatePhoneSession( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-verification.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-verification.md new file mode 100644 index 0000000000..36a2d9c73b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updatePhoneVerification( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone.md new file mode 100644 index 0000000000..1ee4cbd39b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-phone.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updatePhone( + phone = "+12065550100", + password = "password" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-prefs.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-prefs.md new file mode 100644 index 0000000000..dafee7c0e5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updatePrefs( + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-recovery.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-recovery.md new file mode 100644 index 0000000000..e56381365d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-recovery.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateRecovery( + userId = "<USER_ID>", + secret = "<SECRET>", + password = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-session.md new file mode 100644 index 0000000000..ab3730af0e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateSession( + sessionId = "<SESSION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-status.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-status.md new file mode 100644 index 0000000000..021f6143c0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-status.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateStatus() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/account/update-verification.md b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-verification.md new file mode 100644 index 0000000000..6402093410 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/account/update-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Account + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val account = Account(client) + +val response = account.updateVerification( + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-browser.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-browser.md new file mode 100644 index 0000000000..f289205ab0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-browser.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Browser + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getBrowser( + code = Browser.AVANT_BROWSER, + width = 0, // optional + height = 0, // optional + quality = -1 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-credit-card.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-credit-card.md new file mode 100644 index 0000000000..1fd00a24bd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.CreditCard + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getCreditCard( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, // optional + height = 0, // optional + quality = -1 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-favicon.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-favicon.md new file mode 100644 index 0000000000..d1f5d9bfe6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-favicon.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getFavicon( + url = "https://example.com" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-flag.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-flag.md new file mode 100644 index 0000000000..a16aefcffd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-flag.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Flag + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getFlag( + code = Flag.AFGHANISTAN, + width = 0, // optional + height = 0, // optional + quality = -1 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-image.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-image.md new file mode 100644 index 0000000000..98b9c07e7f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-image.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getImage( + url = "https://example.com", + width = 0, // optional + height = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-initials.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-initials.md new file mode 100644 index 0000000000..2aa165ccf8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-initials.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getInitials( + name = "<NAME>", // optional + width = 0, // optional + height = 0, // optional + background = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-q-r.md b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-q-r.md new file mode 100644 index 0000000000..abcf488cbb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-q-r.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getQR( + text = "<TEXT>", + size = 1, // optional + margin = 0, // optional + download = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..b80bd9497a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-boolean-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createBooleanAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = false, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-collection.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-collection.md new file mode 100644 index 0000000000..de9679f559 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-collection.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + documentSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..2d730562a9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-datetime-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createDatetimeAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md new file mode 100644 index 0000000000..93da01eefa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val databases = Databases(client) + +val response = databases.createDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md new file mode 100644 index 0000000000..ddce31c71c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documents = listOf() +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-email-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-email-attribute.md new file mode 100644 index 0000000000..2a5a9c2a60 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-email-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createEmailAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "email@example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-enum-attribute.md new file mode 100644 index 0000000000..d9decdeba9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-enum-attribute.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createEnumAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-float-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-float-attribute.md new file mode 100644 index 0000000000..5ca86a66af --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-float-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createFloatAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-index.md new file mode 100644 index 0000000000..da777ac906 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-index.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.enums.IndexType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + type = IndexType.KEY, + attributes = listOf(), + orders = listOf(), // optional + lengths = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-integer-attribute.md new file mode 100644 index 0000000000..748d01a849 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-integer-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createIntegerAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-ip-attribute.md new file mode 100644 index 0000000000..bfc610517a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-ip-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createIpAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..1bf610321a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-relationship-attribute.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases +import io.appwrite.enums.RelationshipType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createRelationshipAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + relatedCollectionId = "<RELATED_COLLECTION_ID>", + type = RelationshipType.ONETOONE, + twoWay = false, // optional + key = "", // optional + twoWayKey = "", // optional + onDelete = "cascade" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-string-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-string-attribute.md new file mode 100644 index 0000000000..333cb76763 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-string-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createStringAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + size = 1, + required = false, + default = "<DEFAULT>", // optional + array = false, // optional + encrypt = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-url-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-url-attribute.md new file mode 100644 index 0000000000..06057d4683 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-url-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.createUrlAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "https://example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create.md new file mode 100644 index 0000000000..04c64801d2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.create( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..05204d76c6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/decrement-document-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.decrementDocumentAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + attribute = "", + value = 0, // optional + min = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-attribute.md new file mode 100644 index 0000000000..9a25155957 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-collection.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-collection.md new file mode 100644 index 0000000000..c46ca086b9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-collection.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-document.md new file mode 100644 index 0000000000..a9eea6b648 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-document.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.deleteDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-documents.md new file mode 100644 index 0000000000..c4caa63aae --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-documents.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-index.md new file mode 100644 index 0000000000..37c75dcfe5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.deleteIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete.md new file mode 100644 index 0000000000..07225698e2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.delete( + databaseId = "<DATABASE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-attribute.md new file mode 100644 index 0000000000..a59facd7db --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-attribute.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.getAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-collection.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-collection.md new file mode 100644 index 0000000000..7f6e578db1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-collection.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.getCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-document.md new file mode 100644 index 0000000000..d21a19869b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.getDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-index.md new file mode 100644 index 0000000000..39ac7af9fb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.getIndex( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get.md new file mode 100644 index 0000000000..6ebb0c109c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.get( + databaseId = "<DATABASE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/increment-document-attribute.md new file mode 100644 index 0000000000..40c1224ae7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/increment-document-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.incrementDocumentAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + attribute = "", + value = 0, // optional + max = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-attributes.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-attributes.md new file mode 100644 index 0000000000..5ddb0a6fea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-attributes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.listAttributes( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-collections.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-collections.md new file mode 100644 index 0000000000..5340903927 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-collections.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.listCollections( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-documents.md new file mode 100644 index 0000000000..ed9cb3165d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-documents.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.listDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-indexes.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-indexes.md new file mode 100644 index 0000000000..2ab2e6a1b2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list-indexes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.listIndexes( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list.md new file mode 100644 index 0000000000..cd61a0e714 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..4c9fd91d83 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-boolean-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateBooleanAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = false, + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-collection.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-collection.md new file mode 100644 index 0000000000..bd42ba07f4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-collection.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateCollection( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + documentSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..082ae1c05a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-datetime-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateDatetimeAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-document.md new file mode 100644 index 0000000000..4dd0349823 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-document.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val databases = Databases(client) + +val response = databases.updateDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-documents.md new file mode 100644 index 0000000000..9d6c2b5ea8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-documents.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + data = mapOf( "a" to "b" ), // optional + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-email-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-email-attribute.md new file mode 100644 index 0000000000..026bd6447f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-email-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateEmailAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "email@example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-enum-attribute.md new file mode 100644 index 0000000000..e68a29c20a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-enum-attribute.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateEnumAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-float-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-float-attribute.md new file mode 100644 index 0000000000..58b110743e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-float-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateFloatAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-integer-attribute.md new file mode 100644 index 0000000000..a00dcf95a0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-integer-attribute.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateIntegerAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-ip-attribute.md new file mode 100644 index 0000000000..505e5ea18d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-ip-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateIpAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..001dd1a391 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-relationship-attribute.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateRelationshipAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + onDelete = "cascade", // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-string-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-string-attribute.md new file mode 100644 index 0000000000..364a6b5b7f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-string-attribute.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateStringAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "<DEFAULT>", + size = 1, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-url-attribute.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-url-attribute.md new file mode 100644 index 0000000000..a628cc57f8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update-url-attribute.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.updateUrlAttribute( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + key = "", + required = false, + default = "https://example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update.md new file mode 100644 index 0000000000..05f832738a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/update.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.update( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md new file mode 100644 index 0000000000..df261dbcb6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val databases = Databases(client) + +val response = databases.upsertDocument( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>", + documentId = "<DOCUMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md new file mode 100644 index 0000000000..1cb376f107 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Databases + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +val databases = Databases(client) + +val response = databases.upsertDocuments( + databaseId = "<DATABASE_ID>", + collectionId = "<COLLECTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-deployment.md new file mode 100644 index 0000000000..ddc6e8b207 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-deployment.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createDeployment( + functionId = "<FUNCTION_ID>", + code = InputFile.fromPath("file.png"), + activate = false, + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..a3395f118f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createDuplicateDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>", + buildId = "<BUILD_ID>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md new file mode 100644 index 0000000000..94bfa2310c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val functions = Functions(client) + +val response = functions.createExecution( + functionId = "<FUNCTION_ID>", + body = "<BODY>", // optional + async = false, // optional + path = "<PATH>", // optional + method = "GET", // optional + headers = mapOf( "a" to "b" ), // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-template-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-template-deployment.md new file mode 100644 index 0000000000..90c311ec7a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-template-deployment.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createTemplateDeployment( + functionId = "<FUNCTION_ID>", + repository = "<REPOSITORY>", + owner = "<OWNER>", + rootDirectory = "<ROOT_DIRECTORY>", + version = "<VERSION>", + activate = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-variable.md new file mode 100644 index 0000000000..061bc20534 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-variable.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createVariable( + functionId = "<FUNCTION_ID>", + key = "<KEY>", + value = "<VALUE>", + secret = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..08bb5a3097 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-vcs-deployment.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.VCSDeploymentType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.createVcsDeployment( + functionId = "<FUNCTION_ID>", + type = VCSDeploymentType.BRANCH, + reference = "<REFERENCE>", + activate = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create.md new file mode 100644 index 0000000000..c0ea4de201 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions +import io.appwrite.enums.Runtime + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.create( + functionId = "<FUNCTION_ID>", + name = "<NAME>", + runtime = .NODE_14_5, + execute = listOf("any"), // optional + events = listOf(), // optional + schedule = "", // optional + timeout = 1, // optional + enabled = false, // optional + logging = false, // optional + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>", // optional + scopes = listOf(), // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-deployment.md new file mode 100644 index 0000000000..937fc961da --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.deleteDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-execution.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-execution.md new file mode 100644 index 0000000000..95994f822a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-execution.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.deleteExecution( + functionId = "<FUNCTION_ID>", + executionId = "<EXECUTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-variable.md new file mode 100644 index 0000000000..e1793675c9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.deleteVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete.md new file mode 100644 index 0000000000..9651744767 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.delete( + functionId = "<FUNCTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment-download.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment-download.md new file mode 100644 index 0000000000..634cfae3b4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment-download.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val result = functions.getDeploymentDownload( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>", + type = "source" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment.md new file mode 100644 index 0000000000..eba4abb6df --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.getDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-execution.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-execution.md new file mode 100644 index 0000000000..480dbb76ba --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-execution.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val functions = Functions(client) + +val response = functions.getExecution( + functionId = "<FUNCTION_ID>", + executionId = "<EXECUTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-variable.md new file mode 100644 index 0000000000..95359ef8fc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.getVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get.md new file mode 100644 index 0000000000..162fa22497 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.get( + functionId = "<FUNCTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-deployments.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-deployments.md new file mode 100644 index 0000000000..9318442afa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-deployments.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.listDeployments( + functionId = "<FUNCTION_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-executions.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-executions.md new file mode 100644 index 0000000000..926719cda8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-executions.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val functions = Functions(client) + +val response = functions.listExecutions( + functionId = "<FUNCTION_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-runtimes.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-runtimes.md new file mode 100644 index 0000000000..5b3673b84d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-runtimes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.listRuntimes() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-specifications.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-specifications.md new file mode 100644 index 0000000000..0b2fb46a4b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-specifications.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.listSpecifications() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-variables.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-variables.md new file mode 100644 index 0000000000..7f576e8957 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list-variables.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.listVariables( + functionId = "<FUNCTION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list.md new file mode 100644 index 0000000000..b10fdff53a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-deployment-status.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-deployment-status.md new file mode 100644 index 0000000000..0e6e9c0abe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-deployment-status.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.updateDeploymentStatus( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-function-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-function-deployment.md new file mode 100644 index 0000000000..a975e07efe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-function-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.updateFunctionDeployment( + functionId = "<FUNCTION_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-variable.md new file mode 100644 index 0000000000..106b340eb5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update-variable.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.updateVariable( + functionId = "<FUNCTION_ID>", + variableId = "<VARIABLE_ID>", + key = "<KEY>", + value = "<VALUE>", // optional + secret = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update.md new file mode 100644 index 0000000000..7f0b33ebd7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/update.md @@ -0,0 +1,31 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Functions + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val functions = Functions(client) + +val response = functions.update( + functionId = "<FUNCTION_ID>", + name = "<NAME>", + runtime = "node-14.5", // optional + execute = listOf("any"), // optional + events = listOf(), // optional + schedule = "", // optional + timeout = 1, // optional + enabled = false, // optional + logging = false, // optional + entrypoint = "<ENTRYPOINT>", // optional + commands = "<COMMANDS>", // optional + scopes = listOf(), // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/graphql/mutation.md b/docs/examples/1.8.x/server-kotlin/kotlin/graphql/mutation.md new file mode 100644 index 0000000000..98081ab06b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/graphql/mutation.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val graphql = Graphql(client) + +val response = graphql.mutation( + query = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/graphql/query.md b/docs/examples/1.8.x/server-kotlin/kotlin/graphql/query.md new file mode 100644 index 0000000000..dec8dd350c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/graphql/query.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Graphql + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val graphql = Graphql(client) + +val response = graphql.query( + query = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-antivirus.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-antivirus.md new file mode 100644 index 0000000000..869b4c4804 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-antivirus.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getAntivirus() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-cache.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-cache.md new file mode 100644 index 0000000000..8b72ec414f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-cache.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getCache() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-certificate.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-certificate.md new file mode 100644 index 0000000000..74bf618704 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-certificate.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getCertificate( + domain = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-d-b.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-d-b.md new file mode 100644 index 0000000000..a55a1146f4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-d-b.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getDB() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-failed-jobs.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-failed-jobs.md new file mode 100644 index 0000000000..027df127cc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-failed-jobs.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health +import io.appwrite.enums.Name + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getFailedJobs( + name = .V1_DATABASE, + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-pub-sub.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-pub-sub.md new file mode 100644 index 0000000000..53c3820232 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-pub-sub.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getPubSub() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-builds.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-builds.md new file mode 100644 index 0000000000..371aad90f8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-builds.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueBuilds( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-certificates.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-certificates.md new file mode 100644 index 0000000000..5c6adeecb5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueCertificates( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-databases.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-databases.md new file mode 100644 index 0000000000..3a3405830d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-databases.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueDatabases( + name = "<NAME>", // optional + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-deletes.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-deletes.md new file mode 100644 index 0000000000..5d0b8a3381 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-deletes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueDeletes( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-functions.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-functions.md new file mode 100644 index 0000000000..7a42b61ba5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-functions.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueFunctions( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-logs.md new file mode 100644 index 0000000000..151025bfb6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-logs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueLogs( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-mails.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-mails.md new file mode 100644 index 0000000000..f5a905dd73 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-mails.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueMails( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-messaging.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-messaging.md new file mode 100644 index 0000000000..4a837928eb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-messaging.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueMessaging( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-migrations.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-migrations.md new file mode 100644 index 0000000000..853d294ed1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-migrations.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueMigrations( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..6a76f528e2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-stats-resources.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueStatsResources( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-usage.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-usage.md new file mode 100644 index 0000000000..e344b9eddc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-usage.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueUsage( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-webhooks.md new file mode 100644 index 0000000000..f5ffc58d8d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getQueueWebhooks( + threshold = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage-local.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage-local.md new file mode 100644 index 0000000000..32a21aea0a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage-local.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getStorageLocal() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage.md new file mode 100644 index 0000000000..8af609aad9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-storage.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getStorage() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get-time.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-time.md new file mode 100644 index 0000000000..8054ed7c69 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get-time.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.getTime() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/health/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/health/get.md new file mode 100644 index 0000000000..0845320bb5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/health/get.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Health + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val health = Health(client) + +val response = health.get() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/get.md new file mode 100644 index 0000000000..6840259c27 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/get.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.get() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-codes.md new file mode 100644 index 0000000000..fd0c4e413e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-codes.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCodes() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-continents.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-continents.md new file mode 100644 index 0000000000..699d599f56 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-continents.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listContinents() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-e-u.md new file mode 100644 index 0000000000..13e86f3064 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-e-u.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCountriesEU() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-phones.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-phones.md new file mode 100644 index 0000000000..b660ccf433 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCountriesPhones() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries.md new file mode 100644 index 0000000000..3457ceb4c5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-countries.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCountries() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-currencies.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-currencies.md new file mode 100644 index 0000000000..80b2cc7e52 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-currencies.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listCurrencies() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-languages.md b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-languages.md new file mode 100644 index 0000000000..b36c1389a5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/locale/list-languages.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Locale + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val locale = Locale(client) + +val response = locale.listLanguages() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-apns-provider.md new file mode 100644 index 0000000000..a19cbe2725 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-apns-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createApnsProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + authKey = "<AUTH_KEY>", // optional + authKeyId = "<AUTH_KEY_ID>", // optional + teamId = "<TEAM_ID>", // optional + bundleId = "<BUNDLE_ID>", // optional + sandbox = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-email.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-email.md new file mode 100644 index 0000000000..f0f41e9e53 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-email.md @@ -0,0 +1,25 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createEmail( + messageId = "<MESSAGE_ID>", + subject = "<SUBJECT>", + content = "<CONTENT>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + cc = listOf(), // optional + bcc = listOf(), // optional + attachments = listOf(), // optional + draft = false, // optional + html = false, // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..c1a077ca5c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-fcm-provider.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createFcmProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + serviceAccountJSON = mapOf( "a" to "b" ), // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..d205171dfe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-mailgun-provider.md @@ -0,0 +1,23 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createMailgunProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + apiKey = "<API_KEY>", // optional + domain = "<DOMAIN>", // optional + isEuRegion = false, // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-msg91provider.md new file mode 100644 index 0000000000..5ea3d223e9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-msg91provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createMsg91Provider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + templateId = "<TEMPLATE_ID>", // optional + senderId = "<SENDER_ID>", // optional + authKey = "<AUTH_KEY>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-push.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-push.md new file mode 100644 index 0000000000..5b07f5355b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-push.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createPush( + messageId = "<MESSAGE_ID>", + title = "<TITLE>", // optional + body = "<BODY>", // optional + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + data = mapOf( "a" to "b" ), // optional + action = "<ACTION>", // optional + image = "[ID1:ID2]", // optional + icon = "<ICON>", // optional + sound = "<SOUND>", // optional + color = "<COLOR>", // optional + tag = "<TAG>", // optional + badge = 0, // optional + draft = false, // optional + scheduledAt = "", // optional + contentAvailable = false, // optional + critical = false, // optional + priority = "normal" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..e96a052d5a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sendgrid-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createSendgridProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + apiKey = "<API_KEY>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sms.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sms.md new file mode 100644 index 0000000000..49185290c3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-sms.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createSms( + messageId = "<MESSAGE_ID>", + content = "<CONTENT>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + draft = false, // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..ae3b6678e4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-smtp-provider.md @@ -0,0 +1,27 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createSmtpProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + host = "<HOST>", + port = 1, // optional + username = "<USERNAME>", // optional + password = "<PASSWORD>", // optional + encryption = "none", // optional + autoTLS = false, // optional + mailer = "<MAILER>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "email@example.com", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-subscriber.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-subscriber.md new file mode 100644 index 0000000000..44e3a72a1d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-subscriber.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val messaging = Messaging(client) + +val response = messaging.createSubscriber( + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>", + targetId = "<TARGET_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..cddd6d801a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-telesign-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createTelesignProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + customerId = "<CUSTOMER_ID>", // optional + apiKey = "<API_KEY>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..12eb62d957 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-textmagic-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createTextmagicProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + username = "<USERNAME>", // optional + apiKey = "<API_KEY>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-topic.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-topic.md new file mode 100644 index 0000000000..570be33e41 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-topic.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createTopic( + topicId = "<TOPIC_ID>", + name = "<NAME>", + subscribe = listOf("any") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..c05b835d52 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-twilio-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createTwilioProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + accountSid = "<ACCOUNT_SID>", // optional + authToken = "<AUTH_TOKEN>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..7e049d8313 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/create-vonage-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.createVonageProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", + from = "+12065550100", // optional + apiKey = "<API_KEY>", // optional + apiSecret = "<API_SECRET>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-provider.md new file mode 100644 index 0000000000..4989da8cd3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-provider.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.deleteProvider( + providerId = "<PROVIDER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-subscriber.md new file mode 100644 index 0000000000..0f99f251a3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-subscriber.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val messaging = Messaging(client) + +val response = messaging.deleteSubscriber( + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-topic.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-topic.md new file mode 100644 index 0000000000..8a52c9f9a5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete-topic.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.deleteTopic( + topicId = "<TOPIC_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete.md new file mode 100644 index 0000000000..7e4ec51c93 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.delete( + messageId = "<MESSAGE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-message.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-message.md new file mode 100644 index 0000000000..710d356113 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-message.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.getMessage( + messageId = "<MESSAGE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-provider.md new file mode 100644 index 0000000000..c678d4d984 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-provider.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.getProvider( + providerId = "<PROVIDER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-subscriber.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-subscriber.md new file mode 100644 index 0000000000..59b335a2e6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-subscriber.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.getSubscriber( + topicId = "<TOPIC_ID>", + subscriberId = "<SUBSCRIBER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-topic.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-topic.md new file mode 100644 index 0000000000..c189898e95 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/get-topic.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.getTopic( + topicId = "<TOPIC_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-message-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-message-logs.md new file mode 100644 index 0000000000..e1463f8911 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-message-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listMessageLogs( + messageId = "<MESSAGE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-messages.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-messages.md new file mode 100644 index 0000000000..618f8c493e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-messages.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listMessages( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-provider-logs.md new file mode 100644 index 0000000000..ab0a9f1260 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-provider-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listProviderLogs( + providerId = "<PROVIDER_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-providers.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-providers.md new file mode 100644 index 0000000000..34c70a9c86 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-providers.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listProviders( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..8a82af8f70 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscriber-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listSubscriberLogs( + subscriberId = "<SUBSCRIBER_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscribers.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscribers.md new file mode 100644 index 0000000000..acf5249900 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-subscribers.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listSubscribers( + topicId = "<TOPIC_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-targets.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-targets.md new file mode 100644 index 0000000000..ad500f0e38 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-targets.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listTargets( + messageId = "<MESSAGE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topic-logs.md new file mode 100644 index 0000000000..683b418032 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topic-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listTopicLogs( + topicId = "<TOPIC_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topics.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topics.md new file mode 100644 index 0000000000..125c6ffb82 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/list-topics.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.listTopics( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-apns-provider.md new file mode 100644 index 0000000000..d0d5a07848 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-apns-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateApnsProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + authKey = "<AUTH_KEY>", // optional + authKeyId = "<AUTH_KEY_ID>", // optional + teamId = "<TEAM_ID>", // optional + bundleId = "<BUNDLE_ID>", // optional + sandbox = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-email.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-email.md new file mode 100644 index 0000000000..cd74bb4290 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-email.md @@ -0,0 +1,25 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateEmail( + messageId = "<MESSAGE_ID>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + subject = "<SUBJECT>", // optional + content = "<CONTENT>", // optional + draft = false, // optional + html = false, // optional + cc = listOf(), // optional + bcc = listOf(), // optional + scheduledAt = "", // optional + attachments = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..477e7188d8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-fcm-provider.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateFcmProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + serviceAccountJSON = mapOf( "a" to "b" ) // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..4bec8d2a44 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-mailgun-provider.md @@ -0,0 +1,23 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateMailgunProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + apiKey = "<API_KEY>", // optional + domain = "<DOMAIN>", // optional + isEuRegion = false, // optional + enabled = false, // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-msg91provider.md new file mode 100644 index 0000000000..3abaca75bb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-msg91provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateMsg91Provider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + templateId = "<TEMPLATE_ID>", // optional + senderId = "<SENDER_ID>", // optional + authKey = "<AUTH_KEY>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-push.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-push.md new file mode 100644 index 0000000000..710a37e518 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-push.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updatePush( + messageId = "<MESSAGE_ID>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + title = "<TITLE>", // optional + body = "<BODY>", // optional + data = mapOf( "a" to "b" ), // optional + action = "<ACTION>", // optional + image = "[ID1:ID2]", // optional + icon = "<ICON>", // optional + sound = "<SOUND>", // optional + color = "<COLOR>", // optional + tag = "<TAG>", // optional + badge = 0, // optional + draft = false, // optional + scheduledAt = "", // optional + contentAvailable = false, // optional + critical = false, // optional + priority = "normal" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..962aa694e6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sendgrid-provider.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSendgridProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + apiKey = "<API_KEY>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sms.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sms.md new file mode 100644 index 0000000000..3d08b8a16c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-sms.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSms( + messageId = "<MESSAGE_ID>", + topics = listOf(), // optional + users = listOf(), // optional + targets = listOf(), // optional + content = "<CONTENT>", // optional + draft = false, // optional + scheduledAt = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..cb745865ec --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-smtp-provider.md @@ -0,0 +1,27 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateSmtpProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + host = "<HOST>", // optional + port = 1, // optional + username = "<USERNAME>", // optional + password = "<PASSWORD>", // optional + encryption = "none", // optional + autoTLS = false, // optional + mailer = "<MAILER>", // optional + fromName = "<FROM_NAME>", // optional + fromEmail = "email@example.com", // optional + replyToName = "<REPLY_TO_NAME>", // optional + replyToEmail = "<REPLY_TO_EMAIL>", // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..83fb11a856 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-telesign-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateTelesignProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + customerId = "<CUSTOMER_ID>", // optional + apiKey = "<API_KEY>", // optional + from = "<FROM>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..1e2ee1e2c8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-textmagic-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateTextmagicProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + username = "<USERNAME>", // optional + apiKey = "<API_KEY>", // optional + from = "<FROM>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-topic.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-topic.md new file mode 100644 index 0000000000..0991fd0ee4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-topic.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateTopic( + topicId = "<TOPIC_ID>", + name = "<NAME>", // optional + subscribe = listOf("any") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..1c86f9e853 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-twilio-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateTwilioProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + accountSid = "<ACCOUNT_SID>", // optional + authToken = "<AUTH_TOKEN>", // optional + from = "<FROM>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..bf0ee2b75c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/messaging/update-vonage-provider.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Messaging + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val messaging = Messaging(client) + +val response = messaging.updateVonageProvider( + providerId = "<PROVIDER_ID>", + name = "<NAME>", // optional + enabled = false, // optional + apiKey = "<API_KEY>", // optional + apiSecret = "<API_SECRET>", // optional + from = "<FROM>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-deployment.md new file mode 100644 index 0000000000..ba2c24dd6b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-deployment.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createDeployment( + siteId = "<SITE_ID>", + code = InputFile.fromPath("file.png"), + activate = false, + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..06a3ce8467 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createDuplicateDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-template-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-template-deployment.md new file mode 100644 index 0000000000..bf246be089 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-template-deployment.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createTemplateDeployment( + siteId = "<SITE_ID>", + repository = "<REPOSITORY>", + owner = "<OWNER>", + rootDirectory = "<ROOT_DIRECTORY>", + version = "<VERSION>", + activate = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-variable.md new file mode 100644 index 0000000000..6eb466682f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-variable.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createVariable( + siteId = "<SITE_ID>", + key = "<KEY>", + value = "<VALUE>", + secret = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..141cf3e658 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create-vcs-deployment.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.VCSDeploymentType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.createVcsDeployment( + siteId = "<SITE_ID>", + type = VCSDeploymentType.BRANCH, + reference = "<REFERENCE>", + activate = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create.md new file mode 100644 index 0000000000..a5e9719faf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/create.md @@ -0,0 +1,33 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.Framework +import io.appwrite.enums.BuildRuntime + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.create( + siteId = "<SITE_ID>", + name = "<NAME>", + framework = .ANALOG, + buildRuntime = .NODE_14_5, + enabled = false, // optional + logging = false, // optional + timeout = 1, // optional + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>", // optional + adapter = "static", // optional + installationId = "<INSTALLATION_ID>", // optional + fallbackFile = "<FALLBACK_FILE>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-deployment.md new file mode 100644 index 0000000000..6d739183f1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.deleteDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-log.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-log.md new file mode 100644 index 0000000000..c7d7b77824 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-log.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.deleteLog( + siteId = "<SITE_ID>", + logId = "<LOG_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-variable.md new file mode 100644 index 0000000000..7859a8a852 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.deleteVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete.md new file mode 100644 index 0000000000..369b6144c3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.delete( + siteId = "<SITE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment-download.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment-download.md new file mode 100644 index 0000000000..84324762cc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment-download.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val result = sites.getDeploymentDownload( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>", + type = "source" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment.md new file mode 100644 index 0000000000..f2a33a409e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.getDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-log.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-log.md new file mode 100644 index 0000000000..ff46f77d12 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-log.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.getLog( + siteId = "<SITE_ID>", + logId = "<LOG_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-variable.md new file mode 100644 index 0000000000..ccab666607 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get-variable.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.getVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get.md new file mode 100644 index 0000000000..7ced974ede --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.get( + siteId = "<SITE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-deployments.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-deployments.md new file mode 100644 index 0000000000..6bc29ccd0e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-deployments.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listDeployments( + siteId = "<SITE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-frameworks.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-frameworks.md new file mode 100644 index 0000000000..cf02b75bc2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-frameworks.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listFrameworks() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-logs.md new file mode 100644 index 0000000000..d7979ded39 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listLogs( + siteId = "<SITE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-specifications.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-specifications.md new file mode 100644 index 0000000000..56e864059a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-specifications.md @@ -0,0 +1,12 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listSpecifications() diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-variables.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-variables.md new file mode 100644 index 0000000000..70ec49799b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list-variables.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.listVariables( + siteId = "<SITE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list.md new file mode 100644 index 0000000000..26e965177d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-deployment-status.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-deployment-status.md new file mode 100644 index 0000000000..585fc324ed --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-deployment-status.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.updateDeploymentStatus( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-site-deployment.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-site-deployment.md new file mode 100644 index 0000000000..fb9bb726f8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-site-deployment.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.updateSiteDeployment( + siteId = "<SITE_ID>", + deploymentId = "<DEPLOYMENT_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-variable.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-variable.md new file mode 100644 index 0000000000..b32c27809a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update-variable.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.updateVariable( + siteId = "<SITE_ID>", + variableId = "<VARIABLE_ID>", + key = "<KEY>", + value = "<VALUE>", // optional + secret = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/sites/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update.md new file mode 100644 index 0000000000..4b4a938d95 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/sites/update.md @@ -0,0 +1,32 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Sites +import io.appwrite.enums.Framework + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val sites = Sites(client) + +val response = sites.update( + siteId = "<SITE_ID>", + name = "<NAME>", + framework = .ANALOG, + enabled = false, // optional + logging = false, // optional + timeout = 1, // optional + installCommand = "<INSTALL_COMMAND>", // optional + buildCommand = "<BUILD_COMMAND>", // optional + outputDirectory = "<OUTPUT_DIRECTORY>", // optional + buildRuntime = "node-14.5", // optional + adapter = "static", // optional + fallbackFile = "<FALLBACK_FILE>", // optional + installationId = "<INSTALLATION_ID>", // optional + providerRepositoryId = "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch = "<PROVIDER_BRANCH>", // optional + providerSilentMode = false, // optional + providerRootDirectory = "<PROVIDER_ROOT_DIRECTORY>", // optional + specification = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-bucket.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-bucket.md new file mode 100644 index 0000000000..0bca827872 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.createBucket( + bucketId = "<BUCKET_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + fileSecurity = false, // optional + enabled = false, // optional + maximumFileSize = 1, // optional + allowedFileExtensions = listOf(), // optional + compression = "none", // optional + encryption = false, // optional + antivirus = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-file.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-file.md new file mode 100644 index 0000000000..b22b32a665 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/create-file.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.createFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + file = InputFile.fromPath("file.png"), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-bucket.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-bucket.md new file mode 100644 index 0000000000..4a0904ec63 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-bucket.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.deleteBucket( + bucketId = "<BUCKET_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-file.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-file.md new file mode 100644 index 0000000000..cf5e285db3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/delete-file.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.deleteFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-bucket.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-bucket.md new file mode 100644 index 0000000000..e2a6a8f527 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-bucket.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.getBucket( + bucketId = "<BUCKET_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-download.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-download.md new file mode 100644 index 0000000000..c14c966b8b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-download.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val result = storage.getFileDownload( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + token = "<TOKEN>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-preview.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-preview.md new file mode 100644 index 0000000000..45122de2f8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-preview.md @@ -0,0 +1,27 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val result = storage.getFilePreview( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + width = 0, // optional + height = 0, // optional + gravity = "center", // optional + quality = -1, // optional + borderWidth = 0, // optional + borderColor = "", // optional + borderRadius = 0, // optional + opacity = 0, // optional + rotation = -360, // optional + background = "", // optional + output = "jpg", // optional + token = "<TOKEN>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-view.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-view.md new file mode 100644 index 0000000000..fec1ec7162 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file-view.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val result = storage.getFileView( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + token = "<TOKEN>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file.md new file mode 100644 index 0000000000..a807177dce --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/get-file.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.getFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/list-buckets.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/list-buckets.md new file mode 100644 index 0000000000..a8a066dc9f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/list-buckets.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.listBuckets( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/list-files.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/list-files.md new file mode 100644 index 0000000000..cb9a776775 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/list-files.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.listFiles( + bucketId = "<BUCKET_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-bucket.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-bucket.md new file mode 100644 index 0000000000..d475a6e5ed --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-bucket.md @@ -0,0 +1,23 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val storage = Storage(client) + +val response = storage.updateBucket( + bucketId = "<BUCKET_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + fileSecurity = false, // optional + enabled = false, // optional + maximumFileSize = 1, // optional + allowedFileExtensions = listOf(), // optional + compression = "none", // optional + encryption = false, // optional + antivirus = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-file.md b/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-file.md new file mode 100644 index 0000000000..e82ea8125c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/storage/update-file.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Storage + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val storage = Storage(client) + +val response = storage.updateFile( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + name = "<NAME>", // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md new file mode 100644 index 0000000000..68b8dc51bd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md new file mode 100644 index 0000000000..8740a71d3c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md new file mode 100644 index 0000000000..34a6cb669f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md new file mode 100644 index 0000000000..d3d2fc9286 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md new file mode 100644 index 0000000000..8540430cea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md new file mode 100644 index 0000000000..7ea1668841 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables +import io.appwrite.enums.Type + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + type = .KEY, + columns = listOf(), + orders = listOf(), // optional + lengths = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md new file mode 100644 index 0000000000..1222746259 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md new file mode 100644 index 0000000000..277c756d24 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md new file mode 100644 index 0000000000..ae3c87ee39 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables +import io.appwrite.enums.Type + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + relatedTableId = "<RELATED_TABLE_ID>", + type = .ONETOONE, + twoWay = false, // optional + key = "", // optional + twoWayKey = "", // optional + onDelete = "cascade" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md new file mode 100644 index 0000000000..5df0890f99 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val tables = Tables(client) + +val response = tables.createRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md new file mode 100644 index 0000000000..f549d6fb8c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf() +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md new file mode 100644 index 0000000000..d82026c31d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + size = 1, + required = false, + default = "<DEFAULT>", // optional + array = false, // optional + encrypt = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md new file mode 100644 index 0000000000..42f50e9ec9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md new file mode 100644 index 0000000000..3dc1d1a37d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.create( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md new file mode 100644 index 0000000000..f78f7bbed7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.decrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + min = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md new file mode 100644 index 0000000000..d41f2ceabf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.deleteColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md new file mode 100644 index 0000000000..7af6648f2f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.deleteIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md new file mode 100644 index 0000000000..d182ccff95 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.deleteRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md new file mode 100644 index 0000000000..54ff6b690c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.deleteRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md new file mode 100644 index 0000000000..5cbd03226a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.delete( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md new file mode 100644 index 0000000000..6f4d65b4dc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.getColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md new file mode 100644 index 0000000000..660502f228 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.getIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md new file mode 100644 index 0000000000..cbaaa6c3e9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.getRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md new file mode 100644 index 0000000000..ff6d354c15 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.get( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md new file mode 100644 index 0000000000..7917b7f939 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.incrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + max = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md new file mode 100644 index 0000000000..4c1765193d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.listColumns( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md new file mode 100644 index 0000000000..bcd1fe75ab --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.listIndexes( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md new file mode 100644 index 0000000000..38b776acb8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.listRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md new file mode 100644 index 0000000000..37b03445da --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.list( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md new file mode 100644 index 0000000000..10a0422d2d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md new file mode 100644 index 0000000000..69ccf0354e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md new file mode 100644 index 0000000000..593a89b4ce --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md new file mode 100644 index 0000000000..b672e3e155 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md new file mode 100644 index 0000000000..005c4e64a5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md new file mode 100644 index 0000000000..39da19d562 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md new file mode 100644 index 0000000000..40e54bcdfd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md new file mode 100644 index 0000000000..d4c36e8802 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + onDelete = "cascade", // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md new file mode 100644 index 0000000000..6d3d9a47f7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.updateRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md new file mode 100644 index 0000000000..aac87c19b0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + data = mapOf( "a" to "b" ), // optional + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md new file mode 100644 index 0000000000..bb5b1f4bcf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "<DEFAULT>", + size = 1, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md new file mode 100644 index 0000000000..07f43e3907 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md new file mode 100644 index 0000000000..381532316d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.update( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md new file mode 100644 index 0000000000..6e02b3abe9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val tables = Tables(client) + +val response = tables.upsertRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md new file mode 100644 index 0000000000..d639e3d30b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.upsertRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/create-membership.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/create-membership.md new file mode 100644 index 0000000000..33eb16568e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/create-membership.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.createMembership( + teamId = "<TEAM_ID>", + roles = listOf(), + email = "email@example.com", // optional + userId = "<USER_ID>", // optional + phone = "+12065550100", // optional + url = "https://example.com", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/create.md new file mode 100644 index 0000000000..6ec7e533d2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/create.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.create( + teamId = "<TEAM_ID>", + name = "<NAME>", + roles = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/delete-membership.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/delete-membership.md new file mode 100644 index 0000000000..48c924f37b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/delete-membership.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.deleteMembership( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/delete.md new file mode 100644 index 0000000000..4b70ff2f18 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.delete( + teamId = "<TEAM_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/get-membership.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/get-membership.md new file mode 100644 index 0000000000..a636c217da --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/get-membership.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.getMembership( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/get-prefs.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/get-prefs.md new file mode 100644 index 0000000000..2b73432d6c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/get-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.getPrefs( + teamId = "<TEAM_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/get.md new file mode 100644 index 0000000000..72b667776f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.get( + teamId = "<TEAM_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/list-memberships.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/list-memberships.md new file mode 100644 index 0000000000..287087394e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/list-memberships.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.listMemberships( + teamId = "<TEAM_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/list.md new file mode 100644 index 0000000000..ee3e3e43b4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership-status.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership-status.md new file mode 100644 index 0000000000..b7a0d51ec5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership-status.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateMembershipStatus( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>", + userId = "<USER_ID>", + secret = "<SECRET>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership.md new file mode 100644 index 0000000000..7a4377fb4d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-membership.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateMembership( + teamId = "<TEAM_ID>", + membershipId = "<MEMBERSHIP_ID>", + roles = listOf() +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-name.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-name.md new file mode 100644 index 0000000000..2f13d7c460 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-name.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateName( + teamId = "<TEAM_ID>", + name = "<NAME>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-prefs.md b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-prefs.md new file mode 100644 index 0000000000..62c7f01ca5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/teams/update-prefs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updatePrefs( + teamId = "<TEAM_ID>", + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tokens/create-file-token.md b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/create-file-token.md new file mode 100644 index 0000000000..63d8fc301b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/create-file-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.createFileToken( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + expire = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tokens/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/delete.md new file mode 100644 index 0000000000..1831bc6a87 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.delete( + tokenId = "<TOKEN_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tokens/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/get.md new file mode 100644 index 0000000000..70a47c2349 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.get( + tokenId = "<TOKEN_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tokens/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/list.md new file mode 100644 index 0000000000..697579065c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/list.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.list( + bucketId = "<BUCKET_ID>", + fileId = "<FILE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tokens/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/update.md new file mode 100644 index 0000000000..045ddaae4a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tokens/update.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tokens + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tokens = Tokens(client) + +val response = tokens.update( + tokenId = "<TOKEN_ID>", + expire = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-argon2user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-argon2user.md new file mode 100644 index 0000000000..27008a0415 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-argon2user.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createArgon2User( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-bcrypt-user.md new file mode 100644 index 0000000000..c7231307cf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-bcrypt-user.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createBcryptUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-j-w-t.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-j-w-t.md new file mode 100644 index 0000000000..a556a901c5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-j-w-t.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createJWT( + userId = "<USER_ID>", + sessionId = "<SESSION_ID>", // optional + duration = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-m-d5user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-m-d5user.md new file mode 100644 index 0000000000..27b985920c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-m-d5user.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createMD5User( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..2d1dbf0a1d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createMfaRecoveryCodes( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..5441e49e6c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-p-h-pass-user.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createPHPassUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-s-h-a-user.md new file mode 100644 index 0000000000..17a157b2cd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-s-h-a-user.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createSHAUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordVersion = "sha1", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..814883cae5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-modified-user.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createScryptModifiedUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordSalt = "<PASSWORD_SALT>", + passwordSaltSeparator = "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey = "<PASSWORD_SIGNER_KEY>", + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-user.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-user.md new file mode 100644 index 0000000000..619525a799 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-scrypt-user.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createScryptUser( + userId = "<USER_ID>", + email = "email@example.com", + password = "password", + passwordSalt = "<PASSWORD_SALT>", + passwordCpu = 0, + passwordMemory = 0, + passwordParallel = 0, + passwordLength = 0, + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-session.md new file mode 100644 index 0000000000..a67e605121 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-session.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createSession( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-target.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-target.md new file mode 100644 index 0000000000..139c6ff049 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-target.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users +import io.appwrite.enums.MessagingProviderType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>", + providerType = MessagingProviderType.EMAIL, + identifier = "<IDENTIFIER>", + providerId = "<PROVIDER_ID>", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create-token.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-token.md new file mode 100644 index 0000000000..43492f4747 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create-token.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.createToken( + userId = "<USER_ID>", + length = 4, // optional + expire = 60 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/create.md new file mode 100644 index 0000000000..27ae85ae6e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/create.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.create( + userId = "<USER_ID>", + email = "email@example.com", // optional + phone = "+12065550100", // optional + password = "", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-identity.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-identity.md new file mode 100644 index 0000000000..37b4ed2e71 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-identity.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteIdentity( + identityId = "<IDENTITY_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..22085b2f72 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users +import io.appwrite.enums.AuthenticatorType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteMfaAuthenticator( + userId = "<USER_ID>", + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-session.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-session.md new file mode 100644 index 0000000000..e9e3c7c55e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-session.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteSession( + userId = "<USER_ID>", + sessionId = "<SESSION_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-sessions.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-sessions.md new file mode 100644 index 0000000000..6288e1bc04 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-sessions.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteSessions( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-target.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-target.md new file mode 100644 index 0000000000..f93be0677a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete-target.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.deleteTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete.md new file mode 100644 index 0000000000..b938ac70d1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/delete.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.delete( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..e0c45dc258 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/get-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.getMfaRecoveryCodes( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/get-prefs.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/get-prefs.md new file mode 100644 index 0000000000..927a4a43a1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/get-prefs.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.getPrefs( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/get-target.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/get-target.md new file mode 100644 index 0000000000..556349c684 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/get-target.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.getTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/get.md new file mode 100644 index 0000000000..70f0ee9d5f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/get.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.get( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list-identities.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-identities.md new file mode 100644 index 0000000000..1ac0e5b887 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-identities.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listIdentities( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list-logs.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-logs.md new file mode 100644 index 0000000000..a263293a7a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-logs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listLogs( + userId = "<USER_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list-memberships.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-memberships.md new file mode 100644 index 0000000000..7df13df4e2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-memberships.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listMemberships( + userId = "<USER_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list-mfa-factors.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-mfa-factors.md new file mode 100644 index 0000000000..4eb6721ce5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-mfa-factors.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listMfaFactors( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list-sessions.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-sessions.md new file mode 100644 index 0000000000..4ff34dd53e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-sessions.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listSessions( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list-targets.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-targets.md new file mode 100644 index 0000000000..0824acfd9e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list-targets.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.listTargets( + userId = "<USER_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/list.md new file mode 100644 index 0000000000..23dd217a6c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/list.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.list( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-email-verification.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-email-verification.md new file mode 100644 index 0000000000..ebf2232f3e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-email-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateEmailVerification( + userId = "<USER_ID>", + emailVerification = false +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-email.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-email.md new file mode 100644 index 0000000000..a617705dbb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-email.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateEmail( + userId = "<USER_ID>", + email = "email@example.com" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-labels.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-labels.md new file mode 100644 index 0000000000..86f536f728 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-labels.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateLabels( + userId = "<USER_ID>", + labels = listOf() +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..74602c0f7e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateMfaRecoveryCodes( + userId = "<USER_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa.md new file mode 100644 index 0000000000..0148d582b8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-mfa.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateMfa( + userId = "<USER_ID>", + mfa = false +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-name.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-name.md new file mode 100644 index 0000000000..fedfce36bd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-name.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateName( + userId = "<USER_ID>", + name = "<NAME>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-password.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-password.md new file mode 100644 index 0000000000..4a0ad576e1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-password.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updatePassword( + userId = "<USER_ID>", + password = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone-verification.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone-verification.md new file mode 100644 index 0000000000..6520ef4c95 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone-verification.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updatePhoneVerification( + userId = "<USER_ID>", + phoneVerification = false +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone.md new file mode 100644 index 0000000000..7261f95db5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-phone.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updatePhone( + userId = "<USER_ID>", + number = "+12065550100" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-prefs.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-prefs.md new file mode 100644 index 0000000000..451f4ff4c6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-prefs.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updatePrefs( + userId = "<USER_ID>", + prefs = mapOf( "a" to "b" ) +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-status.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-status.md new file mode 100644 index 0000000000..a69ae30dbc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-status.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateStatus( + userId = "<USER_ID>", + status = false +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/users/update-target.md b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-target.md new file mode 100644 index 0000000000..a18fc63bcb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/users/update-target.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Users + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val users = Users(client) + +val response = users.updateTarget( + userId = "<USER_ID>", + targetId = "<TARGET_ID>", + identifier = "<IDENTIFIER>", // optional + providerId = "<PROVIDER_ID>", // optional + name = "<NAME>" // optional +) diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..d8590b03cb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-anonymous-session.md @@ -0,0 +1,9 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createAnonymousSession(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..6c940f5435 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-email-password-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createEmailPasswordSession( + 'email@example.com', // email + 'password' // password +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-email-token.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-email-token.md new file mode 100644 index 0000000000..b6be71d45c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-email-token.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createEmailToken( + '<USER_ID>', // userId + 'email@example.com', // email + false // phrase (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..2273646635 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-j-w-t.md @@ -0,0 +1,9 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createJWT(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..6dbdc3d9fb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createMagicURLToken( + '<USER_ID>', // userId + 'email@example.com', // email + 'https://example.com', // url (optional) + false // phrase (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..e52658b533 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-authenticator.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createMfaAuthenticator( + sdk.AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..79d5e89eed --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-challenge.md @@ -0,0 +1,11 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createMfaChallenge( + sdk.AuthenticationFactor.Email // factor +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..42b3c8c6f5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..adae095105 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-o-auth2token.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createOAuth2Token( + sdk.OAuthProvider.Amazon, // provider + 'https://example.com', // success (optional) + 'https://example.com', // failure (optional) + [] // scopes (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-token.md new file mode 100644 index 0000000000..aca0bd2d8a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-token.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createPhoneToken( + '<USER_ID>', // userId + '+12065550100' // phone +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..f7c87f0675 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-phone-verification.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createPhoneVerification(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-recovery.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-recovery.md new file mode 100644 index 0000000000..660942affb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-recovery.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createRecovery( + 'email@example.com', // email + 'https://example.com' // url +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-session.md new file mode 100644 index 0000000000..8c6b910089 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.createSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create-verification.md b/docs/examples/1.8.x/server-nodejs/examples/account/create-verification.md new file mode 100644 index 0000000000..1f1db27e8a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create-verification.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.createVerification( + 'https://example.com' // url +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/create.md b/docs/examples/1.8.x/server-nodejs/examples/account/create.md new file mode 100644 index 0000000000..85e3d2fcca --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/create.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.create( + '<USER_ID>', // userId + 'email@example.com', // email + '', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/delete-identity.md b/docs/examples/1.8.x/server-nodejs/examples/account/delete-identity.md new file mode 100644 index 0000000000..0424ab247e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/delete-identity.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteIdentity( + '<IDENTITY_ID>' // identityId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..5979c3a6d7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteMfaAuthenticator( + sdk.AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/delete-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/delete-session.md new file mode 100644 index 0000000000..4276ccad24 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/delete-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-nodejs/examples/account/delete-sessions.md new file mode 100644 index 0000000000..884c0e0ebc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/delete-sessions.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.deleteSessions(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..27f902424e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.getMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/get-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/account/get-prefs.md new file mode 100644 index 0000000000..d0d7d31aaf --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/get-prefs.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.getPrefs(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/get-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/get-session.md new file mode 100644 index 0000000000..63b6f0893a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/get-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.getSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/get.md b/docs/examples/1.8.x/server-nodejs/examples/account/get.md new file mode 100644 index 0000000000..6ebb605ae8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/get.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.get(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/list-identities.md b/docs/examples/1.8.x/server-nodejs/examples/account/list-identities.md new file mode 100644 index 0000000000..c49894c8c0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/list-identities.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listIdentities( + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/list-logs.md b/docs/examples/1.8.x/server-nodejs/examples/account/list-logs.md new file mode 100644 index 0000000000..4260a72e30 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/list-logs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listLogs( + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-nodejs/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..a993e31aa8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/list-mfa-factors.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listMfaFactors(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/list-sessions.md b/docs/examples/1.8.x/server-nodejs/examples/account/list-sessions.md new file mode 100644 index 0000000000..33fb527415 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/list-sessions.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listSessions(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-email.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-email.md new file mode 100644 index 0000000000..6111f0e52a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-email.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateEmail( + 'email@example.com', // email + 'password' // password +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..58629cda3b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-m-f-a.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMFA( + false // mfa +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..3e059d88d9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.updateMagicURLSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..7b24dc8712 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-authenticator.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMfaAuthenticator( + sdk.AuthenticatorType.Totp, // type + '<OTP>' // otp +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..4d30999129 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-challenge.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMfaChallenge( + '<CHALLENGE_ID>', // challengeId + '<OTP>' // otp +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..9db82175c9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-name.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-name.md new file mode 100644 index 0000000000..f47d215288 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-name.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateName( + '<NAME>' // name +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-password.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-password.md new file mode 100644 index 0000000000..aa9d67aede --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-password.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updatePassword( + '', // password + 'password' // oldPassword (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-session.md new file mode 100644 index 0000000000..c208714a37 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const account = new sdk.Account(client); + +const result = await account.updatePhoneSession( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..116d171c92 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone-verification.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updatePhoneVerification( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-phone.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone.md new file mode 100644 index 0000000000..c6c02fde9a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-phone.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updatePhone( + '+12065550100', // phone + 'password' // password +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-prefs.md new file mode 100644 index 0000000000..ee8b042693 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-prefs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updatePrefs( + {} // prefs +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-recovery.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-recovery.md new file mode 100644 index 0000000000..bd4a87c3a9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-recovery.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateRecovery( + '<USER_ID>', // userId + '<SECRET>', // secret + '' // password +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-session.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-session.md new file mode 100644 index 0000000000..be80c85750 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateSession( + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-status.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-status.md new file mode 100644 index 0000000000..1b70af5378 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-status.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateStatus(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/account/update-verification.md b/docs/examples/1.8.x/server-nodejs/examples/account/update-verification.md new file mode 100644 index 0000000000..0abb562a95 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/account/update-verification.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.updateVerification( + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-browser.md new file mode 100644 index 0000000000..1cc825d917 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-browser.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getBrowser( + sdk.Browser.AvantBrowser, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..7d62a96033 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-credit-card.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getCreditCard( + sdk.CreditCard.AmericanExpress, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..6056354e9e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-favicon.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getFavicon( + 'https://example.com' // url +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-flag.md new file mode 100644 index 0000000000..a62f56dd47 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-flag.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getFlag( + sdk.Flag.Afghanistan, // code + 0, // width (optional) + 0, // height (optional) + -1 // quality (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-image.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-image.md new file mode 100644 index 0000000000..7dac2423ba --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-image.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getImage( + 'https://example.com', // url + 0, // width (optional) + 0 // height (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-initials.md new file mode 100644 index 0000000000..2cd45bfac8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-initials.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getInitials( + '<NAME>', // name (optional) + 0, // width (optional) + 0, // height (optional) + '' // background (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..cfd649ea33 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/avatars/get-q-r.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.getQR( + '<TEXT>', // text + 1, // size (optional) + 0, // margin (optional) + false // download (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..b6239698a5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-boolean-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createBooleanAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md new file mode 100644 index 0000000000..fc5c798385 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-collection.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..4c7328ce4b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-datetime-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createDatetimeAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md new file mode 100644 index 0000000000..44cfc3c199 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const databases = new sdk.Databases(client); + +const result = await databases.createDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md new file mode 100644 index 0000000000..7ecaa6bef4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // documents +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..47b27508cd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-email-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createEmailAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..61c1d77f2c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-enum-attribute.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createEnumAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..3e605001e6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-float-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createFloatAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-index.md new file mode 100644 index 0000000000..ed03322cbd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-index.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + sdk.IndexType.Key, // type + [], // attributes + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..ce62624001 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-integer-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createIntegerAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..e3bbffe227 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-ip-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createIpAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..bb77bc00c3 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-relationship-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createRelationshipAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<RELATED_COLLECTION_ID>', // relatedCollectionId + sdk.RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + sdk.RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..94793e86db --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-string-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createStringAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..6b6b1daaa0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-url-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.createUrlAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create.md new file mode 100644 index 0000000000..c1fd4eca43 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.create( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..6bfc5f17cd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/decrement-document-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.decrementDocumentAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + '', // attribute + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..8291fc095e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-attribute.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.deleteAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-collection.md new file mode 100644 index 0000000000..9551c558fb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-collection.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.deleteCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-document.md new file mode 100644 index 0000000000..526f00eb3a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-document.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.deleteDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>' // documentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-documents.md new file mode 100644 index 0000000000..01814e5052 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-documents.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.deleteDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-index.md new file mode 100644 index 0000000000..90353ea44e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.deleteIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/delete.md b/docs/examples/1.8.x/server-nodejs/examples/databases/delete.md new file mode 100644 index 0000000000..65179d2b2a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.delete( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get-attribute.md new file mode 100644 index 0000000000..8757265edb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get-attribute.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.getAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get-collection.md new file mode 100644 index 0000000000..79c5674985 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get-collection.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.getCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get-document.md new file mode 100644 index 0000000000..eee515bf36 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get-document.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.getDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get-index.md new file mode 100644 index 0000000000..a4b3a45eb8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.getIndex( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/get.md b/docs/examples/1.8.x/server-nodejs/examples/databases/get.md new file mode 100644 index 0000000000..a8e8084673 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.get( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..0ba024514a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/increment-document-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.incrementDocumentAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + '', // attribute + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list-attributes.md new file mode 100644 index 0000000000..e7b48fb9f0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list-attributes.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.listAttributes( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list-collections.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list-collections.md new file mode 100644 index 0000000000..bc31eadf9b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list-collections.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.listCollections( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list-documents.md new file mode 100644 index 0000000000..d2514850d8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list-documents.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.listDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list-indexes.md new file mode 100644 index 0000000000..86c6c26ec6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list-indexes.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.listIndexes( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/list.md b/docs/examples/1.8.x/server-nodejs/examples/databases/list.md new file mode 100644 index 0000000000..06fe6a8462 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..d0d551c3fd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-boolean-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateBooleanAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md new file mode 100644 index 0000000000..2618fc735e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-collection.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateCollection( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // documentSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..d2378f93ca --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-datetime-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateDatetimeAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md new file mode 100644 index 0000000000..96468037e7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-document.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.updateDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>', // documentId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-documents.md new file mode 100644 index 0000000000..62b2271bae --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-documents.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..8b7afbebb5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-email-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateEmailAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..f328132519 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-enum-attribute.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateEnumAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..abb93c28fa --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-float-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateFloatAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..e126f31fd8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-integer-attribute.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateIntegerAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..1c8ac79dd8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-ip-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateIpAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..1a7a26cc92 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-relationship-attribute.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateRelationshipAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + sdk.RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..0e0656ef10 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-string-attribute.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateStringAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..4a2aca0fe9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update-url-attribute.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.updateUrlAttribute( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/update.md b/docs/examples/1.8.x/server-nodejs/examples/databases/update.md new file mode 100644 index 0000000000..9c69bfd2ce --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/update.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.update( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md new file mode 100644 index 0000000000..7f2ffba3a3 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const databases = new sdk.Databases(client); + +const result = await databases.upsertDocument( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>', // collectionId + '<DOCUMENT_ID>' // documentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..52f7b55e11 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const databases = new sdk.Databases(client); + +const result = await databases.upsertDocuments( + '<DATABASE_ID>', // databaseId + '<COLLECTION_ID>' // collectionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-deployment.md new file mode 100644 index 0000000000..5ede954907 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createDeployment( + '<FUNCTION_ID>', // functionId + InputFile.fromPath('/path/to/file', 'filename'), // code + false, // activate + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>' // commands (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..33f77ffd39 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createDuplicateDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>', // deploymentId + '<BUILD_ID>' // buildId (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md new file mode 100644 index 0000000000..3c89030ca6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new sdk.Functions(client); + +const result = await functions.createExecution( + '<FUNCTION_ID>', // functionId + '<BODY>', // body (optional) + false, // async (optional) + '<PATH>', // path (optional) + sdk.ExecutionMethod.GET, // method (optional) + {}, // headers (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..eef7148f94 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-template-deployment.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createTemplateDeployment( + '<FUNCTION_ID>', // functionId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-variable.md new file mode 100644 index 0000000000..5e75d19bf4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-variable.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createVariable( + '<FUNCTION_ID>', // functionId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..ba1067f579 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-vcs-deployment.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.createVcsDeployment( + '<FUNCTION_ID>', // functionId + sdk.VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create.md new file mode 100644 index 0000000000..646e2e5b4d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create.md @@ -0,0 +1,29 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.create( + '<FUNCTION_ID>', // functionId + '<NAME>', // name + sdk..Node145, // runtime + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>', // commands (optional) + [], // scopes (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..f6768ec739 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.deleteDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-execution.md new file mode 100644 index 0000000000..c3e77a6860 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-execution.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.deleteExecution( + '<FUNCTION_ID>', // functionId + '<EXECUTION_ID>' // executionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-variable.md new file mode 100644 index 0000000000..7840b1d562 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete-variable.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.deleteVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/delete.md b/docs/examples/1.8.x/server-nodejs/examples/functions/delete.md new file mode 100644 index 0000000000..a2e0a23a2b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.delete( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..5ba1035392 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment-download.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.getDeploymentDownload( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>', // deploymentId + sdk.DeploymentDownloadType.Source // type (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment.md new file mode 100644 index 0000000000..6a55534af4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.getDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get-execution.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get-execution.md new file mode 100644 index 0000000000..b9fed55799 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get-execution.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new sdk.Functions(client); + +const result = await functions.getExecution( + '<FUNCTION_ID>', // functionId + '<EXECUTION_ID>' // executionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get-variable.md new file mode 100644 index 0000000000..3b6135f7dc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get-variable.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.getVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/get.md b/docs/examples/1.8.x/server-nodejs/examples/functions/get.md new file mode 100644 index 0000000000..b88609252e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.get( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-deployments.md new file mode 100644 index 0000000000..731d1c46cf --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-deployments.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listDeployments( + '<FUNCTION_ID>', // functionId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-executions.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-executions.md new file mode 100644 index 0000000000..24d3e54ef3 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-executions.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const functions = new sdk.Functions(client); + +const result = await functions.listExecutions( + '<FUNCTION_ID>', // functionId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..a0f83b2273 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-runtimes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listRuntimes(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-specifications.md new file mode 100644 index 0000000000..f918c44053 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-specifications.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listSpecifications(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list-variables.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list-variables.md new file mode 100644 index 0000000000..4220918fa6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list-variables.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.listVariables( + '<FUNCTION_ID>' // functionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/list.md b/docs/examples/1.8.x/server-nodejs/examples/functions/list.md new file mode 100644 index 0000000000..af5082c25e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..e7ce4a815c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update-deployment-status.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.updateDeploymentStatus( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..feef831e5c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update-function-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.updateFunctionDeployment( + '<FUNCTION_ID>', // functionId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/update-variable.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update-variable.md new file mode 100644 index 0000000000..d9a7ac7e0b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update-variable.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.updateVariable( + '<FUNCTION_ID>', // functionId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/update.md b/docs/examples/1.8.x/server-nodejs/examples/functions/update.md new file mode 100644 index 0000000000..b6de177cff --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/update.md @@ -0,0 +1,29 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const functions = new sdk.Functions(client); + +const result = await functions.update( + '<FUNCTION_ID>', // functionId + '<NAME>', // name + sdk..Node145, // runtime (optional) + ["any"], // execute (optional) + [], // events (optional) + '', // schedule (optional) + 1, // timeout (optional) + false, // enabled (optional) + false, // logging (optional) + '<ENTRYPOINT>', // entrypoint (optional) + '<COMMANDS>', // commands (optional) + [], // scopes (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md b/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md new file mode 100644 index 0000000000..8031a5285a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/graphql/mutation.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const graphql = new sdk.Graphql(client); + +const result = await graphql.mutation( + {} // query +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/graphql/query.md b/docs/examples/1.8.x/server-nodejs/examples/graphql/query.md new file mode 100644 index 0000000000..15456754cb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/graphql/query.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const graphql = new sdk.Graphql(client); + +const result = await graphql.query( + {} // query +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-antivirus.md new file mode 100644 index 0000000000..9efa2d803c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-antivirus.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getAntivirus(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-cache.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-cache.md new file mode 100644 index 0000000000..014340123d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-cache.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getCache(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-certificate.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-certificate.md new file mode 100644 index 0000000000..ec9129344c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-certificate.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getCertificate( + '' // domain (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-d-b.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-d-b.md new file mode 100644 index 0000000000..0d86d08d1c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-d-b.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getDB(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..d88b7f2bfd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-failed-jobs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getFailedJobs( + sdk..V1Database, // name + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..b5b97374d5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-pub-sub.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getPubSub(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..929f9769fb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-builds.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueBuilds( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..33e71ecac6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-certificates.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueCertificates( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..ca409c1ba5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-databases.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueDatabases( + '<NAME>', // name (optional) + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..9f2d6f8cf5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-deletes.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueDeletes( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..0392db1079 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-functions.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueFunctions( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..a71ff13397 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-logs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueLogs( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..8c45c1a194 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-mails.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueMails( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..46160a0e88 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-messaging.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueMessaging( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..5f8d262e30 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-migrations.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueMigrations( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..1b16e6d5b8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-stats-resources.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueStatsResources( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..2a20620cd2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-usage.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueUsage( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..acc2098365 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-queue-webhooks.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getQueueWebhooks( + null // threshold (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-storage-local.md new file mode 100644 index 0000000000..0ea8e0e27f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-storage-local.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getStorageLocal(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-storage.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-storage.md new file mode 100644 index 0000000000..d199800559 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-storage.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getStorage(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get-time.md b/docs/examples/1.8.x/server-nodejs/examples/health/get-time.md new file mode 100644 index 0000000000..cd4f42e33e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get-time.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.getTime(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/health/get.md b/docs/examples/1.8.x/server-nodejs/examples/health/get.md new file mode 100644 index 0000000000..e10c4e28f5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/health/get.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const health = new sdk.Health(client); + +const result = await health.get(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/get.md b/docs/examples/1.8.x/server-nodejs/examples/locale/get.md new file mode 100644 index 0000000000..d57eb8f241 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/get.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.get(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-codes.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-codes.md new file mode 100644 index 0000000000..280d14ae6e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-codes.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCodes(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-continents.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-continents.md new file mode 100644 index 0000000000..d04d6d6a47 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-continents.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listContinents(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..6e41074b61 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-e-u.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCountriesEU(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..9621e9cbfc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries-phones.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCountriesPhones(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries.md new file mode 100644 index 0000000000..a81b1581f3 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-countries.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCountries(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-currencies.md new file mode 100644 index 0000000000..a585fd33ae --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-currencies.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listCurrencies(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/locale/list-languages.md b/docs/examples/1.8.x/server-nodejs/examples/locale/list-languages.md new file mode 100644 index 0000000000..aea0fadf89 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/locale/list-languages.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const locale = new sdk.Locale(client); + +const result = await locale.listLanguages(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..a28309023a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-apns-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false, // sandbox (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-email.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-email.md new file mode 100644 index 0000000000..b4b1f6622a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-email.md @@ -0,0 +1,23 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createEmail( + '<MESSAGE_ID>', // messageId + '<SUBJECT>', // subject + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + [], // cc (optional) + [], // bcc (optional) + [], // attachments (optional) + false, // draft (optional) + false, // html (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..a8af6ba12c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-fcm-provider.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + {}, // serviceAccountJSON (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..ee49f64f7c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..e7075dc3b8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-msg91provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>', // authKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-push.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-push.md new file mode 100644 index 0000000000..bd89f761fb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-push.md @@ -0,0 +1,30 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createPush( + '<MESSAGE_ID>', // messageId + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + sdk.MessagePriority.Normal // priority (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..8cde02e80c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sms.md new file mode 100644 index 0000000000..226f47c8d4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-sms.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSms( + '<MESSAGE_ID>', // messageId + '<CONTENT>', // content + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..50a8d202c5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-smtp-provider.md @@ -0,0 +1,25 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '<HOST>', // host + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + sdk.SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + 'email@example.com', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..9874d072b8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-subscriber.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>', // subscriberId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..b877172163 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-telesign-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..b40d5ee4e7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-topic.md new file mode 100644 index 0000000000..35c93eadca --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-topic.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name + ["any"] // subscribe (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..4dcb9a841d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-twilio-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..493cd2b660 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/create-vonage-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.createVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name + '+12065550100', // from (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..23b474f787 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-provider.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.deleteProvider( + '<PROVIDER_ID>' // providerId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..1f5e21af93 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-subscriber.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const messaging = new sdk.Messaging(client); + +const result = await messaging.deleteSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..af39f73491 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete-topic.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.deleteTopic( + '<TOPIC_ID>' // topicId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md new file mode 100644 index 0000000000..fd49104a49 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.delete( + '<MESSAGE_ID>' // messageId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-message.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-message.md new file mode 100644 index 0000000000..f83ab51c23 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-message.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.getMessage( + '<MESSAGE_ID>' // messageId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-provider.md new file mode 100644 index 0000000000..2f52698bfc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-provider.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.getProvider( + '<PROVIDER_ID>' // providerId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..5132f1772a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-subscriber.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.getSubscriber( + '<TOPIC_ID>', // topicId + '<SUBSCRIBER_ID>' // subscriberId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-topic.md new file mode 100644 index 0000000000..98e38383d4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/get-topic.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.getTopic( + '<TOPIC_ID>' // topicId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..56e1288af7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-message-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listMessageLogs( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-messages.md new file mode 100644 index 0000000000..db0785ece8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-messages.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listMessages( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..6cb2a01df4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-provider-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listProviderLogs( + '<PROVIDER_ID>', // providerId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-providers.md new file mode 100644 index 0000000000..aefb41d15a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-providers.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listProviders( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..8d46a08578 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listSubscriberLogs( + '<SUBSCRIBER_ID>', // subscriberId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..167b48e978 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-subscribers.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listSubscribers( + '<TOPIC_ID>', // topicId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-targets.md new file mode 100644 index 0000000000..971285d87c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-targets.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listTargets( + '<MESSAGE_ID>', // messageId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..39e82954d1 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topic-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listTopicLogs( + '<TOPIC_ID>', // topicId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topics.md new file mode 100644 index 0000000000..6fd94bba42 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/list-topics.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.listTopics( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..e782b8c3f7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-apns-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateApnsProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<AUTH_KEY>', // authKey (optional) + '<AUTH_KEY_ID>', // authKeyId (optional) + '<TEAM_ID>', // teamId (optional) + '<BUNDLE_ID>', // bundleId (optional) + false // sandbox (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-email.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-email.md new file mode 100644 index 0000000000..2ea2941efd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-email.md @@ -0,0 +1,23 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateEmail( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<SUBJECT>', // subject (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + false, // html (optional) + [], // cc (optional) + [], // bcc (optional) + '', // scheduledAt (optional) + [] // attachments (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..9184f283d0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-fcm-provider.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateFcmProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + {} // serviceAccountJSON (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..a1ac18fd60 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateMailgunProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<API_KEY>', // apiKey (optional) + '<DOMAIN>', // domain (optional) + false, // isEuRegion (optional) + false, // enabled (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..c66b91f8c0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-msg91provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateMsg91Provider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<TEMPLATE_ID>', // templateId (optional) + '<SENDER_ID>', // senderId (optional) + '<AUTH_KEY>' // authKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-push.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-push.md new file mode 100644 index 0000000000..db52bee373 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-push.md @@ -0,0 +1,30 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updatePush( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<TITLE>', // title (optional) + '<BODY>', // body (optional) + {}, // data (optional) + '<ACTION>', // action (optional) + '[ID1:ID2]', // image (optional) + '<ICON>', // icon (optional) + '<SOUND>', // sound (optional) + '<COLOR>', // color (optional) + '<TAG>', // tag (optional) + null, // badge (optional) + false, // draft (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + sdk.MessagePriority.Normal // priority (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..8420a2fac2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateSendgridProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>' // replyToEmail (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sms.md new file mode 100644 index 0000000000..98ee6feb23 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-sms.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateSms( + '<MESSAGE_ID>', // messageId + [], // topics (optional) + [], // users (optional) + [], // targets (optional) + '<CONTENT>', // content (optional) + false, // draft (optional) + '' // scheduledAt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..0bbe4cd2cb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-smtp-provider.md @@ -0,0 +1,25 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateSmtpProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + '<HOST>', // host (optional) + 1, // port (optional) + '<USERNAME>', // username (optional) + '<PASSWORD>', // password (optional) + sdk.SmtpEncryption.None, // encryption (optional) + false, // autoTLS (optional) + '<MAILER>', // mailer (optional) + '<FROM_NAME>', // fromName (optional) + 'email@example.com', // fromEmail (optional) + '<REPLY_TO_NAME>', // replyToName (optional) + '<REPLY_TO_EMAIL>', // replyToEmail (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..2f23a3b11f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-telesign-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateTelesignProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<CUSTOMER_ID>', // customerId (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..6fb6c82e8f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateTextmagicProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<USERNAME>', // username (optional) + '<API_KEY>', // apiKey (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-topic.md new file mode 100644 index 0000000000..6330970077 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-topic.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateTopic( + '<TOPIC_ID>', // topicId + '<NAME>', // name (optional) + ["any"] // subscribe (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..e4667f56ae --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-twilio-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateTwilioProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<ACCOUNT_SID>', // accountSid (optional) + '<AUTH_TOKEN>', // authToken (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..b95398b4ea --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/messaging/update-vonage-provider.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const messaging = new sdk.Messaging(client); + +const result = await messaging.updateVonageProvider( + '<PROVIDER_ID>', // providerId + '<NAME>', // name (optional) + false, // enabled (optional) + '<API_KEY>', // apiKey (optional) + '<API_SECRET>', // apiSecret (optional) + '<FROM>' // from (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-deployment.md new file mode 100644 index 0000000000..010da729ed --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createDeployment( + '<SITE_ID>', // siteId + InputFile.fromPath('/path/to/file', 'filename'), // code + false, // activate + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>' // outputDirectory (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..3ce35ff559 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createDuplicateDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..aebc2b8f4d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-template-deployment.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createTemplateDeployment( + '<SITE_ID>', // siteId + '<REPOSITORY>', // repository + '<OWNER>', // owner + '<ROOT_DIRECTORY>', // rootDirectory + '<VERSION>', // version + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-variable.md new file mode 100644 index 0000000000..59a51eea76 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-variable.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createVariable( + '<SITE_ID>', // siteId + '<KEY>', // key + '<VALUE>', // value + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..4bd849777b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create-vcs-deployment.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.createVcsDeployment( + '<SITE_ID>', // siteId + sdk.VCSDeploymentType.Branch, // type + '<REFERENCE>', // reference + false // activate (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/create.md b/docs/examples/1.8.x/server-nodejs/examples/sites/create.md new file mode 100644 index 0000000000..ad680592c2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/create.md @@ -0,0 +1,29 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.create( + '<SITE_ID>', // siteId + '<NAME>', // name + sdk..Analog, // framework + sdk..Node145, // buildRuntime + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + sdk..Static, // adapter (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..c04a5c38d7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.deleteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/delete-log.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-log.md new file mode 100644 index 0000000000..88e58a5f62 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-log.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.deleteLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-variable.md new file mode 100644 index 0000000000..abc7e3ac47 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete-variable.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.deleteVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/delete.md b/docs/examples/1.8.x/server-nodejs/examples/sites/delete.md new file mode 100644 index 0000000000..87fd7d23be --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.delete( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..414d50d4f8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment-download.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.getDeploymentDownload( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>', // deploymentId + sdk.DeploymentDownloadType.Source // type (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment.md new file mode 100644 index 0000000000..3f06b1ab07 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.getDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get-log.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get-log.md new file mode 100644 index 0000000000..4318882c95 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get-log.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.getLog( + '<SITE_ID>', // siteId + '<LOG_ID>' // logId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get-variable.md new file mode 100644 index 0000000000..287336fd45 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get-variable.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.getVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>' // variableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/get.md b/docs/examples/1.8.x/server-nodejs/examples/sites/get.md new file mode 100644 index 0000000000..d382efa2c8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.get( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-deployments.md new file mode 100644 index 0000000000..dce44ed134 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-deployments.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listDeployments( + '<SITE_ID>', // siteId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..0376e4b552 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-frameworks.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listFrameworks(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-logs.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-logs.md new file mode 100644 index 0000000000..faaf3d3542 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listLogs( + '<SITE_ID>', // siteId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-specifications.md new file mode 100644 index 0000000000..24ec74c4aa --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-specifications.md @@ -0,0 +1,10 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listSpecifications(); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list-variables.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list-variables.md new file mode 100644 index 0000000000..948e977abc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list-variables.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.listVariables( + '<SITE_ID>' // siteId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/list.md b/docs/examples/1.8.x/server-nodejs/examples/sites/list.md new file mode 100644 index 0000000000..184f4f3fc4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..7756424523 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update-deployment-status.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.updateDeploymentStatus( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..bfbc0f3514 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update-site-deployment.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.updateSiteDeployment( + '<SITE_ID>', // siteId + '<DEPLOYMENT_ID>' // deploymentId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/update-variable.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update-variable.md new file mode 100644 index 0000000000..c790ca10eb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update-variable.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.updateVariable( + '<SITE_ID>', // siteId + '<VARIABLE_ID>', // variableId + '<KEY>', // key + '<VALUE>', // value (optional) + false // secret (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/sites/update.md b/docs/examples/1.8.x/server-nodejs/examples/sites/update.md new file mode 100644 index 0000000000..e801aed187 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/sites/update.md @@ -0,0 +1,29 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const sites = new sdk.Sites(client); + +const result = await sites.update( + '<SITE_ID>', // siteId + '<NAME>', // name + sdk..Analog, // framework + false, // enabled (optional) + false, // logging (optional) + 1, // timeout (optional) + '<INSTALL_COMMAND>', // installCommand (optional) + '<BUILD_COMMAND>', // buildCommand (optional) + '<OUTPUT_DIRECTORY>', // outputDirectory (optional) + sdk..Node145, // buildRuntime (optional) + sdk..Static, // adapter (optional) + '<FALLBACK_FILE>', // fallbackFile (optional) + '<INSTALLATION_ID>', // installationId (optional) + '<PROVIDER_REPOSITORY_ID>', // providerRepositoryId (optional) + '<PROVIDER_BRANCH>', // providerBranch (optional) + false, // providerSilentMode (optional) + '<PROVIDER_ROOT_DIRECTORY>', // providerRootDirectory (optional) + '' // specification (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md new file mode 100644 index 0000000000..fc318f169d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/create-bucket.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.createBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + sdk..None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md new file mode 100644 index 0000000000..b84d9ac653 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/create-file.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); +const fs = require('fs'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.createFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + InputFile.fromPath('/path/to/file', 'filename'), // file + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..c2067efda2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/delete-bucket.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.deleteBucket( + '<BUCKET_ID>' // bucketId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/delete-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/delete-file.md new file mode 100644 index 0000000000..4d2e7128cd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/delete-file.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.deleteFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-bucket.md new file mode 100644 index 0000000000..c8a0b1c55d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-bucket.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.getBucket( + '<BUCKET_ID>' // bucketId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-download.md new file mode 100644 index 0000000000..6935bede48 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-download.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFileDownload( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..fe24419c52 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-preview.md @@ -0,0 +1,25 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFilePreview( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + 0, // width (optional) + 0, // height (optional) + sdk.ImageGravity.Center, // gravity (optional) + -1, // quality (optional) + 0, // borderWidth (optional) + '', // borderColor (optional) + 0, // borderRadius (optional) + 0, // opacity (optional) + -360, // rotation (optional) + '', // background (optional) + sdk.ImageFormat.Jpg, // output (optional) + '<TOKEN>' // token (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-view.md new file mode 100644 index 0000000000..9493cfb0a3 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file-view.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFileView( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<TOKEN>' // token (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/get-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file.md new file mode 100644 index 0000000000..1a6b500013 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/get-file.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.getFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>' // fileId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-nodejs/examples/storage/list-buckets.md new file mode 100644 index 0000000000..3c4d4b14f7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/list-buckets.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.listBuckets( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/list-files.md b/docs/examples/1.8.x/server-nodejs/examples/storage/list-files.md new file mode 100644 index 0000000000..fb595efc05 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/list-files.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.listFiles( + '<BUCKET_ID>', // bucketId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md new file mode 100644 index 0000000000..24e4872d8d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/update-bucket.md @@ -0,0 +1,21 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const storage = new sdk.Storage(client); + +const result = await storage.updateBucket( + '<BUCKET_ID>', // bucketId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // fileSecurity (optional) + false, // enabled (optional) + 1, // maximumFileSize (optional) + [], // allowedFileExtensions (optional) + sdk..None, // compression (optional) + false, // encryption (optional) + false // antivirus (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md b/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md new file mode 100644 index 0000000000..7eed687cf5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/storage/update-file.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const storage = new sdk.Storage(client); + +const result = await storage.updateFile( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '<NAME>', // name (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..64893d77a8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..0d63244727 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md new file mode 100644 index 0000000000..2257fdd7d6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..dbc75feea5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md new file mode 100644 index 0000000000..690b5849eb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md new file mode 100644 index 0000000000..886a8c3935 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + sdk..Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..05e66b548c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..69b5c635d2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..213b6d6923 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + sdk..OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + sdk..Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md new file mode 100644 index 0000000000..84da608d41 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new sdk.Tables(client); + +const result = await tables.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md new file mode 100644 index 0000000000..6a6918b8df --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md new file mode 100644 index 0000000000..8e14cb45c9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md new file mode 100644 index 0000000000..73cdfa3710 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create.md new file mode 100644 index 0000000000..54d6bc61bd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.create( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..2e7df6aa92 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md new file mode 100644 index 0000000000..a892c61baa --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md new file mode 100644 index 0000000000..f6bc7919db --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md new file mode 100644 index 0000000000..5bc60cd6cb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new sdk.Tables(client); + +const result = await tables.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md new file mode 100644 index 0000000000..11b16b71ae --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md new file mode 100644 index 0000000000..fed3eee5a4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.delete( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md new file mode 100644 index 0000000000..daa20e17e2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md new file mode 100644 index 0000000000..56ba871d67 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md new file mode 100644 index 0000000000..df952d9595 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new sdk.Tables(client); + +const result = await tables.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get.md new file mode 100644 index 0000000000..b078574b5c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/get.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.get( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..bb5856c74a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md new file mode 100644 index 0000000000..f9af43bea5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md new file mode 100644 index 0000000000..7eaf4b8710 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md new file mode 100644 index 0000000000..aa5b341649 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new sdk.Tables(client); + +const result = await tables.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list.md new file mode 100644 index 0000000000..872a98df08 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/list.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.list( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..84ff5d2bef --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..c02559a171 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md new file mode 100644 index 0000000000..9560b60e29 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..861fce6add --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md new file mode 100644 index 0000000000..01845ca3cc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..0b7432247f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..6ba5eccf3e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..c30163f2c8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + sdk..Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md new file mode 100644 index 0000000000..ff8e98eb38 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new sdk.Tables(client); + +const result = await tables.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md new file mode 100644 index 0000000000..72cef07202 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md new file mode 100644 index 0000000000..f9445a50c1 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md new file mode 100644 index 0000000000..c6ffdf3044 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update.md new file mode 100644 index 0000000000..4fd981ffbf --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.update( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md new file mode 100644 index 0000000000..2b08d56785 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new sdk.Tables(client); + +const result = await tables.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..75d681dbf0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/create-membership.md b/docs/examples/1.8.x/server-nodejs/examples/teams/create-membership.md new file mode 100644 index 0000000000..7994423be0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/create-membership.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.createMembership( + '<TEAM_ID>', // teamId + [], // roles + 'email@example.com', // email (optional) + '<USER_ID>', // userId (optional) + '+12065550100', // phone (optional) + 'https://example.com', // url (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/create.md b/docs/examples/1.8.x/server-nodejs/examples/teams/create.md new file mode 100644 index 0000000000..94de494bf0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/create.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.create( + '<TEAM_ID>', // teamId + '<NAME>', // name + [] // roles (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-nodejs/examples/teams/delete-membership.md new file mode 100644 index 0000000000..5264af7f13 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/delete-membership.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.deleteMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/delete.md b/docs/examples/1.8.x/server-nodejs/examples/teams/delete.md new file mode 100644 index 0000000000..151bfb3f70 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.delete( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/get-membership.md b/docs/examples/1.8.x/server-nodejs/examples/teams/get-membership.md new file mode 100644 index 0000000000..a8e9fc7311 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/get-membership.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.getMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>' // membershipId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/teams/get-prefs.md new file mode 100644 index 0000000000..18afdaa67b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/get-prefs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.getPrefs( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/get.md b/docs/examples/1.8.x/server-nodejs/examples/teams/get.md new file mode 100644 index 0000000000..8afc800aa9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.get( + '<TEAM_ID>' // teamId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-nodejs/examples/teams/list-memberships.md new file mode 100644 index 0000000000..4fead97b8f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/list-memberships.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.listMemberships( + '<TEAM_ID>', // teamId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/list.md b/docs/examples/1.8.x/server-nodejs/examples/teams/list.md new file mode 100644 index 0000000000..17fe585224 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..74fd9580fe --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership-status.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateMembershipStatus( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + '<USER_ID>', // userId + '<SECRET>' // secret +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership.md b/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership.md new file mode 100644 index 0000000000..649630ded9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/update-membership.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateMembership( + '<TEAM_ID>', // teamId + '<MEMBERSHIP_ID>', // membershipId + [] // roles +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/update-name.md b/docs/examples/1.8.x/server-nodejs/examples/teams/update-name.md new file mode 100644 index 0000000000..571f7ce399 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/update-name.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateName( + '<TEAM_ID>', // teamId + '<NAME>' // name +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/teams/update-prefs.md new file mode 100644 index 0000000000..b054694df5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/teams/update-prefs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updatePrefs( + '<TEAM_ID>', // teamId + {} // prefs +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..d1409c4a99 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/create-file-token.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new sdk.Tokens(client); + +const result = await tokens.createFileToken( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + '' // expire (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md new file mode 100644 index 0000000000..1249839f65 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new sdk.Tokens(client); + +const result = await tokens.delete( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/get.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/get.md new file mode 100644 index 0000000000..efb2b8c1b4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new sdk.Tokens(client); + +const result = await tokens.get( + '<TOKEN_ID>' // tokenId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/list.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/list.md new file mode 100644 index 0000000000..8b708f270f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/list.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new sdk.Tokens(client); + +const result = await tokens.list( + '<BUCKET_ID>', // bucketId + '<FILE_ID>', // fileId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tokens/update.md b/docs/examples/1.8.x/server-nodejs/examples/tokens/update.md new file mode 100644 index 0000000000..ebf5aa9bf8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tokens/update.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tokens = new sdk.Tokens(client); + +const result = await tokens.update( + '<TOKEN_ID>', // tokenId + '' // expire (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md new file mode 100644 index 0000000000..dce3646a48 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-argon2user.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createArgon2User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..d010676d29 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-bcrypt-user.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createBcryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..a2c9b59056 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-j-w-t.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createJWT( + '<USER_ID>', // userId + '<SESSION_ID>', // sessionId (optional) + 0 // duration (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..954374c37d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-m-d5user.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createMD5User( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..8b2ed93b23 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..eca31fe659 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-p-h-pass-user.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createPHPassUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..e7d8588fca --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-s-h-a-user.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createSHAUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + sdk.PasswordHash.Sha1, // passwordVersion (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..831107b569 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createScryptModifiedUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + '<PASSWORD_SALT_SEPARATOR>', // passwordSaltSeparator + '<PASSWORD_SIGNER_KEY>', // passwordSignerKey + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..2c2da7e055 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-scrypt-user.md @@ -0,0 +1,20 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createScryptUser( + '<USER_ID>', // userId + 'email@example.com', // email + 'password', // password + '<PASSWORD_SALT>', // passwordSalt + null, // passwordCpu + null, // passwordMemory + null, // passwordParallel + null, // passwordLength + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-session.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-session.md new file mode 100644 index 0000000000..9d8cc03ba0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-session.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createSession( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-target.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-target.md new file mode 100644 index 0000000000..7b9e6b0347 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-target.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + sdk.MessagingProviderType.Email, // providerType + '<IDENTIFIER>', // identifier + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create-token.md b/docs/examples/1.8.x/server-nodejs/examples/users/create-token.md new file mode 100644 index 0000000000..de7d866e8c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create-token.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.createToken( + '<USER_ID>', // userId + 4, // length (optional) + 60 // expire (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/create.md b/docs/examples/1.8.x/server-nodejs/examples/users/create.md new file mode 100644 index 0000000000..025c15ada1 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/create.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.create( + '<USER_ID>', // userId + 'email@example.com', // email (optional) + '+12065550100', // phone (optional) + '', // password (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-identity.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-identity.md new file mode 100644 index 0000000000..4c92f27d25 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-identity.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteIdentity( + '<IDENTITY_ID>' // identityId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..456242e22d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteMfaAuthenticator( + '<USER_ID>', // userId + sdk.AuthenticatorType.Totp // type +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-session.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-session.md new file mode 100644 index 0000000000..3f08370f3b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-session.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteSession( + '<USER_ID>', // userId + '<SESSION_ID>' // sessionId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-sessions.md new file mode 100644 index 0000000000..48714a0db1 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-sessions.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteSessions( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete-target.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete-target.md new file mode 100644 index 0000000000..ba7e6afd9c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete-target.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.deleteTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/delete.md b/docs/examples/1.8.x/server-nodejs/examples/users/delete.md new file mode 100644 index 0000000000..8fdd9e90b8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/delete.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.delete( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..233c3375ec --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.getMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/get-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/users/get-prefs.md new file mode 100644 index 0000000000..61933872e4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get-prefs.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.getPrefs( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/get-target.md b/docs/examples/1.8.x/server-nodejs/examples/users/get-target.md new file mode 100644 index 0000000000..00dc1f118b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get-target.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.getTarget( + '<USER_ID>', // userId + '<TARGET_ID>' // targetId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/get.md b/docs/examples/1.8.x/server-nodejs/examples/users/get.md new file mode 100644 index 0000000000..640aa6315c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/get.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.get( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-identities.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-identities.md new file mode 100644 index 0000000000..819b1688ef --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-identities.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listIdentities( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-logs.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-logs.md new file mode 100644 index 0000000000..c1155d55e2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-logs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listLogs( + '<USER_ID>', // userId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-memberships.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-memberships.md new file mode 100644 index 0000000000..bbe4ed3711 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-memberships.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listMemberships( + '<USER_ID>', // userId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..8bffa28834 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-mfa-factors.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listMfaFactors( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-sessions.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-sessions.md new file mode 100644 index 0000000000..51ba0814c4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-sessions.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listSessions( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list-targets.md b/docs/examples/1.8.x/server-nodejs/examples/users/list-targets.md new file mode 100644 index 0000000000..d991dcca73 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list-targets.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.listTargets( + '<USER_ID>', // userId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/list.md b/docs/examples/1.8.x/server-nodejs/examples/users/list.md new file mode 100644 index 0000000000..2bf765bea2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/list.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.list( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-email-verification.md new file mode 100644 index 0000000000..9dac2d0e54 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-email-verification.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateEmailVerification( + '<USER_ID>', // userId + false // emailVerification +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-email.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-email.md new file mode 100644 index 0000000000..0a8b1aa7af --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-email.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateEmail( + '<USER_ID>', // userId + 'email@example.com' // email +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-labels.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-labels.md new file mode 100644 index 0000000000..db9e8778ad --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-labels.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateLabels( + '<USER_ID>', // userId + [] // labels +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..9d47085370 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateMfaRecoveryCodes( + '<USER_ID>' // userId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa.md new file mode 100644 index 0000000000..b4acc79938 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-mfa.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateMfa( + '<USER_ID>', // userId + false // mfa +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-name.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-name.md new file mode 100644 index 0000000000..581e57b755 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-name.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateName( + '<USER_ID>', // userId + '<NAME>' // name +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-password.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-password.md new file mode 100644 index 0000000000..f4af49d67e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-password.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updatePassword( + '<USER_ID>', // userId + '' // password +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..ecbe7591df --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-phone-verification.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updatePhoneVerification( + '<USER_ID>', // userId + false // phoneVerification +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-phone.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-phone.md new file mode 100644 index 0000000000..45e5a6582a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-phone.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updatePhone( + '<USER_ID>', // userId + '+12065550100' // number +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-prefs.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-prefs.md new file mode 100644 index 0000000000..bb7eff8d6b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-prefs.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updatePrefs( + '<USER_ID>', // userId + {} // prefs +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-status.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-status.md new file mode 100644 index 0000000000..57f64ce942 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-status.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateStatus( + '<USER_ID>', // userId + false // status +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/users/update-target.md b/docs/examples/1.8.x/server-nodejs/examples/users/update-target.md new file mode 100644 index 0000000000..c6e4d9a1b0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/users/update-target.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const users = new sdk.Users(client); + +const result = await users.updateTarget( + '<USER_ID>', // userId + '<TARGET_ID>', // targetId + '<IDENTIFIER>', // identifier (optional) + '<PROVIDER_ID>', // providerId (optional) + '<NAME>' // name (optional) +); diff --git a/docs/examples/1.8.x/server-php/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-php/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..b3e811e18d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-anonymous-session.md @@ -0,0 +1,12 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createAnonymousSession(); diff --git a/docs/examples/1.8.x/server-php/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-php/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..827b1292c5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-email-password-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createEmailPasswordSession( + email: 'email@example.com', + password: 'password' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-email-token.md b/docs/examples/1.8.x/server-php/examples/account/create-email-token.md new file mode 100644 index 0000000000..b2c553291b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-email-token.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createEmailToken( + userId: '<USER_ID>', + email: 'email@example.com', + phrase: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-php/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..3dc486502d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-j-w-t.md @@ -0,0 +1,12 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createJWT(); diff --git a/docs/examples/1.8.x/server-php/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-php/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..639b199756 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createMagicURLToken( + userId: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', // optional + phrase: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-php/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..da3b4634e0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-mfa-authenticator.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticatorType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createMfaAuthenticator( + type: AuthenticatorType::TOTP() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-php/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..faa679fdf1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-mfa-challenge.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticationFactor; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createMfaChallenge( + factor: AuthenticationFactor::EMAIL() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..223c95be97 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-php/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-php/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..1f91db79fd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-o-auth2token.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\OAuthProvider; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createOAuth2Token( + provider: OAuthProvider::AMAZON(), + success: 'https://example.com', // optional + failure: 'https://example.com', // optional + scopes: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-php/examples/account/create-phone-token.md new file mode 100644 index 0000000000..93c185479e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-phone-token.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createPhoneToken( + userId: '<USER_ID>', + phone: '+12065550100' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-php/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..a152667313 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-phone-verification.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createPhoneVerification(); diff --git a/docs/examples/1.8.x/server-php/examples/account/create-recovery.md b/docs/examples/1.8.x/server-php/examples/account/create-recovery.md new file mode 100644 index 0000000000..c15e41d545 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-recovery.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createRecovery( + email: 'email@example.com', + url: 'https://example.com' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-session.md b/docs/examples/1.8.x/server-php/examples/account/create-session.md new file mode 100644 index 0000000000..2ff630a2c2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->createSession( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create-verification.md b/docs/examples/1.8.x/server-php/examples/account/create-verification.md new file mode 100644 index 0000000000..4628175fab --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create-verification.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->createVerification( + url: 'https://example.com' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/create.md b/docs/examples/1.8.x/server-php/examples/account/create.md new file mode 100644 index 0000000000..f92155b6ab --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/create.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->create( + userId: '<USER_ID>', + email: 'email@example.com', + password: '', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/delete-identity.md b/docs/examples/1.8.x/server-php/examples/account/delete-identity.md new file mode 100644 index 0000000000..fd66d3ae24 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/delete-identity.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->deleteIdentity( + identityId: '<IDENTITY_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-php/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..42806f8358 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticatorType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->deleteMfaAuthenticator( + type: AuthenticatorType::TOTP() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/delete-session.md b/docs/examples/1.8.x/server-php/examples/account/delete-session.md new file mode 100644 index 0000000000..9233ae14e8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/delete-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->deleteSession( + sessionId: '<SESSION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-php/examples/account/delete-sessions.md new file mode 100644 index 0000000000..557fd6d3aa --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/delete-sessions.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->deleteSessions(); diff --git a/docs/examples/1.8.x/server-php/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..bafd6d8520 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->getMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-php/examples/account/get-prefs.md b/docs/examples/1.8.x/server-php/examples/account/get-prefs.md new file mode 100644 index 0000000000..c7077affe0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/get-prefs.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->getPrefs(); diff --git a/docs/examples/1.8.x/server-php/examples/account/get-session.md b/docs/examples/1.8.x/server-php/examples/account/get-session.md new file mode 100644 index 0000000000..be2671348e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/get-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->getSession( + sessionId: '<SESSION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/get.md b/docs/examples/1.8.x/server-php/examples/account/get.md new file mode 100644 index 0000000000..30cb7b2af5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/get.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->get(); diff --git a/docs/examples/1.8.x/server-php/examples/account/list-identities.md b/docs/examples/1.8.x/server-php/examples/account/list-identities.md new file mode 100644 index 0000000000..a7d0a85c66 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/list-identities.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listIdentities( + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/list-logs.md b/docs/examples/1.8.x/server-php/examples/account/list-logs.md new file mode 100644 index 0000000000..cc7a173d2e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/list-logs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listLogs( + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-php/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..6756573cdb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/list-mfa-factors.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listMfaFactors(); diff --git a/docs/examples/1.8.x/server-php/examples/account/list-sessions.md b/docs/examples/1.8.x/server-php/examples/account/list-sessions.md new file mode 100644 index 0000000000..7f9749f7be --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/list-sessions.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->listSessions(); diff --git a/docs/examples/1.8.x/server-php/examples/account/update-email.md b/docs/examples/1.8.x/server-php/examples/account/update-email.md new file mode 100644 index 0000000000..c7c0d485ea --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-email.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateEmail( + email: 'email@example.com', + password: 'password' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-php/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..a1978e63ac --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-m-f-a.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateMFA( + mfa: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-php/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..fc42cbe6d1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->updateMagicURLSession( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-php/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..6a09d95a10 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-mfa-authenticator.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; +use Appwrite\Enums\AuthenticatorType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateMfaAuthenticator( + type: AuthenticatorType::TOTP(), + otp: '<OTP>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-php/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..03ace31144 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-mfa-challenge.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateMfaChallenge( + challengeId: '<CHALLENGE_ID>', + otp: '<OTP>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..c7ec6cb2b2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateMfaRecoveryCodes(); diff --git a/docs/examples/1.8.x/server-php/examples/account/update-name.md b/docs/examples/1.8.x/server-php/examples/account/update-name.md new file mode 100644 index 0000000000..2603b6e68b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-name.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateName( + name: '<NAME>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-password.md b/docs/examples/1.8.x/server-php/examples/account/update-password.md new file mode 100644 index 0000000000..c5101381e4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-password.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updatePassword( + password: '', + oldPassword: 'password' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-php/examples/account/update-phone-session.md new file mode 100644 index 0000000000..12d71c2fcd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-phone-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>'); // Your project ID + +$account = new Account($client); + +$result = $account->updatePhoneSession( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-php/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..df59922996 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-phone-verification.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updatePhoneVerification( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-phone.md b/docs/examples/1.8.x/server-php/examples/account/update-phone.md new file mode 100644 index 0000000000..853cb62fce --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-phone.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updatePhone( + phone: '+12065550100', + password: 'password' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-prefs.md b/docs/examples/1.8.x/server-php/examples/account/update-prefs.md new file mode 100644 index 0000000000..698da0fd8a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-prefs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updatePrefs( + prefs: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-recovery.md b/docs/examples/1.8.x/server-php/examples/account/update-recovery.md new file mode 100644 index 0000000000..63518b0029 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-recovery.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateRecovery( + userId: '<USER_ID>', + secret: '<SECRET>', + password: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-session.md b/docs/examples/1.8.x/server-php/examples/account/update-session.md new file mode 100644 index 0000000000..11cb4c7d98 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateSession( + sessionId: '<SESSION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/account/update-status.md b/docs/examples/1.8.x/server-php/examples/account/update-status.md new file mode 100644 index 0000000000..7c8075e5c7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-status.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateStatus(); diff --git a/docs/examples/1.8.x/server-php/examples/account/update-verification.md b/docs/examples/1.8.x/server-php/examples/account/update-verification.md new file mode 100644 index 0000000000..60ec0b3196 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/account/update-verification.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Account; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$account = new Account($client); + +$result = $account->updateVerification( + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-php/examples/avatars/get-browser.md new file mode 100644 index 0000000000..2449c26032 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-browser.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\Browser; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getBrowser( + code: Browser::AVANTBROWSER(), + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-php/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..123b345a43 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-credit-card.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\CreditCard; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getCreditCard( + code: CreditCard::AMERICANEXPRESS(), + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-php/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..1e671864c8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-favicon.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getFavicon( + url: 'https://example.com' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-php/examples/avatars/get-flag.md new file mode 100644 index 0000000000..5b7d8babc7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-flag.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; +use Appwrite\Enums\Flag; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getFlag( + code: Flag::AFGHANISTAN(), + width: 0, // optional + height: 0, // optional + quality: -1 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-image.md b/docs/examples/1.8.x/server-php/examples/avatars/get-image.md new file mode 100644 index 0000000000..e1555453ec --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-image.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getImage( + url: 'https://example.com', + width: 0, // optional + height: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-php/examples/avatars/get-initials.md new file mode 100644 index 0000000000..d84e23a157 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-initials.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getInitials( + name: '<NAME>', // optional + width: 0, // optional + height: 0, // optional + background: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-php/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..0d5936af6b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/avatars/get-q-r.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->getQR( + text: '<TEXT>', + size: 1, // optional + margin: 0, // optional + download: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..805d022194 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-boolean-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-collection.md b/docs/examples/1.8.x/server-php/examples/databases/create-collection.md new file mode 100644 index 0000000000..700d97177b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-collection.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..dd2fcecc80 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-datetime-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-document.md b/docs/examples/1.8.x/server-php/examples/databases/create-document.md new file mode 100644 index 0000000000..8726b37719 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-document.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setKey('<YOUR_API_KEY>') // Your secret API key + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$databases = new Databases($client); + +$result = $databases->createDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-documents.md b/docs/examples/1.8.x/server-php/examples/databases/create-documents.md new file mode 100644 index 0000000000..9429b57aba --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-documents.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setAdmin('') // + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documents: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..1274a4b9e1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-email-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..9abf2dfa1b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-enum-attribute.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..e6eecb5298 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-float-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-index.md b/docs/examples/1.8.x/server-php/examples/databases/create-index.md new file mode 100644 index 0000000000..9e8a221e13 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-index.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Enums\IndexType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + type: IndexType::KEY(), + attributes: [], + orders: [], // optional + lengths: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..1dbeefa547 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-integer-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..f42717caa4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-ip-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..caccd36031 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-relationship-attribute.md @@ -0,0 +1,23 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; +use Appwrite\Enums\RelationshipType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + relatedCollectionId: '<RELATED_COLLECTION_ID>', + type: RelationshipType::ONETOONE(), + twoWay: false, // optional + key: '', // optional + twoWayKey: '', // optional + onDelete: RelationMutate::CASCADE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..5a4f72b6c8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-string-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..6b9bc800e5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create-url-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->createUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/create.md b/docs/examples/1.8.x/server-php/examples/databases/create.md new file mode 100644 index 0000000000..73c618874a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/create.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->create( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..40e14af844 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/decrement-document-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->decrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: null, // optional + min: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..71b7162655 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/delete-attribute.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->deleteAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-php/examples/databases/delete-collection.md new file mode 100644 index 0000000000..4e98dfdb4e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/delete-collection.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->deleteCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/delete-document.md b/docs/examples/1.8.x/server-php/examples/databases/delete-document.md new file mode 100644 index 0000000000..def7f24569 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/delete-document.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->deleteDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-php/examples/databases/delete-documents.md new file mode 100644 index 0000000000..3552d85317 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/delete-documents.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->deleteDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/delete-index.md b/docs/examples/1.8.x/server-php/examples/databases/delete-index.md new file mode 100644 index 0000000000..79e476b6d0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/delete-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->deleteIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/delete.md b/docs/examples/1.8.x/server-php/examples/databases/delete.md new file mode 100644 index 0000000000..c796b7c406 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->delete( + databaseId: '<DATABASE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/get-attribute.md new file mode 100644 index 0000000000..ba82db4065 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/get-attribute.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->getAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/get-collection.md b/docs/examples/1.8.x/server-php/examples/databases/get-collection.md new file mode 100644 index 0000000000..ecddab053d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/get-collection.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->getCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/get-document.md b/docs/examples/1.8.x/server-php/examples/databases/get-document.md new file mode 100644 index 0000000000..a3204c50a7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/get-document.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->getDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/get-index.md b/docs/examples/1.8.x/server-php/examples/databases/get-index.md new file mode 100644 index 0000000000..e9c6307671 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/get-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->getIndex( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/get.md b/docs/examples/1.8.x/server-php/examples/databases/get.md new file mode 100644 index 0000000000..9aa6395587 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->get( + databaseId: '<DATABASE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..fb61d87295 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/increment-document-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->incrementDocumentAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + attribute: '', + value: null, // optional + max: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-php/examples/databases/list-attributes.md new file mode 100644 index 0000000000..3105fc419c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/list-attributes.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->listAttributes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/list-collections.md b/docs/examples/1.8.x/server-php/examples/databases/list-collections.md new file mode 100644 index 0000000000..533b26a055 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/list-collections.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->listCollections( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/list-documents.md b/docs/examples/1.8.x/server-php/examples/databases/list-documents.md new file mode 100644 index 0000000000..07183ac8bf --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/list-documents.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->listDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-php/examples/databases/list-indexes.md new file mode 100644 index 0000000000..65b45dae80 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/list-indexes.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->listIndexes( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/list.md b/docs/examples/1.8.x/server-php/examples/databases/list.md new file mode 100644 index 0000000000..6bba74da59 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..2e4bee72fe --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-boolean-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateBooleanAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: false, + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-collection.md b/docs/examples/1.8.x/server-php/examples/databases/update-collection.md new file mode 100644 index 0000000000..dd030c0792 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-collection.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateCollection( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..b1a03ec028 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-datetime-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateDatetimeAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-document.md b/docs/examples/1.8.x/server-php/examples/databases/update-document.md new file mode 100644 index 0000000000..f1c8a34680 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-document.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$databases = new Databases($client); + +$result = $databases->updateDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>', + data: [], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-documents.md b/docs/examples/1.8.x/server-php/examples/databases/update-documents.md new file mode 100644 index 0000000000..51b4e18bc2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-documents.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + data: [], // optional + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..dc9865f81a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-email-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateEmailAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..f7cd0b7b83 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-enum-attribute.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateEnumAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..51f6ec9239 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-float-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateFloatAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..bdbd96ca12 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-integer-attribute.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateIntegerAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..130cd0cc9f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-ip-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateIpAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..01783cf3bf --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-relationship-attribute.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateRelationshipAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + onDelete: RelationMutate::CASCADE(), // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..e0c8f992ea --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-string-attribute.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateStringAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-php/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..c200463894 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update-url-attribute.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->updateUrlAttribute( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/update.md b/docs/examples/1.8.x/server-php/examples/databases/update.md new file mode 100644 index 0000000000..9b0b0789ca --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/update.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->update( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md new file mode 100644 index 0000000000..2f8464c995 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setKey('<YOUR_API_KEY>') // Your secret API key + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$databases = new Databases($client); + +$result = $databases->upsertDocument( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>', + documentId: '<DOCUMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..11898dc33a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Databases; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setAdmin('') // + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$databases = new Databases($client); + +$result = $databases->upsertDocuments( + databaseId: '<DATABASE_ID>', + collectionId: '<COLLECTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/create-deployment.md new file mode 100644 index 0000000000..7e48b89ca7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create-deployment.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createDeployment( + functionId: '<FUNCTION_ID>', + code: InputFile::withPath('file.png'), + activate: false, + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..a898762cb8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createDuplicateDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + buildId: '<BUILD_ID>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-execution.md b/docs/examples/1.8.x/server-php/examples/functions/create-execution.md new file mode 100644 index 0000000000..9aeb976cf3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create-execution.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$functions = new Functions($client); + +$result = $functions->createExecution( + functionId: '<FUNCTION_ID>', + body: '<BODY>', // optional + async: false, // optional + path: '<PATH>', // optional + method: ExecutionMethod::GET(), // optional + headers: [], // optional + scheduledAt: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..9d22bdc1b4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create-template-deployment.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createTemplateDeployment( + functionId: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-variable.md b/docs/examples/1.8.x/server-php/examples/functions/create-variable.md new file mode 100644 index 0000000000..ec470d5457 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create-variable.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createVariable( + functionId: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..bb4622e67a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create-vcs-deployment.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; +use Appwrite\Enums\VCSDeploymentType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->createVcsDeployment( + functionId: '<FUNCTION_ID>', + type: VCSDeploymentType::BRANCH(), + reference: '<REFERENCE>', + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create.md b/docs/examples/1.8.x/server-php/examples/functions/create.md new file mode 100644 index 0000000000..3d37b8068e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/create.md @@ -0,0 +1,33 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->create( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: ::NODE145(), + execute: ["any"], // optional + events: [], // optional + schedule: '', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional + scopes: [], // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + specification: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..20285d7610 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/delete-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->deleteDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-php/examples/functions/delete-execution.md new file mode 100644 index 0000000000..e55a8b1892 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/delete-execution.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->deleteExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-php/examples/functions/delete-variable.md new file mode 100644 index 0000000000..e1fb391d79 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/delete-variable.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->deleteVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/delete.md b/docs/examples/1.8.x/server-php/examples/functions/delete.md new file mode 100644 index 0000000000..9f87f5c9f0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->delete( + functionId: '<FUNCTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-php/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..7b3e18751e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/get-deployment-download.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->getDeploymentDownload( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/get-deployment.md new file mode 100644 index 0000000000..945933b2ad --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/get-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->getDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/get-execution.md b/docs/examples/1.8.x/server-php/examples/functions/get-execution.md new file mode 100644 index 0000000000..7dfeeed0c0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/get-execution.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$functions = new Functions($client); + +$result = $functions->getExecution( + functionId: '<FUNCTION_ID>', + executionId: '<EXECUTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/get-variable.md b/docs/examples/1.8.x/server-php/examples/functions/get-variable.md new file mode 100644 index 0000000000..4c8d3d6b53 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/get-variable.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->getVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/get.md b/docs/examples/1.8.x/server-php/examples/functions/get.md new file mode 100644 index 0000000000..ca2160f6c9 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->get( + functionId: '<FUNCTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-php/examples/functions/list-deployments.md new file mode 100644 index 0000000000..7bbaa0ed3e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/list-deployments.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->listDeployments( + functionId: '<FUNCTION_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/list-executions.md b/docs/examples/1.8.x/server-php/examples/functions/list-executions.md new file mode 100644 index 0000000000..77a8ba7223 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/list-executions.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$functions = new Functions($client); + +$result = $functions->listExecutions( + functionId: '<FUNCTION_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-php/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..6c77c42678 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/list-runtimes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->listRuntimes(); diff --git a/docs/examples/1.8.x/server-php/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-php/examples/functions/list-specifications.md new file mode 100644 index 0000000000..eec5c33c9d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/list-specifications.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->listSpecifications(); diff --git a/docs/examples/1.8.x/server-php/examples/functions/list-variables.md b/docs/examples/1.8.x/server-php/examples/functions/list-variables.md new file mode 100644 index 0000000000..f85e85490c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/list-variables.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->listVariables( + functionId: '<FUNCTION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/list.md b/docs/examples/1.8.x/server-php/examples/functions/list.md new file mode 100644 index 0000000000..de914afc58 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-php/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..de36d4e8ce --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/update-deployment-status.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->updateDeploymentStatus( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-php/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..38ba026ba1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/update-function-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->updateFunctionDeployment( + functionId: '<FUNCTION_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/update-variable.md b/docs/examples/1.8.x/server-php/examples/functions/update-variable.md new file mode 100644 index 0000000000..b15597a622 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/update-variable.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->updateVariable( + functionId: '<FUNCTION_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // optional + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/update.md b/docs/examples/1.8.x/server-php/examples/functions/update.md new file mode 100644 index 0000000000..ea8d863ae5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/functions/update.md @@ -0,0 +1,32 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Functions; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$functions = new Functions($client); + +$result = $functions->update( + functionId: '<FUNCTION_ID>', + name: '<NAME>', + runtime: ::NODE145(), // optional + execute: ["any"], // optional + events: [], // optional + schedule: '', // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: '<ENTRYPOINT>', // optional + commands: '<COMMANDS>', // optional + scopes: [], // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + specification: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/graphql/mutation.md b/docs/examples/1.8.x/server-php/examples/graphql/mutation.md new file mode 100644 index 0000000000..c349bc2dbd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/graphql/mutation.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Graphql; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$graphql = new Graphql($client); + +$result = $graphql->mutation( + query: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/graphql/query.md b/docs/examples/1.8.x/server-php/examples/graphql/query.md new file mode 100644 index 0000000000..e6e277c27b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/graphql/query.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Graphql; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$graphql = new Graphql($client); + +$result = $graphql->query( + query: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-php/examples/health/get-antivirus.md new file mode 100644 index 0000000000..47210646df --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-antivirus.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getAntivirus(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get-cache.md b/docs/examples/1.8.x/server-php/examples/health/get-cache.md new file mode 100644 index 0000000000..2e81dae328 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-cache.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getCache(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get-certificate.md b/docs/examples/1.8.x/server-php/examples/health/get-certificate.md new file mode 100644 index 0000000000..408581beac --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-certificate.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getCertificate( + domain: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-d-b.md b/docs/examples/1.8.x/server-php/examples/health/get-d-b.md new file mode 100644 index 0000000000..cfec70e604 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-d-b.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getDB(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-php/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..02959db3b5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-failed-jobs.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getFailedJobs( + name: ::V1DATABASE(), + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-php/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..1c346caab6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-pub-sub.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getPubSub(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..8c1f77433b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-builds.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueBuilds( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..92fb79a98c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-certificates.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueCertificates( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..745b469434 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-databases.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueDatabases( + name: '<NAME>', // optional + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..d3952685c4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-deletes.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueDeletes( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..1a5bea2b4c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-functions.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueFunctions( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..cf5e3b9d83 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-logs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueLogs( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..132dfa68aa --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-mails.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueMails( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..fd5fdb1ede --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-messaging.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueMessaging( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..68110189e5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-migrations.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueMigrations( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..d0bd6c054e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-stats-resources.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueStatsResources( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..627a85c845 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-usage.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueUsage( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-php/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..d6ccd7cd83 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-queue-webhooks.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getQueueWebhooks( + threshold: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-php/examples/health/get-storage-local.md new file mode 100644 index 0000000000..041d24954c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-storage-local.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getStorageLocal(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get-storage.md b/docs/examples/1.8.x/server-php/examples/health/get-storage.md new file mode 100644 index 0000000000..377416ed13 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-storage.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getStorage(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get-time.md b/docs/examples/1.8.x/server-php/examples/health/get-time.md new file mode 100644 index 0000000000..aa2699349d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get-time.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->getTime(); diff --git a/docs/examples/1.8.x/server-php/examples/health/get.md b/docs/examples/1.8.x/server-php/examples/health/get.md new file mode 100644 index 0000000000..fec3e3f485 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/health/get.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Health; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$health = new Health($client); + +$result = $health->get(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/get.md b/docs/examples/1.8.x/server-php/examples/locale/get.md new file mode 100644 index 0000000000..ef4c0432dd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/get.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->get(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-codes.md b/docs/examples/1.8.x/server-php/examples/locale/list-codes.md new file mode 100644 index 0000000000..273fad0839 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-codes.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCodes(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-continents.md b/docs/examples/1.8.x/server-php/examples/locale/list-continents.md new file mode 100644 index 0000000000..e8c7ca46df --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-continents.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listContinents(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-php/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..c5dd1d2ad6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-countries-e-u.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCountriesEU(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-php/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..7585c1071e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-countries-phones.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCountriesPhones(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-countries.md b/docs/examples/1.8.x/server-php/examples/locale/list-countries.md new file mode 100644 index 0000000000..63a2e0b5f7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-countries.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCountries(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-php/examples/locale/list-currencies.md new file mode 100644 index 0000000000..d385018e7d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-currencies.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listCurrencies(); diff --git a/docs/examples/1.8.x/server-php/examples/locale/list-languages.md b/docs/examples/1.8.x/server-php/examples/locale/list-languages.md new file mode 100644 index 0000000000..f0ca4d4f04 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/locale/list-languages.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Locale; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$locale = new Locale($client); + +$result = $locale->listLanguages(); diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..da13d17231 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-apns-provider.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createApnsProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + authKey: '<AUTH_KEY>', // optional + authKeyId: '<AUTH_KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + bundleId: '<BUNDLE_ID>', // optional + sandbox: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-email.md b/docs/examples/1.8.x/server-php/examples/messaging/create-email.md new file mode 100644 index 0000000000..9de24873bf --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-email.md @@ -0,0 +1,26 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createEmail( + messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // optional + cc: [], // optional + bcc: [], // optional + attachments: [], // optional + draft: false, // optional + html: false, // optional + scheduledAt: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..baf72a1df4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-fcm-provider.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createFcmProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + serviceAccountJSON: [], // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..6c62ee8837 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,24 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + domain: '<DOMAIN>', // optional + isEuRegion: false, // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..1eb954a2c6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-msg91provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + templateId: '<TEMPLATE_ID>', // optional + senderId: '<SENDER_ID>', // optional + authKey: '<AUTH_KEY>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-push.md b/docs/examples/1.8.x/server-php/examples/messaging/create-push.md new file mode 100644 index 0000000000..46aeeb3b8b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-push.md @@ -0,0 +1,33 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createPush( + messageId: '<MESSAGE_ID>', + title: '<TITLE>', // optional + body: '<BODY>', // optional + topics: [], // optional + users: [], // optional + targets: [], // optional + data: [], // optional + action: '<ACTION>', // optional + image: '[ID1:ID2]', // optional + icon: '<ICON>', // optional + sound: '<SOUND>', // optional + color: '<COLOR>', // optional + tag: '<TAG>', // optional + badge: null, // optional + draft: false, // optional + scheduledAt: '', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority::NORMAL() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..892d856305 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-php/examples/messaging/create-sms.md new file mode 100644 index 0000000000..1e2d9ac765 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-sms.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createSms( + messageId: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], // optional + users: [], // optional + targets: [], // optional + draft: false, // optional + scheduledAt: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..4dcfb3a088 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-smtp-provider.md @@ -0,0 +1,28 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createSmtpProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, // optional + username: '<USERNAME>', // optional + password: '<PASSWORD>', // optional + encryption: SmtpEncryption::NONE(), // optional + autoTLS: false, // optional + mailer: '<MAILER>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: 'email@example.com', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-php/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..3516fa3d6a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-subscriber.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$messaging = new Messaging($client); + +$result = $messaging->createSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>', + targetId: '<TARGET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..9006918029 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-telesign-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..5215d52642 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-php/examples/messaging/create-topic.md new file mode 100644 index 0000000000..e94141cc73 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-topic.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..c356828640 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-twilio-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..adeacbc45e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/create-vonage-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->createVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..f37d18b4fd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/delete-provider.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->deleteProvider( + providerId: '<PROVIDER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-php/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..f7a8425920 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/delete-subscriber.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$messaging = new Messaging($client); + +$result = $messaging->deleteSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-php/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..2ec899b1d6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/delete-topic.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->deleteTopic( + topicId: '<TOPIC_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/delete.md b/docs/examples/1.8.x/server-php/examples/messaging/delete.md new file mode 100644 index 0000000000..5781838bdc --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->delete( + messageId: '<MESSAGE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/get-message.md b/docs/examples/1.8.x/server-php/examples/messaging/get-message.md new file mode 100644 index 0000000000..cf922219c7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/get-message.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->getMessage( + messageId: '<MESSAGE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/get-provider.md new file mode 100644 index 0000000000..d19f5c65e5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/get-provider.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->getProvider( + providerId: '<PROVIDER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-php/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..e2a0d7ef35 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/get-subscriber.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->getSubscriber( + topicId: '<TOPIC_ID>', + subscriberId: '<SUBSCRIBER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-php/examples/messaging/get-topic.md new file mode 100644 index 0000000000..fc06cbbc95 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/get-topic.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->getTopic( + topicId: '<TOPIC_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-php/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..03231375f8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-message-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listMessageLogs( + messageId: '<MESSAGE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-php/examples/messaging/list-messages.md new file mode 100644 index 0000000000..965fe08fc7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-messages.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listMessages( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-php/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..761bb966d6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-provider-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listProviderLogs( + providerId: '<PROVIDER_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-php/examples/messaging/list-providers.md new file mode 100644 index 0000000000..614e9c58f1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-providers.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listProviders( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-php/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..c710575a46 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listSubscriberLogs( + subscriberId: '<SUBSCRIBER_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-php/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..d2625cd555 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-subscribers.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listSubscribers( + topicId: '<TOPIC_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-php/examples/messaging/list-targets.md new file mode 100644 index 0000000000..1112d28003 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-targets.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listTargets( + messageId: '<MESSAGE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-php/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..3bbb35a006 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-topic-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listTopicLogs( + topicId: '<TOPIC_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-php/examples/messaging/list-topics.md new file mode 100644 index 0000000000..debb363133 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/list-topics.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->listTopics( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..724453b9b1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-apns-provider.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateApnsProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + authKey: '<AUTH_KEY>', // optional + authKeyId: '<AUTH_KEY_ID>', // optional + teamId: '<TEAM_ID>', // optional + bundleId: '<BUNDLE_ID>', // optional + sandbox: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-email.md b/docs/examples/1.8.x/server-php/examples/messaging/update-email.md new file mode 100644 index 0000000000..dd0f645af6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-email.md @@ -0,0 +1,26 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateEmail( + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + subject: '<SUBJECT>', // optional + content: '<CONTENT>', // optional + draft: false, // optional + html: false, // optional + cc: [], // optional + bcc: [], // optional + scheduledAt: '', // optional + attachments: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..36672f4b65 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-fcm-provider.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateFcmProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + serviceAccountJSON: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..c99ebc7d73 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,24 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateMailgunProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + apiKey: '<API_KEY>', // optional + domain: '<DOMAIN>', // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..f6f557cce4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-msg91provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateMsg91Provider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + templateId: '<TEMPLATE_ID>', // optional + senderId: '<SENDER_ID>', // optional + authKey: '<AUTH_KEY>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-push.md b/docs/examples/1.8.x/server-php/examples/messaging/update-push.md new file mode 100644 index 0000000000..e1df0b9132 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-push.md @@ -0,0 +1,33 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updatePush( + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + title: '<TITLE>', // optional + body: '<BODY>', // optional + data: [], // optional + action: '<ACTION>', // optional + image: '[ID1:ID2]', // optional + icon: '<ICON>', // optional + sound: '<SOUND>', // optional + color: '<COLOR>', // optional + tag: '<TAG>', // optional + badge: null, // optional + draft: false, // optional + scheduledAt: '', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority::NORMAL() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..b8473c16a3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateSendgridProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-php/examples/messaging/update-sms.md new file mode 100644 index 0000000000..730da4178a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-sms.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateSms( + messageId: '<MESSAGE_ID>', + topics: [], // optional + users: [], // optional + targets: [], // optional + content: '<CONTENT>', // optional + draft: false, // optional + scheduledAt: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..a16a630283 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-smtp-provider.md @@ -0,0 +1,28 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateSmtpProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + host: '<HOST>', // optional + port: 1, // optional + username: '<USERNAME>', // optional + password: '<PASSWORD>', // optional + encryption: SmtpEncryption::NONE(), // optional + autoTLS: false, // optional + mailer: '<MAILER>', // optional + fromName: '<FROM_NAME>', // optional + fromEmail: 'email@example.com', // optional + replyToName: '<REPLY_TO_NAME>', // optional + replyToEmail: '<REPLY_TO_EMAIL>', // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..29a54bfaed --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-telesign-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateTelesignProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + customerId: '<CUSTOMER_ID>', // optional + apiKey: '<API_KEY>', // optional + from: '<FROM>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..e6a1ed1a1e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateTextmagicProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + username: '<USERNAME>', // optional + apiKey: '<API_KEY>', // optional + from: '<FROM>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-php/examples/messaging/update-topic.md new file mode 100644 index 0000000000..b1f9a32ec5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-topic.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateTopic( + topicId: '<TOPIC_ID>', + name: '<NAME>', // optional + subscribe: ["any"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..def821adc4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-twilio-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateTwilioProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + accountSid: '<ACCOUNT_SID>', // optional + authToken: '<AUTH_TOKEN>', // optional + from: '<FROM>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-php/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..0841e284eb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/messaging/update-vonage-provider.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Messaging; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$messaging = new Messaging($client); + +$result = $messaging->updateVonageProvider( + providerId: '<PROVIDER_ID>', + name: '<NAME>', // optional + enabled: false, // optional + apiKey: '<API_KEY>', // optional + apiSecret: '<API_SECRET>', // optional + from: '<FROM>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/create-deployment.md new file mode 100644 index 0000000000..30770b7871 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/create-deployment.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createDeployment( + siteId: '<SITE_ID>', + code: InputFile::withPath('file.png'), + activate: false, + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..84f65cd025 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createDuplicateDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..f2d1f3cd8b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/create-template-deployment.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createTemplateDeployment( + siteId: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + rootDirectory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/create-variable.md b/docs/examples/1.8.x/server-php/examples/sites/create-variable.md new file mode 100644 index 0000000000..3097e19305 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/create-variable.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createVariable( + siteId: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..7f63dffdf8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/create-vcs-deployment.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\VCSDeploymentType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->createVcsDeployment( + siteId: '<SITE_ID>', + type: VCSDeploymentType::BRANCH(), + reference: '<REFERENCE>', + activate: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/create.md b/docs/examples/1.8.x/server-php/examples/sites/create.md new file mode 100644 index 0000000000..4a1c3a4fcb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/create.md @@ -0,0 +1,34 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->create( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: ::ANALOG(), + buildRuntime: ::NODE145(), + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + adapter: ::STATIC(), // optional + installationId: '<INSTALLATION_ID>', // optional + fallbackFile: '<FALLBACK_FILE>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + specification: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..4e24748c37 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/delete-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->deleteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/delete-log.md b/docs/examples/1.8.x/server-php/examples/sites/delete-log.md new file mode 100644 index 0000000000..b6e30643f6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/delete-log.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->deleteLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-php/examples/sites/delete-variable.md new file mode 100644 index 0000000000..663254303a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/delete-variable.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->deleteVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/delete.md b/docs/examples/1.8.x/server-php/examples/sites/delete.md new file mode 100644 index 0000000000..8e6363aa35 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->delete( + siteId: '<SITE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-php/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..91c6b6e52a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/get-deployment-download.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->getDeploymentDownload( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/get-deployment.md new file mode 100644 index 0000000000..19525d9274 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/get-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->getDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/get-log.md b/docs/examples/1.8.x/server-php/examples/sites/get-log.md new file mode 100644 index 0000000000..5ceb2b9110 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/get-log.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->getLog( + siteId: '<SITE_ID>', + logId: '<LOG_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/get-variable.md b/docs/examples/1.8.x/server-php/examples/sites/get-variable.md new file mode 100644 index 0000000000..0cab412b2e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/get-variable.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->getVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/get.md b/docs/examples/1.8.x/server-php/examples/sites/get.md new file mode 100644 index 0000000000..e5ec061bad --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->get( + siteId: '<SITE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-php/examples/sites/list-deployments.md new file mode 100644 index 0000000000..4d687ec59e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/list-deployments.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listDeployments( + siteId: '<SITE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-php/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..87df92d9ee --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/list-frameworks.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listFrameworks(); diff --git a/docs/examples/1.8.x/server-php/examples/sites/list-logs.md b/docs/examples/1.8.x/server-php/examples/sites/list-logs.md new file mode 100644 index 0000000000..5674e98f5e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/list-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listLogs( + siteId: '<SITE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-php/examples/sites/list-specifications.md new file mode 100644 index 0000000000..42dae1b799 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/list-specifications.md @@ -0,0 +1,13 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listSpecifications(); diff --git a/docs/examples/1.8.x/server-php/examples/sites/list-variables.md b/docs/examples/1.8.x/server-php/examples/sites/list-variables.md new file mode 100644 index 0000000000..36aad640fe --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/list-variables.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->listVariables( + siteId: '<SITE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/list.md b/docs/examples/1.8.x/server-php/examples/sites/list.md new file mode 100644 index 0000000000..4e16c690bc --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-php/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..2714b3570f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/update-deployment-status.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->updateDeploymentStatus( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-php/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..6e2614cb41 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/update-site-deployment.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->updateSiteDeployment( + siteId: '<SITE_ID>', + deploymentId: '<DEPLOYMENT_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/update-variable.md b/docs/examples/1.8.x/server-php/examples/sites/update-variable.md new file mode 100644 index 0000000000..84bafe28c4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/update-variable.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->updateVariable( + siteId: '<SITE_ID>', + variableId: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', // optional + secret: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/sites/update.md b/docs/examples/1.8.x/server-php/examples/sites/update.md new file mode 100644 index 0000000000..f2ca54a987 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/sites/update.md @@ -0,0 +1,33 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Sites; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$sites = new Sites($client); + +$result = $sites->update( + siteId: '<SITE_ID>', + name: '<NAME>', + framework: ::ANALOG(), + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: '<INSTALL_COMMAND>', // optional + buildCommand: '<BUILD_COMMAND>', // optional + outputDirectory: '<OUTPUT_DIRECTORY>', // optional + buildRuntime: ::NODE145(), // optional + adapter: ::STATIC(), // optional + fallbackFile: '<FALLBACK_FILE>', // optional + installationId: '<INSTALLATION_ID>', // optional + providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', // optional + providerBranch: '<PROVIDER_BRANCH>', // optional + providerSilentMode: false, // optional + providerRootDirectory: '<PROVIDER_ROOT_DIRECTORY>', // optional + specification: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-php/examples/storage/create-bucket.md new file mode 100644 index 0000000000..cd17ffedac --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/create-bucket.md @@ -0,0 +1,24 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->createBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: ::NONE(), // optional + encryption: false, // optional + antivirus: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/create-file.md b/docs/examples/1.8.x/server-php/examples/storage/create-file.md new file mode 100644 index 0000000000..2d13305984 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/create-file.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->createFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + file: InputFile::withPath('file.png'), + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-php/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..50adf35b6b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/delete-bucket.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->deleteBucket( + bucketId: '<BUCKET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/delete-file.md b/docs/examples/1.8.x/server-php/examples/storage/delete-file.md new file mode 100644 index 0000000000..d4c45eb66a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/delete-file.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->deleteFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-php/examples/storage/get-bucket.md new file mode 100644 index 0000000000..e62c43d2d3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/get-bucket.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->getBucket( + bucketId: '<BUCKET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-php/examples/storage/get-file-download.md new file mode 100644 index 0000000000..defefa5948 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/get-file-download.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->getFileDownload( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-php/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..0b65fc326a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/get-file-preview.md @@ -0,0 +1,28 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->getFilePreview( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + width: 0, // optional + height: 0, // optional + gravity: ImageGravity::CENTER(), // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: '', // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: '', // optional + output: ImageFormat::JPG(), // optional + token: '<TOKEN>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-php/examples/storage/get-file-view.md new file mode 100644 index 0000000000..dfc84ca102 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/get-file-view.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->getFileView( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + token: '<TOKEN>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/get-file.md b/docs/examples/1.8.x/server-php/examples/storage/get-file.md new file mode 100644 index 0000000000..6964144801 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/get-file.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->getFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-php/examples/storage/list-buckets.md new file mode 100644 index 0000000000..a4538c6f3a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/list-buckets.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->listBuckets( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/list-files.md b/docs/examples/1.8.x/server-php/examples/storage/list-files.md new file mode 100644 index 0000000000..ede0e7c979 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/list-files.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->listFiles( + bucketId: '<BUCKET_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-php/examples/storage/update-bucket.md new file mode 100644 index 0000000000..1517e36621 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/update-bucket.md @@ -0,0 +1,24 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$storage = new Storage($client); + +$result = $storage->updateBucket( + bucketId: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: ::NONE(), // optional + encryption: false, // optional + antivirus: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/storage/update-file.md b/docs/examples/1.8.x/server-php/examples/storage/update-file.md new file mode 100644 index 0000000000..7b467acfe3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/storage/update-file.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Storage; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$storage = new Storage($client); + +$result = $storage->updateFile( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + name: '<NAME>', // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..28339753ac --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..d7f18f2ede --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md new file mode 100644 index 0000000000..15ec2cf2e5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..aa2b6138f7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md new file mode 100644 index 0000000000..1f620dc887 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-index.md b/docs/examples/1.8.x/server-php/examples/tables/create-index.md new file mode 100644 index 0000000000..c21a162359 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-index.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: ::KEY(), + columns: [], + orders: [], // optional + lengths: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..185f12c5cb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..1f74e4dd72 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..9597dffdfe --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md @@ -0,0 +1,23 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; +use Appwrite\Enums\; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: ::ONETOONE(), + twoWay: false, // optional + key: '', // optional + twoWayKey: '', // optional + onDelete: ::CASCADE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-row.md b/docs/examples/1.8.x/server-php/examples/tables/create-row.md new file mode 100644 index 0000000000..6b64a7e058 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-row.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setKey('<YOUR_API_KEY>') // Your secret API key + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$tables = new Tables($client); + +$result = $tables->createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-rows.md b/docs/examples/1.8.x/server-php/examples/tables/create-rows.md new file mode 100644 index 0000000000..a1bf72ad13 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setAdmin('') // + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md new file mode 100644 index 0000000000..085aff25c8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md new file mode 100644 index 0000000000..d0bdb55dd4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create.md b/docs/examples/1.8.x/server-php/examples/tables/create.md new file mode 100644 index 0000000000..773d7a24eb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->create( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..b0c44b6d0a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + min: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-column.md b/docs/examples/1.8.x/server-php/examples/tables/delete-column.md new file mode 100644 index 0000000000..9bd6738cb7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete-column.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-index.md b/docs/examples/1.8.x/server-php/examples/tables/delete-index.md new file mode 100644 index 0000000000..bbd748433a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-row.md b/docs/examples/1.8.x/server-php/examples/tables/delete-row.md new file mode 100644 index 0000000000..0c4ab6ef40 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete-row.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tables = new Tables($client); + +$result = $tables->deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md new file mode 100644 index 0000000000..b0c984cc17 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete.md b/docs/examples/1.8.x/server-php/examples/tables/delete.md new file mode 100644 index 0000000000..f145eedc91 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->delete( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-column.md b/docs/examples/1.8.x/server-php/examples/tables/get-column.md new file mode 100644 index 0000000000..b8b676564e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/get-column.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-index.md b/docs/examples/1.8.x/server-php/examples/tables/get-index.md new file mode 100644 index 0000000000..5d1139d596 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/get-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-row.md b/docs/examples/1.8.x/server-php/examples/tables/get-row.md new file mode 100644 index 0000000000..ccde387b89 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/get-row.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tables = new Tables($client); + +$result = $tables->getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get.md b/docs/examples/1.8.x/server-php/examples/tables/get.md new file mode 100644 index 0000000000..d07ef7338a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/get.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->get( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..aa5a3c0d53 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + max: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-columns.md b/docs/examples/1.8.x/server-php/examples/tables/list-columns.md new file mode 100644 index 0000000000..0338567240 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/list-columns.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md new file mode 100644 index 0000000000..df1f8c6aca --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-rows.md b/docs/examples/1.8.x/server-php/examples/tables/list-rows.md new file mode 100644 index 0000000000..2041d72b05 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/list-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tables = new Tables($client); + +$result = $tables->listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list.md b/docs/examples/1.8.x/server-php/examples/tables/list.md new file mode 100644 index 0000000000..37df0a4baa --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/list.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->list( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..8ad80506d8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..5185357f17 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md new file mode 100644 index 0000000000..7acbb811eb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..478905af67 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md new file mode 100644 index 0000000000..1d9c5fd997 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..f6998db0a2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..e7906fbd0f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..b29f8c86a8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: ::CASCADE(), // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-row.md b/docs/examples/1.8.x/server-php/examples/tables/update-row.md new file mode 100644 index 0000000000..921c43d935 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-row.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tables = new Tables($client); + +$result = $tables->updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-rows.md b/docs/examples/1.8.x/server-php/examples/tables/update-rows.md new file mode 100644 index 0000000000..f61fa2b17d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-rows.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: [], // optional + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md new file mode 100644 index 0000000000..8856ec19c1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md new file mode 100644 index 0000000000..faa46d1806 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update.md b/docs/examples/1.8.x/server-php/examples/tables/update.md new file mode 100644 index 0000000000..39f076b8f8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->update( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md new file mode 100644 index 0000000000..2bddd9b5b3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setKey('<YOUR_API_KEY>') // Your secret API key + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$tables = new Tables($client); + +$result = $tables->upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..5ed5f028a9 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setAdmin('') // + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/create-membership.md b/docs/examples/1.8.x/server-php/examples/teams/create-membership.md new file mode 100644 index 0000000000..285368f9dd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/create-membership.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->createMembership( + teamId: '<TEAM_ID>', + roles: [], + email: 'email@example.com', // optional + userId: '<USER_ID>', // optional + phone: '+12065550100', // optional + url: 'https://example.com', // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/create.md b/docs/examples/1.8.x/server-php/examples/teams/create.md new file mode 100644 index 0000000000..643fa0eb11 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/create.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->create( + teamId: '<TEAM_ID>', + name: '<NAME>', + roles: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-php/examples/teams/delete-membership.md new file mode 100644 index 0000000000..579b790c55 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/delete-membership.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->deleteMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/delete.md b/docs/examples/1.8.x/server-php/examples/teams/delete.md new file mode 100644 index 0000000000..9db4e7e9a7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->delete( + teamId: '<TEAM_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/get-membership.md b/docs/examples/1.8.x/server-php/examples/teams/get-membership.md new file mode 100644 index 0000000000..bd6cbe8b42 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/get-membership.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->getMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-php/examples/teams/get-prefs.md new file mode 100644 index 0000000000..fbade4fc2f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/get-prefs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->getPrefs( + teamId: '<TEAM_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/get.md b/docs/examples/1.8.x/server-php/examples/teams/get.md new file mode 100644 index 0000000000..0dafa8a5d3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->get( + teamId: '<TEAM_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-php/examples/teams/list-memberships.md new file mode 100644 index 0000000000..817ea7fefc --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/list-memberships.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->listMemberships( + teamId: '<TEAM_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/list.md b/docs/examples/1.8.x/server-php/examples/teams/list.md new file mode 100644 index 0000000000..99d9895fe5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-php/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..5dbfd4cb0f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/update-membership-status.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updateMembershipStatus( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + userId: '<USER_ID>', + secret: '<SECRET>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/update-membership.md b/docs/examples/1.8.x/server-php/examples/teams/update-membership.md new file mode 100644 index 0000000000..10f135b01f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/update-membership.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updateMembership( + teamId: '<TEAM_ID>', + membershipId: '<MEMBERSHIP_ID>', + roles: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/update-name.md b/docs/examples/1.8.x/server-php/examples/teams/update-name.md new file mode 100644 index 0000000000..bc13d924e4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/update-name.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updateName( + teamId: '<TEAM_ID>', + name: '<NAME>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-php/examples/teams/update-prefs.md new file mode 100644 index 0000000000..bd8d9de32f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/teams/update-prefs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Teams; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updatePrefs( + teamId: '<TEAM_ID>', + prefs: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-php/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..e4f230217a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tokens/create-file-token.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tokens = new Tokens($client); + +$result = $tokens->createFileToken( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + expire: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tokens/delete.md b/docs/examples/1.8.x/server-php/examples/tokens/delete.md new file mode 100644 index 0000000000..278be90b12 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tokens/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tokens = new Tokens($client); + +$result = $tokens->delete( + tokenId: '<TOKEN_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tokens/get.md b/docs/examples/1.8.x/server-php/examples/tokens/get.md new file mode 100644 index 0000000000..e7b4e1081b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tokens/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tokens = new Tokens($client); + +$result = $tokens->get( + tokenId: '<TOKEN_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tokens/list.md b/docs/examples/1.8.x/server-php/examples/tokens/list.md new file mode 100644 index 0000000000..b89420bed1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tokens/list.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tokens = new Tokens($client); + +$result = $tokens->list( + bucketId: '<BUCKET_ID>', + fileId: '<FILE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tokens/update.md b/docs/examples/1.8.x/server-php/examples/tokens/update.md new file mode 100644 index 0000000000..ea95322a43 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tokens/update.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tokens; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tokens = new Tokens($client); + +$result = $tokens->update( + tokenId: '<TOKEN_ID>', + expire: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-php/examples/users/create-argon2user.md new file mode 100644 index 0000000000..a9166ef3b0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-argon2user.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createArgon2User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-php/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..c9fd81e43a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-bcrypt-user.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createBcryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-php/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..1c1c6d40bd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-j-w-t.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createJWT( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>', // optional + duration: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-php/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..696cbbeb57 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-m-d5user.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createMD5User( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..372fb1bc6a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createMfaRecoveryCodes( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-php/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..d56c4651f6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-p-h-pass-user.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createPHPassUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-php/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..0b9a27ed8e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-s-h-a-user.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createSHAUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordVersion: PasswordHash::SHA1(), // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-php/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..f579efb5f2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createScryptModifiedUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordSaltSeparator: '<PASSWORD_SALT_SEPARATOR>', + passwordSignerKey: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-php/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..b406b9404a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-scrypt-user.md @@ -0,0 +1,23 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createScryptUser( + userId: '<USER_ID>', + email: 'email@example.com', + password: 'password', + passwordSalt: '<PASSWORD_SALT>', + passwordCpu: null, + passwordMemory: null, + passwordParallel: null, + passwordLength: null, + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-session.md b/docs/examples/1.8.x/server-php/examples/users/create-session.md new file mode 100644 index 0000000000..1589315f92 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-session.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createSession( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-target.md b/docs/examples/1.8.x/server-php/examples/users/create-target.md new file mode 100644 index 0000000000..57946a440f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-target.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; +use Appwrite\Enums\MessagingProviderType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + providerType: MessagingProviderType::EMAIL(), + identifier: '<IDENTIFIER>', + providerId: '<PROVIDER_ID>', // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create-token.md b/docs/examples/1.8.x/server-php/examples/users/create-token.md new file mode 100644 index 0000000000..1b92f5171d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create-token.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->createToken( + userId: '<USER_ID>', + length: 4, // optional + expire: 60 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/create.md b/docs/examples/1.8.x/server-php/examples/users/create.md new file mode 100644 index 0000000000..595f24fbce --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/create.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->create( + userId: '<USER_ID>', + email: 'email@example.com', // optional + phone: '+12065550100', // optional + password: '', // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/delete-identity.md b/docs/examples/1.8.x/server-php/examples/users/delete-identity.md new file mode 100644 index 0000000000..26b71eead2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/delete-identity.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteIdentity( + identityId: '<IDENTITY_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-php/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..8ef1279589 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; +use Appwrite\Enums\AuthenticatorType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteMfaAuthenticator( + userId: '<USER_ID>', + type: AuthenticatorType::TOTP() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/delete-session.md b/docs/examples/1.8.x/server-php/examples/users/delete-session.md new file mode 100644 index 0000000000..493cf53d2f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/delete-session.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteSession( + userId: '<USER_ID>', + sessionId: '<SESSION_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-php/examples/users/delete-sessions.md new file mode 100644 index 0000000000..cd6d11e1d7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/delete-sessions.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteSessions( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/delete-target.md b/docs/examples/1.8.x/server-php/examples/users/delete-target.md new file mode 100644 index 0000000000..0d85d3e4df --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/delete-target.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->deleteTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/delete.md b/docs/examples/1.8.x/server-php/examples/users/delete.md new file mode 100644 index 0000000000..883156ecd6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/delete.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->delete( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..db090fb245 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->getMfaRecoveryCodes( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/get-prefs.md b/docs/examples/1.8.x/server-php/examples/users/get-prefs.md new file mode 100644 index 0000000000..5e99e14b52 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/get-prefs.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->getPrefs( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/get-target.md b/docs/examples/1.8.x/server-php/examples/users/get-target.md new file mode 100644 index 0000000000..31baf3c852 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/get-target.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->getTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/get.md b/docs/examples/1.8.x/server-php/examples/users/get.md new file mode 100644 index 0000000000..0ce39ae6e5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/get.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->get( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list-identities.md b/docs/examples/1.8.x/server-php/examples/users/list-identities.md new file mode 100644 index 0000000000..fd15b7b51a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list-identities.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listIdentities( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list-logs.md b/docs/examples/1.8.x/server-php/examples/users/list-logs.md new file mode 100644 index 0000000000..7aea2dc59a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list-logs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listLogs( + userId: '<USER_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list-memberships.md b/docs/examples/1.8.x/server-php/examples/users/list-memberships.md new file mode 100644 index 0000000000..53c4b1b9cc --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list-memberships.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listMemberships( + userId: '<USER_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-php/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..6a0088c9bd --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list-mfa-factors.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listMfaFactors( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list-sessions.md b/docs/examples/1.8.x/server-php/examples/users/list-sessions.md new file mode 100644 index 0000000000..bdbd0e5e51 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list-sessions.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listSessions( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list-targets.md b/docs/examples/1.8.x/server-php/examples/users/list-targets.md new file mode 100644 index 0000000000..005d51a531 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list-targets.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->listTargets( + userId: '<USER_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/list.md b/docs/examples/1.8.x/server-php/examples/users/list.md new file mode 100644 index 0000000000..04217363f0 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/list.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->list( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-php/examples/users/update-email-verification.md new file mode 100644 index 0000000000..636f1d2404 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-email-verification.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateEmailVerification( + userId: '<USER_ID>', + emailVerification: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-email.md b/docs/examples/1.8.x/server-php/examples/users/update-email.md new file mode 100644 index 0000000000..21ec88b334 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-email.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateEmail( + userId: '<USER_ID>', + email: 'email@example.com' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-labels.md b/docs/examples/1.8.x/server-php/examples/users/update-labels.md new file mode 100644 index 0000000000..7d4ae5de50 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-labels.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateLabels( + userId: '<USER_ID>', + labels: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-php/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..75214de880 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateMfaRecoveryCodes( + userId: '<USER_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-mfa.md b/docs/examples/1.8.x/server-php/examples/users/update-mfa.md new file mode 100644 index 0000000000..3eda496f1f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-mfa.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateMfa( + userId: '<USER_ID>', + mfa: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-name.md b/docs/examples/1.8.x/server-php/examples/users/update-name.md new file mode 100644 index 0000000000..09bb07cdd7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-name.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateName( + userId: '<USER_ID>', + name: '<NAME>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-password.md b/docs/examples/1.8.x/server-php/examples/users/update-password.md new file mode 100644 index 0000000000..6d58605d5c --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-password.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updatePassword( + userId: '<USER_ID>', + password: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-php/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..019fb3f148 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-phone-verification.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updatePhoneVerification( + userId: '<USER_ID>', + phoneVerification: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-phone.md b/docs/examples/1.8.x/server-php/examples/users/update-phone.md new file mode 100644 index 0000000000..13bd41bfa8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-phone.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updatePhone( + userId: '<USER_ID>', + number: '+12065550100' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-prefs.md b/docs/examples/1.8.x/server-php/examples/users/update-prefs.md new file mode 100644 index 0000000000..9491239271 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-prefs.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updatePrefs( + userId: '<USER_ID>', + prefs: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-status.md b/docs/examples/1.8.x/server-php/examples/users/update-status.md new file mode 100644 index 0000000000..f29dc95e2f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-status.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateStatus( + userId: '<USER_ID>', + status: false +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/users/update-target.md b/docs/examples/1.8.x/server-php/examples/users/update-target.md new file mode 100644 index 0000000000..00ad27b9a7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/users/update-target.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Users; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$users = new Users($client); + +$result = $users->updateTarget( + userId: '<USER_ID>', + targetId: '<TARGET_ID>', + identifier: '<IDENTIFIER>', // optional + providerId: '<PROVIDER_ID>', // optional + name: '<NAME>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-python/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..c3b7a87d27 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-anonymous-session.md @@ -0,0 +1,10 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_anonymous_session() diff --git a/docs/examples/1.8.x/server-python/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-python/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..e831821a6c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-email-password-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_email_password_session( + email = 'email@example.com', + password = 'password' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-email-token.md b/docs/examples/1.8.x/server-python/examples/account/create-email-token.md new file mode 100644 index 0000000000..7ff4f6b8a9 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_email_token( + user_id = '<USER_ID>', + email = 'email@example.com', + phrase = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-python/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..172f45f996 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-j-w-t.md @@ -0,0 +1,10 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_jwt() diff --git a/docs/examples/1.8.x/server-python/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-python/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..14e76ed4d3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_magic_url_token( + user_id = '<USER_ID>', + email = 'email@example.com', + url = 'https://example.com', # optional + phrase = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-python/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..70cee1d60c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-mfa-authenticator.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_mfa_authenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-python/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..abd746c605 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticationFactor + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_mfa_challenge( + factor = AuthenticationFactor.EMAIL +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-python/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..69aaa6091f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_mfa_recovery_codes() diff --git a/docs/examples/1.8.x/server-python/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-python/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..2dc171bb31 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-o-auth2token.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import OAuthProvider + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_o_auth2_token( + provider = OAuthProvider.AMAZON, + success = 'https://example.com', # optional + failure = 'https://example.com', # optional + scopes = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-python/examples/account/create-phone-token.md new file mode 100644 index 0000000000..06c2b20414 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_phone_token( + user_id = '<USER_ID>', + phone = '+12065550100' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-python/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..c130646bee --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_phone_verification() diff --git a/docs/examples/1.8.x/server-python/examples/account/create-recovery.md b/docs/examples/1.8.x/server-python/examples/account/create-recovery.md new file mode 100644 index 0000000000..51c1777245 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_recovery( + email = 'email@example.com', + url = 'https://example.com' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-session.md b/docs/examples/1.8.x/server-python/examples/account/create-session.md new file mode 100644 index 0000000000..1048dfedb2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create_session( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create-verification.md b/docs/examples/1.8.x/server-python/examples/account/create-verification.md new file mode 100644 index 0000000000..d66fc2cd7d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create-verification.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_verification( + url = 'https://example.com' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/create.md b/docs/examples/1.8.x/server-python/examples/account/create.md new file mode 100644 index 0000000000..7eda5a37fe --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/create.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.create( + user_id = '<USER_ID>', + email = 'email@example.com', + password = '', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/delete-identity.md b/docs/examples/1.8.x/server-python/examples/account/delete-identity.md new file mode 100644 index 0000000000..0c894fa693 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_identity( + identity_id = '<IDENTITY_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-python/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..83709c7aff --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_mfa_authenticator( + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.8.x/server-python/examples/account/delete-session.md b/docs/examples/1.8.x/server-python/examples/account/delete-session.md new file mode 100644 index 0000000000..5967d7026a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/delete-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_session( + session_id = '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-python/examples/account/delete-sessions.md new file mode 100644 index 0000000000..5061f84c5d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_sessions() diff --git a/docs/examples/1.8.x/server-python/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-python/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..c8fe494d0f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get_mfa_recovery_codes() diff --git a/docs/examples/1.8.x/server-python/examples/account/get-prefs.md b/docs/examples/1.8.x/server-python/examples/account/get-prefs.md new file mode 100644 index 0000000000..d577b4b274 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get_prefs() diff --git a/docs/examples/1.8.x/server-python/examples/account/get-session.md b/docs/examples/1.8.x/server-python/examples/account/get-session.md new file mode 100644 index 0000000000..3e2937b913 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/get-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get_session( + session_id = '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/get.md b/docs/examples/1.8.x/server-python/examples/account/get.md new file mode 100644 index 0000000000..542622851c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/get.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get() diff --git a/docs/examples/1.8.x/server-python/examples/account/list-identities.md b/docs/examples/1.8.x/server-python/examples/account/list-identities.md new file mode 100644 index 0000000000..aeb23be747 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/list-identities.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_identities( + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/list-logs.md b/docs/examples/1.8.x/server-python/examples/account/list-logs.md new file mode 100644 index 0000000000..67d193d186 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/list-logs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_logs( + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-python/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..72a392465a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_mfa_factors() diff --git a/docs/examples/1.8.x/server-python/examples/account/list-sessions.md b/docs/examples/1.8.x/server-python/examples/account/list-sessions.md new file mode 100644 index 0000000000..c553a7bce2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_sessions() diff --git a/docs/examples/1.8.x/server-python/examples/account/update-email.md b/docs/examples/1.8.x/server-python/examples/account/update-email.md new file mode 100644 index 0000000000..14de4fd41e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-email.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_email( + email = 'email@example.com', + password = 'password' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-python/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..7083d09642 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_mfa( + mfa = False +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-python/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..0146083030 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.update_magic_url_session( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-python/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..d53607fe10 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-mfa-authenticator.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_mfa_authenticator( + type = AuthenticatorType.TOTP, + otp = '<OTP>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-python/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..cfc58c58a2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_mfa_challenge( + challenge_id = '<CHALLENGE_ID>', + otp = '<OTP>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-python/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..51718eb03a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_mfa_recovery_codes() diff --git a/docs/examples/1.8.x/server-python/examples/account/update-name.md b/docs/examples/1.8.x/server-python/examples/account/update-name.md new file mode 100644 index 0000000000..534a94e8bb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-name.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_name( + name = '<NAME>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-password.md b/docs/examples/1.8.x/server-python/examples/account/update-password.md new file mode 100644 index 0000000000..3c072e32d7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-password.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_password( + password = '', + old_password = 'password' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-python/examples/account/update-phone-session.md new file mode 100644 index 0000000000..52e77233a6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-phone-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account(client) + +result = account.update_phone_session( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-python/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..bcc57dee71 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_phone_verification( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-phone.md b/docs/examples/1.8.x/server-python/examples/account/update-phone.md new file mode 100644 index 0000000000..a2cb7d3c83 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-phone.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_phone( + phone = '+12065550100', + password = 'password' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-prefs.md b/docs/examples/1.8.x/server-python/examples/account/update-prefs.md new file mode 100644 index 0000000000..e2ac7a28c1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_prefs( + prefs = {} +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-recovery.md b/docs/examples/1.8.x/server-python/examples/account/update-recovery.md new file mode 100644 index 0000000000..ed140abc0f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_recovery( + user_id = '<USER_ID>', + secret = '<SECRET>', + password = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-session.md b/docs/examples/1.8.x/server-python/examples/account/update-session.md new file mode 100644 index 0000000000..abee773edc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_session( + session_id = '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/account/update-status.md b/docs/examples/1.8.x/server-python/examples/account/update-status.md new file mode 100644 index 0000000000..a5272f09de --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-status.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_status() diff --git a/docs/examples/1.8.x/server-python/examples/account/update-verification.md b/docs/examples/1.8.x/server-python/examples/account/update-verification.md new file mode 100644 index 0000000000..fbc7af5302 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/account/update-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_verification( + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-python/examples/avatars/get-browser.md new file mode 100644 index 0000000000..ff11b8b46f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-browser.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import Browser + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_browser( + code = Browser.AVANT_BROWSER, + width = 0, # optional + height = 0, # optional + quality = -1 # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-python/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..286f4d346c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-credit-card.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import CreditCard + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_credit_card( + code = CreditCard.AMERICAN_EXPRESS, + width = 0, # optional + height = 0, # optional + quality = -1 # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-python/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..f034ea41f3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_favicon( + url = 'https://example.com' +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-python/examples/avatars/get-flag.md new file mode 100644 index 0000000000..6365a78b47 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-flag.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.enums import Flag + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_flag( + code = Flag.AFGHANISTAN, + width = 0, # optional + height = 0, # optional + quality = -1 # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-image.md b/docs/examples/1.8.x/server-python/examples/avatars/get-image.md new file mode 100644 index 0000000000..9272c4d8fb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_image( + url = 'https://example.com', + width = 0, # optional + height = 0 # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-python/examples/avatars/get-initials.md new file mode 100644 index 0000000000..2729ff5133 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_initials( + name = '<NAME>', # optional + width = 0, # optional + height = 0, # optional + background = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-python/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..3fb76a7f7c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.get_qr( + text = '<TEXT>', + size = 1, # optional + margin = 0, # optional + download = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..f12f446d30 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-boolean-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_boolean_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = False, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-collection.md b/docs/examples/1.8.x/server-python/examples/databases/create-collection.md new file mode 100644 index 0000000000..596d4a9383 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-collection.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + document_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..8fd59e694f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-datetime-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_datetime_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-document.md b/docs/examples/1.8.x/server-python/examples/databases/create-document.md new file mode 100644 index 0000000000..1a8500b0f2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-document.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_session('') # The user session to authenticate with +client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +databases = Databases(client) + +result = databases.create_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = {}, + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-documents.md b/docs/examples/1.8.x/server-python/examples/databases/create-documents.md new file mode 100644 index 0000000000..27ad6e8aa8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-documents.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_admin('') # +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + documents = [] +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..230567aa46 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-email-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_email_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = 'email@example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..de1ceb9f1f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-enum-attribute.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_enum_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..53305c8d4e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-float-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_float_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-index.md b/docs/examples/1.8.x/server-python/examples/databases/create-index.md new file mode 100644 index 0000000000..f7bb455d07 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-index.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.enums import IndexType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + type = IndexType.KEY, + attributes = [], + orders = [], # optional + lengths = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..92e8b0f86a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-integer-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_integer_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..a7f424b22c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-ip-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_ip_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..6c8f4dc5bb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-relationship-attribute.md @@ -0,0 +1,21 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases +from appwrite.enums import RelationshipType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_relationship_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + related_collection_id = '<RELATED_COLLECTION_ID>', + type = RelationshipType.ONETOONE, + two_way = False, # optional + key = '', # optional + two_way_key = '', # optional + on_delete = RelationMutate.CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..dc434cccaf --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-string-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_string_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + size = 1, + required = False, + default = '<DEFAULT>', # optional + array = False, # optional + encrypt = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..af375733dd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create-url-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create_url_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = 'https://example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create.md b/docs/examples/1.8.x/server-python/examples/databases/create.md new file mode 100644 index 0000000000..0492203e4c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/create.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.create( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..397bdd4bde --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/decrement-document-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.decrement_document_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + attribute = '', + value = None, # optional + min = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..e1c4eecd01 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-python/examples/databases/delete-collection.md new file mode 100644 index 0000000000..02f1e1c536 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/delete-document.md b/docs/examples/1.8.x/server-python/examples/databases/delete-document.md new file mode 100644 index 0000000000..57f8b3bd9d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.delete_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-python/examples/databases/delete-documents.md new file mode 100644 index 0000000000..a315f0c200 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/delete-documents.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/delete-index.md b/docs/examples/1.8.x/server-python/examples/databases/delete-index.md new file mode 100644 index 0000000000..006006421d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/delete.md b/docs/examples/1.8.x/server-python/examples/databases/delete.md new file mode 100644 index 0000000000..be64e8c628 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.delete( + database_id = '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/get-attribute.md new file mode 100644 index 0000000000..dcdb0a6ea9 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.get_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/get-collection.md b/docs/examples/1.8.x/server-python/examples/databases/get-collection.md new file mode 100644 index 0000000000..0833b4fd7e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.get_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/get-document.md b/docs/examples/1.8.x/server-python/examples/databases/get-document.md new file mode 100644 index 0000000000..aff5008fa0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/get-document.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.get_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/get-index.md b/docs/examples/1.8.x/server-python/examples/databases/get-index.md new file mode 100644 index 0000000000..6971683072 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/get-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.get_index( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/get.md b/docs/examples/1.8.x/server-python/examples/databases/get.md new file mode 100644 index 0000000000..c8191a3777 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.get( + database_id = '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..d5700e0b30 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.increment_document_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + attribute = '', + value = None, # optional + max = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-python/examples/databases/list-attributes.md new file mode 100644 index 0000000000..c97a5ced64 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/list-attributes.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.list_attributes( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/list-collections.md b/docs/examples/1.8.x/server-python/examples/databases/list-collections.md new file mode 100644 index 0000000000..17d0a3d878 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/list-collections.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.list_collections( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/list-documents.md b/docs/examples/1.8.x/server-python/examples/databases/list-documents.md new file mode 100644 index 0000000000..8b450cd020 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.list_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-python/examples/databases/list-indexes.md new file mode 100644 index 0000000000..1457151a4e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/list-indexes.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.list_indexes( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/list.md b/docs/examples/1.8.x/server-python/examples/databases/list.md new file mode 100644 index 0000000000..58336c9f89 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..a0f72a49fb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-boolean-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_boolean_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = False, + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-collection.md b/docs/examples/1.8.x/server-python/examples/databases/update-collection.md new file mode 100644 index 0000000000..2e5be50581 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-collection.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_collection( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + document_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..29bc6be4d1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-datetime-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_datetime_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-document.md b/docs/examples/1.8.x/server-python/examples/databases/update-document.md new file mode 100644 index 0000000000..9ef6527934 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-document.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +databases = Databases(client) + +result = databases.update_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>', + data = {}, # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-documents.md b/docs/examples/1.8.x/server-python/examples/databases/update-documents.md new file mode 100644 index 0000000000..5a50d1a912 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-documents.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + data = {}, # optional + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..c833789a37 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-email-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_email_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = 'email@example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..6186a72a66 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-enum-attribute.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_enum_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..68cb7d7929 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-float-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_float_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..05c6bfe915 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-integer-attribute.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_integer_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..550d3af641 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-ip-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_ip_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..3b6c8e93e9 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-relationship-attribute.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_relationship_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + on_delete = RelationMutate.CASCADE, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..5b66fb015c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-string-attribute.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_string_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = '<DEFAULT>', + size = 1, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-python/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..4a6202760f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update-url-attribute.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update_url_attribute( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + key = '', + required = False, + default = 'https://example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/update.md b/docs/examples/1.8.x/server-python/examples/databases/update.md new file mode 100644 index 0000000000..35d2c0cc40 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/update.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.update( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md new file mode 100644 index 0000000000..8711e442c5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_session('') # The user session to authenticate with +client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +databases = Databases(client) + +result = databases.upsert_document( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>', + document_id = '<DOCUMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..79888c8be3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.databases import Databases + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_admin('') # +client.set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases(client) + +result = databases.upsert_documents( + database_id = '<DATABASE_ID>', + collection_id = '<COLLECTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/create-deployment.md new file mode 100644 index 0000000000..0774005729 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create-deployment.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.input_file import InputFile + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_deployment( + function_id = '<FUNCTION_ID>', + code = InputFile.from_path('file.png'), + activate = False, + entrypoint = '<ENTRYPOINT>', # optional + commands = '<COMMANDS>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..79315e4a1c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_duplicate_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>', + build_id = '<BUILD_ID>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-execution.md b/docs/examples/1.8.x/server-python/examples/functions/create-execution.md new file mode 100644 index 0000000000..b41c7e376c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create-execution.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +functions = Functions(client) + +result = functions.create_execution( + function_id = '<FUNCTION_ID>', + body = '<BODY>', # optional + async = False, # optional + path = '<PATH>', # optional + method = ExecutionMethod.GET, # optional + headers = {}, # optional + scheduled_at = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..6083cc1cb3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create-template-deployment.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_template_deployment( + function_id = '<FUNCTION_ID>', + repository = '<REPOSITORY>', + owner = '<OWNER>', + root_directory = '<ROOT_DIRECTORY>', + version = '<VERSION>', + activate = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-variable.md b/docs/examples/1.8.x/server-python/examples/functions/create-variable.md new file mode 100644 index 0000000000..2089830eff --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create-variable.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_variable( + function_id = '<FUNCTION_ID>', + key = '<KEY>', + value = '<VALUE>', + secret = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..4004baec27 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create-vcs-deployment.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.enums import VCSDeploymentType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create_vcs_deployment( + function_id = '<FUNCTION_ID>', + type = VCSDeploymentType.BRANCH, + reference = '<REFERENCE>', + activate = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create.md b/docs/examples/1.8.x/server-python/examples/functions/create.md new file mode 100644 index 0000000000..8758e27e50 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/create.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions +from appwrite.enums import + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.create( + function_id = '<FUNCTION_ID>', + name = '<NAME>', + runtime = .NODE_14_5, + execute = ["any"], # optional + events = [], # optional + schedule = '', # optional + timeout = 1, # optional + enabled = False, # optional + logging = False, # optional + entrypoint = '<ENTRYPOINT>', # optional + commands = '<COMMANDS>', # optional + scopes = [], # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + specification = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..f874b2d270 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.delete_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-python/examples/functions/delete-execution.md new file mode 100644 index 0000000000..df7ce7cb5b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/delete-execution.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.delete_execution( + function_id = '<FUNCTION_ID>', + execution_id = '<EXECUTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-python/examples/functions/delete-variable.md new file mode 100644 index 0000000000..a6e3dc853c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.delete_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/delete.md b/docs/examples/1.8.x/server-python/examples/functions/delete.md new file mode 100644 index 0000000000..ed2fef76c7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.delete( + function_id = '<FUNCTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-python/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..1b0673c468 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/get-deployment-download.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.get_deployment_download( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>', + type = DeploymentDownloadType.SOURCE # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/get-deployment.md new file mode 100644 index 0000000000..59a1374e0f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.get_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/get-execution.md b/docs/examples/1.8.x/server-python/examples/functions/get-execution.md new file mode 100644 index 0000000000..a299f35195 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +functions = Functions(client) + +result = functions.get_execution( + function_id = '<FUNCTION_ID>', + execution_id = '<EXECUTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/get-variable.md b/docs/examples/1.8.x/server-python/examples/functions/get-variable.md new file mode 100644 index 0000000000..629948e909 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.get_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/get.md b/docs/examples/1.8.x/server-python/examples/functions/get.md new file mode 100644 index 0000000000..eeab5a556b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.get( + function_id = '<FUNCTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-python/examples/functions/list-deployments.md new file mode 100644 index 0000000000..4eb92f60df --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/list-deployments.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list_deployments( + function_id = '<FUNCTION_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/list-executions.md b/docs/examples/1.8.x/server-python/examples/functions/list-executions.md new file mode 100644 index 0000000000..300fc0e51d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +functions = Functions(client) + +result = functions.list_executions( + function_id = '<FUNCTION_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-python/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..9c89a36f0c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/list-runtimes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list_runtimes() diff --git a/docs/examples/1.8.x/server-python/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-python/examples/functions/list-specifications.md new file mode 100644 index 0000000000..d7d0036d35 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/list-specifications.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list_specifications() diff --git a/docs/examples/1.8.x/server-python/examples/functions/list-variables.md b/docs/examples/1.8.x/server-python/examples/functions/list-variables.md new file mode 100644 index 0000000000..ebc19c5ba4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list_variables( + function_id = '<FUNCTION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/list.md b/docs/examples/1.8.x/server-python/examples/functions/list.md new file mode 100644 index 0000000000..b1d696d25a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-python/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..6c6a8bf121 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/update-deployment-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.update_deployment_status( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-python/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..da14309177 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/update-function-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.update_function_deployment( + function_id = '<FUNCTION_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/update-variable.md b/docs/examples/1.8.x/server-python/examples/functions/update-variable.md new file mode 100644 index 0000000000..f8bcc0376c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/update-variable.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.update_variable( + function_id = '<FUNCTION_ID>', + variable_id = '<VARIABLE_ID>', + key = '<KEY>', + value = '<VALUE>', # optional + secret = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/functions/update.md b/docs/examples/1.8.x/server-python/examples/functions/update.md new file mode 100644 index 0000000000..64ee39b29d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/functions/update.md @@ -0,0 +1,30 @@ +from appwrite.client import Client +from appwrite.services.functions import Functions + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions(client) + +result = functions.update( + function_id = '<FUNCTION_ID>', + name = '<NAME>', + runtime = .NODE_14_5, # optional + execute = ["any"], # optional + events = [], # optional + schedule = '', # optional + timeout = 1, # optional + enabled = False, # optional + logging = False, # optional + entrypoint = '<ENTRYPOINT>', # optional + commands = '<COMMANDS>', # optional + scopes = [], # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + specification = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/graphql/mutation.md b/docs/examples/1.8.x/server-python/examples/graphql/mutation.md new file mode 100644 index 0000000000..189892a4ad --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.graphql import Graphql + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +graphql = Graphql(client) + +result = graphql.mutation( + query = {} +) diff --git a/docs/examples/1.8.x/server-python/examples/graphql/query.md b/docs/examples/1.8.x/server-python/examples/graphql/query.md new file mode 100644 index 0000000000..585a5029b5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/graphql/query.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.graphql import Graphql + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +graphql = Graphql(client) + +result = graphql.query( + query = {} +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-python/examples/health/get-antivirus.md new file mode 100644 index 0000000000..2b621472ee --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-antivirus.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_antivirus() diff --git a/docs/examples/1.8.x/server-python/examples/health/get-cache.md b/docs/examples/1.8.x/server-python/examples/health/get-cache.md new file mode 100644 index 0000000000..595c4bf0a5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-cache.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_cache() diff --git a/docs/examples/1.8.x/server-python/examples/health/get-certificate.md b/docs/examples/1.8.x/server-python/examples/health/get-certificate.md new file mode 100644 index 0000000000..5b3e2c0ad3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-certificate.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_certificate( + domain = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-d-b.md b/docs/examples/1.8.x/server-python/examples/health/get-d-b.md new file mode 100644 index 0000000000..47c7bd8efb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-d-b.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_db() diff --git a/docs/examples/1.8.x/server-python/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-python/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..5362a2d02a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-failed-jobs.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.health import Health +from appwrite.enums import + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_failed_jobs( + name = .V1_DATABASE, + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-python/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..e5115d06b8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-pub-sub.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_pub_sub() diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..18ed8e3023 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-builds.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_builds( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..b0a29e2d5b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_certificates( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..491d1f7c35 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-databases.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_databases( + name = '<NAME>', # optional + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..fa860c6111 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-deletes.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_deletes( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..d4ca9388d9 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_functions( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..1479f03634 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-logs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_logs( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..6835efeaa4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-mails.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_mails( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..34cbad2f31 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-messaging.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_messaging( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..019db4e811 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-migrations.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_migrations( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..92aebc3c91 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-stats-resources.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_stats_resources( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..266ca828b1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-usage.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_usage( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-python/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..df5e2d56db --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_queue_webhooks( + threshold = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-python/examples/health/get-storage-local.md new file mode 100644 index 0000000000..7d2ea44f45 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-storage-local.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_storage_local() diff --git a/docs/examples/1.8.x/server-python/examples/health/get-storage.md b/docs/examples/1.8.x/server-python/examples/health/get-storage.md new file mode 100644 index 0000000000..821d9f3986 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-storage.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_storage() diff --git a/docs/examples/1.8.x/server-python/examples/health/get-time.md b/docs/examples/1.8.x/server-python/examples/health/get-time.md new file mode 100644 index 0000000000..907e96499b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get-time.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get_time() diff --git a/docs/examples/1.8.x/server-python/examples/health/get.md b/docs/examples/1.8.x/server-python/examples/health/get.md new file mode 100644 index 0000000000..c544fcc9b6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/health/get.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health(client) + +result = health.get() diff --git a/docs/examples/1.8.x/server-python/examples/locale/get.md b/docs/examples/1.8.x/server-python/examples/locale/get.md new file mode 100644 index 0000000000..6f2a877b0c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/get.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.get() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-codes.md b/docs/examples/1.8.x/server-python/examples/locale/list-codes.md new file mode 100644 index 0000000000..5f3e501fe1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_codes() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-continents.md b/docs/examples/1.8.x/server-python/examples/locale/list-continents.md new file mode 100644 index 0000000000..0aead81734 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_continents() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-python/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..f88e331f43 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_countries_eu() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-python/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..b1fdc1ae51 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_countries_phones() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-countries.md b/docs/examples/1.8.x/server-python/examples/locale/list-countries.md new file mode 100644 index 0000000000..0c5b23cdd1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_countries() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-python/examples/locale/list-currencies.md new file mode 100644 index 0000000000..20009d6569 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_currencies() diff --git a/docs/examples/1.8.x/server-python/examples/locale/list-languages.md b/docs/examples/1.8.x/server-python/examples/locale/list-languages.md new file mode 100644 index 0000000000..1962a8399e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.locale import Locale + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +locale = Locale(client) + +result = locale.list_languages() diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..b57fa00f23 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-apns-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_apns_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + auth_key = '<AUTH_KEY>', # optional + auth_key_id = '<AUTH_KEY_ID>', # optional + team_id = '<TEAM_ID>', # optional + bundle_id = '<BUNDLE_ID>', # optional + sandbox = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-email.md b/docs/examples/1.8.x/server-python/examples/messaging/create-email.md new file mode 100644 index 0000000000..8b4c9d267e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-email.md @@ -0,0 +1,24 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_email( + message_id = '<MESSAGE_ID>', + subject = '<SUBJECT>', + content = '<CONTENT>', + topics = [], # optional + users = [], # optional + targets = [], # optional + cc = [], # optional + bcc = [], # optional + attachments = [], # optional + draft = False, # optional + html = False, # optional + scheduled_at = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..9c40eb7828 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-fcm-provider.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_fcm_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + service_account_json = {}, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..6703f6fdcc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,22 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_mailgun_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + api_key = '<API_KEY>', # optional + domain = '<DOMAIN>', # optional + is_eu_region = False, # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..9315dcdd30 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-msg91provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_msg91_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + template_id = '<TEMPLATE_ID>', # optional + sender_id = '<SENDER_ID>', # optional + auth_key = '<AUTH_KEY>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-push.md b/docs/examples/1.8.x/server-python/examples/messaging/create-push.md new file mode 100644 index 0000000000..8671b56a39 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-push.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_push( + message_id = '<MESSAGE_ID>', + title = '<TITLE>', # optional + body = '<BODY>', # optional + topics = [], # optional + users = [], # optional + targets = [], # optional + data = {}, # optional + action = '<ACTION>', # optional + image = '[ID1:ID2]', # optional + icon = '<ICON>', # optional + sound = '<SOUND>', # optional + color = '<COLOR>', # optional + tag = '<TAG>', # optional + badge = None, # optional + draft = False, # optional + scheduled_at = '', # optional + content_available = False, # optional + critical = False, # optional + priority = MessagePriority.NORMAL # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..46ff54f166 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_sendgrid_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-python/examples/messaging/create-sms.md new file mode 100644 index 0000000000..d1c7b495b2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-sms.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_sms( + message_id = '<MESSAGE_ID>', + content = '<CONTENT>', + topics = [], # optional + users = [], # optional + targets = [], # optional + draft = False, # optional + scheduled_at = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..99914f0779 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-smtp-provider.md @@ -0,0 +1,26 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_smtp_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + host = '<HOST>', + port = 1, # optional + username = '<USERNAME>', # optional + password = '<PASSWORD>', # optional + encryption = SmtpEncryption.NONE, # optional + auto_tls = False, # optional + mailer = '<MAILER>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = 'email@example.com', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-python/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..bc0c892b48 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging(client) + +result = messaging.create_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>', + target_id = '<TARGET_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..aff09fe852 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-telesign-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_telesign_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + customer_id = '<CUSTOMER_ID>', # optional + api_key = '<API_KEY>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..46ded71cdd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_textmagic_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + username = '<USERNAME>', # optional + api_key = '<API_KEY>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-python/examples/messaging/create-topic.md new file mode 100644 index 0000000000..c1cb465e9b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-topic.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_topic( + topic_id = '<TOPIC_ID>', + name = '<NAME>', + subscribe = ["any"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..4438563abf --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-twilio-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_twilio_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + account_sid = '<ACCOUNT_SID>', # optional + auth_token = '<AUTH_TOKEN>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..6ffded5b53 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/create-vonage-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.create_vonage_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', + from = '+12065550100', # optional + api_key = '<API_KEY>', # optional + api_secret = '<API_SECRET>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..649e504c19 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/delete-provider.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.delete_provider( + provider_id = '<PROVIDER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-python/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..c012a9ac97 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging(client) + +result = messaging.delete_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-python/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..76f9093a5f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/delete-topic.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.delete_topic( + topic_id = '<TOPIC_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/delete.md b/docs/examples/1.8.x/server-python/examples/messaging/delete.md new file mode 100644 index 0000000000..0153ac90cb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.delete( + message_id = '<MESSAGE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/get-message.md b/docs/examples/1.8.x/server-python/examples/messaging/get-message.md new file mode 100644 index 0000000000..3fadcff7d3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/get-message.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.get_message( + message_id = '<MESSAGE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/get-provider.md new file mode 100644 index 0000000000..58e6228053 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/get-provider.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.get_provider( + provider_id = '<PROVIDER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-python/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..ca997f21f0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/get-subscriber.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.get_subscriber( + topic_id = '<TOPIC_ID>', + subscriber_id = '<SUBSCRIBER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-python/examples/messaging/get-topic.md new file mode 100644 index 0000000000..c238a98afe --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/get-topic.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.get_topic( + topic_id = '<TOPIC_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-python/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..f28c3e506f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-message-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_message_logs( + message_id = '<MESSAGE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-python/examples/messaging/list-messages.md new file mode 100644 index 0000000000..211649d5fb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-messages.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_messages( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-python/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..da87e5939b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-provider-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_provider_logs( + provider_id = '<PROVIDER_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-python/examples/messaging/list-providers.md new file mode 100644 index 0000000000..03e5c4ebbc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-providers.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_providers( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-python/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..df8ec72911 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_subscriber_logs( + subscriber_id = '<SUBSCRIBER_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-python/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..f949b408e5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-subscribers.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_subscribers( + topic_id = '<TOPIC_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-python/examples/messaging/list-targets.md new file mode 100644 index 0000000000..786ee42b19 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-targets.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_targets( + message_id = '<MESSAGE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-python/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..f8a3995295 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-topic-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_topic_logs( + topic_id = '<TOPIC_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-python/examples/messaging/list-topics.md new file mode 100644 index 0000000000..1c2cefc9cd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/list-topics.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.list_topics( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..f695b61b8c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-apns-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_apns_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + auth_key = '<AUTH_KEY>', # optional + auth_key_id = '<AUTH_KEY_ID>', # optional + team_id = '<TEAM_ID>', # optional + bundle_id = '<BUNDLE_ID>', # optional + sandbox = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-email.md b/docs/examples/1.8.x/server-python/examples/messaging/update-email.md new file mode 100644 index 0000000000..5731d5f29a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-email.md @@ -0,0 +1,24 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_email( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + subject = '<SUBJECT>', # optional + content = '<CONTENT>', # optional + draft = False, # optional + html = False, # optional + cc = [], # optional + bcc = [], # optional + scheduled_at = '', # optional + attachments = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..0119d71b4f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-fcm-provider.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_fcm_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + service_account_json = {} # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..039475ffdc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,22 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_mailgun_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + api_key = '<API_KEY>', # optional + domain = '<DOMAIN>', # optional + is_eu_region = False, # optional + enabled = False, # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..c5bd057912 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-msg91provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_msg91_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + template_id = '<TEMPLATE_ID>', # optional + sender_id = '<SENDER_ID>', # optional + auth_key = '<AUTH_KEY>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-push.md b/docs/examples/1.8.x/server-python/examples/messaging/update-push.md new file mode 100644 index 0000000000..e3bb02e71f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-push.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_push( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + title = '<TITLE>', # optional + body = '<BODY>', # optional + data = {}, # optional + action = '<ACTION>', # optional + image = '[ID1:ID2]', # optional + icon = '<ICON>', # optional + sound = '<SOUND>', # optional + color = '<COLOR>', # optional + tag = '<TAG>', # optional + badge = None, # optional + draft = False, # optional + scheduled_at = '', # optional + content_available = False, # optional + critical = False, # optional + priority = MessagePriority.NORMAL # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..fc0a44d6cd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_sendgrid_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + api_key = '<API_KEY>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-python/examples/messaging/update-sms.md new file mode 100644 index 0000000000..2eec4e215b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-sms.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_sms( + message_id = '<MESSAGE_ID>', + topics = [], # optional + users = [], # optional + targets = [], # optional + content = '<CONTENT>', # optional + draft = False, # optional + scheduled_at = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..80019aad40 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-smtp-provider.md @@ -0,0 +1,26 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_smtp_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + host = '<HOST>', # optional + port = 1, # optional + username = '<USERNAME>', # optional + password = '<PASSWORD>', # optional + encryption = SmtpEncryption.NONE, # optional + auto_tls = False, # optional + mailer = '<MAILER>', # optional + from_name = '<FROM_NAME>', # optional + from_email = 'email@example.com', # optional + reply_to_name = '<REPLY_TO_NAME>', # optional + reply_to_email = '<REPLY_TO_EMAIL>', # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..193a26f830 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-telesign-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_telesign_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + customer_id = '<CUSTOMER_ID>', # optional + api_key = '<API_KEY>', # optional + from = '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..159f95490e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_textmagic_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + username = '<USERNAME>', # optional + api_key = '<API_KEY>', # optional + from = '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-python/examples/messaging/update-topic.md new file mode 100644 index 0000000000..721f160642 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-topic.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_topic( + topic_id = '<TOPIC_ID>', + name = '<NAME>', # optional + subscribe = ["any"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..b80c55b300 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-twilio-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_twilio_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + account_sid = '<ACCOUNT_SID>', # optional + auth_token = '<AUTH_TOKEN>', # optional + from = '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-python/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..b25f416cef --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/messaging/update-vonage-provider.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.messaging import Messaging + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging(client) + +result = messaging.update_vonage_provider( + provider_id = '<PROVIDER_ID>', + name = '<NAME>', # optional + enabled = False, # optional + api_key = '<API_KEY>', # optional + api_secret = '<API_SECRET>', # optional + from = '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/create-deployment.md new file mode 100644 index 0000000000..de6472c4b0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/create-deployment.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.input_file import InputFile + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_deployment( + site_id = '<SITE_ID>', + code = InputFile.from_path('file.png'), + activate = False, + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..d79ab9d3d1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_duplicate_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..ac05f9e663 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/create-template-deployment.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_template_deployment( + site_id = '<SITE_ID>', + repository = '<REPOSITORY>', + owner = '<OWNER>', + root_directory = '<ROOT_DIRECTORY>', + version = '<VERSION>', + activate = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/create-variable.md b/docs/examples/1.8.x/server-python/examples/sites/create-variable.md new file mode 100644 index 0000000000..739beff61f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/create-variable.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_variable( + site_id = '<SITE_ID>', + key = '<KEY>', + value = '<VALUE>', + secret = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..089e6c8141 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/create-vcs-deployment.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import VCSDeploymentType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create_vcs_deployment( + site_id = '<SITE_ID>', + type = VCSDeploymentType.BRANCH, + reference = '<REFERENCE>', + activate = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/create.md b/docs/examples/1.8.x/server-python/examples/sites/create.md new file mode 100644 index 0000000000..4950cd2116 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/create.md @@ -0,0 +1,32 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import +from appwrite.enums import + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.create( + site_id = '<SITE_ID>', + name = '<NAME>', + framework = .ANALOG, + build_runtime = .NODE_14_5, + enabled = False, # optional + logging = False, # optional + timeout = 1, # optional + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>', # optional + adapter = .STATIC, # optional + installation_id = '<INSTALLATION_ID>', # optional + fallback_file = '<FALLBACK_FILE>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + specification = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..029730ae3f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/delete-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.delete_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/delete-log.md b/docs/examples/1.8.x/server-python/examples/sites/delete-log.md new file mode 100644 index 0000000000..0b516e6840 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/delete-log.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.delete_log( + site_id = '<SITE_ID>', + log_id = '<LOG_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-python/examples/sites/delete-variable.md new file mode 100644 index 0000000000..c078813b4a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/delete-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.delete_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/delete.md b/docs/examples/1.8.x/server-python/examples/sites/delete.md new file mode 100644 index 0000000000..60670e63e0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.delete( + site_id = '<SITE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-python/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..d6af564217 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/get-deployment-download.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get_deployment_download( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>', + type = DeploymentDownloadType.SOURCE # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/get-deployment.md new file mode 100644 index 0000000000..c4ee1de904 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/get-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/get-log.md b/docs/examples/1.8.x/server-python/examples/sites/get-log.md new file mode 100644 index 0000000000..ae5d8ac2df --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/get-log.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get_log( + site_id = '<SITE_ID>', + log_id = '<LOG_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/get-variable.md b/docs/examples/1.8.x/server-python/examples/sites/get-variable.md new file mode 100644 index 0000000000..7f5f0f6480 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/get-variable.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/get.md b/docs/examples/1.8.x/server-python/examples/sites/get.md new file mode 100644 index 0000000000..f9532a0e1a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.get( + site_id = '<SITE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-python/examples/sites/list-deployments.md new file mode 100644 index 0000000000..15ec24d232 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/list-deployments.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_deployments( + site_id = '<SITE_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-python/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..6e3764695e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/list-frameworks.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_frameworks() diff --git a/docs/examples/1.8.x/server-python/examples/sites/list-logs.md b/docs/examples/1.8.x/server-python/examples/sites/list-logs.md new file mode 100644 index 0000000000..d3a9a193c1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/list-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_logs( + site_id = '<SITE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-python/examples/sites/list-specifications.md new file mode 100644 index 0000000000..93b713c4b6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/list-specifications.md @@ -0,0 +1,11 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_specifications() diff --git a/docs/examples/1.8.x/server-python/examples/sites/list-variables.md b/docs/examples/1.8.x/server-python/examples/sites/list-variables.md new file mode 100644 index 0000000000..5ff78e6a1a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/list-variables.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list_variables( + site_id = '<SITE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/list.md b/docs/examples/1.8.x/server-python/examples/sites/list.md new file mode 100644 index 0000000000..1b344e1d0f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-python/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..492ee4f747 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/update-deployment-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.update_deployment_status( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-python/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..69014bbbcd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/update-site-deployment.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.update_site_deployment( + site_id = '<SITE_ID>', + deployment_id = '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/update-variable.md b/docs/examples/1.8.x/server-python/examples/sites/update-variable.md new file mode 100644 index 0000000000..973f7f2e65 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/update-variable.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.update_variable( + site_id = '<SITE_ID>', + variable_id = '<VARIABLE_ID>', + key = '<KEY>', + value = '<VALUE>', # optional + secret = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/sites/update.md b/docs/examples/1.8.x/server-python/examples/sites/update.md new file mode 100644 index 0000000000..7d2d2865a4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/sites/update.md @@ -0,0 +1,31 @@ +from appwrite.client import Client +from appwrite.services.sites import Sites +from appwrite.enums import + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites(client) + +result = sites.update( + site_id = '<SITE_ID>', + name = '<NAME>', + framework = .ANALOG, + enabled = False, # optional + logging = False, # optional + timeout = 1, # optional + install_command = '<INSTALL_COMMAND>', # optional + build_command = '<BUILD_COMMAND>', # optional + output_directory = '<OUTPUT_DIRECTORY>', # optional + build_runtime = .NODE_14_5, # optional + adapter = .STATIC, # optional + fallback_file = '<FALLBACK_FILE>', # optional + installation_id = '<INSTALLATION_ID>', # optional + provider_repository_id = '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch = '<PROVIDER_BRANCH>', # optional + provider_silent_mode = False, # optional + provider_root_directory = '<PROVIDER_ROOT_DIRECTORY>', # optional + specification = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-python/examples/storage/create-bucket.md new file mode 100644 index 0000000000..9672782b5c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/create-bucket.md @@ -0,0 +1,22 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.create_bucket( + bucket_id = '<BUCKET_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + file_security = False, # optional + enabled = False, # optional + maximum_file_size = 1, # optional + allowed_file_extensions = [], # optional + compression = .NONE, # optional + encryption = False, # optional + antivirus = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/create-file.md b/docs/examples/1.8.x/server-python/examples/storage/create-file.md new file mode 100644 index 0000000000..6e57284b85 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/create-file.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage +from appwrite.input_file import InputFile + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.create_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + file = InputFile.from_path('file.png'), + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-python/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..dd8e8ebc43 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.delete_bucket( + bucket_id = '<BUCKET_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/delete-file.md b/docs/examples/1.8.x/server-python/examples/storage/delete-file.md new file mode 100644 index 0000000000..17bc251e50 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.delete_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-python/examples/storage/get-bucket.md new file mode 100644 index 0000000000..e5eeb4c097 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.get_bucket( + bucket_id = '<BUCKET_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-python/examples/storage/get-file-download.md new file mode 100644 index 0000000000..411abf8c79 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.get_file_download( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + token = '<TOKEN>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-python/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..47e3f23b55 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/get-file-preview.md @@ -0,0 +1,26 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.get_file_preview( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + width = 0, # optional + height = 0, # optional + gravity = ImageGravity.CENTER, # optional + quality = -1, # optional + border_width = 0, # optional + border_color = '', # optional + border_radius = 0, # optional + opacity = 0, # optional + rotation = -360, # optional + background = '', # optional + output = ImageFormat.JPG, # optional + token = '<TOKEN>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-python/examples/storage/get-file-view.md new file mode 100644 index 0000000000..85cbad7902 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.get_file_view( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + token = '<TOKEN>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/get-file.md b/docs/examples/1.8.x/server-python/examples/storage/get-file.md new file mode 100644 index 0000000000..461543e3fd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/get-file.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.get_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-python/examples/storage/list-buckets.md new file mode 100644 index 0000000000..51a1ae6836 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.list_buckets( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/list-files.md b/docs/examples/1.8.x/server-python/examples/storage/list-files.md new file mode 100644 index 0000000000..4034bd477d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/list-files.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.list_files( + bucket_id = '<BUCKET_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-python/examples/storage/update-bucket.md new file mode 100644 index 0000000000..f2e741a5aa --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/update-bucket.md @@ -0,0 +1,22 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage(client) + +result = storage.update_bucket( + bucket_id = '<BUCKET_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + file_security = False, # optional + enabled = False, # optional + maximum_file_size = 1, # optional + allowed_file_extensions = [], # optional + compression = .NONE, # optional + encryption = False, # optional + antivirus = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/storage/update-file.md b/docs/examples/1.8.x/server-python/examples/storage/update-file.md new file mode 100644 index 0000000000..cf1e5779bb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/storage/update-file.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.storage import Storage + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +storage = Storage(client) + +result = storage.update_file( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + name = '<NAME>', # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..cfbaa3b0ee --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = False, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..a9f76b5e5f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md new file mode 100644 index 0000000000..73ac0faad6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'email@example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..2013c39fa0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md new file mode 100644 index 0000000000..a56a196093 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-index.md b/docs/examples/1.8.x/server-python/examples/tables/create-index.md new file mode 100644 index 0000000000..4015affc61 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-index.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables +from appwrite.enums import + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + type = .KEY, + columns = [], + orders = [], # optional + lengths = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..d52b14bc5c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..b5c7ef56db --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..9f20be2203 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md @@ -0,0 +1,21 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables +from appwrite.enums import + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + related_table_id = '<RELATED_TABLE_ID>', + type = .ONETOONE, + two_way = False, # optional + key = '', # optional + two_way_key = '', # optional + on_delete = .CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-row.md b/docs/examples/1.8.x/server-python/examples/tables/create-row.md new file mode 100644 index 0000000000..8850a974b8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-row.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_session('') # The user session to authenticate with +client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +tables = Tables(client) + +result = tables.create_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-rows.md b/docs/examples/1.8.x/server-python/examples/tables/create-rows.md new file mode 100644 index 0000000000..3fae165081 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_admin('') # +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [] +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md new file mode 100644 index 0000000000..1308fea2ad --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + size = 1, + required = False, + default = '<DEFAULT>', # optional + array = False, # optional + encrypt = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md new file mode 100644 index 0000000000..f15c3e0574 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'https://example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create.md b/docs/examples/1.8.x/server-python/examples/tables/create.md new file mode 100644 index 0000000000..3a02843c4d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + row_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..bf027d6e76 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.decrement_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '', + value = None, # optional + min = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-column.md b/docs/examples/1.8.x/server-python/examples/tables/delete-column.md new file mode 100644 index 0000000000..cf2dd6d5e5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete-column.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.delete_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-index.md b/docs/examples/1.8.x/server-python/examples/tables/delete-index.md new file mode 100644 index 0000000000..5f78d1ce1d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.delete_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-row.md b/docs/examples/1.8.x/server-python/examples/tables/delete-row.md new file mode 100644 index 0000000000..40a8b09fcf --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables = Tables(client) + +result = tables.delete_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md new file mode 100644 index 0000000000..236aea1c9b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.delete_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete.md b/docs/examples/1.8.x/server-python/examples/tables/delete.md new file mode 100644 index 0000000000..de48bfc2b5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.delete( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-column.md b/docs/examples/1.8.x/server-python/examples/tables/get-column.md new file mode 100644 index 0000000000..4bd4617142 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/get-column.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.get_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-index.md b/docs/examples/1.8.x/server-python/examples/tables/get-index.md new file mode 100644 index 0000000000..cf88017fbe --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/get-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.get_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-row.md b/docs/examples/1.8.x/server-python/examples/tables/get-row.md new file mode 100644 index 0000000000..25fefb23fd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/get-row.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables = Tables(client) + +result = tables.get_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get.md b/docs/examples/1.8.x/server-python/examples/tables/get.md new file mode 100644 index 0000000000..789410cfb7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.get( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..cfb923029e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.increment_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '', + value = None, # optional + max = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-columns.md b/docs/examples/1.8.x/server-python/examples/tables/list-columns.md new file mode 100644 index 0000000000..d9c5b16468 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/list-columns.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.list_columns( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md new file mode 100644 index 0000000000..0b0bb585e7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.list_indexes( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-rows.md b/docs/examples/1.8.x/server-python/examples/tables/list-rows.md new file mode 100644 index 0000000000..2ece6f6cf7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables = Tables(client) + +result = tables.list_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list.md b/docs/examples/1.8.x/server-python/examples/tables/list.md new file mode 100644 index 0000000000..55a99e996d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/list.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.list( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..1bc7a4afac --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = False, + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..157ff44a7b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md new file mode 100644 index 0000000000..8b9e4cad36 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'email@example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..b46971beac --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md new file mode 100644 index 0000000000..243a26f0aa --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..99b55c17a7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..2fb470ae6e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..b237e67647 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + on_delete = .CASCADE, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-row.md b/docs/examples/1.8.x/server-python/examples/tables/update-row.md new file mode 100644 index 0000000000..4a71fc97f2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-row.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables = Tables(client) + +result = tables.update_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-rows.md b/docs/examples/1.8.x/server-python/examples/tables/update-rows.md new file mode 100644 index 0000000000..a834346678 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-rows.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + data = {}, # optional + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md new file mode 100644 index 0000000000..252c26433e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '<DEFAULT>', + size = 1, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md new file mode 100644 index 0000000000..235e2f3bc4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'https://example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update.md b/docs/examples/1.8.x/server-python/examples/tables/update.md new file mode 100644 index 0000000000..c567bd5500 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + row_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md new file mode 100644 index 0000000000..e418708bc3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_session('') # The user session to authenticate with +client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +tables = Tables(client) + +result = tables.upsert_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..85c2e94d69 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_admin('') # +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.upsert_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/create-membership.md b/docs/examples/1.8.x/server-python/examples/teams/create-membership.md new file mode 100644 index 0000000000..cb3bf73195 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.create_membership( + team_id = '<TEAM_ID>', + roles = [], + email = 'email@example.com', # optional + user_id = '<USER_ID>', # optional + phone = '+12065550100', # optional + url = 'https://example.com', # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/create.md b/docs/examples/1.8.x/server-python/examples/teams/create.md new file mode 100644 index 0000000000..f623151b27 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/create.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.create( + team_id = '<TEAM_ID>', + name = '<NAME>', + roles = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-python/examples/teams/delete-membership.md new file mode 100644 index 0000000000..6fb218266f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.delete_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/delete.md b/docs/examples/1.8.x/server-python/examples/teams/delete.md new file mode 100644 index 0000000000..056114bfad --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.delete( + team_id = '<TEAM_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/get-membership.md b/docs/examples/1.8.x/server-python/examples/teams/get-membership.md new file mode 100644 index 0000000000..3c028a5c7e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.get_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-python/examples/teams/get-prefs.md new file mode 100644 index 0000000000..8d645897c6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.get_prefs( + team_id = '<TEAM_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/get.md b/docs/examples/1.8.x/server-python/examples/teams/get.md new file mode 100644 index 0000000000..55f172eadd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.get( + team_id = '<TEAM_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-python/examples/teams/list-memberships.md new file mode 100644 index 0000000000..6e6f15a284 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.list_memberships( + team_id = '<TEAM_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/list.md b/docs/examples/1.8.x/server-python/examples/teams/list.md new file mode 100644 index 0000000000..bf91a50744 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-python/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9c08421579 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.update_membership_status( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>', + user_id = '<USER_ID>', + secret = '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/update-membership.md b/docs/examples/1.8.x/server-python/examples/teams/update-membership.md new file mode 100644 index 0000000000..db20c5aaae --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.update_membership( + team_id = '<TEAM_ID>', + membership_id = '<MEMBERSHIP_ID>', + roles = [] +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/update-name.md b/docs/examples/1.8.x/server-python/examples/teams/update-name.md new file mode 100644 index 0000000000..160b496932 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/update-name.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.update_name( + team_id = '<TEAM_ID>', + name = '<NAME>' +) diff --git a/docs/examples/1.8.x/server-python/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-python/examples/teams/update-prefs.md new file mode 100644 index 0000000000..e82da1b64f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.update_prefs( + team_id = '<TEAM_ID>', + prefs = {} +) diff --git a/docs/examples/1.8.x/server-python/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-python/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..f835a0ea8d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens(client) + +result = tokens.create_file_token( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + expire = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tokens/delete.md b/docs/examples/1.8.x/server-python/examples/tokens/delete.md new file mode 100644 index 0000000000..47619321ff --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tokens/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens(client) + +result = tokens.delete( + token_id = '<TOKEN_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tokens/get.md b/docs/examples/1.8.x/server-python/examples/tokens/get.md new file mode 100644 index 0000000000..0d6abb81d7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tokens/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens(client) + +result = tokens.get( + token_id = '<TOKEN_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tokens/list.md b/docs/examples/1.8.x/server-python/examples/tokens/list.md new file mode 100644 index 0000000000..2694650ed3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tokens/list.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens(client) + +result = tokens.list( + bucket_id = '<BUCKET_ID>', + file_id = '<FILE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tokens/update.md b/docs/examples/1.8.x/server-python/examples/tokens/update.md new file mode 100644 index 0000000000..18b04445cc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tokens/update.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tokens import Tokens + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens(client) + +result = tokens.update( + token_id = '<TOKEN_ID>', + expire = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-python/examples/users/create-argon2user.md new file mode 100644 index 0000000000..5e95cc26ac --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-argon2user.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_argon2_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-python/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..d3d9e21586 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-bcrypt-user.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_bcrypt_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-python/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..bed6c483e0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-j-w-t.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_jwt( + user_id = '<USER_ID>', + session_id = '<SESSION_ID>', # optional + duration = 0 # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-python/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..b1cbb53f23 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-m-d5user.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_md5_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-python/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..64a87c05ff --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_mfa_recovery_codes( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-python/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..33f65f44d9 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-p-h-pass-user.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_ph_pass_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-python/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..5b4c8f831a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-s-h-a-user.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_sha_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_version = PasswordHash.SHA1, # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-python/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..9d644ce4ca --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_scrypt_modified_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_salt = '<PASSWORD_SALT>', + password_salt_separator = '<PASSWORD_SALT_SEPARATOR>', + password_signer_key = '<PASSWORD_SIGNER_KEY>', + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-python/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..f442ab9d3e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-scrypt-user.md @@ -0,0 +1,21 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_scrypt_user( + user_id = '<USER_ID>', + email = 'email@example.com', + password = 'password', + password_salt = '<PASSWORD_SALT>', + password_cpu = None, + password_memory = None, + password_parallel = None, + password_length = None, + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-session.md b/docs/examples/1.8.x/server-python/examples/users/create-session.md new file mode 100644 index 0000000000..7e4c49fc95 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-session.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_session( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-target.md b/docs/examples/1.8.x/server-python/examples/users/create-target.md new file mode 100644 index 0000000000..dfa64ac757 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-target.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.enums import MessagingProviderType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>', + provider_type = MessagingProviderType.EMAIL, + identifier = '<IDENTIFIER>', + provider_id = '<PROVIDER_ID>', # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create-token.md b/docs/examples/1.8.x/server-python/examples/users/create-token.md new file mode 100644 index 0000000000..b40658c312 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create-token.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create_token( + user_id = '<USER_ID>', + length = 4, # optional + expire = 60 # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/create.md b/docs/examples/1.8.x/server-python/examples/users/create.md new file mode 100644 index 0000000000..4c51a3fffb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/create.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.create( + user_id = '<USER_ID>', + email = 'email@example.com', # optional + phone = '+12065550100', # optional + password = '', # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/delete-identity.md b/docs/examples/1.8.x/server-python/examples/users/delete-identity.md new file mode 100644 index 0000000000..412fbd393a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/delete-identity.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_identity( + identity_id = '<IDENTITY_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-python/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..6472498344 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.users import Users +from appwrite.enums import AuthenticatorType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_mfa_authenticator( + user_id = '<USER_ID>', + type = AuthenticatorType.TOTP +) diff --git a/docs/examples/1.8.x/server-python/examples/users/delete-session.md b/docs/examples/1.8.x/server-python/examples/users/delete-session.md new file mode 100644 index 0000000000..815a96ed37 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/delete-session.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_session( + user_id = '<USER_ID>', + session_id = '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-python/examples/users/delete-sessions.md new file mode 100644 index 0000000000..2dde88f471 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_sessions( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/delete-target.md b/docs/examples/1.8.x/server-python/examples/users/delete-target.md new file mode 100644 index 0000000000..287f5a26cf --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/delete-target.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/delete.md b/docs/examples/1.8.x/server-python/examples/users/delete.md new file mode 100644 index 0000000000..7032b0f81e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/delete.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.delete( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-python/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..bca43b08ec --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.get_mfa_recovery_codes( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/get-prefs.md b/docs/examples/1.8.x/server-python/examples/users/get-prefs.md new file mode 100644 index 0000000000..ec9d363f8d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.get_prefs( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/get-target.md b/docs/examples/1.8.x/server-python/examples/users/get-target.md new file mode 100644 index 0000000000..3b80b1ff7f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/get-target.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.get_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/get.md b/docs/examples/1.8.x/server-python/examples/users/get.md new file mode 100644 index 0000000000..267086a3df --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/get.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.get( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list-identities.md b/docs/examples/1.8.x/server-python/examples/users/list-identities.md new file mode 100644 index 0000000000..0fc7811a3f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list-identities.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_identities( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list-logs.md b/docs/examples/1.8.x/server-python/examples/users/list-logs.md new file mode 100644 index 0000000000..6cbbe498cb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list-logs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_logs( + user_id = '<USER_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list-memberships.md b/docs/examples/1.8.x/server-python/examples/users/list-memberships.md new file mode 100644 index 0000000000..c0d2f2a468 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list-memberships.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_memberships( + user_id = '<USER_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-python/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..a2b59895e8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list-mfa-factors.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_mfa_factors( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list-sessions.md b/docs/examples/1.8.x/server-python/examples/users/list-sessions.md new file mode 100644 index 0000000000..77b04c935e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_sessions( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list-targets.md b/docs/examples/1.8.x/server-python/examples/users/list-targets.md new file mode 100644 index 0000000000..14107fa296 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list-targets.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list_targets( + user_id = '<USER_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/list.md b/docs/examples/1.8.x/server-python/examples/users/list.md new file mode 100644 index 0000000000..778f33935d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/list.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.list( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-python/examples/users/update-email-verification.md new file mode 100644 index 0000000000..2605861416 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_email_verification( + user_id = '<USER_ID>', + email_verification = False +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-email.md b/docs/examples/1.8.x/server-python/examples/users/update-email.md new file mode 100644 index 0000000000..c4a468e234 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-email.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_email( + user_id = '<USER_ID>', + email = 'email@example.com' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-labels.md b/docs/examples/1.8.x/server-python/examples/users/update-labels.md new file mode 100644 index 0000000000..b9af53a50e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-labels.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_labels( + user_id = '<USER_ID>', + labels = [] +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-python/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..c0990e1ef7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_mfa_recovery_codes( + user_id = '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-mfa.md b/docs/examples/1.8.x/server-python/examples/users/update-mfa.md new file mode 100644 index 0000000000..9b35701185 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-mfa.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_mfa( + user_id = '<USER_ID>', + mfa = False +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-name.md b/docs/examples/1.8.x/server-python/examples/users/update-name.md new file mode 100644 index 0000000000..1e328b4c48 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-name.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_name( + user_id = '<USER_ID>', + name = '<NAME>' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-password.md b/docs/examples/1.8.x/server-python/examples/users/update-password.md new file mode 100644 index 0000000000..d104184cad --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-password.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_password( + user_id = '<USER_ID>', + password = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-python/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..1d2656c3f1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_phone_verification( + user_id = '<USER_ID>', + phone_verification = False +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-phone.md b/docs/examples/1.8.x/server-python/examples/users/update-phone.md new file mode 100644 index 0000000000..14826bb54c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-phone.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_phone( + user_id = '<USER_ID>', + number = '+12065550100' +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-prefs.md b/docs/examples/1.8.x/server-python/examples/users/update-prefs.md new file mode 100644 index 0000000000..76903b7611 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_prefs( + user_id = '<USER_ID>', + prefs = {} +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-status.md b/docs/examples/1.8.x/server-python/examples/users/update-status.md new file mode 100644 index 0000000000..49c0516ee4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-status.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_status( + user_id = '<USER_ID>', + status = False +) diff --git a/docs/examples/1.8.x/server-python/examples/users/update-target.md b/docs/examples/1.8.x/server-python/examples/users/update-target.md new file mode 100644 index 0000000000..119c5fab88 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/users/update-target.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.users import Users + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users(client) + +result = users.update_target( + user_id = '<USER_ID>', + target_id = '<TARGET_ID>', + identifier = '<IDENTIFIER>', # optional + provider_id = '<PROVIDER_ID>', # optional + name = '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..2079b045d1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md @@ -0,0 +1,6 @@ +POST /v1/account/sessions/anonymous HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..8aee0e5b15 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md new file mode 100644 index 0000000000..98c5c9b454 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md @@ -0,0 +1,11 @@ +POST /v1/account/tokens/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "phrase": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..a8da4695c3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md @@ -0,0 +1,6 @@ +POST /v1/account/jwts HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..a3db43516a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,12 @@ +POST /v1/account/tokens/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "url": "https://example.com", + "phrase": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..8d6b52b877 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md @@ -0,0 +1,8 @@ +POST /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..9a84c0ef69 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md @@ -0,0 +1,9 @@ +POST /v1/account/mfa/challenge HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "factor": "email" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..797824d5d7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +POST /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..dd1dd3ec5e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md @@ -0,0 +1,4 @@ +GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md new file mode 100644 index 0000000000..eef1021d9e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md @@ -0,0 +1,10 @@ +POST /v1/account/tokens/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "phone": "+12065550100" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..d161e580ff --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md @@ -0,0 +1,8 @@ +POST /v1/account/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md b/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md new file mode 100644 index 0000000000..c195b96a5e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md @@ -0,0 +1,12 @@ +POST /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "email": "email@example.com", + "url": "https://example.com" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-session.md new file mode 100644 index 0000000000..18e3b1acdd --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-session.md @@ -0,0 +1,10 @@ +POST /v1/account/sessions/token HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-verification.md b/docs/examples/1.8.x/server-rest/examples/account/create-verification.md new file mode 100644 index 0000000000..1185d3a875 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create-verification.md @@ -0,0 +1,11 @@ +POST /v1/account/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "url": "https://example.com" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/create.md b/docs/examples/1.8.x/server-rest/examples/account/create.md new file mode 100644 index 0000000000..f546c07de5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/create.md @@ -0,0 +1,12 @@ +POST /v1/account HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": , + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md b/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md new file mode 100644 index 0000000000..edb036a593 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md @@ -0,0 +1,8 @@ +DELETE /v1/account/identities/{identityId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..de58948195 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,8 @@ +DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-session.md b/docs/examples/1.8.x/server-rest/examples/account/delete-session.md new file mode 100644 index 0000000000..9454a84913 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-session.md @@ -0,0 +1,8 @@ +DELETE /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md new file mode 100644 index 0000000000..97931c12e5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md @@ -0,0 +1,8 @@ +DELETE /v1/account/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..81edee5234 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,6 @@ +GET /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md new file mode 100644 index 0000000000..13a0b74d8f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md @@ -0,0 +1,6 @@ +GET /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-session.md b/docs/examples/1.8.x/server-rest/examples/account/get-session.md new file mode 100644 index 0000000000..9417755b04 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/get-session.md @@ -0,0 +1,6 @@ +GET /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get.md b/docs/examples/1.8.x/server-rest/examples/account/get.md new file mode 100644 index 0000000000..023a6d116f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/get.md @@ -0,0 +1,6 @@ +GET /v1/account HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-identities.md b/docs/examples/1.8.x/server-rest/examples/account/list-identities.md new file mode 100644 index 0000000000..65edceb8d6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/list-identities.md @@ -0,0 +1,6 @@ +GET /v1/account/identities HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-logs.md b/docs/examples/1.8.x/server-rest/examples/account/list-logs.md new file mode 100644 index 0000000000..71e2e138ef --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/list-logs.md @@ -0,0 +1,6 @@ +GET /v1/account/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..217ec6cb30 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md @@ -0,0 +1,6 @@ +GET /v1/account/mfa/factors HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md b/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md new file mode 100644 index 0000000000..7bff23f25b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md @@ -0,0 +1,6 @@ +GET /v1/account/sessions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-email.md b/docs/examples/1.8.x/server-rest/examples/account/update-email.md new file mode 100644 index 0000000000..fc3baaf4a4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-email.md @@ -0,0 +1,12 @@ +PATCH /v1/account/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "email": "email@example.com", + "password": "password" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..803c47a857 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md @@ -0,0 +1,11 @@ +PATCH /v1/account/mfa HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "mfa": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..3238322e0f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/magic-url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..9d3e5dceea --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md @@ -0,0 +1,11 @@ +PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "otp": "<OTP>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..ddc27ae334 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md @@ -0,0 +1,12 @@ +PUT /v1/account/mfa/challenge HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "challengeId": "<CHALLENGE_ID>", + "otp": "<OTP>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..e4ab8abb3b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,8 @@ +PATCH /v1/account/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-name.md b/docs/examples/1.8.x/server-rest/examples/account/update-name.md new file mode 100644 index 0000000000..f2f7caa204 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-name.md @@ -0,0 +1,11 @@ +PATCH /v1/account/name HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-password.md b/docs/examples/1.8.x/server-rest/examples/account/update-password.md new file mode 100644 index 0000000000..4f69b9ab3f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-password.md @@ -0,0 +1,12 @@ +PATCH /v1/account/password HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "password": , + "oldPassword": "password" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md new file mode 100644 index 0000000000..f1bc27d201 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md @@ -0,0 +1,10 @@ +PUT /v1/account/sessions/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..ee6f5a68ff --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md @@ -0,0 +1,12 @@ +PUT /v1/account/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone.md new file mode 100644 index 0000000000..bbe602a181 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone.md @@ -0,0 +1,12 @@ +PATCH /v1/account/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "phone": "+12065550100", + "password": "password" +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md new file mode 100644 index 0000000000..aeabc2b68f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md @@ -0,0 +1,11 @@ +PATCH /v1/account/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "prefs": {} +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md b/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md new file mode 100644 index 0000000000..054aacc8ed --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md @@ -0,0 +1,13 @@ +PUT /v1/account/recovery HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>", + "password": +} diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-session.md new file mode 100644 index 0000000000..9b2ba0e4a7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-session.md @@ -0,0 +1,8 @@ +PATCH /v1/account/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-status.md b/docs/examples/1.8.x/server-rest/examples/account/update-status.md new file mode 100644 index 0000000000..8a3e01db0b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-status.md @@ -0,0 +1,8 @@ +PATCH /v1/account/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-verification.md b/docs/examples/1.8.x/server-rest/examples/account/update-verification.md new file mode 100644 index 0000000000..0c5ed8b55d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/account/update-verification.md @@ -0,0 +1,12 @@ +PUT /v1/account/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md new file mode 100644 index 0000000000..3f18fa0d1e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md @@ -0,0 +1,7 @@ +GET /v1/avatars/browsers/{code} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..59a38fe8f3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md @@ -0,0 +1,7 @@ +GET /v1/avatars/credit-cards/{code} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..7a7c189da1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md @@ -0,0 +1,7 @@ +GET /v1/avatars/favicon HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md new file mode 100644 index 0000000000..b4cd119359 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md @@ -0,0 +1,7 @@ +GET /v1/avatars/flags/{code} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md new file mode 100644 index 0000000000..ca6b5105c3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md @@ -0,0 +1,7 @@ +GET /v1/avatars/image HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md new file mode 100644 index 0000000000..eb90447158 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md @@ -0,0 +1,7 @@ +GET /v1/avatars/initials HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..77f7a3d382 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md @@ -0,0 +1,7 @@ +GET /v1/avatars/qr HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..8ae6c2d9ff --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": false, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md new file mode 100644 index 0000000000..ea298e3706 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "collectionId": "<COLLECTION_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..6ec4b332a5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-document.md b/docs/examples/1.8.x/server-rest/examples/databases/create-document.md new file mode 100644 index 0000000000..a5c25315c2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-document.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "documentId": "<DOCUMENT_ID>", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md new file mode 100644 index 0000000000..63503ebaaa --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md @@ -0,0 +1,12 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "documents": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..0fb7aa2814 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "email@example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..ba033a02ce --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "elements": [], + "required": false, + "default": "<DEFAULT>", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..ee8cb7497f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/float HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-index.md b/docs/examples/1.8.x/server-rest/examples/databases/create-index.md new file mode 100644 index 0000000000..6d9b486ed6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-index.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "type": "key", + "attributes": [], + "orders": [], + "lengths": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..721f10e0c7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..61378e6780 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..c519a4a494 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "relatedCollectionId": "<RELATED_COLLECTION_ID>", + "type": "oneToOne", + "twoWay": false, + "key": , + "twoWayKey": , + "onDelete": "cascade" +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..7a5eafdf2a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/string HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "size": 1, + "required": false, + "default": "<DEFAULT>", + "array": false, + "encrypt": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..ea4d76ce06 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "https://example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create.md b/docs/examples/1.8.x/server-rest/examples/databases/create.md new file mode 100644 index 0000000000..dab52ff67c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/create.md @@ -0,0 +1,12 @@ +POST /v1/databases HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..d569f8d7e6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "min": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..8b7f1eee07 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md new file mode 100644 index 0000000000..153b3a2bdd --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md new file mode 100644 index 0000000000..ca093c9177 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md @@ -0,0 +1,9 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md new file mode 100644 index 0000000000..49ab276fa6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md @@ -0,0 +1,10 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md new file mode 100644 index 0000000000..9c27a6fd4c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete.md b/docs/examples/1.8.x/server-rest/examples/databases/delete.md new file mode 100644 index 0000000000..19cf58549a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md new file mode 100644 index 0000000000..c4cd093de0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md new file mode 100644 index 0000000000..0e33fc4ef7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-document.md b/docs/examples/1.8.x/server-rest/examples/databases/get-document.md new file mode 100644 index 0000000000..b71ec4f83c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-document.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-index.md b/docs/examples/1.8.x/server-rest/examples/databases/get-index.md new file mode 100644 index 0000000000..5aa5aa0fb2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-index.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get.md b/docs/examples/1.8.x/server-rest/examples/databases/get.md new file mode 100644 index 0000000000..7c43330625 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/get.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..8658cb0ee6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "max": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md new file mode 100644 index 0000000000..e829678007 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/attributes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md b/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md new file mode 100644 index 0000000000..0cfdce9c8e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/collections HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md new file mode 100644 index 0000000000..0bc5c9b7f9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md new file mode 100644 index 0000000000..e65ba2483c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list.md b/docs/examples/1.8.x/server-rest/examples/databases/list.md new file mode 100644 index 0000000000..31db5cca0d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/list.md @@ -0,0 +1,5 @@ +GET /v1/databases HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..7a2ae34ce9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": false, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md new file mode 100644 index 0000000000..4cba7f5230 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md @@ -0,0 +1,13 @@ +PUT /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..c9685e6c89 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-document.md b/docs/examples/1.8.x/server-rest/examples/databases/update-document.md new file mode 100644 index 0000000000..19b25bdf45 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-document.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md new file mode 100644 index 0000000000..f2606e3a1f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "data": {}, + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..eece253459 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/email/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "email@example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..47ef168090 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "elements": [], + "required": false, + "default": "<DEFAULT>", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..bb35f3450c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/float/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..96290f4313 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..9e3cf7d4b5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..645e8f8ae4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "onDelete": "cascade", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..650b6f1b8b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/string/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "<DEFAULT>", + "size": 1, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..8409285677 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/url/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "https://example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update.md b/docs/examples/1.8.x/server-rest/examples/databases/update.md new file mode 100644 index 0000000000..02efbf5270 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/update.md @@ -0,0 +1,11 @@ +PUT /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md new file mode 100644 index 0000000000..7339c7e611 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md @@ -0,0 +1,9 @@ +PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..1a24810a03 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md @@ -0,0 +1,7 @@ +PUT /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md new file mode 100644 index 0000000000..5d65eff5fd --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md @@ -0,0 +1,30 @@ +POST /v1/functions/{functionId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="entrypoint" + +"<ENTRYPOINT>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="commands" + +"<COMMANDS>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="code" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="activate" + +false + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..898117c117 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,11 @@ +POST /v1/functions/{functionId}/deployments/duplicate HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "deploymentId": "<DEPLOYMENT_ID>", + "buildId": "<BUILD_ID>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md new file mode 100644 index 0000000000..5a4c7667cf --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md @@ -0,0 +1,17 @@ +POST /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "body": "<BODY>", + "async": false, + "path": "<PATH>", + "method": "GET", + "headers": {}, + "scheduledAt": +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..656c2e2a27 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md @@ -0,0 +1,14 @@ +POST /v1/functions/{functionId}/deployments/template HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "repository": "<REPOSITORY>", + "owner": "<OWNER>", + "rootDirectory": "<ROOT_DIRECTORY>", + "version": "<VERSION>", + "activate": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md new file mode 100644 index 0000000000..7251a3a352 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md @@ -0,0 +1,12 @@ +POST /v1/functions/{functionId}/variables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..1b5267ca14 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md @@ -0,0 +1,12 @@ +POST /v1/functions/{functionId}/deployments/vcs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "type": "branch", + "reference": "<REFERENCE>", + "activate": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create.md b/docs/examples/1.8.x/server-rest/examples/functions/create.md new file mode 100644 index 0000000000..c5f364ad63 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/create.md @@ -0,0 +1,27 @@ +POST /v1/functions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "functionId": "<FUNCTION_ID>", + "name": "<NAME>", + "runtime": "node-14.5", + "execute": ["any"], + "events": [], + "schedule": , + "timeout": 1, + "enabled": false, + "logging": false, + "entrypoint": "<ENTRYPOINT>", + "commands": "<COMMANDS>", + "scopes": [], + "installationId": "<INSTALLATION_ID>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "specification": +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..b70f282167 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md new file mode 100644 index 0000000000..fb26ae47aa --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md new file mode 100644 index 0000000000..aa01835ae4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete.md b/docs/examples/1.8.x/server-rest/examples/functions/delete.md new file mode 100644 index 0000000000..9f9ab74019 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/functions/{functionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..9195d203ab --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md @@ -0,0 +1,6 @@ +GET /v1/functions/{functionId}/deployments/{deploymentId}/download HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md new file mode 100644 index 0000000000..2557ca698e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md @@ -0,0 +1,5 @@ +GET /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md new file mode 100644 index 0000000000..52e54c2a6c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md new file mode 100644 index 0000000000..2a01307b0d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md @@ -0,0 +1,5 @@ +GET /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get.md b/docs/examples/1.8.x/server-rest/examples/functions/get.md new file mode 100644 index 0000000000..062b7e67ec --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/get.md @@ -0,0 +1,5 @@ +GET /v1/functions/{functionId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md new file mode 100644 index 0000000000..5b4dabc679 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md @@ -0,0 +1,5 @@ +GET /v1/functions/{functionId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md b/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md new file mode 100644 index 0000000000..b0ac3076ab --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md @@ -0,0 +1,7 @@ +GET /v1/functions/{functionId}/executions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..762e47fbcb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md @@ -0,0 +1,5 @@ +GET /v1/functions/runtimes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md new file mode 100644 index 0000000000..989adc0576 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md @@ -0,0 +1,5 @@ +GET /v1/functions/specifications HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md b/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md new file mode 100644 index 0000000000..b46b69fb5f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md @@ -0,0 +1,5 @@ +GET /v1/functions/{functionId}/variables HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list.md b/docs/examples/1.8.x/server-rest/examples/functions/list.md new file mode 100644 index 0000000000..318a2d56ed --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/list.md @@ -0,0 +1,5 @@ +GET /v1/functions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..8788e21c2b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md @@ -0,0 +1,7 @@ +PATCH /v1/functions/{functionId}/deployments/{deploymentId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..1f89f35da0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md @@ -0,0 +1,10 @@ +PATCH /v1/functions/{functionId}/deployment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "deploymentId": "<DEPLOYMENT_ID>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md new file mode 100644 index 0000000000..36ae244548 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md @@ -0,0 +1,12 @@ +PUT /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update.md b/docs/examples/1.8.x/server-rest/examples/functions/update.md new file mode 100644 index 0000000000..ee3b8b8c6d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/functions/update.md @@ -0,0 +1,26 @@ +PUT /v1/functions/{functionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "runtime": "node-14.5", + "execute": ["any"], + "events": [], + "schedule": , + "timeout": 1, + "enabled": false, + "logging": false, + "entrypoint": "<ENTRYPOINT>", + "commands": "<COMMANDS>", + "scopes": [], + "installationId": "<INSTALLATION_ID>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "specification": +} diff --git a/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md b/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md new file mode 100644 index 0000000000..7d58d77ede --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +POST /v1/graphql/mutation HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "query": {} +} diff --git a/docs/examples/1.8.x/server-rest/examples/graphql/query.md b/docs/examples/1.8.x/server-rest/examples/graphql/query.md new file mode 100644 index 0000000000..8b87cd9f33 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/graphql/query.md @@ -0,0 +1,13 @@ +POST /v1/graphql HTTP/1.1 +Host: cloud.appwrite.io +X-Sdk-Graphql: true +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "query": {} +} diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md new file mode 100644 index 0000000000..2acacb5a5f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md @@ -0,0 +1,5 @@ +GET /v1/health/anti-virus HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-cache.md b/docs/examples/1.8.x/server-rest/examples/health/get-cache.md new file mode 100644 index 0000000000..c98dcf8af1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-cache.md @@ -0,0 +1,5 @@ +GET /v1/health/cache HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md b/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md new file mode 100644 index 0000000000..9f4f5efee4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md @@ -0,0 +1,5 @@ +GET /v1/health/certificate HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md b/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md new file mode 100644 index 0000000000..9f1efb921b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md @@ -0,0 +1,5 @@ +GET /v1/health/db HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..b646b7923f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/failed/{name} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..d28025f719 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md @@ -0,0 +1,5 @@ +GET /v1/health/pubsub HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..d51b4d60b3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/builds HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..0f3c2f65fe --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/certificates HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..ccc72c3404 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/databases HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..a4c5e15586 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/deletes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..a28dbf921c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/functions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..0c16e61757 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..82b6151af1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/mails HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..6082ec41bd --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/messaging HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..c9687b3224 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/migrations HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..90eefe75fc --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/stats-resources HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..663d39dd2f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/stats-usage HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..0843ad174f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md @@ -0,0 +1,5 @@ +GET /v1/health/queue/webhooks HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md new file mode 100644 index 0000000000..9047713439 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md @@ -0,0 +1,5 @@ +GET /v1/health/storage/local HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-storage.md b/docs/examples/1.8.x/server-rest/examples/health/get-storage.md new file mode 100644 index 0000000000..1d46ab179e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-storage.md @@ -0,0 +1,5 @@ +GET /v1/health/storage HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-time.md b/docs/examples/1.8.x/server-rest/examples/health/get-time.md new file mode 100644 index 0000000000..7661df5732 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get-time.md @@ -0,0 +1,5 @@ +GET /v1/health/time HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get.md b/docs/examples/1.8.x/server-rest/examples/health/get.md new file mode 100644 index 0000000000..c64b480826 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/health/get.md @@ -0,0 +1,5 @@ +GET /v1/health HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/get.md b/docs/examples/1.8.x/server-rest/examples/locale/get.md new file mode 100644 index 0000000000..7b300acb41 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/get.md @@ -0,0 +1,7 @@ +GET /v1/locale HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md b/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md new file mode 100644 index 0000000000..336ac1477f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md @@ -0,0 +1,7 @@ +GET /v1/locale/codes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md b/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md new file mode 100644 index 0000000000..d99b138653 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md @@ -0,0 +1,7 @@ +GET /v1/locale/continents HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..3c94877234 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md @@ -0,0 +1,7 @@ +GET /v1/locale/countries/eu HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..09619edb36 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md @@ -0,0 +1,7 @@ +GET /v1/locale/countries/phones HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md new file mode 100644 index 0000000000..0f1be7e5df --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md @@ -0,0 +1,7 @@ +GET /v1/locale/countries HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md new file mode 100644 index 0000000000..c1e03ecae2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md @@ -0,0 +1,7 @@ +GET /v1/locale/currencies HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md b/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md new file mode 100644 index 0000000000..1e2a125985 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md @@ -0,0 +1,7 @@ +GET /v1/locale/languages HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..b6860358c1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md @@ -0,0 +1,17 @@ +POST /v1/messaging/providers/apns HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "authKey": "<AUTH_KEY>", + "authKeyId": "<AUTH_KEY_ID>", + "teamId": "<TEAM_ID>", + "bundleId": "<BUNDLE_ID>", + "sandbox": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md new file mode 100644 index 0000000000..efec44982c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md @@ -0,0 +1,21 @@ +POST /v1/messaging/messages/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "messageId": "<MESSAGE_ID>", + "subject": "<SUBJECT>", + "content": "<CONTENT>", + "topics": [], + "users": [], + "targets": [], + "cc": [], + "bcc": [], + "attachments": [], + "draft": false, + "html": false, + "scheduledAt": +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..ec885465a7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md @@ -0,0 +1,13 @@ +POST /v1/messaging/providers/fcm HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "serviceAccountJSON": {}, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..8d0eb33938 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,19 @@ +POST /v1/messaging/providers/mailgun HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "apiKey": "<API_KEY>", + "domain": "<DOMAIN>", + "isEuRegion": false, + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..2877ff7b89 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/msg91 HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "templateId": "<TEMPLATE_ID>", + "senderId": "<SENDER_ID>", + "authKey": "<AUTH_KEY>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md new file mode 100644 index 0000000000..6210273820 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md @@ -0,0 +1,28 @@ +POST /v1/messaging/messages/push HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "messageId": "<MESSAGE_ID>", + "title": "<TITLE>", + "body": "<BODY>", + "topics": [], + "users": [], + "targets": [], + "data": {}, + "action": "<ACTION>", + "image": "[ID1:ID2]", + "icon": "<ICON>", + "sound": "<SOUND>", + "color": "<COLOR>", + "tag": "<TAG>", + "badge": 0, + "draft": false, + "scheduledAt": , + "contentAvailable": false, + "critical": false, + "priority": "normal" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..a9f7c933dc --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,17 @@ +POST /v1/messaging/providers/sendgrid HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "apiKey": "<API_KEY>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md new file mode 100644 index 0000000000..f885563f6f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md @@ -0,0 +1,16 @@ +POST /v1/messaging/messages/sms HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "messageId": "<MESSAGE_ID>", + "content": "<CONTENT>", + "topics": [], + "users": [], + "targets": [], + "draft": false, + "scheduledAt": +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..bbb8e7d212 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md @@ -0,0 +1,23 @@ +POST /v1/messaging/providers/smtp HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "host": "<HOST>", + "port": 1, + "username": "<USERNAME>", + "password": "<PASSWORD>", + "encryption": "none", + "autoTLS": false, + "mailer": "<MAILER>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "email@example.com", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..2e61d50b5c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md @@ -0,0 +1,13 @@ +POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-JWT: <YOUR_JWT> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "subscriberId": "<SUBSCRIBER_ID>", + "targetId": "<TARGET_ID>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..198ccae6f5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/telesign HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "customerId": "<CUSTOMER_ID>", + "apiKey": "<API_KEY>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..2f2ce558a7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/textmagic HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "username": "<USERNAME>", + "apiKey": "<API_KEY>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md new file mode 100644 index 0000000000..a44af2764d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md @@ -0,0 +1,12 @@ +POST /v1/messaging/topics HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "topicId": "<TOPIC_ID>", + "name": "<NAME>", + "subscribe": ["any"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..61fd63b52e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/twilio HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "accountSid": "<ACCOUNT_SID>", + "authToken": "<AUTH_TOKEN>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..16d1c6b594 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md @@ -0,0 +1,15 @@ +POST /v1/messaging/providers/vonage HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "providerId": "<PROVIDER_ID>", + "name": "<NAME>", + "from": "+12065550100", + "apiKey": "<API_KEY>", + "apiSecret": "<API_SECRET>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..e25c3dcc1c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md @@ -0,0 +1,7 @@ +DELETE /v1/messaging/providers/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..b988897d60 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md @@ -0,0 +1,9 @@ +DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-JWT: <YOUR_JWT> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..3c5c8a9cdb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md @@ -0,0 +1,7 @@ +DELETE /v1/messaging/topics/{topicId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete.md new file mode 100644 index 0000000000..a918c2b6f8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/messaging/messages/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md new file mode 100644 index 0000000000..abe744e9c7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md @@ -0,0 +1,5 @@ +GET /v1/messaging/messages/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md new file mode 100644 index 0000000000..0d2ffe4eaa --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md @@ -0,0 +1,5 @@ +GET /v1/messaging/providers/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..a1629d4546 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md @@ -0,0 +1,5 @@ +GET /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md new file mode 100644 index 0000000000..5d7efd06de --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md @@ -0,0 +1,5 @@ +GET /v1/messaging/topics/{topicId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..066970a9fb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md @@ -0,0 +1,5 @@ +GET /v1/messaging/messages/{messageId}/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md new file mode 100644 index 0000000000..03a286c376 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md @@ -0,0 +1,5 @@ +GET /v1/messaging/messages HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..562264f48e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md @@ -0,0 +1,5 @@ +GET /v1/messaging/providers/{providerId}/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md new file mode 100644 index 0000000000..43522ee34f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md @@ -0,0 +1,5 @@ +GET /v1/messaging/providers HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..f403362529 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,5 @@ +GET /v1/messaging/subscribers/{subscriberId}/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..a357f9dc3d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md @@ -0,0 +1,5 @@ +GET /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md new file mode 100644 index 0000000000..0b4f8caf6f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md @@ -0,0 +1,5 @@ +GET /v1/messaging/messages/{messageId}/targets HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..80073b2165 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md @@ -0,0 +1,5 @@ +GET /v1/messaging/topics/{topicId}/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md new file mode 100644 index 0000000000..2835277aeb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md @@ -0,0 +1,5 @@ +GET /v1/messaging/topics HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..a398b186cb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md @@ -0,0 +1,16 @@ +PATCH /v1/messaging/providers/apns/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "authKey": "<AUTH_KEY>", + "authKeyId": "<AUTH_KEY_ID>", + "teamId": "<TEAM_ID>", + "bundleId": "<BUNDLE_ID>", + "sandbox": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md new file mode 100644 index 0000000000..0ef5b89409 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md @@ -0,0 +1,20 @@ +PATCH /v1/messaging/messages/email/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "topics": [], + "users": [], + "targets": [], + "subject": "<SUBJECT>", + "content": "<CONTENT>", + "draft": false, + "html": false, + "cc": [], + "bcc": [], + "scheduledAt": , + "attachments": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..50e3a5400d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md @@ -0,0 +1,12 @@ +PATCH /v1/messaging/providers/fcm/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "serviceAccountJSON": {} +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..f05f0057e7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,18 @@ +PATCH /v1/messaging/providers/mailgun/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "apiKey": "<API_KEY>", + "domain": "<DOMAIN>", + "isEuRegion": false, + "enabled": false, + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..1c88425fc1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/msg91/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "templateId": "<TEMPLATE_ID>", + "senderId": "<SENDER_ID>", + "authKey": "<AUTH_KEY>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md new file mode 100644 index 0000000000..adf269301c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md @@ -0,0 +1,27 @@ +PATCH /v1/messaging/messages/push/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "topics": [], + "users": [], + "targets": [], + "title": "<TITLE>", + "body": "<BODY>", + "data": {}, + "action": "<ACTION>", + "image": "[ID1:ID2]", + "icon": "<ICON>", + "sound": "<SOUND>", + "color": "<COLOR>", + "tag": "<TAG>", + "badge": 0, + "draft": false, + "scheduledAt": , + "contentAvailable": false, + "critical": false, + "priority": "normal" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..28ffb526f8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,16 @@ +PATCH /v1/messaging/providers/sendgrid/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "apiKey": "<API_KEY>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md new file mode 100644 index 0000000000..b5ad82d0f9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md @@ -0,0 +1,15 @@ +PATCH /v1/messaging/messages/sms/{messageId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "topics": [], + "users": [], + "targets": [], + "content": "<CONTENT>", + "draft": false, + "scheduledAt": +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..8e69659ce1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md @@ -0,0 +1,22 @@ +PATCH /v1/messaging/providers/smtp/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "host": "<HOST>", + "port": 1, + "username": "<USERNAME>", + "password": "<PASSWORD>", + "encryption": "none", + "autoTLS": false, + "mailer": "<MAILER>", + "fromName": "<FROM_NAME>", + "fromEmail": "email@example.com", + "replyToName": "<REPLY_TO_NAME>", + "replyToEmail": "<REPLY_TO_EMAIL>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..548d39dc92 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/telesign/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "customerId": "<CUSTOMER_ID>", + "apiKey": "<API_KEY>", + "from": "<FROM>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..724b0a4afe --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/textmagic/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "username": "<USERNAME>", + "apiKey": "<API_KEY>", + "from": "<FROM>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md new file mode 100644 index 0000000000..add0bf8ee4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md @@ -0,0 +1,11 @@ +PATCH /v1/messaging/topics/{topicId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "subscribe": ["any"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..38730383b1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/twilio/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "accountSid": "<ACCOUNT_SID>", + "authToken": "<AUTH_TOKEN>", + "from": "<FROM>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..8c284c827f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md @@ -0,0 +1,14 @@ +PATCH /v1/messaging/providers/vonage/{providerId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false, + "apiKey": "<API_KEY>", + "apiSecret": "<API_SECRET>", + "from": "<FROM>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md new file mode 100644 index 0000000000..554d2a5365 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md @@ -0,0 +1,35 @@ +POST /v1/sites/{siteId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="installCommand" + +"<INSTALL_COMMAND>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="buildCommand" + +"<BUILD_COMMAND>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="outputDirectory" + +"<OUTPUT_DIRECTORY>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="code" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="activate" + +false + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..3da246715b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,10 @@ +POST /v1/sites/{siteId}/deployments/duplicate HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "deploymentId": "<DEPLOYMENT_ID>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..e37819bfb2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md @@ -0,0 +1,14 @@ +POST /v1/sites/{siteId}/deployments/template HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "repository": "<REPOSITORY>", + "owner": "<OWNER>", + "rootDirectory": "<ROOT_DIRECTORY>", + "version": "<VERSION>", + "activate": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md new file mode 100644 index 0000000000..73217d198c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md @@ -0,0 +1,12 @@ +POST /v1/sites/{siteId}/variables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..7d5fd3e92e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md @@ -0,0 +1,12 @@ +POST /v1/sites/{siteId}/deployments/vcs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "type": "branch", + "reference": "<REFERENCE>", + "activate": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create.md b/docs/examples/1.8.x/server-rest/examples/sites/create.md new file mode 100644 index 0000000000..5493e9d2b6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/create.md @@ -0,0 +1,27 @@ +POST /v1/sites HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "siteId": "<SITE_ID>", + "name": "<NAME>", + "framework": "analog", + "enabled": false, + "logging": false, + "timeout": 1, + "installCommand": "<INSTALL_COMMAND>", + "buildCommand": "<BUILD_COMMAND>", + "outputDirectory": "<OUTPUT_DIRECTORY>", + "buildRuntime": "node-14.5", + "adapter": "static", + "installationId": "<INSTALLATION_ID>", + "fallbackFile": "<FALLBACK_FILE>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "specification": +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..35bac59efc --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md @@ -0,0 +1,7 @@ +DELETE /v1/sites/{siteId}/deployments/{deploymentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md new file mode 100644 index 0000000000..0bd2f661cf --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md @@ -0,0 +1,7 @@ +DELETE /v1/sites/{siteId}/logs/{logId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md new file mode 100644 index 0000000000..c3f1d2d293 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md @@ -0,0 +1,7 @@ +DELETE /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete.md b/docs/examples/1.8.x/server-rest/examples/sites/delete.md new file mode 100644 index 0000000000..cdb4ced577 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/sites/{siteId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..d81a7dfc56 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md @@ -0,0 +1,6 @@ +GET /v1/sites/{siteId}/deployments/{deploymentId}/download HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md new file mode 100644 index 0000000000..381c20db77 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId}/deployments/{deploymentId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-log.md b/docs/examples/1.8.x/server-rest/examples/sites/get-log.md new file mode 100644 index 0000000000..6b8366461e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-log.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId}/logs/{logId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md new file mode 100644 index 0000000000..7c9703ef88 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get.md b/docs/examples/1.8.x/server-rest/examples/sites/get.md new file mode 100644 index 0000000000..f13b46ecab --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/get.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md new file mode 100644 index 0000000000..22512f809d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId}/deployments HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..0007a7cd78 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md @@ -0,0 +1,5 @@ +GET /v1/sites/frameworks HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md b/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md new file mode 100644 index 0000000000..7e77b7e755 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId}/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md new file mode 100644 index 0000000000..17e8d281c6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md @@ -0,0 +1,5 @@ +GET /v1/sites/specifications HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md b/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md new file mode 100644 index 0000000000..4f99a74984 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md @@ -0,0 +1,5 @@ +GET /v1/sites/{siteId}/variables HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list.md b/docs/examples/1.8.x/server-rest/examples/sites/list.md new file mode 100644 index 0000000000..d1800f05e5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/list.md @@ -0,0 +1,5 @@ +GET /v1/sites HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..697d9ac371 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md @@ -0,0 +1,7 @@ +PATCH /v1/sites/{siteId}/deployments/{deploymentId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..51d8736df5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md @@ -0,0 +1,10 @@ +PATCH /v1/sites/{siteId}/deployment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "deploymentId": "<DEPLOYMENT_ID>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md new file mode 100644 index 0000000000..61902ee02f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md @@ -0,0 +1,12 @@ +PUT /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": "<KEY>", + "value": "<VALUE>", + "secret": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update.md b/docs/examples/1.8.x/server-rest/examples/sites/update.md new file mode 100644 index 0000000000..ab3c4dddd1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/sites/update.md @@ -0,0 +1,26 @@ +PUT /v1/sites/{siteId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "framework": "analog", + "enabled": false, + "logging": false, + "timeout": 1, + "installCommand": "<INSTALL_COMMAND>", + "buildCommand": "<BUILD_COMMAND>", + "outputDirectory": "<OUTPUT_DIRECTORY>", + "buildRuntime": "node-14.5", + "adapter": "static", + "fallbackFile": "<FALLBACK_FILE>", + "installationId": "<INSTALLATION_ID>", + "providerRepositoryId": "<PROVIDER_REPOSITORY_ID>", + "providerBranch": "<PROVIDER_BRANCH>", + "providerSilentMode": false, + "providerRootDirectory": "<PROVIDER_ROOT_DIRECTORY>", + "specification": +} diff --git a/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md new file mode 100644 index 0000000000..8ca9c5701b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md @@ -0,0 +1,19 @@ +POST /v1/storage/buckets HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "bucketId": "<BUCKET_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "fileSecurity": false, + "enabled": false, + "maximumFileSize": 1, + "allowedFileExtensions": [], + "compression": "none", + "encryption": false, + "antivirus": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/storage/create-file.md b/docs/examples/1.8.x/server-rest/examples/storage/create-file.md new file mode 100644 index 0000000000..e8a54e723b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/create-file.md @@ -0,0 +1,27 @@ +POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="fileId" + +"<FILE_ID>" + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="file" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc +e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="permissions[]" + +["read(\"any\")"] + +--cec8e8123c05ba25-- diff --git a/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..3db8bfbb72 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md @@ -0,0 +1,7 @@ +DELETE /v1/storage/buckets/{bucketId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md b/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md new file mode 100644 index 0000000000..cc8a2481f7 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md @@ -0,0 +1,9 @@ +DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md new file mode 100644 index 0000000000..b7def1d44b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md @@ -0,0 +1,5 @@ +GET /v1/storage/buckets/{bucketId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md new file mode 100644 index 0000000000..4d9c691ba9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..e8a1bdeedf --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md new file mode 100644 index 0000000000..d41b8a3512 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file.md new file mode 100644 index 0000000000..e11aaa9f05 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md new file mode 100644 index 0000000000..3061208d75 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md @@ -0,0 +1,5 @@ +GET /v1/storage/buckets HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/list-files.md b/docs/examples/1.8.x/server-rest/examples/storage/list-files.md new file mode 100644 index 0000000000..7cf8616335 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/list-files.md @@ -0,0 +1,7 @@ +GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md new file mode 100644 index 0000000000..adf12647e2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md @@ -0,0 +1,18 @@ +PUT /v1/storage/buckets/{bucketId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "fileSecurity": false, + "enabled": false, + "maximumFileSize": 1, + "allowedFileExtensions": [], + "compression": "none", + "encryption": false, + "antivirus": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/storage/update-file.md b/docs/examples/1.8.x/server-rest/examples/storage/update-file.md new file mode 100644 index 0000000000..d91ab4c2d6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/storage/update-file.md @@ -0,0 +1,13 @@ +PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..4152d8538f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/boolean HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": false, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..d5318d96db --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/datetime HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md new file mode 100644 index 0000000000..b213fa6ceb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "email@example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..125f617f1f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/enum HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "elements": [], + "required": false, + "default": "<DEFAULT>", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md new file mode 100644 index 0000000000..2e010318ff --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/float HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-index.md b/docs/examples/1.8.x/server-rest/examples/tables/create-index.md new file mode 100644 index 0000000000..eaddec973a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-index.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "type": "key", + "columns": [], + "orders": [], + "lengths": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..f284dc03ef --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/integer HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..8def17fc27 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/ip HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..d8feb21916 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "relatedTableId": "<RELATED_TABLE_ID>", + "type": "oneToOne", + "twoWay": false, + "key": , + "twoWayKey": , + "onDelete": "cascade" +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-row.md b/docs/examples/1.8.x/server-rest/examples/tables/create-row.md new file mode 100644 index 0000000000..075be16fa4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-row.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rowId": "<ROW_ID>", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md new file mode 100644 index 0000000000..ad3d6983cc --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md @@ -0,0 +1,12 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rows": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md new file mode 100644 index 0000000000..e654a05e3a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/string HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "size": 1, + "required": false, + "default": "<DEFAULT>", + "array": false, + "encrypt": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md new file mode 100644 index 0000000000..d98d77c68d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "https://example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create.md b/docs/examples/1.8.x/server-rest/examples/tables/create.md new file mode 100644 index 0000000000..14e1f6ec05 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/tables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "tableId": "<TABLE_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..a76efb3a69 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "min": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md new file mode 100644 index 0000000000..2bda57366c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md new file mode 100644 index 0000000000..ffffc38c64 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md new file mode 100644 index 0000000000..f10adef821 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md @@ -0,0 +1,9 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md new file mode 100644 index 0000000000..fcaf8fb472 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md @@ -0,0 +1,10 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete.md b/docs/examples/1.8.x/server-rest/examples/tables/delete.md new file mode 100644 index 0000000000..379bead1ad --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-column.md b/docs/examples/1.8.x/server-rest/examples/tables/get-column.md new file mode 100644 index 0000000000..31d1856539 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/get-column.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-index.md b/docs/examples/1.8.x/server-rest/examples/tables/get-index.md new file mode 100644 index 0000000000..076058d7f3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/get-index.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-row.md b/docs/examples/1.8.x/server-rest/examples/tables/get-row.md new file mode 100644 index 0000000000..0b827f18a8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/get-row.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get.md b/docs/examples/1.8.x/server-rest/examples/tables/get.md new file mode 100644 index 0000000000..74877ec0c0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/get.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..480645c39c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "max": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md b/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md new file mode 100644 index 0000000000..152b36ca26 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/columns HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md new file mode 100644 index 0000000000..ee10a85d5e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md new file mode 100644 index 0000000000..46e69ab609 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list.md b/docs/examples/1.8.x/server-rest/examples/tables/list.md new file mode 100644 index 0000000000..e856ef7241 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/list.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..e4a1c4602a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/boolean/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": false, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..6b531dc604 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/datetime/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md new file mode 100644 index 0000000000..531aa7a31a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/email/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "email@example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..b02936fc5a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/enum/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "elements": [], + "required": false, + "default": "<DEFAULT>", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md new file mode 100644 index 0000000000..313acb6c20 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/float/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..a2552e93ff --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/integer/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..b3cef978e2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/ip/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..19fed27fdf --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/{key}/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "onDelete": "cascade", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-row.md b/docs/examples/1.8.x/server-rest/examples/tables/update-row.md new file mode 100644 index 0000000000..20c92d746b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-row.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md new file mode 100644 index 0000000000..249653070c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "data": {}, + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md new file mode 100644 index 0000000000..7a25ee52e8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/string/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "<DEFAULT>", + "size": 1, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md new file mode 100644 index 0000000000..2097e91d85 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/url/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "https://example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update.md b/docs/examples/1.8.x/server-rest/examples/tables/update.md new file mode 100644 index 0000000000..786a36cf3c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update.md @@ -0,0 +1,13 @@ +PUT /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md new file mode 100644 index 0000000000..7edca8018c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md @@ -0,0 +1,9 @@ +PUT /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..cfcb914866 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md @@ -0,0 +1,7 @@ +PUT /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md new file mode 100644 index 0000000000..f52f796d90 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md @@ -0,0 +1,17 @@ +POST /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "email": "email@example.com", + "userId": "<USER_ID>", + "phone": "+12065550100", + "roles": [], + "url": "https://example.com", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/teams/create.md b/docs/examples/1.8.x/server-rest/examples/teams/create.md new file mode 100644 index 0000000000..27e7429464 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/create.md @@ -0,0 +1,14 @@ +POST /v1/teams HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "teamId": "<TEAM_ID>", + "name": "<NAME>", + "roles": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md new file mode 100644 index 0000000000..e897d84a12 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md @@ -0,0 +1,9 @@ +DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/teams/delete.md b/docs/examples/1.8.x/server-rest/examples/teams/delete.md new file mode 100644 index 0000000000..213489c7fb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/delete.md @@ -0,0 +1,9 @@ +DELETE /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md new file mode 100644 index 0000000000..1d10cfe437 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md @@ -0,0 +1,7 @@ +GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md new file mode 100644 index 0000000000..ddb863181d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md @@ -0,0 +1,6 @@ +GET /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get.md b/docs/examples/1.8.x/server-rest/examples/teams/get.md new file mode 100644 index 0000000000..4ecf74596b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/get.md @@ -0,0 +1,7 @@ +GET /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md new file mode 100644 index 0000000000..38cc17b71a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md @@ -0,0 +1,7 @@ +GET /v1/teams/{teamId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/list.md b/docs/examples/1.8.x/server-rest/examples/teams/list.md new file mode 100644 index 0000000000..c67b429008 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/list.md @@ -0,0 +1,7 @@ +GET /v1/teams HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..9d828118f0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md @@ -0,0 +1,12 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "userId": "<USER_ID>", + "secret": "<SECRET>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md new file mode 100644 index 0000000000..6730d5c27c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md @@ -0,0 +1,12 @@ +PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "roles": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-name.md b/docs/examples/1.8.x/server-rest/examples/teams/update-name.md new file mode 100644 index 0000000000..fa811a2438 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-name.md @@ -0,0 +1,12 @@ +PUT /v1/teams/{teamId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md new file mode 100644 index 0000000000..1db6300350 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md @@ -0,0 +1,11 @@ +PUT /v1/teams/{teamId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "prefs": {} +} diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..c1fbb63d2d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md @@ -0,0 +1,10 @@ +POST /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "expire": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/delete.md b/docs/examples/1.8.x/server-rest/examples/tokens/delete.md new file mode 100644 index 0000000000..ee564b01c4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tokens/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/tokens/{tokenId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/get.md b/docs/examples/1.8.x/server-rest/examples/tokens/get.md new file mode 100644 index 0000000000..b39c8390e3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tokens/get.md @@ -0,0 +1,5 @@ +GET /v1/tokens/{tokenId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/list.md b/docs/examples/1.8.x/server-rest/examples/tokens/list.md new file mode 100644 index 0000000000..8909d05572 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tokens/list.md @@ -0,0 +1,5 @@ +GET /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/update.md b/docs/examples/1.8.x/server-rest/examples/tokens/update.md new file mode 100644 index 0000000000..8ab9d60555 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tokens/update.md @@ -0,0 +1,10 @@ +PATCH /v1/tokens/{tokenId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "expire": +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md new file mode 100644 index 0000000000..d557cf6d5f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md @@ -0,0 +1,13 @@ +POST /v1/users/argon2 HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..cda7491160 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md @@ -0,0 +1,13 @@ +POST /v1/users/bcrypt HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..83208adadb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md @@ -0,0 +1,11 @@ +POST /v1/users/{userId}/jwts HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "sessionId": "<SESSION_ID>", + "duration": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..d4896133a1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md @@ -0,0 +1,13 @@ +POST /v1/users/md5 HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..2f6524646d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +PATCH /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..4c10b1a82d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md @@ -0,0 +1,13 @@ +POST /v1/users/phpass HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..5c6467a2fe --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md @@ -0,0 +1,14 @@ +POST /v1/users/sha HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "passwordVersion": "sha1", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..19d0650840 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,16 @@ +POST /v1/users/scrypt-modified HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "passwordSalt": "<PASSWORD_SALT>", + "passwordSaltSeparator": "<PASSWORD_SALT_SEPARATOR>", + "passwordSignerKey": "<PASSWORD_SIGNER_KEY>", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..008eab6848 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md @@ -0,0 +1,18 @@ +POST /v1/users/scrypt HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "password": "password", + "passwordSalt": "<PASSWORD_SALT>", + "passwordCpu": 0, + "passwordMemory": 0, + "passwordParallel": 0, + "passwordLength": 0, + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-session.md b/docs/examples/1.8.x/server-rest/examples/users/create-session.md new file mode 100644 index 0000000000..ec71d421e0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-session.md @@ -0,0 +1,7 @@ +POST /v1/users/{userId}/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-target.md b/docs/examples/1.8.x/server-rest/examples/users/create-target.md new file mode 100644 index 0000000000..fced935c1b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-target.md @@ -0,0 +1,14 @@ +POST /v1/users/{userId}/targets HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "targetId": "<TARGET_ID>", + "providerType": "email", + "identifier": "<IDENTIFIER>", + "providerId": "<PROVIDER_ID>", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-token.md b/docs/examples/1.8.x/server-rest/examples/users/create-token.md new file mode 100644 index 0000000000..4339252660 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create-token.md @@ -0,0 +1,11 @@ +POST /v1/users/{userId}/tokens HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "length": 4, + "expire": 60 +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/create.md b/docs/examples/1.8.x/server-rest/examples/users/create.md new file mode 100644 index 0000000000..67d377255b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/create.md @@ -0,0 +1,14 @@ +POST /v1/users HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "userId": "<USER_ID>", + "email": "email@example.com", + "phone": "+12065550100", + "password": , + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md b/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md new file mode 100644 index 0000000000..c2aa5eed16 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md @@ -0,0 +1,7 @@ +DELETE /v1/users/identities/{identityId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..9d9e2e950f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/mfa/authenticators/{type} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-session.md b/docs/examples/1.8.x/server-rest/examples/users/delete-session.md new file mode 100644 index 0000000000..be204911a2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-session.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/sessions/{sessionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md new file mode 100644 index 0000000000..54f3a8d4f1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/sessions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-target.md b/docs/examples/1.8.x/server-rest/examples/users/delete-target.md new file mode 100644 index 0000000000..77e2c23dd8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-target.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId}/targets/{targetId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete.md b/docs/examples/1.8.x/server-rest/examples/users/delete.md new file mode 100644 index 0000000000..c31212aa71 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/users/{userId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..58dd32d2a4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md new file mode 100644 index 0000000000..ac04cc5c44 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-target.md b/docs/examples/1.8.x/server-rest/examples/users/get-target.md new file mode 100644 index 0000000000..2f19db7c7a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/get-target.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/targets/{targetId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get.md b/docs/examples/1.8.x/server-rest/examples/users/get.md new file mode 100644 index 0000000000..f654676d9b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/get.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-identities.md b/docs/examples/1.8.x/server-rest/examples/users/list-identities.md new file mode 100644 index 0000000000..180a2127a4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list-identities.md @@ -0,0 +1,5 @@ +GET /v1/users/identities HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-logs.md b/docs/examples/1.8.x/server-rest/examples/users/list-logs.md new file mode 100644 index 0000000000..7149f50abe --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list-logs.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/logs HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md b/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md new file mode 100644 index 0000000000..7d32f2f726 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/memberships HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..a75b26e1c5 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/mfa/factors HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md b/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md new file mode 100644 index 0000000000..1ef39b835b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/sessions HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-targets.md b/docs/examples/1.8.x/server-rest/examples/users/list-targets.md new file mode 100644 index 0000000000..e9542c0da0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list-targets.md @@ -0,0 +1,5 @@ +GET /v1/users/{userId}/targets HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list.md b/docs/examples/1.8.x/server-rest/examples/users/list.md new file mode 100644 index 0000000000..a92f71439b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/list.md @@ -0,0 +1,5 @@ +GET /v1/users HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md new file mode 100644 index 0000000000..cf65c72b0c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/verification HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "emailVerification": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-email.md b/docs/examples/1.8.x/server-rest/examples/users/update-email.md new file mode 100644 index 0000000000..10ccafb079 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-email.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "email": "email@example.com" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-labels.md b/docs/examples/1.8.x/server-rest/examples/users/update-labels.md new file mode 100644 index 0000000000..f01603f1f4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-labels.md @@ -0,0 +1,10 @@ +PUT /v1/users/{userId}/labels HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "labels": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..aa3bb3f6e6 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,7 @@ +PUT /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md b/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md new file mode 100644 index 0000000000..fce9198887 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/mfa HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "mfa": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-name.md b/docs/examples/1.8.x/server-rest/examples/users/update-name.md new file mode 100644 index 0000000000..c8988dfb1d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-name.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/name HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-password.md b/docs/examples/1.8.x/server-rest/examples/users/update-password.md new file mode 100644 index 0000000000..fb796d5619 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-password.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/password HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "password": +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..ca3958605b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/verification/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "phoneVerification": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-phone.md b/docs/examples/1.8.x/server-rest/examples/users/update-phone.md new file mode 100644 index 0000000000..5bc196d668 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-phone.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/phone HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "number": "+12065550100" +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md new file mode 100644 index 0000000000..1db82743e8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/prefs HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "prefs": {} +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-status.md b/docs/examples/1.8.x/server-rest/examples/users/update-status.md new file mode 100644 index 0000000000..6d07f2e15f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-status.md @@ -0,0 +1,10 @@ +PATCH /v1/users/{userId}/status HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "status": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-target.md b/docs/examples/1.8.x/server-rest/examples/users/update-target.md new file mode 100644 index 0000000000..926fb166a4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/users/update-target.md @@ -0,0 +1,12 @@ +PATCH /v1/users/{userId}/targets/{targetId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "identifier": "<IDENTIFIER>", + "providerId": "<PROVIDER_ID>", + "name": "<NAME>" +} diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-ruby/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..bcb25d66f5 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-anonymous-session.md @@ -0,0 +1,11 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_anonymous_session() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-ruby/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..be5fc1c07a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-email-password-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_email_password_session( + email: 'email@example.com', + password: 'password' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-email-token.md b/docs/examples/1.8.x/server-ruby/examples/account/create-email-token.md new file mode 100644 index 0000000000..d75e310a36 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-email-token.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_email_token( + user_id: '<USER_ID>', + email: 'email@example.com', + phrase: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-ruby/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..8e5b6b78c8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-j-w-t.md @@ -0,0 +1,11 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_jwt() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-ruby/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..9537d1fb3d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_magic_url_token( + user_id: '<USER_ID>', + email: 'email@example.com', + url: 'https://example.com', # optional + phrase: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..a3cc71cd8a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-authenticator.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_mfa_authenticator( + type: AuthenticatorType::TOTP +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..ba34779ad2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-challenge.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_mfa_challenge( + factor: AuthenticationFactor::EMAIL +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..db91cf533d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_mfa_recovery_codes() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-ruby/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..52bc5d6194 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-o-auth2token.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_o_auth2_token( + provider: OAuthProvider::AMAZON, + success: 'https://example.com', # optional + failure: 'https://example.com', # optional + scopes: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-ruby/examples/account/create-phone-token.md new file mode 100644 index 0000000000..81bedd0ce9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-phone-token.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_phone_token( + user_id: '<USER_ID>', + phone: '+12065550100' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-ruby/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..a7dec8f34e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-phone-verification.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_phone_verification() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-recovery.md b/docs/examples/1.8.x/server-ruby/examples/account/create-recovery.md new file mode 100644 index 0000000000..e344bafc75 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-recovery.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_recovery( + email: 'email@example.com', + url: 'https://example.com' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-session.md b/docs/examples/1.8.x/server-ruby/examples/account/create-session.md new file mode 100644 index 0000000000..4b8ce216bc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create_session( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create-verification.md b/docs/examples/1.8.x/server-ruby/examples/account/create-verification.md new file mode 100644 index 0000000000..2eba7c776d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create-verification.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.create_verification( + url: 'https://example.com' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/create.md b/docs/examples/1.8.x/server-ruby/examples/account/create.md new file mode 100644 index 0000000000..84228b8351 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/create.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.create( + user_id: '<USER_ID>', + email: 'email@example.com', + password: '', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/delete-identity.md b/docs/examples/1.8.x/server-ruby/examples/account/delete-identity.md new file mode 100644 index 0000000000..e8f8e83814 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/delete-identity.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_identity( + identity_id: '<IDENTITY_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-ruby/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..832ff6ae13 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_mfa_authenticator( + type: AuthenticatorType::TOTP +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/delete-session.md b/docs/examples/1.8.x/server-ruby/examples/account/delete-session.md new file mode 100644 index 0000000000..7496cafe3a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/delete-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_session( + session_id: '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-ruby/examples/account/delete-sessions.md new file mode 100644 index 0000000000..ca5d922483 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/delete-sessions.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.delete_sessions() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-ruby/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..26ffa9d61d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.get_mfa_recovery_codes() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/get-prefs.md b/docs/examples/1.8.x/server-ruby/examples/account/get-prefs.md new file mode 100644 index 0000000000..664454cf2f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/get-prefs.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.get_prefs() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/get-session.md b/docs/examples/1.8.x/server-ruby/examples/account/get-session.md new file mode 100644 index 0000000000..c433b22e46 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/get-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.get_session( + session_id: '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/get.md b/docs/examples/1.8.x/server-ruby/examples/account/get.md new file mode 100644 index 0000000000..f33050345d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/get.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.get() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/list-identities.md b/docs/examples/1.8.x/server-ruby/examples/account/list-identities.md new file mode 100644 index 0000000000..696e02dd5a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/list-identities.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_identities( + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/list-logs.md b/docs/examples/1.8.x/server-ruby/examples/account/list-logs.md new file mode 100644 index 0000000000..1f3366a2ed --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/list-logs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_logs( + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-ruby/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..460ac87ac1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/list-mfa-factors.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_mfa_factors() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/list-sessions.md b/docs/examples/1.8.x/server-ruby/examples/account/list-sessions.md new file mode 100644 index 0000000000..b5968c498f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/list-sessions.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.list_sessions() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-email.md b/docs/examples/1.8.x/server-ruby/examples/account/update-email.md new file mode 100644 index 0000000000..24b43edebd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-email.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_email( + email: 'email@example.com', + password: 'password' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-ruby/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..b1b50f32fd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-m-f-a.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa( + mfa: false +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-ruby/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..c96820f183 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.update_magic_url_session( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..5ff2adcbdc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-authenticator.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa_authenticator( + type: AuthenticatorType::TOTP, + otp: '<OTP>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..2f4b61d581 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-challenge.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa_challenge( + challenge_id: '<CHALLENGE_ID>', + otp: '<OTP>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..ad1f2e5f0e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_mfa_recovery_codes() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-name.md b/docs/examples/1.8.x/server-ruby/examples/account/update-name.md new file mode 100644 index 0000000000..ef8a5cbb4f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-name.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_name( + name: '<NAME>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-password.md b/docs/examples/1.8.x/server-ruby/examples/account/update-password.md new file mode 100644 index 0000000000..4b8705359b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-password.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_password( + password: '', + old_password: 'password' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-ruby/examples/account/update-phone-session.md new file mode 100644 index 0000000000..b81c485c8c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-phone-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + +account = Account.new(client) + +result = account.update_phone_session( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-ruby/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..8dcf316e49 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-phone-verification.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_phone_verification( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-phone.md b/docs/examples/1.8.x/server-ruby/examples/account/update-phone.md new file mode 100644 index 0000000000..ea758a8d8d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-phone.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_phone( + phone: '+12065550100', + password: 'password' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-prefs.md b/docs/examples/1.8.x/server-ruby/examples/account/update-prefs.md new file mode 100644 index 0000000000..ecfe4f4988 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_prefs( + prefs: {} +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-recovery.md b/docs/examples/1.8.x/server-ruby/examples/account/update-recovery.md new file mode 100644 index 0000000000..42c483771c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-recovery.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_recovery( + user_id: '<USER_ID>', + secret: '<SECRET>', + password: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-session.md b/docs/examples/1.8.x/server-ruby/examples/account/update-session.md new file mode 100644 index 0000000000..34e00eec25 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_session( + session_id: '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-status.md b/docs/examples/1.8.x/server-ruby/examples/account/update-status.md new file mode 100644 index 0000000000..5c543b790c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-status.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_status() diff --git a/docs/examples/1.8.x/server-ruby/examples/account/update-verification.md b/docs/examples/1.8.x/server-ruby/examples/account/update-verification.md new file mode 100644 index 0000000000..9866ade95c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/account/update-verification.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +account = Account.new(client) + +result = account.update_verification( + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-browser.md new file mode 100644 index 0000000000..36354d1dce --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-browser.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_browser( + code: Browser::AVANT_BROWSER, + width: 0, # optional + height: 0, # optional + quality: -1 # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..09a0245034 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-credit-card.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_credit_card( + code: CreditCard::AMERICAN_EXPRESS, + width: 0, # optional + height: 0, # optional + quality: -1 # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..7c8bd4347f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-favicon.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_favicon( + url: 'https://example.com' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-flag.md new file mode 100644 index 0000000000..61b7793048 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-flag.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_flag( + code: Flag::AFGHANISTAN, + width: 0, # optional + height: 0, # optional + quality: -1 # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-image.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-image.md new file mode 100644 index 0000000000..f46fad0c44 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-image.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_image( + url: 'https://example.com', + width: 0, # optional + height: 0 # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-initials.md new file mode 100644 index 0000000000..85e5a6a422 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-initials.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_initials( + name: '<NAME>', # optional + width: 0, # optional + height: 0, # optional + background: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-ruby/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..9c6e34686c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/avatars/get-q-r.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.get_qr( + text: '<TEXT>', + size: 1, # optional + margin: 0, # optional + download: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..158ea05623 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-boolean-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_boolean_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: false, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-collection.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-collection.md new file mode 100644 index 0000000000..c22b34813e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-collection.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + document_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..af12b7965b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-datetime-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_datetime_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md new file mode 100644 index 0000000000..ce8dea79ef --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_key('<YOUR_API_KEY>') # Your secret API key + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +databases = Databases.new(client) + +result = databases.create_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md new file mode 100644 index 0000000000..ecccdf5b21 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_admin('') # + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + documents: [] +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..7f36f6b076 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-email-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_email_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..c8e390a1a9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-enum-attribute.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_enum_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..fa77f89902 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-float-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_float_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-index.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-index.md new file mode 100644 index 0000000000..18c2f0ee6a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-index.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + type: IndexType::KEY, + attributes: [], + orders: [], # optional + lengths: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..a689502136 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-integer-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_integer_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..7abeee9403 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-ip-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_ip_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..b056f3bbb2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-relationship-attribute.md @@ -0,0 +1,22 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_relationship_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + related_collection_id: '<RELATED_COLLECTION_ID>', + type: RelationshipType::ONETOONE, + two_way: false, # optional + key: '', # optional + two_way_key: '', # optional + on_delete: RelationMutate::CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..d94af0f22f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-string-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_string_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', # optional + array: false, # optional + encrypt: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..3ffd7321a1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-url-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create_url_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create.md b/docs/examples/1.8.x/server-ruby/examples/databases/create.md new file mode 100644 index 0000000000..62675e6ba7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.create( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..9b5a5f4006 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/decrement-document-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.decrement_document_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + attribute: '', + value: null, # optional + min: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..816b31e43f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/delete-attribute.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-ruby/examples/databases/delete-collection.md new file mode 100644 index 0000000000..28dd8d773c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/delete-collection.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/delete-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/delete-document.md new file mode 100644 index 0000000000..2102d2695b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/delete-document.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.delete_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/delete-documents.md new file mode 100644 index 0000000000..d0f10d0b41 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/delete-documents.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/delete-index.md b/docs/examples/1.8.x/server-ruby/examples/databases/delete-index.md new file mode 100644 index 0000000000..b5d9231508 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/delete-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/delete.md b/docs/examples/1.8.x/server-ruby/examples/databases/delete.md new file mode 100644 index 0000000000..802f5d6bd4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.delete( + database_id: '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/get-attribute.md new file mode 100644 index 0000000000..1558de656a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/get-attribute.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.get_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/get-collection.md b/docs/examples/1.8.x/server-ruby/examples/databases/get-collection.md new file mode 100644 index 0000000000..89ae0e32ac --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/get-collection.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.get_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/get-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/get-document.md new file mode 100644 index 0000000000..f43a1a2924 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/get-document.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.get_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/get-index.md b/docs/examples/1.8.x/server-ruby/examples/databases/get-index.md new file mode 100644 index 0000000000..cd5fca3d60 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/get-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.get_index( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/get.md b/docs/examples/1.8.x/server-ruby/examples/databases/get.md new file mode 100644 index 0000000000..c042cd7c4e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.get( + database_id: '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..40d8ba2ab7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/increment-document-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.increment_document_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + attribute: '', + value: null, # optional + max: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-ruby/examples/databases/list-attributes.md new file mode 100644 index 0000000000..f1ec0dedcd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/list-attributes.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.list_attributes( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/list-collections.md b/docs/examples/1.8.x/server-ruby/examples/databases/list-collections.md new file mode 100644 index 0000000000..26f3d35552 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/list-collections.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.list_collections( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/list-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/list-documents.md new file mode 100644 index 0000000000..6617198d3f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/list-documents.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.list_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-ruby/examples/databases/list-indexes.md new file mode 100644 index 0000000000..f98c62a444 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/list-indexes.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.list_indexes( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/list.md b/docs/examples/1.8.x/server-ruby/examples/databases/list.md new file mode 100644 index 0000000000..2e093f73b1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..72f0eac088 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-boolean-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_boolean_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: false, + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-collection.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-collection.md new file mode 100644 index 0000000000..d42a651cbb --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-collection.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_collection( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + document_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..b726283323 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-datetime-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_datetime_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-document.md new file mode 100644 index 0000000000..485eb0485a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-document.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +databases = Databases.new(client) + +result = databases.update_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>', + data: {}, # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-documents.md new file mode 100644 index 0000000000..2f6907294f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-documents.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + data: {}, # optional + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..3324e39860 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-email-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_email_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: 'email@example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..72a0515467 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-enum-attribute.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_enum_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..738e6de36a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-float-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_float_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..dece44544f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-integer-attribute.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_integer_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..deceb732e4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-ip-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_ip_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..679edb823e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-relationship-attribute.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_relationship_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + on_delete: RelationMutate::CASCADE, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..66f458e800 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-string-attribute.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_string_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-ruby/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..cbf417b6bf --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update-url-attribute.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update_url_attribute( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + key: '', + required: false, + default: 'https://example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/update.md b/docs/examples/1.8.x/server-ruby/examples/databases/update.md new file mode 100644 index 0000000000..e5c02a11f1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/update.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.update( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md new file mode 100644 index 0000000000..d165e1e6cd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_key('<YOUR_API_KEY>') # Your secret API key + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +databases = Databases.new(client) + +result = databases.upsert_document( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>', + document_id: '<DOCUMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..8e404e684e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_admin('') # + .set_key('<YOUR_API_KEY>') # Your secret API key + +databases = Databases.new(client) + +result = databases.upsert_documents( + database_id: '<DATABASE_ID>', + collection_id: '<COLLECTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-deployment.md new file mode 100644 index 0000000000..0ff3db31e9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-deployment.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_deployment( + function_id: '<FUNCTION_ID>', + code: InputFile.from_path('dir/file.png'), + activate: false, + entrypoint: '<ENTRYPOINT>', # optional + commands: '<COMMANDS>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..cd432afc95 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_duplicate_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>', + build_id: '<BUILD_ID>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md new file mode 100644 index 0000000000..b64b1d5c57 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +functions = Functions.new(client) + +result = functions.create_execution( + function_id: '<FUNCTION_ID>', + body: '<BODY>', # optional + async: false, # optional + path: '<PATH>', # optional + method: ExecutionMethod::GET, # optional + headers: {}, # optional + scheduled_at: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..a447b6e9aa --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-template-deployment.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_template_deployment( + function_id: '<FUNCTION_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + root_directory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-variable.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-variable.md new file mode 100644 index 0000000000..3c957d45f8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-variable.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_variable( + function_id: '<FUNCTION_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..75bd3c49f5 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-vcs-deployment.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create_vcs_deployment( + function_id: '<FUNCTION_ID>', + type: VCSDeploymentType::BRANCH, + reference: '<REFERENCE>', + activate: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create.md b/docs/examples/1.8.x/server-ruby/examples/functions/create.md new file mode 100644 index 0000000000..cad021b5f8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.create( + function_id: '<FUNCTION_ID>', + name: '<NAME>', + runtime: ::NODE_14_5, + execute: ["any"], # optional + events: [], # optional + schedule: '', # optional + timeout: 1, # optional + enabled: false, # optional + logging: false, # optional + entrypoint: '<ENTRYPOINT>', # optional + commands: '<COMMANDS>', # optional + scopes: [], # optional + installation_id: '<INSTALLATION_ID>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + specification: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..192172cf9c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/delete-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.delete_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-ruby/examples/functions/delete-execution.md new file mode 100644 index 0000000000..4172aade32 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/delete-execution.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.delete_execution( + function_id: '<FUNCTION_ID>', + execution_id: '<EXECUTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-ruby/examples/functions/delete-variable.md new file mode 100644 index 0000000000..ffbe69f106 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/delete-variable.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.delete_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/delete.md b/docs/examples/1.8.x/server-ruby/examples/functions/delete.md new file mode 100644 index 0000000000..e5c59e39c0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.delete( + function_id: '<FUNCTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-ruby/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..a1a50a5f94 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/get-deployment-download.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.get_deployment_download( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/get-deployment.md new file mode 100644 index 0000000000..1651ae1285 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/get-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.get_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/get-execution.md b/docs/examples/1.8.x/server-ruby/examples/functions/get-execution.md new file mode 100644 index 0000000000..7ab910e785 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/get-execution.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +functions = Functions.new(client) + +result = functions.get_execution( + function_id: '<FUNCTION_ID>', + execution_id: '<EXECUTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/get-variable.md b/docs/examples/1.8.x/server-ruby/examples/functions/get-variable.md new file mode 100644 index 0000000000..5022cf84d6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/get-variable.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.get_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/get.md b/docs/examples/1.8.x/server-ruby/examples/functions/get.md new file mode 100644 index 0000000000..5cfd135028 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.get( + function_id: '<FUNCTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-ruby/examples/functions/list-deployments.md new file mode 100644 index 0000000000..3df3dd3ee8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/list-deployments.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_deployments( + function_id: '<FUNCTION_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/list-executions.md b/docs/examples/1.8.x/server-ruby/examples/functions/list-executions.md new file mode 100644 index 0000000000..57b4ba26bc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/list-executions.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +functions = Functions.new(client) + +result = functions.list_executions( + function_id: '<FUNCTION_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-ruby/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..1b6d25ee6d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/list-runtimes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_runtimes() diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-ruby/examples/functions/list-specifications.md new file mode 100644 index 0000000000..2c9cf7c470 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/list-specifications.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_specifications() diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/list-variables.md b/docs/examples/1.8.x/server-ruby/examples/functions/list-variables.md new file mode 100644 index 0000000000..dd3fc4f2ae --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/list-variables.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list_variables( + function_id: '<FUNCTION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/list.md b/docs/examples/1.8.x/server-ruby/examples/functions/list.md new file mode 100644 index 0000000000..0cab1c34d7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-ruby/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..6664e05079 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/update-deployment-status.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.update_deployment_status( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-ruby/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..68c5d7fdfd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/update-function-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.update_function_deployment( + function_id: '<FUNCTION_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/update-variable.md b/docs/examples/1.8.x/server-ruby/examples/functions/update-variable.md new file mode 100644 index 0000000000..7c4e402820 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/update-variable.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.update_variable( + function_id: '<FUNCTION_ID>', + variable_id: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', # optional + secret: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/update.md b/docs/examples/1.8.x/server-ruby/examples/functions/update.md new file mode 100644 index 0000000000..45b6e32ab3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/functions/update.md @@ -0,0 +1,31 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +functions = Functions.new(client) + +result = functions.update( + function_id: '<FUNCTION_ID>', + name: '<NAME>', + runtime: ::NODE_14_5, # optional + execute: ["any"], # optional + events: [], # optional + schedule: '', # optional + timeout: 1, # optional + enabled: false, # optional + logging: false, # optional + entrypoint: '<ENTRYPOINT>', # optional + commands: '<COMMANDS>', # optional + scopes: [], # optional + installation_id: '<INSTALLATION_ID>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + specification: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/graphql/mutation.md b/docs/examples/1.8.x/server-ruby/examples/graphql/mutation.md new file mode 100644 index 0000000000..08ca6f30d2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/graphql/mutation.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +graphql = Graphql.new(client) + +result = graphql.mutation( + query: {} +) diff --git a/docs/examples/1.8.x/server-ruby/examples/graphql/query.md b/docs/examples/1.8.x/server-ruby/examples/graphql/query.md new file mode 100644 index 0000000000..05e69506a1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/graphql/query.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +graphql = Graphql.new(client) + +result = graphql.query( + query: {} +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-ruby/examples/health/get-antivirus.md new file mode 100644 index 0000000000..5f8d06056d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-antivirus.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_antivirus() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-cache.md b/docs/examples/1.8.x/server-ruby/examples/health/get-cache.md new file mode 100644 index 0000000000..01bd46cd0b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-cache.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_cache() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-certificate.md b/docs/examples/1.8.x/server-ruby/examples/health/get-certificate.md new file mode 100644 index 0000000000..64699d42d0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-certificate.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_certificate( + domain: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-d-b.md b/docs/examples/1.8.x/server-ruby/examples/health/get-d-b.md new file mode 100644 index 0000000000..d9668339c5 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-d-b.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_db() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-ruby/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..73e1983e3a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-failed-jobs.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_failed_jobs( + name: ::V1_DATABASE, + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-ruby/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..86e9c409ed --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-pub-sub.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_pub_sub() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..9f876982ef --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-builds.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_builds( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..d10c2feb39 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-certificates.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_certificates( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..37024d8144 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-databases.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_databases( + name: '<NAME>', # optional + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..2508be22ba --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-deletes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_deletes( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..e5b56474bc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-functions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_functions( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..cb35ac333b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-logs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_logs( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..36cfec3d87 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-mails.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_mails( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..d317f2a74c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-messaging.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_messaging( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..3c68c865dc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-migrations.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_migrations( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..7024bac307 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-stats-resources.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_stats_resources( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..b687bd8789 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-usage.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_usage( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..28f28ea78a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-queue-webhooks.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_queue_webhooks( + threshold: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-ruby/examples/health/get-storage-local.md new file mode 100644 index 0000000000..a122de50ee --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-storage-local.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_storage_local() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-storage.md b/docs/examples/1.8.x/server-ruby/examples/health/get-storage.md new file mode 100644 index 0000000000..ee778643ec --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-storage.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_storage() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get-time.md b/docs/examples/1.8.x/server-ruby/examples/health/get-time.md new file mode 100644 index 0000000000..9d345557a3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get-time.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get_time() diff --git a/docs/examples/1.8.x/server-ruby/examples/health/get.md b/docs/examples/1.8.x/server-ruby/examples/health/get.md new file mode 100644 index 0000000000..4bbf0c0eb0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/health/get.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +health = Health.new(client) + +result = health.get() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/get.md b/docs/examples/1.8.x/server-ruby/examples/locale/get.md new file mode 100644 index 0000000000..264da0e187 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/get.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.get() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-codes.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-codes.md new file mode 100644 index 0000000000..27632669f0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-codes.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_codes() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-continents.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-continents.md new file mode 100644 index 0000000000..b78f130201 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-continents.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_continents() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..8498f2bdda --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-countries-e-u.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_countries_eu() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..8fa087e920 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-countries-phones.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_countries_phones() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-countries.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-countries.md new file mode 100644 index 0000000000..a635a4e0b3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-countries.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_countries() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-currencies.md new file mode 100644 index 0000000000..60e9d94df9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-currencies.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_currencies() diff --git a/docs/examples/1.8.x/server-ruby/examples/locale/list-languages.md b/docs/examples/1.8.x/server-ruby/examples/locale/list-languages.md new file mode 100644 index 0000000000..e5b9df1945 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/locale/list-languages.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +locale = Locale.new(client) + +result = locale.list_languages() diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..a280340847 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-apns-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_apns_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + auth_key: '<AUTH_KEY>', # optional + auth_key_id: '<AUTH_KEY_ID>', # optional + team_id: '<TEAM_ID>', # optional + bundle_id: '<BUNDLE_ID>', # optional + sandbox: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-email.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-email.md new file mode 100644 index 0000000000..573a5b83d4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-email.md @@ -0,0 +1,25 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_email( + message_id: '<MESSAGE_ID>', + subject: '<SUBJECT>', + content: '<CONTENT>', + topics: [], # optional + users: [], # optional + targets: [], # optional + cc: [], # optional + bcc: [], # optional + attachments: [], # optional + draft: false, # optional + html: false, # optional + scheduled_at: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..a1e8b67b51 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-fcm-provider.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_fcm_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + service_account_json: {}, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..aa5b7f1899 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,23 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_mailgun_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + api_key: '<API_KEY>', # optional + domain: '<DOMAIN>', # optional + is_eu_region: false, # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..35a192f148 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-msg91provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_msg91_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + template_id: '<TEMPLATE_ID>', # optional + sender_id: '<SENDER_ID>', # optional + auth_key: '<AUTH_KEY>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-push.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-push.md new file mode 100644 index 0000000000..5c58fa542b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-push.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_push( + message_id: '<MESSAGE_ID>', + title: '<TITLE>', # optional + body: '<BODY>', # optional + topics: [], # optional + users: [], # optional + targets: [], # optional + data: {}, # optional + action: '<ACTION>', # optional + image: '[ID1:ID2]', # optional + icon: '<ICON>', # optional + sound: '<SOUND>', # optional + color: '<COLOR>', # optional + tag: '<TAG>', # optional + badge: null, # optional + draft: false, # optional + scheduled_at: '', # optional + content_available: false, # optional + critical: false, # optional + priority: MessagePriority::NORMAL # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..eae3ad3ece --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_sendgrid_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + api_key: '<API_KEY>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-sms.md new file mode 100644 index 0000000000..901ec40c05 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-sms.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_sms( + message_id: '<MESSAGE_ID>', + content: '<CONTENT>', + topics: [], # optional + users: [], # optional + targets: [], # optional + draft: false, # optional + scheduled_at: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..b062e574b4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-smtp-provider.md @@ -0,0 +1,27 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_smtp_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + host: '<HOST>', + port: 1, # optional + username: '<USERNAME>', # optional + password: '<PASSWORD>', # optional + encryption: SmtpEncryption::NONE, # optional + auto_tls: false, # optional + mailer: '<MAILER>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: 'email@example.com', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..1f6fa43736 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-subscriber.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging.new(client) + +result = messaging.create_subscriber( + topic_id: '<TOPIC_ID>', + subscriber_id: '<SUBSCRIBER_ID>', + target_id: '<TARGET_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..b26d9d2784 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-telesign-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_telesign_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + customer_id: '<CUSTOMER_ID>', # optional + api_key: '<API_KEY>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..4fd1a3683e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_textmagic_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + username: '<USERNAME>', # optional + api_key: '<API_KEY>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-topic.md new file mode 100644 index 0000000000..da2cf5e57b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-topic.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_topic( + topic_id: '<TOPIC_ID>', + name: '<NAME>', + subscribe: ["any"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..a945602646 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-twilio-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_twilio_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + account_sid: '<ACCOUNT_SID>', # optional + auth_token: '<AUTH_TOKEN>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..5a5f6eb72b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/create-vonage-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.create_vonage_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', + from: '+12065550100', # optional + api_key: '<API_KEY>', # optional + api_secret: '<API_SECRET>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..3c19e1ba0f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/delete-provider.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.delete_provider( + provider_id: '<PROVIDER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-ruby/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..a82e5e94c2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/delete-subscriber.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +messaging = Messaging.new(client) + +result = messaging.delete_subscriber( + topic_id: '<TOPIC_ID>', + subscriber_id: '<SUBSCRIBER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-ruby/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..cb58ee5c6c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/delete-topic.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.delete_topic( + topic_id: '<TOPIC_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/delete.md b/docs/examples/1.8.x/server-ruby/examples/messaging/delete.md new file mode 100644 index 0000000000..e3db26127d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.delete( + message_id: '<MESSAGE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/get-message.md b/docs/examples/1.8.x/server-ruby/examples/messaging/get-message.md new file mode 100644 index 0000000000..f5449a0be4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/get-message.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.get_message( + message_id: '<MESSAGE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/get-provider.md new file mode 100644 index 0000000000..ddb28da4de --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/get-provider.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.get_provider( + provider_id: '<PROVIDER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-ruby/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..3c7d05334e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/get-subscriber.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.get_subscriber( + topic_id: '<TOPIC_ID>', + subscriber_id: '<SUBSCRIBER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-ruby/examples/messaging/get-topic.md new file mode 100644 index 0000000000..9ff732fc26 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/get-topic.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.get_topic( + topic_id: '<TOPIC_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..f20d6fb491 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-message-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_message_logs( + message_id: '<MESSAGE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-messages.md new file mode 100644 index 0000000000..ffc5dcdbc6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-messages.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_messages( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..af3751a18f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-provider-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_provider_logs( + provider_id: '<PROVIDER_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-providers.md new file mode 100644 index 0000000000..a857f0562f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-providers.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_providers( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..06550e7067 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_subscriber_logs( + subscriber_id: '<SUBSCRIBER_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..07ebc99bab --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-subscribers.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_subscribers( + topic_id: '<TOPIC_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-targets.md new file mode 100644 index 0000000000..0407255d86 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-targets.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_targets( + message_id: '<MESSAGE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..9b53c47f82 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-topic-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_topic_logs( + topic_id: '<TOPIC_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-ruby/examples/messaging/list-topics.md new file mode 100644 index 0000000000..5e7b6740cc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/list-topics.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.list_topics( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..b19704aaed --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-apns-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_apns_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + auth_key: '<AUTH_KEY>', # optional + auth_key_id: '<AUTH_KEY_ID>', # optional + team_id: '<TEAM_ID>', # optional + bundle_id: '<BUNDLE_ID>', # optional + sandbox: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-email.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-email.md new file mode 100644 index 0000000000..aa3593292f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-email.md @@ -0,0 +1,25 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_email( + message_id: '<MESSAGE_ID>', + topics: [], # optional + users: [], # optional + targets: [], # optional + subject: '<SUBJECT>', # optional + content: '<CONTENT>', # optional + draft: false, # optional + html: false, # optional + cc: [], # optional + bcc: [], # optional + scheduled_at: '', # optional + attachments: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..44ea0d28de --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-fcm-provider.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_fcm_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + service_account_json: {} # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..a2e53190d7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,23 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_mailgun_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + api_key: '<API_KEY>', # optional + domain: '<DOMAIN>', # optional + is_eu_region: false, # optional + enabled: false, # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..0e88382850 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-msg91provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_msg91_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + template_id: '<TEMPLATE_ID>', # optional + sender_id: '<SENDER_ID>', # optional + auth_key: '<AUTH_KEY>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-push.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-push.md new file mode 100644 index 0000000000..42a5104ccb --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-push.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_push( + message_id: '<MESSAGE_ID>', + topics: [], # optional + users: [], # optional + targets: [], # optional + title: '<TITLE>', # optional + body: '<BODY>', # optional + data: {}, # optional + action: '<ACTION>', # optional + image: '[ID1:ID2]', # optional + icon: '<ICON>', # optional + sound: '<SOUND>', # optional + color: '<COLOR>', # optional + tag: '<TAG>', # optional + badge: null, # optional + draft: false, # optional + scheduled_at: '', # optional + content_available: false, # optional + critical: false, # optional + priority: MessagePriority::NORMAL # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..99f1a9c7f1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_sendgrid_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + api_key: '<API_KEY>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-sms.md new file mode 100644 index 0000000000..b31480c1a0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-sms.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_sms( + message_id: '<MESSAGE_ID>', + topics: [], # optional + users: [], # optional + targets: [], # optional + content: '<CONTENT>', # optional + draft: false, # optional + scheduled_at: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..bbaebf3c32 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-smtp-provider.md @@ -0,0 +1,27 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_smtp_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + host: '<HOST>', # optional + port: 1, # optional + username: '<USERNAME>', # optional + password: '<PASSWORD>', # optional + encryption: SmtpEncryption::NONE, # optional + auto_tls: false, # optional + mailer: '<MAILER>', # optional + from_name: '<FROM_NAME>', # optional + from_email: 'email@example.com', # optional + reply_to_name: '<REPLY_TO_NAME>', # optional + reply_to_email: '<REPLY_TO_EMAIL>', # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..4f1bf6ff5b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-telesign-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_telesign_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + customer_id: '<CUSTOMER_ID>', # optional + api_key: '<API_KEY>', # optional + from: '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..c8cd2f0daf --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_textmagic_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + username: '<USERNAME>', # optional + api_key: '<API_KEY>', # optional + from: '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-topic.md new file mode 100644 index 0000000000..d20d945385 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-topic.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_topic( + topic_id: '<TOPIC_ID>', + name: '<NAME>', # optional + subscribe: ["any"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..0f6a6761e1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-twilio-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_twilio_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + account_sid: '<ACCOUNT_SID>', # optional + auth_token: '<AUTH_TOKEN>', # optional + from: '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-ruby/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..e75bfbd98e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/messaging/update-vonage-provider.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +messaging = Messaging.new(client) + +result = messaging.update_vonage_provider( + provider_id: '<PROVIDER_ID>', + name: '<NAME>', # optional + enabled: false, # optional + api_key: '<API_KEY>', # optional + api_secret: '<API_SECRET>', # optional + from: '<FROM>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/create-deployment.md new file mode 100644 index 0000000000..b392b8679a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/create-deployment.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_deployment( + site_id: '<SITE_ID>', + code: InputFile.from_path('dir/file.png'), + activate: false, + install_command: '<INSTALL_COMMAND>', # optional + build_command: '<BUILD_COMMAND>', # optional + output_directory: '<OUTPUT_DIRECTORY>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..f72b7a641b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_duplicate_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..7df9665590 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/create-template-deployment.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_template_deployment( + site_id: '<SITE_ID>', + repository: '<REPOSITORY>', + owner: '<OWNER>', + root_directory: '<ROOT_DIRECTORY>', + version: '<VERSION>', + activate: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/create-variable.md b/docs/examples/1.8.x/server-ruby/examples/sites/create-variable.md new file mode 100644 index 0000000000..4d2031f8ea --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/create-variable.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_variable( + site_id: '<SITE_ID>', + key: '<KEY>', + value: '<VALUE>', + secret: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..2e72b6e3f1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/create-vcs-deployment.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create_vcs_deployment( + site_id: '<SITE_ID>', + type: VCSDeploymentType::BRANCH, + reference: '<REFERENCE>', + activate: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/create.md b/docs/examples/1.8.x/server-ruby/examples/sites/create.md new file mode 100644 index 0000000000..2243185485 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/create.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.create( + site_id: '<SITE_ID>', + name: '<NAME>', + framework: ::ANALOG, + build_runtime: ::NODE_14_5, + enabled: false, # optional + logging: false, # optional + timeout: 1, # optional + install_command: '<INSTALL_COMMAND>', # optional + build_command: '<BUILD_COMMAND>', # optional + output_directory: '<OUTPUT_DIRECTORY>', # optional + adapter: ::STATIC, # optional + installation_id: '<INSTALLATION_ID>', # optional + fallback_file: '<FALLBACK_FILE>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + specification: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..6f96e05023 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/delete-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.delete_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/delete-log.md b/docs/examples/1.8.x/server-ruby/examples/sites/delete-log.md new file mode 100644 index 0000000000..556f3e2855 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/delete-log.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.delete_log( + site_id: '<SITE_ID>', + log_id: '<LOG_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-ruby/examples/sites/delete-variable.md new file mode 100644 index 0000000000..ca5e51b2b9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/delete-variable.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.delete_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/delete.md b/docs/examples/1.8.x/server-ruby/examples/sites/delete.md new file mode 100644 index 0000000000..e92d6428e1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.delete( + site_id: '<SITE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-ruby/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..85162626ba --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/get-deployment-download.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get_deployment_download( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>', + type: DeploymentDownloadType::SOURCE # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/get-deployment.md new file mode 100644 index 0000000000..79f47e4aad --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/get-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/get-log.md b/docs/examples/1.8.x/server-ruby/examples/sites/get-log.md new file mode 100644 index 0000000000..2e5e8c2d4c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/get-log.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get_log( + site_id: '<SITE_ID>', + log_id: '<LOG_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/get-variable.md b/docs/examples/1.8.x/server-ruby/examples/sites/get-variable.md new file mode 100644 index 0000000000..ac27efcd50 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/get-variable.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/get.md b/docs/examples/1.8.x/server-ruby/examples/sites/get.md new file mode 100644 index 0000000000..a8d3aac1b4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.get( + site_id: '<SITE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-ruby/examples/sites/list-deployments.md new file mode 100644 index 0000000000..8571f8561a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/list-deployments.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_deployments( + site_id: '<SITE_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-ruby/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..61f18fbf6f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/list-frameworks.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_frameworks() diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/list-logs.md b/docs/examples/1.8.x/server-ruby/examples/sites/list-logs.md new file mode 100644 index 0000000000..919be968c9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/list-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_logs( + site_id: '<SITE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-ruby/examples/sites/list-specifications.md new file mode 100644 index 0000000000..42f41157fb --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/list-specifications.md @@ -0,0 +1,12 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_specifications() diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/list-variables.md b/docs/examples/1.8.x/server-ruby/examples/sites/list-variables.md new file mode 100644 index 0000000000..cf10fa4628 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/list-variables.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list_variables( + site_id: '<SITE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/list.md b/docs/examples/1.8.x/server-ruby/examples/sites/list.md new file mode 100644 index 0000000000..ba70205236 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-ruby/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..859ad22b61 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/update-deployment-status.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.update_deployment_status( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-ruby/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..bc033e931e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/update-site-deployment.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.update_site_deployment( + site_id: '<SITE_ID>', + deployment_id: '<DEPLOYMENT_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/update-variable.md b/docs/examples/1.8.x/server-ruby/examples/sites/update-variable.md new file mode 100644 index 0000000000..e61f129573 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/update-variable.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.update_variable( + site_id: '<SITE_ID>', + variable_id: '<VARIABLE_ID>', + key: '<KEY>', + value: '<VALUE>', # optional + secret: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/sites/update.md b/docs/examples/1.8.x/server-ruby/examples/sites/update.md new file mode 100644 index 0000000000..922255ab65 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/sites/update.md @@ -0,0 +1,32 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +sites = Sites.new(client) + +result = sites.update( + site_id: '<SITE_ID>', + name: '<NAME>', + framework: ::ANALOG, + enabled: false, # optional + logging: false, # optional + timeout: 1, # optional + install_command: '<INSTALL_COMMAND>', # optional + build_command: '<BUILD_COMMAND>', # optional + output_directory: '<OUTPUT_DIRECTORY>', # optional + build_runtime: ::NODE_14_5, # optional + adapter: ::STATIC, # optional + fallback_file: '<FALLBACK_FILE>', # optional + installation_id: '<INSTALLATION_ID>', # optional + provider_repository_id: '<PROVIDER_REPOSITORY_ID>', # optional + provider_branch: '<PROVIDER_BRANCH>', # optional + provider_silent_mode: false, # optional + provider_root_directory: '<PROVIDER_ROOT_DIRECTORY>', # optional + specification: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-ruby/examples/storage/create-bucket.md new file mode 100644 index 0000000000..643431ed2c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/create-bucket.md @@ -0,0 +1,23 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.create_bucket( + bucket_id: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + file_security: false, # optional + enabled: false, # optional + maximum_file_size: 1, # optional + allowed_file_extensions: [], # optional + compression: ::NONE, # optional + encryption: false, # optional + antivirus: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/create-file.md b/docs/examples/1.8.x/server-ruby/examples/storage/create-file.md new file mode 100644 index 0000000000..99e07c33f4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/create-file.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.create_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + file: InputFile.from_path('dir/file.png'), + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-ruby/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..dda3264e66 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/delete-bucket.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.delete_bucket( + bucket_id: '<BUCKET_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/delete-file.md b/docs/examples/1.8.x/server-ruby/examples/storage/delete-file.md new file mode 100644 index 0000000000..eef058857c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/delete-file.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.delete_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-ruby/examples/storage/get-bucket.md new file mode 100644 index 0000000000..7c8580dcaf --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/get-bucket.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.get_bucket( + bucket_id: '<BUCKET_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-ruby/examples/storage/get-file-download.md new file mode 100644 index 0000000000..7b7075184a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/get-file-download.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file_download( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + token: '<TOKEN>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-ruby/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..23254615d3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/get-file-preview.md @@ -0,0 +1,27 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file_preview( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + width: 0, # optional + height: 0, # optional + gravity: ImageGravity::CENTER, # optional + quality: -1, # optional + border_width: 0, # optional + border_color: '', # optional + border_radius: 0, # optional + opacity: 0, # optional + rotation: -360, # optional + background: '', # optional + output: ImageFormat::JPG, # optional + token: '<TOKEN>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-ruby/examples/storage/get-file-view.md new file mode 100644 index 0000000000..c9e9952f05 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/get-file-view.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file_view( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + token: '<TOKEN>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/get-file.md b/docs/examples/1.8.x/server-ruby/examples/storage/get-file.md new file mode 100644 index 0000000000..b816bdba02 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/get-file.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.get_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-ruby/examples/storage/list-buckets.md new file mode 100644 index 0000000000..dfee831b69 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/list-buckets.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.list_buckets( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/list-files.md b/docs/examples/1.8.x/server-ruby/examples/storage/list-files.md new file mode 100644 index 0000000000..078ff55e41 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/list-files.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.list_files( + bucket_id: '<BUCKET_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-ruby/examples/storage/update-bucket.md new file mode 100644 index 0000000000..09b915eb5f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/update-bucket.md @@ -0,0 +1,23 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +storage = Storage.new(client) + +result = storage.update_bucket( + bucket_id: '<BUCKET_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + file_security: false, # optional + enabled: false, # optional + maximum_file_size: 1, # optional + allowed_file_extensions: [], # optional + compression: ::NONE, # optional + encryption: false, # optional + antivirus: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/storage/update-file.md b/docs/examples/1.8.x/server-ruby/examples/storage/update-file.md new file mode 100644 index 0000000000..a454499d9d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/storage/update-file.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +storage = Storage.new(client) + +result = storage.update_file( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + name: '<NAME>', # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..7df3908513 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: false, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..2d65509184 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md new file mode 100644 index 0000000000..01f7ad43b5 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..97fcb589e4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md new file mode 100644 index 0000000000..9df32a3f5b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md new file mode 100644 index 0000000000..1ec5d315dc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + type: ::KEY, + columns: [], + orders: [], # optional + lengths: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..d0c5c78108 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..0c97840a27 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..65f4a15966 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md @@ -0,0 +1,22 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + related_table_id: '<RELATED_TABLE_ID>', + type: ::ONETOONE, + two_way: false, # optional + key: '', # optional + two_way_key: '', # optional + on_delete: ::CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md new file mode 100644 index 0000000000..a625249700 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_key('<YOUR_API_KEY>') # Your secret API key + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +tables = Tables.new(client) + +result = tables.create_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md new file mode 100644 index 0000000000..2e78b96cbc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_admin('') # + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + rows: [] +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md new file mode 100644 index 0000000000..d47cf49e0c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', # optional + array: false, # optional + encrypt: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md new file mode 100644 index 0000000000..fcfebac7a8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create.md b/docs/examples/1.8.x/server-ruby/examples/tables/create.md new file mode 100644 index 0000000000..5a255fafac --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + row_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..e22afcb0ad --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.decrement_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '', + value: null, # optional + min: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md new file mode 100644 index 0000000000..245864053f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.delete_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md new file mode 100644 index 0000000000..54bd5455aa --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.delete_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md new file mode 100644 index 0000000000..9841fc2d2f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables = Tables.new(client) + +result = tables.delete_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md new file mode 100644 index 0000000000..7be1e4bc70 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.delete_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete.md new file mode 100644 index 0000000000..ca607f2b6b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.delete( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md new file mode 100644 index 0000000000..1a1469d005 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.get_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md new file mode 100644 index 0000000000..7d762ce8ae --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.get_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md new file mode 100644 index 0000000000..4526bb7316 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables = Tables.new(client) + +result = tables.get_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get.md b/docs/examples/1.8.x/server-ruby/examples/tables/get.md new file mode 100644 index 0000000000..22ba02aebc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/get.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.get( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..c0a91d4b62 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.increment_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '', + value: null, # optional + max: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md new file mode 100644 index 0000000000..7e851564c2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.list_columns( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md new file mode 100644 index 0000000000..0789291071 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.list_indexes( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md new file mode 100644 index 0000000000..bc9a0a49f6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables = Tables.new(client) + +result = tables.list_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list.md b/docs/examples/1.8.x/server-ruby/examples/tables/list.md new file mode 100644 index 0000000000..7cf987ebb9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/list.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.list( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..a09b365cd1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: false, + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..55e0484b4c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md new file mode 100644 index 0000000000..285cd6655a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..90773ed9e4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md new file mode 100644 index 0000000000..0bb992bd3c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..35f8c471a8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..2ad1840a9d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..9d82801fe8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + on_delete: ::CASCADE, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md new file mode 100644 index 0000000000..500927dcf0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables = Tables.new(client) + +result = tables.update_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md new file mode 100644 index 0000000000..8cee1810be --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + data: {}, # optional + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md new file mode 100644 index 0000000000..2240f49555 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md new file mode 100644 index 0000000000..0947a78a9e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update.md b/docs/examples/1.8.x/server-ruby/examples/tables/update.md new file mode 100644 index 0000000000..003d3d041c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + row_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md new file mode 100644 index 0000000000..d96172e1ec --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_key('<YOUR_API_KEY>') # Your secret API key + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +tables = Tables.new(client) + +result = tables.upsert_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..8987b1ee0e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_admin('') # + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.upsert_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/create-membership.md b/docs/examples/1.8.x/server-ruby/examples/teams/create-membership.md new file mode 100644 index 0000000000..6c0faba77d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/create-membership.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.create_membership( + team_id: '<TEAM_ID>', + roles: [], + email: 'email@example.com', # optional + user_id: '<USER_ID>', # optional + phone: '+12065550100', # optional + url: 'https://example.com', # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/create.md b/docs/examples/1.8.x/server-ruby/examples/teams/create.md new file mode 100644 index 0000000000..ba71a1dfc4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/create.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.create( + team_id: '<TEAM_ID>', + name: '<NAME>', + roles: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-ruby/examples/teams/delete-membership.md new file mode 100644 index 0000000000..5d815a8ca3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/delete-membership.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.delete_membership( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/delete.md b/docs/examples/1.8.x/server-ruby/examples/teams/delete.md new file mode 100644 index 0000000000..c9f7c400e9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.delete( + team_id: '<TEAM_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/get-membership.md b/docs/examples/1.8.x/server-ruby/examples/teams/get-membership.md new file mode 100644 index 0000000000..41a2c7bfb4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/get-membership.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.get_membership( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-ruby/examples/teams/get-prefs.md new file mode 100644 index 0000000000..e6b2cfadce --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/get-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.get_prefs( + team_id: '<TEAM_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/get.md b/docs/examples/1.8.x/server-ruby/examples/teams/get.md new file mode 100644 index 0000000000..af51193cd3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.get( + team_id: '<TEAM_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-ruby/examples/teams/list-memberships.md new file mode 100644 index 0000000000..db48f0cfc6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/list-memberships.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.list_memberships( + team_id: '<TEAM_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/list.md b/docs/examples/1.8.x/server-ruby/examples/teams/list.md new file mode 100644 index 0000000000..9e96391975 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-ruby/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..40d82b86f1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/update-membership-status.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_membership_status( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>', + user_id: '<USER_ID>', + secret: '<SECRET>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/update-membership.md b/docs/examples/1.8.x/server-ruby/examples/teams/update-membership.md new file mode 100644 index 0000000000..92b69b1773 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/update-membership.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_membership( + team_id: '<TEAM_ID>', + membership_id: '<MEMBERSHIP_ID>', + roles: [] +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/update-name.md b/docs/examples/1.8.x/server-ruby/examples/teams/update-name.md new file mode 100644 index 0000000000..74f785c4ca --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/update-name.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_name( + team_id: '<TEAM_ID>', + name: '<NAME>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-ruby/examples/teams/update-prefs.md new file mode 100644 index 0000000000..03426aa3b9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/teams/update-prefs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_prefs( + team_id: '<TEAM_ID>', + prefs: {} +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-ruby/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..8c432c5255 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tokens/create-file-token.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens.new(client) + +result = tokens.create_file_token( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + expire: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tokens/delete.md b/docs/examples/1.8.x/server-ruby/examples/tokens/delete.md new file mode 100644 index 0000000000..cb59147f42 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tokens/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens.new(client) + +result = tokens.delete( + token_id: '<TOKEN_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tokens/get.md b/docs/examples/1.8.x/server-ruby/examples/tokens/get.md new file mode 100644 index 0000000000..ef87c74294 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tokens/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens.new(client) + +result = tokens.get( + token_id: '<TOKEN_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tokens/list.md b/docs/examples/1.8.x/server-ruby/examples/tokens/list.md new file mode 100644 index 0000000000..4932f04151 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tokens/list.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens.new(client) + +result = tokens.list( + bucket_id: '<BUCKET_ID>', + file_id: '<FILE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tokens/update.md b/docs/examples/1.8.x/server-ruby/examples/tokens/update.md new file mode 100644 index 0000000000..91713730fb --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tokens/update.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tokens = Tokens.new(client) + +result = tokens.update( + token_id: '<TOKEN_ID>', + expire: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-argon2user.md new file mode 100644 index 0000000000..8da9e0b1ff --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-argon2user.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_argon2_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..7c2b852d69 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-bcrypt-user.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_bcrypt_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-ruby/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..57f7f1d32f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-j-w-t.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_jwt( + user_id: '<USER_ID>', + session_id: '<SESSION_ID>', # optional + duration: 0 # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..63fb68742e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-m-d5user.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_md5_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-ruby/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..0cdea46af3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_mfa_recovery_codes( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..7cd898a6fc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-p-h-pass-user.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_ph_pass_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..f3951d9c80 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-s-h-a-user.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_sha_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + password_version: PasswordHash::SHA1, # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..d84c2eed48 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_scrypt_modified_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + password_salt: '<PASSWORD_SALT>', + password_salt_separator: '<PASSWORD_SALT_SEPARATOR>', + password_signer_key: '<PASSWORD_SIGNER_KEY>', + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..53aa253d2a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-scrypt-user.md @@ -0,0 +1,22 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_scrypt_user( + user_id: '<USER_ID>', + email: 'email@example.com', + password: 'password', + password_salt: '<PASSWORD_SALT>', + password_cpu: null, + password_memory: null, + password_parallel: null, + password_length: null, + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-session.md b/docs/examples/1.8.x/server-ruby/examples/users/create-session.md new file mode 100644 index 0000000000..32d2b5f2ad --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-session.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_session( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-target.md b/docs/examples/1.8.x/server-ruby/examples/users/create-target.md new file mode 100644 index 0000000000..3e87868df6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-target.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>', + provider_type: MessagingProviderType::EMAIL, + identifier: '<IDENTIFIER>', + provider_id: '<PROVIDER_ID>', # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create-token.md b/docs/examples/1.8.x/server-ruby/examples/users/create-token.md new file mode 100644 index 0000000000..85e5f448ca --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create-token.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create_token( + user_id: '<USER_ID>', + length: 4, # optional + expire: 60 # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/create.md b/docs/examples/1.8.x/server-ruby/examples/users/create.md new file mode 100644 index 0000000000..4f57adeb87 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/create.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.create( + user_id: '<USER_ID>', + email: 'email@example.com', # optional + phone: '+12065550100', # optional + password: '', # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/delete-identity.md b/docs/examples/1.8.x/server-ruby/examples/users/delete-identity.md new file mode 100644 index 0000000000..d2482dfae1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/delete-identity.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_identity( + identity_id: '<IDENTITY_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-ruby/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..50fcb0fa0d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_mfa_authenticator( + user_id: '<USER_ID>', + type: AuthenticatorType::TOTP +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/delete-session.md b/docs/examples/1.8.x/server-ruby/examples/users/delete-session.md new file mode 100644 index 0000000000..9b14cc4fa3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/delete-session.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_session( + user_id: '<USER_ID>', + session_id: '<SESSION_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-ruby/examples/users/delete-sessions.md new file mode 100644 index 0000000000..23fd505763 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/delete-sessions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_sessions( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/delete-target.md b/docs/examples/1.8.x/server-ruby/examples/users/delete-target.md new file mode 100644 index 0000000000..f1564024db --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/delete-target.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/delete.md b/docs/examples/1.8.x/server-ruby/examples/users/delete.md new file mode 100644 index 0000000000..db7f2ee6f8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/delete.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.delete( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-ruby/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..f984517d26 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.get_mfa_recovery_codes( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/get-prefs.md b/docs/examples/1.8.x/server-ruby/examples/users/get-prefs.md new file mode 100644 index 0000000000..0118b39897 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/get-prefs.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.get_prefs( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/get-target.md b/docs/examples/1.8.x/server-ruby/examples/users/get-target.md new file mode 100644 index 0000000000..10ce49b229 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/get-target.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.get_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/get.md b/docs/examples/1.8.x/server-ruby/examples/users/get.md new file mode 100644 index 0000000000..95865b7e6c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/get.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.get( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list-identities.md b/docs/examples/1.8.x/server-ruby/examples/users/list-identities.md new file mode 100644 index 0000000000..78c8cf5098 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list-identities.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_identities( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list-logs.md b/docs/examples/1.8.x/server-ruby/examples/users/list-logs.md new file mode 100644 index 0000000000..686434869c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list-logs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_logs( + user_id: '<USER_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list-memberships.md b/docs/examples/1.8.x/server-ruby/examples/users/list-memberships.md new file mode 100644 index 0000000000..a4c3aa11d2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list-memberships.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_memberships( + user_id: '<USER_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-ruby/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..ca1e2b2b96 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list-mfa-factors.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_mfa_factors( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list-sessions.md b/docs/examples/1.8.x/server-ruby/examples/users/list-sessions.md new file mode 100644 index 0000000000..311420531f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list-sessions.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_sessions( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list-targets.md b/docs/examples/1.8.x/server-ruby/examples/users/list-targets.md new file mode 100644 index 0000000000..aae9941794 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list-targets.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list_targets( + user_id: '<USER_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/list.md b/docs/examples/1.8.x/server-ruby/examples/users/list.md new file mode 100644 index 0000000000..b490b65099 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/list.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.list( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-ruby/examples/users/update-email-verification.md new file mode 100644 index 0000000000..07f85f0318 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-email-verification.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_email_verification( + user_id: '<USER_ID>', + email_verification: false +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-email.md b/docs/examples/1.8.x/server-ruby/examples/users/update-email.md new file mode 100644 index 0000000000..b36aac59d1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-email.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_email( + user_id: '<USER_ID>', + email: 'email@example.com' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-labels.md b/docs/examples/1.8.x/server-ruby/examples/users/update-labels.md new file mode 100644 index 0000000000..a62d34b2e2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-labels.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_labels( + user_id: '<USER_ID>', + labels: [] +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-ruby/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..aaf5ba16c0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_mfa_recovery_codes( + user_id: '<USER_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-mfa.md b/docs/examples/1.8.x/server-ruby/examples/users/update-mfa.md new file mode 100644 index 0000000000..3ebfb96116 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-mfa.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_mfa( + user_id: '<USER_ID>', + mfa: false +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-name.md b/docs/examples/1.8.x/server-ruby/examples/users/update-name.md new file mode 100644 index 0000000000..e7ade96e32 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-name.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_name( + user_id: '<USER_ID>', + name: '<NAME>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-password.md b/docs/examples/1.8.x/server-ruby/examples/users/update-password.md new file mode 100644 index 0000000000..47c1f1ef49 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-password.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_password( + user_id: '<USER_ID>', + password: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-ruby/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..6af7fcb638 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-phone-verification.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_phone_verification( + user_id: '<USER_ID>', + phone_verification: false +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-phone.md b/docs/examples/1.8.x/server-ruby/examples/users/update-phone.md new file mode 100644 index 0000000000..bd26547daa --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-phone.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_phone( + user_id: '<USER_ID>', + number: '+12065550100' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-prefs.md b/docs/examples/1.8.x/server-ruby/examples/users/update-prefs.md new file mode 100644 index 0000000000..fbdccd7d23 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-prefs.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_prefs( + user_id: '<USER_ID>', + prefs: {} +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-status.md b/docs/examples/1.8.x/server-ruby/examples/users/update-status.md new file mode 100644 index 0000000000..d73982c149 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-status.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_status( + user_id: '<USER_ID>', + status: false +) diff --git a/docs/examples/1.8.x/server-ruby/examples/users/update-target.md b/docs/examples/1.8.x/server-ruby/examples/users/update-target.md new file mode 100644 index 0000000000..dbcd1bd2f4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/users/update-target.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +users = Users.new(client) + +result = users.update_target( + user_id: '<USER_ID>', + target_id: '<TARGET_ID>', + identifier: '<IDENTIFIER>', # optional + provider_id: '<PROVIDER_ID>', # optional + name: '<NAME>' # optional +) diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-swift/examples/account/create-anonymous-session.md new file mode 100644 index 0000000000..22020a16d9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-anonymous-session.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.createAnonymousSession() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-swift/examples/account/create-email-password-session.md new file mode 100644 index 0000000000..5f541a8a15 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-email-password-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.createEmailPasswordSession( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-email-token.md b/docs/examples/1.8.x/server-swift/examples/account/create-email-token.md new file mode 100644 index 0000000000..cf82afde8f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-email-token.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let token = try await account.createEmailToken( + userId: "<USER_ID>", + email: "email@example.com", + phrase: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-swift/examples/account/create-j-w-t.md new file mode 100644 index 0000000000..fbcd50401c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-j-w-t.md @@ -0,0 +1,10 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let jwt = try await account.createJWT() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-swift/examples/account/create-magic-u-r-l-token.md new file mode 100644 index 0000000000..27bbe4137e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-magic-u-r-l-token.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let token = try await account.createMagicURLToken( + userId: "<USER_ID>", + email: "email@example.com", + url: "https://example.com", // optional + phrase: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-swift/examples/account/create-mfa-authenticator.md new file mode 100644 index 0000000000..4dd91d84dd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-mfa-authenticator.md @@ -0,0 +1,14 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaType = try await account.createMfaAuthenticator( + type: .totp +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-swift/examples/account/create-mfa-challenge.md new file mode 100644 index 0000000000..0b5d385999 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-mfa-challenge.md @@ -0,0 +1,13 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let mfaChallenge = try await account.createMfaChallenge( + factor: .email +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-swift/examples/account/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..a73e4f6024 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaRecoveryCodes = try await account.createMfaRecoveryCodes() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-swift/examples/account/create-o-auth2token.md new file mode 100644 index 0000000000..21b54e8c9a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-o-auth2token.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let success = try await account.createOAuth2Token( + provider: .amazon, + success: "https://example.com", // optional + failure: "https://example.com", // optional + scopes: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-swift/examples/account/create-phone-token.md new file mode 100644 index 0000000000..12b2d4b223 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-phone-token.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let token = try await account.createPhoneToken( + userId: "<USER_ID>", + phone: "+12065550100" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-swift/examples/account/create-phone-verification.md new file mode 100644 index 0000000000..cba0637648 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-phone-verification.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.createPhoneVerification() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-recovery.md b/docs/examples/1.8.x/server-swift/examples/account/create-recovery.md new file mode 100644 index 0000000000..d89f679e0c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-recovery.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.createRecovery( + email: "email@example.com", + url: "https://example.com" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-session.md b/docs/examples/1.8.x/server-swift/examples/account/create-session.md new file mode 100644 index 0000000000..2065692a16 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.createSession( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create-verification.md b/docs/examples/1.8.x/server-swift/examples/account/create-verification.md new file mode 100644 index 0000000000..71e9bdd32b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create-verification.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.createVerification( + url: "https://example.com" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/create.md b/docs/examples/1.8.x/server-swift/examples/account/create.md new file mode 100644 index 0000000000..79b4db64ba --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let user = try await account.create( + userId: "<USER_ID>", + email: "email@example.com", + password: "", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/delete-identity.md b/docs/examples/1.8.x/server-swift/examples/account/delete-identity.md new file mode 100644 index 0000000000..f0f14b37d2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/delete-identity.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteIdentity( + identityId: "<IDENTITY_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-swift/examples/account/delete-mfa-authenticator.md new file mode 100644 index 0000000000..e4209a2550 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/delete-mfa-authenticator.md @@ -0,0 +1,14 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteMfaAuthenticator( + type: .totp +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/delete-session.md b/docs/examples/1.8.x/server-swift/examples/account/delete-session.md new file mode 100644 index 0000000000..2469620116 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/delete-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteSession( + sessionId: "<SESSION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-swift/examples/account/delete-sessions.md new file mode 100644 index 0000000000..da8ac6dfe8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/delete-sessions.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let result = try await account.deleteSessions() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-swift/examples/account/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..69455f4acd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/get-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaRecoveryCodes = try await account.getMfaRecoveryCodes() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/get-prefs.md b/docs/examples/1.8.x/server-swift/examples/account/get-prefs.md new file mode 100644 index 0000000000..6551df92e6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/get-prefs.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let preferences = try await account.getPrefs() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/get-session.md b/docs/examples/1.8.x/server-swift/examples/account/get-session.md new file mode 100644 index 0000000000..63efb3f098 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/get-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let session = try await account.getSession( + sessionId: "<SESSION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/get.md b/docs/examples/1.8.x/server-swift/examples/account/get.md new file mode 100644 index 0000000000..833901b5b4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/get.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.get() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/list-identities.md b/docs/examples/1.8.x/server-swift/examples/account/list-identities.md new file mode 100644 index 0000000000..c7ecff9962 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/list-identities.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let identityList = try await account.listIdentities( + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/list-logs.md b/docs/examples/1.8.x/server-swift/examples/account/list-logs.md new file mode 100644 index 0000000000..84c3327762 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/list-logs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let logList = try await account.listLogs( + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-swift/examples/account/list-mfa-factors.md new file mode 100644 index 0000000000..a63d4d0f82 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/list-mfa-factors.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaFactors = try await account.listMfaFactors() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/list-sessions.md b/docs/examples/1.8.x/server-swift/examples/account/list-sessions.md new file mode 100644 index 0000000000..49691b3a9e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/list-sessions.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let sessionList = try await account.listSessions() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-email.md b/docs/examples/1.8.x/server-swift/examples/account/update-email.md new file mode 100644 index 0000000000..48cce5055d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-email.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateEmail( + email: "email@example.com", + password: "password" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-swift/examples/account/update-m-f-a.md new file mode 100644 index 0000000000..ac486fceb6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-m-f-a.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateMFA( + mfa: false +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-swift/examples/account/update-magic-u-r-l-session.md new file mode 100644 index 0000000000..507006b230 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-magic-u-r-l-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.updateMagicURLSession( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-swift/examples/account/update-mfa-authenticator.md new file mode 100644 index 0000000000..fedbc954af --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-mfa-authenticator.md @@ -0,0 +1,15 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateMfaAuthenticator( + type: .totp, + otp: "<OTP>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-swift/examples/account/update-mfa-challenge.md new file mode 100644 index 0000000000..4edb1fbbc3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-mfa-challenge.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let session = try await account.updateMfaChallenge( + challengeId: "<CHALLENGE_ID>", + otp: "<OTP>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-swift/examples/account/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..d0a2b8c686 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-mfa-recovery-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let mfaRecoveryCodes = try await account.updateMfaRecoveryCodes() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-name.md b/docs/examples/1.8.x/server-swift/examples/account/update-name.md new file mode 100644 index 0000000000..2c676d8714 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-name.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateName( + name: "<NAME>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-password.md b/docs/examples/1.8.x/server-swift/examples/account/update-password.md new file mode 100644 index 0000000000..62fe48e6e9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-password.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updatePassword( + password: "", + oldPassword: "password" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-swift/examples/account/update-phone-session.md new file mode 100644 index 0000000000..f6776d1de1 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-phone-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let account = Account(client) + +let session = try await account.updatePhoneSession( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-swift/examples/account/update-phone-verification.md new file mode 100644 index 0000000000..a983e79c3c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-phone-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.updatePhoneVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-phone.md b/docs/examples/1.8.x/server-swift/examples/account/update-phone.md new file mode 100644 index 0000000000..6dd87a0ce5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-phone.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updatePhone( + phone: "+12065550100", + password: "password" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-prefs.md b/docs/examples/1.8.x/server-swift/examples/account/update-prefs.md new file mode 100644 index 0000000000..53bf623469 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updatePrefs( + prefs: [:] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-recovery.md b/docs/examples/1.8.x/server-swift/examples/account/update-recovery.md new file mode 100644 index 0000000000..d655edfe59 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-recovery.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.updateRecovery( + userId: "<USER_ID>", + secret: "<SECRET>", + password: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-session.md b/docs/examples/1.8.x/server-swift/examples/account/update-session.md new file mode 100644 index 0000000000..f2f4f7b737 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let session = try await account.updateSession( + sessionId: "<SESSION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-status.md b/docs/examples/1.8.x/server-swift/examples/account/update-status.md new file mode 100644 index 0000000000..88e30cfb09 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-status.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let user = try await account.updateStatus() + diff --git a/docs/examples/1.8.x/server-swift/examples/account/update-verification.md b/docs/examples/1.8.x/server-swift/examples/account/update-verification.md new file mode 100644 index 0000000000..61bc18cc48 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/account/update-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let account = Account(client) + +let token = try await account.updateVerification( + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-browser.md new file mode 100644 index 0000000000..1c105c280c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-browser.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getBrowser( + code: .avantBrowser, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-credit-card.md new file mode 100644 index 0000000000..af7c2800be --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-credit-card.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getCreditCard( + code: .americanExpress, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-favicon.md new file mode 100644 index 0000000000..73f54fe5d3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-favicon.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getFavicon( + url: "https://example.com" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-flag.md new file mode 100644 index 0000000000..e33cbb0c7f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-flag.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getFlag( + code: .afghanistan, + width: 0, // optional + height: 0, // optional + quality: -1 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-image.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-image.md new file mode 100644 index 0000000000..5455ad18f5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-image.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getImage( + url: "https://example.com", + width: 0, // optional + height: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-initials.md new file mode 100644 index 0000000000..63dfa5e5ab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-initials.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getInitials( + name: "<NAME>", // optional + width: 0, // optional + height: 0, // optional + background: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-swift/examples/avatars/get-q-r.md new file mode 100644 index 0000000000..ae4cc910ab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/avatars/get-q-r.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let bytes = try await avatars.getQR( + text: "<TEXT>", + size: 1, // optional + margin: 0, // optional + download: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-boolean-attribute.md new file mode 100644 index 0000000000..4530c385ca --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-boolean-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeBoolean = try await databases.createBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md b/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md new file mode 100644 index 0000000000..c3335b48cb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-collection.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let collection = try await databases.createCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-datetime-attribute.md new file mode 100644 index 0000000000..d14d0b5cab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-datetime-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeDatetime = try await databases.createDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-document.md b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md new file mode 100644 index 0000000000..4ee21048ab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let databases = Databases(client) + +let document = try await databases.createDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md new file mode 100644 index 0000000000..e4f8582f49 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let documentList = try await databases.createDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documents: [] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-email-attribute.md new file mode 100644 index 0000000000..9bd30b38c9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-email-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeEmail = try await databases.createEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-enum-attribute.md new file mode 100644 index 0000000000..08023f652b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-enum-attribute.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeEnum = try await databases.createEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-float-attribute.md new file mode 100644 index 0000000000..b5126c6a50 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-float-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeFloat = try await databases.createFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-index.md b/docs/examples/1.8.x/server-swift/examples/databases/create-index.md new file mode 100644 index 0000000000..7e9a6205d7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-index.md @@ -0,0 +1,20 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let index = try await databases.createIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + type: .key, + attributes: [], + orders: [], // optional + lengths: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-integer-attribute.md new file mode 100644 index 0000000000..20c29cd569 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-integer-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeInteger = try await databases.createIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-ip-attribute.md new file mode 100644 index 0000000000..09605ba522 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-ip-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeIp = try await databases.createIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-relationship-attribute.md new file mode 100644 index 0000000000..8e6c3eb84b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-relationship-attribute.md @@ -0,0 +1,21 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeRelationship = try await databases.createRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + relatedCollectionId: "<RELATED_COLLECTION_ID>", + type: .oneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: .cascade // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-string-attribute.md new file mode 100644 index 0000000000..80c321ecdb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-string-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeString = try await databases.createStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/create-url-attribute.md new file mode 100644 index 0000000000..efd2acbc08 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-url-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeUrl = try await databases.createUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create.md b/docs/examples/1.8.x/server-swift/examples/databases/create.md new file mode 100644 index 0000000000..b0362bb3e8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let database = try await databases.create( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/decrement-document-attribute.md new file mode 100644 index 0000000000..88ba9ae01b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/decrement-document-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let document = try await databases.decrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "", + value: 0, // optional + min: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/delete-attribute.md new file mode 100644 index 0000000000..9948555981 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/delete-attribute.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-swift/examples/databases/delete-collection.md new file mode 100644 index 0000000000..d61f0e658d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/delete-collection.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/delete-document.md b/docs/examples/1.8.x/server-swift/examples/databases/delete-document.md new file mode 100644 index 0000000000..1db59709ab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/delete-document.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let result = try await databases.deleteDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/delete-documents.md new file mode 100644 index 0000000000..d5321f2b26 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/delete-documents.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let documentList = try await databases.deleteDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/delete-index.md b/docs/examples/1.8.x/server-swift/examples/databases/delete-index.md new file mode 100644 index 0000000000..ecd09f7ce6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/delete-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.deleteIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/delete.md b/docs/examples/1.8.x/server-swift/examples/databases/delete.md new file mode 100644 index 0000000000..40567e4288 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.delete( + databaseId: "<DATABASE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/get-attribute.md new file mode 100644 index 0000000000..30cd0c8832 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/get-attribute.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let result = try await databases.getAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/get-collection.md b/docs/examples/1.8.x/server-swift/examples/databases/get-collection.md new file mode 100644 index 0000000000..96c1fa0f94 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/get-collection.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let collection = try await databases.getCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/get-document.md b/docs/examples/1.8.x/server-swift/examples/databases/get-document.md new file mode 100644 index 0000000000..c92856a731 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/get-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let document = try await databases.getDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/get-index.md b/docs/examples/1.8.x/server-swift/examples/databases/get-index.md new file mode 100644 index 0000000000..cd59074dc8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/get-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let index = try await databases.getIndex( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/get.md b/docs/examples/1.8.x/server-swift/examples/databases/get.md new file mode 100644 index 0000000000..875929bed0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let database = try await databases.get( + databaseId: "<DATABASE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/increment-document-attribute.md new file mode 100644 index 0000000000..452b200e34 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/increment-document-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let document = try await databases.incrementDocumentAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + attribute: "", + value: 0, // optional + max: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-swift/examples/databases/list-attributes.md new file mode 100644 index 0000000000..b375c8771b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/list-attributes.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeList = try await databases.listAttributes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/list-collections.md b/docs/examples/1.8.x/server-swift/examples/databases/list-collections.md new file mode 100644 index 0000000000..10481d985c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/list-collections.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let collectionList = try await databases.listCollections( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/list-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/list-documents.md new file mode 100644 index 0000000000..2cac9330b3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/list-documents.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let documentList = try await databases.listDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-swift/examples/databases/list-indexes.md new file mode 100644 index 0000000000..691f74b076 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/list-indexes.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let indexList = try await databases.listIndexes( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/list.md b/docs/examples/1.8.x/server-swift/examples/databases/list.md new file mode 100644 index 0000000000..f8a2313acc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let databaseList = try await databases.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-boolean-attribute.md new file mode 100644 index 0000000000..0d925056c2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-boolean-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeBoolean = try await databases.updateBooleanAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md b/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md new file mode 100644 index 0000000000..9109990109 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-collection.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let collection = try await databases.updateCollection( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + documentSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-datetime-attribute.md new file mode 100644 index 0000000000..906b374946 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-datetime-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeDatetime = try await databases.updateDatetimeAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-document.md b/docs/examples/1.8.x/server-swift/examples/databases/update-document.md new file mode 100644 index 0000000000..7d452db284 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-document.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let databases = Databases(client) + +let document = try await databases.updateDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/update-documents.md new file mode 100644 index 0000000000..0e934b1424 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-documents.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let documentList = try await databases.updateDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + data: [:], // optional + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-email-attribute.md new file mode 100644 index 0000000000..b485712ada --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-email-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeEmail = try await databases.updateEmailAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-enum-attribute.md new file mode 100644 index 0000000000..997b940c1b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-enum-attribute.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeEnum = try await databases.updateEnumAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-float-attribute.md new file mode 100644 index 0000000000..5f3e8da4da --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-float-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeFloat = try await databases.updateFloatAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-integer-attribute.md new file mode 100644 index 0000000000..edc0a12c8c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-integer-attribute.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeInteger = try await databases.updateIntegerAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-ip-attribute.md new file mode 100644 index 0000000000..e08835747c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-ip-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeIp = try await databases.updateIpAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-relationship-attribute.md new file mode 100644 index 0000000000..0fb06d7796 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-relationship-attribute.md @@ -0,0 +1,18 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeRelationship = try await databases.updateRelationshipAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + onDelete: .cascade, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-string-attribute.md new file mode 100644 index 0000000000..1eb3315dca --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-string-attribute.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeString = try await databases.updateStringAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-swift/examples/databases/update-url-attribute.md new file mode 100644 index 0000000000..cd18f96368 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update-url-attribute.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let attributeUrl = try await databases.updateUrlAttribute( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/update.md b/docs/examples/1.8.x/server-swift/examples/databases/update.md new file mode 100644 index 0000000000..07f506257b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/update.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let database = try await databases.update( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md new file mode 100644 index 0000000000..9c9684e42d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let databases = Databases(client) + +let document = try await databases.upsertDocument( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>", + documentId: "<DOCUMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md new file mode 100644 index 0000000000..e63b9a3e67 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +let databases = Databases(client) + +let documentList = try await databases.upsertDocuments( + databaseId: "<DATABASE_ID>", + collectionId: "<COLLECTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/create-deployment.md new file mode 100644 index 0000000000..de3d14d242 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-deployment.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createDeployment( + functionId: "<FUNCTION_ID>", + code: InputFile.fromPath("file.png"), + activate: false, + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/create-duplicate-deployment.md new file mode 100644 index 0000000000..cadf67aa65 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-duplicate-deployment.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createDuplicateDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + buildId: "<BUILD_ID>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md b/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md new file mode 100644 index 0000000000..aae7a0f52f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md @@ -0,0 +1,20 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let functions = Functions(client) + +let execution = try await functions.createExecution( + functionId: "<FUNCTION_ID>", + body: "<BODY>", // optional + async: false, // optional + path: "<PATH>", // optional + method: .gET, // optional + headers: [:], // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/create-template-deployment.md new file mode 100644 index 0000000000..27c5311c7a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-template-deployment.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createTemplateDeployment( + functionId: "<FUNCTION_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-variable.md b/docs/examples/1.8.x/server-swift/examples/functions/create-variable.md new file mode 100644 index 0000000000..d792c678e6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-variable.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let variable = try await functions.createVariable( + functionId: "<FUNCTION_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/create-vcs-deployment.md new file mode 100644 index 0000000000..5586722aab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-vcs-deployment.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.createVcsDeployment( + functionId: "<FUNCTION_ID>", + type: .branch, + reference: "<REFERENCE>", + activate: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create.md b/docs/examples/1.8.x/server-swift/examples/functions/create.md new file mode 100644 index 0000000000..6f17a65b93 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/create.md @@ -0,0 +1,31 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.create( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .node145, + execute: ["any"], // optional + events: [], // optional + schedule: "", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: [], // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/delete-deployment.md new file mode 100644 index 0000000000..dec7b1db8f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/delete-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.deleteDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-swift/examples/functions/delete-execution.md new file mode 100644 index 0000000000..e51b7dcd5c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/delete-execution.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.deleteExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-swift/examples/functions/delete-variable.md new file mode 100644 index 0000000000..ea0ebab079 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/delete-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.deleteVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/delete.md b/docs/examples/1.8.x/server-swift/examples/functions/delete.md new file mode 100644 index 0000000000..76bb48cddf --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let result = try await functions.delete( + functionId: "<FUNCTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-swift/examples/functions/get-deployment-download.md new file mode 100644 index 0000000000..1feab0f484 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/get-deployment-download.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let bytes = try await functions.getDeploymentDownload( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: .source // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/get-deployment.md new file mode 100644 index 0000000000..56ed2e8512 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/get-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.getDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/get-execution.md b/docs/examples/1.8.x/server-swift/examples/functions/get-execution.md new file mode 100644 index 0000000000..6d24ee9390 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/get-execution.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let functions = Functions(client) + +let execution = try await functions.getExecution( + functionId: "<FUNCTION_ID>", + executionId: "<EXECUTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/get-variable.md b/docs/examples/1.8.x/server-swift/examples/functions/get-variable.md new file mode 100644 index 0000000000..da20d68007 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/get-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let variable = try await functions.getVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/get.md b/docs/examples/1.8.x/server-swift/examples/functions/get.md new file mode 100644 index 0000000000..98babdb04d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.get( + functionId: "<FUNCTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-swift/examples/functions/list-deployments.md new file mode 100644 index 0000000000..599f301ca8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/list-deployments.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deploymentList = try await functions.listDeployments( + functionId: "<FUNCTION_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/list-executions.md b/docs/examples/1.8.x/server-swift/examples/functions/list-executions.md new file mode 100644 index 0000000000..f0aa857f01 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/list-executions.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let functions = Functions(client) + +let executionList = try await functions.listExecutions( + functionId: "<FUNCTION_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-swift/examples/functions/list-runtimes.md new file mode 100644 index 0000000000..c4a3f31174 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/list-runtimes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let runtimeList = try await functions.listRuntimes() + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-swift/examples/functions/list-specifications.md new file mode 100644 index 0000000000..1f5914ba91 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/list-specifications.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let specificationList = try await functions.listSpecifications() + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/list-variables.md b/docs/examples/1.8.x/server-swift/examples/functions/list-variables.md new file mode 100644 index 0000000000..0343e54772 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/list-variables.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let variableList = try await functions.listVariables( + functionId: "<FUNCTION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/list.md b/docs/examples/1.8.x/server-swift/examples/functions/list.md new file mode 100644 index 0000000000..370b6bddfd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let functionList = try await functions.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-swift/examples/functions/update-deployment-status.md new file mode 100644 index 0000000000..1883199655 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/update-deployment-status.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let deployment = try await functions.updateDeploymentStatus( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-swift/examples/functions/update-function-deployment.md new file mode 100644 index 0000000000..5557d82f10 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/update-function-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.updateFunctionDeployment( + functionId: "<FUNCTION_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/update-variable.md b/docs/examples/1.8.x/server-swift/examples/functions/update-variable.md new file mode 100644 index 0000000000..974b2ed0ff --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/update-variable.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let variable = try await functions.updateVariable( + functionId: "<FUNCTION_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", // optional + secret: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/functions/update.md b/docs/examples/1.8.x/server-swift/examples/functions/update.md new file mode 100644 index 0000000000..ebb2828bc8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/functions/update.md @@ -0,0 +1,31 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let functions = Functions(client) + +let function = try await functions.update( + functionId: "<FUNCTION_ID>", + name: "<NAME>", + runtime: .node145, // optional + execute: ["any"], // optional + events: [], // optional + schedule: "", // optional + timeout: 1, // optional + enabled: false, // optional + logging: false, // optional + entrypoint: "<ENTRYPOINT>", // optional + commands: "<COMMANDS>", // optional + scopes: [], // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/graphql/mutation.md b/docs/examples/1.8.x/server-swift/examples/graphql/mutation.md new file mode 100644 index 0000000000..ad33858894 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/graphql/mutation.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let graphql = Graphql(client) + +let any = try await graphql.mutation( + query: [:] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/graphql/query.md b/docs/examples/1.8.x/server-swift/examples/graphql/query.md new file mode 100644 index 0000000000..f087c888a3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/graphql/query.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let graphql = Graphql(client) + +let any = try await graphql.query( + query: [:] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-swift/examples/health/get-antivirus.md new file mode 100644 index 0000000000..5fc335f8fc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-antivirus.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthAntivirus = try await health.getAntivirus() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-cache.md b/docs/examples/1.8.x/server-swift/examples/health/get-cache.md new file mode 100644 index 0000000000..a1c514b60e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-cache.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getCache() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-certificate.md b/docs/examples/1.8.x/server-swift/examples/health/get-certificate.md new file mode 100644 index 0000000000..6adf4d6052 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-certificate.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthCertificate = try await health.getCertificate( + domain: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-d-b.md b/docs/examples/1.8.x/server-swift/examples/health/get-d-b.md new file mode 100644 index 0000000000..a6aeb12e44 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-d-b.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getDB() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-swift/examples/health/get-failed-jobs.md new file mode 100644 index 0000000000..c508106bfa --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-failed-jobs.md @@ -0,0 +1,15 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getFailedJobs( + name: .v1Database, + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-swift/examples/health/get-pub-sub.md new file mode 100644 index 0000000000..9a7766c94a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-pub-sub.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getPubSub() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-builds.md new file mode 100644 index 0000000000..8db346ccbe --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-builds.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueBuilds( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-certificates.md new file mode 100644 index 0000000000..4814f29d87 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-certificates.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueCertificates( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-databases.md new file mode 100644 index 0000000000..3acda3ddd7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-databases.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueDatabases( + name: "<NAME>", // optional + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-deletes.md new file mode 100644 index 0000000000..8be397f53f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-deletes.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueDeletes( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-functions.md new file mode 100644 index 0000000000..aa420409d2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-functions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueFunctions( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-logs.md new file mode 100644 index 0000000000..dc989a510f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-logs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueLogs( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-mails.md new file mode 100644 index 0000000000..2106b2f233 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-mails.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueMails( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-messaging.md new file mode 100644 index 0000000000..11cb16c5e3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-messaging.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueMessaging( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-migrations.md new file mode 100644 index 0000000000..a0a4588b54 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-migrations.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueMigrations( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-stats-resources.md new file mode 100644 index 0000000000..4eb6ba7de3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-stats-resources.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueStatsResources( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-usage.md new file mode 100644 index 0000000000..bfaeab0b36 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-usage.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueUsage( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-swift/examples/health/get-queue-webhooks.md new file mode 100644 index 0000000000..c315406627 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-queue-webhooks.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthQueue = try await health.getQueueWebhooks( + threshold: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-swift/examples/health/get-storage-local.md new file mode 100644 index 0000000000..9e23c09b6d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-storage-local.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getStorageLocal() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-storage.md b/docs/examples/1.8.x/server-swift/examples/health/get-storage.md new file mode 100644 index 0000000000..513ebac944 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-storage.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.getStorage() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get-time.md b/docs/examples/1.8.x/server-swift/examples/health/get-time.md new file mode 100644 index 0000000000..6624b40b22 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get-time.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthTime = try await health.getTime() + diff --git a/docs/examples/1.8.x/server-swift/examples/health/get.md b/docs/examples/1.8.x/server-swift/examples/health/get.md new file mode 100644 index 0000000000..ef1ffaab6c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/health/get.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let health = Health(client) + +let healthStatus = try await health.get() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/get.md b/docs/examples/1.8.x/server-swift/examples/locale/get.md new file mode 100644 index 0000000000..e22f3157c7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/get.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let locale = try await locale.get() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-codes.md b/docs/examples/1.8.x/server-swift/examples/locale/list-codes.md new file mode 100644 index 0000000000..b31448a119 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-codes.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let localeCodeList = try await locale.listCodes() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-continents.md b/docs/examples/1.8.x/server-swift/examples/locale/list-continents.md new file mode 100644 index 0000000000..c75abf8a4d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-continents.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let continentList = try await locale.listContinents() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-swift/examples/locale/list-countries-e-u.md new file mode 100644 index 0000000000..e09f3db4f7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-countries-e-u.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let countryList = try await locale.listCountriesEU() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-swift/examples/locale/list-countries-phones.md new file mode 100644 index 0000000000..de360c4408 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-countries-phones.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let phoneList = try await locale.listCountriesPhones() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-countries.md b/docs/examples/1.8.x/server-swift/examples/locale/list-countries.md new file mode 100644 index 0000000000..b214f9899b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-countries.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let countryList = try await locale.listCountries() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-swift/examples/locale/list-currencies.md new file mode 100644 index 0000000000..a47cae696b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-currencies.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let currencyList = try await locale.listCurrencies() + diff --git a/docs/examples/1.8.x/server-swift/examples/locale/list-languages.md b/docs/examples/1.8.x/server-swift/examples/locale/list-languages.md new file mode 100644 index 0000000000..40db7e5fe6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/locale/list-languages.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let locale = Locale(client) + +let languageList = try await locale.listLanguages() + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-apns-provider.md new file mode 100644 index 0000000000..5e20018fef --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-apns-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-email.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-email.md new file mode 100644 index 0000000000..a1b4774228 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-email.md @@ -0,0 +1,24 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.createEmail( + messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", + topics: [], // optional + users: [], // optional + targets: [], // optional + cc: [], // optional + bcc: [], // optional + attachments: [], // optional + draft: false, // optional + html: false, // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-fcm-provider.md new file mode 100644 index 0000000000..0071e477f1 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-fcm-provider.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + serviceAccountJSON: [:], // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-mailgun-provider.md new file mode 100644 index 0000000000..aca295d1bd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-mailgun-provider.md @@ -0,0 +1,22 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + domain: "<DOMAIN>", // optional + isEuRegion: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-msg91provider.md new file mode 100644 index 0000000000..01503c10cb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-msg91provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-push.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-push.md new file mode 100644 index 0000000000..498eccb51a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-push.md @@ -0,0 +1,32 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.createPush( + messageId: "<MESSAGE_ID>", + title: "<TITLE>", // optional + body: "<BODY>", // optional + topics: [], // optional + users: [], // optional + targets: [], // optional + data: [:], // optional + action: "<ACTION>", // optional + image: "[ID1:ID2]", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 0, // optional + draft: false, // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: .normal // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-sendgrid-provider.md new file mode 100644 index 0000000000..5275f6cdb7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-sendgrid-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-sms.md new file mode 100644 index 0000000000..4f579312a9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-sms.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.createSms( + messageId: "<MESSAGE_ID>", + content: "<CONTENT>", + topics: [], // optional + users: [], // optional + targets: [], // optional + draft: false, // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-smtp-provider.md new file mode 100644 index 0000000000..18d25df738 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-smtp-provider.md @@ -0,0 +1,27 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + host: "<HOST>", + port: 1, // optional + username: "<USERNAME>", // optional + password: "<PASSWORD>", // optional + encryption: .none, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "email@example.com", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-subscriber.md new file mode 100644 index 0000000000..cb23162484 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-subscriber.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let messaging = Messaging(client) + +let subscriber = try await messaging.createSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>", + targetId: "<TARGET_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-telesign-provider.md new file mode 100644 index 0000000000..a787134992 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-telesign-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-textmagic-provider.md new file mode 100644 index 0000000000..9b12a7d8cb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-textmagic-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-topic.md new file mode 100644 index 0000000000..9429c45554 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-topic.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let topic = try await messaging.createTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", + subscribe: ["any"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-twilio-provider.md new file mode 100644 index 0000000000..7421290e05 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-twilio-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/create-vonage-provider.md new file mode 100644 index 0000000000..b6a3014391 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/create-vonage-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.createVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", + from: "+12065550100", // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/delete-provider.md new file mode 100644 index 0000000000..94da565e1f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/delete-provider.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let result = try await messaging.deleteProvider( + providerId: "<PROVIDER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-swift/examples/messaging/delete-subscriber.md new file mode 100644 index 0000000000..b0aa96602f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/delete-subscriber.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let messaging = Messaging(client) + +let result = try await messaging.deleteSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-swift/examples/messaging/delete-topic.md new file mode 100644 index 0000000000..6676adf94e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/delete-topic.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let result = try await messaging.deleteTopic( + topicId: "<TOPIC_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/delete.md b/docs/examples/1.8.x/server-swift/examples/messaging/delete.md new file mode 100644 index 0000000000..fca66c7f43 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let result = try await messaging.delete( + messageId: "<MESSAGE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/get-message.md b/docs/examples/1.8.x/server-swift/examples/messaging/get-message.md new file mode 100644 index 0000000000..b1bbf9d5f0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/get-message.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.getMessage( + messageId: "<MESSAGE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/get-provider.md new file mode 100644 index 0000000000..6ff8545bd0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/get-provider.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.getProvider( + providerId: "<PROVIDER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-swift/examples/messaging/get-subscriber.md new file mode 100644 index 0000000000..55538e073d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/get-subscriber.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let subscriber = try await messaging.getSubscriber( + topicId: "<TOPIC_ID>", + subscriberId: "<SUBSCRIBER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-swift/examples/messaging/get-topic.md new file mode 100644 index 0000000000..0d2035bd9d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/get-topic.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let topic = try await messaging.getTopic( + topicId: "<TOPIC_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-message-logs.md new file mode 100644 index 0000000000..b7efe6fa9f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-message-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let logList = try await messaging.listMessageLogs( + messageId: "<MESSAGE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-messages.md new file mode 100644 index 0000000000..73832f7dae --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-messages.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let messageList = try await messaging.listMessages( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-provider-logs.md new file mode 100644 index 0000000000..0633e15b62 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-provider-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let logList = try await messaging.listProviderLogs( + providerId: "<PROVIDER_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-providers.md new file mode 100644 index 0000000000..c24af425a6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-providers.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let providerList = try await messaging.listProviders( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-subscriber-logs.md new file mode 100644 index 0000000000..eab170d7cb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-subscriber-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let logList = try await messaging.listSubscriberLogs( + subscriberId: "<SUBSCRIBER_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-subscribers.md new file mode 100644 index 0000000000..a29bcefaf1 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-subscribers.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let subscriberList = try await messaging.listSubscribers( + topicId: "<TOPIC_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-targets.md new file mode 100644 index 0000000000..974ae4f7b5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-targets.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let targetList = try await messaging.listTargets( + messageId: "<MESSAGE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-topic-logs.md new file mode 100644 index 0000000000..e6f32ad232 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-topic-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let logList = try await messaging.listTopicLogs( + topicId: "<TOPIC_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-swift/examples/messaging/list-topics.md new file mode 100644 index 0000000000..13106e940c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/list-topics.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let topicList = try await messaging.listTopics( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-apns-provider.md new file mode 100644 index 0000000000..03afe5555b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-apns-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateApnsProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + authKey: "<AUTH_KEY>", // optional + authKeyId: "<AUTH_KEY_ID>", // optional + teamId: "<TEAM_ID>", // optional + bundleId: "<BUNDLE_ID>", // optional + sandbox: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-email.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-email.md new file mode 100644 index 0000000000..1404fb8f77 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-email.md @@ -0,0 +1,24 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.updateEmail( + messageId: "<MESSAGE_ID>", + topics: [], // optional + users: [], // optional + targets: [], // optional + subject: "<SUBJECT>", // optional + content: "<CONTENT>", // optional + draft: false, // optional + html: false, // optional + cc: [], // optional + bcc: [], // optional + scheduledAt: "", // optional + attachments: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-fcm-provider.md new file mode 100644 index 0000000000..c4548f6549 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-fcm-provider.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateFcmProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + serviceAccountJSON: [:] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-mailgun-provider.md new file mode 100644 index 0000000000..8ed28aa40e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-mailgun-provider.md @@ -0,0 +1,22 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateMailgunProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + apiKey: "<API_KEY>", // optional + domain: "<DOMAIN>", // optional + isEuRegion: false, // optional + enabled: false, // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-msg91provider.md new file mode 100644 index 0000000000..e4a441c561 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-msg91provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateMsg91Provider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + templateId: "<TEMPLATE_ID>", // optional + senderId: "<SENDER_ID>", // optional + authKey: "<AUTH_KEY>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-push.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-push.md new file mode 100644 index 0000000000..e443161aa9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-push.md @@ -0,0 +1,32 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.updatePush( + messageId: "<MESSAGE_ID>", + topics: [], // optional + users: [], // optional + targets: [], // optional + title: "<TITLE>", // optional + body: "<BODY>", // optional + data: [:], // optional + action: "<ACTION>", // optional + image: "[ID1:ID2]", // optional + icon: "<ICON>", // optional + sound: "<SOUND>", // optional + color: "<COLOR>", // optional + tag: "<TAG>", // optional + badge: 0, // optional + draft: false, // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: .normal // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-sendgrid-provider.md new file mode 100644 index 0000000000..d363342af8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-sendgrid-provider.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateSendgridProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-sms.md new file mode 100644 index 0000000000..46b225fce0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-sms.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let message = try await messaging.updateSms( + messageId: "<MESSAGE_ID>", + topics: [], // optional + users: [], // optional + targets: [], // optional + content: "<CONTENT>", // optional + draft: false, // optional + scheduledAt: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-smtp-provider.md new file mode 100644 index 0000000000..7ef8f2e760 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-smtp-provider.md @@ -0,0 +1,27 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateSmtpProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + host: "<HOST>", // optional + port: 1, // optional + username: "<USERNAME>", // optional + password: "<PASSWORD>", // optional + encryption: .none, // optional + autoTLS: false, // optional + mailer: "<MAILER>", // optional + fromName: "<FROM_NAME>", // optional + fromEmail: "email@example.com", // optional + replyToName: "<REPLY_TO_NAME>", // optional + replyToEmail: "<REPLY_TO_EMAIL>", // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-telesign-provider.md new file mode 100644 index 0000000000..4475128b71 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-telesign-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateTelesignProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + customerId: "<CUSTOMER_ID>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-textmagic-provider.md new file mode 100644 index 0000000000..e412faab65 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-textmagic-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateTextmagicProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + username: "<USERNAME>", // optional + apiKey: "<API_KEY>", // optional + from: "<FROM>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-topic.md new file mode 100644 index 0000000000..796f581f07 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-topic.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let topic = try await messaging.updateTopic( + topicId: "<TOPIC_ID>", + name: "<NAME>", // optional + subscribe: ["any"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-twilio-provider.md new file mode 100644 index 0000000000..7b4592b048 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-twilio-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateTwilioProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + accountSid: "<ACCOUNT_SID>", // optional + authToken: "<AUTH_TOKEN>", // optional + from: "<FROM>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-swift/examples/messaging/update-vonage-provider.md new file mode 100644 index 0000000000..ba10ce2309 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/messaging/update-vonage-provider.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let messaging = Messaging(client) + +let provider = try await messaging.updateVonageProvider( + providerId: "<PROVIDER_ID>", + name: "<NAME>", // optional + enabled: false, // optional + apiKey: "<API_KEY>", // optional + apiSecret: "<API_SECRET>", // optional + from: "<FROM>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/create-deployment.md new file mode 100644 index 0000000000..5730e8ef5c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/create-deployment.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.createDeployment( + siteId: "<SITE_ID>", + code: InputFile.fromPath("file.png"), + activate: false, + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/create-duplicate-deployment.md new file mode 100644 index 0000000000..0ec3804d7a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/create-duplicate-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.createDuplicateDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/create-template-deployment.md new file mode 100644 index 0000000000..1cb3e42030 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/create-template-deployment.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.createTemplateDeployment( + siteId: "<SITE_ID>", + repository: "<REPOSITORY>", + owner: "<OWNER>", + rootDirectory: "<ROOT_DIRECTORY>", + version: "<VERSION>", + activate: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/create-variable.md b/docs/examples/1.8.x/server-swift/examples/sites/create-variable.md new file mode 100644 index 0000000000..305a683fcd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/create-variable.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let variable = try await sites.createVariable( + siteId: "<SITE_ID>", + key: "<KEY>", + value: "<VALUE>", + secret: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/create-vcs-deployment.md new file mode 100644 index 0000000000..d72540e715 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/create-vcs-deployment.md @@ -0,0 +1,17 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.createVcsDeployment( + siteId: "<SITE_ID>", + type: .branch, + reference: "<REFERENCE>", + activate: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/create.md b/docs/examples/1.8.x/server-swift/examples/sites/create.md new file mode 100644 index 0000000000..1f961d0535 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/create.md @@ -0,0 +1,31 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let site = try await sites.create( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .analog, + buildRuntime: .node145, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + adapter: .static, // optional + installationId: "<INSTALLATION_ID>", // optional + fallbackFile: "<FALLBACK_FILE>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/delete-deployment.md new file mode 100644 index 0000000000..c4f6971d7f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/delete-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let result = try await sites.deleteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/delete-log.md b/docs/examples/1.8.x/server-swift/examples/sites/delete-log.md new file mode 100644 index 0000000000..1066551495 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/delete-log.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let result = try await sites.deleteLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-swift/examples/sites/delete-variable.md new file mode 100644 index 0000000000..a33e1c549e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/delete-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let result = try await sites.deleteVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/delete.md b/docs/examples/1.8.x/server-swift/examples/sites/delete.md new file mode 100644 index 0000000000..8283f70de2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let result = try await sites.delete( + siteId: "<SITE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-swift/examples/sites/get-deployment-download.md new file mode 100644 index 0000000000..5ed409c53b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/get-deployment-download.md @@ -0,0 +1,16 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let bytes = try await sites.getDeploymentDownload( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>", + type: .source // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/get-deployment.md new file mode 100644 index 0000000000..b9f04f3dfc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/get-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.getDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/get-log.md b/docs/examples/1.8.x/server-swift/examples/sites/get-log.md new file mode 100644 index 0000000000..1e5c8121a6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/get-log.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let execution = try await sites.getLog( + siteId: "<SITE_ID>", + logId: "<LOG_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/get-variable.md b/docs/examples/1.8.x/server-swift/examples/sites/get-variable.md new file mode 100644 index 0000000000..f9258fd5f6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/get-variable.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let variable = try await sites.getVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/get.md b/docs/examples/1.8.x/server-swift/examples/sites/get.md new file mode 100644 index 0000000000..a14a9b73e7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let site = try await sites.get( + siteId: "<SITE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-swift/examples/sites/list-deployments.md new file mode 100644 index 0000000000..5516b74224 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/list-deployments.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deploymentList = try await sites.listDeployments( + siteId: "<SITE_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-swift/examples/sites/list-frameworks.md new file mode 100644 index 0000000000..13fdf9bca2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/list-frameworks.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let frameworkList = try await sites.listFrameworks() + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/list-logs.md b/docs/examples/1.8.x/server-swift/examples/sites/list-logs.md new file mode 100644 index 0000000000..3eb2a8c096 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/list-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let executionList = try await sites.listLogs( + siteId: "<SITE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-swift/examples/sites/list-specifications.md new file mode 100644 index 0000000000..302e9ea50e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/list-specifications.md @@ -0,0 +1,11 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let specificationList = try await sites.listSpecifications() + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/list-variables.md b/docs/examples/1.8.x/server-swift/examples/sites/list-variables.md new file mode 100644 index 0000000000..9818224988 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/list-variables.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let variableList = try await sites.listVariables( + siteId: "<SITE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/list.md b/docs/examples/1.8.x/server-swift/examples/sites/list.md new file mode 100644 index 0000000000..f330c721b9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let siteList = try await sites.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-swift/examples/sites/update-deployment-status.md new file mode 100644 index 0000000000..104058713d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/update-deployment-status.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let deployment = try await sites.updateDeploymentStatus( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-swift/examples/sites/update-site-deployment.md new file mode 100644 index 0000000000..ce330e4985 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/update-site-deployment.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let site = try await sites.updateSiteDeployment( + siteId: "<SITE_ID>", + deploymentId: "<DEPLOYMENT_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/update-variable.md b/docs/examples/1.8.x/server-swift/examples/sites/update-variable.md new file mode 100644 index 0000000000..8385c20e90 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/update-variable.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let variable = try await sites.updateVariable( + siteId: "<SITE_ID>", + variableId: "<VARIABLE_ID>", + key: "<KEY>", + value: "<VALUE>", // optional + secret: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/sites/update.md b/docs/examples/1.8.x/server-swift/examples/sites/update.md new file mode 100644 index 0000000000..e7de2fbd17 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/sites/update.md @@ -0,0 +1,31 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let sites = Sites(client) + +let site = try await sites.update( + siteId: "<SITE_ID>", + name: "<NAME>", + framework: .analog, + enabled: false, // optional + logging: false, // optional + timeout: 1, // optional + installCommand: "<INSTALL_COMMAND>", // optional + buildCommand: "<BUILD_COMMAND>", // optional + outputDirectory: "<OUTPUT_DIRECTORY>", // optional + buildRuntime: .node145, // optional + adapter: .static, // optional + fallbackFile: "<FALLBACK_FILE>", // optional + installationId: "<INSTALLATION_ID>", // optional + providerRepositoryId: "<PROVIDER_REPOSITORY_ID>", // optional + providerBranch: "<PROVIDER_BRANCH>", // optional + providerSilentMode: false, // optional + providerRootDirectory: "<PROVIDER_ROOT_DIRECTORY>", // optional + specification: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md new file mode 100644 index 0000000000..a664e14f5f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/create-bucket.md @@ -0,0 +1,23 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let bucket = try await storage.createBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: .none, // optional + encryption: false, // optional + antivirus: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/create-file.md b/docs/examples/1.8.x/server-swift/examples/storage/create-file.md new file mode 100644 index 0000000000..540c869fab --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/create-file.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let file = try await storage.createFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + file: InputFile.fromPath("file.png"), + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-swift/examples/storage/delete-bucket.md new file mode 100644 index 0000000000..2f4916dba2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/delete-bucket.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let result = try await storage.deleteBucket( + bucketId: "<BUCKET_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/delete-file.md b/docs/examples/1.8.x/server-swift/examples/storage/delete-file.md new file mode 100644 index 0000000000..7ac1b194e6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/delete-file.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let result = try await storage.deleteFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-swift/examples/storage/get-bucket.md new file mode 100644 index 0000000000..296a27bf85 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/get-bucket.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let bucket = try await storage.getBucket( + bucketId: "<BUCKET_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-swift/examples/storage/get-file-download.md new file mode 100644 index 0000000000..b362b08cda --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/get-file-download.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let bytes = try await storage.getFileDownload( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-swift/examples/storage/get-file-preview.md new file mode 100644 index 0000000000..d8c2380b7d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/get-file-preview.md @@ -0,0 +1,27 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let bytes = try await storage.getFilePreview( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + width: 0, // optional + height: 0, // optional + gravity: .center, // optional + quality: -1, // optional + borderWidth: 0, // optional + borderColor: "", // optional + borderRadius: 0, // optional + opacity: 0, // optional + rotation: -360, // optional + background: "", // optional + output: .jpg, // optional + token: "<TOKEN>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-swift/examples/storage/get-file-view.md new file mode 100644 index 0000000000..a3b94eec45 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/get-file-view.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let bytes = try await storage.getFileView( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + token: "<TOKEN>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/get-file.md b/docs/examples/1.8.x/server-swift/examples/storage/get-file.md new file mode 100644 index 0000000000..033a643a83 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/get-file.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let file = try await storage.getFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-swift/examples/storage/list-buckets.md new file mode 100644 index 0000000000..957d266e9a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/list-buckets.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let bucketList = try await storage.listBuckets( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/list-files.md b/docs/examples/1.8.x/server-swift/examples/storage/list-files.md new file mode 100644 index 0000000000..103d3c328c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/list-files.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let fileList = try await storage.listFiles( + bucketId: "<BUCKET_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md new file mode 100644 index 0000000000..de3b5bf0e5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/update-bucket.md @@ -0,0 +1,23 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let storage = Storage(client) + +let bucket = try await storage.updateBucket( + bucketId: "<BUCKET_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + fileSecurity: false, // optional + enabled: false, // optional + maximumFileSize: 1, // optional + allowedFileExtensions: [], // optional + compression: .none, // optional + encryption: false, // optional + antivirus: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/storage/update-file.md b/docs/examples/1.8.x/server-swift/examples/storage/update-file.md new file mode 100644 index 0000000000..d4d7484bd3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/storage/update-file.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let storage = Storage(client) + +let file = try await storage.updateFile( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + name: "<NAME>", // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..1b9627afac --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnBoolean = try await tables.createBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..e002fb8042 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnDatetime = try await tables.createDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md new file mode 100644 index 0000000000..338493dbc5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnEmail = try await tables.createEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..a6a9fff2c4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnEnum = try await tables.createEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md new file mode 100644 index 0000000000..12e4062454 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnFloat = try await tables.createFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-index.md b/docs/examples/1.8.x/server-swift/examples/tables/create-index.md new file mode 100644 index 0000000000..03dea1ac48 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-index.md @@ -0,0 +1,20 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIndex = try await tables.createIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: .key, + columns: [], + orders: [], // optional + lengths: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..6c04294025 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnInteger = try await tables.createIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..2cd0b2795f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIp = try await tables.createIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..66b993cf9a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md @@ -0,0 +1,21 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnRelationship = try await tables.createRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: .oneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: .cascade // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-row.md b/docs/examples/1.8.x/server-swift/examples/tables/create-row.md new file mode 100644 index 0000000000..a736355127 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-row.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let tables = Tables(client) + +let row = try await tables.createRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md new file mode 100644 index 0000000000..ee2095f08f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let rowList = try await tables.createRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md new file mode 100644 index 0000000000..e83ffdf367 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnString = try await tables.createStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md new file mode 100644 index 0000000000..150b51309d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnUrl = try await tables.createUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create.md b/docs/examples/1.8.x/server-swift/examples/tables/create.md new file mode 100644 index 0000000000..0843dfd242 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let table = try await tables.create( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..ef24324780 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let row = try await tables.decrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + min: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md new file mode 100644 index 0000000000..07f825ddbe --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let result = try await tables.deleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md new file mode 100644 index 0000000000..b6d2e5bfea --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let result = try await tables.deleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md new file mode 100644 index 0000000000..92bc38777e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tables = Tables(client) + +let result = try await tables.deleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md new file mode 100644 index 0000000000..d27fbce85f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let rowList = try await tables.deleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete.md b/docs/examples/1.8.x/server-swift/examples/tables/delete.md new file mode 100644 index 0000000000..aefa1d8cda --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let result = try await tables.delete( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-column.md b/docs/examples/1.8.x/server-swift/examples/tables/get-column.md new file mode 100644 index 0000000000..653f79dce7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/get-column.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let result = try await tables.getColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-index.md b/docs/examples/1.8.x/server-swift/examples/tables/get-index.md new file mode 100644 index 0000000000..6835f56aa0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/get-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIndex = try await tables.getIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-row.md b/docs/examples/1.8.x/server-swift/examples/tables/get-row.md new file mode 100644 index 0000000000..e2ff10f09a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/get-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tables = Tables(client) + +let row = try await tables.getRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get.md b/docs/examples/1.8.x/server-swift/examples/tables/get.md new file mode 100644 index 0000000000..610bf42529 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/get.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let table = try await tables.get( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..6ea883d612 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let row = try await tables.incrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + max: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md b/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md new file mode 100644 index 0000000000..88c86137a4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnList = try await tables.listColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md new file mode 100644 index 0000000000..2ea8e99eca --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIndexList = try await tables.listIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md new file mode 100644 index 0000000000..ca2e5b0d4b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tables = Tables(client) + +let rowList = try await tables.listRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list.md b/docs/examples/1.8.x/server-swift/examples/tables/list.md new file mode 100644 index 0000000000..e135b50289 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/list.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let tableList = try await tables.list( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..e0d1ea2f9f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnBoolean = try await tables.updateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..f09e27920b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnDatetime = try await tables.updateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md new file mode 100644 index 0000000000..f7b8cc4ede --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnEmail = try await tables.updateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..776da72e59 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnEnum = try await tables.updateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md new file mode 100644 index 0000000000..d6cd34c4b5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnFloat = try await tables.updateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..e1265cedbf --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnInteger = try await tables.updateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..4f3538bb7a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIp = try await tables.updateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..74bfd62750 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md @@ -0,0 +1,18 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnRelationship = try await tables.updateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: .cascade, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-row.md b/docs/examples/1.8.x/server-swift/examples/tables/update-row.md new file mode 100644 index 0000000000..7fa81f6b58 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-row.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tables = Tables(client) + +let row = try await tables.updateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md new file mode 100644 index 0000000000..d7cd0697da --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let rowList = try await tables.updateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [:], // optional + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md new file mode 100644 index 0000000000..ba14d9a96a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnString = try await tables.updateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md new file mode 100644 index 0000000000..19015e4c88 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnUrl = try await tables.updateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update.md b/docs/examples/1.8.x/server-swift/examples/tables/update.md new file mode 100644 index 0000000000..c9840a0a51 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let table = try await tables.update( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md new file mode 100644 index 0000000000..c5c5b73afc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let tables = Tables(client) + +let row = try await tables.upsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..037d927dc9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let rowList = try await tables.upsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/create-membership.md b/docs/examples/1.8.x/server-swift/examples/teams/create-membership.md new file mode 100644 index 0000000000..9010372175 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/create-membership.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.createMembership( + teamId: "<TEAM_ID>", + roles: [], + email: "email@example.com", // optional + userId: "<USER_ID>", // optional + phone: "+12065550100", // optional + url: "https://example.com", // optional + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/create.md b/docs/examples/1.8.x/server-swift/examples/teams/create.md new file mode 100644 index 0000000000..71f3d70874 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/create.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let team = try await teams.create( + teamId: "<TEAM_ID>", + name: "<NAME>", + roles: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-swift/examples/teams/delete-membership.md new file mode 100644 index 0000000000..dbdbc96ff9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/delete-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let result = try await teams.deleteMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/delete.md b/docs/examples/1.8.x/server-swift/examples/teams/delete.md new file mode 100644 index 0000000000..ee9daaa55b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let result = try await teams.delete( + teamId: "<TEAM_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/get-membership.md b/docs/examples/1.8.x/server-swift/examples/teams/get-membership.md new file mode 100644 index 0000000000..ab7b29eb3a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/get-membership.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.getMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-swift/examples/teams/get-prefs.md new file mode 100644 index 0000000000..ae3e9f2875 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/get-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let preferences = try await teams.getPrefs( + teamId: "<TEAM_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/get.md b/docs/examples/1.8.x/server-swift/examples/teams/get.md new file mode 100644 index 0000000000..cd4b75567a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let team = try await teams.get( + teamId: "<TEAM_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-swift/examples/teams/list-memberships.md new file mode 100644 index 0000000000..0670d91ab2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/list-memberships.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membershipList = try await teams.listMemberships( + teamId: "<TEAM_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/list.md b/docs/examples/1.8.x/server-swift/examples/teams/list.md new file mode 100644 index 0000000000..b5130cbf89 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let teamList = try await teams.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-swift/examples/teams/update-membership-status.md new file mode 100644 index 0000000000..69fca1de74 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/update-membership-status.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.updateMembershipStatus( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + userId: "<USER_ID>", + secret: "<SECRET>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/update-membership.md b/docs/examples/1.8.x/server-swift/examples/teams/update-membership.md new file mode 100644 index 0000000000..47f28e74fd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/update-membership.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let membership = try await teams.updateMembership( + teamId: "<TEAM_ID>", + membershipId: "<MEMBERSHIP_ID>", + roles: [] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/update-name.md b/docs/examples/1.8.x/server-swift/examples/teams/update-name.md new file mode 100644 index 0000000000..56f5ab60db --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/update-name.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let team = try await teams.updateName( + teamId: "<TEAM_ID>", + name: "<NAME>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-swift/examples/teams/update-prefs.md new file mode 100644 index 0000000000..b8bb200b65 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/teams/update-prefs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let preferences = try await teams.updatePrefs( + teamId: "<TEAM_ID>", + prefs: [:] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-swift/examples/tokens/create-file-token.md new file mode 100644 index 0000000000..2bdc123b61 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tokens/create-file-token.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tokens = Tokens(client) + +let resourceToken = try await tokens.createFileToken( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + expire: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tokens/delete.md b/docs/examples/1.8.x/server-swift/examples/tokens/delete.md new file mode 100644 index 0000000000..8b4db1435d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tokens/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tokens = Tokens(client) + +let result = try await tokens.delete( + tokenId: "<TOKEN_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tokens/get.md b/docs/examples/1.8.x/server-swift/examples/tokens/get.md new file mode 100644 index 0000000000..d6eac81059 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tokens/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tokens = Tokens(client) + +let resourceToken = try await tokens.get( + tokenId: "<TOKEN_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tokens/list.md b/docs/examples/1.8.x/server-swift/examples/tokens/list.md new file mode 100644 index 0000000000..8438050754 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tokens/list.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tokens = Tokens(client) + +let resourceTokenList = try await tokens.list( + bucketId: "<BUCKET_ID>", + fileId: "<FILE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tokens/update.md b/docs/examples/1.8.x/server-swift/examples/tokens/update.md new file mode 100644 index 0000000000..14bcb30f78 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tokens/update.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tokens = Tokens(client) + +let resourceToken = try await tokens.update( + tokenId: "<TOKEN_ID>", + expire: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-swift/examples/users/create-argon2user.md new file mode 100644 index 0000000000..9b7477001d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-argon2user.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createArgon2User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-swift/examples/users/create-bcrypt-user.md new file mode 100644 index 0000000000..ad5a81fe34 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-bcrypt-user.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createBcryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-swift/examples/users/create-j-w-t.md new file mode 100644 index 0000000000..d61adfb9a7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-j-w-t.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let jwt = try await users.createJWT( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>", // optional + duration: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-swift/examples/users/create-m-d5user.md new file mode 100644 index 0000000000..ffe7180c5e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-m-d5user.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createMD5User( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-swift/examples/users/create-mfa-recovery-codes.md new file mode 100644 index 0000000000..577a533fcb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let mfaRecoveryCodes = try await users.createMfaRecoveryCodes( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-swift/examples/users/create-p-h-pass-user.md new file mode 100644 index 0000000000..e1d8d3f3ef --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-p-h-pass-user.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createPHPassUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-swift/examples/users/create-s-h-a-user.md new file mode 100644 index 0000000000..ac42f2fe9d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-s-h-a-user.md @@ -0,0 +1,18 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createSHAUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordVersion: .sha1, // optional + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-swift/examples/users/create-scrypt-modified-user.md new file mode 100644 index 0000000000..d6c67f6f3d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-scrypt-modified-user.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createScryptModifiedUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordSaltSeparator: "<PASSWORD_SALT_SEPARATOR>", + passwordSignerKey: "<PASSWORD_SIGNER_KEY>", + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-swift/examples/users/create-scrypt-user.md new file mode 100644 index 0000000000..16452c4606 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-scrypt-user.md @@ -0,0 +1,21 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.createScryptUser( + userId: "<USER_ID>", + email: "email@example.com", + password: "password", + passwordSalt: "<PASSWORD_SALT>", + passwordCpu: 0, + passwordMemory: 0, + passwordParallel: 0, + passwordLength: 0, + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-session.md b/docs/examples/1.8.x/server-swift/examples/users/create-session.md new file mode 100644 index 0000000000..cf6f67bd91 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-session.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let session = try await users.createSession( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-target.md b/docs/examples/1.8.x/server-swift/examples/users/create-target.md new file mode 100644 index 0000000000..e736afcf31 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-target.md @@ -0,0 +1,19 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let target = try await users.createTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + providerType: .email, + identifier: "<IDENTIFIER>", + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create-token.md b/docs/examples/1.8.x/server-swift/examples/users/create-token.md new file mode 100644 index 0000000000..ca1767e178 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create-token.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let token = try await users.createToken( + userId: "<USER_ID>", + length: 4, // optional + expire: 60 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/create.md b/docs/examples/1.8.x/server-swift/examples/users/create.md new file mode 100644 index 0000000000..98b886005b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/create.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.create( + userId: "<USER_ID>", + email: "email@example.com", // optional + phone: "+12065550100", // optional + password: "", // optional + name: "<NAME>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/delete-identity.md b/docs/examples/1.8.x/server-swift/examples/users/delete-identity.md new file mode 100644 index 0000000000..bb3d812457 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/delete-identity.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteIdentity( + identityId: "<IDENTITY_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-swift/examples/users/delete-mfa-authenticator.md new file mode 100644 index 0000000000..da2b8e091a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/delete-mfa-authenticator.md @@ -0,0 +1,15 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteMfaAuthenticator( + userId: "<USER_ID>", + type: .totp +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/delete-session.md b/docs/examples/1.8.x/server-swift/examples/users/delete-session.md new file mode 100644 index 0000000000..c664e4f2ba --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/delete-session.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteSession( + userId: "<USER_ID>", + sessionId: "<SESSION_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-swift/examples/users/delete-sessions.md new file mode 100644 index 0000000000..92ab9d7748 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/delete-sessions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteSessions( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/delete-target.md b/docs/examples/1.8.x/server-swift/examples/users/delete-target.md new file mode 100644 index 0000000000..1cce56657a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/delete-target.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.deleteTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/delete.md b/docs/examples/1.8.x/server-swift/examples/users/delete.md new file mode 100644 index 0000000000..8dfe648d6e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/delete.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let result = try await users.delete( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-swift/examples/users/get-mfa-recovery-codes.md new file mode 100644 index 0000000000..1ae285142f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/get-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let mfaRecoveryCodes = try await users.getMfaRecoveryCodes( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/get-prefs.md b/docs/examples/1.8.x/server-swift/examples/users/get-prefs.md new file mode 100644 index 0000000000..c4ae61d9dd --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/get-prefs.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let preferences = try await users.getPrefs( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/get-target.md b/docs/examples/1.8.x/server-swift/examples/users/get-target.md new file mode 100644 index 0000000000..100c56398d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/get-target.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let target = try await users.getTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/get.md b/docs/examples/1.8.x/server-swift/examples/users/get.md new file mode 100644 index 0000000000..563042b8ef --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/get.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.get( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list-identities.md b/docs/examples/1.8.x/server-swift/examples/users/list-identities.md new file mode 100644 index 0000000000..8cbe8a71f4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list-identities.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let identityList = try await users.listIdentities( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list-logs.md b/docs/examples/1.8.x/server-swift/examples/users/list-logs.md new file mode 100644 index 0000000000..80d9199c3e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list-logs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let logList = try await users.listLogs( + userId: "<USER_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list-memberships.md b/docs/examples/1.8.x/server-swift/examples/users/list-memberships.md new file mode 100644 index 0000000000..0ae34d4582 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list-memberships.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let membershipList = try await users.listMemberships( + userId: "<USER_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-swift/examples/users/list-mfa-factors.md new file mode 100644 index 0000000000..a5b5e38e12 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list-mfa-factors.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let mfaFactors = try await users.listMfaFactors( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list-sessions.md b/docs/examples/1.8.x/server-swift/examples/users/list-sessions.md new file mode 100644 index 0000000000..e0278279a4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list-sessions.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let sessionList = try await users.listSessions( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list-targets.md b/docs/examples/1.8.x/server-swift/examples/users/list-targets.md new file mode 100644 index 0000000000..b069781f70 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list-targets.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let targetList = try await users.listTargets( + userId: "<USER_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/list.md b/docs/examples/1.8.x/server-swift/examples/users/list.md new file mode 100644 index 0000000000..45ccf23961 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/list.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let userList = try await users.list( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-swift/examples/users/update-email-verification.md new file mode 100644 index 0000000000..e0de947fa2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-email-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateEmailVerification( + userId: "<USER_ID>", + emailVerification: false +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-email.md b/docs/examples/1.8.x/server-swift/examples/users/update-email.md new file mode 100644 index 0000000000..4d3c1c2db2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-email.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateEmail( + userId: "<USER_ID>", + email: "email@example.com" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-labels.md b/docs/examples/1.8.x/server-swift/examples/users/update-labels.md new file mode 100644 index 0000000000..8916996b1f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-labels.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateLabels( + userId: "<USER_ID>", + labels: [] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-swift/examples/users/update-mfa-recovery-codes.md new file mode 100644 index 0000000000..a6169a782c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-mfa-recovery-codes.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let mfaRecoveryCodes = try await users.updateMfaRecoveryCodes( + userId: "<USER_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-mfa.md b/docs/examples/1.8.x/server-swift/examples/users/update-mfa.md new file mode 100644 index 0000000000..ad010f36b8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-mfa.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateMfa( + userId: "<USER_ID>", + mfa: false +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-name.md b/docs/examples/1.8.x/server-swift/examples/users/update-name.md new file mode 100644 index 0000000000..3735b706d8 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-name.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateName( + userId: "<USER_ID>", + name: "<NAME>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-password.md b/docs/examples/1.8.x/server-swift/examples/users/update-password.md new file mode 100644 index 0000000000..3a5b804478 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-password.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updatePassword( + userId: "<USER_ID>", + password: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-swift/examples/users/update-phone-verification.md new file mode 100644 index 0000000000..fffd768f5d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-phone-verification.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updatePhoneVerification( + userId: "<USER_ID>", + phoneVerification: false +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-phone.md b/docs/examples/1.8.x/server-swift/examples/users/update-phone.md new file mode 100644 index 0000000000..8411ad22a2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-phone.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updatePhone( + userId: "<USER_ID>", + number: "+12065550100" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-prefs.md b/docs/examples/1.8.x/server-swift/examples/users/update-prefs.md new file mode 100644 index 0000000000..c71b712df3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-prefs.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let preferences = try await users.updatePrefs( + userId: "<USER_ID>", + prefs: [:] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-status.md b/docs/examples/1.8.x/server-swift/examples/users/update-status.md new file mode 100644 index 0000000000..43ecea44f6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-status.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let user = try await users.updateStatus( + userId: "<USER_ID>", + status: false +) + diff --git a/docs/examples/1.8.x/server-swift/examples/users/update-target.md b/docs/examples/1.8.x/server-swift/examples/users/update-target.md new file mode 100644 index 0000000000..579f0d282e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/users/update-target.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let users = Users(client) + +let target = try await users.updateTarget( + userId: "<USER_ID>", + targetId: "<TARGET_ID>", + identifier: "<IDENTIFIER>", // optional + providerId: "<PROVIDER_ID>", // optional + name: "<NAME>" // optional +) + From 4521302cb87edb7419a1585b2b0a389bb8e8dc66 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Thu, 19 Jun 2025 18:36:32 +0530 Subject: [PATCH 184/362] fix: graphql test for complex queries. --- tests/e2e/Services/GraphQL/Base.php | 2 +- tests/e2e/Services/GraphQL/Tables/AbuseTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index bd3c792248..554f84e616 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -3070,7 +3070,7 @@ trait Base _id name } - databasesCreateTable(databaseId: $databaseId, tableId: $tableId, name: $tableName, rowSecurity: $rowSecurity, permissions: $tablePermissions) { + tablesCreate(databaseId: $databaseId, tableId: $tableId, name: $tableName, rowSecurity: $rowSecurity, permissions: $tablePermissions) { _id _createdAt _updatedAt diff --git a/tests/e2e/Services/GraphQL/Tables/AbuseTest.php b/tests/e2e/Services/GraphQL/Tables/AbuseTest.php index 8b759aa1ce..88c216dd5a 100644 --- a/tests/e2e/Services/GraphQL/Tables/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/Tables/AbuseTest.php @@ -132,7 +132,7 @@ class AbuseTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'], ], $gqlPayload); - $databaseId = $response['body']['data']['tablesCreate']['_id']; + $databaseId = $response['body']['data']['databasesCreate']['_id']; $query = $this->getQuery(self::$CREATE_TABLE); $gqlPayload = [ From d338007d688d582c7248967adfff3060a4f7685f Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 23 Jun 2025 10:44:25 +0530 Subject: [PATCH 185/362] update: re-add filters since the PR is in draft and will be merged in the end. --- app/controllers/general.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 4a4522afae..5f094b1549 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -845,10 +845,10 @@ App::init() if (version_compare($requestFormat, '1.7.0', '<')) { $request->addFilter(new RequestV19()); } - /*if (version_compare($requestFormat, '1.8.0', '<')) { + if (version_compare($requestFormat, '1.8.0', '<')) { $dbForProject = $getProjectDB($project); $request->addFilter(new RequestV20($dbForProject, $route)); - }*/ + } } $domain = $request->getHostname(); @@ -1018,9 +1018,9 @@ App::init() if (version_compare($responseFormat, '1.7.0', '<')) { $response->addFilter(new ResponseV19()); } - /*if (version_compare($responseFormat, '1.8.0', '<')) { + if (version_compare($responseFormat, '1.8.0', '<')) { $response->addFilter(new ResponseV20()); - }*/ + } if (version_compare($responseFormat, APP_VERSION_STABLE, '>')) { $response->addHeader('X-Appwrite-Warning', "The current SDK is built for Appwrite " . $responseFormat . ". However, the current Appwrite server version is " . APP_VERSION_STABLE . ". Please downgrade your SDK to match the Appwrite version: https://appwrite.io/docs/sdks"); } From ebfa6eba8b51da89917366cd8e7182b3713e0ffc Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 23 Jun 2025 11:49:43 +0530 Subject: [PATCH 186/362] update: formatter, specs, docs, sdk method names. --- app/config/specs/open-api3-1.8.x-console.json | 40 +++++++++------- app/config/specs/open-api3-1.8.x-server.json | 8 ++-- .../specs/open-api3-latest-console.json | 40 +++++++++------- app/config/specs/open-api3-latest-server.json | 8 ++-- app/config/specs/swagger2-1.8.x-console.json | 40 +++++++++------- app/config/specs/swagger2-1.8.x-server.json | 8 ++-- app/config/specs/swagger2-latest-console.json | 40 +++++++++------- app/config/specs/swagger2-latest-server.json | 8 ++-- .../examples/databases/get-database-usage.md | 14 ++++++ .../examples/databases/get-usage.md | 1 - .../examples/databases/list-usage.md | 13 +++++ .../examples/tables/create-index.md | 4 +- .../tables/create-relationship-column.md | 6 +-- .../console-web/examples/tables/get-usage.md | 15 ++++++ .../tables/update-relationship-column.md | 4 +- docs/references/databases/get-usage.md | 1 - docs/references/databases/list-usage.md | 1 + .../Http/Databases/Tables/Usage/Get.php | 2 +- .../Databases/Http/Databases/Usage/Get.php | 4 +- .../Databases/Http/Databases/Usage/XList.php | 6 +-- src/Appwrite/SDK/Specification/Format.php | 48 +++++++++++++++---- 21 files changed, 198 insertions(+), 113 deletions(-) create mode 100644 docs/examples/1.8.x/console-web/examples/databases/get-database-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/databases/list-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-usage.md delete mode 100644 docs/references/databases/get-usage.md create mode 100644 docs/references/databases/list-usage.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 77b8b42436..74dcc1ab18 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4674,11 +4674,11 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesListUsages", + "operationId": "databasesListUsage", "tags": [ "databases" ], - "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabases", @@ -4692,14 +4692,14 @@ } }, "x-appwrite": { - "method": "listUsages", + "method": "listUsage", "group": null, "weight": 324, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-usages.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", + "demo": "databases\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -4730,8 +4730,12 @@ "30d", "90d" ], - "x-enum-name": null, - "x-enum-keys": [], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d" }, "in": "query" @@ -11945,7 +11949,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -11972,7 +11976,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -12711,7 +12715,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12897,7 +12901,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { @@ -14436,7 +14440,7 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetTableUsage", + "operationId": "tablesGetUsage", "tags": [ "tables" ], @@ -14454,13 +14458,13 @@ } }, "x-appwrite": { - "method": "getTableUsage", + "method": "getUsage", "group": null, "weight": 377, "cookies": false, "type": "", "deprecated": false, - "demo": "tables\/get-table-usage.md", + "demo": "tables\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -14502,7 +14506,7 @@ "30d", "90d" ], - "x-enum-name": null, + "x-enum-name": "DatabaseUsageRange", "x-enum-keys": [], "default": "30d" }, @@ -14524,7 +14528,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesGetDatabaseUsage", "tags": [ "databases" ], @@ -14542,13 +14546,13 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "getDatabaseUsage", "group": null, "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", + "demo": "databases\/get-database-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, 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 a4e905fda7..78f3dac6d3 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -11129,7 +11129,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -11156,7 +11156,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -11902,7 +11902,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12090,7 +12090,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 77b8b42436..74dcc1ab18 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4674,11 +4674,11 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesListUsages", + "operationId": "databasesListUsage", "tags": [ "databases" ], - "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabases", @@ -4692,14 +4692,14 @@ } }, "x-appwrite": { - "method": "listUsages", + "method": "listUsage", "group": null, "weight": 324, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-usages.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", + "demo": "databases\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -4730,8 +4730,12 @@ "30d", "90d" ], - "x-enum-name": null, - "x-enum-keys": [], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d" }, "in": "query" @@ -11945,7 +11949,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -11972,7 +11976,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -12711,7 +12715,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12897,7 +12901,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { @@ -14436,7 +14440,7 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetTableUsage", + "operationId": "tablesGetUsage", "tags": [ "tables" ], @@ -14454,13 +14458,13 @@ } }, "x-appwrite": { - "method": "getTableUsage", + "method": "getUsage", "group": null, "weight": 377, "cookies": false, "type": "", "deprecated": false, - "demo": "tables\/get-table-usage.md", + "demo": "tables\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -14502,7 +14506,7 @@ "30d", "90d" ], - "x-enum-name": null, + "x-enum-name": "DatabaseUsageRange", "x-enum-keys": [], "default": "30d" }, @@ -14524,7 +14528,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesGetDatabaseUsage", "tags": [ "databases" ], @@ -14542,13 +14546,13 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "getDatabaseUsage", "group": null, "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", + "demo": "databases\/get-database-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index a4e905fda7..78f3dac6d3 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -11129,7 +11129,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -11156,7 +11156,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -11902,7 +11902,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12090,7 +12090,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 4ac2c7b317..3599ff8712 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -4843,7 +4843,7 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesListUsages", + "operationId": "databasesListUsage", "consumes": [], "produces": [ "application\/json" @@ -4851,7 +4851,7 @@ "tags": [ "databases" ], - "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabases", @@ -4861,14 +4861,14 @@ } }, "x-appwrite": { - "method": "listUsages", + "method": "listUsage", "group": null, "weight": 324, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-usages.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", + "demo": "databases\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -4898,8 +4898,12 @@ "30d", "90d" ], - "x-enum-name": null, - "x-enum-keys": [], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d", "in": "query" } @@ -11979,7 +11983,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -12010,7 +12014,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -12733,7 +12737,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12913,7 +12917,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { @@ -14392,7 +14396,7 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetTableUsage", + "operationId": "tablesGetUsage", "consumes": [], "produces": [ "application\/json" @@ -14410,13 +14414,13 @@ } }, "x-appwrite": { - "method": "getTableUsage", + "method": "getUsage", "group": null, "weight": 377, "cookies": false, "type": "", "deprecated": false, - "demo": "tables\/get-table-usage.md", + "demo": "tables\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -14455,7 +14459,7 @@ "30d", "90d" ], - "x-enum-name": null, + "x-enum-name": "DatabaseUsageRange", "x-enum-keys": [], "default": "30d", "in": "query" @@ -14474,7 +14478,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesGetDatabaseUsage", "consumes": [], "produces": [ "application\/json" @@ -14492,13 +14496,13 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "getDatabaseUsage", "group": null, "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", + "demo": "databases\/get-database-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 215735cdb9..31629e6018 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -11174,7 +11174,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -11205,7 +11205,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -11935,7 +11935,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12117,7 +12117,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 4ac2c7b317..3599ff8712 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4843,7 +4843,7 @@ "\/databases\/usage": { "get": { "summary": "Get databases usage stats", - "operationId": "databasesListUsages", + "operationId": "databasesListUsage", "consumes": [], "produces": [ "application\/json" @@ -4851,7 +4851,7 @@ "tags": [ "databases" ], - "description": "Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { "200": { "description": "UsageDatabases", @@ -4861,14 +4861,14 @@ } }, "x-appwrite": { - "method": "listUsages", + "method": "listUsage", "group": null, "weight": 324, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-usages.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-usage.md", + "demo": "databases\/list-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -4898,8 +4898,12 @@ "30d", "90d" ], - "x-enum-name": null, - "x-enum-keys": [], + "x-enum-name": "DatabaseUsageRange", + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d", "in": "query" } @@ -11979,7 +11983,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -12010,7 +12014,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -12733,7 +12737,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12913,7 +12917,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { @@ -14392,7 +14396,7 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetTableUsage", + "operationId": "tablesGetUsage", "consumes": [], "produces": [ "application\/json" @@ -14410,13 +14414,13 @@ } }, "x-appwrite": { - "method": "getTableUsage", + "method": "getUsage", "group": null, "weight": 377, "cookies": false, "type": "", "deprecated": false, - "demo": "tables\/get-table-usage.md", + "demo": "tables\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -14455,7 +14459,7 @@ "30d", "90d" ], - "x-enum-name": null, + "x-enum-name": "DatabaseUsageRange", "x-enum-keys": [], "default": "30d", "in": "query" @@ -14474,7 +14478,7 @@ "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", - "operationId": "databasesGetUsage", + "operationId": "databasesGetDatabaseUsage", "consumes": [], "produces": [ "application\/json" @@ -14492,13 +14496,13 @@ } }, "x-appwrite": { - "method": "getUsage", + "method": "getDatabaseUsage", "group": null, "weight": 323, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/get-usage.md", + "demo": "databases\/get-database-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, "rate-time": 3600, diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 215735cdb9..31629e6018 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -11174,7 +11174,7 @@ "manyToMany", "oneToMany" ], - "x-enum-name": null, + "x-enum-name": "RelationshipType", "x-enum-keys": [] }, "twoWay": { @@ -11205,7 +11205,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] } }, @@ -11935,7 +11935,7 @@ "restrict", "setNull" ], - "x-enum-name": null, + "x-enum-name": "RelationMutate", "x-enum-keys": [] }, "newKey": { @@ -12117,7 +12117,7 @@ "fulltext", "unique" ], - "x-enum-name": null, + "x-enum-name": "IndexType", "x-enum-keys": [] }, "columns": { diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-database-usage.md b/docs/examples/1.8.x/console-web/examples/databases/get-database-usage.md new file mode 100644 index 0000000000..13038ab755 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/get-database-usage.md @@ -0,0 +1,14 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const databases = new Databases(client); + +const result = await databases.getDatabaseUsage( + '<DATABASE_ID>', // databaseId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/get-usage.md b/docs/examples/1.8.x/console-web/examples/databases/get-usage.md index b02b0687b2..a0dd3ce983 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/get-usage.md +++ b/docs/examples/1.8.x/console-web/examples/databases/get-usage.md @@ -7,7 +7,6 @@ const client = new Client() const databases = new Databases(client); const result = await databases.getUsage( - '<DATABASE_ID>', // databaseId DatabaseUsageRange.TwentyFourHours // range (optional) ); diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-usage.md b/docs/examples/1.8.x/console-web/examples/databases/list-usage.md new file mode 100644 index 0000000000..1be9949a84 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/databases/list-usage.md @@ -0,0 +1,13 @@ +import { Client, Databases, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const databases = new Databases(client); + +const result = await databases.listUsage( + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-index.md b/docs/examples/1.8.x/console-web/examples/tables/create-index.md index b24575b6c5..c303dd289d 100644 --- a/docs/examples/1.8.x/console-web/examples/tables/create-index.md +++ b/docs/examples/1.8.x/console-web/examples/tables/create-index.md @@ -1,4 +1,4 @@ -import { Client, Tables, } from "@appwrite.io/console"; +import { Client, Tables, IndexType } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const result = await tables.createIndex( '<DATABASE_ID>', // databaseId '<TABLE_ID>', // tableId '', // key - .Key, // type + IndexType.Key, // type [], // columns [], // orders (optional) [] // lengths (optional) diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md index e6a27d6747..5658eec690 100644 --- a/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md +++ b/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md @@ -1,4 +1,4 @@ -import { Client, Tables, , } from "@appwrite.io/console"; +import { Client, Tables, RelationshipType, RelationMutate } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,11 +10,11 @@ const result = await tables.createRelationshipColumn( '<DATABASE_ID>', // databaseId '<TABLE_ID>', // tableId '<RELATED_TABLE_ID>', // relatedTableId - .OneToOne, // type + RelationshipType.OneToOne, // type false, // twoWay (optional) '', // key (optional) '', // twoWayKey (optional) - .Cascade // onDelete (optional) + RelationMutate.Cascade // onDelete (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-usage.md b/docs/examples/1.8.x/console-web/examples/tables/get-usage.md new file mode 100644 index 0000000000..914f11b7e2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-usage.md @@ -0,0 +1,15 @@ +import { Client, Tables, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getUsage( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + DatabaseUsageRange.24h // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md index 1847e3459e..192eac7175 100644 --- a/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md +++ b/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md @@ -1,4 +1,4 @@ -import { Client, Tables, } from "@appwrite.io/console"; +import { Client, Tables, RelationMutate } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,7 +10,7 @@ const result = await tables.updateRelationshipColumn( '<DATABASE_ID>', // databaseId '<TABLE_ID>', // tableId '', // key - .Cascade, // onDelete (optional) + RelationMutate.Cascade, // onDelete (optional) '' // newKey (optional) ); diff --git a/docs/references/databases/get-usage.md b/docs/references/databases/get-usage.md deleted file mode 100644 index d41f8704c8..0000000000 --- a/docs/references/databases/get-usage.md +++ /dev/null @@ -1 +0,0 @@ -Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/databases/list-usage.md b/docs/references/databases/list-usage.md new file mode 100644 index 0000000000..0f318d6466 --- /dev/null +++ b/docs/references/databases/list-usage.md @@ -0,0 +1 @@ +List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections/tables, documents/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index 99146d1dd0..78ff05f5fb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -36,7 +36,7 @@ class Get extends CollectionUsageGet ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: null, - name: self::getName(), + name: 'getUsage', // getName needs to be different from parent action to avoid conflict in path name description: '/docs/references/databases/get-table-usage.md', auth: [AuthType::ADMIN], responses: [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index 5482d25269..56fcc29688 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -22,7 +22,7 @@ class Get extends Action { public static function getName(): string { - return 'getUsage'; + return 'getDatabaseUsage'; } public function __construct() @@ -37,7 +37,7 @@ class Get extends Action ->label('sdk', new Method( namespace: 'databases', group: null, - name: 'getUsage', + name: self::getName(), description: '/docs/references/databases/get-database-usage.md', auth: [AuthType::ADMIN], responses: [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php index fd3a95cd24..b5c898fd1b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -20,7 +20,7 @@ class XList extends Action { public static function getName(): string { - return 'listUsages'; + return 'listUsage'; } public function __construct() @@ -35,8 +35,8 @@ class XList extends Action ->label('sdk', new Method( namespace: 'databases', group: null, - name: 'listUsages', - description: '/docs/references/databases/get-usage.md', + name: self::getName(), + description: '/docs/references/databases/list-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index af3b5c017e..6fa104457c 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -172,7 +172,8 @@ abstract class Format break; case 'databases': switch ($method) { - case 'getUsage': + /*case 'getUsage':*/ + case 'listUsage': case 'getCollectionUsage': case 'getDatabaseUsage': switch ($param) { @@ -203,6 +204,37 @@ abstract class Format } } break; + case 'tables': + switch ($method) { + case 'getUsage': + switch ($param) { + case 'range': + return 'DatabaseUsageRange'; + } + break; + case 'createRelationshipColumn': + switch ($param) { + case 'type': + return 'RelationshipType'; + case 'onDelete': + return 'RelationMutate'; + } + break; + case 'updateRelationshipColumn': + switch ($param) { + case 'onDelete': + return 'RelationMutate'; + } + break; + case 'createIndex': + switch ($param) { + case 'type': + return 'IndexType'; + case 'orders': + return 'OrderBy'; + } + } + break; case 'functions': switch ($method) { case 'getUsage': @@ -413,6 +445,7 @@ abstract class Format } return null; } + public function getEnumKeys(string $service, string $method, string $param): array { $values = []; @@ -441,7 +474,9 @@ abstract class Format break; case 'databases': switch ($method) { - case 'getUsage': + /*case 'getUsage':*/ + case 'listUsage': + case 'getTableUsage': case 'getCollectionUsage': case 'getDatabaseUsage': // Range Enum Keys @@ -460,15 +495,8 @@ abstract class Format break; } break; - case 'functions': - switch ($method) { - case 'getUsage': - case 'listUsage': - // Range Enum Keys - return ['Twenty Four Hours', 'Thirty Days', 'Ninety Days']; - } - break; case 'sites': + case 'functions': switch ($method) { case 'getUsage': case 'listUsage': From 7f8fcb1b0b299afb0998ec3eee429956b19e9ce8 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 23 Jun 2025 12:03:45 +0530 Subject: [PATCH 187/362] fix: missing range on tables api. --- app/config/specs/open-api3-1.8.x-console.json | 6 +++++- app/config/specs/open-api3-latest-console.json | 6 +++++- app/config/specs/swagger2-1.8.x-console.json | 6 +++++- app/config/specs/swagger2-latest-console.json | 6 +++++- .../1.8.x/console-web/examples/tables/get-usage.md | 2 +- src/Appwrite/SDK/Specification/Format.php | 7 +++++++ 6 files changed, 28 insertions(+), 5 deletions(-) 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 74dcc1ab18..5ab268bfc6 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -14507,7 +14507,11 @@ "90d" ], "x-enum-name": "DatabaseUsageRange", - "x-enum-keys": [], + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d" }, "in": "query" diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 74dcc1ab18..5ab268bfc6 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -14507,7 +14507,11 @@ "90d" ], "x-enum-name": "DatabaseUsageRange", - "x-enum-keys": [], + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d" }, "in": "query" diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 3599ff8712..e89e44d914 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -14460,7 +14460,11 @@ "90d" ], "x-enum-name": "DatabaseUsageRange", - "x-enum-keys": [], + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d", "in": "query" }, diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 3599ff8712..e89e44d914 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -14460,7 +14460,11 @@ "90d" ], "x-enum-name": "DatabaseUsageRange", - "x-enum-keys": [], + "x-enum-keys": [ + "Twenty Four Hours", + "Thirty Days", + "Ninety Days" + ], "default": "30d", "in": "query" }, diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-usage.md b/docs/examples/1.8.x/console-web/examples/tables/get-usage.md index 914f11b7e2..0f9d31c92d 100644 --- a/docs/examples/1.8.x/console-web/examples/tables/get-usage.md +++ b/docs/examples/1.8.x/console-web/examples/tables/get-usage.md @@ -9,7 +9,7 @@ const tables = new Tables(client); const result = await tables.getUsage( '<DATABASE_ID>', // databaseId '<TABLE_ID>', // tableId - DatabaseUsageRange.24h // range (optional) + DatabaseUsageRange.TwentyFourHours // range (optional) ); console.log(result); diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index 6fa104457c..a8b71e0810 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -483,6 +483,13 @@ abstract class Format return ['Twenty Four Hours', 'Thirty Days', 'Ninety Days']; } break; + case 'tables': + switch ($method) { + case 'getUsage': + // Range Enum Keys + return ['Twenty Four Hours', 'Thirty Days', 'Ninety Days']; + } + break; case 'proxy': switch ($method) { case 'createRedirectRule': From 7969e5713430fbcf75f455b8d58eb12758814bd8 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 23 Jun 2025 12:11:00 +0530 Subject: [PATCH 188/362] ci: empty commit From 597230006fa8218c61b3a3da64b4157b63a82779 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 23 Jun 2025 12:23:26 +0530 Subject: [PATCH 189/362] fix: oha as per latest updates. --- .github/workflows/benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 6d73787d00..9ba52dff23 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -65,7 +65,7 @@ jobs: sudo apt update sudo apt install oha - name: Benchmark PR - run: 'oha -z 180s http://localhost/v1/health/version -j > benchmark.json' + run: 'oha -z 180s http://localhost/v1/health/version -o json > benchmark.json' - name: Cleaning run: docker compose down -v - name: Installing latest version @@ -78,7 +78,7 @@ jobs: docker compose up -d sleep 10 - name: Benchmark Latest - run: oha -z 180s http://localhost/v1/health/version -j > benchmark-latest.json + run: oha -z 180s http://localhost/v1/health/version -o json > benchmark-latest.json - name: Prepare comment run: | echo '## :sparkles: Benchmark results' > benchmark.txt From 9b51b1bf9c604429f5115b8fc8692595e57bd8ff Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 23 Jun 2025 12:27:00 +0530 Subject: [PATCH 190/362] fix: oha as per latest updates. --- .github/workflows/benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 6d73787d00..9ba52dff23 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -65,7 +65,7 @@ jobs: sudo apt update sudo apt install oha - name: Benchmark PR - run: 'oha -z 180s http://localhost/v1/health/version -j > benchmark.json' + run: 'oha -z 180s http://localhost/v1/health/version -o json > benchmark.json' - name: Cleaning run: docker compose down -v - name: Installing latest version @@ -78,7 +78,7 @@ jobs: docker compose up -d sleep 10 - name: Benchmark Latest - run: oha -z 180s http://localhost/v1/health/version -j > benchmark-latest.json + run: oha -z 180s http://localhost/v1/health/version -o json > benchmark-latest.json - name: Prepare comment run: | echo '## :sparkles: Benchmark results' > benchmark.txt From b52c49389c6cfc820b977d9b3b05ca926a172170 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 23 Jun 2025 12:28:14 +0530 Subject: [PATCH 191/362] fix: oha as per latest updates. --- .github/workflows/benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 6d73787d00..6b159985f2 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -65,7 +65,7 @@ jobs: sudo apt update sudo apt install oha - name: Benchmark PR - run: 'oha -z 180s http://localhost/v1/health/version -j > benchmark.json' + run: 'oha -z 180s http://localhost/v1/health/version -o json > benchmark.json' - name: Cleaning run: docker compose down -v - name: Installing latest version @@ -78,7 +78,7 @@ jobs: docker compose up -d sleep 10 - name: Benchmark Latest - run: oha -z 180s http://localhost/v1/health/version -j > benchmark-latest.json + run: 'oha -z 180s http://localhost/v1/health/version -o json > benchmark-latest.json' - name: Prepare comment run: | echo '## :sparkles: Benchmark results' > benchmark.txt From 6a74273564dd43ded759befa6e265dbdbe148d41 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 23 Jun 2025 12:45:34 +0530 Subject: [PATCH 192/362] fix: oha as per latest updates. --- .github/workflows/benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 6b159985f2..262c79ab3d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -65,7 +65,7 @@ jobs: sudo apt update sudo apt install oha - name: Benchmark PR - run: 'oha -z 180s http://localhost/v1/health/version -o json > benchmark.json' + run: 'oha -z 180s http://localhost/v1/health/version --output-format json --output benchmark.json' - name: Cleaning run: docker compose down -v - name: Installing latest version @@ -78,7 +78,7 @@ jobs: docker compose up -d sleep 10 - name: Benchmark Latest - run: 'oha -z 180s http://localhost/v1/health/version -o json > benchmark-latest.json' + run: 'oha -z 180s http://localhost/v1/health/version --output-format json --output benchmark-latest.json' - name: Prepare comment run: | echo '## :sparkles: Benchmark results' > benchmark.txt From 38a39d116849f4316e1d20882435036fd005419a Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 23 Jun 2025 12:57:40 +0530 Subject: [PATCH 193/362] fix: oha as per latest updates. --- .github/workflows/benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 9ba52dff23..262c79ab3d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -65,7 +65,7 @@ jobs: sudo apt update sudo apt install oha - name: Benchmark PR - run: 'oha -z 180s http://localhost/v1/health/version -o json > benchmark.json' + run: 'oha -z 180s http://localhost/v1/health/version --output-format json --output benchmark.json' - name: Cleaning run: docker compose down -v - name: Installing latest version @@ -78,7 +78,7 @@ jobs: docker compose up -d sleep 10 - name: Benchmark Latest - run: oha -z 180s http://localhost/v1/health/version -o json > benchmark-latest.json + run: 'oha -z 180s http://localhost/v1/health/version --output-format json --output benchmark-latest.json' - name: Prepare comment run: | echo '## :sparkles: Benchmark results' > benchmark.txt From ffccdef68c420bf5b09e78cfd27ec9f69950d59c Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 23 Jun 2025 12:58:46 +0530 Subject: [PATCH 194/362] fix: oha as per latest updates. --- .github/workflows/benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 9ba52dff23..262c79ab3d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -65,7 +65,7 @@ jobs: sudo apt update sudo apt install oha - name: Benchmark PR - run: 'oha -z 180s http://localhost/v1/health/version -o json > benchmark.json' + run: 'oha -z 180s http://localhost/v1/health/version --output-format json --output benchmark.json' - name: Cleaning run: docker compose down -v - name: Installing latest version @@ -78,7 +78,7 @@ jobs: docker compose up -d sleep 10 - name: Benchmark Latest - run: oha -z 180s http://localhost/v1/health/version -o json > benchmark-latest.json + run: 'oha -z 180s http://localhost/v1/health/version --output-format json --output benchmark-latest.json' - name: Prepare comment run: | echo '## :sparkles: Benchmark results' > benchmark.txt From ac395452bc4c1f22e89c5e5edc82a9040ca4dff9 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 24 Jun 2025 14:03:19 +0530 Subject: [PATCH 195/362] chore: deprecate old database methods --- app/config/specs/open-api3-1.8.x-console.json | 69 ++++++++++++------- app/config/specs/open-api3-1.8.x-server.json | 69 ++++++++++++------- app/config/specs/swagger2-1.8.x-console.json | 69 ++++++++++++------- app/config/specs/swagger2-1.8.x-server.json | 69 ++++++++++++------- app/controllers/api/account.php | 4 +- .../Collections/Attributes/Boolean/Create.php | 5 +- .../Collections/Attributes/Boolean/Update.php | 5 +- .../Attributes/Datetime/Create.php | 5 +- .../Attributes/Datetime/Update.php | 5 +- .../Collections/Attributes/Delete.php | 5 +- .../Collections/Attributes/Email/Create.php | 5 +- .../Collections/Attributes/Email/Update.php | 5 +- .../Collections/Attributes/Enum/Create.php | 5 +- .../Collections/Attributes/Enum/Update.php | 5 +- .../Collections/Attributes/Float/Create.php | 5 +- .../Collections/Attributes/Float/Update.php | 5 +- .../Databases/Collections/Attributes/Get.php | 5 +- .../Collections/Attributes/IP/Create.php | 5 +- .../Collections/Attributes/IP/Update.php | 5 +- .../Collections/Attributes/Integer/Create.php | 5 +- .../Collections/Attributes/Integer/Update.php | 5 +- .../Attributes/Relationship/Create.php | 5 +- .../Attributes/Relationship/Update.php | 5 +- .../Collections/Attributes/String/Create.php | 5 +- .../Collections/Attributes/String/Update.php | 5 +- .../Collections/Attributes/URL/Create.php | 5 +- .../Collections/Attributes/URL/Update.php | 5 +- .../Collections/Attributes/XList.php | 5 +- src/Appwrite/SDK/Method.php | 40 +++++++++-- .../SDK/Specification/Format/OpenAPI3.php | 7 ++ .../SDK/Specification/Format/Swagger2.php | 8 +++ 31 files changed, 329 insertions(+), 121 deletions(-) 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 77b8b42436..27471cc69d 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -5387,7 +5387,7 @@ "weight": 346, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5398,6 +5398,7 @@ "server" ], "packaging": false, + "replaceWith": "listColumns", "auth": { "Project": [] } @@ -5471,7 +5472,7 @@ "weight": 347, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5482,6 +5483,7 @@ "server" ], "packaging": false, + "replaceWith": "createBooleanColumn", "auth": { "Project": [] } @@ -5577,7 +5579,7 @@ "weight": 348, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5588,6 +5590,7 @@ "server" ], "packaging": false, + "replaceWith": "updateBooleanColumn", "auth": { "Project": [] } @@ -5688,7 +5691,7 @@ "weight": 349, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5699,6 +5702,7 @@ "server" ], "packaging": false, + "replaceWith": "createDatetimeColumn", "auth": { "Project": [] } @@ -5794,7 +5798,7 @@ "weight": 350, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5805,6 +5809,7 @@ "server" ], "packaging": false, + "replaceWith": "updateDatetimeColumn", "auth": { "Project": [] } @@ -5905,7 +5910,7 @@ "weight": 351, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5916,6 +5921,7 @@ "server" ], "packaging": false, + "replaceWith": "createEmailColumn", "auth": { "Project": [] } @@ -6011,7 +6017,7 @@ "weight": 352, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -6022,6 +6028,7 @@ "server" ], "packaging": false, + "replaceWith": "updateEmailColumn", "auth": { "Project": [] } @@ -6122,7 +6129,7 @@ "weight": 353, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -6133,6 +6140,7 @@ "server" ], "packaging": false, + "replaceWith": "createEnumColumn", "auth": { "Project": [] } @@ -6237,7 +6245,7 @@ "weight": 354, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -6248,6 +6256,7 @@ "server" ], "packaging": false, + "replaceWith": "updateEnumColumn", "auth": { "Project": [] } @@ -6357,7 +6366,7 @@ "weight": 355, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -6368,6 +6377,7 @@ "server" ], "packaging": false, + "replaceWith": "createFloatColumn", "auth": { "Project": [] } @@ -6473,7 +6483,7 @@ "weight": 356, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6484,6 +6494,7 @@ "server" ], "packaging": false, + "replaceWith": "updateFloatColumn", "auth": { "Project": [] } @@ -6594,7 +6605,7 @@ "weight": 357, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6605,6 +6616,7 @@ "server" ], "packaging": false, + "replaceWith": "createIntegerColumn", "auth": { "Project": [] } @@ -6710,7 +6722,7 @@ "weight": 358, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6721,6 +6733,7 @@ "server" ], "packaging": false, + "replaceWith": "updateIntegerColumn", "auth": { "Project": [] } @@ -6831,7 +6844,7 @@ "weight": 359, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6842,6 +6855,7 @@ "server" ], "packaging": false, + "replaceWith": "createIpColumn", "auth": { "Project": [] } @@ -6937,7 +6951,7 @@ "weight": 360, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6948,6 +6962,7 @@ "server" ], "packaging": false, + "replaceWith": "updateIpColumn", "auth": { "Project": [] } @@ -7048,7 +7063,7 @@ "weight": 361, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -7059,6 +7074,7 @@ "server" ], "packaging": false, + "replaceWith": "createRelationshipColumn", "auth": { "Project": [] } @@ -7179,7 +7195,7 @@ "weight": 363, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -7190,6 +7206,7 @@ "server" ], "packaging": false, + "replaceWith": "createStringColumn", "auth": { "Project": [] } @@ -7296,7 +7313,7 @@ "weight": 364, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -7307,6 +7324,7 @@ "server" ], "packaging": false, + "replaceWith": "updateStringColumn", "auth": { "Project": [] } @@ -7412,7 +7430,7 @@ "weight": 365, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7423,6 +7441,7 @@ "server" ], "packaging": false, + "replaceWith": "createUrlColumn", "auth": { "Project": [] } @@ -7518,7 +7537,7 @@ "weight": 366, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7529,6 +7548,7 @@ "server" ], "packaging": false, + "replaceWith": "updateUrlColumn", "auth": { "Project": [] } @@ -7660,7 +7680,7 @@ "weight": 344, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7671,6 +7691,7 @@ "server" ], "packaging": false, + "replaceWith": "getColumn", "auth": { "Project": [] } @@ -7731,7 +7752,7 @@ "weight": 345, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7742,6 +7763,7 @@ "server" ], "packaging": false, + "replaceWith": "deleteColumn", "auth": { "Project": [] } @@ -7811,7 +7833,7 @@ "weight": 362, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7822,6 +7844,7 @@ "server" ], "packaging": false, + "replaceWith": "updateRelationshipColumn", "auth": { "Project": [] } 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 a4e905fda7..22c4142e74 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4847,7 +4847,7 @@ "weight": 346, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -4858,6 +4858,7 @@ "server" ], "packaging": false, + "replaceWith": "listColumns", "auth": { "Project": [], "Key": [] @@ -4932,7 +4933,7 @@ "weight": 347, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -4943,6 +4944,7 @@ "server" ], "packaging": false, + "replaceWith": "createBooleanColumn", "auth": { "Project": [], "Key": [] @@ -5039,7 +5041,7 @@ "weight": 348, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5050,6 +5052,7 @@ "server" ], "packaging": false, + "replaceWith": "updateBooleanColumn", "auth": { "Project": [], "Key": [] @@ -5151,7 +5154,7 @@ "weight": 349, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5162,6 +5165,7 @@ "server" ], "packaging": false, + "replaceWith": "createDatetimeColumn", "auth": { "Project": [], "Key": [] @@ -5258,7 +5262,7 @@ "weight": 350, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5269,6 +5273,7 @@ "server" ], "packaging": false, + "replaceWith": "updateDatetimeColumn", "auth": { "Project": [], "Key": [] @@ -5370,7 +5375,7 @@ "weight": 351, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5381,6 +5386,7 @@ "server" ], "packaging": false, + "replaceWith": "createEmailColumn", "auth": { "Project": [], "Key": [] @@ -5477,7 +5483,7 @@ "weight": 352, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -5488,6 +5494,7 @@ "server" ], "packaging": false, + "replaceWith": "updateEmailColumn", "auth": { "Project": [], "Key": [] @@ -5589,7 +5596,7 @@ "weight": 353, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -5600,6 +5607,7 @@ "server" ], "packaging": false, + "replaceWith": "createEnumColumn", "auth": { "Project": [], "Key": [] @@ -5705,7 +5713,7 @@ "weight": 354, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -5716,6 +5724,7 @@ "server" ], "packaging": false, + "replaceWith": "updateEnumColumn", "auth": { "Project": [], "Key": [] @@ -5826,7 +5835,7 @@ "weight": 355, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -5837,6 +5846,7 @@ "server" ], "packaging": false, + "replaceWith": "createFloatColumn", "auth": { "Project": [], "Key": [] @@ -5943,7 +5953,7 @@ "weight": 356, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -5954,6 +5964,7 @@ "server" ], "packaging": false, + "replaceWith": "updateFloatColumn", "auth": { "Project": [], "Key": [] @@ -6065,7 +6076,7 @@ "weight": 357, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6076,6 +6087,7 @@ "server" ], "packaging": false, + "replaceWith": "createIntegerColumn", "auth": { "Project": [], "Key": [] @@ -6182,7 +6194,7 @@ "weight": 358, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6193,6 +6205,7 @@ "server" ], "packaging": false, + "replaceWith": "updateIntegerColumn", "auth": { "Project": [], "Key": [] @@ -6304,7 +6317,7 @@ "weight": 359, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6315,6 +6328,7 @@ "server" ], "packaging": false, + "replaceWith": "createIpColumn", "auth": { "Project": [], "Key": [] @@ -6411,7 +6425,7 @@ "weight": 360, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6422,6 +6436,7 @@ "server" ], "packaging": false, + "replaceWith": "updateIpColumn", "auth": { "Project": [], "Key": [] @@ -6523,7 +6538,7 @@ "weight": 361, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -6534,6 +6549,7 @@ "server" ], "packaging": false, + "replaceWith": "createRelationshipColumn", "auth": { "Project": [], "Key": [] @@ -6655,7 +6671,7 @@ "weight": 363, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -6666,6 +6682,7 @@ "server" ], "packaging": false, + "replaceWith": "createStringColumn", "auth": { "Project": [], "Key": [] @@ -6773,7 +6790,7 @@ "weight": 364, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -6784,6 +6801,7 @@ "server" ], "packaging": false, + "replaceWith": "updateStringColumn", "auth": { "Project": [], "Key": [] @@ -6890,7 +6908,7 @@ "weight": 365, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -6901,6 +6919,7 @@ "server" ], "packaging": false, + "replaceWith": "createUrlColumn", "auth": { "Project": [], "Key": [] @@ -6997,7 +7016,7 @@ "weight": 366, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7008,6 +7027,7 @@ "server" ], "packaging": false, + "replaceWith": "updateUrlColumn", "auth": { "Project": [], "Key": [] @@ -7140,7 +7160,7 @@ "weight": 344, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7151,6 +7171,7 @@ "server" ], "packaging": false, + "replaceWith": "getColumn", "auth": { "Project": [], "Key": [] @@ -7212,7 +7233,7 @@ "weight": 345, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7223,6 +7244,7 @@ "server" ], "packaging": false, + "replaceWith": "deleteColumn", "auth": { "Project": [], "Key": [] @@ -7293,7 +7315,7 @@ "weight": 362, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7304,6 +7326,7 @@ "server" ], "packaging": false, + "replaceWith": "updateRelationshipColumn", "auth": { "Project": [], "Key": [] diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 4ac2c7b317..c7c873ae3f 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -5548,7 +5548,7 @@ "weight": 346, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5559,6 +5559,7 @@ "server" ], "packaging": false, + "replaceWith": "listColumns", "auth": { "Project": [] } @@ -5629,7 +5630,7 @@ "weight": 347, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5640,6 +5641,7 @@ "server" ], "packaging": false, + "replaceWith": "createBooleanColumn", "auth": { "Project": [] } @@ -5735,7 +5737,7 @@ "weight": 348, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5746,6 +5748,7 @@ "server" ], "packaging": false, + "replaceWith": "updateBooleanColumn", "auth": { "Project": [] } @@ -5843,7 +5846,7 @@ "weight": 349, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5854,6 +5857,7 @@ "server" ], "packaging": false, + "replaceWith": "createDatetimeColumn", "auth": { "Project": [] } @@ -5949,7 +5953,7 @@ "weight": 350, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5960,6 +5964,7 @@ "server" ], "packaging": false, + "replaceWith": "updateDatetimeColumn", "auth": { "Project": [] } @@ -6057,7 +6062,7 @@ "weight": 351, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -6068,6 +6073,7 @@ "server" ], "packaging": false, + "replaceWith": "createEmailColumn", "auth": { "Project": [] } @@ -6163,7 +6169,7 @@ "weight": 352, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -6174,6 +6180,7 @@ "server" ], "packaging": false, + "replaceWith": "updateEmailColumn", "auth": { "Project": [] } @@ -6271,7 +6278,7 @@ "weight": 353, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -6282,6 +6289,7 @@ "server" ], "packaging": false, + "replaceWith": "createEnumColumn", "auth": { "Project": [] } @@ -6387,7 +6395,7 @@ "weight": 354, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -6398,6 +6406,7 @@ "server" ], "packaging": false, + "replaceWith": "updateEnumColumn", "auth": { "Project": [] } @@ -6505,7 +6514,7 @@ "weight": 355, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -6516,6 +6525,7 @@ "server" ], "packaging": false, + "replaceWith": "createFloatColumn", "auth": { "Project": [] } @@ -6623,7 +6633,7 @@ "weight": 356, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6634,6 +6644,7 @@ "server" ], "packaging": false, + "replaceWith": "updateFloatColumn", "auth": { "Project": [] } @@ -6743,7 +6754,7 @@ "weight": 357, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6754,6 +6765,7 @@ "server" ], "packaging": false, + "replaceWith": "createIntegerColumn", "auth": { "Project": [] } @@ -6861,7 +6873,7 @@ "weight": 358, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6872,6 +6884,7 @@ "server" ], "packaging": false, + "replaceWith": "updateIntegerColumn", "auth": { "Project": [] } @@ -6981,7 +6994,7 @@ "weight": 359, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6992,6 +7005,7 @@ "server" ], "packaging": false, + "replaceWith": "createIpColumn", "auth": { "Project": [] } @@ -7087,7 +7101,7 @@ "weight": 360, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -7098,6 +7112,7 @@ "server" ], "packaging": false, + "replaceWith": "updateIpColumn", "auth": { "Project": [] } @@ -7195,7 +7210,7 @@ "weight": 361, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -7206,6 +7221,7 @@ "server" ], "packaging": false, + "replaceWith": "createRelationshipColumn", "auth": { "Project": [] } @@ -7328,7 +7344,7 @@ "weight": 363, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -7339,6 +7355,7 @@ "server" ], "packaging": false, + "replaceWith": "createStringColumn", "auth": { "Project": [] } @@ -7447,7 +7464,7 @@ "weight": 364, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -7458,6 +7475,7 @@ "server" ], "packaging": false, + "replaceWith": "updateStringColumn", "auth": { "Project": [] } @@ -7561,7 +7579,7 @@ "weight": 365, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7572,6 +7590,7 @@ "server" ], "packaging": false, + "replaceWith": "createUrlColumn", "auth": { "Project": [] } @@ -7667,7 +7686,7 @@ "weight": 366, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7678,6 +7697,7 @@ "server" ], "packaging": false, + "replaceWith": "updateUrlColumn", "auth": { "Project": [] } @@ -7804,7 +7824,7 @@ "weight": 344, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7815,6 +7835,7 @@ "server" ], "packaging": false, + "replaceWith": "getColumn", "auth": { "Project": [] } @@ -7873,7 +7894,7 @@ "weight": 345, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7884,6 +7905,7 @@ "server" ], "packaging": false, + "replaceWith": "deleteColumn", "auth": { "Project": [] } @@ -7949,7 +7971,7 @@ "weight": 362, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7960,6 +7982,7 @@ "server" ], "packaging": false, + "replaceWith": "updateRelationshipColumn", "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 215735cdb9..2028f2a9cd 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -4998,7 +4998,7 @@ "weight": 346, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5009,6 +5009,7 @@ "server" ], "packaging": false, + "replaceWith": "listColumns", "auth": { "Project": [], "Key": [] @@ -5080,7 +5081,7 @@ "weight": 347, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5091,6 +5092,7 @@ "server" ], "packaging": false, + "replaceWith": "createBooleanColumn", "auth": { "Project": [], "Key": [] @@ -5187,7 +5189,7 @@ "weight": 348, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5198,6 +5200,7 @@ "server" ], "packaging": false, + "replaceWith": "updateBooleanColumn", "auth": { "Project": [], "Key": [] @@ -5296,7 +5299,7 @@ "weight": 349, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5307,6 +5310,7 @@ "server" ], "packaging": false, + "replaceWith": "createDatetimeColumn", "auth": { "Project": [], "Key": [] @@ -5403,7 +5407,7 @@ "weight": 350, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5414,6 +5418,7 @@ "server" ], "packaging": false, + "replaceWith": "updateDatetimeColumn", "auth": { "Project": [], "Key": [] @@ -5512,7 +5517,7 @@ "weight": 351, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5523,6 +5528,7 @@ "server" ], "packaging": false, + "replaceWith": "createEmailColumn", "auth": { "Project": [], "Key": [] @@ -5619,7 +5625,7 @@ "weight": 352, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -5630,6 +5636,7 @@ "server" ], "packaging": false, + "replaceWith": "updateEmailColumn", "auth": { "Project": [], "Key": [] @@ -5728,7 +5735,7 @@ "weight": 353, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -5739,6 +5746,7 @@ "server" ], "packaging": false, + "replaceWith": "createEnumColumn", "auth": { "Project": [], "Key": [] @@ -5845,7 +5853,7 @@ "weight": 354, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -5856,6 +5864,7 @@ "server" ], "packaging": false, + "replaceWith": "updateEnumColumn", "auth": { "Project": [], "Key": [] @@ -5964,7 +5973,7 @@ "weight": 355, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -5975,6 +5984,7 @@ "server" ], "packaging": false, + "replaceWith": "createFloatColumn", "auth": { "Project": [], "Key": [] @@ -6083,7 +6093,7 @@ "weight": 356, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6094,6 +6104,7 @@ "server" ], "packaging": false, + "replaceWith": "updateFloatColumn", "auth": { "Project": [], "Key": [] @@ -6204,7 +6215,7 @@ "weight": 357, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6215,6 +6226,7 @@ "server" ], "packaging": false, + "replaceWith": "createIntegerColumn", "auth": { "Project": [], "Key": [] @@ -6323,7 +6335,7 @@ "weight": 358, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6334,6 +6346,7 @@ "server" ], "packaging": false, + "replaceWith": "updateIntegerColumn", "auth": { "Project": [], "Key": [] @@ -6444,7 +6457,7 @@ "weight": 359, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6455,6 +6468,7 @@ "server" ], "packaging": false, + "replaceWith": "createIpColumn", "auth": { "Project": [], "Key": [] @@ -6551,7 +6565,7 @@ "weight": 360, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6562,6 +6576,7 @@ "server" ], "packaging": false, + "replaceWith": "updateIpColumn", "auth": { "Project": [], "Key": [] @@ -6660,7 +6675,7 @@ "weight": 361, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -6671,6 +6686,7 @@ "server" ], "packaging": false, + "replaceWith": "createRelationshipColumn", "auth": { "Project": [], "Key": [] @@ -6794,7 +6810,7 @@ "weight": 363, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -6805,6 +6821,7 @@ "server" ], "packaging": false, + "replaceWith": "createStringColumn", "auth": { "Project": [], "Key": [] @@ -6914,7 +6931,7 @@ "weight": 364, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -6925,6 +6942,7 @@ "server" ], "packaging": false, + "replaceWith": "updateStringColumn", "auth": { "Project": [], "Key": [] @@ -7029,7 +7047,7 @@ "weight": 365, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7040,6 +7058,7 @@ "server" ], "packaging": false, + "replaceWith": "createUrlColumn", "auth": { "Project": [], "Key": [] @@ -7136,7 +7155,7 @@ "weight": 366, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7147,6 +7166,7 @@ "server" ], "packaging": false, + "replaceWith": "updateUrlColumn", "auth": { "Project": [], "Key": [] @@ -7274,7 +7294,7 @@ "weight": 344, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7285,6 +7305,7 @@ "server" ], "packaging": false, + "replaceWith": "getColumn", "auth": { "Project": [], "Key": [] @@ -7344,7 +7365,7 @@ "weight": 345, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7355,6 +7376,7 @@ "server" ], "packaging": false, + "replaceWith": "deleteColumn", "auth": { "Project": [], "Key": [] @@ -7421,7 +7443,7 @@ "weight": 362, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7432,6 +7454,7 @@ "server" ], "packaging": false, + "replaceWith": "updateRelationshipColumn", "auth": { "Project": [], "Key": [] diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 2bb009cf61..2a200f404c 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -2323,7 +2323,7 @@ App::put('/v1/account/sessions/magic-url') ) ], contentType: ContentType::JSON, - deprecated: true, + deprecated: [], )) ->label('abuse-limit', 10) ->label('abuse-key', 'ip:{ip},userId:{param-userId}') @@ -2361,7 +2361,7 @@ App::put('/v1/account/sessions/phone') ) ], contentType: ContentType::JSON, - deprecated: true, + deprecated: [], )) ->label('abuse-limit', 10) ->label('abuse-key', 'ip:{ip},userId:{param-userId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php index c38ef8d703..a33668fc50 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php @@ -51,7 +51,10 @@ class Create extends Action code: SwooleResponse::STATUS_CODE_ACCEPTED, model: $this->getResponseModel(), ) - ] + ], + deprecated: [ + 'replaceWith' => 'createBooleanColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php index 9bb606edf5..ec2c7d0181 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php @@ -52,7 +52,10 @@ class Update extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'updateBooleanColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php index ff8054abe4..5672deefe1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php @@ -52,7 +52,10 @@ class Create extends Action code: SwooleResponse::STATUS_CODE_ACCEPTED, model: $this->getResponseModel() ) - ] + ], + deprecated: [ + 'replaceWith' => 'createDatetimeColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php index 5f8909a294..16c48abf17 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php @@ -53,7 +53,10 @@ class Update extends Action model: $this->getResponseModel() ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'updateDatetimeColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 5816de31a2..5db2bd4b51 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -53,7 +53,10 @@ class Delete extends Action model: UtopiaResponse::MODEL_NONE, ) ], - contentType: ContentType::NONE + contentType: ContentType::NONE, + deprecated: [ + 'replaceWith' => 'deleteColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php index 3c703f23a7..04b3b44285 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php @@ -52,7 +52,10 @@ class Create extends Action code: SwooleResponse::STATUS_CODE_ACCEPTED, model: $this->getResponseModel(), ) - ] + ], + deprecated: [ + 'replaceWith' => 'createEmailColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php index c8a34cf55c..13fec34f5f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php @@ -53,7 +53,10 @@ class Update extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'updateEmailColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index 76478a505f..84a2325a36 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -54,7 +54,10 @@ class Create extends Action code: SwooleResponse::STATUS_CODE_ACCEPTED, model: $this->getResponseModel(), ) - ] + ], + deprecated: [ + 'replaceWith' => 'createEnumColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php index 8624bde78d..59c1099687 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php @@ -54,7 +54,10 @@ class Update extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'updateEnumColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php index 520366f689..a945006612 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php @@ -54,7 +54,10 @@ class Create extends Action code: SwooleResponse::STATUS_CODE_ACCEPTED, model: $this->getResponseModel(), ) - ] + ], + deprecated: [ + 'replaceWith' => 'createFloatColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php index 18a966d91d..34fbfd1cd3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php @@ -53,7 +53,10 @@ class Update extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'updateFloatColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index 579f7883e0..db24b93e80 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -56,7 +56,10 @@ class Get extends Action code: SwooleResponse::STATUS_CODE_OK, model: $this->getResponseModel() ) - ] + ], + deprecated: [ + 'replaceWith' => 'getColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php index e46e508bc6..fc656a91cc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php @@ -52,7 +52,10 @@ class Create extends Action code: SwooleResponse::STATUS_CODE_ACCEPTED, model: $this->getResponseModel(), ) - ] + ], + deprecated: [ + 'replaceWith' => 'createIpColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php index e9d9404c17..d9368de7a4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php @@ -53,7 +53,10 @@ class Update extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'updateIpColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php index e348e9a2a6..b698ef8f9b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php @@ -54,7 +54,10 @@ class Create extends Action code: SwooleResponse::STATUS_CODE_ACCEPTED, model: $this->getResponseModel(), ) - ] + ], + deprecated: [ + 'replaceWith' => 'createIntegerColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php index bbbf045115..a72c99774a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php @@ -53,7 +53,10 @@ class Update extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'updateIntegerColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php index 795ea445c8..249ba1ea46 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php @@ -54,7 +54,10 @@ class Create extends Action code: SwooleResponse::STATUS_CODE_ACCEPTED, model: $this->getResponseModel() ) - ] + ], + deprecated: [ + 'replaceWith' => 'createRelationshipColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php index 7202a3e4e6..a18a14a096 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php @@ -51,7 +51,10 @@ class Update extends Action model: $this->getResponseModel() ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'updateRelationshipColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index 8ce8626f3a..c0543700b8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -55,7 +55,10 @@ class Create extends Action code: SwooleResponse::STATUS_CODE_ACCEPTED, model: $this->getResponseModel() ) - ] + ], + deprecated: [ + 'replaceWith' => 'createStringColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php index b359b83eaa..10fc0c1ec8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php @@ -55,7 +55,10 @@ class Update extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'updateStringColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php index 27bc2d38c1..60ed2c6ca4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php @@ -52,7 +52,10 @@ class Create extends Action code: SwooleResponse::STATUS_CODE_ACCEPTED, model: $this->getResponseModel(), ) - ] + ], + deprecated: [ + 'replaceWith' => 'createUrlColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php index ae48c43653..b03c73533b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php @@ -53,7 +53,10 @@ class Update extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'updateUrlColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index e09420d7ce..3aec06eb5e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -50,7 +50,10 @@ class XList extends Action code: SwooleResponse::STATUS_CODE_OK, model: $this->getResponseModel() ) - ] + ], + deprecated: [ + 'replaceWith' => 'listColumns', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index d0b08f154e..c1481f2d5f 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -23,7 +23,7 @@ class Method * @param array<SDKResponse> $responses * @param ContentType $contentType * @param MethodType|null $type - * @param bool $deprecated + * @param ?array $deprecated * @param array|bool $hide * @param bool $packaging * @param ContentType $requestType @@ -39,7 +39,7 @@ class Method protected array $responses, protected ContentType $contentType = ContentType::JSON, protected ?MethodType $type = null, - protected bool $deprecated = false, + protected ?array $deprecated = null, protected array|bool $hide = false, protected bool $packaging = false, protected ContentType $requestType = ContentType::JSON, @@ -177,7 +177,34 @@ class Method public function isDeprecated(): bool { - return $this->deprecated; + return $this->deprecated !== null; + } + + /** + * Get the deprecation info array + * @return array + */ + public function getDeprecationInfo(): array + { + return $this->deprecated ?? []; + } + + /** + * Get the deprecation message if set + * @return string|null + */ + public function getDeprecationMessage(): ?string + { + return $this->deprecated['message'] ?? ''; + } + + /** + * Get the replacement method if set + * @return string|null + */ + public function getDeprecationReplacement(): ?string + { + return $this->deprecated['replaceWith'] ?? ''; } public function isHidden(): bool|array @@ -258,7 +285,12 @@ class Method return $this; } - public function setDeprecated(bool $deprecated): self + /** + * Set the deprecation info array + * @param array $deprecated + * @return self + */ + public function setDeprecated(array $deprecated): self { $this->deprecated = $deprecated; return $this; diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index a9e24a2e44..b087fd406f 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -170,6 +170,13 @@ class OpenAPI3 extends Format ], ]; + if (!empty($sdk->getDeprecationReplacement())) { + $temp['x-appwrite']['replaceWith'] = $sdk->getDeprecationReplacement(); + } + + if (!empty($sdk->getDeprecationMessage())) { + $temp['x-appwrite']['deprecatedMessage'] = $sdk->getDeprecationMessage(); + } if (!empty($additionalMethods)) { $temp['x-appwrite']['methods'] = []; diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 4c4016e7e7..d2a0776f93 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -172,6 +172,14 @@ class Swagger2 extends Format ], ]; + if (!empty($sdk->getDeprecationReplacement())) { + $temp['x-appwrite']['replaceWith'] = $sdk->getDeprecationReplacement(); + } + + if (!empty($sdk->getDeprecationMessage())) { + $temp['x-appwrite']['deprecatedMessage'] = $sdk->getDeprecationMessage(); + } + if ($produces) { $temp['produces'][] = $produces; } From ccbd699ee77199e826863168fbf12e4e766b556b Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 24 Jun 2025 14:24:18 +0530 Subject: [PATCH 196/362] chore: add namespace to replacements --- app/config/specs/open-api3-1.8.x-console.json | 46 +++++++++---------- app/config/specs/open-api3-1.8.x-server.json | 46 +++++++++---------- app/config/specs/swagger2-1.8.x-console.json | 46 +++++++++---------- app/config/specs/swagger2-1.8.x-server.json | 46 +++++++++---------- .../Collections/Attributes/Boolean/Create.php | 2 +- .../Collections/Attributes/Boolean/Update.php | 2 +- .../Attributes/Datetime/Create.php | 2 +- .../Attributes/Datetime/Update.php | 2 +- .../Collections/Attributes/Delete.php | 2 +- .../Collections/Attributes/Email/Create.php | 2 +- .../Collections/Attributes/Email/Update.php | 2 +- .../Collections/Attributes/Enum/Create.php | 2 +- .../Collections/Attributes/Enum/Update.php | 2 +- .../Collections/Attributes/Float/Create.php | 2 +- .../Collections/Attributes/Float/Update.php | 2 +- .../Databases/Collections/Attributes/Get.php | 2 +- .../Collections/Attributes/IP/Create.php | 2 +- .../Collections/Attributes/IP/Update.php | 2 +- .../Collections/Attributes/Integer/Create.php | 2 +- .../Collections/Attributes/Integer/Update.php | 2 +- .../Attributes/Relationship/Create.php | 2 +- .../Attributes/Relationship/Update.php | 2 +- .../Collections/Attributes/String/Create.php | 2 +- .../Collections/Attributes/String/Update.php | 2 +- .../Collections/Attributes/URL/Create.php | 2 +- .../Collections/Attributes/URL/Update.php | 2 +- .../Collections/Attributes/XList.php | 2 +- 27 files changed, 115 insertions(+), 115 deletions(-) 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 27471cc69d..d2ec136b99 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -5398,7 +5398,7 @@ "server" ], "packaging": false, - "replaceWith": "listColumns", + "replaceWith": "tables.listColumns", "auth": { "Project": [] } @@ -5483,7 +5483,7 @@ "server" ], "packaging": false, - "replaceWith": "createBooleanColumn", + "replaceWith": "tables.createBooleanColumn", "auth": { "Project": [] } @@ -5590,7 +5590,7 @@ "server" ], "packaging": false, - "replaceWith": "updateBooleanColumn", + "replaceWith": "tables.updateBooleanColumn", "auth": { "Project": [] } @@ -5702,7 +5702,7 @@ "server" ], "packaging": false, - "replaceWith": "createDatetimeColumn", + "replaceWith": "tables.createDatetimeColumn", "auth": { "Project": [] } @@ -5809,7 +5809,7 @@ "server" ], "packaging": false, - "replaceWith": "updateDatetimeColumn", + "replaceWith": "tables.updateDatetimeColumn", "auth": { "Project": [] } @@ -5921,7 +5921,7 @@ "server" ], "packaging": false, - "replaceWith": "createEmailColumn", + "replaceWith": "tables.createEmailColumn", "auth": { "Project": [] } @@ -6028,7 +6028,7 @@ "server" ], "packaging": false, - "replaceWith": "updateEmailColumn", + "replaceWith": "tables.updateEmailColumn", "auth": { "Project": [] } @@ -6140,7 +6140,7 @@ "server" ], "packaging": false, - "replaceWith": "createEnumColumn", + "replaceWith": "tables.createEnumColumn", "auth": { "Project": [] } @@ -6256,7 +6256,7 @@ "server" ], "packaging": false, - "replaceWith": "updateEnumColumn", + "replaceWith": "tables.updateEnumColumn", "auth": { "Project": [] } @@ -6377,7 +6377,7 @@ "server" ], "packaging": false, - "replaceWith": "createFloatColumn", + "replaceWith": "tables.createFloatColumn", "auth": { "Project": [] } @@ -6494,7 +6494,7 @@ "server" ], "packaging": false, - "replaceWith": "updateFloatColumn", + "replaceWith": "tables.updateFloatColumn", "auth": { "Project": [] } @@ -6616,7 +6616,7 @@ "server" ], "packaging": false, - "replaceWith": "createIntegerColumn", + "replaceWith": "tables.createIntegerColumn", "auth": { "Project": [] } @@ -6733,7 +6733,7 @@ "server" ], "packaging": false, - "replaceWith": "updateIntegerColumn", + "replaceWith": "tables.updateIntegerColumn", "auth": { "Project": [] } @@ -6855,7 +6855,7 @@ "server" ], "packaging": false, - "replaceWith": "createIpColumn", + "replaceWith": "tables.createIpColumn", "auth": { "Project": [] } @@ -6962,7 +6962,7 @@ "server" ], "packaging": false, - "replaceWith": "updateIpColumn", + "replaceWith": "tables.updateIpColumn", "auth": { "Project": [] } @@ -7074,7 +7074,7 @@ "server" ], "packaging": false, - "replaceWith": "createRelationshipColumn", + "replaceWith": "tables.createRelationshipColumn", "auth": { "Project": [] } @@ -7206,7 +7206,7 @@ "server" ], "packaging": false, - "replaceWith": "createStringColumn", + "replaceWith": "tables.createStringColumn", "auth": { "Project": [] } @@ -7324,7 +7324,7 @@ "server" ], "packaging": false, - "replaceWith": "updateStringColumn", + "replaceWith": "tables.updateStringColumn", "auth": { "Project": [] } @@ -7441,7 +7441,7 @@ "server" ], "packaging": false, - "replaceWith": "createUrlColumn", + "replaceWith": "tables.createUrlColumn", "auth": { "Project": [] } @@ -7548,7 +7548,7 @@ "server" ], "packaging": false, - "replaceWith": "updateUrlColumn", + "replaceWith": "tables.updateUrlColumn", "auth": { "Project": [] } @@ -7691,7 +7691,7 @@ "server" ], "packaging": false, - "replaceWith": "getColumn", + "replaceWith": "tables.getColumn", "auth": { "Project": [] } @@ -7763,7 +7763,7 @@ "server" ], "packaging": false, - "replaceWith": "deleteColumn", + "replaceWith": "tables.deleteColumn", "auth": { "Project": [] } @@ -7844,7 +7844,7 @@ "server" ], "packaging": false, - "replaceWith": "updateRelationshipColumn", + "replaceWith": "tables.updateRelationshipColumn", "auth": { "Project": [] } 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 22c4142e74..f185558057 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4858,7 +4858,7 @@ "server" ], "packaging": false, - "replaceWith": "listColumns", + "replaceWith": "tables.listColumns", "auth": { "Project": [], "Key": [] @@ -4944,7 +4944,7 @@ "server" ], "packaging": false, - "replaceWith": "createBooleanColumn", + "replaceWith": "tables.createBooleanColumn", "auth": { "Project": [], "Key": [] @@ -5052,7 +5052,7 @@ "server" ], "packaging": false, - "replaceWith": "updateBooleanColumn", + "replaceWith": "tables.updateBooleanColumn", "auth": { "Project": [], "Key": [] @@ -5165,7 +5165,7 @@ "server" ], "packaging": false, - "replaceWith": "createDatetimeColumn", + "replaceWith": "tables.createDatetimeColumn", "auth": { "Project": [], "Key": [] @@ -5273,7 +5273,7 @@ "server" ], "packaging": false, - "replaceWith": "updateDatetimeColumn", + "replaceWith": "tables.updateDatetimeColumn", "auth": { "Project": [], "Key": [] @@ -5386,7 +5386,7 @@ "server" ], "packaging": false, - "replaceWith": "createEmailColumn", + "replaceWith": "tables.createEmailColumn", "auth": { "Project": [], "Key": [] @@ -5494,7 +5494,7 @@ "server" ], "packaging": false, - "replaceWith": "updateEmailColumn", + "replaceWith": "tables.updateEmailColumn", "auth": { "Project": [], "Key": [] @@ -5607,7 +5607,7 @@ "server" ], "packaging": false, - "replaceWith": "createEnumColumn", + "replaceWith": "tables.createEnumColumn", "auth": { "Project": [], "Key": [] @@ -5724,7 +5724,7 @@ "server" ], "packaging": false, - "replaceWith": "updateEnumColumn", + "replaceWith": "tables.updateEnumColumn", "auth": { "Project": [], "Key": [] @@ -5846,7 +5846,7 @@ "server" ], "packaging": false, - "replaceWith": "createFloatColumn", + "replaceWith": "tables.createFloatColumn", "auth": { "Project": [], "Key": [] @@ -5964,7 +5964,7 @@ "server" ], "packaging": false, - "replaceWith": "updateFloatColumn", + "replaceWith": "tables.updateFloatColumn", "auth": { "Project": [], "Key": [] @@ -6087,7 +6087,7 @@ "server" ], "packaging": false, - "replaceWith": "createIntegerColumn", + "replaceWith": "tables.createIntegerColumn", "auth": { "Project": [], "Key": [] @@ -6205,7 +6205,7 @@ "server" ], "packaging": false, - "replaceWith": "updateIntegerColumn", + "replaceWith": "tables.updateIntegerColumn", "auth": { "Project": [], "Key": [] @@ -6328,7 +6328,7 @@ "server" ], "packaging": false, - "replaceWith": "createIpColumn", + "replaceWith": "tables.createIpColumn", "auth": { "Project": [], "Key": [] @@ -6436,7 +6436,7 @@ "server" ], "packaging": false, - "replaceWith": "updateIpColumn", + "replaceWith": "tables.updateIpColumn", "auth": { "Project": [], "Key": [] @@ -6549,7 +6549,7 @@ "server" ], "packaging": false, - "replaceWith": "createRelationshipColumn", + "replaceWith": "tables.createRelationshipColumn", "auth": { "Project": [], "Key": [] @@ -6682,7 +6682,7 @@ "server" ], "packaging": false, - "replaceWith": "createStringColumn", + "replaceWith": "tables.createStringColumn", "auth": { "Project": [], "Key": [] @@ -6801,7 +6801,7 @@ "server" ], "packaging": false, - "replaceWith": "updateStringColumn", + "replaceWith": "tables.updateStringColumn", "auth": { "Project": [], "Key": [] @@ -6919,7 +6919,7 @@ "server" ], "packaging": false, - "replaceWith": "createUrlColumn", + "replaceWith": "tables.createUrlColumn", "auth": { "Project": [], "Key": [] @@ -7027,7 +7027,7 @@ "server" ], "packaging": false, - "replaceWith": "updateUrlColumn", + "replaceWith": "tables.updateUrlColumn", "auth": { "Project": [], "Key": [] @@ -7171,7 +7171,7 @@ "server" ], "packaging": false, - "replaceWith": "getColumn", + "replaceWith": "tables.getColumn", "auth": { "Project": [], "Key": [] @@ -7244,7 +7244,7 @@ "server" ], "packaging": false, - "replaceWith": "deleteColumn", + "replaceWith": "tables.deleteColumn", "auth": { "Project": [], "Key": [] @@ -7326,7 +7326,7 @@ "server" ], "packaging": false, - "replaceWith": "updateRelationshipColumn", + "replaceWith": "tables.updateRelationshipColumn", "auth": { "Project": [], "Key": [] diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index c7c873ae3f..55ced3e4f0 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -5559,7 +5559,7 @@ "server" ], "packaging": false, - "replaceWith": "listColumns", + "replaceWith": "tables.listColumns", "auth": { "Project": [] } @@ -5641,7 +5641,7 @@ "server" ], "packaging": false, - "replaceWith": "createBooleanColumn", + "replaceWith": "tables.createBooleanColumn", "auth": { "Project": [] } @@ -5748,7 +5748,7 @@ "server" ], "packaging": false, - "replaceWith": "updateBooleanColumn", + "replaceWith": "tables.updateBooleanColumn", "auth": { "Project": [] } @@ -5857,7 +5857,7 @@ "server" ], "packaging": false, - "replaceWith": "createDatetimeColumn", + "replaceWith": "tables.createDatetimeColumn", "auth": { "Project": [] } @@ -5964,7 +5964,7 @@ "server" ], "packaging": false, - "replaceWith": "updateDatetimeColumn", + "replaceWith": "tables.updateDatetimeColumn", "auth": { "Project": [] } @@ -6073,7 +6073,7 @@ "server" ], "packaging": false, - "replaceWith": "createEmailColumn", + "replaceWith": "tables.createEmailColumn", "auth": { "Project": [] } @@ -6180,7 +6180,7 @@ "server" ], "packaging": false, - "replaceWith": "updateEmailColumn", + "replaceWith": "tables.updateEmailColumn", "auth": { "Project": [] } @@ -6289,7 +6289,7 @@ "server" ], "packaging": false, - "replaceWith": "createEnumColumn", + "replaceWith": "tables.createEnumColumn", "auth": { "Project": [] } @@ -6406,7 +6406,7 @@ "server" ], "packaging": false, - "replaceWith": "updateEnumColumn", + "replaceWith": "tables.updateEnumColumn", "auth": { "Project": [] } @@ -6525,7 +6525,7 @@ "server" ], "packaging": false, - "replaceWith": "createFloatColumn", + "replaceWith": "tables.createFloatColumn", "auth": { "Project": [] } @@ -6644,7 +6644,7 @@ "server" ], "packaging": false, - "replaceWith": "updateFloatColumn", + "replaceWith": "tables.updateFloatColumn", "auth": { "Project": [] } @@ -6765,7 +6765,7 @@ "server" ], "packaging": false, - "replaceWith": "createIntegerColumn", + "replaceWith": "tables.createIntegerColumn", "auth": { "Project": [] } @@ -6884,7 +6884,7 @@ "server" ], "packaging": false, - "replaceWith": "updateIntegerColumn", + "replaceWith": "tables.updateIntegerColumn", "auth": { "Project": [] } @@ -7005,7 +7005,7 @@ "server" ], "packaging": false, - "replaceWith": "createIpColumn", + "replaceWith": "tables.createIpColumn", "auth": { "Project": [] } @@ -7112,7 +7112,7 @@ "server" ], "packaging": false, - "replaceWith": "updateIpColumn", + "replaceWith": "tables.updateIpColumn", "auth": { "Project": [] } @@ -7221,7 +7221,7 @@ "server" ], "packaging": false, - "replaceWith": "createRelationshipColumn", + "replaceWith": "tables.createRelationshipColumn", "auth": { "Project": [] } @@ -7355,7 +7355,7 @@ "server" ], "packaging": false, - "replaceWith": "createStringColumn", + "replaceWith": "tables.createStringColumn", "auth": { "Project": [] } @@ -7475,7 +7475,7 @@ "server" ], "packaging": false, - "replaceWith": "updateStringColumn", + "replaceWith": "tables.updateStringColumn", "auth": { "Project": [] } @@ -7590,7 +7590,7 @@ "server" ], "packaging": false, - "replaceWith": "createUrlColumn", + "replaceWith": "tables.createUrlColumn", "auth": { "Project": [] } @@ -7697,7 +7697,7 @@ "server" ], "packaging": false, - "replaceWith": "updateUrlColumn", + "replaceWith": "tables.updateUrlColumn", "auth": { "Project": [] } @@ -7835,7 +7835,7 @@ "server" ], "packaging": false, - "replaceWith": "getColumn", + "replaceWith": "tables.getColumn", "auth": { "Project": [] } @@ -7905,7 +7905,7 @@ "server" ], "packaging": false, - "replaceWith": "deleteColumn", + "replaceWith": "tables.deleteColumn", "auth": { "Project": [] } @@ -7982,7 +7982,7 @@ "server" ], "packaging": false, - "replaceWith": "updateRelationshipColumn", + "replaceWith": "tables.updateRelationshipColumn", "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 2028f2a9cd..a4b8328974 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -5009,7 +5009,7 @@ "server" ], "packaging": false, - "replaceWith": "listColumns", + "replaceWith": "tables.listColumns", "auth": { "Project": [], "Key": [] @@ -5092,7 +5092,7 @@ "server" ], "packaging": false, - "replaceWith": "createBooleanColumn", + "replaceWith": "tables.createBooleanColumn", "auth": { "Project": [], "Key": [] @@ -5200,7 +5200,7 @@ "server" ], "packaging": false, - "replaceWith": "updateBooleanColumn", + "replaceWith": "tables.updateBooleanColumn", "auth": { "Project": [], "Key": [] @@ -5310,7 +5310,7 @@ "server" ], "packaging": false, - "replaceWith": "createDatetimeColumn", + "replaceWith": "tables.createDatetimeColumn", "auth": { "Project": [], "Key": [] @@ -5418,7 +5418,7 @@ "server" ], "packaging": false, - "replaceWith": "updateDatetimeColumn", + "replaceWith": "tables.updateDatetimeColumn", "auth": { "Project": [], "Key": [] @@ -5528,7 +5528,7 @@ "server" ], "packaging": false, - "replaceWith": "createEmailColumn", + "replaceWith": "tables.createEmailColumn", "auth": { "Project": [], "Key": [] @@ -5636,7 +5636,7 @@ "server" ], "packaging": false, - "replaceWith": "updateEmailColumn", + "replaceWith": "tables.updateEmailColumn", "auth": { "Project": [], "Key": [] @@ -5746,7 +5746,7 @@ "server" ], "packaging": false, - "replaceWith": "createEnumColumn", + "replaceWith": "tables.createEnumColumn", "auth": { "Project": [], "Key": [] @@ -5864,7 +5864,7 @@ "server" ], "packaging": false, - "replaceWith": "updateEnumColumn", + "replaceWith": "tables.updateEnumColumn", "auth": { "Project": [], "Key": [] @@ -5984,7 +5984,7 @@ "server" ], "packaging": false, - "replaceWith": "createFloatColumn", + "replaceWith": "tables.createFloatColumn", "auth": { "Project": [], "Key": [] @@ -6104,7 +6104,7 @@ "server" ], "packaging": false, - "replaceWith": "updateFloatColumn", + "replaceWith": "tables.updateFloatColumn", "auth": { "Project": [], "Key": [] @@ -6226,7 +6226,7 @@ "server" ], "packaging": false, - "replaceWith": "createIntegerColumn", + "replaceWith": "tables.createIntegerColumn", "auth": { "Project": [], "Key": [] @@ -6346,7 +6346,7 @@ "server" ], "packaging": false, - "replaceWith": "updateIntegerColumn", + "replaceWith": "tables.updateIntegerColumn", "auth": { "Project": [], "Key": [] @@ -6468,7 +6468,7 @@ "server" ], "packaging": false, - "replaceWith": "createIpColumn", + "replaceWith": "tables.createIpColumn", "auth": { "Project": [], "Key": [] @@ -6576,7 +6576,7 @@ "server" ], "packaging": false, - "replaceWith": "updateIpColumn", + "replaceWith": "tables.updateIpColumn", "auth": { "Project": [], "Key": [] @@ -6686,7 +6686,7 @@ "server" ], "packaging": false, - "replaceWith": "createRelationshipColumn", + "replaceWith": "tables.createRelationshipColumn", "auth": { "Project": [], "Key": [] @@ -6821,7 +6821,7 @@ "server" ], "packaging": false, - "replaceWith": "createStringColumn", + "replaceWith": "tables.createStringColumn", "auth": { "Project": [], "Key": [] @@ -6942,7 +6942,7 @@ "server" ], "packaging": false, - "replaceWith": "updateStringColumn", + "replaceWith": "tables.updateStringColumn", "auth": { "Project": [], "Key": [] @@ -7058,7 +7058,7 @@ "server" ], "packaging": false, - "replaceWith": "createUrlColumn", + "replaceWith": "tables.createUrlColumn", "auth": { "Project": [], "Key": [] @@ -7166,7 +7166,7 @@ "server" ], "packaging": false, - "replaceWith": "updateUrlColumn", + "replaceWith": "tables.updateUrlColumn", "auth": { "Project": [], "Key": [] @@ -7305,7 +7305,7 @@ "server" ], "packaging": false, - "replaceWith": "getColumn", + "replaceWith": "tables.getColumn", "auth": { "Project": [], "Key": [] @@ -7376,7 +7376,7 @@ "server" ], "packaging": false, - "replaceWith": "deleteColumn", + "replaceWith": "tables.deleteColumn", "auth": { "Project": [], "Key": [] @@ -7454,7 +7454,7 @@ "server" ], "packaging": false, - "replaceWith": "updateRelationshipColumn", + "replaceWith": "tables.updateRelationshipColumn", "auth": { "Project": [], "Key": [] diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php index a33668fc50..367442a52e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php @@ -53,7 +53,7 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'createBooleanColumn', + 'replaceWith' => 'tables.createBooleanColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php index ec2c7d0181..75683241fc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php @@ -54,7 +54,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'updateBooleanColumn', + 'replaceWith' => 'tables.updateBooleanColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php index 5672deefe1..0982ec1d26 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php @@ -54,7 +54,7 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'createDatetimeColumn', + 'replaceWith' => 'tables.createDatetimeColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php index 16c48abf17..a1a53e8ae1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php @@ -55,7 +55,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'updateDatetimeColumn', + 'replaceWith' => 'tables.updateDatetimeColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 5db2bd4b51..1a37452995 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -55,7 +55,7 @@ class Delete extends Action ], contentType: ContentType::NONE, deprecated: [ - 'replaceWith' => 'deleteColumn', + 'replaceWith' => 'tables.deleteColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php index 04b3b44285..288aa82acb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php @@ -54,7 +54,7 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'createEmailColumn', + 'replaceWith' => 'tables.createEmailColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php index 13fec34f5f..88b4329621 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php @@ -55,7 +55,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'updateEmailColumn', + 'replaceWith' => 'tables.updateEmailColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index 84a2325a36..0ca18aa4c4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -56,7 +56,7 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'createEnumColumn', + 'replaceWith' => 'tables.createEnumColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php index 59c1099687..ac20825eae 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php @@ -56,7 +56,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'updateEnumColumn', + 'replaceWith' => 'tables.updateEnumColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php index a945006612..0f2237d468 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php @@ -56,7 +56,7 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'createFloatColumn', + 'replaceWith' => 'tables.createFloatColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php index 34fbfd1cd3..40c1676d69 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php @@ -55,7 +55,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'updateFloatColumn', + 'replaceWith' => 'tables.updateFloatColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index db24b93e80..d41b03f22b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -58,7 +58,7 @@ class Get extends Action ) ], deprecated: [ - 'replaceWith' => 'getColumn', + 'replaceWith' => 'tables.getColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php index fc656a91cc..8cf2c5b14d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php @@ -54,7 +54,7 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'createIpColumn', + 'replaceWith' => 'tables.createIpColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php index d9368de7a4..427e8fad6f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php @@ -55,7 +55,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'updateIpColumn', + 'replaceWith' => 'tables.updateIpColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php index b698ef8f9b..c4a66d99b7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php @@ -56,7 +56,7 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'createIntegerColumn', + 'replaceWith' => 'tables.createIntegerColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php index a72c99774a..962bb5f6d6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php @@ -55,7 +55,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'updateIntegerColumn', + 'replaceWith' => 'tables.updateIntegerColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php index 249ba1ea46..2e47e9e8b2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php @@ -56,7 +56,7 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'createRelationshipColumn', + 'replaceWith' => 'tables.createRelationshipColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php index a18a14a096..4e22fb5687 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php @@ -53,7 +53,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'updateRelationshipColumn', + 'replaceWith' => 'tables.updateRelationshipColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index c0543700b8..1ce1f51972 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -57,7 +57,7 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'createStringColumn', + 'replaceWith' => 'tables.createStringColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php index 10fc0c1ec8..36652b44f2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php @@ -57,7 +57,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'updateStringColumn', + 'replaceWith' => 'tables.updateStringColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php index 60ed2c6ca4..ecaa0deffa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php @@ -54,7 +54,7 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'createUrlColumn', + 'replaceWith' => 'tables.createUrlColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php index b03c73533b..76212364f1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php @@ -55,7 +55,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'updateUrlColumn', + 'replaceWith' => 'tables.updateUrlColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index 3aec06eb5e..c9a446ae78 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -52,7 +52,7 @@ class XList extends Action ) ], deprecated: [ - 'replaceWith' => 'listColumns', + 'replaceWith' => 'tables.listColumns', ], )) ->param('databaseId', '', new UID(), 'Database ID.') From c7c198fa2e6058701b6a195249d8e6b712e1541b Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 24 Jun 2025 14:54:15 +0530 Subject: [PATCH 197/362] chore: add more deprecations, add warning headers --- app/config/specs/open-api3-1.8.x-client.json | 18 ++++++---- app/config/specs/open-api3-1.8.x-console.json | 33 ++++++++++++------- app/config/specs/open-api3-1.8.x-server.json | 33 ++++++++++++------- app/config/specs/swagger2-1.8.x-client.json | 18 ++++++---- app/config/specs/swagger2-1.8.x-console.json | 33 ++++++++++++------- app/config/specs/swagger2-1.8.x-server.json | 33 ++++++++++++------- app/controllers/general.php | 21 ++++++++++-- .../Documents/Attribute/Decrement.php | 5 ++- .../Documents/Attribute/Increment.php | 5 ++- .../Collections/Documents/Bulk/Delete.php | 5 ++- .../Collections/Documents/Bulk/Update.php | 5 ++- .../Collections/Documents/Bulk/Upsert.php | 3 ++ .../Collections/Documents/Create.php | 10 ++++-- .../Collections/Documents/Delete.php | 5 ++- .../Databases/Collections/Documents/Get.php | 5 ++- .../Collections/Documents/Update.php | 5 ++- .../Collections/Documents/Upsert.php | 5 ++- .../Databases/Collections/Documents/XList.php | 5 ++- 18 files changed, 178 insertions(+), 69 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 58917b543a..537f8e048c 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4364,7 +4364,7 @@ "weight": 340, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -4377,6 +4377,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listRows", "auth": { "Project": [] } @@ -4449,7 +4450,7 @@ "weight": 332, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -4462,6 +4463,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createRow", "methods": [ { "name": "createDocument", @@ -4614,7 +4616,7 @@ "weight": 333, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -4627,6 +4629,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getRow", "auth": { "Project": [] } @@ -4709,7 +4712,7 @@ "weight": 336, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -4722,6 +4725,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.upsertRow", "methods": [ { "name": "upsertDocument", @@ -4837,7 +4841,7 @@ "weight": 334, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -4850,6 +4854,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateRow", "auth": { "Project": [] } @@ -4936,7 +4941,7 @@ "weight": 338, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -4949,6 +4954,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteRow", "auth": { "Project": [] } 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 d2ec136b99..255227de34 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -7942,7 +7942,7 @@ "weight": 340, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7955,6 +7955,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listRows", "auth": { "Project": [] } @@ -8027,7 +8028,7 @@ "weight": 332, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -8040,6 +8041,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createRow", "methods": [ { "name": "createDocument", @@ -8190,7 +8192,7 @@ "weight": 337, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -8202,6 +8204,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.upsertRows", "methods": [ { "name": "upsertDocuments", @@ -8300,7 +8303,7 @@ "weight": 335, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -8312,6 +8315,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateRows", "auth": { "Project": [] } @@ -8394,7 +8398,7 @@ "weight": 339, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8406,6 +8410,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteRows", "auth": { "Project": [] } @@ -8485,7 +8490,7 @@ "weight": 333, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8498,6 +8503,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getRow", "auth": { "Project": [] } @@ -8580,7 +8586,7 @@ "weight": 336, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8593,6 +8599,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.upsertRow", "methods": [ { "name": "upsertDocument", @@ -8708,7 +8715,7 @@ "weight": 334, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8721,6 +8728,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateRow", "auth": { "Project": [] } @@ -8807,7 +8815,7 @@ "weight": 338, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8820,6 +8828,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteRow", "auth": { "Project": [] } @@ -8984,7 +8993,7 @@ "weight": 343, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -8996,6 +9005,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.decrementColumn", "auth": { "Project": [] } @@ -9096,7 +9106,7 @@ "weight": 342, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -9108,6 +9118,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.incrementColumn", "auth": { "Project": [] } 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 f185558057..8b04ac256e 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -7425,7 +7425,7 @@ "weight": 340, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7438,6 +7438,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listRows", "auth": { "Project": [], "Session": [] @@ -7512,7 +7513,7 @@ "weight": 332, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -7525,6 +7526,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createRow", "methods": [ { "name": "createDocument", @@ -7677,7 +7679,7 @@ "weight": 337, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -7689,6 +7691,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.upsertRows", "methods": [ { "name": "upsertDocuments", @@ -7788,7 +7791,7 @@ "weight": 335, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -7800,6 +7803,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateRows", "auth": { "Project": [], "Key": [] @@ -7883,7 +7887,7 @@ "weight": 339, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -7895,6 +7899,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteRows", "auth": { "Project": [], "Key": [] @@ -7975,7 +7980,7 @@ "weight": 333, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -7988,6 +7993,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getRow", "auth": { "Project": [], "Session": [] @@ -8072,7 +8078,7 @@ "weight": 336, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8085,6 +8091,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.upsertRow", "methods": [ { "name": "upsertDocument", @@ -8202,7 +8209,7 @@ "weight": 334, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8215,6 +8222,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateRow", "auth": { "Project": [], "Session": [] @@ -8303,7 +8311,7 @@ "weight": 338, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8316,6 +8324,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteRow", "auth": { "Project": [], "Session": [] @@ -8389,7 +8398,7 @@ "weight": 343, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -8401,6 +8410,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.decrementColumn", "auth": { "Project": [], "Key": [] @@ -8502,7 +8512,7 @@ "weight": 342, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -8514,6 +8524,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.incrementColumn", "auth": { "Project": [], "Key": [] diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 84445b4af5..efb39032ae 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -4513,7 +4513,7 @@ "weight": 340, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -4526,6 +4526,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listRows", "auth": { "Project": [] } @@ -4595,7 +4596,7 @@ "weight": 332, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -4608,6 +4609,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createRow", "methods": [ { "name": "createDocument", @@ -4758,7 +4760,7 @@ "weight": 333, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -4771,6 +4773,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getRow", "auth": { "Project": [] } @@ -4848,7 +4851,7 @@ "weight": 336, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -4861,6 +4864,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.upsertRow", "methods": [ { "name": "upsertDocument", @@ -4972,7 +4976,7 @@ "weight": 334, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -4985,6 +4989,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateRow", "auth": { "Project": [] } @@ -5069,7 +5074,7 @@ "weight": 338, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -5082,6 +5087,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteRow", "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 55ced3e4f0..1aa8038421 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -8074,7 +8074,7 @@ "weight": 340, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -8087,6 +8087,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listRows", "auth": { "Project": [] } @@ -8156,7 +8157,7 @@ "weight": 332, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -8169,6 +8170,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createRow", "methods": [ { "name": "createDocument", @@ -8319,7 +8321,7 @@ "weight": 337, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -8331,6 +8333,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.upsertRows", "methods": [ { "name": "upsertDocuments", @@ -8426,7 +8429,7 @@ "weight": 335, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -8438,6 +8441,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateRows", "auth": { "Project": [] } @@ -8518,7 +8522,7 @@ "weight": 339, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8530,6 +8534,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteRows", "auth": { "Project": [] } @@ -8604,7 +8609,7 @@ "weight": 333, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8617,6 +8622,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getRow", "auth": { "Project": [] } @@ -8694,7 +8700,7 @@ "weight": 336, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8707,6 +8713,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.upsertRow", "methods": [ { "name": "upsertDocument", @@ -8818,7 +8825,7 @@ "weight": 334, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8831,6 +8838,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateRow", "auth": { "Project": [] } @@ -8915,7 +8923,7 @@ "weight": 338, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8928,6 +8936,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteRow", "auth": { "Project": [] } @@ -9081,7 +9090,7 @@ "weight": 343, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -9093,6 +9102,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.decrementColumn", "auth": { "Project": [] } @@ -9187,7 +9197,7 @@ "weight": 342, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -9199,6 +9209,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.incrementColumn", "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index a4b8328974..83aa8e3685 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -7547,7 +7547,7 @@ "weight": 340, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7560,6 +7560,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listRows", "auth": { "Project": [], "Session": [] @@ -7631,7 +7632,7 @@ "weight": 332, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -7644,6 +7645,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createRow", "methods": [ { "name": "createDocument", @@ -7796,7 +7798,7 @@ "weight": 337, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -7808,6 +7810,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.upsertRows", "methods": [ { "name": "upsertDocuments", @@ -7904,7 +7907,7 @@ "weight": 335, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -7916,6 +7919,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateRows", "auth": { "Project": [], "Key": [] @@ -7997,7 +8001,7 @@ "weight": 339, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8009,6 +8013,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteRows", "auth": { "Project": [], "Key": [] @@ -8084,7 +8089,7 @@ "weight": 333, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8097,6 +8102,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getRow", "auth": { "Project": [], "Session": [] @@ -8176,7 +8182,7 @@ "weight": 336, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8189,6 +8195,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.upsertRow", "methods": [ { "name": "upsertDocument", @@ -8302,7 +8309,7 @@ "weight": 334, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8315,6 +8322,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateRow", "auth": { "Project": [], "Session": [] @@ -8401,7 +8409,7 @@ "weight": 338, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8414,6 +8422,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteRow", "auth": { "Project": [], "Session": [] @@ -8483,7 +8492,7 @@ "weight": 343, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -8495,6 +8504,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.decrementColumn", "auth": { "Project": [], "Key": [] @@ -8590,7 +8600,7 @@ "weight": 342, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -8602,6 +8612,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.incrementColumn", "auth": { "Project": [], "Key": [] diff --git a/app/controllers/general.php b/app/controllers/general.php index 61a9cc9bfa..f8f392a716 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -995,6 +995,8 @@ App::init() ) ); + $warnings = []; + /* * Response format */ @@ -1013,7 +1015,7 @@ App::init() $response->addFilter(new ResponseV19()); } if (version_compare($responseFormat, APP_VERSION_STABLE, '>')) { - $response->addHeader('X-Appwrite-Warning', "The current SDK is built for Appwrite " . $responseFormat . ". However, the current Appwrite server version is " . APP_VERSION_STABLE . ". Please downgrade your SDK to match the Appwrite version: https://appwrite.io/docs/sdks"); + $warnings[] = "The current SDK is built for Appwrite " . $responseFormat . ". However, the current Appwrite server version is " . APP_VERSION_STABLE . ". Please downgrade your SDK to match the Appwrite version: https://appwrite.io/docs/sdks"; } } @@ -1050,6 +1052,21 @@ App::init() $response->addHeader('Access-Control-Allow-Origin', '*'); } + /** + * Deprecation Warning + */ + $sdk = $route->getLabel("sdk", false); + if (!empty($sdk)) { + /** @var \Appwrite\SDK\Method $sdk */ + if ($sdk->isDeprecated()) { + $warnings[] = 'This API is deprecated and uses outdated terminologies. See the updated documentation for improved compatibility and migration details.'; + } + } + + if (!empty($warnings)) { + $response->addHeader('X-Appwrite-Warning', implode(';', $warnings)); + } + /* * Validate Client Domain - Check to avoid CSRF attack * Adding Appwrite API domains to allow XDOMAIN communication @@ -1278,7 +1295,7 @@ App::error() $action = 'UNKNOWN_NAMESPACE.UNKNOWN.METHOD'; if (!empty($sdk)) { - /** @var Appwrite\SDK\Method $sdk */ + /** @var \Appwrite\SDK\Method $sdk */ $action = $sdk->getNamespace() . '.' . $sdk->getMethodName(); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php index 40035ac302..08af647b47 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php @@ -61,7 +61,10 @@ class Decrement extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.decrementColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php index 6755d313c0..a77da9b2c4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php @@ -61,7 +61,10 @@ class Increment extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.incrementColumn', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index 4ec852f7c5..83df3caf32 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -59,7 +59,10 @@ class Delete extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.deleteRows', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index d391c805fa..2e305330e7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -62,7 +62,10 @@ class Update extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.updateRows', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index f4c8c2e6d2..d884015007 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -61,6 +61,9 @@ class Upsert extends Action ) ], contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.upsertRows', + ], ) ]) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 6c1fdae5e6..d96c0b6e27 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -80,7 +80,10 @@ class Create extends Action new Parameter('documentId', optional: false), new Parameter('data', optional: false), new Parameter('permissions', optional: true), - ] + ], + deprecated: [ + 'replaceWith' => 'tables.createRow', + ], ), new Method( namespace: $this->getSdkNamespace(), @@ -99,7 +102,10 @@ class Create extends Action new Parameter('databaseId', optional: false), new Parameter('collectionId', optional: false), new Parameter('documents', optional: false), - ] + ], + deprecated: [ + 'replaceWith' => 'tables.createRows', + ], ) ]) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index 8c8cec2986..7be6c3e5aa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -61,7 +61,10 @@ class Delete extends Action model: UtopiaResponse::MODEL_NONE, ) ], - contentType: ContentType::NONE + contentType: ContentType::NONE, + deprecated: [ + 'replaceWith' => 'tables.deleteRow', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index 7376fe770a..f0b6c11a0e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -52,7 +52,10 @@ class Get extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.getRow', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index ce822ca713..0ea75359fb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -65,7 +65,10 @@ class Update extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.updateRow', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index 7a077fed0d..608dd04f25 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -67,7 +67,10 @@ class Upsert extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.upsertRow', + ], ), ]) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 2e76942db1..219420037f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -55,7 +55,10 @@ class XList extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.listRows', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') From 7d15d257737ed69efcb17c2bbcfca5e498e7e125 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 24 Jun 2025 16:42:28 +0530 Subject: [PATCH 198/362] chore: add more deprecations --- app/config/specs/open-api3-1.8.x-console.json | 33 ++++++++++++------- app/config/specs/open-api3-1.8.x-server.json | 27 ++++++++++----- app/config/specs/swagger2-1.8.x-console.json | 33 ++++++++++++------- app/config/specs/swagger2-1.8.x-server.json | 27 ++++++++++----- .../Http/Databases/Collections/Create.php | 5 ++- .../Http/Databases/Collections/Delete.php | 5 ++- .../Http/Databases/Collections/Get.php | 5 ++- .../Databases/Collections/Indexes/Create.php | 5 ++- .../Databases/Collections/Indexes/Delete.php | 5 ++- .../Databases/Collections/Indexes/Get.php | 5 ++- .../Databases/Collections/Indexes/XList.php | 5 ++- .../Http/Databases/Collections/Logs/XList.php | 5 ++- .../Http/Databases/Collections/Update.php | 5 ++- .../Http/Databases/Collections/Usage/Get.php | 3 ++ .../Http/Databases/Collections/XList.php | 5 ++- 15 files changed, 123 insertions(+), 50 deletions(-) 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 255227de34..46db5b5ce4 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4961,7 +4961,7 @@ "weight": 329, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4972,6 +4972,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listTables", "auth": { "Project": [] } @@ -5044,7 +5045,7 @@ "weight": 325, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -5055,6 +5056,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createTable", "auth": { "Project": [] } @@ -5148,7 +5150,7 @@ "weight": 326, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -5159,6 +5161,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getTable", "auth": { "Project": [] } @@ -5217,7 +5220,7 @@ "weight": 327, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -5228,6 +5231,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateTable", "auth": { "Project": [] } @@ -5316,7 +5320,7 @@ "weight": 328, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -5327,6 +5331,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteTable", "auth": { "Project": [] } @@ -9219,7 +9224,7 @@ "weight": 370, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -9230,6 +9235,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listColumnIndexes", "auth": { "Project": [] } @@ -9301,7 +9307,7 @@ "weight": 367, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -9312,6 +9318,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createColumnIndex", "auth": { "Project": [] } @@ -9429,7 +9436,7 @@ "weight": 368, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -9440,6 +9447,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getColumnIndex", "auth": { "Project": [] } @@ -9500,7 +9508,7 @@ "weight": 369, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9511,6 +9519,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteColumnIndex", "auth": { "Project": [] } @@ -9580,7 +9589,7 @@ "weight": 330, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-collection-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", "rate-limit": 0, @@ -9591,6 +9600,7 @@ "console" ], "packaging": false, + "replaceWith": "tables.listTableLogs", "auth": { "Project": [] } @@ -9663,7 +9673,7 @@ "weight": 331, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-collection-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, @@ -9674,6 +9684,7 @@ "console" ], "packaging": false, + "replaceWith": "tables.getTableUsage", "auth": { "Project": [] } 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 8b04ac256e..3979ce1ce0 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4416,7 +4416,7 @@ "weight": 329, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4427,6 +4427,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listTables", "auth": { "Project": [], "Key": [] @@ -4500,7 +4501,7 @@ "weight": 325, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -4511,6 +4512,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createTable", "auth": { "Project": [], "Key": [] @@ -4605,7 +4607,7 @@ "weight": 326, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -4616,6 +4618,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getTable", "auth": { "Project": [], "Key": [] @@ -4675,7 +4678,7 @@ "weight": 327, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -4686,6 +4689,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateTable", "auth": { "Project": [], "Key": [] @@ -4775,7 +4779,7 @@ "weight": 328, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -4786,6 +4790,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteTable", "auth": { "Project": [], "Key": [] @@ -8626,7 +8631,7 @@ "weight": 370, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -8637,6 +8642,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listColumnIndexes", "auth": { "Project": [], "Key": [] @@ -8709,7 +8715,7 @@ "weight": 367, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -8720,6 +8726,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createColumnIndex", "auth": { "Project": [], "Key": [] @@ -8838,7 +8845,7 @@ "weight": 368, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -8849,6 +8856,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getColumnIndex", "auth": { "Project": [], "Key": [] @@ -8910,7 +8918,7 @@ "weight": 369, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -8921,6 +8929,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteColumnIndex", "auth": { "Project": [], "Key": [] diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 1aa8038421..2f28c224e6 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -5128,7 +5128,7 @@ "weight": 329, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -5139,6 +5139,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listTables", "auth": { "Project": [] } @@ -5208,7 +5209,7 @@ "weight": 325, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -5219,6 +5220,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createTable", "auth": { "Project": [] } @@ -5313,7 +5315,7 @@ "weight": 326, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -5324,6 +5326,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getTable", "auth": { "Project": [] } @@ -5380,7 +5383,7 @@ "weight": 327, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -5391,6 +5394,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateTable", "auth": { "Project": [] } @@ -5481,7 +5485,7 @@ "weight": 328, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -5492,6 +5496,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteTable", "auth": { "Project": [] } @@ -9302,7 +9307,7 @@ "weight": 370, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -9313,6 +9318,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listColumnIndexes", "auth": { "Project": [] } @@ -9381,7 +9387,7 @@ "weight": 367, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -9392,6 +9398,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createColumnIndex", "auth": { "Project": [] } @@ -9508,7 +9515,7 @@ "weight": 368, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -9519,6 +9526,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getColumnIndex", "auth": { "Project": [] } @@ -9577,7 +9585,7 @@ "weight": 369, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9588,6 +9596,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteColumnIndex", "auth": { "Project": [] } @@ -9651,7 +9660,7 @@ "weight": 330, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-collection-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", "rate-limit": 0, @@ -9662,6 +9671,7 @@ "console" ], "packaging": false, + "replaceWith": "tables.listTableLogs", "auth": { "Project": [] } @@ -9729,7 +9739,7 @@ "weight": 331, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-collection-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, @@ -9740,6 +9750,7 @@ "console" ], "packaging": false, + "replaceWith": "tables.getTableUsage", "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 83aa8e3685..53f71bea44 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -4573,7 +4573,7 @@ "weight": 329, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4584,6 +4584,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listTables", "auth": { "Project": [], "Key": [] @@ -4654,7 +4655,7 @@ "weight": 325, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -4665,6 +4666,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createTable", "auth": { "Project": [], "Key": [] @@ -4760,7 +4762,7 @@ "weight": 326, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -4771,6 +4773,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getTable", "auth": { "Project": [], "Key": [] @@ -4828,7 +4831,7 @@ "weight": 327, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -4839,6 +4842,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.updateTable", "auth": { "Project": [], "Key": [] @@ -4930,7 +4934,7 @@ "weight": 328, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -4941,6 +4945,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteTable", "auth": { "Project": [], "Key": [] @@ -8706,7 +8711,7 @@ "weight": 370, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -8717,6 +8722,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.listColumnIndexes", "auth": { "Project": [], "Key": [] @@ -8786,7 +8792,7 @@ "weight": 367, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -8797,6 +8803,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.createColumnIndex", "auth": { "Project": [], "Key": [] @@ -8914,7 +8921,7 @@ "weight": 368, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -8925,6 +8932,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.getColumnIndex", "auth": { "Project": [], "Key": [] @@ -8984,7 +8992,7 @@ "weight": 369, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -8995,6 +9003,7 @@ "server" ], "packaging": false, + "replaceWith": "tables.deleteColumnIndex", "auth": { "Project": [], "Key": [] 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 176c3ca853..8550c198a9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -61,7 +61,10 @@ class Create extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.createTable', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php index e4618a40b7..304aadc8d5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php @@ -51,7 +51,10 @@ class Delete extends Action model: UtopiaResponse::MODEL_NONE, ) ], - contentType: ContentType::NONE + contentType: ContentType::NONE, + deprecated: [ + 'replaceWith' => 'tables.deleteTable', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php index e35a924657..e3a7fec891 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php @@ -46,7 +46,10 @@ class Get extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.getTable', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') 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 9003fbb4a9..8e8daed75f 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 @@ -61,7 +61,10 @@ class Create extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.createColumnIndex', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index 701ab103ad..8f5475f7a7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -56,7 +56,10 @@ class Delete extends Action model: UtopiaResponse::MODEL_NONE, ) ], - contentType: ContentType::NONE + contentType: ContentType::NONE, + deprecated: [ + 'replaceWith' => 'tables.deleteColumnIndex', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index c5b81fe231..82379265a5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -47,7 +47,10 @@ class Get extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.getColumnIndex', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index 36c52f711e..791493ff0a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -52,7 +52,10 @@ class XList extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.listColumnIndexes', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 70bb14e9d8..2cabce49ae 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -58,7 +58,10 @@ class XList extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.listTableLogs', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index fd3b1e8bda..e420f4de93 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -54,7 +54,10 @@ class Update extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.updateTable', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php index e5335d6abf..4dadaad87c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php @@ -52,6 +52,9 @@ class Get extends Action ) ], contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.getTableUsage', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index 3a9868dec2..3c86afd9a6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -53,7 +53,10 @@ class XList extends Action model: $this->getResponseModel(), ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.listTables', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('queries', [], new Collections(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Collections::ALLOWED_ATTRIBUTES), true) From 6d9b3aef0ebbe3024c0db1ec90ffd3e2ba48c71f Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 24 Jun 2025 17:32:23 +0530 Subject: [PATCH 199/362] chore: fix table replacewith methods --- .../Modules/Databases/Http/Databases/Collections/Create.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Delete.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Get.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Update.php | 2 +- .../Modules/Databases/Http/Databases/Collections/XList.php | 2 +- 5 files changed, 5 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 8550c198a9..9d3b56f5f1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -63,7 +63,7 @@ class Create extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.createTable', + 'replaceWith' => 'tables.create', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php index 304aadc8d5..4cf7b3854c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php @@ -53,7 +53,7 @@ class Delete extends Action ], contentType: ContentType::NONE, deprecated: [ - 'replaceWith' => 'tables.deleteTable', + 'replaceWith' => 'tables.delete', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php index e3a7fec891..ed54aa6bf9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php @@ -48,7 +48,7 @@ class Get extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.getTable', + 'replaceWith' => 'tables.get', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index e420f4de93..69e04574ad 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -56,7 +56,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateTable', + 'replaceWith' => 'tables.update', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index 3c86afd9a6..b36572c5fc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -55,7 +55,7 @@ class XList extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.listTables', + 'replaceWith' => 'tables.list', ], )) ->param('databaseId', '', new UID(), 'Database ID.') From 7f4d6233a2f8e8e80d5bbbf6b2486ef49cf60888 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 11:00:09 +0530 Subject: [PATCH 200/362] add: validators to swagger2. --- src/Appwrite/SDK/Specification/Format/Swagger2.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 4c4016e7e7..79b26399fd 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -415,6 +415,8 @@ class Swagger2 extends Format case 'Utopia\Database\Validator\Queries': case 'Utopia\Database\Validator\Queries\Document': case 'Utopia\Database\Validator\Queries\Documents': + case 'Appwrite\Utopia\Database\Validator\Queries\Columns': + case 'Appwrite\Utopia\Database\Validator\Queries\Tables': $node['type'] = 'array'; $node['collectionFormat'] = 'multi'; $node['items'] = [ From 789064e295566e815c759066199b71f3f6214469 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 11:29:45 +0530 Subject: [PATCH 201/362] add: new scopes to the api. --- app/config/roles.php | 8 ++++++++ app/config/scopes.php | 18 ++++++++++++++++++ app/config/templates/function.php | 18 +++++++++--------- .../Tables/Columns/Boolean/Create.php | 2 +- .../Tables/Columns/Boolean/Update.php | 2 +- .../Tables/Columns/Datetime/Create.php | 2 +- .../Tables/Columns/Datetime/Update.php | 2 +- .../Http/Databases/Tables/Columns/Delete.php | 2 +- .../Databases/Tables/Columns/Email/Create.php | 2 +- .../Databases/Tables/Columns/Email/Update.php | 2 +- .../Databases/Tables/Columns/Enum/Create.php | 2 +- .../Databases/Tables/Columns/Enum/Update.php | 2 +- .../Databases/Tables/Columns/Float/Create.php | 2 +- .../Databases/Tables/Columns/Float/Update.php | 2 +- .../Http/Databases/Tables/Columns/Get.php | 2 +- .../Databases/Tables/Columns/IP/Create.php | 2 +- .../Databases/Tables/Columns/IP/Update.php | 2 +- .../Tables/Columns/Integer/Create.php | 2 +- .../Tables/Columns/Integer/Update.php | 2 +- .../Tables/Columns/Relationship/Create.php | 2 +- .../Tables/Columns/Relationship/Update.php | 2 +- .../Databases/Tables/Columns/String/Create.php | 2 +- .../Databases/Tables/Columns/String/Update.php | 2 +- .../Databases/Tables/Columns/URL/Create.php | 2 +- .../Databases/Tables/Columns/URL/Update.php | 2 +- .../Http/Databases/Tables/Columns/XList.php | 2 +- .../Databases/Http/Databases/Tables/Create.php | 2 +- .../Databases/Http/Databases/Tables/Delete.php | 2 +- .../Databases/Http/Databases/Tables/Get.php | 2 +- .../Http/Databases/Tables/Indexes/Create.php | 2 +- .../Http/Databases/Tables/Indexes/Delete.php | 2 +- .../Http/Databases/Tables/Indexes/Get.php | 2 +- .../Http/Databases/Tables/Indexes/XList.php | 2 +- .../Http/Databases/Tables/Logs/XList.php | 2 +- .../Http/Databases/Tables/Rows/Bulk/Delete.php | 2 +- .../Http/Databases/Tables/Rows/Bulk/Update.php | 2 +- .../Http/Databases/Tables/Rows/Bulk/Upsert.php | 2 +- .../Databases/Tables/Rows/Column/Decrement.php | 2 +- .../Databases/Tables/Rows/Column/Increment.php | 2 +- .../Http/Databases/Tables/Rows/Create.php | 2 +- .../Http/Databases/Tables/Rows/Delete.php | 2 +- .../Http/Databases/Tables/Rows/Get.php | 2 +- .../Http/Databases/Tables/Rows/Logs/XList.php | 2 +- .../Http/Databases/Tables/Rows/Update.php | 2 +- .../Http/Databases/Tables/Rows/Upsert.php | 2 +- .../Http/Databases/Tables/Rows/XList.php | 2 +- .../Databases/Http/Databases/Tables/Update.php | 2 +- .../Http/Databases/Tables/Usage/Get.php | 2 +- .../Databases/Http/Databases/Tables/XList.php | 2 +- tests/e2e/Scopes/ProjectCustom.php | 4 ++++ 50 files changed, 85 insertions(+), 55 deletions(-) diff --git a/app/config/roles.php b/app/config/roles.php index bccc2837f5..4b06e0a6c1 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -14,6 +14,8 @@ $member = [ 'teams.write', 'documents.read', 'documents.write', + 'rows.read', + 'rows.write', 'files.read', 'files.write', 'projects.read', @@ -37,6 +39,8 @@ $admins = [ 'teams.write', 'documents.read', 'documents.write', + 'rows.read', + 'rows.write', 'files.read', 'files.write', 'buckets.read', @@ -47,6 +51,8 @@ $admins = [ 'databases.write', 'collections.read', 'collections.write', + 'tables.read', + 'tables.write', 'platforms.read', 'platforms.write', 'projects.write', @@ -97,6 +103,8 @@ return [ 'sessions.write', 'documents.read', 'documents.write', + 'rows.read', + 'rows.write', 'files.read', 'files.write', 'locale.read', diff --git a/app/config/scopes.php b/app/config/scopes.php index 7dea7b1cd5..d90ca2eabf 100644 --- a/app/config/scopes.php +++ b/app/config/scopes.php @@ -28,12 +28,24 @@ return [ // List of publicly visible scopes 'collections.write' => [ 'description' => 'Access to create, update, and delete your project\'s database collections', ], + 'tables.read' => [ + 'description' => 'Access to read your project\'s database tables', + ], + 'tables.write' => [ + 'description' => 'Access to create, update, and delete your project\'s database tables', + ], 'attributes.read' => [ 'description' => 'Access to read your project\'s database collection\'s attributes', ], 'attributes.write' => [ 'description' => 'Access to create, update, and delete your project\'s database collection\'s attributes', ], + 'columns.read' => [ + 'description' => 'Access to read your project\'s database table\'s columns', + ], + 'columns.write' => [ + 'description' => 'Access to create, update, and delete your project\'s database table\'s columns', + ], 'indexes.read' => [ 'description' => 'Access to read your project\'s database collection\'s indexes', ], @@ -46,6 +58,12 @@ return [ // List of publicly visible scopes 'documents.write' => [ 'description' => 'Access to create, update, and delete your project\'s database documents', ], + 'rows.read' => [ + 'description' => 'Access to read your project\'s database rows', + ], + 'rows.write' => [ + 'description' => 'Access to create, update, and delete your project\'s database rows', + ], 'files.read' => [ 'description' => 'Access to read your project\'s storage files and preview images', ], diff --git a/app/config/templates/function.php b/app/config/templates/function.php index 960bc1d65e..9a905c83b1 100644 --- a/app/config/templates/function.php +++ b/app/config/templates/function.php @@ -635,7 +635,7 @@ return [ 'type' => 'url' ] ], - 'scopes' => ['databases.read', 'databases.write', 'collections.write', 'attributes.write', 'documents.read', 'documents.write'] + 'scopes' => ['databases.read', 'databases.write', 'collections.write', 'tables.write', 'attributes.write', 'columns.write', 'documents.read', 'rows.read', 'documents.write', 'rows.write'] ], [ 'icon' => 'icon-algolia', @@ -717,7 +717,7 @@ return [ 'type' => 'password' ], ], - 'scopes' => ['databases.read', 'collections.read', 'documents.read'] + 'scopes' => ['databases.read', 'collections.read', 'tables.read', 'documents.read', 'rows.read'] ], [ 'icon' => 'icon-meilisearch', @@ -811,7 +811,7 @@ return [ 'type' => 'text' ], ], - 'scopes' => ['databases.read', 'collections.read', 'documents.read'] + 'scopes' => ['databases.read', 'collections.read', 'tables.read', 'documents.read', 'rows.read'] ], [ 'icon' => 'icon-vonage', @@ -1139,7 +1139,7 @@ return [ 'type' => 'text' ] ], - 'scopes' => ['databases.read', 'databases.write', 'collections.write', 'attributes.write', 'documents.read', 'documents.write'] + 'scopes' => ['databases.read', 'databases.write', 'collections.write', 'tables.write', 'attributes.write', 'columns.write', 'documents.read', 'rows.read', 'documents.write', 'rows.write'] ], [ 'icon' => 'icon-chat', @@ -1268,7 +1268,7 @@ return [ 'type' => 'password' ] ], - 'scopes' => ['databases.read', 'databases.write', 'collections.read', 'collections.write', 'attributes.write', 'documents.read', 'documents.write', 'buckets.read', 'buckets.write', 'files.read'] + 'scopes' => ['databases.read', 'databases.write', 'collections.read', 'tables.read', 'collections.write', 'tables.write', 'attributes.write', 'columns.write', 'documents.read', 'rows.read', 'documents.write', 'rows.write', 'buckets.read', 'buckets.write', 'files.read'] ], [ 'icon' => 'icon-eye', @@ -1327,7 +1327,7 @@ return [ 'type' => 'password' ] ], - 'scopes' => ['databases.read', 'databases.write', 'collections.read', 'collections.write', 'attributes.write', 'documents.read', 'documents.write', 'buckets.read', 'buckets.write', 'files.read'] + 'scopes' => ['databases.read', 'databases.write', 'collections.read', 'tables.read', 'collections.write', 'tables.write', 'attributes.write', 'columns.write', 'documents.read', 'rows.read', 'documents.write', 'rows.write', 'buckets.read', 'buckets.write', 'files.read'] ], [ 'icon' => 'icon-text', @@ -1386,7 +1386,7 @@ return [ 'type' => 'password' ] ], - 'scopes' => ['databases.read', 'databases.write', 'collections.read', 'collections.write', 'attributes.write', 'documents.read', 'documents.write', 'buckets.read', 'buckets.write', 'files.read'] + 'scopes' => ['databases.read', 'databases.write', 'collections.read', 'tables.read', 'collections.write', 'tables.write', 'attributes.write', 'columns.write', 'documents.read', 'rows.read', 'documents.write', 'rows.write', 'buckets.read', 'buckets.write', 'files.read'] ], [ 'icon' => 'icon-chat', @@ -1669,7 +1669,7 @@ return [ 'type' => 'text' ] ], - 'scopes' => ['databases.read', 'collections.read', 'documents.read'] + 'scopes' => ['databases.read', 'collections.read', 'tables.read', 'documents.read', 'rows.read'] ], [ 'icon' => 'icon-chip', @@ -1733,7 +1733,7 @@ return [ 'type' => 'text' ] ], - 'scopes' => ['databases.read', 'collections.read', 'documents.read'] + 'scopes' => ['databases.read', 'collections.read', 'tables.read', 'documents.read', 'rows.read'] ], [ 'icon' => 'icon-chat', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php index 9e65e6e5b3..30972e8458 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php @@ -32,7 +32,7 @@ class Create extends BooleanCreate ->desc('Create boolean column') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php index f7eff81ae3..82e7d9526d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php @@ -33,7 +33,7 @@ class Update extends BooleanUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean/:key') ->desc('Update boolean column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php index 5bb83733a4..44e9cf9cd3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php @@ -33,7 +33,7 @@ class Create extends DatetimeCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime') ->desc('Create datetime column') ->groups(['api', 'database']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php index 6710f76aaa..27f5f3e82b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php @@ -35,7 +35,7 @@ class Update extends DatetimeUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime/:key') ->desc('Update dateTime column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php index b85248e8c3..ce3e66a85f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php @@ -32,7 +32,7 @@ class Delete extends AttributesDelete ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') ->desc('Delete column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.delete') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php index 6aade1aa50..c497b9d78c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php @@ -32,7 +32,7 @@ class Create extends EmailCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email') ->desc('Create email column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php index 10213c87bb..267d5b80e7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php @@ -34,7 +34,7 @@ class Update extends EmailUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email/:key') ->desc('Update email column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php index 8e9a658aa8..38b7ac231a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php @@ -34,7 +34,7 @@ class Create extends EnumCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum') ->desc('Create enum column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php index d1418e5144..97785b1121 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php @@ -36,7 +36,7 @@ class Update extends EnumUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum/:key') ->desc('Update enum column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php index 5c99b90f52..4a96165b32 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php @@ -32,7 +32,7 @@ class Create extends FloatCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float') ->desc('Create float column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php index 5360ca0304..d570ce4857 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php @@ -34,7 +34,7 @@ class Update extends FloatUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float/:key') ->desc('Update float column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php index 17777409d2..85ac43b63d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php @@ -41,7 +41,7 @@ class Get extends AttributesGet ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') ->desc('Get column') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php index cb58a14cbe..874c0f2132 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php @@ -32,7 +32,7 @@ class Create extends IPCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip') ->desc('Create IP address column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php index ef4c62a51f..73a73bccac 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php @@ -34,7 +34,7 @@ class Update extends IPUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip/:key') ->desc('Update IP address column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php index 6ca6cc4b93..11a36c1e3c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php @@ -32,7 +32,7 @@ class Create extends IntegerCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer') ->desc('Create integer column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php index 764ae31f35..292eb3de7b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php @@ -34,7 +34,7 @@ class Update extends IntegerUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer/:key') ->desc('Update integer column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php index 20e89396a0..583f8bb16c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php @@ -33,7 +33,7 @@ class Create extends RelationshipCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/relationship') ->desc('Create relationship column') ->groups(['api', 'database']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php index 508c5da57a..d17cf9def2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php @@ -33,7 +33,7 @@ class Update extends RelationshipUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key/relationship') ->desc('Update relationship column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php index a11ee3464e..9d86fc8c8e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php @@ -34,7 +34,7 @@ class Create extends StringCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string') ->desc('Create string column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php index 92df091866..8106ccf626 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php @@ -36,7 +36,7 @@ class Update extends StringUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string/:key') ->desc('Update string column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php index 84c488ccfc..340b120c5c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php @@ -32,7 +32,7 @@ class Create extends URLCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url') ->desc('Create URL column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php index d3681b9358..82ab8fa614 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php @@ -34,7 +34,7 @@ class Update extends URLUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url/:key') ->desc('Update URL column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php index 8190f2ec71..b6578777b0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php @@ -30,7 +30,7 @@ class XList extends AttributesXList ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns') ->desc('List columns') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php index 0bfdef5249..b80cf4f773 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php @@ -35,7 +35,7 @@ class Create extends CollectionCreate ->desc('Create table') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].create') - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'table.create') ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php index caa7197acb..2465496023 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php @@ -30,7 +30,7 @@ class Delete extends CollectionDelete ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') ->desc('Delete table') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].delete') ->label('audits.event', 'table.delete') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php index 40672ba51f..dec3a879a4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php @@ -30,7 +30,7 @@ class Get extends CollectionGet ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') ->desc('Get table') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php index b11892e0f9..92397cd460 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php @@ -37,7 +37,7 @@ class Create extends IndexCreate ->desc('Create index') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'index.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php index 4ff9638f27..eb8e2c5833 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php @@ -35,7 +35,7 @@ class Delete extends IndexDelete ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') ->desc('Delete index') ->groups(['api', 'database']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].update') ->label('audits.event', 'index.delete') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php index 79529fda66..9a63fa79c3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php @@ -31,7 +31,7 @@ class Get extends IndexGet ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') ->desc('Get index') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php index 12581a4fc3..85685cdd6c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php @@ -31,7 +31,7 @@ class XList extends IndexXList ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') ->desc('List indexes') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php index 8e652c5416..afe33597e2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php @@ -27,7 +27,7 @@ class XList extends CollectionLogXList ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/logs') ->desc('List table logs') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: 'databases', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php index 945450aee3..a29d73aeee 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php @@ -32,7 +32,7 @@ class Delete extends DocumentsDelete ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('Delete rows') ->groups(['api', 'database']) - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.delete') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php index 916d683491..529d4b0b96 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php @@ -33,7 +33,7 @@ class Update extends DocumentsUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('Update rows') ->groups(['api', 'database']) - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php index 65c848a7c4..2bda5f0172 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php @@ -32,7 +32,7 @@ class Upsert extends DocumentsUpsert ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('Create or update rows') ->groups(['api', 'database']) - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php index 916c051d8a..a0761f0bd2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php @@ -33,7 +33,7 @@ class Decrement extends DecrementDocumentAttribute ->desc('Decrement row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].decrement') - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.decrement') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php index ba78833744..d28b2a3968 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php @@ -33,7 +33,7 @@ class Increment extends IncrementDocumentAttribute ->desc('Increment row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].increment') - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.increment') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index ba2b461d6e..bba4960b69 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -41,7 +41,7 @@ class Create extends DocumentCreate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('Create row') ->groups(['api', 'database']) - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php index 27fe101f1d..22c25d5b16 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php @@ -36,7 +36,7 @@ class Delete extends DocumentDelete ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') ->desc('Delete row') ->groups(['api', 'database']) - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].delete') ->label('audits.event', 'row.delete') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php index 8100abbea5..0266781728 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php @@ -32,7 +32,7 @@ class Get extends DocumentGet ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') ->desc('Get row') ->groups(['api', 'database']) - ->label('scope', 'documents.read') + ->label('scope', 'rows.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php index f39a77323f..ad42f16f44 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php @@ -27,7 +27,7 @@ class XList extends DocumentLogXList ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/logs') ->desc('List row logs') ->groups(['api', 'database']) - ->label('scope', 'documents.read') + ->label('scope', 'rows.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php index 9fa596ecc0..15796c3b6b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php @@ -34,7 +34,7 @@ class Update extends DocumentUpdate ->desc('Update row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php index 5c0fde708b..42a79e8a72 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php @@ -34,7 +34,7 @@ class Upsert extends DocumentUpsert ->desc('Create or update a row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].upsert') - ->label('scope', 'documents.write') + ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.upsert') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php index b7ad763e36..7e942f4842 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php @@ -32,7 +32,7 @@ class XList extends DocumentXList ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') ->desc('List rows') ->groups(['api', 'database']) - ->label('scope', 'documents.read') + ->label('scope', 'rows.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php index f800e7b1de..b19dc143b9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php @@ -33,7 +33,7 @@ class Update extends CollectionUpdate ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') ->desc('Update table') ->groups(['api', 'database', 'schema']) - ->label('scope', 'collections.write') + ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].update') ->label('audits.event', 'table.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index ca990eeab6..cede0762d8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -31,7 +31,7 @@ class Get extends CollectionUsageGet ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/usage') ->desc('Get table usage stats') ->groups(['api', 'database', 'usage']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php index 34000d97b1..24034f7f0a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php @@ -32,7 +32,7 @@ class XList extends CollectionXList ->setHttpPath('/v1/databases/:databaseId/tables') ->desc('List tables') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index 51aebeaef7..ea27318390 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -70,8 +70,12 @@ trait ProjectCustom 'databases.write', 'collections.read', 'collections.write', + 'tables.read', + 'tables.write', 'documents.read', 'documents.write', + 'rows.read', + 'rows.write', 'files.read', 'files.write', 'buckets.read', From fb81b133891b013eb242bc6558f7f35077025356 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 11:49:59 +0530 Subject: [PATCH 202/362] update: doc links. --- .../Databases/Http/Databases/Tables/Columns/Boolean/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/Boolean/Update.php | 2 +- .../Databases/Http/Databases/Tables/Columns/String/Create.php | 2 +- .../Databases/Http/Databases/Tables/Columns/String/Update.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Indexes/Create.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Indexes/Delete.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Indexes/Get.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Indexes/XList.php | 2 +- .../Databases/Http/Databases/Tables/Rows/Bulk/Delete.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Create.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Delete.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Get.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/XList.php | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php index 8a2a07d48d..e0f1992ccb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php @@ -50,7 +50,7 @@ class Create extends BooleanCreate ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', '', new Key(), 'Column Key.') ->param('required', null, new Boolean(), 'Is column required?') ->param('default', null, new Boolean(), 'Default value for column when not provided. Cannot be set when column is required.', true) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php index e91b1cd3c7..888f31d9bd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php @@ -53,7 +53,7 @@ class Update extends BooleanUpdate contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', '', new Key(), 'Column Key.') ->param('required', null, new Boolean(), 'Is column required?') ->param('default', null, new Nullable(new Boolean()), 'Default value for column when not provided. Cannot be set when column is required.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php index 429f700898..2dc1466a67 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php @@ -53,7 +53,7 @@ class Create extends StringCreate ] )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', '', new Key(), 'Column Key.') ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Validator::TYPE_INTEGER), 'Attribute size for text attributes, in number of characters.') ->param('required', null, new Boolean(), 'Is column required?') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php index 04e1600f28..9e1034dbcc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php @@ -56,7 +56,7 @@ class Update extends StringUpdate contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', '', new Key(), 'Column Key.') ->param('required', null, new Boolean(), 'Is column required?') ->param('default', null, new Nullable(new Text(0, 0)), 'Default value for column when not provided. Cannot be set when column is required.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php index 92397cd460..a83bb3dc44 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php @@ -56,7 +56,7 @@ class Create extends IndexCreate contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', null, new Key(), 'Index Key.') ->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE]), 'Index type.') ->param('columns', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of columns to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' columns are allowed, each 32 characters long.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php index eb8e2c5833..87d2550457 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php @@ -55,7 +55,7 @@ class Delete extends IndexDelete contentType: ContentType::NONE )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', '', new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php index 9a63fa79c3..cb8ef92a80 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php @@ -48,7 +48,7 @@ class Get extends IndexGet contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('key', null, new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php index 85685cdd6c..78b2c8874f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php @@ -48,7 +48,7 @@ class XList extends IndexXList contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('queries', [], new Indexes(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Indexes::ALLOWED_ATTRIBUTES), true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php index 7e15b1ef6e..30aad96db8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php @@ -54,7 +54,7 @@ class Delete extends DocumentsDelete contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php index 32a36edfcb..3fc8a30bfd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php @@ -92,7 +92,7 @@ class Create extends DocumentCreate ]) ->param('databaseId', '', new UID(), 'Database ID.') ->param('rowId', '', new CustomId(), 'Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.', true) - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define columns before creating rows.') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate). Make sure to define columns before creating rows.') ->param('data', [], new JSON(), 'Row data as JSON object.', true) ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('rows', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of documents data as JSON objects.', true, ['plan']) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php index be1c8cd838..36c8aefbc6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php @@ -59,7 +59,7 @@ class Delete extends DocumentDelete contentType: ContentType::NONE )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('rowId', '', new UID(), 'Row ID.') ->inject('requestTimestamp') ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php index ad1ef42ae8..b821d01ebe 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php @@ -49,7 +49,7 @@ class Get extends DocumentGet contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('rowId', '', new UID(), 'Row ID.') ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php index c338b84908..244a4afdb9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php @@ -49,7 +49,7 @@ class XList extends DocumentXList contentType: ContentType::JSON )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tables#tablesCreate).') ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) ->inject('response') ->inject('dbForProject') From d7d8dbdbd47c1b0788c13232f9e264bfd045dcb6 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 11:53:21 +0530 Subject: [PATCH 203/362] fix: name. --- .../Modules/Databases/Http/Databases/Tables/Indexes/Delete.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php index eb8e2c5833..0fec37eec3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php @@ -16,7 +16,7 @@ class Delete extends IndexDelete { public static function getName(): string { - return 'updateColumnIndex'; + return 'deleteColumnIndex'; } /** From 6a5ffb2e8245f9bbb1cfc086745703a34b87d647 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 11:58:47 +0530 Subject: [PATCH 204/362] bump: specs for sdks. --- app/config/specs/open-api3-1.8.x-client.json | 20 +-- app/config/specs/open-api3-1.8.x-console.json | 118 +++++++++--------- app/config/specs/open-api3-1.8.x-server.json | 112 ++++++++--------- app/config/specs/open-api3-latest-client.json | 20 +-- .../specs/open-api3-latest-console.json | 118 +++++++++--------- app/config/specs/open-api3-latest-server.json | 112 ++++++++--------- app/config/specs/swagger2-1.8.x-client.json | 20 +-- app/config/specs/swagger2-1.8.x-console.json | 118 +++++++++--------- app/config/specs/swagger2-1.8.x-server.json | 112 ++++++++--------- app/config/specs/swagger2-latest-client.json | 20 +-- app/config/specs/swagger2-latest-console.json | 118 +++++++++--------- app/config/specs/swagger2-latest-server.json | 112 ++++++++--------- 12 files changed, 500 insertions(+), 500 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 58917b543a..3520fa9d9e 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -5026,7 +5026,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5057,7 +5057,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -5111,7 +5111,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5196,7 +5196,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "schema": { "type": "string", @@ -5276,7 +5276,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5307,7 +5307,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -5371,7 +5371,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5496,7 +5496,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5595,7 +5595,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5626,7 +5626,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", 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 5ab268bfc6..6f59879def 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -9804,7 +9804,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9887,7 +9887,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9991,7 +9991,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10060,7 +10060,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10159,7 +10159,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10230,7 +10230,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10314,7 +10314,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10342,7 +10342,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -10420,7 +10420,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10448,7 +10448,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -10531,7 +10531,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10637,7 +10637,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10748,7 +10748,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10854,7 +10854,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10965,7 +10965,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11080,7 +11080,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11200,7 +11200,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11316,7 +11316,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11437,7 +11437,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11553,7 +11553,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11674,7 +11674,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11780,7 +11780,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11891,7 +11891,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12022,7 +12022,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12050,7 +12050,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12139,7 +12139,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12167,7 +12167,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12255,7 +12255,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12361,7 +12361,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12503,7 +12503,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12574,7 +12574,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12654,7 +12654,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12762,7 +12762,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12790,7 +12790,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12844,7 +12844,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12872,7 +12872,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12972,7 +12972,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -13000,7 +13000,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -13043,7 +13043,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -13071,7 +13071,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -13123,7 +13123,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], @@ -13206,7 +13206,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13237,7 +13237,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -13291,7 +13291,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13376,7 +13376,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "schema": { "type": "string", @@ -13454,7 +13454,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13564,7 +13564,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13658,7 +13658,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13687,7 +13687,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -13749,7 +13749,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13780,7 +13780,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -13844,7 +13844,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13969,7 +13969,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14068,7 +14068,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14099,7 +14099,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -14152,7 +14152,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "console" ], @@ -14245,7 +14245,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14357,7 +14357,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14469,7 +14469,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], 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 78f3dac6d3..90b49ae65c 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -8963,7 +8963,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9047,7 +9047,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9152,7 +9152,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9222,7 +9222,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9322,7 +9322,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9394,7 +9394,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9479,7 +9479,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9508,7 +9508,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -9586,7 +9586,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9615,7 +9615,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -9698,7 +9698,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9805,7 +9805,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9917,7 +9917,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10024,7 +10024,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10136,7 +10136,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10252,7 +10252,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10373,7 +10373,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10490,7 +10490,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10612,7 +10612,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10729,7 +10729,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10851,7 +10851,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10958,7 +10958,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11070,7 +11070,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11202,7 +11202,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11231,7 +11231,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -11320,7 +11320,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11349,7 +11349,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -11437,7 +11437,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11544,7 +11544,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11687,7 +11687,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -11759,7 +11759,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11840,7 +11840,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11949,7 +11949,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -11978,7 +11978,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12032,7 +12032,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12061,7 +12061,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12161,7 +12161,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12190,7 +12190,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12233,7 +12233,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12262,7 +12262,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12314,7 +12314,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12347,7 +12347,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12401,7 +12401,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -12488,7 +12488,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "schema": { "type": "string", @@ -12566,7 +12566,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12677,7 +12677,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12772,7 +12772,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12802,7 +12802,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12864,7 +12864,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12897,7 +12897,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12961,7 +12961,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13088,7 +13088,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13189,7 +13189,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13222,7 +13222,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -13275,7 +13275,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13388,7 +13388,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 58917b543a..3520fa9d9e 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -5026,7 +5026,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5057,7 +5057,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -5111,7 +5111,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5196,7 +5196,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "schema": { "type": "string", @@ -5276,7 +5276,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5307,7 +5307,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -5371,7 +5371,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5496,7 +5496,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5595,7 +5595,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5626,7 +5626,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 5ab268bfc6..6f59879def 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -9804,7 +9804,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9887,7 +9887,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9991,7 +9991,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10060,7 +10060,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10159,7 +10159,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10230,7 +10230,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10314,7 +10314,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10342,7 +10342,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -10420,7 +10420,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10448,7 +10448,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -10531,7 +10531,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10637,7 +10637,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10748,7 +10748,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10854,7 +10854,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10965,7 +10965,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11080,7 +11080,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11200,7 +11200,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11316,7 +11316,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11437,7 +11437,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11553,7 +11553,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11674,7 +11674,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11780,7 +11780,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11891,7 +11891,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12022,7 +12022,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12050,7 +12050,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12139,7 +12139,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12167,7 +12167,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12255,7 +12255,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12361,7 +12361,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12503,7 +12503,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12574,7 +12574,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12654,7 +12654,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12762,7 +12762,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12790,7 +12790,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12844,7 +12844,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12872,7 +12872,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12972,7 +12972,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -13000,7 +13000,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -13043,7 +13043,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -13071,7 +13071,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -13123,7 +13123,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], @@ -13206,7 +13206,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13237,7 +13237,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -13291,7 +13291,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13376,7 +13376,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "schema": { "type": "string", @@ -13454,7 +13454,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13564,7 +13564,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13658,7 +13658,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13687,7 +13687,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -13749,7 +13749,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13780,7 +13780,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -13844,7 +13844,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13969,7 +13969,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14068,7 +14068,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14099,7 +14099,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -14152,7 +14152,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "console" ], @@ -14245,7 +14245,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14357,7 +14357,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14469,7 +14469,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 78f3dac6d3..90b49ae65c 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -8963,7 +8963,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9047,7 +9047,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9152,7 +9152,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9222,7 +9222,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9322,7 +9322,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9394,7 +9394,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9479,7 +9479,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9508,7 +9508,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -9586,7 +9586,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9615,7 +9615,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -9698,7 +9698,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9805,7 +9805,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9917,7 +9917,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10024,7 +10024,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10136,7 +10136,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10252,7 +10252,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10373,7 +10373,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10490,7 +10490,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10612,7 +10612,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10729,7 +10729,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10851,7 +10851,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10958,7 +10958,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11070,7 +11070,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11202,7 +11202,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11231,7 +11231,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -11320,7 +11320,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11349,7 +11349,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -11437,7 +11437,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11544,7 +11544,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11687,7 +11687,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -11759,7 +11759,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11840,7 +11840,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11949,7 +11949,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -11978,7 +11978,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12032,7 +12032,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12061,7 +12061,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12161,7 +12161,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12190,7 +12190,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12233,7 +12233,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12262,7 +12262,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12314,7 +12314,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12347,7 +12347,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12401,7 +12401,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -12488,7 +12488,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "schema": { "type": "string", @@ -12566,7 +12566,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12677,7 +12677,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12772,7 +12772,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12802,7 +12802,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12864,7 +12864,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12897,7 +12897,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -12961,7 +12961,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13088,7 +13088,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13189,7 +13189,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13222,7 +13222,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "schema": { "type": "string", @@ -13275,7 +13275,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13388,7 +13388,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 84445b4af5..b641397258 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -5153,7 +5153,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5182,7 +5182,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -5235,7 +5235,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5318,7 +5318,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -5398,7 +5398,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5427,7 +5427,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -5488,7 +5488,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5609,7 +5609,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5706,7 +5706,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5735,7 +5735,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index e89e44d914..33fb8d7b78 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -9861,7 +9861,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9941,7 +9941,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10046,7 +10046,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10113,7 +10113,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10214,7 +10214,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10281,7 +10281,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10362,7 +10362,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10388,7 +10388,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -10468,7 +10468,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10494,7 +10494,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -10576,7 +10576,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10682,7 +10682,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10790,7 +10790,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10896,7 +10896,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11004,7 +11004,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11120,7 +11120,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11238,7 +11238,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11356,7 +11356,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11476,7 +11476,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11594,7 +11594,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11714,7 +11714,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11820,7 +11820,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11928,7 +11928,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12061,7 +12061,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12087,7 +12087,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12180,7 +12180,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12206,7 +12206,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12294,7 +12294,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12400,7 +12400,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12537,7 +12537,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12606,7 +12606,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12682,7 +12682,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12784,7 +12784,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12810,7 +12810,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12863,7 +12863,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12889,7 +12889,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12990,7 +12990,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -13016,7 +13016,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13059,7 +13059,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -13085,7 +13085,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13133,7 +13133,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], @@ -13211,7 +13211,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13240,7 +13240,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13293,7 +13293,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13376,7 +13376,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13456,7 +13456,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13563,7 +13563,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13655,7 +13655,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13682,7 +13682,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13741,7 +13741,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13770,7 +13770,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13831,7 +13831,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13952,7 +13952,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14049,7 +14049,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14078,7 +14078,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -14127,7 +14127,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "console" ], @@ -14215,7 +14215,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14321,7 +14321,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14425,7 +14425,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 31629e6018..b0a58b264d 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -9031,7 +9031,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9112,7 +9112,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9218,7 +9218,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9286,7 +9286,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9388,7 +9388,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9456,7 +9456,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9538,7 +9538,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9565,7 +9565,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -9645,7 +9645,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9672,7 +9672,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -9754,7 +9754,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9861,7 +9861,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9970,7 +9970,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10077,7 +10077,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10186,7 +10186,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10303,7 +10303,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10422,7 +10422,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10541,7 +10541,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10662,7 +10662,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10781,7 +10781,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10902,7 +10902,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11009,7 +11009,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11118,7 +11118,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11252,7 +11252,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11279,7 +11279,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -11372,7 +11372,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11399,7 +11399,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -11487,7 +11487,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11594,7 +11594,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11732,7 +11732,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -11802,7 +11802,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11879,7 +11879,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11982,7 +11982,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12009,7 +12009,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12062,7 +12062,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12089,7 +12089,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12190,7 +12190,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12217,7 +12217,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12260,7 +12260,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12287,7 +12287,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12335,7 +12335,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12366,7 +12366,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12419,7 +12419,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -12504,7 +12504,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12584,7 +12584,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12692,7 +12692,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12785,7 +12785,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12813,7 +12813,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12872,7 +12872,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12903,7 +12903,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12964,7 +12964,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13087,7 +13087,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13186,7 +13186,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13217,7 +13217,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13268,7 +13268,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13375,7 +13375,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 84445b4af5..b641397258 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -5153,7 +5153,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5182,7 +5182,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -5235,7 +5235,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5318,7 +5318,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -5398,7 +5398,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -5427,7 +5427,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -5488,7 +5488,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5609,7 +5609,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5706,7 +5706,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -5735,7 +5735,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index e89e44d914..33fb8d7b78 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -9861,7 +9861,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9941,7 +9941,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10046,7 +10046,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10113,7 +10113,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10214,7 +10214,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10281,7 +10281,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -10362,7 +10362,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10388,7 +10388,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -10468,7 +10468,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10494,7 +10494,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -10576,7 +10576,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10682,7 +10682,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10790,7 +10790,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10896,7 +10896,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11004,7 +11004,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11120,7 +11120,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11238,7 +11238,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11356,7 +11356,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11476,7 +11476,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11594,7 +11594,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11714,7 +11714,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11820,7 +11820,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11928,7 +11928,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12061,7 +12061,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12087,7 +12087,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12180,7 +12180,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12206,7 +12206,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12294,7 +12294,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12400,7 +12400,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12537,7 +12537,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12606,7 +12606,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12682,7 +12682,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12784,7 +12784,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12810,7 +12810,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12863,7 +12863,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12889,7 +12889,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12990,7 +12990,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -13016,7 +13016,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13059,7 +13059,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -13085,7 +13085,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13133,7 +13133,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], @@ -13211,7 +13211,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13240,7 +13240,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13293,7 +13293,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13376,7 +13376,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13456,7 +13456,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13563,7 +13563,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13655,7 +13655,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13682,7 +13682,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13741,7 +13741,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -13770,7 +13770,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13831,7 +13831,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13952,7 +13952,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14049,7 +14049,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -14078,7 +14078,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -14127,7 +14127,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "console" ], @@ -14215,7 +14215,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14321,7 +14321,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -14425,7 +14425,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "console" ], diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 31629e6018..b0a58b264d 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -9031,7 +9031,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9112,7 +9112,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9218,7 +9218,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9286,7 +9286,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9388,7 +9388,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9456,7 +9456,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -9538,7 +9538,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9565,7 +9565,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -9645,7 +9645,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9672,7 +9672,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -9754,7 +9754,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9861,7 +9861,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -9970,7 +9970,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10077,7 +10077,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10186,7 +10186,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10303,7 +10303,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10422,7 +10422,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10541,7 +10541,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10662,7 +10662,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10781,7 +10781,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -10902,7 +10902,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11009,7 +11009,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11118,7 +11118,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11252,7 +11252,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11279,7 +11279,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -11372,7 +11372,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11399,7 +11399,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -11487,7 +11487,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11594,7 +11594,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11732,7 +11732,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -11802,7 +11802,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11879,7 +11879,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -11982,7 +11982,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12009,7 +12009,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12062,7 +12062,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12089,7 +12089,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12190,7 +12190,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", + "scope": "tables.read", "platforms": [ "server" ], @@ -12217,7 +12217,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12260,7 +12260,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", + "scope": "tables.write", "platforms": [ "server" ], @@ -12287,7 +12287,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12335,7 +12335,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12366,7 +12366,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12419,7 +12419,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -12504,7 +12504,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection). Make sure to define columns before creating rows.", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate). Make sure to define columns before creating rows.", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12584,7 +12584,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12692,7 +12692,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12785,7 +12785,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -12813,7 +12813,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12872,7 +12872,7 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", + "scope": "rows.read", "platforms": [ "client", "server", @@ -12903,7 +12903,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -12964,7 +12964,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13087,7 +13087,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13186,7 +13186,7 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "client", "server", @@ -13217,7 +13217,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/tables#tablesCreate).", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -13268,7 +13268,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" @@ -13375,7 +13375,7 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "documents.write", + "scope": "rows.write", "platforms": [ "console", "server" From 8632f3360fe151e7a2928933b9f7d0f548d982e1 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 12:43:51 +0530 Subject: [PATCH 205/362] bump: sdk examples. --- .../console-cli/examples/databases/get-database-usage.md | 3 +++ .../1.8.x/console-cli/examples/databases/list-usage.md | 2 ++ .../examples/1.8.x/console-cli/examples/tables/get-usage.md | 4 ++++ .../1.8.x/server-dart/examples/tables/create-index.md | 2 +- .../examples/tables/create-relationship-column.md | 4 ++-- .../examples/tables/update-relationship-column.md | 2 +- .../1.8.x/server-deno/examples/tables/create-index.md | 4 ++-- .../examples/tables/create-relationship-column.md | 6 +++--- .../examples/tables/update-relationship-column.md | 4 ++-- .../1.8.x/server-dotnet/examples/tables/create-index.md | 2 +- .../examples/tables/create-relationship-column.md | 4 ++-- .../examples/tables/update-relationship-column.md | 2 +- .../1.8.x/server-kotlin/java/tables/create-index.md | 4 ++-- .../server-kotlin/java/tables/create-relationship-column.md | 6 +++--- .../server-kotlin/java/tables/update-relationship-column.md | 2 +- .../1.8.x/server-kotlin/kotlin/tables/create-index.md | 4 ++-- .../kotlin/tables/create-relationship-column.md | 4 ++-- .../1.8.x/server-nodejs/examples/tables/create-index.md | 2 +- .../examples/tables/create-relationship-column.md | 4 ++-- .../examples/tables/update-relationship-column.md | 2 +- .../1.8.x/server-php/examples/tables/create-index.md | 4 ++-- .../examples/tables/create-relationship-column.md | 6 +++--- .../examples/tables/update-relationship-column.md | 2 +- .../1.8.x/server-python/examples/tables/create-index.md | 4 ++-- .../examples/tables/create-relationship-column.md | 6 +++--- .../examples/tables/update-relationship-column.md | 2 +- .../1.8.x/server-ruby/examples/tables/create-index.md | 2 +- .../examples/tables/create-relationship-column.md | 4 ++-- .../examples/tables/update-relationship-column.md | 2 +- 29 files changed, 54 insertions(+), 45 deletions(-) create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/get-database-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/databases/list-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-usage.md diff --git a/docs/examples/1.8.x/console-cli/examples/databases/get-database-usage.md b/docs/examples/1.8.x/console-cli/examples/databases/get-database-usage.md new file mode 100644 index 0000000000..1001e9cd11 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/get-database-usage.md @@ -0,0 +1,3 @@ +appwrite databases getDatabaseUsage \ + --databaseId <DATABASE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-usage.md b/docs/examples/1.8.x/console-cli/examples/databases/list-usage.md new file mode 100644 index 0000000000..aad19fd2bd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/databases/list-usage.md @@ -0,0 +1,2 @@ +appwrite databases listUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md b/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md new file mode 100644 index 0000000000..ca955ce6df --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md @@ -0,0 +1,4 @@ +appwrite tables getUsage \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-index.md b/docs/examples/1.8.x/server-dart/examples/tables/create-index.md index 63417fd3be..d76c46959f 100644 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-index.md +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-index.md @@ -11,7 +11,7 @@ ColumnIndex result = await tables.createIndex( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', - type: .key, + type: IndexType.key, columns: [], orders: [], // (optional) lengths: [], // (optional) diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md index 30a7f12342..a059740bf8 100644 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md @@ -11,9 +11,9 @@ ColumnRelationship result = await tables.createRelationshipColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', relatedTableId: '<RELATED_TABLE_ID>', - type: .oneToOne, + type: RelationshipType.oneToOne, twoWay: false, // (optional) key: '', // (optional) twoWayKey: '', // (optional) - onDelete: .cascade, // (optional) + onDelete: RelationMutate.cascade, // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md index ea6799ed46..45745627ef 100644 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md @@ -11,6 +11,6 @@ ColumnRelationship result = await tables.updateRelationshipColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', - onDelete: .cascade, // (optional) + onDelete: RelationMutate.cascade, // (optional) newKey: '', // (optional) ); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-index.md b/docs/examples/1.8.x/server-deno/examples/tables/create-index.md index e3a330e4c7..c255189881 100644 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-index.md +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-index.md @@ -1,4 +1,4 @@ -import { Client, Tables, } from "https://deno.land/x/appwrite/mod.ts"; +import { Client, Tables, IndexType } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,7 +11,7 @@ const response = await tables.createIndex( '<DATABASE_ID>', // databaseId '<TABLE_ID>', // tableId '', // key - .Key, // type + IndexType.Key, // type [], // columns [], // orders (optional) [] // lengths (optional) diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md index 8e2c5e6173..8c7e26e62c 100644 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md @@ -1,4 +1,4 @@ -import { Client, Tables, , } from "https://deno.land/x/appwrite/mod.ts"; +import { Client, Tables, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,9 +11,9 @@ const response = await tables.createRelationshipColumn( '<DATABASE_ID>', // databaseId '<TABLE_ID>', // tableId '<RELATED_TABLE_ID>', // relatedTableId - .OneToOne, // type + RelationshipType.OneToOne, // type false, // twoWay (optional) '', // key (optional) '', // twoWayKey (optional) - .Cascade // onDelete (optional) + RelationMutate.Cascade // onDelete (optional) ); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md index 99609c333e..c83b82037a 100644 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md @@ -1,4 +1,4 @@ -import { Client, Tables, } from "https://deno.land/x/appwrite/mod.ts"; +import { Client, Tables, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,6 +11,6 @@ const response = await tables.updateRelationshipColumn( '<DATABASE_ID>', // databaseId '<TABLE_ID>', // tableId '', // key - .Cascade, // onDelete (optional) + RelationMutate.Cascade, // onDelete (optional) '' // newKey (optional) ); diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md index e9480e1d29..4ea3817da2 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md @@ -14,7 +14,7 @@ ColumnIndex result = await tables.CreateIndex( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", - type: .Key, + type: IndexType.Key, columns: new List<string>(), orders: new List<string>(), // optional lengths: new List<long>() // optional diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md index 54eb396748..7c4cba49dd 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md @@ -14,9 +14,9 @@ ColumnRelationship result = await tables.CreateRelationshipColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", relatedTableId: "<RELATED_TABLE_ID>", - type: .OneToOne, + type: RelationshipType.OneToOne, twoWay: false, // optional key: "", // optional twoWayKey: "", // optional - onDelete: .Cascade // optional + onDelete: RelationMutate.Cascade // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md index 3437bb2fa9..be6aa31f73 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md @@ -14,6 +14,6 @@ ColumnRelationship result = await tables.UpdateRelationshipColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", - onDelete: .Cascade, // optional + onDelete: RelationMutate.Cascade, // optional newKey: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md index 3044529f03..2a4df003c0 100644 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md @@ -1,7 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Tables; -import io.appwrite.enums.Type; +import io.appwrite.enums.IndexType; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +14,7 @@ tables.createIndex( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key - .KEY, // type + IndexType.KEY, // type listOf(), // columns listOf(), // orders (optional) listOf(), // lengths (optional) diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md index ea23817aae..7a0b50a541 100644 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md @@ -1,7 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Tables; -import io.appwrite.enums.Type; +import io.appwrite.enums.RelationshipType; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,11 +14,11 @@ tables.createRelationshipColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<RELATED_TABLE_ID>", // relatedTableId - .ONETOONE, // type + RelationshipType.ONETOONE, // type false, // twoWay (optional) "", // key (optional) "", // twoWayKey (optional) - .CASCADE, // onDelete (optional) + RelationMutate.CASCADE, // onDelete (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md index 06c27cc60b..e0dc185e0e 100644 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md @@ -13,7 +13,7 @@ tables.updateRelationshipColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key - .CASCADE, // onDelete (optional) + RelationMutate.CASCADE, // onDelete (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md index 7ea1668841..053c88a93a 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md @@ -1,7 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Tables -import io.appwrite.enums.Type +import io.appwrite.enums.IndexType val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +14,7 @@ val response = tables.createIndex( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", key = "", - type = .KEY, + type = IndexType.KEY, columns = listOf(), orders = listOf(), // optional lengths = listOf() // optional diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md index ae3c87ee39..aa07fac6a8 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md @@ -1,7 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Tables -import io.appwrite.enums.Type +import io.appwrite.enums.RelationshipType val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +14,7 @@ val response = tables.createRelationshipColumn( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", relatedTableId = "<RELATED_TABLE_ID>", - type = .ONETOONE, + type = RelationshipType.ONETOONE, twoWay = false, // optional key = "", // optional twoWayKey = "", // optional diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md index 886a8c3935..aef047ba5f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md @@ -11,7 +11,7 @@ const result = await tables.createIndex( '<DATABASE_ID>', // databaseId '<TABLE_ID>', // tableId '', // key - sdk..Key, // type + sdk.IndexType.Key, // type [], // columns [], // orders (optional) [] // lengths (optional) diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md index 213b6d6923..b6e7fa517f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md @@ -11,9 +11,9 @@ const result = await tables.createRelationshipColumn( '<DATABASE_ID>', // databaseId '<TABLE_ID>', // tableId '<RELATED_TABLE_ID>', // relatedTableId - sdk..OneToOne, // type + sdk.RelationshipType.OneToOne, // type false, // twoWay (optional) '', // key (optional) '', // twoWayKey (optional) - sdk..Cascade // onDelete (optional) + sdk.RelationMutate.Cascade // onDelete (optional) ); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md index c30163f2c8..3409b8caad 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md @@ -11,6 +11,6 @@ const result = await tables.updateRelationshipColumn( '<DATABASE_ID>', // databaseId '<TABLE_ID>', // tableId '', // key - sdk..Cascade, // onDelete (optional) + sdk.RelationMutate.Cascade, // onDelete (optional) '' // newKey (optional) ); diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-index.md b/docs/examples/1.8.x/server-php/examples/tables/create-index.md index c21a162359..9844e041d4 100644 --- a/docs/examples/1.8.x/server-php/examples/tables/create-index.md +++ b/docs/examples/1.8.x/server-php/examples/tables/create-index.md @@ -2,7 +2,7 @@ use Appwrite\Client; use Appwrite\Services\Tables; -use Appwrite\Enums\; +use Appwrite\Enums\IndexType; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -15,7 +15,7 @@ $result = $tables->createIndex( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', - type: ::KEY(), + type: IndexType::KEY(), columns: [], orders: [], // optional lengths: [] // optional diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md index 9597dffdfe..c86b4c558a 100644 --- a/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md +++ b/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md @@ -2,7 +2,7 @@ use Appwrite\Client; use Appwrite\Services\Tables; -use Appwrite\Enums\; +use Appwrite\Enums\RelationshipType; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -15,9 +15,9 @@ $result = $tables->createRelationshipColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', relatedTableId: '<RELATED_TABLE_ID>', - type: ::ONETOONE(), + type: RelationshipType::ONETOONE(), twoWay: false, // optional key: '', // optional twoWayKey: '', // optional - onDelete: ::CASCADE() // optional + onDelete: RelationMutate::CASCADE() // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md index b29f8c86a8..d6505c77f1 100644 --- a/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md +++ b/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md @@ -14,6 +14,6 @@ $result = $tables->updateRelationshipColumn( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', key: '', - onDelete: ::CASCADE(), // optional + onDelete: RelationMutate::CASCADE(), // optional newKey: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-index.md b/docs/examples/1.8.x/server-python/examples/tables/create-index.md index 4015affc61..69086af0b0 100644 --- a/docs/examples/1.8.x/server-python/examples/tables/create-index.md +++ b/docs/examples/1.8.x/server-python/examples/tables/create-index.md @@ -1,6 +1,6 @@ from appwrite.client import Client from appwrite.services.tables import Tables -from appwrite.enums import +from appwrite.enums import IndexType client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,7 +13,7 @@ result = tables.create_index( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', - type = .KEY, + type = IndexType.KEY, columns = [], orders = [], # optional lengths = [] # optional diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md index 9f20be2203..187271f887 100644 --- a/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md +++ b/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md @@ -1,6 +1,6 @@ from appwrite.client import Client from appwrite.services.tables import Tables -from appwrite.enums import +from appwrite.enums import RelationshipType client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,9 +13,9 @@ result = tables.create_relationship_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', related_table_id = '<RELATED_TABLE_ID>', - type = .ONETOONE, + type = RelationshipType.ONETOONE, two_way = False, # optional key = '', # optional two_way_key = '', # optional - on_delete = .CASCADE # optional + on_delete = RelationMutate.CASCADE # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md index b237e67647..35a307c7e2 100644 --- a/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md +++ b/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md @@ -12,6 +12,6 @@ result = tables.update_relationship_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '', - on_delete = .CASCADE, # optional + on_delete = RelationMutate.CASCADE, # optional new_key = '' # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md index 1ec5d315dc..3c8dfdfb6b 100644 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md @@ -14,7 +14,7 @@ result = tables.create_index( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', - type: ::KEY, + type: IndexType::KEY, columns: [], orders: [], # optional lengths: [] # optional diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md index 65f4a15966..8f7fb841aa 100644 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md @@ -14,9 +14,9 @@ result = tables.create_relationship_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', related_table_id: '<RELATED_TABLE_ID>', - type: ::ONETOONE, + type: RelationshipType::ONETOONE, two_way: false, # optional key: '', # optional two_way_key: '', # optional - on_delete: ::CASCADE # optional + on_delete: RelationMutate::CASCADE # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md index 9d82801fe8..de86fd53d7 100644 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md @@ -13,6 +13,6 @@ result = tables.update_relationship_column( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', key: '', - on_delete: ::CASCADE, # optional + on_delete: RelationMutate::CASCADE, # optional new_key: '' # optional ) From b39325e23ec500a1394a0d765a7cf8055d02df73 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 16:54:45 +0530 Subject: [PATCH 206/362] add: scopes on migrations. --- src/Appwrite/Platform/Workers/Migrations.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index b59308c288..66f45004ea 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -246,8 +246,11 @@ class Migrations extends Action 'functions.write', 'databases.read', 'collections.read', + 'tables.read', 'documents.read', 'documents.write', + 'rows.read', + 'rows.write', 'tokens.read', 'tokens.write', ] From bce666e81b8fceb418a6a1a7e770f126368c388d Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 17:02:21 +0530 Subject: [PATCH 207/362] add: scopes on migrations and update tests. --- src/Appwrite/Platform/Workers/Migrations.php | 3 +++ tests/e2e/Services/Projects/ProjectsConsoleClientTest.php | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index b59308c288..66f45004ea 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -246,8 +246,11 @@ class Migrations extends Action 'functions.write', 'databases.read', 'collections.read', + 'tables.read', 'documents.read', 'documents.write', + 'rows.read', + 'rows.write', 'tokens.read', 'tokens.write', ] diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 8b34d552f5..5e22a28016 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -2991,7 +2991,7 @@ class ProjectsConsoleClientTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'name' => 'Key Test Update', - 'scopes' => ['users.read', 'users.write', 'collections.read'], + 'scopes' => ['users.read', 'users.write', 'collections.read', 'tables.read'], 'expire' => DateTime::addSeconds(new \DateTime(), 360), ]); @@ -3002,6 +3002,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertContains('users.read', $response['body']['scopes']); $this->assertContains('users.write', $response['body']['scopes']); $this->assertContains('collections.read', $response['body']['scopes']); + $this->assertContains('tables.read', $response['body']['scopes']); $this->assertCount(3, $response['body']['scopes']); $this->assertArrayHasKey('sdks', $response['body']); $this->assertEmpty($response['body']['sdks']); @@ -3020,6 +3021,7 @@ class ProjectsConsoleClientTest extends Scope $this->assertContains('users.read', $response['body']['scopes']); $this->assertContains('users.write', $response['body']['scopes']); $this->assertContains('collections.read', $response['body']['scopes']); + $this->assertContains('tables.read', $response['body']['scopes']); $this->assertCount(3, $response['body']['scopes']); $this->assertArrayHasKey('sdks', $response['body']); $this->assertEmpty($response['body']['sdks']); From 67e546faa8d0bb6f4443a25a3ce2c246344f9289 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 17:50:54 +0530 Subject: [PATCH 208/362] fix: namespace for table logs. --- .../Modules/Databases/Http/Databases/Tables/Logs/XList.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php index afe33597e2..d18cae9d6d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php @@ -30,9 +30,9 @@ class XList extends CollectionLogXList ->label('scope', 'tables.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( - namespace: 'databases', + namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), - name: self::getName(), + name: 'listLogs', // getName needs to be different from parent action to avoid conflict in path name description: '/docs/references/databases/get-collection-logs.md', auth: [AuthType::ADMIN], responses: [ From d44b43373a81c07b588ee0848e431fa2352ccfac Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 18:14:35 +0530 Subject: [PATCH 209/362] update: docs, misc. --- .../Modules/Databases/Http/Databases/Tables/Logs/XList.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php | 2 +- .../Modules/Databases/Http/Databases/Tables/Usage/Get.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php index d18cae9d6d..63c53cf2bd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php @@ -33,7 +33,7 @@ class XList extends CollectionLogXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: 'listLogs', // getName needs to be different from parent action to avoid conflict in path name - description: '/docs/references/databases/get-collection-logs.md', + description: '/docs/references/databases/get-table-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php index b0839c77c5..b279e96381 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php @@ -44,7 +44,7 @@ class XList extends DocumentLogXList contentType: ContentType::JSON, )) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('tableId', '', new UID(), 'Collection ID.') + ->param('tableId', '', new UID(), 'Table ID.') ->param('rowId', '', new UID(), 'Row ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php index c9968e05da..9f51a82734 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php @@ -49,7 +49,7 @@ class Get extends CollectionUsageGet )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) - ->param('tableId', '', new UID(), 'Collection ID.') + ->param('tableId', '', new UID(), 'Table ID.') ->inject('response') ->inject('dbForProject') ->callback($this->action(...)); From 562f5c2a1ebc268f2ce744580fdf3e006c6e0237 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 19:06:17 +0530 Subject: [PATCH 210/362] update: docs, misc. --- app/config/specs/open-api3-1.8.x-console.json | 12 ++++++------ app/config/specs/open-api3-latest-console.json | 12 ++++++------ app/config/specs/swagger2-1.8.x-console.json | 12 ++++++------ app/config/specs/swagger2-latest-console.json | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) 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 6f59879def..b6e1971407 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -13094,9 +13094,9 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "databasesListTableLogs", + "operationId": "tablesListLogs", "tags": [ - "databases" + "tables" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13112,13 +13112,13 @@ } }, "x-appwrite": { - "method": "listTableLogs", + "method": "listLogs", "group": "tables", "weight": 376, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-table-logs.md", + "demo": "tables\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", "rate-limit": 0, "rate-time": 3600, @@ -14179,7 +14179,7 @@ }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "schema": { "type": "string", @@ -14518,7 +14518,7 @@ }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "schema": { "type": "string", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 6f59879def..b6e1971407 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -13094,9 +13094,9 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "databasesListTableLogs", + "operationId": "tablesListLogs", "tags": [ - "databases" + "tables" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13112,13 +13112,13 @@ } }, "x-appwrite": { - "method": "listTableLogs", + "method": "listLogs", "group": "tables", "weight": 376, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-table-logs.md", + "demo": "tables\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", "rate-limit": 0, "rate-time": 3600, @@ -14179,7 +14179,7 @@ }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "schema": { "type": "string", @@ -14518,7 +14518,7 @@ }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "schema": { "type": "string", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 33fb8d7b78..85836ff2b8 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -13104,13 +13104,13 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "databasesListTableLogs", + "operationId": "tablesListLogs", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "databases" + "tables" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13122,13 +13122,13 @@ } }, "x-appwrite": { - "method": "listTableLogs", + "method": "listLogs", "group": "tables", "weight": 376, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-table-logs.md", + "demo": "tables\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", "rate-limit": 0, "rate-time": 3600, @@ -14152,7 +14152,7 @@ }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -14470,7 +14470,7 @@ }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "type": "string", "x-example": "<TABLE_ID>", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 33fb8d7b78..85836ff2b8 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -13104,13 +13104,13 @@ "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "databasesListTableLogs", + "operationId": "tablesListLogs", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "databases" + "tables" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13122,13 +13122,13 @@ } }, "x-appwrite": { - "method": "listTableLogs", + "method": "listLogs", "group": "tables", "weight": 376, "cookies": false, "type": "", "deprecated": false, - "demo": "databases\/list-table-logs.md", + "demo": "tables\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", "rate-limit": 0, "rate-time": 3600, @@ -14152,7 +14152,7 @@ }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "type": "string", "x-example": "<TABLE_ID>", @@ -14470,7 +14470,7 @@ }, { "name": "tableId", - "description": "Collection ID.", + "description": "Table ID.", "required": true, "type": "string", "x-example": "<TABLE_ID>", From eb201fe2ae7b9137df5d3818145be11e0599566d Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 19:07:26 +0530 Subject: [PATCH 211/362] update: examples. --- .../console-cli/examples/tables/list-logs.md | 4 ++++ .../console-web/examples/tables/list-logs.md | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-logs.md diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md b/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md new file mode 100644 index 0000000000..08c4ff0f8d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md @@ -0,0 +1,4 @@ +appwrite tables listLogs \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-logs.md b/docs/examples/1.8.x/console-web/examples/tables/list-logs.md new file mode 100644 index 0000000000..04d6c2300c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-logs.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listLogs( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); From 6118d5b46d8323e5c86cf0eeee01c4077e91dae4 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 19:10:40 +0530 Subject: [PATCH 212/362] remove: wrong examples. --- .../examples/databases/list-table-logs.md | 4 ---- .../examples/databases/list-table-logs.md | 15 --------------- 2 files changed, 19 deletions(-) delete mode 100644 docs/examples/1.8.x/console-cli/examples/databases/list-table-logs.md delete mode 100644 docs/examples/1.8.x/console-web/examples/databases/list-table-logs.md diff --git a/docs/examples/1.8.x/console-cli/examples/databases/list-table-logs.md b/docs/examples/1.8.x/console-cli/examples/databases/list-table-logs.md deleted file mode 100644 index 15bd1167cc..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/databases/list-table-logs.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite databases listTableLogs \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-web/examples/databases/list-table-logs.md b/docs/examples/1.8.x/console-web/examples/databases/list-table-logs.md deleted file mode 100644 index 1681fc917c..0000000000 --- a/docs/examples/1.8.x/console-web/examples/databases/list-table-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Databases } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const databases = new Databases(client); - -const result = await databases.listTableLogs( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); From 91d3b43d2e7e44745c448a492019d80607f9965c Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 25 Jun 2025 19:56:59 +0530 Subject: [PATCH 213/362] bump: dependencies. --- composer.lock | 86 +++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/composer.lock b/composer.lock index ff6884de7d..d5c2380af9 100644 --- a/composer.lock +++ b/composer.lock @@ -1113,16 +1113,16 @@ }, { "name": "open-telemetry/api", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/api.git", - "reference": "4e3bb38e069876fb73c2ce85c89583bf2b28cd86" + "reference": "b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/4e3bb38e069876fb73c2ce85c89583bf2b28cd86", - "reference": "4e3bb38e069876fb73c2ce85c89583bf2b28cd86", + "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7", + "reference": "b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7", "shasum": "" }, "require": { @@ -1142,7 +1142,7 @@ ] }, "branch-alias": { - "dev-main": "1.1.x-dev" + "dev-main": "1.4.x-dev" } }, "autoload": { @@ -1179,7 +1179,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-07T12:32:21+00:00" + "time": "2025-06-19T23:36:51+00:00" }, { "name": "open-telemetry/context", @@ -1242,16 +1242,16 @@ }, { "name": "open-telemetry/exporter-otlp", - "version": "1.3.1", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/exporter-otlp.git", - "reference": "8b3ca1f86d01429c73b407bf1a2075d9c187001e" + "reference": "196f3a1dbce3b2c0f8110d164232c11ac00ddbb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/8b3ca1f86d01429c73b407bf1a2075d9c187001e", - "reference": "8b3ca1f86d01429c73b407bf1a2075d9c187001e", + "url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/196f3a1dbce3b2c0f8110d164232c11ac00ddbb2", + "reference": "196f3a1dbce3b2c0f8110d164232c11ac00ddbb2", "shasum": "" }, "require": { @@ -1302,7 +1302,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-21T12:02:20+00:00" + "time": "2025-06-16T00:24:51+00:00" }, { "name": "open-telemetry/gen-otlp-protobuf", @@ -1369,22 +1369,22 @@ }, { "name": "open-telemetry/sdk", - "version": "1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sdk.git", - "reference": "cd0d7367599717fc29e04eb8838ec061e6c2c657" + "reference": "1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/cd0d7367599717fc29e04eb8838ec061e6c2c657", - "reference": "cd0d7367599717fc29e04eb8838ec061e6c2c657", + "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a", + "reference": "1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a", "shasum": "" }, "require": { "ext-json": "*", "nyholm/psr7-server": "^1.1", - "open-telemetry/api": "~1.0 || ~1.1", + "open-telemetry/api": "~1.4.0", "open-telemetry/context": "^1.0", "open-telemetry/sem-conv": "^1.0", "php": "^8.1", @@ -1407,6 +1407,10 @@ "type": "library", "extra": { "spi": { + "OpenTelemetry\\API\\Configuration\\ConfigEnv\\EnvComponentLoader": [ + "OpenTelemetry\\API\\Instrumentation\\Configuration\\General\\ConfigEnv\\EnvComponentLoaderHttpConfig", + "OpenTelemetry\\API\\Instrumentation\\Configuration\\General\\ConfigEnv\\EnvComponentLoaderPeerConfig" + ], "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\HookManagerInterface": [ "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\ExtensionHookManager" ] @@ -1455,7 +1459,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-22T02:33:34+00:00" + "time": "2025-06-19T23:36:51+00:00" }, { "name": "open-telemetry/sem-conv", @@ -1874,16 +1878,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.44", + "version": "3.0.45", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9" + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/1d0b5e7e1434678411787c5a0535e68907cf82d9", - "reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8", + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8", "shasum": "" }, "require": { @@ -1964,7 +1968,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.44" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.45" }, "funding": [ { @@ -1980,7 +1984,7 @@ "type": "tidelift" } ], - "time": "2025-06-15T09:59:26+00:00" + "time": "2025-06-22T22:54:43+00:00" }, { "name": "psr/container", @@ -3490,16 +3494,16 @@ }, { "name": "utopia-php/database", - "version": "0.71.6", + "version": "0.71.7", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "2bd87acc40af087fc0fdcccc47c43141dff0be5c" + "reference": "aa0116b2380125907fc18c82662be8e74c54091f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/2bd87acc40af087fc0fdcccc47c43141dff0be5c", - "reference": "2bd87acc40af087fc0fdcccc47c43141dff0be5c", + "url": "https://api.github.com/repos/utopia-php/database/zipball/aa0116b2380125907fc18c82662be8e74c54091f", + "reference": "aa0116b2380125907fc18c82662be8e74c54091f", "shasum": "" }, "require": { @@ -3540,9 +3544,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.71.6" + "source": "https://github.com/utopia-php/database/tree/0.71.7" }, - "time": "2025-06-16T16:48:37+00:00" + "time": "2025-06-17T23:59:10+00:00" }, { "name": "utopia-php/detector", @@ -4807,16 +4811,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.7", + "version": "0.41.8", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "d8c7bb26ea32ab378faf4e0dfa62fd15fe37c57b" + "reference": "93ffb24b25b376ca4423e3a5caf6f916673af4b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d8c7bb26ea32ab378faf4e0dfa62fd15fe37c57b", - "reference": "d8c7bb26ea32ab378faf4e0dfa62fd15fe37c57b", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/93ffb24b25b376ca4423e3a5caf6f916673af4b2", + "reference": "93ffb24b25b376ca4423e3a5caf6f916673af4b2", "shasum": "" }, "require": { @@ -4852,9 +4856,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.7" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.8" }, - "time": "2025-06-13T17:05:57+00:00" + "time": "2025-06-18T13:20:45+00:00" }, { "name": "doctrine/annotations", @@ -5147,16 +5151,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.74", + "version": "1.3.75", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "a2593286a4135d03c6a6a9e9aeded5d41e931ce4" + "reference": "76ba4a5f555fd7bf4aa408af608e991569076671" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/a2593286a4135d03c6a6a9e9aeded5d41e931ce4", - "reference": "a2593286a4135d03c6a6a9e9aeded5d41e931ce4", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/76ba4a5f555fd7bf4aa408af608e991569076671", + "reference": "76ba4a5f555fd7bf4aa408af608e991569076671", "shasum": "" }, "require": { @@ -5205,7 +5209,7 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.74" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.75" }, "funding": [ { @@ -5213,7 +5217,7 @@ "type": "github" } ], - "time": "2025-06-12T08:06:04+00:00" + "time": "2025-06-25T09:56:19+00:00" }, { "name": "matthiasmullie/path-converter", From c76fa53f55f885e0dd2617d23575b389b2ab8ac4 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 26 Jun 2025 21:13:12 +0530 Subject: [PATCH 214/362] updated the db version --- composer.lock | 109 ++++++++++++++++++++++++++------------------------ 1 file changed, 56 insertions(+), 53 deletions(-) diff --git a/composer.lock b/composer.lock index ff6884de7d..b63be420dc 100644 --- a/composer.lock +++ b/composer.lock @@ -1113,16 +1113,16 @@ }, { "name": "open-telemetry/api", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/api.git", - "reference": "4e3bb38e069876fb73c2ce85c89583bf2b28cd86" + "reference": "b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/4e3bb38e069876fb73c2ce85c89583bf2b28cd86", - "reference": "4e3bb38e069876fb73c2ce85c89583bf2b28cd86", + "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7", + "reference": "b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7", "shasum": "" }, "require": { @@ -1142,7 +1142,7 @@ ] }, "branch-alias": { - "dev-main": "1.1.x-dev" + "dev-main": "1.4.x-dev" } }, "autoload": { @@ -1179,7 +1179,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-07T12:32:21+00:00" + "time": "2025-06-19T23:36:51+00:00" }, { "name": "open-telemetry/context", @@ -1242,16 +1242,16 @@ }, { "name": "open-telemetry/exporter-otlp", - "version": "1.3.1", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/exporter-otlp.git", - "reference": "8b3ca1f86d01429c73b407bf1a2075d9c187001e" + "reference": "196f3a1dbce3b2c0f8110d164232c11ac00ddbb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/8b3ca1f86d01429c73b407bf1a2075d9c187001e", - "reference": "8b3ca1f86d01429c73b407bf1a2075d9c187001e", + "url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/196f3a1dbce3b2c0f8110d164232c11ac00ddbb2", + "reference": "196f3a1dbce3b2c0f8110d164232c11ac00ddbb2", "shasum": "" }, "require": { @@ -1302,7 +1302,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-21T12:02:20+00:00" + "time": "2025-06-16T00:24:51+00:00" }, { "name": "open-telemetry/gen-otlp-protobuf", @@ -1369,22 +1369,22 @@ }, { "name": "open-telemetry/sdk", - "version": "1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sdk.git", - "reference": "cd0d7367599717fc29e04eb8838ec061e6c2c657" + "reference": "1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/cd0d7367599717fc29e04eb8838ec061e6c2c657", - "reference": "cd0d7367599717fc29e04eb8838ec061e6c2c657", + "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a", + "reference": "1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a", "shasum": "" }, "require": { "ext-json": "*", "nyholm/psr7-server": "^1.1", - "open-telemetry/api": "~1.0 || ~1.1", + "open-telemetry/api": "~1.4.0", "open-telemetry/context": "^1.0", "open-telemetry/sem-conv": "^1.0", "php": "^8.1", @@ -1407,6 +1407,10 @@ "type": "library", "extra": { "spi": { + "OpenTelemetry\\API\\Configuration\\ConfigEnv\\EnvComponentLoader": [ + "OpenTelemetry\\API\\Instrumentation\\Configuration\\General\\ConfigEnv\\EnvComponentLoaderHttpConfig", + "OpenTelemetry\\API\\Instrumentation\\Configuration\\General\\ConfigEnv\\EnvComponentLoaderPeerConfig" + ], "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\HookManagerInterface": [ "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\ExtensionHookManager" ] @@ -1455,20 +1459,20 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-22T02:33:34+00:00" + "time": "2025-06-19T23:36:51+00:00" }, { "name": "open-telemetry/sem-conv", - "version": "1.32.0", + "version": "1.32.1", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sem-conv.git", - "reference": "16585cc0dbc3032a318e274043454679430d2ebf" + "reference": "94daa85ea61a8e2b7e1b0af6be0e875bedda7c22" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/16585cc0dbc3032a318e274043454679430d2ebf", - "reference": "16585cc0dbc3032a318e274043454679430d2ebf", + "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/94daa85ea61a8e2b7e1b0af6be0e875bedda7c22", + "reference": "94daa85ea61a8e2b7e1b0af6be0e875bedda7c22", "shasum": "" }, "require": { @@ -1512,7 +1516,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-05T03:58:53+00:00" + "time": "2025-06-24T02:32:27+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -1874,16 +1878,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.44", + "version": "3.0.45", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9" + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/1d0b5e7e1434678411787c5a0535e68907cf82d9", - "reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8", + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8", "shasum": "" }, "require": { @@ -1964,7 +1968,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.44" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.45" }, "funding": [ { @@ -1980,7 +1984,7 @@ "type": "tidelift" } ], - "time": "2025-06-15T09:59:26+00:00" + "time": "2025-06-22T22:54:43+00:00" }, { "name": "psr/container", @@ -2323,21 +2327,20 @@ }, { "name": "ramsey/uuid", - "version": "4.8.1", + "version": "4.9.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "fdf4dd4e2ff1813111bd0ad58d7a1ddbb5b56c28" + "reference": "4e0e23cc785f0724a0e838279a9eb03f28b092a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/fdf4dd4e2ff1813111bd0ad58d7a1ddbb5b56c28", - "reference": "fdf4dd4e2ff1813111bd0ad58d7a1ddbb5b56c28", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/4e0e23cc785f0724a0e838279a9eb03f28b092a0", + "reference": "4e0e23cc785f0724a0e838279a9eb03f28b092a0", "shasum": "" }, "require": { "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13", - "ext-json": "*", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" }, @@ -2396,9 +2399,9 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.8.1" + "source": "https://github.com/ramsey/uuid/tree/4.9.0" }, - "time": "2025-06-01T06:28:46+00:00" + "time": "2025-06-25T14:20:11+00:00" }, { "name": "spomky-labs/otphp", @@ -3490,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.71.6", + "version": "0.71.8", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "2bd87acc40af087fc0fdcccc47c43141dff0be5c" + "reference": "7dff6b67a54f1a7f9d3f210db4c6e40d7052b79e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/2bd87acc40af087fc0fdcccc47c43141dff0be5c", - "reference": "2bd87acc40af087fc0fdcccc47c43141dff0be5c", + "url": "https://api.github.com/repos/utopia-php/database/zipball/7dff6b67a54f1a7f9d3f210db4c6e40d7052b79e", + "reference": "7dff6b67a54f1a7f9d3f210db4c6e40d7052b79e", "shasum": "" }, "require": { @@ -3540,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.71.6" + "source": "https://github.com/utopia-php/database/tree/0.71.8" }, - "time": "2025-06-16T16:48:37+00:00" + "time": "2025-06-26T14:48:17+00:00" }, { "name": "utopia-php/detector", @@ -4807,16 +4810,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.7", + "version": "0.41.8", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "d8c7bb26ea32ab378faf4e0dfa62fd15fe37c57b" + "reference": "93ffb24b25b376ca4423e3a5caf6f916673af4b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d8c7bb26ea32ab378faf4e0dfa62fd15fe37c57b", - "reference": "d8c7bb26ea32ab378faf4e0dfa62fd15fe37c57b", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/93ffb24b25b376ca4423e3a5caf6f916673af4b2", + "reference": "93ffb24b25b376ca4423e3a5caf6f916673af4b2", "shasum": "" }, "require": { @@ -4852,9 +4855,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.7" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.8" }, - "time": "2025-06-13T17:05:57+00:00" + "time": "2025-06-18T13:20:45+00:00" }, { "name": "doctrine/annotations", @@ -5147,16 +5150,16 @@ }, { "name": "matthiasmullie/minify", - "version": "1.3.74", + "version": "1.3.75", "source": { "type": "git", "url": "https://github.com/matthiasmullie/minify.git", - "reference": "a2593286a4135d03c6a6a9e9aeded5d41e931ce4" + "reference": "76ba4a5f555fd7bf4aa408af608e991569076671" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/a2593286a4135d03c6a6a9e9aeded5d41e931ce4", - "reference": "a2593286a4135d03c6a6a9e9aeded5d41e931ce4", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/76ba4a5f555fd7bf4aa408af608e991569076671", + "reference": "76ba4a5f555fd7bf4aa408af608e991569076671", "shasum": "" }, "require": { @@ -5205,7 +5208,7 @@ ], "support": { "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.74" + "source": "https://github.com/matthiasmullie/minify/tree/1.3.75" }, "funding": [ { @@ -5213,7 +5216,7 @@ "type": "github" } ], - "time": "2025-06-12T08:06:04+00:00" + "time": "2025-06-25T09:56:19+00:00" }, { "name": "matthiasmullie/path-converter", From b36431d45ca5019039bbc8ecdfed6ac3eea5bc77 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 26 Jun 2025 21:26:25 +0530 Subject: [PATCH 215/362] empty commit From 0ea66121b1ca25eca31acb521aff386c4a44b2b8 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 1 Jul 2025 09:54:57 +0530 Subject: [PATCH 216/362] chore: add deprecated version --- app/config/specs/open-api3-1.8.x-client.json | 18 ++- app/config/specs/open-api3-1.8.x-console.json | 139 ++++++++++++------ app/config/specs/open-api3-1.8.x-server.json | 129 ++++++++++------ app/config/specs/swagger2-1.8.x-client.json | 18 ++- app/config/specs/swagger2-1.8.x-console.json | 139 ++++++++++++------ app/config/specs/swagger2-1.8.x-server.json | 129 ++++++++++------ .../Collections/Attributes/Boolean/Create.php | 1 + .../Collections/Attributes/Boolean/Update.php | 1 + .../Attributes/Datetime/Create.php | 1 + .../Attributes/Datetime/Update.php | 1 + .../Collections/Attributes/Delete.php | 1 + .../Collections/Attributes/Email/Create.php | 1 + .../Collections/Attributes/Email/Update.php | 1 + .../Collections/Attributes/Enum/Create.php | 1 + .../Collections/Attributes/Enum/Update.php | 1 + .../Collections/Attributes/Float/Create.php | 1 + .../Collections/Attributes/Float/Update.php | 1 + .../Databases/Collections/Attributes/Get.php | 1 + .../Collections/Attributes/IP/Create.php | 1 + .../Collections/Attributes/IP/Update.php | 1 + .../Collections/Attributes/Integer/Create.php | 1 + .../Collections/Attributes/Integer/Update.php | 1 + .../Attributes/Relationship/Create.php | 1 + .../Attributes/Relationship/Update.php | 1 + .../Collections/Attributes/String/Create.php | 1 + .../Collections/Attributes/String/Update.php | 1 + .../Collections/Attributes/URL/Create.php | 1 + .../Collections/Attributes/URL/Update.php | 1 + .../Collections/Attributes/XList.php | 1 + .../Http/Databases/Collections/Create.php | 1 + .../Http/Databases/Collections/Delete.php | 1 + .../Documents/Attribute/Decrement.php | 1 + .../Documents/Attribute/Increment.php | 1 + .../Collections/Documents/Bulk/Delete.php | 1 + .../Collections/Documents/Bulk/Update.php | 1 + .../Collections/Documents/Bulk/Upsert.php | 1 + .../Collections/Documents/Create.php | 1 + .../Collections/Documents/Delete.php | 1 + .../Databases/Collections/Documents/Get.php | 1 + .../Collections/Documents/Logs/XList.php | 4 + .../Collections/Documents/Update.php | 1 + .../Collections/Documents/Upsert.php | 1 + .../Databases/Collections/Documents/XList.php | 1 + .../Http/Databases/Collections/Get.php | 1 + .../Databases/Collections/Indexes/Create.php | 1 + .../Databases/Collections/Indexes/Delete.php | 1 + .../Databases/Collections/Indexes/Get.php | 1 + .../Databases/Collections/Indexes/XList.php | 1 + .../Http/Databases/Collections/Logs/XList.php | 1 + .../Http/Databases/Collections/Update.php | 1 + .../Http/Databases/Collections/Usage/Get.php | 1 + .../Http/Databases/Collections/XList.php | 1 + src/Appwrite/SDK/Method.php | 22 +-- .../SDK/Specification/Format/OpenAPI3.php | 11 +- .../SDK/Specification/Format/Swagger2.php | 11 +- 55 files changed, 442 insertions(+), 223 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 f45a5bc70e..10c6122ad5 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4365,6 +4365,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listRows", "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -4377,7 +4379,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listRows", "auth": { "Project": [] } @@ -4451,6 +4452,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createRow", "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -4463,7 +4466,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createRow", "methods": [ { "name": "createDocument", @@ -4617,6 +4619,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getRow", "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -4629,7 +4633,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getRow", "auth": { "Project": [] } @@ -4713,6 +4716,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.upsertRow", "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -4725,7 +4730,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.upsertRow", "methods": [ { "name": "upsertDocument", @@ -4842,6 +4846,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRow", "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -4854,7 +4860,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRow", "auth": { "Project": [] } @@ -4942,6 +4947,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteRow", "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -4954,7 +4961,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteRow", "auth": { "Project": [] } 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 9ecb607bd6..d4c99c3fba 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4966,6 +4966,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.list", "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4976,7 +4978,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listTables", "auth": { "Project": [] } @@ -5050,6 +5051,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.create", "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -5060,7 +5063,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createTable", "auth": { "Project": [] } @@ -5155,6 +5157,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.get", "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -5165,7 +5169,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getTable", "auth": { "Project": [] } @@ -5225,6 +5228,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.update", "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -5235,7 +5240,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateTable", "auth": { "Project": [] } @@ -5325,6 +5329,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.delete", "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -5335,7 +5341,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteTable", "auth": { "Project": [] } @@ -5397,6 +5402,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listColumns", "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5407,7 +5414,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listColumns", "auth": { "Project": [] } @@ -5482,6 +5488,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createBooleanColumn", "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5492,7 +5500,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createBooleanColumn", "auth": { "Project": [] } @@ -5589,6 +5596,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateBooleanColumn", "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5599,7 +5608,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateBooleanColumn", "auth": { "Project": [] } @@ -5701,6 +5709,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createDatetimeColumn", "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5711,7 +5721,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createDatetimeColumn", "auth": { "Project": [] } @@ -5808,6 +5817,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn", "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5818,7 +5829,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateDatetimeColumn", "auth": { "Project": [] } @@ -5920,6 +5930,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createEmailColumn", "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5930,7 +5942,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createEmailColumn", "auth": { "Project": [] } @@ -6027,6 +6038,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateEmailColumn", "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -6037,7 +6050,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateEmailColumn", "auth": { "Project": [] } @@ -6139,6 +6151,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createEnumColumn", "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -6149,7 +6163,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createEnumColumn", "auth": { "Project": [] } @@ -6255,6 +6268,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateEnumColumn", "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -6265,7 +6280,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateEnumColumn", "auth": { "Project": [] } @@ -6376,6 +6390,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createFloatColumn", "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -6386,7 +6402,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createFloatColumn", "auth": { "Project": [] } @@ -6493,6 +6508,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateFloatColumn", "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6503,7 +6520,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateFloatColumn", "auth": { "Project": [] } @@ -6615,6 +6631,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createIntegerColumn", "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6625,7 +6643,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createIntegerColumn", "auth": { "Project": [] } @@ -6732,6 +6749,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateIntegerColumn", "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6742,7 +6761,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateIntegerColumn", "auth": { "Project": [] } @@ -6854,6 +6872,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createIpColumn", "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6864,7 +6884,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createIpColumn", "auth": { "Project": [] } @@ -6961,6 +6980,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateIpColumn", "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6971,7 +6992,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateIpColumn", "auth": { "Project": [] } @@ -7073,6 +7093,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createRelationshipColumn", "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -7083,7 +7105,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createRelationshipColumn", "auth": { "Project": [] } @@ -7205,6 +7226,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createStringColumn", "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -7215,7 +7238,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createStringColumn", "auth": { "Project": [] } @@ -7323,6 +7345,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateStringColumn", "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -7333,7 +7357,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateStringColumn", "auth": { "Project": [] } @@ -7440,6 +7463,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createUrlColumn", "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7450,7 +7475,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createUrlColumn", "auth": { "Project": [] } @@ -7547,6 +7571,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateUrlColumn", "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7557,7 +7583,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateUrlColumn", "auth": { "Project": [] } @@ -7690,6 +7715,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getColumn", "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7700,7 +7727,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getColumn", "auth": { "Project": [] } @@ -7762,6 +7788,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteColumn", "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7772,7 +7800,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteColumn", "auth": { "Project": [] } @@ -7843,6 +7870,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn", "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7853,7 +7882,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRelationshipColumn", "auth": { "Project": [] } @@ -7952,6 +7980,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listRows", "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7964,7 +7994,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listRows", "auth": { "Project": [] } @@ -8038,6 +8067,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createRow", "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -8050,7 +8081,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createRow", "methods": [ { "name": "createDocument", @@ -8202,6 +8232,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.upsertRows", "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -8213,7 +8245,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.upsertRows", "methods": [ { "name": "upsertDocuments", @@ -8313,6 +8344,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRows", "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -8324,7 +8357,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRows", "auth": { "Project": [] } @@ -8408,6 +8440,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteRows", "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8419,7 +8453,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteRows", "auth": { "Project": [] } @@ -8500,6 +8533,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getRow", "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8512,7 +8547,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getRow", "auth": { "Project": [] } @@ -8596,6 +8630,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.upsertRow", "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8608,7 +8644,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.upsertRow", "methods": [ { "name": "upsertDocument", @@ -8725,6 +8760,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRow", "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8737,7 +8774,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRow", "auth": { "Project": [] } @@ -8825,6 +8861,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteRow", "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8837,7 +8875,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteRow", "auth": { "Project": [] } @@ -8909,7 +8946,9 @@ "weight": 341, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listLogs", "demo": "databases\/list-document-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", "rate-limit": 0, @@ -9003,6 +9042,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.decrementColumn", "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -9014,7 +9055,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.decrementColumn", "auth": { "Project": [] } @@ -9116,6 +9156,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.incrementColumn", "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -9127,7 +9169,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.incrementColumn", "auth": { "Project": [] } @@ -9229,6 +9270,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listColumnIndexes", "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -9239,7 +9282,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listColumnIndexes", "auth": { "Project": [] } @@ -9312,6 +9354,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createColumnIndex", "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -9322,7 +9366,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createColumnIndex", "auth": { "Project": [] } @@ -9441,6 +9484,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getColumnIndex", "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -9451,7 +9496,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getColumnIndex", "auth": { "Project": [] } @@ -9513,6 +9557,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteColumnIndex", "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9523,7 +9569,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteColumnIndex", "auth": { "Project": [] } @@ -9594,6 +9639,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listTableLogs", "demo": "databases\/list-collection-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", "rate-limit": 0, @@ -9604,7 +9651,6 @@ "console" ], "packaging": false, - "replaceWith": "tables.listTableLogs", "auth": { "Project": [] } @@ -9678,6 +9724,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getTableUsage", "demo": "databases\/get-collection-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, @@ -9688,7 +9736,6 @@ "console" ], "packaging": false, - "replaceWith": "tables.getTableUsage", "auth": { "Project": [] } 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 6a4cefcaf9..8e4252cd4b 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4417,6 +4417,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.list", "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4427,7 +4429,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listTables", "auth": { "Project": [], "Key": [] @@ -4502,6 +4503,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.create", "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -4512,7 +4515,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createTable", "auth": { "Project": [], "Key": [] @@ -4608,6 +4610,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.get", "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -4618,7 +4622,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getTable", "auth": { "Project": [], "Key": [] @@ -4679,6 +4682,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.update", "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -4689,7 +4694,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateTable", "auth": { "Project": [], "Key": [] @@ -4780,6 +4784,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.delete", "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -4790,7 +4796,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteTable", "auth": { "Project": [], "Key": [] @@ -4853,6 +4858,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listColumns", "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -4863,7 +4870,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listColumns", "auth": { "Project": [], "Key": [] @@ -4939,6 +4945,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createBooleanColumn", "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -4949,7 +4957,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createBooleanColumn", "auth": { "Project": [], "Key": [] @@ -5047,6 +5054,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateBooleanColumn", "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5057,7 +5066,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateBooleanColumn", "auth": { "Project": [], "Key": [] @@ -5160,6 +5168,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createDatetimeColumn", "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5170,7 +5180,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createDatetimeColumn", "auth": { "Project": [], "Key": [] @@ -5268,6 +5277,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn", "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5278,7 +5289,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateDatetimeColumn", "auth": { "Project": [], "Key": [] @@ -5381,6 +5391,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createEmailColumn", "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5391,7 +5403,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createEmailColumn", "auth": { "Project": [], "Key": [] @@ -5489,6 +5500,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateEmailColumn", "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -5499,7 +5512,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateEmailColumn", "auth": { "Project": [], "Key": [] @@ -5602,6 +5614,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createEnumColumn", "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -5612,7 +5626,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createEnumColumn", "auth": { "Project": [], "Key": [] @@ -5719,6 +5732,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateEnumColumn", "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -5729,7 +5744,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateEnumColumn", "auth": { "Project": [], "Key": [] @@ -5841,6 +5855,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createFloatColumn", "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -5851,7 +5867,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createFloatColumn", "auth": { "Project": [], "Key": [] @@ -5959,6 +5974,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateFloatColumn", "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -5969,7 +5986,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateFloatColumn", "auth": { "Project": [], "Key": [] @@ -6082,6 +6098,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createIntegerColumn", "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6092,7 +6110,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createIntegerColumn", "auth": { "Project": [], "Key": [] @@ -6200,6 +6217,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateIntegerColumn", "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6210,7 +6229,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateIntegerColumn", "auth": { "Project": [], "Key": [] @@ -6323,6 +6341,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createIpColumn", "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6333,7 +6353,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createIpColumn", "auth": { "Project": [], "Key": [] @@ -6431,6 +6450,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateIpColumn", "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6441,7 +6462,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateIpColumn", "auth": { "Project": [], "Key": [] @@ -6544,6 +6564,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createRelationshipColumn", "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -6554,7 +6576,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createRelationshipColumn", "auth": { "Project": [], "Key": [] @@ -6677,6 +6698,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createStringColumn", "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -6687,7 +6710,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createStringColumn", "auth": { "Project": [], "Key": [] @@ -6796,6 +6818,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateStringColumn", "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -6806,7 +6830,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateStringColumn", "auth": { "Project": [], "Key": [] @@ -6914,6 +6937,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createUrlColumn", "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -6924,7 +6949,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createUrlColumn", "auth": { "Project": [], "Key": [] @@ -7022,6 +7046,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateUrlColumn", "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7032,7 +7058,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateUrlColumn", "auth": { "Project": [], "Key": [] @@ -7166,6 +7191,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getColumn", "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7176,7 +7203,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getColumn", "auth": { "Project": [], "Key": [] @@ -7239,6 +7265,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteColumn", "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7249,7 +7277,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteColumn", "auth": { "Project": [], "Key": [] @@ -7321,6 +7348,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn", "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7331,7 +7360,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRelationshipColumn", "auth": { "Project": [], "Key": [] @@ -7431,6 +7459,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listRows", "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7443,7 +7473,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listRows", "auth": { "Project": [], "Session": [] @@ -7519,6 +7548,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createRow", "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -7531,7 +7562,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createRow", "methods": [ { "name": "createDocument", @@ -7685,6 +7715,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.upsertRows", "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -7696,7 +7728,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.upsertRows", "methods": [ { "name": "upsertDocuments", @@ -7797,6 +7828,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRows", "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -7808,7 +7841,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRows", "auth": { "Project": [], "Key": [] @@ -7893,6 +7925,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteRows", "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -7904,7 +7938,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteRows", "auth": { "Project": [], "Key": [] @@ -7986,6 +8019,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getRow", "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -7998,7 +8033,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getRow", "auth": { "Project": [], "Session": [] @@ -8084,6 +8118,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.upsertRow", "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8096,7 +8132,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.upsertRow", "methods": [ { "name": "upsertDocument", @@ -8215,6 +8250,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRow", "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8227,7 +8264,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRow", "auth": { "Project": [], "Session": [] @@ -8317,6 +8353,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteRow", "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8329,7 +8367,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteRow", "auth": { "Project": [], "Session": [] @@ -8404,6 +8441,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.decrementColumn", "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -8415,7 +8454,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.decrementColumn", "auth": { "Project": [], "Key": [] @@ -8518,6 +8556,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.incrementColumn", "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -8529,7 +8569,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.incrementColumn", "auth": { "Project": [], "Key": [] @@ -8632,6 +8671,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listColumnIndexes", "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -8642,7 +8683,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listColumnIndexes", "auth": { "Project": [], "Key": [] @@ -8716,6 +8756,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createColumnIndex", "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -8726,7 +8768,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createColumnIndex", "auth": { "Project": [], "Key": [] @@ -8846,6 +8887,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getColumnIndex", "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -8856,7 +8899,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getColumnIndex", "auth": { "Project": [], "Key": [] @@ -8919,6 +8961,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteColumnIndex", "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -8929,7 +8973,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteColumnIndex", "auth": { "Project": [], "Key": [] diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 445f8b5385..07bd5c818f 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -4514,6 +4514,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listRows", "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -4526,7 +4528,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listRows", "auth": { "Project": [] } @@ -4597,6 +4598,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createRow", "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -4609,7 +4612,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createRow", "methods": [ { "name": "createDocument", @@ -4761,6 +4763,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getRow", "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -4773,7 +4777,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getRow", "auth": { "Project": [] } @@ -4852,6 +4855,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.upsertRow", "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -4864,7 +4869,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.upsertRow", "methods": [ { "name": "upsertDocument", @@ -4977,6 +4981,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRow", "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -4989,7 +4995,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRow", "auth": { "Project": [] } @@ -5075,6 +5080,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteRow", "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -5087,7 +5094,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteRow", "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 8bca9a6c0f..bc396ac977 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -5133,6 +5133,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.list", "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -5143,7 +5145,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listTables", "auth": { "Project": [] } @@ -5214,6 +5215,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.create", "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -5224,7 +5227,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createTable", "auth": { "Project": [] } @@ -5320,6 +5322,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.get", "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -5330,7 +5334,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getTable", "auth": { "Project": [] } @@ -5388,6 +5391,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.update", "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -5398,7 +5403,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateTable", "auth": { "Project": [] } @@ -5490,6 +5494,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.delete", "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -5500,7 +5506,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteTable", "auth": { "Project": [] } @@ -5558,6 +5563,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listColumns", "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5568,7 +5575,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listColumns", "auth": { "Project": [] } @@ -5640,6 +5646,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createBooleanColumn", "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5650,7 +5658,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createBooleanColumn", "auth": { "Project": [] } @@ -5747,6 +5754,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateBooleanColumn", "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5757,7 +5766,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateBooleanColumn", "auth": { "Project": [] } @@ -5856,6 +5864,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createDatetimeColumn", "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5866,7 +5876,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createDatetimeColumn", "auth": { "Project": [] } @@ -5963,6 +5972,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn", "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5973,7 +5984,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateDatetimeColumn", "auth": { "Project": [] } @@ -6072,6 +6082,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createEmailColumn", "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -6082,7 +6094,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createEmailColumn", "auth": { "Project": [] } @@ -6179,6 +6190,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateEmailColumn", "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -6189,7 +6202,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateEmailColumn", "auth": { "Project": [] } @@ -6288,6 +6300,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createEnumColumn", "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -6298,7 +6312,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createEnumColumn", "auth": { "Project": [] } @@ -6405,6 +6418,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateEnumColumn", "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -6415,7 +6430,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateEnumColumn", "auth": { "Project": [] } @@ -6524,6 +6538,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createFloatColumn", "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -6534,7 +6550,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createFloatColumn", "auth": { "Project": [] } @@ -6643,6 +6658,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateFloatColumn", "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6653,7 +6670,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateFloatColumn", "auth": { "Project": [] } @@ -6764,6 +6780,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createIntegerColumn", "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6774,7 +6792,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createIntegerColumn", "auth": { "Project": [] } @@ -6883,6 +6900,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateIntegerColumn", "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6893,7 +6912,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateIntegerColumn", "auth": { "Project": [] } @@ -7004,6 +7022,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createIpColumn", "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -7014,7 +7034,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createIpColumn", "auth": { "Project": [] } @@ -7111,6 +7130,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateIpColumn", "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -7121,7 +7142,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateIpColumn", "auth": { "Project": [] } @@ -7220,6 +7240,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createRelationshipColumn", "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -7230,7 +7252,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createRelationshipColumn", "auth": { "Project": [] } @@ -7354,6 +7375,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createStringColumn", "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -7364,7 +7387,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createStringColumn", "auth": { "Project": [] } @@ -7474,6 +7496,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateStringColumn", "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -7484,7 +7508,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateStringColumn", "auth": { "Project": [] } @@ -7589,6 +7612,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createUrlColumn", "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7599,7 +7624,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createUrlColumn", "auth": { "Project": [] } @@ -7696,6 +7720,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateUrlColumn", "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7706,7 +7732,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateUrlColumn", "auth": { "Project": [] } @@ -7834,6 +7859,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getColumn", "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7844,7 +7871,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getColumn", "auth": { "Project": [] } @@ -7904,6 +7930,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteColumn", "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7914,7 +7942,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteColumn", "auth": { "Project": [] } @@ -7981,6 +8008,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn", "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7991,7 +8020,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRelationshipColumn", "auth": { "Project": [] } @@ -8084,6 +8112,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listRows", "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -8096,7 +8126,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listRows", "auth": { "Project": [] } @@ -8167,6 +8196,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createRow", "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -8179,7 +8210,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createRow", "methods": [ { "name": "createDocument", @@ -8331,6 +8361,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.upsertRows", "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -8342,7 +8374,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.upsertRows", "methods": [ { "name": "upsertDocuments", @@ -8439,6 +8470,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRows", "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -8450,7 +8483,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRows", "auth": { "Project": [] } @@ -8532,6 +8564,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteRows", "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8543,7 +8577,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteRows", "auth": { "Project": [] } @@ -8619,6 +8652,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getRow", "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8631,7 +8666,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getRow", "auth": { "Project": [] } @@ -8710,6 +8744,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.upsertRow", "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8722,7 +8758,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.upsertRow", "methods": [ { "name": "upsertDocument", @@ -8835,6 +8870,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRow", "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8847,7 +8884,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRow", "auth": { "Project": [] } @@ -8933,6 +8969,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteRow", "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8945,7 +8983,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteRow", "auth": { "Project": [] } @@ -9011,7 +9048,9 @@ "weight": 341, "cookies": false, "type": "", - "deprecated": false, + "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listLogs", "demo": "databases\/list-document-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", "rate-limit": 0, @@ -9100,6 +9139,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.decrementColumn", "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -9111,7 +9152,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.decrementColumn", "auth": { "Project": [] } @@ -9207,6 +9247,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.incrementColumn", "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -9218,7 +9260,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.incrementColumn", "auth": { "Project": [] } @@ -9312,6 +9353,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listColumnIndexes", "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -9322,7 +9365,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listColumnIndexes", "auth": { "Project": [] } @@ -9392,6 +9434,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createColumnIndex", "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -9402,7 +9446,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createColumnIndex", "auth": { "Project": [] } @@ -9520,6 +9563,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getColumnIndex", "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -9530,7 +9575,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getColumnIndex", "auth": { "Project": [] } @@ -9590,6 +9634,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteColumnIndex", "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9600,7 +9646,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteColumnIndex", "auth": { "Project": [] } @@ -9665,6 +9710,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listTableLogs", "demo": "databases\/list-collection-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", "rate-limit": 0, @@ -9675,7 +9722,6 @@ "console" ], "packaging": false, - "replaceWith": "tables.listTableLogs", "auth": { "Project": [] } @@ -9744,6 +9790,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getTableUsage", "demo": "databases\/get-collection-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, @@ -9754,7 +9802,6 @@ "console" ], "packaging": false, - "replaceWith": "tables.getTableUsage", "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index a2d7cb03d7..ff4042e39d 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -4574,6 +4574,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.list", "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4584,7 +4586,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listTables", "auth": { "Project": [], "Key": [] @@ -4656,6 +4657,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.create", "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -4666,7 +4669,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createTable", "auth": { "Project": [], "Key": [] @@ -4763,6 +4765,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.get", "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -4773,7 +4777,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getTable", "auth": { "Project": [], "Key": [] @@ -4832,6 +4835,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.update", "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -4842,7 +4847,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateTable", "auth": { "Project": [], "Key": [] @@ -4935,6 +4939,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.delete", "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -4945,7 +4951,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteTable", "auth": { "Project": [], "Key": [] @@ -5004,6 +5009,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listColumns", "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5014,7 +5021,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listColumns", "auth": { "Project": [], "Key": [] @@ -5087,6 +5093,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createBooleanColumn", "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5097,7 +5105,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createBooleanColumn", "auth": { "Project": [], "Key": [] @@ -5195,6 +5202,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateBooleanColumn", "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5205,7 +5214,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateBooleanColumn", "auth": { "Project": [], "Key": [] @@ -5305,6 +5313,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createDatetimeColumn", "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5315,7 +5325,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createDatetimeColumn", "auth": { "Project": [], "Key": [] @@ -5413,6 +5422,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn", "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5423,7 +5434,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateDatetimeColumn", "auth": { "Project": [], "Key": [] @@ -5523,6 +5533,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createEmailColumn", "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5533,7 +5545,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createEmailColumn", "auth": { "Project": [], "Key": [] @@ -5631,6 +5642,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateEmailColumn", "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -5641,7 +5654,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateEmailColumn", "auth": { "Project": [], "Key": [] @@ -5741,6 +5753,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createEnumColumn", "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -5751,7 +5765,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createEnumColumn", "auth": { "Project": [], "Key": [] @@ -5859,6 +5872,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateEnumColumn", "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -5869,7 +5884,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateEnumColumn", "auth": { "Project": [], "Key": [] @@ -5979,6 +5993,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createFloatColumn", "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -5989,7 +6005,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createFloatColumn", "auth": { "Project": [], "Key": [] @@ -6099,6 +6114,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateFloatColumn", "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6109,7 +6126,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateFloatColumn", "auth": { "Project": [], "Key": [] @@ -6221,6 +6237,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createIntegerColumn", "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6231,7 +6249,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createIntegerColumn", "auth": { "Project": [], "Key": [] @@ -6341,6 +6358,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateIntegerColumn", "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6351,7 +6370,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateIntegerColumn", "auth": { "Project": [], "Key": [] @@ -6463,6 +6481,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createIpColumn", "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6473,7 +6493,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createIpColumn", "auth": { "Project": [], "Key": [] @@ -6571,6 +6590,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateIpColumn", "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6581,7 +6602,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateIpColumn", "auth": { "Project": [], "Key": [] @@ -6681,6 +6701,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createRelationshipColumn", "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -6691,7 +6713,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createRelationshipColumn", "auth": { "Project": [], "Key": [] @@ -6816,6 +6837,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createStringColumn", "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -6826,7 +6849,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createStringColumn", "auth": { "Project": [], "Key": [] @@ -6937,6 +6959,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateStringColumn", "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -6947,7 +6971,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateStringColumn", "auth": { "Project": [], "Key": [] @@ -7053,6 +7076,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createUrlColumn", "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7063,7 +7088,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createUrlColumn", "auth": { "Project": [], "Key": [] @@ -7161,6 +7185,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateUrlColumn", "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7171,7 +7197,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateUrlColumn", "auth": { "Project": [], "Key": [] @@ -7300,6 +7325,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getColumn", "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7310,7 +7337,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getColumn", "auth": { "Project": [], "Key": [] @@ -7371,6 +7397,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteColumn", "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7381,7 +7409,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteColumn", "auth": { "Project": [], "Key": [] @@ -7449,6 +7476,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn", "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7459,7 +7488,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRelationshipColumn", "auth": { "Project": [], "Key": [] @@ -7553,6 +7581,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listRows", "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7565,7 +7595,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listRows", "auth": { "Project": [], "Session": [] @@ -7638,6 +7667,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createRow", "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -7650,7 +7681,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createRow", "methods": [ { "name": "createDocument", @@ -7804,6 +7834,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.upsertRows", "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -7815,7 +7847,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.upsertRows", "methods": [ { "name": "upsertDocuments", @@ -7913,6 +7944,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRows", "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -7924,7 +7957,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRows", "auth": { "Project": [], "Key": [] @@ -8007,6 +8039,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteRows", "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8018,7 +8052,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteRows", "auth": { "Project": [], "Key": [] @@ -8095,6 +8128,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getRow", "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8107,7 +8142,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getRow", "auth": { "Project": [], "Session": [] @@ -8188,6 +8222,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.upsertRow", "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8200,7 +8236,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.upsertRow", "methods": [ { "name": "upsertDocument", @@ -8315,6 +8350,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.updateRow", "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8327,7 +8364,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.updateRow", "auth": { "Project": [], "Session": [] @@ -8415,6 +8451,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteRow", "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8427,7 +8465,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteRow", "auth": { "Project": [], "Session": [] @@ -8498,6 +8535,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.decrementColumn", "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -8509,7 +8548,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.decrementColumn", "auth": { "Project": [], "Key": [] @@ -8606,6 +8644,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.incrementColumn", "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -8617,7 +8657,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.incrementColumn", "auth": { "Project": [], "Key": [] @@ -8712,6 +8751,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.listColumnIndexes", "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -8722,7 +8763,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.listColumnIndexes", "auth": { "Project": [], "Key": [] @@ -8793,6 +8833,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.createColumnIndex", "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -8803,7 +8845,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.createColumnIndex", "auth": { "Project": [], "Key": [] @@ -8922,6 +8963,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.getColumnIndex", "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -8932,7 +8975,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.getColumnIndex", "auth": { "Project": [], "Key": [] @@ -8993,6 +9035,8 @@ "cookies": false, "type": "", "deprecated": true, + "deprecatedVersion": "1.8.0", + "replaceWith": "tables.deleteColumnIndex", "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9003,7 +9047,6 @@ "server" ], "packaging": false, - "replaceWith": "tables.deleteColumnIndex", "auth": { "Project": [], "Key": [] diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php index 367442a52e..f6322a8a67 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php @@ -54,6 +54,7 @@ class Create extends Action ], deprecated: [ 'replaceWith' => 'tables.createBooleanColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php index 75683241fc..dc766d1001 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php @@ -55,6 +55,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.updateBooleanColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php index 0982ec1d26..48b3970147 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php @@ -55,6 +55,7 @@ class Create extends Action ], deprecated: [ 'replaceWith' => 'tables.createDatetimeColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php index a1a53e8ae1..87d91b8feb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php @@ -56,6 +56,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.updateDatetimeColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 1a37452995..8290e65692 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -56,6 +56,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: [ 'replaceWith' => 'tables.deleteColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php index 288aa82acb..5de30e7389 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php @@ -55,6 +55,7 @@ class Create extends Action ], deprecated: [ 'replaceWith' => 'tables.createEmailColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php index 88b4329621..4e6d2fc015 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php @@ -56,6 +56,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.updateEmailColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index 0ca18aa4c4..d2aa375574 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -57,6 +57,7 @@ class Create extends Action ], deprecated: [ 'replaceWith' => 'tables.createEnumColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php index ac20825eae..2d8d181d82 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php @@ -57,6 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.updateEnumColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php index 0f2237d468..9ede351b20 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php @@ -57,6 +57,7 @@ class Create extends Action ], deprecated: [ 'replaceWith' => 'tables.createFloatColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php index 40c1676d69..84122b93be 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php @@ -56,6 +56,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.updateFloatColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index d41b03f22b..8e4e0842e1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -59,6 +59,7 @@ class Get extends Action ], deprecated: [ 'replaceWith' => 'tables.getColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php index 8cf2c5b14d..3eff6defa6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php @@ -55,6 +55,7 @@ class Create extends Action ], deprecated: [ 'replaceWith' => 'tables.createIpColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php index 427e8fad6f..7aee4c9d92 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php @@ -56,6 +56,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.updateIpColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php index c4a66d99b7..6c94ca8644 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php @@ -57,6 +57,7 @@ class Create extends Action ], deprecated: [ 'replaceWith' => 'tables.createIntegerColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php index 962bb5f6d6..258f4bd25e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php @@ -56,6 +56,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.updateIntegerColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php index 2e47e9e8b2..b300c7d04c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php @@ -57,6 +57,7 @@ class Create extends Action ], deprecated: [ 'replaceWith' => 'tables.createRelationshipColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php index 4e22fb5687..4bfb3b58d9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php @@ -54,6 +54,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.updateRelationshipColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index 1ce1f51972..16aa7d1a7c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -58,6 +58,7 @@ class Create extends Action ], deprecated: [ 'replaceWith' => 'tables.createStringColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php index 36652b44f2..85519cb216 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php @@ -58,6 +58,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.updateStringColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php index ecaa0deffa..d88ffff2e2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php @@ -55,6 +55,7 @@ class Create extends Action ], deprecated: [ 'replaceWith' => 'tables.createUrlColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php index 76212364f1..c9add5e099 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php @@ -56,6 +56,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.updateUrlColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index c9a446ae78..71a0fe2853 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -53,6 +53,7 @@ class XList extends Action ], deprecated: [ 'replaceWith' => 'tables.listColumns', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') 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 9d3b56f5f1..5e159e19c1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -64,6 +64,7 @@ class Create extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.create', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php index 4cf7b3854c..99320a0c8e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php @@ -54,6 +54,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: [ 'replaceWith' => 'tables.delete', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php index 08af647b47..57c327d9ff 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php @@ -64,6 +64,7 @@ class Decrement extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.decrementColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php index a77da9b2c4..64792cc1d5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php @@ -64,6 +64,7 @@ class Increment extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.incrementColumn', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index 83df3caf32..e37593e887 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -62,6 +62,7 @@ class Delete extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.deleteRows', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index 2e305330e7..22ad7a45ad 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -65,6 +65,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.updateRows', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index d884015007..b2c5814c4c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -63,6 +63,7 @@ class Upsert extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.upsertRows', + 'version' => '1.8.0', ], ) ]) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index d96c0b6e27..84354bc103 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -83,6 +83,7 @@ class Create extends Action ], deprecated: [ 'replaceWith' => 'tables.createRow', + 'version' => '1.8.0', ], ), new Method( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index 7be6c3e5aa..c5c4344466 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -64,6 +64,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: [ 'replaceWith' => 'tables.deleteRow', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index f0b6c11a0e..12462c121e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -55,6 +55,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.getRow', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index 3fe25b9441..c614d7bab0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -59,6 +59,10 @@ class XList extends Action ) ], contentType: ContentType::JSON, + deprecated: [ + 'replaceWith' => 'tables.listLogs', + 'version' => '1.8.0', + ], )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 0ea75359fb..6f7feb3983 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -68,6 +68,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.updateRow', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index 608dd04f25..f7432c19cc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -70,6 +70,7 @@ class Upsert extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.upsertRow', + 'version' => '1.8.0', ], ), ]) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 219420037f..d95e013c0d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -58,6 +58,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.listRows', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php index ed54aa6bf9..4e5b6f7ab8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php @@ -49,6 +49,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.get', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') 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 8e8daed75f..48633de2f8 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 @@ -64,6 +64,7 @@ class Create extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.createColumnIndex', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index 8f5475f7a7..3fee780733 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -59,6 +59,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: [ 'replaceWith' => 'tables.deleteColumnIndex', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index 82379265a5..01d17366f4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -50,6 +50,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.getColumnIndex', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index 791493ff0a..2183266ec9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -55,6 +55,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.listColumnIndexes', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 2cabce49ae..9d59e02092 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -61,6 +61,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.listTableLogs', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index 69e04574ad..c8f50a533c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -57,6 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.update', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php index 4dadaad87c..782d1a5bd4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php @@ -54,6 +54,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.getTableUsage', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index b36572c5fc..fb9d2530df 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -56,6 +56,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: [ 'replaceWith' => 'tables.list', + 'version' => '1.8.0', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index c1481f2d5f..9f53c36986 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -180,33 +180,26 @@ class Method return $this->deprecated !== null; } - /** - * Get the deprecation info array - * @return array - */ public function getDeprecationInfo(): array { return $this->deprecated ?? []; } - /** - * Get the deprecation message if set - * @return string|null - */ public function getDeprecationMessage(): ?string { return $this->deprecated['message'] ?? ''; } - /** - * Get the replacement method if set - * @return string|null - */ public function getDeprecationReplacement(): ?string { return $this->deprecated['replaceWith'] ?? ''; } + public function getDeprecationVersion(): ?string + { + return $this->deprecated['version'] ?? ''; + } + public function isHidden(): bool|array { return $this->hide ?? false; @@ -285,11 +278,6 @@ class Method return $this; } - /** - * Set the deprecation info array - * @param array $deprecated - * @return self - */ public function setDeprecated(array $deprecated): self { $this->deprecated = $deprecated; diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index b087fd406f..65ab60ed3a 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -159,6 +159,9 @@ class OpenAPI3 extends Format 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', 'deprecated' => $sdk->isDeprecated(), + ...(!empty($sdk->getDeprecationMessage()) ? ['deprecatedMessage' => $sdk->getDeprecationMessage()] : []), + ...(!empty($sdk->getDeprecationVersion()) ? ['deprecatedVersion' => $sdk->getDeprecationVersion()] : []), + ...(!empty($sdk->getDeprecationReplacement()) ? ['replaceWith' => $sdk->getDeprecationReplacement()] : []), 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '', 'rate-limit' => $route->getLabel('abuse-limit', 0), @@ -170,14 +173,6 @@ class OpenAPI3 extends Format ], ]; - if (!empty($sdk->getDeprecationReplacement())) { - $temp['x-appwrite']['replaceWith'] = $sdk->getDeprecationReplacement(); - } - - if (!empty($sdk->getDeprecationMessage())) { - $temp['x-appwrite']['deprecatedMessage'] = $sdk->getDeprecationMessage(); - } - if (!empty($additionalMethods)) { $temp['x-appwrite']['methods'] = []; foreach ($additionalMethods as $method) { diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 7b9ffcbaf8..2bb7651d1d 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -161,6 +161,9 @@ class Swagger2 extends Format 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', 'deprecated' => $sdk->isDeprecated(), + ...(!empty($sdk->getDeprecationMessage()) ? ['deprecatedMessage' => $sdk->getDeprecationMessage()] : []), + ...(!empty($sdk->getDeprecationVersion()) ? ['deprecatedVersion' => $sdk->getDeprecationVersion()] : []), + ...(!empty($sdk->getDeprecationReplacement()) ? ['replaceWith' => $sdk->getDeprecationReplacement()] : []), 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '', 'rate-limit' => $route->getLabel('abuse-limit', 0), @@ -172,14 +175,6 @@ class Swagger2 extends Format ], ]; - if (!empty($sdk->getDeprecationReplacement())) { - $temp['x-appwrite']['replaceWith'] = $sdk->getDeprecationReplacement(); - } - - if (!empty($sdk->getDeprecationMessage())) { - $temp['x-appwrite']['deprecatedMessage'] = $sdk->getDeprecationMessage(); - } - if ($produces) { $temp['produces'][] = $produces; } From 3d4e146942e08605ccce92630e5e8f18ac6b0f12 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 1 Jul 2025 10:06:12 +0530 Subject: [PATCH 217/362] chore: update ordering --- .../Collections/Attributes/Boolean/Create.php | 2 +- .../Collections/Attributes/Boolean/Update.php | 2 +- .../Collections/Attributes/Datetime/Create.php | 2 +- .../Collections/Attributes/Datetime/Update.php | 2 +- .../Databases/Collections/Attributes/Delete.php | 2 +- .../Collections/Attributes/Email/Create.php | 2 +- .../Collections/Attributes/Email/Update.php | 2 +- .../Collections/Attributes/Enum/Create.php | 2 +- .../Collections/Attributes/Enum/Update.php | 2 +- .../Collections/Attributes/Float/Create.php | 2 +- .../Collections/Attributes/Float/Update.php | 2 +- .../Databases/Collections/Attributes/Get.php | 2 +- .../Collections/Attributes/IP/Create.php | 2 +- .../Collections/Attributes/IP/Update.php | 2 +- .../Collections/Attributes/Integer/Create.php | 2 +- .../Collections/Attributes/Integer/Update.php | 2 +- .../Attributes/Relationship/Create.php | 2 +- .../Attributes/Relationship/Update.php | 2 +- .../Collections/Attributes/String/Create.php | 2 +- .../Collections/Attributes/String/Update.php | 2 +- .../Collections/Attributes/URL/Create.php | 2 +- .../Collections/Attributes/URL/Update.php | 2 +- .../Databases/Collections/Attributes/XList.php | 2 +- .../Http/Databases/Collections/Create.php | 2 +- .../Http/Databases/Collections/Delete.php | 2 +- .../Documents/Attribute/Decrement.php | 2 +- .../Documents/Attribute/Increment.php | 2 +- .../Collections/Documents/Bulk/Delete.php | 2 +- .../Collections/Documents/Bulk/Update.php | 2 +- .../Collections/Documents/Bulk/Upsert.php | 2 +- .../Databases/Collections/Documents/Create.php | 2 +- .../Databases/Collections/Documents/Delete.php | 2 +- .../Databases/Collections/Documents/Get.php | 2 +- .../Collections/Documents/Logs/XList.php | 2 +- .../Databases/Collections/Documents/Update.php | 2 +- .../Databases/Collections/Documents/Upsert.php | 2 +- .../Databases/Collections/Documents/XList.php | 2 +- .../Http/Databases/Collections/Get.php | 2 +- .../Databases/Collections/Indexes/Create.php | 2 +- .../Databases/Collections/Indexes/Delete.php | 2 +- .../Http/Databases/Collections/Indexes/Get.php | 2 +- .../Databases/Collections/Indexes/XList.php | 2 +- .../Http/Databases/Collections/Logs/XList.php | 2 +- .../Http/Databases/Collections/Update.php | 2 +- .../Http/Databases/Collections/Usage/Get.php | 2 +- .../Http/Databases/Collections/XList.php | 2 +- src/Appwrite/SDK/Method.php | 17 ++++++----------- 47 files changed, 52 insertions(+), 57 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php index f6322a8a67..7a66df3724 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php @@ -53,8 +53,8 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'tables.createBooleanColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.createBooleanColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php index dc766d1001..c96e52c8bb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php @@ -54,8 +54,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateBooleanColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateBooleanColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php index 48b3970147..e8949935ea 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php @@ -54,8 +54,8 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'tables.createDatetimeColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.createDatetimeColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php index 87d91b8feb..48d77f3a25 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php @@ -55,8 +55,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateDatetimeColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateDatetimeColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 8290e65692..0d39ab21e6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -55,8 +55,8 @@ class Delete extends Action ], contentType: ContentType::NONE, deprecated: [ - 'replaceWith' => 'tables.deleteColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.deleteColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php index 5de30e7389..18387acff9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php @@ -54,8 +54,8 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'tables.createEmailColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.createEmailColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php index 4e6d2fc015..cd3579c817 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php @@ -55,8 +55,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateEmailColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateEmailColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index d2aa375574..c6c37b7cf9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -56,8 +56,8 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'tables.createEnumColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.createEnumColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php index 2d8d181d82..6369a5fd67 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php @@ -56,8 +56,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateEnumColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateEnumColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php index 9ede351b20..b330ae7248 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php @@ -56,8 +56,8 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'tables.createFloatColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.createFloatColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php index 84122b93be..bb48978ec3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php @@ -55,8 +55,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateFloatColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateFloatColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index 8e4e0842e1..93351eccd1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -58,8 +58,8 @@ class Get extends Action ) ], deprecated: [ - 'replaceWith' => 'tables.getColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.getColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php index 3eff6defa6..0c0fc25474 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php @@ -54,8 +54,8 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'tables.createIpColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.createIpColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php index 7aee4c9d92..32a7e79be6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php @@ -55,8 +55,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateIpColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateIpColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php index 6c94ca8644..d733f5958b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php @@ -56,8 +56,8 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'tables.createIntegerColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.createIntegerColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php index 258f4bd25e..35467e656b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php @@ -55,8 +55,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateIntegerColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateIntegerColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php index b300c7d04c..68f871bc40 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php @@ -56,8 +56,8 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'tables.createRelationshipColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.createRelationshipColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php index 4bfb3b58d9..017c2b3df6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php @@ -53,8 +53,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateRelationshipColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateRelationshipColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index 16aa7d1a7c..11f4a41bc8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -57,8 +57,8 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'tables.createStringColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.createStringColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php index 85519cb216..9903555499 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php @@ -57,8 +57,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateStringColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateStringColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php index d88ffff2e2..10f0a4a63b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php @@ -54,8 +54,8 @@ class Create extends Action ) ], deprecated: [ - 'replaceWith' => 'tables.createUrlColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.createUrlColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php index c9add5e099..9fbdb8453a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php @@ -55,8 +55,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateUrlColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateUrlColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index 71a0fe2853..f350e59aa4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -52,8 +52,8 @@ class XList extends Action ) ], deprecated: [ - 'replaceWith' => 'tables.listColumns', 'version' => '1.8.0', + 'replaceWith' => 'tables.listColumns', ], )) ->param('databaseId', '', new UID(), 'Database ID.') 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 5e159e19c1..330b23e64e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -63,8 +63,8 @@ class Create extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.create', 'version' => '1.8.0', + 'replaceWith' => 'tables.createTable', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php index 99320a0c8e..346f31a57d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php @@ -53,8 +53,8 @@ class Delete extends Action ], contentType: ContentType::NONE, deprecated: [ - 'replaceWith' => 'tables.delete', 'version' => '1.8.0', + 'replaceWith' => 'tables.deleteTable', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php index 57c327d9ff..17cfd56614 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php @@ -63,8 +63,8 @@ class Decrement extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.decrementColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.decrementColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php index 64792cc1d5..b5e1a63e83 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php @@ -63,8 +63,8 @@ class Increment extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.incrementColumn', 'version' => '1.8.0', + 'replaceWith' => 'tables.incrementColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index e37593e887..20b9763f1b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -61,8 +61,8 @@ class Delete extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.deleteRows', 'version' => '1.8.0', + 'replaceWith' => 'tables.deleteRows', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index 22ad7a45ad..7cdce0a4bd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -64,8 +64,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateRows', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateRows', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index b2c5814c4c..2de8c927b6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -62,8 +62,8 @@ class Upsert extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.upsertRows', 'version' => '1.8.0', + 'replaceWith' => 'tables.upsertRows', ], ) ]) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 84354bc103..eb9c8d5de8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -82,8 +82,8 @@ class Create extends Action new Parameter('permissions', optional: true), ], deprecated: [ - 'replaceWith' => 'tables.createRow', 'version' => '1.8.0', + 'replaceWith' => 'tables.createRow', ], ), new Method( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index c5c4344466..9d0b87ba5c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -63,8 +63,8 @@ class Delete extends Action ], contentType: ContentType::NONE, deprecated: [ - 'replaceWith' => 'tables.deleteRow', 'version' => '1.8.0', + 'replaceWith' => 'tables.deleteRow', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index 12462c121e..5783f6945c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -54,8 +54,8 @@ class Get extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.getRow', 'version' => '1.8.0', + 'replaceWith' => 'tables.getRow', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index c614d7bab0..1affc21210 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -60,8 +60,8 @@ class XList extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.listLogs', 'version' => '1.8.0', + 'replaceWith' => 'tables.listLogs', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 6f7feb3983..2f3b0916ab 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -67,8 +67,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.updateRow', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateRow', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index f7432c19cc..3da639c90d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -69,8 +69,8 @@ class Upsert extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.upsertRow', 'version' => '1.8.0', + 'replaceWith' => 'tables.upsertRow', ], ), ]) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index d95e013c0d..9c9bcc706b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -57,8 +57,8 @@ class XList extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.listRows', 'version' => '1.8.0', + 'replaceWith' => 'tables.listRows', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php index 4e5b6f7ab8..db42a823ac 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php @@ -48,8 +48,8 @@ class Get extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.get', 'version' => '1.8.0', + 'replaceWith' => 'tables.getTable', ], )) ->param('databaseId', '', new UID(), 'Database ID.') 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 48633de2f8..414ebb9c2e 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 @@ -63,8 +63,8 @@ class Create extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.createColumnIndex', 'version' => '1.8.0', + 'replaceWith' => 'tables.createColumnIndex', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index 3fee780733..bb3242876b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -58,8 +58,8 @@ class Delete extends Action ], contentType: ContentType::NONE, deprecated: [ - 'replaceWith' => 'tables.deleteColumnIndex', 'version' => '1.8.0', + 'replaceWith' => 'tables.deleteColumnIndex', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index 01d17366f4..4019353f11 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -49,8 +49,8 @@ class Get extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.getColumnIndex', 'version' => '1.8.0', + 'replaceWith' => 'tables.getColumnIndex', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index 2183266ec9..5aeb106ed5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -54,8 +54,8 @@ class XList extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.listColumnIndexes', 'version' => '1.8.0', + 'replaceWith' => 'tables.listColumnIndexes', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 9d59e02092..fb880d0e85 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -60,8 +60,8 @@ class XList extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.listTableLogs', 'version' => '1.8.0', + 'replaceWith' => 'tables.listTableLogs', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index c8f50a533c..ee7fd04f0d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -56,8 +56,8 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.update', 'version' => '1.8.0', + 'replaceWith' => 'tables.updateTable', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php index 782d1a5bd4..d48b4a1e36 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php @@ -53,8 +53,8 @@ class Get extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.getTableUsage', 'version' => '1.8.0', + 'replaceWith' => 'tables.getTableUsage', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index fb9d2530df..271bc9f1dd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -55,8 +55,8 @@ class XList extends Action ], contentType: ContentType::JSON, deprecated: [ - 'replaceWith' => 'tables.list', 'version' => '1.8.0', + 'replaceWith' => 'tables.list', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index 9f53c36986..1600cd2693 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -177,12 +177,7 @@ class Method public function isDeprecated(): bool { - return $this->deprecated !== null; - } - - public function getDeprecationInfo(): array - { - return $this->deprecated ?? []; + return $this->deprecated !== null && \is_array($this->deprecated); } public function getDeprecationMessage(): ?string @@ -190,16 +185,16 @@ class Method return $this->deprecated['message'] ?? ''; } - public function getDeprecationReplacement(): ?string - { - return $this->deprecated['replaceWith'] ?? ''; - } - public function getDeprecationVersion(): ?string { return $this->deprecated['version'] ?? ''; } + public function getDeprecationReplacement(): ?string + { + return $this->deprecated['replaceWith'] ?? ''; + } + public function isHidden(): bool|array { return $this->hide ?? false; From 9c413fd020c8323775e2a4e4e7585db77ebd9c4b Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Wed, 2 Jul 2025 11:41:21 +0530 Subject: [PATCH 218/362] chore: remove deprecatedMessage --- src/Appwrite/SDK/Method.php | 5 ----- src/Appwrite/SDK/Specification/Format/OpenAPI3.php | 1 - src/Appwrite/SDK/Specification/Format/Swagger2.php | 1 - 3 files changed, 7 deletions(-) diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index 1600cd2693..ba7c1452bd 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -180,11 +180,6 @@ class Method return $this->deprecated !== null && \is_array($this->deprecated); } - public function getDeprecationMessage(): ?string - { - return $this->deprecated['message'] ?? ''; - } - public function getDeprecationVersion(): ?string { return $this->deprecated['version'] ?? ''; diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 65ab60ed3a..005b305909 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -159,7 +159,6 @@ class OpenAPI3 extends Format 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', 'deprecated' => $sdk->isDeprecated(), - ...(!empty($sdk->getDeprecationMessage()) ? ['deprecatedMessage' => $sdk->getDeprecationMessage()] : []), ...(!empty($sdk->getDeprecationVersion()) ? ['deprecatedVersion' => $sdk->getDeprecationVersion()] : []), ...(!empty($sdk->getDeprecationReplacement()) ? ['replaceWith' => $sdk->getDeprecationReplacement()] : []), 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 2bb7651d1d..502eedd614 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -161,7 +161,6 @@ class Swagger2 extends Format 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', 'deprecated' => $sdk->isDeprecated(), - ...(!empty($sdk->getDeprecationMessage()) ? ['deprecatedMessage' => $sdk->getDeprecationMessage()] : []), ...(!empty($sdk->getDeprecationVersion()) ? ['deprecatedVersion' => $sdk->getDeprecationVersion()] : []), ...(!empty($sdk->getDeprecationReplacement()) ? ['replaceWith' => $sdk->getDeprecationReplacement()] : []), 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', From 85250ba7bb96d7c269bfd680554bf7489d3a459a Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Wed, 2 Jul 2025 11:53:26 +0530 Subject: [PATCH 219/362] chore: update format --- app/config/specs/open-api3-1.8.x-client.json | 42 ++- app/config/specs/open-api3-1.8.x-console.json | 322 ++++++++++-------- app/config/specs/open-api3-1.8.x-server.json | 301 +++++++++------- app/config/specs/swagger2-1.8.x-client.json | 42 ++- app/config/specs/swagger2-1.8.x-console.json | 322 ++++++++++-------- app/config/specs/swagger2-1.8.x-server.json | 301 +++++++++------- app/controllers/api/account.php | 4 +- .../Collections/Attributes/Boolean/Create.php | 2 +- .../Collections/Attributes/Boolean/Update.php | 2 +- .../Attributes/Datetime/Create.php | 2 +- .../Attributes/Datetime/Update.php | 2 +- .../Collections/Attributes/Delete.php | 2 +- .../Collections/Attributes/Email/Create.php | 2 +- .../Collections/Attributes/Email/Update.php | 2 +- .../Collections/Attributes/Enum/Create.php | 2 +- .../Collections/Attributes/Enum/Update.php | 2 +- .../Collections/Attributes/Float/Create.php | 2 +- .../Collections/Attributes/Float/Update.php | 2 +- .../Databases/Collections/Attributes/Get.php | 2 +- .../Collections/Attributes/IP/Create.php | 2 +- .../Collections/Attributes/IP/Update.php | 2 +- .../Collections/Attributes/Integer/Create.php | 2 +- .../Collections/Attributes/Integer/Update.php | 2 +- .../Attributes/Relationship/Create.php | 2 +- .../Attributes/Relationship/Update.php | 2 +- .../Collections/Attributes/String/Create.php | 2 +- .../Collections/Attributes/String/Update.php | 2 +- .../Collections/Attributes/URL/Create.php | 2 +- .../Collections/Attributes/URL/Update.php | 2 +- .../Collections/Attributes/XList.php | 2 +- .../Http/Databases/Collections/Create.php | 2 +- .../Http/Databases/Collections/Delete.php | 2 +- .../Documents/Attribute/Decrement.php | 2 +- .../Documents/Attribute/Increment.php | 2 +- .../Collections/Documents/Bulk/Delete.php | 2 +- .../Collections/Documents/Bulk/Update.php | 2 +- .../Collections/Documents/Bulk/Upsert.php | 2 +- .../Collections/Documents/Create.php | 2 +- .../Collections/Documents/Delete.php | 2 +- .../Databases/Collections/Documents/Get.php | 2 +- .../Collections/Documents/Logs/XList.php | 2 +- .../Collections/Documents/Update.php | 2 +- .../Collections/Documents/Upsert.php | 2 +- .../Databases/Collections/Documents/XList.php | 2 +- .../Http/Databases/Collections/Get.php | 2 +- .../Databases/Collections/Indexes/Create.php | 2 +- .../Databases/Collections/Indexes/Delete.php | 2 +- .../Databases/Collections/Indexes/Get.php | 2 +- .../Databases/Collections/Indexes/XList.php | 2 +- .../Http/Databases/Collections/Logs/XList.php | 2 +- .../Http/Databases/Collections/Update.php | 2 +- .../Http/Databases/Collections/Usage/Get.php | 2 +- .../Http/Databases/Collections/XList.php | 2 +- src/Appwrite/SDK/Method.php | 20 +- .../SDK/Specification/Format/OpenAPI3.php | 4 +- .../SDK/Specification/Format/Swagger2.php | 4 +- 56 files changed, 815 insertions(+), 639 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 10c6122ad5..0dfbcafa6e 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4364,9 +4364,10 @@ "weight": 340, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -4451,9 +4452,10 @@ "weight": 332, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -4618,9 +4620,10 @@ "weight": 333, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -4715,9 +4718,10 @@ "weight": 336, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.upsertRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -4845,9 +4849,10 @@ "weight": 334, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -4946,9 +4951,10 @@ "weight": 338, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, 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 d4c99c3fba..0f49ec241e 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4965,9 +4965,10 @@ "weight": 329, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.list", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.list" + }, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -5050,9 +5051,10 @@ "weight": 325, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.create", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createTable" + }, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -5156,9 +5158,10 @@ "weight": 326, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.get", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getTable" + }, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -5227,9 +5230,10 @@ "weight": 327, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.update", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateTable" + }, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -5328,9 +5332,10 @@ "weight": 328, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.delete", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteTable" + }, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -5401,9 +5406,10 @@ "weight": 346, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listColumns", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumns" + }, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5487,9 +5493,10 @@ "weight": 347, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createBooleanColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createBooleanColumn" + }, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5595,9 +5602,10 @@ "weight": 348, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateBooleanColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateBooleanColumn" + }, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5708,9 +5716,10 @@ "weight": 349, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createDatetimeColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createDatetimeColumn" + }, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5816,9 +5825,10 @@ "weight": 350, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn" + }, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5929,9 +5939,10 @@ "weight": 351, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createEmailColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEmailColumn" + }, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -6037,9 +6048,10 @@ "weight": 352, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateEmailColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEmailColumn" + }, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -6150,9 +6162,10 @@ "weight": 353, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createEnumColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEnumColumn" + }, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -6267,9 +6280,10 @@ "weight": 354, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateEnumColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEnumColumn" + }, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -6389,9 +6403,10 @@ "weight": 355, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createFloatColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createFloatColumn" + }, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -6507,9 +6522,10 @@ "weight": 356, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateFloatColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateFloatColumn" + }, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6630,9 +6646,10 @@ "weight": 357, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createIntegerColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIntegerColumn" + }, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6748,9 +6765,10 @@ "weight": 358, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateIntegerColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIntegerColumn" + }, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6871,9 +6889,10 @@ "weight": 359, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createIpColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIpColumn" + }, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6979,9 +6998,10 @@ "weight": 360, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateIpColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIpColumn" + }, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -7092,9 +7112,10 @@ "weight": 361, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createRelationshipColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRelationshipColumn" + }, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -7225,9 +7246,10 @@ "weight": 363, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createStringColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createStringColumn" + }, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -7344,9 +7366,10 @@ "weight": 364, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateStringColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateStringColumn" + }, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -7462,9 +7485,10 @@ "weight": 365, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createUrlColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createUrlColumn" + }, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7570,9 +7594,10 @@ "weight": 366, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateUrlColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateUrlColumn" + }, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7714,9 +7739,10 @@ "weight": 344, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumn" + }, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7787,9 +7813,10 @@ "weight": 345, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumn" + }, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7869,9 +7896,10 @@ "weight": 362, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn" + }, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7979,9 +8007,10 @@ "weight": 340, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -8066,9 +8095,10 @@ "weight": 332, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -8231,9 +8261,10 @@ "weight": 337, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.upsertRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRows" + }, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -8343,9 +8374,10 @@ "weight": 335, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRows" + }, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -8439,9 +8471,10 @@ "weight": 339, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRows" + }, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8532,9 +8565,10 @@ "weight": 333, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8629,9 +8663,10 @@ "weight": 336, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.upsertRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8759,9 +8794,10 @@ "weight": 334, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8860,9 +8896,10 @@ "weight": 338, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8946,9 +8983,10 @@ "weight": 341, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listLogs", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listLogs" + }, "demo": "databases\/list-document-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", "rate-limit": 0, @@ -9041,9 +9079,10 @@ "weight": 343, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.decrementColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.decrementColumn" + }, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -9155,9 +9194,10 @@ "weight": 342, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.incrementColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.incrementColumn" + }, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -9269,9 +9309,10 @@ "weight": 370, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listColumnIndexes", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumnIndexes" + }, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -9353,9 +9394,10 @@ "weight": 367, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createColumnIndex", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createColumnIndex" + }, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -9483,9 +9525,10 @@ "weight": 368, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getColumnIndex", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumnIndex" + }, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -9556,9 +9599,10 @@ "weight": 369, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteColumnIndex", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumnIndex" + }, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9638,9 +9682,10 @@ "weight": 330, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listTableLogs", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listTableLogs" + }, "demo": "databases\/list-collection-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", "rate-limit": 0, @@ -9723,9 +9768,10 @@ "weight": 331, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getTableUsage", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getTableUsage" + }, "demo": "databases\/get-collection-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, 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 8e4252cd4b..1687389d96 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4416,9 +4416,10 @@ "weight": 329, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.list", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.list" + }, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4502,9 +4503,10 @@ "weight": 325, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.create", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createTable" + }, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -4609,9 +4611,10 @@ "weight": 326, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.get", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getTable" + }, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -4681,9 +4684,10 @@ "weight": 327, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.update", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateTable" + }, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -4783,9 +4787,10 @@ "weight": 328, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.delete", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteTable" + }, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -4857,9 +4862,10 @@ "weight": 346, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listColumns", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumns" + }, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -4944,9 +4950,10 @@ "weight": 347, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createBooleanColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createBooleanColumn" + }, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5053,9 +5060,10 @@ "weight": 348, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateBooleanColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateBooleanColumn" + }, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5167,9 +5175,10 @@ "weight": 349, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createDatetimeColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createDatetimeColumn" + }, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5276,9 +5285,10 @@ "weight": 350, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn" + }, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5390,9 +5400,10 @@ "weight": 351, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createEmailColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEmailColumn" + }, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5499,9 +5510,10 @@ "weight": 352, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateEmailColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEmailColumn" + }, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -5613,9 +5625,10 @@ "weight": 353, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createEnumColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEnumColumn" + }, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -5731,9 +5744,10 @@ "weight": 354, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateEnumColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEnumColumn" + }, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -5854,9 +5868,10 @@ "weight": 355, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createFloatColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createFloatColumn" + }, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -5973,9 +5988,10 @@ "weight": 356, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateFloatColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateFloatColumn" + }, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6097,9 +6113,10 @@ "weight": 357, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createIntegerColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIntegerColumn" + }, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6216,9 +6233,10 @@ "weight": 358, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateIntegerColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIntegerColumn" + }, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6340,9 +6358,10 @@ "weight": 359, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createIpColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIpColumn" + }, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6449,9 +6468,10 @@ "weight": 360, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateIpColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIpColumn" + }, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6563,9 +6583,10 @@ "weight": 361, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createRelationshipColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRelationshipColumn" + }, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -6697,9 +6718,10 @@ "weight": 363, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createStringColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createStringColumn" + }, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -6817,9 +6839,10 @@ "weight": 364, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateStringColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateStringColumn" + }, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -6936,9 +6959,10 @@ "weight": 365, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createUrlColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createUrlColumn" + }, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7045,9 +7069,10 @@ "weight": 366, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateUrlColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateUrlColumn" + }, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7190,9 +7215,10 @@ "weight": 344, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumn" + }, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7264,9 +7290,10 @@ "weight": 345, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumn" + }, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7347,9 +7374,10 @@ "weight": 362, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn" + }, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7458,9 +7486,10 @@ "weight": 340, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7547,9 +7576,10 @@ "weight": 332, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -7714,9 +7744,10 @@ "weight": 337, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.upsertRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRows" + }, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -7827,9 +7858,10 @@ "weight": 335, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRows" + }, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -7924,9 +7956,10 @@ "weight": 339, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRows" + }, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8018,9 +8051,10 @@ "weight": 333, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8117,9 +8151,10 @@ "weight": 336, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.upsertRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8249,9 +8284,10 @@ "weight": 334, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8352,9 +8388,10 @@ "weight": 338, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8440,9 +8477,10 @@ "weight": 343, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.decrementColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.decrementColumn" + }, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -8555,9 +8593,10 @@ "weight": 342, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.incrementColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.incrementColumn" + }, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -8670,9 +8709,10 @@ "weight": 370, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listColumnIndexes", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumnIndexes" + }, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -8755,9 +8795,10 @@ "weight": 367, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createColumnIndex", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createColumnIndex" + }, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -8886,9 +8927,10 @@ "weight": 368, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getColumnIndex", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumnIndex" + }, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -8960,9 +9002,10 @@ "weight": 369, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteColumnIndex", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumnIndex" + }, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 07bd5c818f..808b13d88a 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -4513,9 +4513,10 @@ "weight": 340, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -4597,9 +4598,10 @@ "weight": 332, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -4762,9 +4764,10 @@ "weight": 333, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -4854,9 +4857,10 @@ "weight": 336, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.upsertRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -4980,9 +4984,10 @@ "weight": 334, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -5079,9 +5084,10 @@ "weight": 338, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index bc396ac977..a4d0050c5e 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -5132,9 +5132,10 @@ "weight": 329, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.list", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.list" + }, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -5214,9 +5215,10 @@ "weight": 325, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.create", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createTable" + }, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -5321,9 +5323,10 @@ "weight": 326, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.get", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getTable" + }, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -5390,9 +5393,10 @@ "weight": 327, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.update", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateTable" + }, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -5493,9 +5497,10 @@ "weight": 328, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.delete", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteTable" + }, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -5562,9 +5567,10 @@ "weight": 346, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listColumns", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumns" + }, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5645,9 +5651,10 @@ "weight": 347, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createBooleanColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createBooleanColumn" + }, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5753,9 +5760,10 @@ "weight": 348, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateBooleanColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateBooleanColumn" + }, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5863,9 +5871,10 @@ "weight": 349, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createDatetimeColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createDatetimeColumn" + }, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5971,9 +5980,10 @@ "weight": 350, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn" + }, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -6081,9 +6091,10 @@ "weight": 351, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createEmailColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEmailColumn" + }, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -6189,9 +6200,10 @@ "weight": 352, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateEmailColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEmailColumn" + }, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -6299,9 +6311,10 @@ "weight": 353, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createEnumColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEnumColumn" + }, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -6417,9 +6430,10 @@ "weight": 354, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateEnumColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEnumColumn" + }, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -6537,9 +6551,10 @@ "weight": 355, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createFloatColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createFloatColumn" + }, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -6657,9 +6672,10 @@ "weight": 356, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateFloatColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateFloatColumn" + }, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6779,9 +6795,10 @@ "weight": 357, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createIntegerColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIntegerColumn" + }, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6899,9 +6916,10 @@ "weight": 358, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateIntegerColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIntegerColumn" + }, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -7021,9 +7039,10 @@ "weight": 359, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createIpColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIpColumn" + }, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -7129,9 +7148,10 @@ "weight": 360, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateIpColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIpColumn" + }, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -7239,9 +7259,10 @@ "weight": 361, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createRelationshipColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRelationshipColumn" + }, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -7374,9 +7395,10 @@ "weight": 363, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createStringColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createStringColumn" + }, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -7495,9 +7517,10 @@ "weight": 364, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateStringColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateStringColumn" + }, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -7611,9 +7634,10 @@ "weight": 365, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createUrlColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createUrlColumn" + }, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7719,9 +7743,10 @@ "weight": 366, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateUrlColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateUrlColumn" + }, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7858,9 +7883,10 @@ "weight": 344, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumn" + }, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7929,9 +7955,10 @@ "weight": 345, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumn" + }, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -8007,9 +8034,10 @@ "weight": 362, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn" + }, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -8111,9 +8139,10 @@ "weight": 340, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -8195,9 +8224,10 @@ "weight": 332, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -8360,9 +8390,10 @@ "weight": 337, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.upsertRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRows" + }, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -8469,9 +8500,10 @@ "weight": 335, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRows" + }, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -8563,9 +8595,10 @@ "weight": 339, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRows" + }, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8651,9 +8684,10 @@ "weight": 333, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8743,9 +8777,10 @@ "weight": 336, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.upsertRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8869,9 +8904,10 @@ "weight": 334, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8968,9 +9004,10 @@ "weight": 338, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -9048,9 +9085,10 @@ "weight": 341, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listLogs", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listLogs" + }, "demo": "databases\/list-document-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", "rate-limit": 0, @@ -9138,9 +9176,10 @@ "weight": 343, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.decrementColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.decrementColumn" + }, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -9246,9 +9285,10 @@ "weight": 342, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.incrementColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.incrementColumn" + }, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -9352,9 +9392,10 @@ "weight": 370, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listColumnIndexes", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumnIndexes" + }, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -9433,9 +9474,10 @@ "weight": 367, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createColumnIndex", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createColumnIndex" + }, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -9562,9 +9604,10 @@ "weight": 368, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getColumnIndex", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumnIndex" + }, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -9633,9 +9676,10 @@ "weight": 369, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteColumnIndex", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumnIndex" + }, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9709,9 +9753,10 @@ "weight": 330, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listTableLogs", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listTableLogs" + }, "demo": "databases\/list-collection-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", "rate-limit": 0, @@ -9789,9 +9834,10 @@ "weight": 331, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getTableUsage", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getTableUsage" + }, "demo": "databases\/get-collection-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index ff4042e39d..1012823557 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -4573,9 +4573,10 @@ "weight": 329, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.list", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.list" + }, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4656,9 +4657,10 @@ "weight": 325, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.create", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createTable" + }, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -4764,9 +4766,10 @@ "weight": 326, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.get", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getTable" + }, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -4834,9 +4837,10 @@ "weight": 327, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.update", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateTable" + }, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -4938,9 +4942,10 @@ "weight": 328, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.delete", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteTable" + }, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -5008,9 +5013,10 @@ "weight": 346, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listColumns", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumns" + }, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5092,9 +5098,10 @@ "weight": 347, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createBooleanColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createBooleanColumn" + }, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5201,9 +5208,10 @@ "weight": 348, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateBooleanColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateBooleanColumn" + }, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5312,9 +5320,10 @@ "weight": 349, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createDatetimeColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createDatetimeColumn" + }, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5421,9 +5430,10 @@ "weight": 350, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn" + }, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5532,9 +5542,10 @@ "weight": 351, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createEmailColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEmailColumn" + }, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5641,9 +5652,10 @@ "weight": 352, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateEmailColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEmailColumn" + }, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -5752,9 +5764,10 @@ "weight": 353, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createEnumColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEnumColumn" + }, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -5871,9 +5884,10 @@ "weight": 354, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateEnumColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEnumColumn" + }, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -5992,9 +6006,10 @@ "weight": 355, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createFloatColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createFloatColumn" + }, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -6113,9 +6128,10 @@ "weight": 356, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateFloatColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateFloatColumn" + }, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6236,9 +6252,10 @@ "weight": 357, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createIntegerColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIntegerColumn" + }, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6357,9 +6374,10 @@ "weight": 358, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateIntegerColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIntegerColumn" + }, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6480,9 +6498,10 @@ "weight": 359, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createIpColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIpColumn" + }, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6589,9 +6608,10 @@ "weight": 360, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateIpColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIpColumn" + }, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6700,9 +6720,10 @@ "weight": 361, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createRelationshipColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRelationshipColumn" + }, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -6836,9 +6857,10 @@ "weight": 363, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createStringColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createStringColumn" + }, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -6958,9 +6980,10 @@ "weight": 364, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateStringColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateStringColumn" + }, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -7075,9 +7098,10 @@ "weight": 365, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createUrlColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createUrlColumn" + }, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7184,9 +7208,10 @@ "weight": 366, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateUrlColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateUrlColumn" + }, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7324,9 +7349,10 @@ "weight": 344, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumn" + }, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7396,9 +7422,10 @@ "weight": 345, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumn" + }, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7475,9 +7502,10 @@ "weight": 362, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn" + }, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7580,9 +7608,10 @@ "weight": 340, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7666,9 +7695,10 @@ "weight": 332, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -7833,9 +7863,10 @@ "weight": 337, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.upsertRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRows" + }, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -7943,9 +7974,10 @@ "weight": 335, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRows" + }, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -8038,9 +8070,10 @@ "weight": 339, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteRows", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRows" + }, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8127,9 +8160,10 @@ "weight": 333, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8221,9 +8255,10 @@ "weight": 336, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.upsertRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8349,9 +8384,10 @@ "weight": 334, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.updateRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8450,9 +8486,10 @@ "weight": 338, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteRow", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8534,9 +8571,10 @@ "weight": 343, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.decrementColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.decrementColumn" + }, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -8643,9 +8681,10 @@ "weight": 342, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.incrementColumn", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.incrementColumn" + }, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -8750,9 +8789,10 @@ "weight": 370, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.listColumnIndexes", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumnIndexes" + }, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -8832,9 +8872,10 @@ "weight": 367, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.createColumnIndex", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createColumnIndex" + }, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -8962,9 +9003,10 @@ "weight": 368, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.getColumnIndex", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumnIndex" + }, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -9034,9 +9076,10 @@ "weight": 369, "cookies": false, "type": "", - "deprecated": true, - "deprecatedVersion": "1.8.0", - "replaceWith": "tables.deleteColumnIndex", + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumnIndex" + }, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 2a200f404c..2bb009cf61 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -2323,7 +2323,7 @@ App::put('/v1/account/sessions/magic-url') ) ], contentType: ContentType::JSON, - deprecated: [], + deprecated: true, )) ->label('abuse-limit', 10) ->label('abuse-key', 'ip:{ip},userId:{param-userId}') @@ -2361,7 +2361,7 @@ App::put('/v1/account/sessions/phone') ) ], contentType: ContentType::JSON, - deprecated: [], + deprecated: true, )) ->label('abuse-limit', 10) ->label('abuse-key', 'ip:{ip},userId:{param-userId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php index 7a66df3724..f35ac34f9b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php @@ -53,7 +53,7 @@ class Create extends Action ) ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createBooleanColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php index c96e52c8bb..b2f5664632 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php @@ -54,7 +54,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateBooleanColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php index e8949935ea..7c118e05c0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php @@ -54,7 +54,7 @@ class Create extends Action ) ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createDatetimeColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php index 48d77f3a25..4ff64bcbcb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php @@ -55,7 +55,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateDatetimeColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 0d39ab21e6..f708464800 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -55,7 +55,7 @@ class Delete extends Action ], contentType: ContentType::NONE, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.deleteColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php index 18387acff9..cfd528ad6b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php @@ -54,7 +54,7 @@ class Create extends Action ) ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createEmailColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php index cd3579c817..75d9759af2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php @@ -55,7 +55,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateEmailColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index c6c37b7cf9..646858d0bc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -56,7 +56,7 @@ class Create extends Action ) ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createEnumColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php index 6369a5fd67..f144fb038e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php @@ -56,7 +56,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateEnumColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php index b330ae7248..a5f794797d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php @@ -56,7 +56,7 @@ class Create extends Action ) ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createFloatColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php index bb48978ec3..9935da15a0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php @@ -55,7 +55,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateFloatColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index 93351eccd1..6760689c23 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -58,7 +58,7 @@ class Get extends Action ) ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.getColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php index 0c0fc25474..78907a063d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php @@ -54,7 +54,7 @@ class Create extends Action ) ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createIpColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php index 32a7e79be6..5af8b7aa01 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php @@ -55,7 +55,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateIpColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php index d733f5958b..75f886f4df 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php @@ -56,7 +56,7 @@ class Create extends Action ) ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createIntegerColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php index 35467e656b..412a1a7bc3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php @@ -55,7 +55,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateIntegerColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php index 68f871bc40..a753194e2e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php @@ -56,7 +56,7 @@ class Create extends Action ) ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createRelationshipColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php index 017c2b3df6..48e82fc6d7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php @@ -53,7 +53,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateRelationshipColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index 11f4a41bc8..a91ba47a8a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -57,7 +57,7 @@ class Create extends Action ) ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createStringColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php index 9903555499..2e43532e90 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php @@ -57,7 +57,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateStringColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php index 10f0a4a63b..cda120a75e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php @@ -54,7 +54,7 @@ class Create extends Action ) ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createUrlColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php index 9fbdb8453a..ee8b2496e3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php @@ -55,7 +55,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateUrlColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index f350e59aa4..d0982f3143 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -52,7 +52,7 @@ class XList extends Action ) ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.listColumns', ], )) 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 330b23e64e..ba76c35655 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -63,7 +63,7 @@ class Create extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createTable', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php index 346f31a57d..8203780e11 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php @@ -53,7 +53,7 @@ class Delete extends Action ], contentType: ContentType::NONE, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.deleteTable', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php index 17cfd56614..25c309492f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php @@ -63,7 +63,7 @@ class Decrement extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.decrementColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php index b5e1a63e83..785e319f3c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php @@ -63,7 +63,7 @@ class Increment extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.incrementColumn', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index 20b9763f1b..e6f295f1b0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -61,7 +61,7 @@ class Delete extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.deleteRows', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index 7cdce0a4bd..4f084b75c1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -64,7 +64,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateRows', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index 2de8c927b6..31a0ebf272 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -62,7 +62,7 @@ class Upsert extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.upsertRows', ], ) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index eb9c8d5de8..91ed6113aa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -82,7 +82,7 @@ class Create extends Action new Parameter('permissions', optional: true), ], deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createRow', ], ), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index 9d0b87ba5c..71dfab76b6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -63,7 +63,7 @@ class Delete extends Action ], contentType: ContentType::NONE, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.deleteRow', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index 5783f6945c..0fa89d4909 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -54,7 +54,7 @@ class Get extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.getRow', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index 1affc21210..aa5ded79f1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -60,7 +60,7 @@ class XList extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.listLogs', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 2f3b0916ab..360af37098 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -67,7 +67,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateRow', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index 3da639c90d..deb193ec0d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -69,7 +69,7 @@ class Upsert extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.upsertRow', ], ), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 9c9bcc706b..525a330a04 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -57,7 +57,7 @@ class XList extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.listRows', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php index db42a823ac..503762535e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php @@ -48,7 +48,7 @@ class Get extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.getTable', ], )) 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 414ebb9c2e..e67ff99806 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 @@ -63,7 +63,7 @@ class Create extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.createColumnIndex', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index bb3242876b..23095b6425 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -58,7 +58,7 @@ class Delete extends Action ], contentType: ContentType::NONE, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.deleteColumnIndex', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index 4019353f11..ad94cc760f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -49,7 +49,7 @@ class Get extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.getColumnIndex', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index 5aeb106ed5..5108bb1b3e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -54,7 +54,7 @@ class XList extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.listColumnIndexes', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index fb880d0e85..03578f367a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -60,7 +60,7 @@ class XList extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.listTableLogs', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index ee7fd04f0d..aa7214f5ad 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -56,7 +56,7 @@ class Update extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.updateTable', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php index d48b4a1e36..3bcdcb976b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php @@ -53,7 +53,7 @@ class Get extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.getTableUsage', ], )) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index 271bc9f1dd..4891fe9783 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -55,7 +55,7 @@ class XList extends Action ], contentType: ContentType::JSON, deprecated: [ - 'version' => '1.8.0', + 'since' => '1.8.0', 'replaceWith' => 'tables.list', ], )) diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index ba7c1452bd..19cafa10a4 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -23,7 +23,7 @@ class Method * @param array<SDKResponse> $responses * @param ContentType $contentType * @param MethodType|null $type - * @param ?array $deprecated + * @param bool|array $deprecated * @param array|bool $hide * @param bool $packaging * @param ContentType $requestType @@ -39,7 +39,7 @@ class Method protected array $responses, protected ContentType $contentType = ContentType::JSON, protected ?MethodType $type = null, - protected ?array $deprecated = null, + protected bool|array $deprecated = false, protected array|bool $hide = false, protected bool $packaging = false, protected ContentType $requestType = ContentType::JSON, @@ -175,19 +175,9 @@ class Method return $this->type; } - public function isDeprecated(): bool + public function getDeprecated(): bool|array { - return $this->deprecated !== null && \is_array($this->deprecated); - } - - public function getDeprecationVersion(): ?string - { - return $this->deprecated['version'] ?? ''; - } - - public function getDeprecationReplacement(): ?string - { - return $this->deprecated['replaceWith'] ?? ''; + return $this->deprecated; } public function isHidden(): bool|array @@ -268,7 +258,7 @@ class Method return $this; } - public function setDeprecated(array $deprecated): self + public function setDeprecated(bool|array $deprecated): self { $this->deprecated = $deprecated; return $this; diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 005b305909..a7d0db6518 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -158,9 +158,7 @@ class OpenAPI3 extends Format 'weight' => $route->getOrder(), 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', - 'deprecated' => $sdk->isDeprecated(), - ...(!empty($sdk->getDeprecationVersion()) ? ['deprecatedVersion' => $sdk->getDeprecationVersion()] : []), - ...(!empty($sdk->getDeprecationReplacement()) ? ['replaceWith' => $sdk->getDeprecationReplacement()] : []), + 'deprecated' => $sdk->getDeprecated(), 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '', 'rate-limit' => $route->getLabel('abuse-limit', 0), diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 502eedd614..1d53b58d8c 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -160,9 +160,7 @@ class Swagger2 extends Format 'weight' => $route->getOrder(), 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', - 'deprecated' => $sdk->isDeprecated(), - ...(!empty($sdk->getDeprecationVersion()) ? ['deprecatedVersion' => $sdk->getDeprecationVersion()] : []), - ...(!empty($sdk->getDeprecationReplacement()) ? ['replaceWith' => $sdk->getDeprecationReplacement()] : []), + 'deprecated' => $sdk->getDeprecated(), 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '', 'rate-limit' => $route->getLabel('abuse-limit', 0), From 634a160d41478599325a93445225ab9edd14044b Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Wed, 2 Jul 2025 13:23:00 +0530 Subject: [PATCH 220/362] chore: move deprecated --- app/config/specs/open-api3-1.8.x-client.json | 248 ++-- app/config/specs/open-api3-1.8.x-console.json | 1246 +++++++++-------- app/config/specs/open-api3-1.8.x-server.json | 989 ++++++------- app/config/specs/swagger2-1.8.x-client.json | 248 ++-- app/config/specs/swagger2-1.8.x-console.json | 1246 +++++++++-------- app/config/specs/swagger2-1.8.x-server.json | 989 ++++++------- src/Appwrite/SDK/Method.php | 5 + .../SDK/Specification/Format/OpenAPI3.php | 6 +- .../SDK/Specification/Format/Swagger2.php | 8 +- 9 files changed, 2600 insertions(+), 2385 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 0dfbcafa6e..862d9f655d 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -44,13 +44,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "account", "weight": 10, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", "rate-limit": 0, @@ -93,13 +93,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "account", "weight": 9, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", "rate-limit": 10, @@ -178,13 +178,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "account", "weight": 35, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "rate-limit": 0, @@ -254,13 +254,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 58, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "rate-limit": 0, @@ -313,13 +313,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 59, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "rate-limit": 0, @@ -376,13 +376,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "tokens", "weight": 30, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, @@ -425,13 +425,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 32, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "rate-limit": 0, @@ -491,13 +491,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMFA", "group": "mfa", "weight": 45, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-m-f-a.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, @@ -561,13 +561,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", "weight": 47, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "rate-limit": 0, @@ -627,13 +627,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", "weight": 48, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "rate-limit": 0, @@ -705,13 +705,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 52, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -773,13 +773,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", "weight": 53, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "rate-limit": 10, @@ -847,13 +847,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", "weight": 54, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", "rate-limit": 10, @@ -923,13 +923,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 46, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", "rate-limit": 0, @@ -974,13 +974,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 51, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -1023,13 +1023,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 49, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -1072,13 +1072,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 50, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -1123,13 +1123,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "account", "weight": 33, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "rate-limit": 0, @@ -1193,13 +1193,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "account", "weight": 34, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "rate-limit": 10, @@ -1268,13 +1268,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "account", "weight": 36, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "rate-limit": 0, @@ -1344,13 +1344,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "account", "weight": 31, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "rate-limit": 0, @@ -1393,13 +1393,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "account", "weight": 37, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "rate-limit": 0, @@ -1463,13 +1463,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRecovery", "group": "recovery", "weight": 39, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", "rate-limit": 10, @@ -1540,13 +1540,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRecovery", "group": "recovery", "weight": 40, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "rate-limit": 10, @@ -1622,13 +1622,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 12, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "rate-limit": 0, @@ -1664,13 +1664,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 13, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", "rate-limit": 100, @@ -1715,13 +1715,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAnonymousSession", "group": "sessions", "weight": 18, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-anonymous-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", "rate-limit": 50, @@ -1764,13 +1764,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailPasswordSession", "group": "sessions", "weight": 17, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-password-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "rate-limit": 10, @@ -1838,13 +1838,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateMagicURLSession", "group": "sessions", "weight": 27, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-magic-u-r-l-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1856,6 +1856,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -1905,13 +1906,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Session", "group": "sessions", "weight": 20, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, @@ -2047,13 +2048,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updatePhoneSession", "group": "sessions", "weight": 28, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-phone-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2065,6 +2066,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2121,13 +2123,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 19, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2195,13 +2197,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSession", "group": "sessions", "weight": 14, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", "rate-limit": 0, @@ -2256,13 +2258,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSession", "group": "sessions", "weight": 16, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", "rate-limit": 10, @@ -2310,13 +2312,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 15, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", "rate-limit": 100, @@ -2373,13 +2375,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "account", "weight": 38, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", "rate-limit": 0, @@ -2424,13 +2426,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", "weight": 55, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, @@ -2503,13 +2505,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", "weight": 56, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, @@ -2574,13 +2576,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", "weight": 57, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, @@ -2635,13 +2637,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailToken", "group": "tokens", "weight": 26, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", "rate-limit": 10, @@ -2717,13 +2719,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMagicURLToken", "group": "tokens", "weight": 25, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-magic-u-r-l-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, @@ -2797,13 +2799,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Token", "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, @@ -2939,13 +2941,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneToken", "group": "tokens", "weight": 29, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", "rate-limit": 10, @@ -3016,13 +3018,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVerification", "group": "verification", "weight": 41, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", "rate-limit": 10, @@ -3084,13 +3086,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVerification", "group": "verification", "weight": 42, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", "rate-limit": 10, @@ -3160,13 +3162,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneVerification", "group": "verification", "weight": 43, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", "rate-limit": 10, @@ -3212,13 +3214,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "verification", "weight": 44, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", "rate-limit": 10, @@ -3281,13 +3283,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getBrowser", "group": null, "weight": 61, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-browser.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "rate-limit": 0, @@ -3407,13 +3409,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getCreditCard", "group": null, "weight": 60, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-credit-card.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "rate-limit": 0, @@ -3539,13 +3541,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFavicon", "group": null, "weight": 64, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-favicon.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "rate-limit": 0, @@ -3597,13 +3599,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFlag", "group": null, "weight": 62, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-flag.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "rate-limit": 0, @@ -4085,13 +4087,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getImage", "group": null, "weight": 63, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-image.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "rate-limit": 0, @@ -4167,13 +4169,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getInitials", "group": null, "weight": 66, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-initials.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "rate-limit": 0, @@ -4259,13 +4261,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getQR", "group": null, "weight": 65, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-q-r.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, @@ -4358,16 +4360,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocuments", "group": "documents", "weight": 340, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listRows" - }, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -4380,6 +4379,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "auth": { "Project": [] } @@ -4446,16 +4449,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDocument", "group": "documents", "weight": 332, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createRow" - }, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -4468,6 +4468,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "methods": [ { "name": "createDocument", @@ -4614,16 +4618,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getDocument", "group": "documents", "weight": 333, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getRow" - }, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -4636,6 +4637,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "auth": { "Project": [] } @@ -4712,16 +4717,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocument", "group": "documents", "weight": 336, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.upsertRow" - }, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -4734,6 +4736,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "methods": [ { "name": "upsertDocument", @@ -4843,16 +4849,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocument", "group": "documents", "weight": 334, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRow" - }, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -4865,6 +4868,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "auth": { "Project": [] } @@ -4945,16 +4952,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocument", "group": "documents", "weight": 338, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteRow" - }, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -4967,6 +4971,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "auth": { "Project": [] } @@ -5032,13 +5040,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRows", "group": "rows", "weight": 413, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, @@ -5117,13 +5125,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRow", "group": "rows", "weight": 405, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, @@ -5282,13 +5290,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRow", "group": "rows", "weight": 406, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, @@ -5377,13 +5385,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRow", "group": "rows", "weight": 409, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, @@ -5502,13 +5510,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRow", "group": "rows", "weight": 407, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, @@ -5601,13 +5609,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRow", "group": "rows", "weight": 411, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, @@ -5685,13 +5693,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listExecutions", "group": "executions", "weight": 441, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-executions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -5760,13 +5768,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createExecution", "group": "executions", "weight": 439, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", "rate-limit": 0, @@ -5875,13 +5883,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getExecution", "group": "executions", "weight": 440, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.", "rate-limit": 0, @@ -5949,13 +5957,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "query", "group": "graphql", "weight": 255, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/query.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -6001,13 +6009,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "mutation", "group": "graphql", "weight": 254, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/mutation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -6053,13 +6061,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 70, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "rate-limit": 0, @@ -6105,13 +6113,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCodes", "group": null, "weight": 71, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "rate-limit": 0, @@ -6157,13 +6165,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listContinents", "group": null, "weight": 75, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-continents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "rate-limit": 0, @@ -6209,13 +6217,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountries", "group": null, "weight": 72, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "rate-limit": 0, @@ -6261,13 +6269,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesEU", "group": null, "weight": 73, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-e-u.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, @@ -6313,13 +6321,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesPhones", "group": null, "weight": 74, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-phones.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "rate-limit": 0, @@ -6365,13 +6373,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCurrencies", "group": null, "weight": 76, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-currencies.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "rate-limit": 0, @@ -6417,13 +6425,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLanguages", "group": null, "weight": 77, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-languages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "rate-limit": 0, @@ -6469,13 +6477,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSubscriber", "group": "subscribers", "weight": 301, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "rate-limit": 0, @@ -6552,13 +6560,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", "weight": 305, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "rate-limit": 0, @@ -6627,13 +6635,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFiles", "group": "files", "weight": 161, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-files.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "rate-limit": 0, @@ -6713,13 +6721,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFile", "group": "files", "weight": 160, "cookies": false, "type": "upload", - "deprecated": false, "demo": "storage\/create-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "rate-limit": 60, @@ -6811,13 +6819,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFile", "group": "files", "weight": 162, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "rate-limit": 0, @@ -6883,13 +6891,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFile", "group": "files", "weight": 167, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "rate-limit": 60, @@ -6972,13 +6980,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteFile", "group": "files", "weight": 168, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", "rate-limit": 60, @@ -7039,13 +7047,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getFileDownload", "group": "files", "weight": 164, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "rate-limit": 0, @@ -7117,13 +7125,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFilePreview", "group": "files", "weight": 163, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-preview.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "rate-limit": 0, @@ -7345,13 +7353,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getFileView", "group": "files", "weight": 165, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-view.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "rate-limit": 0, @@ -7430,13 +7438,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "teams", "weight": 172, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "rate-limit": 0, @@ -7506,13 +7514,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "teams", "weight": 171, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "rate-limit": 0, @@ -7591,13 +7599,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "teams", "weight": 173, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "rate-limit": 0, @@ -7653,13 +7661,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "teams", "weight": 175, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "rate-limit": 0, @@ -7727,13 +7735,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "teams", "weight": 177, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "rate-limit": 0, @@ -7791,13 +7799,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 179, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "rate-limit": 0, @@ -7877,13 +7885,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMembership", "group": "memberships", "weight": 178, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "rate-limit": 10, @@ -7988,13 +7996,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMembership", "group": "memberships", "weight": 180, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "rate-limit": 0, @@ -8060,13 +8068,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembership", "group": "memberships", "weight": 181, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "rate-limit": 0, @@ -8147,13 +8155,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMembership", "group": "memberships", "weight": 183, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "rate-limit": 0, @@ -8221,13 +8229,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", "weight": 182, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "rate-limit": 0, @@ -8319,13 +8327,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "teams", "weight": 174, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "rate-limit": 0, @@ -8380,13 +8388,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "teams", "weight": 176, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "rate-limit": 0, 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 0f49ec241e..c393613ea4 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -44,13 +44,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "account", "weight": 10, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", "rate-limit": 0, @@ -92,13 +92,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "account", "weight": 9, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", "rate-limit": 10, @@ -168,13 +168,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "account", "weight": 11, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md", "rate-limit": 0, @@ -216,13 +216,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "account", "weight": 35, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "rate-limit": 0, @@ -291,13 +291,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 58, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "rate-limit": 0, @@ -349,13 +349,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 59, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "rate-limit": 0, @@ -411,13 +411,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "tokens", "weight": 30, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, @@ -460,13 +460,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 32, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "rate-limit": 0, @@ -525,13 +525,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMFA", "group": "mfa", "weight": 45, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-m-f-a.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, @@ -594,13 +594,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", "weight": 47, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "rate-limit": 0, @@ -659,13 +659,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", "weight": 48, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "rate-limit": 0, @@ -736,13 +736,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 52, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -803,13 +803,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", "weight": 53, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "rate-limit": 10, @@ -877,13 +877,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", "weight": 54, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", "rate-limit": 10, @@ -952,13 +952,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 46, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", "rate-limit": 0, @@ -1002,13 +1002,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 51, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -1050,13 +1050,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 49, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -1098,13 +1098,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 50, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -1148,13 +1148,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "account", "weight": 33, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "rate-limit": 0, @@ -1217,13 +1217,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "account", "weight": 34, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "rate-limit": 10, @@ -1291,13 +1291,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "account", "weight": 36, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "rate-limit": 0, @@ -1366,13 +1366,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "account", "weight": 31, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "rate-limit": 0, @@ -1414,13 +1414,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "account", "weight": 37, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "rate-limit": 0, @@ -1483,13 +1483,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRecovery", "group": "recovery", "weight": 39, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", "rate-limit": 10, @@ -1559,13 +1559,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRecovery", "group": "recovery", "weight": 40, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "rate-limit": 10, @@ -1640,13 +1640,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 12, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "rate-limit": 0, @@ -1681,13 +1681,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 13, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", "rate-limit": 100, @@ -1731,13 +1731,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAnonymousSession", "group": "sessions", "weight": 18, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-anonymous-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", "rate-limit": 50, @@ -1780,13 +1780,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailPasswordSession", "group": "sessions", "weight": 17, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-password-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "rate-limit": 10, @@ -1854,13 +1854,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateMagicURLSession", "group": "sessions", "weight": 27, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-magic-u-r-l-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1872,6 +1872,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -1921,13 +1922,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Session", "group": "sessions", "weight": 20, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, @@ -2063,13 +2064,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updatePhoneSession", "group": "sessions", "weight": 28, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-phone-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2081,6 +2082,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2137,13 +2139,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 19, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2211,13 +2213,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSession", "group": "sessions", "weight": 14, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", "rate-limit": 0, @@ -2271,13 +2273,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSession", "group": "sessions", "weight": 16, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", "rate-limit": 10, @@ -2324,13 +2326,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 15, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", "rate-limit": 100, @@ -2386,13 +2388,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "account", "weight": 38, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", "rate-limit": 0, @@ -2436,13 +2438,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", "weight": 55, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, @@ -2514,13 +2516,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", "weight": 56, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, @@ -2584,13 +2586,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", "weight": 57, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, @@ -2644,13 +2646,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailToken", "group": "tokens", "weight": 26, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", "rate-limit": 10, @@ -2726,13 +2728,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMagicURLToken", "group": "tokens", "weight": 25, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-magic-u-r-l-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, @@ -2806,13 +2808,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Token", "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, @@ -2948,13 +2950,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneToken", "group": "tokens", "weight": 29, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", "rate-limit": 10, @@ -3025,13 +3027,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVerification", "group": "verification", "weight": 41, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", "rate-limit": 10, @@ -3092,13 +3094,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVerification", "group": "verification", "weight": 42, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", "rate-limit": 10, @@ -3167,13 +3169,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneVerification", "group": "verification", "weight": 43, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", "rate-limit": 10, @@ -3218,13 +3220,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "verification", "weight": 44, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", "rate-limit": 10, @@ -3286,13 +3288,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getBrowser", "group": null, "weight": 61, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-browser.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "rate-limit": 0, @@ -3412,13 +3414,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getCreditCard", "group": null, "weight": 60, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-credit-card.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "rate-limit": 0, @@ -3544,13 +3546,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFavicon", "group": null, "weight": 64, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-favicon.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "rate-limit": 0, @@ -3602,13 +3604,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFlag", "group": null, "weight": 62, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-flag.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "rate-limit": 0, @@ -4090,13 +4092,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getImage", "group": null, "weight": 63, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-image.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "rate-limit": 0, @@ -4172,13 +4174,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getInitials", "group": null, "weight": 66, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-initials.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "rate-limit": 0, @@ -4264,13 +4266,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getQR", "group": null, "weight": 65, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-q-r.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, @@ -4356,13 +4358,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "chat", "group": "console", "weight": 257, "cookies": false, "type": "", - "deprecated": false, "demo": "assistant\/chat.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/assistant\/chat.md", "rate-limit": 15, @@ -4416,13 +4418,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "getResource", "group": null, "weight": 481, "cookies": false, "type": "", - "deprecated": false, "demo": "console\/get-resource.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCheck if a resource ID is available.", "rate-limit": 120, @@ -4491,13 +4493,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "variables", "group": "console", "weight": 256, "cookies": false, "type": "", - "deprecated": false, "demo": "console\/variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/console\/variables.md", "rate-limit": 0, @@ -4539,13 +4541,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "databases", "weight": 321, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", "rate-limit": 0, @@ -4612,13 +4614,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "databases", "weight": 317, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", "rate-limit": 0, @@ -4691,13 +4693,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listUsage", "group": null, "weight": 324, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", "rate-limit": 0, @@ -4763,13 +4765,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "databases", "weight": 318, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", "rate-limit": 0, @@ -4822,13 +4824,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "databases", "weight": 319, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", "rate-limit": 0, @@ -4898,13 +4900,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "databases", "weight": 320, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", "rate-limit": 0, @@ -4959,16 +4961,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listCollections", "group": "collections", "weight": 329, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.list" - }, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4979,6 +4978,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.list" + }, "auth": { "Project": [] } @@ -5045,16 +5048,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createCollection", "group": "collections", "weight": 325, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createTable" - }, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -5065,6 +5065,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createTable" + }, "auth": { "Project": [] } @@ -5152,16 +5156,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getCollection", "group": "collections", "weight": 326, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getTable" - }, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -5172,6 +5173,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getTable" + }, "auth": { "Project": [] } @@ -5224,16 +5229,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateCollection", "group": "collections", "weight": 327, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateTable" - }, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -5244,6 +5246,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateTable" + }, "auth": { "Project": [] } @@ -5326,16 +5332,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteCollection", "group": "collections", "weight": 328, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteTable" - }, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -5346,6 +5349,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteTable" + }, "auth": { "Project": [] } @@ -5400,16 +5407,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listAttributes", "group": "attributes", "weight": 346, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listColumns" - }, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5420,6 +5424,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumns" + }, "auth": { "Project": [] } @@ -5487,16 +5495,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", "weight": 347, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" - }, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5507,6 +5512,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createBooleanColumn" + }, "auth": { "Project": [] } @@ -5596,16 +5605,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", "weight": 348, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" - }, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5616,6 +5622,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateBooleanColumn" + }, "auth": { "Project": [] } @@ -5710,16 +5720,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", "weight": 349, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" - }, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5730,6 +5737,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createDatetimeColumn" + }, "auth": { "Project": [] } @@ -5819,16 +5830,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", "weight": 350, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" - }, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5839,6 +5847,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn" + }, "auth": { "Project": [] } @@ -5933,16 +5945,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", "weight": 351, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" - }, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5953,6 +5962,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEmailColumn" + }, "auth": { "Project": [] } @@ -6042,16 +6055,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", "weight": 352, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" - }, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -6062,6 +6072,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEmailColumn" + }, "auth": { "Project": [] } @@ -6156,16 +6170,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", "weight": 353, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" - }, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -6176,6 +6187,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEnumColumn" + }, "auth": { "Project": [] } @@ -6274,16 +6289,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", "weight": 354, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" - }, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -6294,6 +6306,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEnumColumn" + }, "auth": { "Project": [] } @@ -6397,16 +6413,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", "weight": 355, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" - }, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -6417,6 +6430,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createFloatColumn" + }, "auth": { "Project": [] } @@ -6516,16 +6533,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", "weight": 356, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" - }, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6536,6 +6550,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateFloatColumn" + }, "auth": { "Project": [] } @@ -6640,16 +6658,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", "weight": 357, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" - }, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6660,6 +6675,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIntegerColumn" + }, "auth": { "Project": [] } @@ -6759,16 +6778,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", "weight": 358, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" - }, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6779,6 +6795,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIntegerColumn" + }, "auth": { "Project": [] } @@ -6883,16 +6903,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIpAttribute", "group": "attributes", "weight": 359, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createIpColumn" - }, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6903,6 +6920,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIpColumn" + }, "auth": { "Project": [] } @@ -6992,16 +7013,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", "weight": 360, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" - }, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -7012,6 +7030,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIpColumn" + }, "auth": { "Project": [] } @@ -7106,16 +7128,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", "weight": 361, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" - }, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -7126,6 +7145,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRelationshipColumn" + }, "auth": { "Project": [] } @@ -7240,16 +7263,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createStringAttribute", "group": "attributes", "weight": 363, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createStringColumn" - }, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -7260,6 +7280,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createStringColumn" + }, "auth": { "Project": [] } @@ -7360,16 +7384,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", "weight": 364, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" - }, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -7380,6 +7401,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateStringColumn" + }, "auth": { "Project": [] } @@ -7479,16 +7504,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", "weight": 365, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" - }, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7499,6 +7521,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createUrlColumn" + }, "auth": { "Project": [] } @@ -7588,16 +7614,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", "weight": 366, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" - }, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7608,6 +7631,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateUrlColumn" + }, "auth": { "Project": [] } @@ -7733,16 +7760,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getAttribute", "group": "attributes", "weight": 344, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getColumn" - }, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7753,6 +7777,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumn" + }, "auth": { "Project": [] } @@ -7807,16 +7835,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteAttribute", "group": "attributes", "weight": 345, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteColumn" - }, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7827,6 +7852,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumn" + }, "auth": { "Project": [] } @@ -7890,16 +7919,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", "weight": 362, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" - }, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7910,6 +7936,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn" + }, "auth": { "Project": [] } @@ -8001,16 +8031,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocuments", "group": "documents", "weight": 340, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listRows" - }, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -8023,6 +8050,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "auth": { "Project": [] } @@ -8089,16 +8120,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDocument", "group": "documents", "weight": 332, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createRow" - }, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -8111,6 +8139,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "methods": [ { "name": "createDocument", @@ -8255,16 +8287,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocuments", "group": "documents", "weight": 337, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.upsertRows" - }, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -8276,6 +8305,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRows" + }, "methods": [ { "name": "upsertDocuments", @@ -8368,16 +8401,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocuments", "group": "documents", "weight": 335, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRows" - }, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -8389,6 +8419,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRows" + }, "auth": { "Project": [] } @@ -8465,16 +8499,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocuments", "group": "documents", "weight": 339, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteRows" - }, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8486,6 +8517,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRows" + }, "auth": { "Project": [] } @@ -8559,16 +8594,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getDocument", "group": "documents", "weight": 333, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getRow" - }, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8581,6 +8613,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "auth": { "Project": [] } @@ -8657,16 +8693,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocument", "group": "documents", "weight": 336, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.upsertRow" - }, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8679,6 +8712,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "methods": [ { "name": "upsertDocument", @@ -8788,16 +8825,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocument", "group": "documents", "weight": 334, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRow" - }, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8810,6 +8844,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "auth": { "Project": [] } @@ -8890,16 +8928,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocument", "group": "documents", "weight": 338, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteRow" - }, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8912,6 +8947,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "auth": { "Project": [] } @@ -8977,16 +9016,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocumentLogs", "group": "logs", "weight": 341, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listLogs" - }, "demo": "databases\/list-document-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", "rate-limit": 0, @@ -8997,6 +9033,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listLogs" + }, "auth": { "Project": [] } @@ -9073,16 +9113,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", "weight": 343, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.decrementColumn" - }, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -9094,6 +9131,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.decrementColumn" + }, "auth": { "Project": [] } @@ -9188,16 +9229,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", "weight": 342, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.incrementColumn" - }, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -9209,6 +9247,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.incrementColumn" + }, "auth": { "Project": [] } @@ -9303,16 +9345,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 370, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listColumnIndexes" - }, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -9323,6 +9362,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumnIndexes" + }, "auth": { "Project": [] } @@ -9388,16 +9431,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 367, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createColumnIndex" - }, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -9408,6 +9448,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createColumnIndex" + }, "auth": { "Project": [] } @@ -9519,16 +9563,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 368, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getColumnIndex" - }, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -9539,6 +9580,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumnIndex" + }, "auth": { "Project": [] } @@ -9593,16 +9638,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 369, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteColumnIndex" - }, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9613,6 +9655,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumnIndex" + }, "auth": { "Project": [] } @@ -9676,16 +9722,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listCollectionLogs", "group": "collections", "weight": 330, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listTableLogs" - }, "demo": "databases\/list-collection-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", "rate-limit": 0, @@ -9696,6 +9739,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listTableLogs" + }, "auth": { "Project": [] } @@ -9762,16 +9809,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getCollectionUsage", "group": null, "weight": 331, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getTableUsage" - }, "demo": "databases\/get-collection-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, @@ -9782,6 +9826,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getTableUsage" + }, "auth": { "Project": [] } @@ -9857,13 +9905,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 322, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", "rate-limit": 0, @@ -9930,13 +9978,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": null, "weight": 375, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, @@ -10013,13 +10061,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": null, "weight": 371, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, @@ -10117,13 +10165,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 372, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, @@ -10186,13 +10234,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": null, "weight": 373, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, @@ -10285,13 +10333,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": null, "weight": 374, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, @@ -10356,13 +10404,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listColumns", "group": "columns", "weight": 380, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -10440,13 +10488,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBooleanColumn", "group": "columns", "weight": 381, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, @@ -10546,13 +10594,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", "weight": 382, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, @@ -10657,13 +10705,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", "weight": 383, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, @@ -10763,13 +10811,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", "weight": 384, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, @@ -10874,13 +10922,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailColumn", "group": "columns", "weight": 385, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, @@ -10980,13 +11028,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailColumn", "group": "columns", "weight": 386, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, @@ -11091,13 +11139,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEnumColumn", "group": "columns", "weight": 387, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, @@ -11206,13 +11254,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEnumColumn", "group": "columns", "weight": 388, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, @@ -11326,13 +11374,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFloatColumn", "group": "columns", "weight": 389, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, @@ -11442,13 +11490,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFloatColumn", "group": "columns", "weight": 390, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, @@ -11563,13 +11611,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIntegerColumn", "group": "columns", "weight": 391, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, @@ -11679,13 +11727,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", "weight": 392, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, @@ -11800,13 +11848,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIpColumn", "group": "columns", "weight": 393, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, @@ -11906,13 +11954,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIpColumn", "group": "columns", "weight": 394, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, @@ -12017,13 +12065,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", "weight": 395, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, @@ -12148,13 +12196,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createStringColumn", "group": "columns", "weight": 397, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, @@ -12265,13 +12313,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStringColumn", "group": "columns", "weight": 398, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, @@ -12381,13 +12429,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createUrlColumn", "group": "columns", "weight": 399, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, @@ -12487,13 +12535,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateUrlColumn", "group": "columns", "weight": 400, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, @@ -12629,13 +12677,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getColumn", "group": "columns", "weight": 378, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, @@ -12700,13 +12748,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteColumn", "group": "columns", "weight": 379, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, @@ -12780,13 +12828,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", "weight": 396, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, @@ -12888,13 +12936,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 404, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -12970,13 +13018,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 401, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -13098,13 +13146,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 402, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -13169,13 +13217,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 403, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -13249,13 +13297,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "tables", "weight": 376, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", "rate-limit": 0, @@ -13332,13 +13380,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRows", "group": "rows", "weight": 413, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, @@ -13417,13 +13465,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRow", "group": "rows", "weight": 405, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, @@ -13580,13 +13628,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRows", "group": "rows", "weight": 410, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, @@ -13690,13 +13738,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRows", "group": "rows", "weight": 408, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, @@ -13784,13 +13832,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteRows", "group": "rows", "weight": 412, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, @@ -13875,13 +13923,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRow", "group": "rows", "weight": 406, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, @@ -13970,13 +14018,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRow", "group": "rows", "weight": 409, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, @@ -14095,13 +14143,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRow", "group": "rows", "weight": 407, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, @@ -14194,13 +14242,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRow", "group": "rows", "weight": 411, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, @@ -14278,13 +14326,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRowLogs", "group": "logs", "weight": 414, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-row-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", "rate-limit": 0, @@ -14371,13 +14419,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "decrementRowColumn", "group": "rows", "weight": 416, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, @@ -14483,13 +14531,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "incrementRowColumn", "group": "rows", "weight": 415, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, @@ -14595,13 +14643,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 377, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", "rate-limit": 0, @@ -14687,13 +14735,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDatabaseUsage", "group": null, "weight": 323, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-database-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, @@ -14769,13 +14817,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "functions", "weight": 425, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's functions. You can use the query params to filter your results.", "rate-limit": 0, @@ -14842,13 +14890,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "functions", "weight": 422, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", "rate-limit": 0, @@ -15075,13 +15123,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRuntimes", "group": "runtimes", "weight": 427, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-runtimes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all runtimes that are currently active on your instance.", "rate-limit": 0, @@ -15124,13 +15172,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "runtimes", "weight": 428, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed function specifications for this instance.", "rate-limit": 0, @@ -15174,13 +15222,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTemplates", "group": "templates", "weight": 451, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-templates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList available function templates. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", "rate-limit": 0, @@ -15274,13 +15322,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTemplate", "group": "templates", "weight": 450, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function template using ID. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", "rate-limit": 0, @@ -15334,13 +15382,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listUsage", "group": null, "weight": 444, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for all functions in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -15406,13 +15454,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "functions", "weight": 423, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function by its unique ID.", "rate-limit": 0, @@ -15465,13 +15513,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "functions", "weight": 424, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate function by its unique ID.", "rate-limit": 0, @@ -15695,13 +15743,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "functions", "weight": 426, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function by its unique ID.", "rate-limit": 0, @@ -15756,13 +15804,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", "weight": 431, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-function-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", "rate-limit": 0, @@ -15836,13 +15884,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 432, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the function's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -15919,13 +15967,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 429, "cookies": false, "type": "upload", - "deprecated": false, "demo": "functions\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "rate-limit": 0, @@ -16015,13 +16063,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 437, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -16100,13 +16148,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 434, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/functions#listTemplates) to find the template details.", "rate-limit": 0, @@ -16203,13 +16251,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 435, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -16300,13 +16348,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 430, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment by its unique ID.", "rate-limit": 0, @@ -16362,13 +16410,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 433, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a code deployment by its unique ID.", "rate-limit": 0, @@ -16426,13 +16474,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 436, "cookies": false, "type": "location", - "deprecated": false, "demo": "functions\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -16516,13 +16564,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 438, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -16587,13 +16635,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listExecutions", "group": "executions", "weight": 441, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-executions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -16662,13 +16710,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createExecution", "group": "executions", "weight": 439, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", "rate-limit": 0, @@ -16777,13 +16825,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getExecution", "group": "executions", "weight": 440, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.", "rate-limit": 0, @@ -16842,13 +16890,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteExecution", "group": "executions", "weight": 442, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function execution by its unique ID.", "rate-limit": 0, @@ -16913,13 +16961,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 443, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -16995,13 +17043,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 447, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific function.", "rate-limit": 0, @@ -17054,13 +17102,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 445, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", "rate-limit": 0, @@ -17145,13 +17193,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 446, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -17214,13 +17262,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 448, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -17305,13 +17353,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 449, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -17376,13 +17424,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "query", "group": "graphql", "weight": 255, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/query.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -17428,13 +17476,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "mutation", "group": "graphql", "weight": 254, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/mutation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -17480,13 +17528,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "health", "weight": 78, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", "rate-limit": 0, @@ -17529,13 +17577,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getAntivirus", "group": "health", "weight": 99, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-antivirus.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", "rate-limit": 0, @@ -17578,13 +17626,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCache", "group": "health", "weight": 81, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-cache.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", "rate-limit": 0, @@ -17627,13 +17675,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCertificate", "group": "health", "weight": 86, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-certificate.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", "rate-limit": 0, @@ -17687,13 +17735,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDB", "group": "health", "weight": 80, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-d-b.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, @@ -17736,13 +17784,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPubSub", "group": "health", "weight": 82, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-pub-sub.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", "rate-limit": 0, @@ -17785,13 +17833,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueBuilds", "group": "queue", "weight": 88, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-builds.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", "rate-limit": 0, @@ -17847,13 +17895,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueCertificates", "group": "queue", "weight": 87, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-certificates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", "rate-limit": 0, @@ -17909,13 +17957,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDatabases", "group": "queue", "weight": 89, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-databases.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", "rate-limit": 0, @@ -17982,13 +18030,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDeletes", "group": "queue", "weight": 90, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-deletes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", "rate-limit": 0, @@ -18044,13 +18092,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFailedJobs", "group": "queue", "weight": 100, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-failed-jobs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", "rate-limit": 0, @@ -18132,13 +18180,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueFunctions", "group": "queue", "weight": 94, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-functions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", "rate-limit": 0, @@ -18194,13 +18242,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueLogs", "group": "queue", "weight": 85, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", "rate-limit": 0, @@ -18256,13 +18304,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMails", "group": "queue", "weight": 91, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-mails.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", "rate-limit": 0, @@ -18318,13 +18366,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMessaging", "group": "queue", "weight": 92, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-messaging.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", "rate-limit": 0, @@ -18380,13 +18428,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMigrations", "group": "queue", "weight": 93, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-migrations.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", "rate-limit": 0, @@ -18442,13 +18490,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", "weight": 95, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-stats-resources.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", "rate-limit": 0, @@ -18504,13 +18552,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueUsage", "group": "queue", "weight": 96, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", "rate-limit": 0, @@ -18566,13 +18614,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", "weight": 84, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-webhooks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", "rate-limit": 0, @@ -18628,13 +18676,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorage", "group": "storage", "weight": 98, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", "rate-limit": 0, @@ -18677,13 +18725,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorageLocal", "group": "storage", "weight": 97, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage-local.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", "rate-limit": 0, @@ -18726,13 +18774,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTime", "group": "health", "weight": 83, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-time.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", "rate-limit": 0, @@ -18775,13 +18823,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 70, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "rate-limit": 0, @@ -18827,13 +18875,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCodes", "group": null, "weight": 71, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "rate-limit": 0, @@ -18879,13 +18927,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listContinents", "group": null, "weight": 75, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-continents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "rate-limit": 0, @@ -18931,13 +18979,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountries", "group": null, "weight": 72, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "rate-limit": 0, @@ -18983,13 +19031,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesEU", "group": null, "weight": 73, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-e-u.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, @@ -19035,13 +19083,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesPhones", "group": null, "weight": 74, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-phones.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "rate-limit": 0, @@ -19087,13 +19135,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCurrencies", "group": null, "weight": 76, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-currencies.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "rate-limit": 0, @@ -19139,13 +19187,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLanguages", "group": null, "weight": 77, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-languages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "rate-limit": 0, @@ -19191,13 +19239,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessages", "group": "messages", "weight": 309, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-messages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", "rate-limit": 0, @@ -19267,13 +19315,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmail", "group": "messages", "weight": 306, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", "rate-limit": 0, @@ -19411,13 +19459,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "messages", "weight": 313, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", "rate-limit": 0, @@ -19557,13 +19605,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPush", "group": "messages", "weight": 308, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", "rate-limit": 0, @@ -19731,13 +19779,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePush", "group": "messages", "weight": 315, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", "rate-limit": 0, @@ -19909,13 +19957,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSms", "group": "messages", "weight": 307, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", "rate-limit": 0, @@ -20018,13 +20066,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSms", "group": "messages", "weight": 314, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, @@ -20130,13 +20178,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMessage", "group": "messages", "weight": 312, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-message.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", "rate-limit": 0, @@ -20183,13 +20231,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "messages", "weight": 316, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", "rate-limit": 0, @@ -20245,13 +20293,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessageLogs", "group": "logs", "weight": 310, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-message-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", "rate-limit": 0, @@ -20320,13 +20368,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "messages", "weight": 311, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", "rate-limit": 0, @@ -20395,13 +20443,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviders", "group": "providers", "weight": 281, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-providers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", "rate-limit": 0, @@ -20471,13 +20519,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createApnsProvider", "group": "providers", "weight": 280, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", "rate-limit": 0, @@ -20576,13 +20624,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", "weight": 293, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", "rate-limit": 0, @@ -20684,13 +20732,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFcmProvider", "group": "providers", "weight": 279, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", "rate-limit": 0, @@ -20769,13 +20817,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", "weight": 292, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", "rate-limit": 0, @@ -20857,13 +20905,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMailgunProvider", "group": "providers", "weight": 271, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", "rate-limit": 0, @@ -20972,13 +21020,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", "weight": 284, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", "rate-limit": 0, @@ -21090,13 +21138,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMsg91Provider", "group": "providers", "weight": 274, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, @@ -21185,13 +21233,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", "weight": 287, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, @@ -21283,13 +21331,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSendgridProvider", "group": "providers", "weight": 272, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "rate-limit": 0, @@ -21388,13 +21436,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", "weight": 285, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "rate-limit": 0, @@ -21496,13 +21544,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", "weight": 273, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", "rate-limit": 0, @@ -21639,13 +21687,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", "weight": 286, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", "rate-limit": 0, @@ -21784,13 +21832,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTelesignProvider", "group": "providers", "weight": 275, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", "rate-limit": 0, @@ -21879,13 +21927,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", "weight": 288, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", "rate-limit": 0, @@ -21977,13 +22025,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", "weight": 276, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", "rate-limit": 0, @@ -22072,13 +22120,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", "weight": 289, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", "rate-limit": 0, @@ -22170,13 +22218,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTwilioProvider", "group": "providers", "weight": 277, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", "rate-limit": 0, @@ -22265,13 +22313,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", "weight": 290, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", "rate-limit": 0, @@ -22363,13 +22411,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVonageProvider", "group": "providers", "weight": 278, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", "rate-limit": 0, @@ -22458,13 +22506,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVonageProvider", "group": "providers", "weight": 291, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", "rate-limit": 0, @@ -22556,13 +22604,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getProvider", "group": "providers", "weight": 283, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", "rate-limit": 0, @@ -22609,13 +22657,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteProvider", "group": "providers", "weight": 294, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", "rate-limit": 0, @@ -22671,13 +22719,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviderLogs", "group": "providers", "weight": 282, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-provider-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", "rate-limit": 0, @@ -22746,13 +22794,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", "weight": 303, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscriber-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", "rate-limit": 0, @@ -22821,13 +22869,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopics", "group": "topics", "weight": 296, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topics.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", "rate-limit": 0, @@ -22895,13 +22943,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTopic", "group": "topics", "weight": 295, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", "rate-limit": 0, @@ -22978,13 +23026,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTopic", "group": "topics", "weight": 298, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", "rate-limit": 0, @@ -23038,13 +23086,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTopic", "group": "topics", "weight": 299, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", "rate-limit": 0, @@ -23115,13 +23163,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTopic", "group": "topics", "weight": 300, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", "rate-limit": 0, @@ -23177,13 +23225,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopicLogs", "group": "topics", "weight": 297, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topic-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", "rate-limit": 0, @@ -23252,13 +23300,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscribers", "group": "subscribers", "weight": 302, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscribers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "rate-limit": 0, @@ -23336,13 +23384,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSubscriber", "group": "subscribers", "weight": 301, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "rate-limit": 0, @@ -23426,13 +23474,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSubscriber", "group": "subscribers", "weight": 304, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "rate-limit": 0, @@ -23489,13 +23537,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", "weight": 305, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "rate-limit": 0, @@ -23564,13 +23612,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": null, "weight": 263, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/list-migrations.md", "rate-limit": 0, @@ -23638,13 +23686,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAppwriteMigration", "group": null, "weight": 258, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-appwrite-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite.md", "rate-limit": 0, @@ -23726,13 +23774,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getAppwriteReport", "group": null, "weight": 265, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-appwrite-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite-report.md", "rate-limit": 0, @@ -23819,13 +23867,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createCsvMigration", "group": null, "weight": 262, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-csv-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv.md", "rate-limit": 0, @@ -23898,13 +23946,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFirebaseMigration", "group": null, "weight": 259, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-firebase-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase.md", "rate-limit": 0, @@ -23974,13 +24022,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFirebaseReport", "group": null, "weight": 266, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-firebase-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase-report.md", "rate-limit": 0, @@ -24046,13 +24094,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createNHostMigration", "group": null, "weight": 261, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-n-host-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost.md", "rate-limit": 0, @@ -24157,13 +24205,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getNHostReport", "group": null, "weight": 268, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-n-host-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost-report.md", "rate-limit": 0, @@ -24290,13 +24338,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSupabaseMigration", "group": null, "weight": 260, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-supabase-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase.md", "rate-limit": 0, @@ -24395,13 +24443,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSupabaseReport", "group": null, "weight": 267, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-supabase-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase-report.md", "rate-limit": 0, @@ -24519,13 +24567,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 264, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/get-migration.md", "rate-limit": 0, @@ -24577,13 +24625,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "retry", "group": null, "weight": 269, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/retry.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/retry-migration.md", "rate-limit": 0, @@ -24628,13 +24676,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": null, "weight": 270, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/delete-migration.md", "rate-limit": 0, @@ -24688,13 +24736,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 149, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", "rate-limit": 0, @@ -24776,13 +24824,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": null, "weight": 151, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/list-variables.md", "rate-limit": 0, @@ -24822,13 +24870,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": null, "weight": 150, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/create-variable.md", "rate-limit": 0, @@ -24900,13 +24948,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": null, "weight": 152, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-variable.md", "rate-limit": 0, @@ -24958,13 +25006,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": null, "weight": 153, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/update-variable.md", "rate-limit": 0, @@ -25038,13 +25086,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": null, "weight": 154, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/delete-variable.md", "rate-limit": 0, @@ -25098,13 +25146,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "projects", "weight": 103, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list.md", "rate-limit": 0, @@ -25170,13 +25218,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "projects", "weight": 102, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", "rate-limit": 0, @@ -25304,13 +25352,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "projects", "weight": 104, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", "rate-limit": 0, @@ -25362,13 +25410,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "projects", "weight": 105, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", "rate-limit": 0, @@ -25477,13 +25525,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "projects", "weight": 122, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete.md", "rate-limit": 0, @@ -25537,13 +25585,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApiStatus", "group": "projects", "weight": 109, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-api-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status.md", "rate-limit": 0, @@ -25629,13 +25677,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", "weight": 110, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-api-status-all.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status-all.md", "rate-limit": 0, @@ -25708,13 +25756,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthDuration", "group": "auth", "weight": 115, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-duration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-duration.md", "rate-limit": 0, @@ -25787,13 +25835,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthLimit", "group": "auth", "weight": 114, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-limit.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-limit.md", "rate-limit": 0, @@ -25866,13 +25914,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", "weight": 120, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-sessions-limit.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-sessions-limit.md", "rate-limit": 0, @@ -25945,13 +25993,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", "weight": 113, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-memberships-privacy.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-memberships-privacy.md", "rate-limit": 0, @@ -26036,13 +26084,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMockNumbers", "group": "auth", "weight": 121, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-mock-numbers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-mock-numbers.md", "rate-limit": 0, @@ -26118,13 +26166,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", "weight": 118, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-password-dictionary.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-dictionary.md", "rate-limit": 0, @@ -26197,13 +26245,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", "weight": 117, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-password-history.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-history.md", "rate-limit": 0, @@ -26276,13 +26324,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", "weight": 119, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-personal-data-check.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-personal-data-check.md", "rate-limit": 0, @@ -26355,13 +26403,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", "weight": 112, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-session-alerts.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-alerts.md", "rate-limit": 0, @@ -26434,13 +26482,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", "weight": 148, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-session-invalidation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-invalidation.md", "rate-limit": 0, @@ -26513,13 +26561,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthStatus", "group": "auth", "weight": 116, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-status.md", "rate-limit": 0, @@ -26613,13 +26661,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDevKeys", "group": "devKeys", "weight": 420, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-dev-keys.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", "rate-limit": 0, @@ -26681,13 +26729,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDevKey", "group": "devKeys", "weight": 417, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", "rate-limit": 0, @@ -26766,13 +26814,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDevKey", "group": "devKeys", "weight": 419, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a project\\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.", "rate-limit": 0, @@ -26834,13 +26882,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDevKey", "group": "devKeys", "weight": 418, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a project\\'s dev key by its unique ID. Use this endpoint to update a project\\'s dev key name or expiration time.'", "rate-limit": 0, @@ -26920,13 +26968,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", "weight": 421, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a project\\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.", "rate-limit": 0, @@ -26990,13 +27038,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "auth", "weight": 134, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", "rate-limit": 0, @@ -27077,13 +27125,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listKeys", "group": "keys", "weight": 130, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-keys.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-keys.md", "rate-limit": 0, @@ -27135,13 +27183,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createKey", "group": "keys", "weight": 129, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-key.md", "rate-limit": 0, @@ -27228,13 +27276,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getKey", "group": "keys", "weight": 131, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-key.md", "rate-limit": 0, @@ -27296,13 +27344,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateKey", "group": "keys", "weight": 132, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-key.md", "rate-limit": 0, @@ -27390,13 +27438,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteKey", "group": "keys", "weight": 133, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-key.md", "rate-limit": 0, @@ -27460,13 +27508,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateOAuth2", "group": "auth", "weight": 111, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-o-auth2.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", "rate-limit": 0, @@ -27598,13 +27646,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listPlatforms", "group": "platforms", "weight": 136, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-platforms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-platforms.md", "rate-limit": 0, @@ -27656,13 +27704,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPlatform", "group": "platforms", "weight": 135, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-platform.md", "rate-limit": 0, @@ -27775,13 +27823,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPlatform", "group": "platforms", "weight": 137, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-platform.md", "rate-limit": 0, @@ -27843,13 +27891,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePlatform", "group": "platforms", "weight": 138, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-platform.md", "rate-limit": 0, @@ -27938,13 +27986,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deletePlatform", "group": "platforms", "weight": 139, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-platform.md", "rate-limit": 0, @@ -28008,13 +28056,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateServiceStatus", "group": "projects", "weight": 107, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-service-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status.md", "rate-limit": 0, @@ -28109,13 +28157,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", "weight": 108, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-service-status-all.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status-all.md", "rate-limit": 0, @@ -28188,13 +28236,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmtp", "group": "templates", "weight": 140, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-smtp.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-smtp.md", "rate-limit": 0, @@ -28306,13 +28354,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createSmtpTest", "group": "templates", "weight": 141, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-smtp-test.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-smtp-test.md", "rate-limit": 0, @@ -28437,13 +28485,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTeam", "group": "projects", "weight": 106, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-team.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", "rate-limit": 0, @@ -28516,13 +28564,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getEmailTemplate", "group": "templates", "weight": 143, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-email-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-email-template.md", "rate-limit": 0, @@ -28740,13 +28788,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", "weight": 145, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-email-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-email-template.md", "rate-limit": 0, @@ -29004,13 +29052,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", "weight": 147, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-email-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-email-template.md", "rate-limit": 0, @@ -29230,13 +29278,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSmsTemplate", "group": "templates", "weight": 142, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-sms-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-sms-template.md", "rate-limit": 0, @@ -29451,13 +29499,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", "weight": 144, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-sms-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-sms-template.md", "rate-limit": 0, @@ -29691,13 +29739,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", "weight": 146, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-sms-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-sms-template.md", "rate-limit": 0, @@ -29914,13 +29962,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listWebhooks", "group": "webhooks", "weight": 124, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-webhooks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-webhooks.md", "rate-limit": 0, @@ -29972,13 +30020,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createWebhook", "group": "webhooks", "weight": 123, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-webhook.md", "rate-limit": 0, @@ -30087,13 +30135,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getWebhook", "group": "webhooks", "weight": 125, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-webhook.md", "rate-limit": 0, @@ -30155,13 +30203,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateWebhook", "group": "webhooks", "weight": 126, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook.md", "rate-limit": 0, @@ -30271,13 +30319,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", "weight": 128, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-webhook.md", "rate-limit": 0, @@ -30341,13 +30389,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", "weight": 127, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-webhook-signature.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook-signature.md", "rate-limit": 0, @@ -30411,13 +30459,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRules", "group": null, "weight": 241, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/list-rules.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/list-rules.md", "rate-limit": 0, @@ -30485,13 +30533,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAPIRule", "group": null, "weight": 482, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-a-p-i-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for serving Appwrite's API on custom domain.", "rate-limit": 10, @@ -30552,13 +30600,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFunctionRule", "group": null, "weight": 484, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-function-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for executing Appwrite Function on custom domain.", "rate-limit": 10, @@ -30630,13 +30678,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRedirectRule", "group": null, "weight": 485, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-redirect-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for to redirect from custom domain to another domain.", "rate-limit": 10, @@ -30743,13 +30791,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSiteRule", "group": null, "weight": 483, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-site-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for serving Appwrite Site on custom domain.", "rate-limit": 10, @@ -30821,13 +30869,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRule", "group": null, "weight": 242, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/get-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/get-rule.md", "rate-limit": 0, @@ -30872,13 +30920,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRule", "group": null, "weight": 243, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/delete-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/delete-rule.md", "rate-limit": 0, @@ -30932,13 +30980,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRuleVerification", "group": null, "weight": 244, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/update-rule-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/update-rule-verification.md", "rate-limit": 0, @@ -30992,13 +31040,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "sites", "weight": 454, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's sites. You can use the query params to filter your results.", "rate-limit": 0, @@ -31062,13 +31110,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "sites", "weight": 452, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site.", "rate-limit": 0, @@ -31311,13 +31359,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFrameworks", "group": "frameworks", "weight": 457, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-frameworks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all frameworks that are currently available on the server instance.", "rate-limit": 0, @@ -31360,13 +31408,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "frameworks", "weight": 480, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed site specifications for this instance.", "rate-limit": 0, @@ -31410,13 +31458,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTemplates", "group": "templates", "weight": 476, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-templates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList available site templates. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", "rate-limit": 0, @@ -31510,13 +31558,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTemplate", "group": "templates", "weight": 477, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site template using ID. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", "rate-limit": 0, @@ -31570,13 +31618,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listUsage", "group": null, "weight": 478, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -31642,13 +31690,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "sites", "weight": 453, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site by its unique ID.", "rate-limit": 0, @@ -31701,13 +31749,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "sites", "weight": 455, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate site by its unique ID.", "rate-limit": 0, @@ -31946,13 +31994,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "sites", "weight": 456, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site by its unique ID.", "rate-limit": 0, @@ -32007,13 +32055,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", "weight": 463, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-site-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", "rate-limit": 0, @@ -32087,13 +32135,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 462, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the site's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -32170,13 +32218,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 458, "cookies": false, "type": "upload", - "deprecated": false, "demo": "sites\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID.", "rate-limit": 0, @@ -32271,13 +32319,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 466, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -32351,13 +32399,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 459, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/sites#listTemplates) to find the template details.", "rate-limit": 0, @@ -32454,13 +32502,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 460, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -32552,13 +32600,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 461, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment by its unique ID.", "rate-limit": 0, @@ -32614,13 +32662,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 464, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site deployment by its unique ID.", "rate-limit": 0, @@ -32678,13 +32726,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 465, "cookies": false, "type": "location", - "deprecated": false, "demo": "sites\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -32768,13 +32816,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 467, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -32839,13 +32887,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 469, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all site logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -32910,13 +32958,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getLog", "group": "logs", "weight": 468, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site request log by its unique ID.", "rate-limit": 0, @@ -32972,13 +33020,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteLog", "group": "logs", "weight": 470, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site log by its unique ID.", "rate-limit": 0, @@ -33043,13 +33091,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 479, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -33125,13 +33173,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 473, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific site.", "rate-limit": 0, @@ -33184,13 +33232,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 471, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", "rate-limit": 0, @@ -33275,13 +33323,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 472, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -33344,13 +33392,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 474, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -33435,13 +33483,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 475, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -33506,13 +33554,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listBuckets", "group": "buckets", "weight": 156, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-buckets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", "rate-limit": 0, @@ -33579,13 +33627,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBucket", "group": "buckets", "weight": 155, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/create-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", "rate-limit": 0, @@ -33706,13 +33754,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBucket", "group": "buckets", "weight": 157, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", "rate-limit": 0, @@ -33765,13 +33813,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBucket", "group": "buckets", "weight": 158, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", "rate-limit": 0, @@ -33889,13 +33937,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteBucket", "group": "buckets", "weight": 159, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", "rate-limit": 0, @@ -33950,13 +33998,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFiles", "group": "files", "weight": 161, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-files.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "rate-limit": 0, @@ -34036,13 +34084,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFile", "group": "files", "weight": 160, "cookies": false, "type": "upload", - "deprecated": false, "demo": "storage\/create-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "rate-limit": 60, @@ -34134,13 +34182,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFile", "group": "files", "weight": 162, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "rate-limit": 0, @@ -34206,13 +34254,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFile", "group": "files", "weight": 167, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "rate-limit": 60, @@ -34295,13 +34343,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteFile", "group": "files", "weight": 168, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", "rate-limit": 60, @@ -34362,13 +34410,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getFileDownload", "group": "files", "weight": 164, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "rate-limit": 0, @@ -34440,13 +34488,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFilePreview", "group": "files", "weight": 163, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-preview.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "rate-limit": 0, @@ -34668,13 +34716,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getFileView", "group": "files", "weight": 165, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-view.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "rate-limit": 0, @@ -34753,13 +34801,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 169, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", "rate-limit": 0, @@ -34825,13 +34873,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBucketUsage", "group": null, "weight": 170, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-bucket-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", "rate-limit": 0, @@ -34907,13 +34955,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "teams", "weight": 172, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "rate-limit": 0, @@ -34983,13 +35031,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "teams", "weight": 171, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "rate-limit": 0, @@ -35068,13 +35116,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "teams", "weight": 173, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "rate-limit": 0, @@ -35130,13 +35178,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "teams", "weight": 175, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "rate-limit": 0, @@ -35204,13 +35252,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "teams", "weight": 177, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "rate-limit": 0, @@ -35268,13 +35316,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 184, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md", "rate-limit": 0, @@ -35341,13 +35389,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 179, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "rate-limit": 0, @@ -35427,13 +35475,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMembership", "group": "memberships", "weight": 178, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "rate-limit": 10, @@ -35538,13 +35586,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMembership", "group": "memberships", "weight": 180, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "rate-limit": 0, @@ -35610,13 +35658,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembership", "group": "memberships", "weight": 181, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "rate-limit": 0, @@ -35697,13 +35745,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMembership", "group": "memberships", "weight": 183, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "rate-limit": 0, @@ -35771,13 +35819,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", "weight": 182, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "rate-limit": 0, @@ -35868,13 +35916,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "teams", "weight": 174, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "rate-limit": 0, @@ -35928,13 +35976,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "teams", "weight": 176, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "rate-limit": 0, @@ -36009,13 +36057,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "files", "weight": 488, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the tokens created for a specific file or bucket. You can use the query params to filter your results.", "rate-limit": 0, @@ -36089,13 +36137,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFileToken", "group": "files", "weight": 486, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/create-file-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, @@ -36178,13 +36226,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "tokens", "weight": 487, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a token by its unique ID.", "rate-limit": 0, @@ -36238,13 +36286,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "tokens", "weight": 489, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date.", "rate-limit": 60, @@ -36308,13 +36356,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "tokens", "weight": 490, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a token by its unique ID.", "rate-limit": 60, @@ -36370,13 +36418,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "users", "weight": 194, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", "rate-limit": 0, @@ -36443,13 +36491,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "users", "weight": 185, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", "rate-limit": 0, @@ -36531,13 +36579,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createArgon2User", "group": "users", "weight": 188, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-argon2user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, @@ -36616,13 +36664,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBcryptUser", "group": "users", "weight": 186, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-bcrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", "rate-limit": 0, @@ -36701,13 +36749,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 202, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", "rate-limit": 0, @@ -36769,13 +36817,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 225, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", "rate-limit": 0, @@ -36830,13 +36878,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMD5User", "group": "users", "weight": 187, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-m-d5user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, @@ -36915,13 +36963,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPHPassUser", "group": "users", "weight": 190, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-p-h-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, @@ -37000,13 +37048,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptUser", "group": "users", "weight": 191, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", "rate-limit": 0, @@ -37115,13 +37163,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", "weight": 192, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-modified-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", "rate-limit": 0, @@ -37218,13 +37266,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSHAUser", "group": "users", "weight": 189, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-s-h-a-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, @@ -37323,13 +37371,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 227, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", "rate-limit": 0, @@ -37395,13 +37443,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "users", "weight": 195, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", "rate-limit": 0, @@ -37447,13 +37495,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "users", "weight": 223, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", "rate-limit": 0, @@ -37508,13 +37556,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "users", "weight": 208, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", "rate-limit": 0, @@ -37588,13 +37636,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "sessions", "weight": 226, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, @@ -37670,13 +37718,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateLabels", "group": "users", "weight": 204, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-labels.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", "rate-limit": 0, @@ -37753,13 +37801,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 200, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", "rate-limit": 0, @@ -37827,13 +37875,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 199, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", "rate-limit": 0, @@ -37912,13 +37960,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfa", "group": "users", "weight": 213, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", "rate-limit": 0, @@ -37985,13 +38033,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 218, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -38061,13 +38109,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 214, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", "rate-limit": 0, @@ -38122,13 +38170,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 215, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -38181,13 +38229,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 217, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -38240,13 +38288,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 216, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -38301,13 +38349,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "users", "weight": 206, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", "rate-limit": 0, @@ -38381,13 +38429,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "users", "weight": 207, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", "rate-limit": 0, @@ -38461,13 +38509,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "users", "weight": 209, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", "rate-limit": 0, @@ -38541,13 +38589,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "users", "weight": 196, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", "rate-limit": 0, @@ -38600,13 +38648,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "users", "weight": 211, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", "rate-limit": 0, @@ -38680,13 +38728,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 198, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", "rate-limit": 0, @@ -38739,13 +38787,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 219, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", "rate-limit": 0, @@ -38791,13 +38839,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 222, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", "rate-limit": 0, @@ -38845,13 +38893,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 221, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", "rate-limit": 0, @@ -38916,13 +38964,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "users", "weight": 203, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", "rate-limit": 0, @@ -38996,13 +39044,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "targets", "weight": 201, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", "rate-limit": 0, @@ -39069,13 +39117,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTarget", "group": "targets", "weight": 193, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", "rate-limit": 0, @@ -39179,13 +39227,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTarget", "group": "targets", "weight": 197, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", "rate-limit": 0, @@ -39249,13 +39297,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTarget", "group": "targets", "weight": 212, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", "rate-limit": 0, @@ -39338,13 +39386,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTarget", "group": "targets", "weight": 224, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", "rate-limit": 0, @@ -39410,13 +39458,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createToken", "group": "sessions", "weight": 220, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", "rate-limit": 0, @@ -39492,13 +39540,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailVerification", "group": "users", "weight": 210, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", "rate-limit": 0, @@ -39572,13 +39620,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "users", "weight": 205, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", "rate-limit": 0, @@ -39652,13 +39700,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", "weight": 231, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/create-repository-detection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", "rate-limit": 0, @@ -39748,13 +39796,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRepositories", "group": "repositories", "weight": 232, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/list-repositories.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", "rate-limit": 0, @@ -39833,13 +39881,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRepository", "group": "repositories", "weight": 233, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/create-repository.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", "rate-limit": 0, @@ -39918,13 +39966,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRepository", "group": "repositories", "weight": 234, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/get-repository.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", "rate-limit": 0, @@ -39988,13 +40036,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", "weight": 235, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/list-repository-branches.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", "rate-limit": 0, @@ -40058,13 +40106,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", "weight": 230, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/get-repository-contents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", "rate-limit": 0, @@ -40143,13 +40191,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", "weight": 240, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/update-external-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", "rate-limit": 0, @@ -40232,13 +40280,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listInstallations", "group": "installations", "weight": 237, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/list-installations.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-installations.md", "rate-limit": 0, @@ -40306,13 +40354,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getInstallation", "group": "installations", "weight": 238, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/get-installation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-installation.md", "rate-limit": 0, @@ -40357,13 +40405,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteInstallation", "group": "installations", "weight": 239, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/delete-installation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/delete-installation.md", "rate-limit": 0, 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 1687389d96..5bfd8dc608 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -44,13 +44,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "account", "weight": 10, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", "rate-limit": 0, @@ -94,13 +94,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "account", "weight": 9, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", "rate-limit": 10, @@ -179,13 +179,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "account", "weight": 35, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "rate-limit": 0, @@ -256,13 +256,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 58, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "rate-limit": 0, @@ -316,13 +316,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 59, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "rate-limit": 0, @@ -380,13 +380,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "tokens", "weight": 30, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, @@ -429,13 +429,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 32, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "rate-limit": 0, @@ -496,13 +496,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMFA", "group": "mfa", "weight": 45, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-m-f-a.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, @@ -567,13 +567,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", "weight": 47, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "rate-limit": 0, @@ -634,13 +634,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", "weight": 48, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "rate-limit": 0, @@ -713,13 +713,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 52, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -782,13 +782,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", "weight": 53, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "rate-limit": 10, @@ -856,13 +856,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", "weight": 54, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", "rate-limit": 10, @@ -933,13 +933,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 46, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", "rate-limit": 0, @@ -985,13 +985,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 51, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -1035,13 +1035,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 49, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -1085,13 +1085,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 50, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -1137,13 +1137,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "account", "weight": 33, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "rate-limit": 0, @@ -1208,13 +1208,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "account", "weight": 34, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "rate-limit": 10, @@ -1284,13 +1284,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "account", "weight": 36, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "rate-limit": 0, @@ -1361,13 +1361,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "account", "weight": 31, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "rate-limit": 0, @@ -1411,13 +1411,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "account", "weight": 37, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "rate-limit": 0, @@ -1482,13 +1482,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRecovery", "group": "recovery", "weight": 39, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", "rate-limit": 10, @@ -1560,13 +1560,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRecovery", "group": "recovery", "weight": 40, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "rate-limit": 10, @@ -1643,13 +1643,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 12, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "rate-limit": 0, @@ -1686,13 +1686,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 13, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", "rate-limit": 100, @@ -1738,13 +1738,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAnonymousSession", "group": "sessions", "weight": 18, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-anonymous-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", "rate-limit": 50, @@ -1787,13 +1787,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailPasswordSession", "group": "sessions", "weight": 17, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-password-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "rate-limit": 10, @@ -1861,13 +1861,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateMagicURLSession", "group": "sessions", "weight": 27, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-magic-u-r-l-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1879,6 +1879,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -1935,13 +1936,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updatePhoneSession", "group": "sessions", "weight": 28, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-phone-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1953,6 +1954,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2009,13 +2011,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 19, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2083,13 +2085,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSession", "group": "sessions", "weight": 14, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", "rate-limit": 0, @@ -2145,13 +2147,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSession", "group": "sessions", "weight": 16, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", "rate-limit": 10, @@ -2200,13 +2202,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 15, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", "rate-limit": 100, @@ -2264,13 +2266,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "account", "weight": 38, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", "rate-limit": 0, @@ -2316,13 +2318,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailToken", "group": "tokens", "weight": 26, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", "rate-limit": 10, @@ -2398,13 +2400,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMagicURLToken", "group": "tokens", "weight": 25, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-magic-u-r-l-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, @@ -2478,13 +2480,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Token", "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, @@ -2620,13 +2622,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneToken", "group": "tokens", "weight": 29, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", "rate-limit": 10, @@ -2697,13 +2699,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVerification", "group": "verification", "weight": 41, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", "rate-limit": 10, @@ -2766,13 +2768,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVerification", "group": "verification", "weight": 42, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", "rate-limit": 10, @@ -2843,13 +2845,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneVerification", "group": "verification", "weight": 43, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", "rate-limit": 10, @@ -2896,13 +2898,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "verification", "weight": 44, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", "rate-limit": 10, @@ -2966,13 +2968,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getBrowser", "group": null, "weight": 61, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-browser.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "rate-limit": 0, @@ -3094,13 +3096,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getCreditCard", "group": null, "weight": 60, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-credit-card.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "rate-limit": 0, @@ -3228,13 +3230,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFavicon", "group": null, "weight": 64, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-favicon.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "rate-limit": 0, @@ -3288,13 +3290,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFlag", "group": null, "weight": 62, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-flag.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "rate-limit": 0, @@ -3778,13 +3780,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getImage", "group": null, "weight": 63, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-image.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "rate-limit": 0, @@ -3862,13 +3864,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getInitials", "group": null, "weight": 66, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-initials.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "rate-limit": 0, @@ -3956,13 +3958,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getQR", "group": null, "weight": 65, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-q-r.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, @@ -4057,13 +4059,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "databases", "weight": 321, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", "rate-limit": 0, @@ -4131,13 +4133,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "databases", "weight": 317, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", "rate-limit": 0, @@ -4211,13 +4213,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "databases", "weight": 318, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", "rate-limit": 0, @@ -4271,13 +4273,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "databases", "weight": 319, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", "rate-limit": 0, @@ -4348,13 +4350,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "databases", "weight": 320, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", "rate-limit": 0, @@ -4410,16 +4412,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listCollections", "group": "collections", "weight": 329, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.list" - }, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4430,6 +4429,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.list" + }, "auth": { "Project": [], "Key": [] @@ -4497,16 +4500,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createCollection", "group": "collections", "weight": 325, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createTable" - }, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -4517,6 +4517,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createTable" + }, "auth": { "Project": [], "Key": [] @@ -4605,16 +4609,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getCollection", "group": "collections", "weight": 326, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getTable" - }, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -4625,6 +4626,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getTable" + }, "auth": { "Project": [], "Key": [] @@ -4678,16 +4683,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateCollection", "group": "collections", "weight": 327, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateTable" - }, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -4698,6 +4700,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateTable" + }, "auth": { "Project": [], "Key": [] @@ -4781,16 +4787,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteCollection", "group": "collections", "weight": 328, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteTable" - }, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -4801,6 +4804,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteTable" + }, "auth": { "Project": [], "Key": [] @@ -4856,16 +4863,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listAttributes", "group": "attributes", "weight": 346, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listColumns" - }, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -4876,6 +4880,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumns" + }, "auth": { "Project": [], "Key": [] @@ -4944,16 +4952,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", "weight": 347, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" - }, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -4964,6 +4969,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createBooleanColumn" + }, "auth": { "Project": [], "Key": [] @@ -5054,16 +5063,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", "weight": 348, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" - }, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5074,6 +5080,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateBooleanColumn" + }, "auth": { "Project": [], "Key": [] @@ -5169,16 +5179,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", "weight": 349, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" - }, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5189,6 +5196,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createDatetimeColumn" + }, "auth": { "Project": [], "Key": [] @@ -5279,16 +5290,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", "weight": 350, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" - }, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5299,6 +5307,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn" + }, "auth": { "Project": [], "Key": [] @@ -5394,16 +5406,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", "weight": 351, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" - }, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5414,6 +5423,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEmailColumn" + }, "auth": { "Project": [], "Key": [] @@ -5504,16 +5517,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", "weight": 352, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" - }, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -5524,6 +5534,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEmailColumn" + }, "auth": { "Project": [], "Key": [] @@ -5619,16 +5633,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", "weight": 353, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" - }, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -5639,6 +5650,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEnumColumn" + }, "auth": { "Project": [], "Key": [] @@ -5738,16 +5753,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", "weight": 354, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" - }, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -5758,6 +5770,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEnumColumn" + }, "auth": { "Project": [], "Key": [] @@ -5862,16 +5878,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", "weight": 355, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" - }, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -5882,6 +5895,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createFloatColumn" + }, "auth": { "Project": [], "Key": [] @@ -5982,16 +5999,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", "weight": 356, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" - }, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6002,6 +6016,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateFloatColumn" + }, "auth": { "Project": [], "Key": [] @@ -6107,16 +6125,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", "weight": 357, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" - }, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6127,6 +6142,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIntegerColumn" + }, "auth": { "Project": [], "Key": [] @@ -6227,16 +6246,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", "weight": 358, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" - }, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6247,6 +6263,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIntegerColumn" + }, "auth": { "Project": [], "Key": [] @@ -6352,16 +6372,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIpAttribute", "group": "attributes", "weight": 359, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createIpColumn" - }, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6372,6 +6389,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIpColumn" + }, "auth": { "Project": [], "Key": [] @@ -6462,16 +6483,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", "weight": 360, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" - }, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6482,6 +6500,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIpColumn" + }, "auth": { "Project": [], "Key": [] @@ -6577,16 +6599,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", "weight": 361, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" - }, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -6597,6 +6616,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRelationshipColumn" + }, "auth": { "Project": [], "Key": [] @@ -6712,16 +6735,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createStringAttribute", "group": "attributes", "weight": 363, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createStringColumn" - }, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -6732,6 +6752,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createStringColumn" + }, "auth": { "Project": [], "Key": [] @@ -6833,16 +6857,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", "weight": 364, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" - }, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -6853,6 +6874,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateStringColumn" + }, "auth": { "Project": [], "Key": [] @@ -6953,16 +6978,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", "weight": 365, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" - }, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -6973,6 +6995,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createUrlColumn" + }, "auth": { "Project": [], "Key": [] @@ -7063,16 +7089,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", "weight": 366, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" - }, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7083,6 +7106,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateUrlColumn" + }, "auth": { "Project": [], "Key": [] @@ -7209,16 +7236,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getAttribute", "group": "attributes", "weight": 344, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getColumn" - }, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7229,6 +7253,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumn" + }, "auth": { "Project": [], "Key": [] @@ -7284,16 +7312,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteAttribute", "group": "attributes", "weight": 345, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteColumn" - }, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7304,6 +7329,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumn" + }, "auth": { "Project": [], "Key": [] @@ -7368,16 +7397,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", "weight": 362, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" - }, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7388,6 +7414,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn" + }, "auth": { "Project": [], "Key": [] @@ -7480,16 +7510,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocuments", "group": "documents", "weight": 340, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listRows" - }, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7502,6 +7529,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "auth": { "Project": [], "Session": [] @@ -7570,16 +7601,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDocument", "group": "documents", "weight": 332, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createRow" - }, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -7592,6 +7620,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "methods": [ { "name": "createDocument", @@ -7738,16 +7770,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocuments", "group": "documents", "weight": 337, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.upsertRows" - }, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -7759,6 +7788,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRows" + }, "methods": [ { "name": "upsertDocuments", @@ -7852,16 +7885,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocuments", "group": "documents", "weight": 335, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRows" - }, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -7873,6 +7903,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRows" + }, "auth": { "Project": [], "Key": [] @@ -7950,16 +7984,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocuments", "group": "documents", "weight": 339, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteRows" - }, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -7971,6 +8002,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRows" + }, "auth": { "Project": [], "Key": [] @@ -8045,16 +8080,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getDocument", "group": "documents", "weight": 333, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getRow" - }, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8067,6 +8099,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "auth": { "Project": [], "Session": [] @@ -8145,16 +8181,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocument", "group": "documents", "weight": 336, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.upsertRow" - }, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8167,6 +8200,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "methods": [ { "name": "upsertDocument", @@ -8278,16 +8315,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocument", "group": "documents", "weight": 334, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRow" - }, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8300,6 +8334,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "auth": { "Project": [], "Session": [] @@ -8382,16 +8420,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocument", "group": "documents", "weight": 338, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteRow" - }, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8404,6 +8439,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "auth": { "Project": [], "Session": [] @@ -8471,16 +8510,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", "weight": 343, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.decrementColumn" - }, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -8492,6 +8528,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.decrementColumn" + }, "auth": { "Project": [], "Key": [] @@ -8587,16 +8627,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", "weight": 342, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.incrementColumn" - }, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -8608,6 +8645,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.incrementColumn" + }, "auth": { "Project": [], "Key": [] @@ -8703,16 +8744,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 370, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listColumnIndexes" - }, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -8723,6 +8761,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumnIndexes" + }, "auth": { "Project": [], "Key": [] @@ -8789,16 +8831,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 367, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createColumnIndex" - }, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -8809,6 +8848,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createColumnIndex" + }, "auth": { "Project": [], "Key": [] @@ -8921,16 +8964,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 368, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getColumnIndex" - }, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -8941,6 +8981,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumnIndex" + }, "auth": { "Project": [], "Key": [] @@ -8996,16 +9040,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 369, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteColumnIndex" - }, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9016,6 +9057,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumnIndex" + }, "auth": { "Project": [], "Key": [] @@ -9080,13 +9125,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": null, "weight": 375, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, @@ -9164,13 +9209,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": null, "weight": 371, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, @@ -9269,13 +9314,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 372, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, @@ -9339,13 +9384,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": null, "weight": 373, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, @@ -9439,13 +9484,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": null, "weight": 374, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, @@ -9511,13 +9556,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listColumns", "group": "columns", "weight": 380, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -9596,13 +9641,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBooleanColumn", "group": "columns", "weight": 381, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, @@ -9703,13 +9748,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", "weight": 382, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, @@ -9815,13 +9860,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", "weight": 383, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, @@ -9922,13 +9967,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", "weight": 384, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, @@ -10034,13 +10079,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailColumn", "group": "columns", "weight": 385, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, @@ -10141,13 +10186,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailColumn", "group": "columns", "weight": 386, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, @@ -10253,13 +10298,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEnumColumn", "group": "columns", "weight": 387, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, @@ -10369,13 +10414,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEnumColumn", "group": "columns", "weight": 388, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, @@ -10490,13 +10535,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFloatColumn", "group": "columns", "weight": 389, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, @@ -10607,13 +10652,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFloatColumn", "group": "columns", "weight": 390, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, @@ -10729,13 +10774,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIntegerColumn", "group": "columns", "weight": 391, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, @@ -10846,13 +10891,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", "weight": 392, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, @@ -10968,13 +11013,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIpColumn", "group": "columns", "weight": 393, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, @@ -11075,13 +11120,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIpColumn", "group": "columns", "weight": 394, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, @@ -11187,13 +11232,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", "weight": 395, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, @@ -11319,13 +11364,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createStringColumn", "group": "columns", "weight": 397, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, @@ -11437,13 +11482,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStringColumn", "group": "columns", "weight": 398, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, @@ -11554,13 +11599,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createUrlColumn", "group": "columns", "weight": 399, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, @@ -11661,13 +11706,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateUrlColumn", "group": "columns", "weight": 400, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, @@ -11804,13 +11849,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getColumn", "group": "columns", "weight": 378, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, @@ -11876,13 +11921,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteColumn", "group": "columns", "weight": 379, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, @@ -11957,13 +12002,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", "weight": 396, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, @@ -12066,13 +12111,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 404, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -12149,13 +12194,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 401, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -12278,13 +12323,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 402, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -12350,13 +12395,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 403, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -12431,13 +12476,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRows", "group": "rows", "weight": 413, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, @@ -12518,13 +12563,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRow", "group": "rows", "weight": 405, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, @@ -12683,13 +12728,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRows", "group": "rows", "weight": 410, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, @@ -12794,13 +12839,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRows", "group": "rows", "weight": 408, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, @@ -12889,13 +12934,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteRows", "group": "rows", "weight": 412, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, @@ -12981,13 +13026,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRow", "group": "rows", "weight": 406, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, @@ -13078,13 +13123,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRow", "group": "rows", "weight": 409, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, @@ -13205,13 +13250,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRow", "group": "rows", "weight": 407, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, @@ -13306,13 +13351,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRow", "group": "rows", "weight": 411, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, @@ -13392,13 +13437,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "decrementRowColumn", "group": "rows", "weight": 416, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, @@ -13505,13 +13550,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "incrementRowColumn", "group": "rows", "weight": 415, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, @@ -13618,13 +13663,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "functions", "weight": 425, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's functions. You can use the query params to filter your results.", "rate-limit": 0, @@ -13692,13 +13737,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "functions", "weight": 422, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", "rate-limit": 0, @@ -13926,13 +13971,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRuntimes", "group": "runtimes", "weight": 427, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-runtimes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all runtimes that are currently active on your instance.", "rate-limit": 0, @@ -13976,13 +14021,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "runtimes", "weight": 428, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed function specifications for this instance.", "rate-limit": 0, @@ -14027,13 +14072,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "functions", "weight": 423, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function by its unique ID.", "rate-limit": 0, @@ -14087,13 +14132,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "functions", "weight": 424, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate function by its unique ID.", "rate-limit": 0, @@ -14318,13 +14363,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "functions", "weight": 426, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function by its unique ID.", "rate-limit": 0, @@ -14380,13 +14425,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", "weight": 431, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-function-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", "rate-limit": 0, @@ -14461,13 +14506,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 432, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the function's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -14545,13 +14590,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 429, "cookies": false, "type": "upload", - "deprecated": false, "demo": "functions\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "rate-limit": 0, @@ -14642,13 +14687,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 437, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -14728,13 +14773,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 434, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/functions#listTemplates) to find the template details.", "rate-limit": 0, @@ -14832,13 +14877,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 435, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -14930,13 +14975,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 430, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment by its unique ID.", "rate-limit": 0, @@ -14993,13 +15038,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 433, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a code deployment by its unique ID.", "rate-limit": 0, @@ -15058,13 +15103,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 436, "cookies": false, "type": "location", - "deprecated": false, "demo": "functions\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -15149,13 +15194,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 438, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -15221,13 +15266,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listExecutions", "group": "executions", "weight": 441, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-executions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -15298,13 +15343,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createExecution", "group": "executions", "weight": 439, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", "rate-limit": 0, @@ -15415,13 +15460,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getExecution", "group": "executions", "weight": 440, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.", "rate-limit": 0, @@ -15482,13 +15527,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteExecution", "group": "executions", "weight": 442, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function execution by its unique ID.", "rate-limit": 0, @@ -15554,13 +15599,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 447, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific function.", "rate-limit": 0, @@ -15614,13 +15659,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 445, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", "rate-limit": 0, @@ -15706,13 +15751,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 446, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -15776,13 +15821,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 448, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -15868,13 +15913,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 449, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -15940,13 +15985,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "query", "group": "graphql", "weight": 255, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/query.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -15994,13 +16039,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "mutation", "group": "graphql", "weight": 254, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/mutation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -16048,13 +16093,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "health", "weight": 78, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", "rate-limit": 0, @@ -16098,13 +16143,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getAntivirus", "group": "health", "weight": 99, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-antivirus.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", "rate-limit": 0, @@ -16148,13 +16193,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCache", "group": "health", "weight": 81, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-cache.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", "rate-limit": 0, @@ -16198,13 +16243,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCertificate", "group": "health", "weight": 86, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-certificate.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", "rate-limit": 0, @@ -16259,13 +16304,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDB", "group": "health", "weight": 80, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-d-b.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, @@ -16309,13 +16354,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPubSub", "group": "health", "weight": 82, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-pub-sub.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", "rate-limit": 0, @@ -16359,13 +16404,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueBuilds", "group": "queue", "weight": 88, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-builds.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", "rate-limit": 0, @@ -16422,13 +16467,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueCertificates", "group": "queue", "weight": 87, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-certificates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", "rate-limit": 0, @@ -16485,13 +16530,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDatabases", "group": "queue", "weight": 89, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-databases.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", "rate-limit": 0, @@ -16559,13 +16604,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDeletes", "group": "queue", "weight": 90, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-deletes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", "rate-limit": 0, @@ -16622,13 +16667,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFailedJobs", "group": "queue", "weight": 100, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-failed-jobs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", "rate-limit": 0, @@ -16711,13 +16756,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueFunctions", "group": "queue", "weight": 94, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-functions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", "rate-limit": 0, @@ -16774,13 +16819,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueLogs", "group": "queue", "weight": 85, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", "rate-limit": 0, @@ -16837,13 +16882,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMails", "group": "queue", "weight": 91, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-mails.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", "rate-limit": 0, @@ -16900,13 +16945,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMessaging", "group": "queue", "weight": 92, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-messaging.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", "rate-limit": 0, @@ -16963,13 +17008,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMigrations", "group": "queue", "weight": 93, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-migrations.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", "rate-limit": 0, @@ -17026,13 +17071,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", "weight": 95, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-stats-resources.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", "rate-limit": 0, @@ -17089,13 +17134,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueUsage", "group": "queue", "weight": 96, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", "rate-limit": 0, @@ -17152,13 +17197,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", "weight": 84, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-webhooks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", "rate-limit": 0, @@ -17215,13 +17260,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorage", "group": "storage", "weight": 98, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", "rate-limit": 0, @@ -17265,13 +17310,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorageLocal", "group": "storage", "weight": 97, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage-local.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", "rate-limit": 0, @@ -17315,13 +17360,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTime", "group": "health", "weight": 83, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-time.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", "rate-limit": 0, @@ -17365,13 +17410,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 70, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "rate-limit": 0, @@ -17419,13 +17464,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCodes", "group": null, "weight": 71, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "rate-limit": 0, @@ -17473,13 +17518,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listContinents", "group": null, "weight": 75, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-continents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "rate-limit": 0, @@ -17527,13 +17572,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountries", "group": null, "weight": 72, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "rate-limit": 0, @@ -17581,13 +17626,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesEU", "group": null, "weight": 73, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-e-u.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, @@ -17635,13 +17680,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesPhones", "group": null, "weight": 74, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-phones.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "rate-limit": 0, @@ -17689,13 +17734,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCurrencies", "group": null, "weight": 76, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-currencies.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "rate-limit": 0, @@ -17743,13 +17788,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLanguages", "group": null, "weight": 77, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-languages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "rate-limit": 0, @@ -17797,13 +17842,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessages", "group": "messages", "weight": 309, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-messages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", "rate-limit": 0, @@ -17874,13 +17919,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmail", "group": "messages", "weight": 306, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", "rate-limit": 0, @@ -18019,13 +18064,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "messages", "weight": 313, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", "rate-limit": 0, @@ -18166,13 +18211,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPush", "group": "messages", "weight": 308, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", "rate-limit": 0, @@ -18341,13 +18386,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePush", "group": "messages", "weight": 315, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", "rate-limit": 0, @@ -18520,13 +18565,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSms", "group": "messages", "weight": 307, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", "rate-limit": 0, @@ -18630,13 +18675,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSms", "group": "messages", "weight": 314, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, @@ -18743,13 +18788,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMessage", "group": "messages", "weight": 312, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-message.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", "rate-limit": 0, @@ -18797,13 +18842,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "messages", "weight": 316, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", "rate-limit": 0, @@ -18860,13 +18905,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessageLogs", "group": "logs", "weight": 310, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-message-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", "rate-limit": 0, @@ -18936,13 +18981,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "messages", "weight": 311, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", "rate-limit": 0, @@ -19012,13 +19057,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviders", "group": "providers", "weight": 281, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-providers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", "rate-limit": 0, @@ -19089,13 +19134,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createApnsProvider", "group": "providers", "weight": 280, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", "rate-limit": 0, @@ -19195,13 +19240,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", "weight": 293, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", "rate-limit": 0, @@ -19304,13 +19349,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFcmProvider", "group": "providers", "weight": 279, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", "rate-limit": 0, @@ -19390,13 +19435,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", "weight": 292, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", "rate-limit": 0, @@ -19479,13 +19524,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMailgunProvider", "group": "providers", "weight": 271, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", "rate-limit": 0, @@ -19595,13 +19640,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", "weight": 284, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", "rate-limit": 0, @@ -19714,13 +19759,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMsg91Provider", "group": "providers", "weight": 274, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, @@ -19810,13 +19855,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", "weight": 287, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, @@ -19909,13 +19954,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSendgridProvider", "group": "providers", "weight": 272, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "rate-limit": 0, @@ -20015,13 +20060,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", "weight": 285, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "rate-limit": 0, @@ -20124,13 +20169,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", "weight": 273, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", "rate-limit": 0, @@ -20268,13 +20313,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", "weight": 286, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", "rate-limit": 0, @@ -20414,13 +20459,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTelesignProvider", "group": "providers", "weight": 275, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", "rate-limit": 0, @@ -20510,13 +20555,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", "weight": 288, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", "rate-limit": 0, @@ -20609,13 +20654,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", "weight": 276, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", "rate-limit": 0, @@ -20705,13 +20750,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", "weight": 289, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", "rate-limit": 0, @@ -20804,13 +20849,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTwilioProvider", "group": "providers", "weight": 277, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", "rate-limit": 0, @@ -20900,13 +20945,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", "weight": 290, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", "rate-limit": 0, @@ -20999,13 +21044,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVonageProvider", "group": "providers", "weight": 278, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", "rate-limit": 0, @@ -21095,13 +21140,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVonageProvider", "group": "providers", "weight": 291, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", "rate-limit": 0, @@ -21194,13 +21239,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getProvider", "group": "providers", "weight": 283, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", "rate-limit": 0, @@ -21248,13 +21293,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteProvider", "group": "providers", "weight": 294, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", "rate-limit": 0, @@ -21311,13 +21356,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviderLogs", "group": "providers", "weight": 282, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-provider-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", "rate-limit": 0, @@ -21387,13 +21432,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", "weight": 303, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscriber-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", "rate-limit": 0, @@ -21463,13 +21508,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopics", "group": "topics", "weight": 296, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topics.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", "rate-limit": 0, @@ -21538,13 +21583,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTopic", "group": "topics", "weight": 295, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", "rate-limit": 0, @@ -21622,13 +21667,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTopic", "group": "topics", "weight": 298, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", "rate-limit": 0, @@ -21683,13 +21728,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTopic", "group": "topics", "weight": 299, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", "rate-limit": 0, @@ -21761,13 +21806,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTopic", "group": "topics", "weight": 300, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", "rate-limit": 0, @@ -21824,13 +21869,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopicLogs", "group": "topics", "weight": 297, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topic-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", "rate-limit": 0, @@ -21900,13 +21945,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscribers", "group": "subscribers", "weight": 302, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscribers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "rate-limit": 0, @@ -21985,13 +22030,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSubscriber", "group": "subscribers", "weight": 301, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "rate-limit": 0, @@ -22077,13 +22122,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSubscriber", "group": "subscribers", "weight": 304, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "rate-limit": 0, @@ -22141,13 +22186,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", "weight": 305, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "rate-limit": 0, @@ -22218,13 +22263,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "sites", "weight": 454, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's sites. You can use the query params to filter your results.", "rate-limit": 0, @@ -22289,13 +22334,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "sites", "weight": 452, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site.", "rate-limit": 0, @@ -22539,13 +22584,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFrameworks", "group": "frameworks", "weight": 457, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-frameworks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all frameworks that are currently available on the server instance.", "rate-limit": 0, @@ -22589,13 +22634,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "frameworks", "weight": 480, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed site specifications for this instance.", "rate-limit": 0, @@ -22640,13 +22685,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "sites", "weight": 453, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site by its unique ID.", "rate-limit": 0, @@ -22700,13 +22745,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "sites", "weight": 455, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate site by its unique ID.", "rate-limit": 0, @@ -22946,13 +22991,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "sites", "weight": 456, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site by its unique ID.", "rate-limit": 0, @@ -23008,13 +23053,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", "weight": 463, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-site-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", "rate-limit": 0, @@ -23089,13 +23134,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 462, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the site's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -23173,13 +23218,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 458, "cookies": false, "type": "upload", - "deprecated": false, "demo": "sites\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID.", "rate-limit": 0, @@ -23275,13 +23320,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 466, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -23356,13 +23401,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 459, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/sites#listTemplates) to find the template details.", "rate-limit": 0, @@ -23460,13 +23505,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 460, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -23559,13 +23604,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 461, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment by its unique ID.", "rate-limit": 0, @@ -23622,13 +23667,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 464, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site deployment by its unique ID.", "rate-limit": 0, @@ -23687,13 +23732,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 465, "cookies": false, "type": "location", - "deprecated": false, "demo": "sites\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -23778,13 +23823,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 467, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -23850,13 +23895,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 469, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all site logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -23922,13 +23967,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getLog", "group": "logs", "weight": 468, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site request log by its unique ID.", "rate-limit": 0, @@ -23985,13 +24030,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteLog", "group": "logs", "weight": 470, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site log by its unique ID.", "rate-limit": 0, @@ -24057,13 +24102,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 473, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific site.", "rate-limit": 0, @@ -24117,13 +24162,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 471, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", "rate-limit": 0, @@ -24209,13 +24254,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 472, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -24279,13 +24324,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 474, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -24371,13 +24416,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 475, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -24443,13 +24488,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listBuckets", "group": "buckets", "weight": 156, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-buckets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", "rate-limit": 0, @@ -24517,13 +24562,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBucket", "group": "buckets", "weight": 155, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/create-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", "rate-limit": 0, @@ -24645,13 +24690,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBucket", "group": "buckets", "weight": 157, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", "rate-limit": 0, @@ -24705,13 +24750,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBucket", "group": "buckets", "weight": 158, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", "rate-limit": 0, @@ -24830,13 +24875,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteBucket", "group": "buckets", "weight": 159, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", "rate-limit": 0, @@ -24892,13 +24937,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFiles", "group": "files", "weight": 161, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-files.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "rate-limit": 0, @@ -24980,13 +25025,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFile", "group": "files", "weight": 160, "cookies": false, "type": "upload", - "deprecated": false, "demo": "storage\/create-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "rate-limit": 60, @@ -25080,13 +25125,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFile", "group": "files", "weight": 162, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "rate-limit": 0, @@ -25154,13 +25199,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFile", "group": "files", "weight": 167, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "rate-limit": 60, @@ -25245,13 +25290,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteFile", "group": "files", "weight": 168, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", "rate-limit": 60, @@ -25314,13 +25359,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getFileDownload", "group": "files", "weight": 164, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "rate-limit": 0, @@ -25394,13 +25439,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFilePreview", "group": "files", "weight": 163, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-preview.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "rate-limit": 0, @@ -25624,13 +25669,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getFileView", "group": "files", "weight": 165, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-view.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "rate-limit": 0, @@ -25711,13 +25756,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "teams", "weight": 172, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "rate-limit": 0, @@ -25789,13 +25834,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "teams", "weight": 171, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "rate-limit": 0, @@ -25876,13 +25921,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "teams", "weight": 173, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "rate-limit": 0, @@ -25940,13 +25985,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "teams", "weight": 175, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "rate-limit": 0, @@ -26016,13 +26061,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "teams", "weight": 177, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "rate-limit": 0, @@ -26082,13 +26127,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 179, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "rate-limit": 0, @@ -26170,13 +26215,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMembership", "group": "memberships", "weight": 178, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "rate-limit": 10, @@ -26283,13 +26328,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMembership", "group": "memberships", "weight": 180, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "rate-limit": 0, @@ -26357,13 +26402,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembership", "group": "memberships", "weight": 181, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "rate-limit": 0, @@ -26446,13 +26491,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMembership", "group": "memberships", "weight": 183, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "rate-limit": 0, @@ -26522,13 +26567,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", "weight": 182, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "rate-limit": 0, @@ -26621,13 +26666,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "teams", "weight": 174, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "rate-limit": 0, @@ -26683,13 +26728,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "teams", "weight": 176, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "rate-limit": 0, @@ -26766,13 +26811,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "files", "weight": 488, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the tokens created for a specific file or bucket. You can use the query params to filter your results.", "rate-limit": 0, @@ -26847,13 +26892,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFileToken", "group": "files", "weight": 486, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/create-file-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, @@ -26937,13 +26982,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "tokens", "weight": 487, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a token by its unique ID.", "rate-limit": 0, @@ -26998,13 +27043,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "tokens", "weight": 489, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date.", "rate-limit": 60, @@ -27069,13 +27114,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "tokens", "weight": 490, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a token by its unique ID.", "rate-limit": 60, @@ -27132,13 +27177,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "users", "weight": 194, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", "rate-limit": 0, @@ -27206,13 +27251,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "users", "weight": 185, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", "rate-limit": 0, @@ -27295,13 +27340,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createArgon2User", "group": "users", "weight": 188, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-argon2user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, @@ -27381,13 +27426,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBcryptUser", "group": "users", "weight": 186, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-bcrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", "rate-limit": 0, @@ -27467,13 +27512,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 202, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", "rate-limit": 0, @@ -27536,13 +27581,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 225, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", "rate-limit": 0, @@ -27598,13 +27643,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMD5User", "group": "users", "weight": 187, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-m-d5user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, @@ -27684,13 +27729,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPHPassUser", "group": "users", "weight": 190, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-p-h-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, @@ -27770,13 +27815,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptUser", "group": "users", "weight": 191, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", "rate-limit": 0, @@ -27886,13 +27931,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", "weight": 192, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-modified-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", "rate-limit": 0, @@ -27990,13 +28035,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSHAUser", "group": "users", "weight": 189, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-s-h-a-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, @@ -28096,13 +28141,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "users", "weight": 195, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", "rate-limit": 0, @@ -28149,13 +28194,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "users", "weight": 223, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", "rate-limit": 0, @@ -28211,13 +28256,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "users", "weight": 208, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", "rate-limit": 0, @@ -28292,13 +28337,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "sessions", "weight": 226, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, @@ -28375,13 +28420,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateLabels", "group": "users", "weight": 204, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-labels.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", "rate-limit": 0, @@ -28459,13 +28504,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 200, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", "rate-limit": 0, @@ -28534,13 +28579,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 199, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", "rate-limit": 0, @@ -28620,13 +28665,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfa", "group": "users", "weight": 213, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", "rate-limit": 0, @@ -28694,13 +28739,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 218, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -28771,13 +28816,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 214, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", "rate-limit": 0, @@ -28833,13 +28878,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 215, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -28893,13 +28938,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 217, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -28953,13 +28998,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 216, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -29015,13 +29060,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "users", "weight": 206, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", "rate-limit": 0, @@ -29096,13 +29141,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "users", "weight": 207, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", "rate-limit": 0, @@ -29177,13 +29222,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "users", "weight": 209, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", "rate-limit": 0, @@ -29258,13 +29303,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "users", "weight": 196, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", "rate-limit": 0, @@ -29318,13 +29363,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "users", "weight": 211, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", "rate-limit": 0, @@ -29399,13 +29444,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 198, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", "rate-limit": 0, @@ -29459,13 +29504,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 219, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", "rate-limit": 0, @@ -29512,13 +29557,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 222, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", "rate-limit": 0, @@ -29567,13 +29612,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 221, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", "rate-limit": 0, @@ -29639,13 +29684,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "users", "weight": 203, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", "rate-limit": 0, @@ -29720,13 +29765,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "targets", "weight": 201, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", "rate-limit": 0, @@ -29794,13 +29839,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTarget", "group": "targets", "weight": 193, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", "rate-limit": 0, @@ -29905,13 +29950,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTarget", "group": "targets", "weight": 197, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", "rate-limit": 0, @@ -29976,13 +30021,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTarget", "group": "targets", "weight": 212, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", "rate-limit": 0, @@ -30066,13 +30111,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTarget", "group": "targets", "weight": 224, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", "rate-limit": 0, @@ -30139,13 +30184,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createToken", "group": "sessions", "weight": 220, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", "rate-limit": 0, @@ -30222,13 +30267,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailVerification", "group": "users", "weight": 210, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", "rate-limit": 0, @@ -30303,13 +30348,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "users", "weight": 205, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", "rate-limit": 0, diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 808b13d88a..7a19a217c7 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -90,13 +90,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "account", "weight": 10, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", "rate-limit": 0, @@ -141,13 +141,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "account", "weight": 9, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", "rate-limit": 10, @@ -232,13 +232,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "account", "weight": 35, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "rate-limit": 0, @@ -310,13 +310,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 58, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "rate-limit": 0, @@ -372,13 +372,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 59, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "rate-limit": 0, @@ -435,13 +435,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "tokens", "weight": 30, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, @@ -484,13 +484,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 32, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "rate-limit": 0, @@ -551,13 +551,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMFA", "group": "mfa", "weight": 45, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-m-f-a.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, @@ -624,13 +624,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", "weight": 47, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "rate-limit": 0, @@ -690,13 +690,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", "weight": 48, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "rate-limit": 0, @@ -769,13 +769,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 52, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -837,13 +837,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", "weight": 53, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "rate-limit": 10, @@ -914,13 +914,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", "weight": 54, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", "rate-limit": 10, @@ -992,13 +992,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 46, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", "rate-limit": 0, @@ -1043,13 +1043,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 51, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -1094,13 +1094,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 49, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -1145,13 +1145,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 50, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -1198,13 +1198,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "account", "weight": 33, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "rate-limit": 0, @@ -1271,13 +1271,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "account", "weight": 34, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "rate-limit": 10, @@ -1350,13 +1350,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "account", "weight": 36, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "rate-limit": 0, @@ -1428,13 +1428,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "account", "weight": 31, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "rate-limit": 0, @@ -1479,13 +1479,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "account", "weight": 37, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "rate-limit": 0, @@ -1552,13 +1552,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRecovery", "group": "recovery", "weight": 39, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", "rate-limit": 10, @@ -1633,13 +1633,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRecovery", "group": "recovery", "weight": 40, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "rate-limit": 10, @@ -1718,13 +1718,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 12, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "rate-limit": 0, @@ -1764,13 +1764,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 13, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", "rate-limit": 100, @@ -1817,13 +1817,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAnonymousSession", "group": "sessions", "weight": 18, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-anonymous-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", "rate-limit": 50, @@ -1868,13 +1868,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailPasswordSession", "group": "sessions", "weight": 17, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-password-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "rate-limit": 10, @@ -1946,13 +1946,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateMagicURLSession", "group": "sessions", "weight": 27, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-magic-u-r-l-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1964,6 +1964,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2019,13 +2020,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Session", "group": "sessions", "weight": 20, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, @@ -2156,13 +2157,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updatePhoneSession", "group": "sessions", "weight": 28, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-phone-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2174,6 +2175,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2234,13 +2236,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 19, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2310,13 +2312,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSession", "group": "sessions", "weight": 14, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", "rate-limit": 0, @@ -2371,13 +2373,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSession", "group": "sessions", "weight": 16, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", "rate-limit": 10, @@ -2427,13 +2429,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 15, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", "rate-limit": 100, @@ -2490,13 +2492,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "account", "weight": 38, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", "rate-limit": 0, @@ -2543,13 +2545,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", "weight": 55, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, @@ -2627,13 +2629,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", "weight": 56, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, @@ -2699,13 +2701,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", "weight": 57, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, @@ -2760,13 +2762,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailToken", "group": "tokens", "weight": 26, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", "rate-limit": 10, @@ -2847,13 +2849,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMagicURLToken", "group": "tokens", "weight": 25, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-magic-u-r-l-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, @@ -2935,13 +2937,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Token", "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, @@ -3072,13 +3074,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneToken", "group": "tokens", "weight": 29, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", "rate-limit": 10, @@ -3153,13 +3155,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVerification", "group": "verification", "weight": 41, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", "rate-limit": 10, @@ -3224,13 +3226,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVerification", "group": "verification", "weight": 42, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", "rate-limit": 10, @@ -3304,13 +3306,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneVerification", "group": "verification", "weight": 43, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", "rate-limit": 10, @@ -3358,13 +3360,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "verification", "weight": 44, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", "rate-limit": 10, @@ -3436,13 +3438,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBrowser", "group": null, "weight": 61, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-browser.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "rate-limit": 0, @@ -3561,13 +3563,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCreditCard", "group": null, "weight": 60, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-credit-card.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "rate-limit": 0, @@ -3692,13 +3694,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFavicon", "group": null, "weight": 64, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-favicon.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "rate-limit": 0, @@ -3755,13 +3757,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFlag", "group": null, "weight": 62, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-flag.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "rate-limit": 0, @@ -4242,13 +4244,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getImage", "group": null, "weight": 63, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-image.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "rate-limit": 0, @@ -4325,13 +4327,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getInitials", "group": null, "weight": 66, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-initials.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "rate-limit": 0, @@ -4416,13 +4418,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQR", "group": null, "weight": 65, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-q-r.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, @@ -4507,16 +4509,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocuments", "group": "documents", "weight": 340, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listRows" - }, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -4529,6 +4528,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "auth": { "Project": [] } @@ -4592,16 +4595,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDocument", "group": "documents", "weight": 332, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createRow" - }, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -4614,6 +4614,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "methods": [ { "name": "createDocument", @@ -4758,16 +4762,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getDocument", "group": "documents", "weight": 333, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getRow" - }, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -4780,6 +4781,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "auth": { "Project": [] } @@ -4851,16 +4856,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocument", "group": "documents", "weight": 336, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.upsertRow" - }, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -4873,6 +4875,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "methods": [ { "name": "upsertDocument", @@ -4978,16 +4984,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocument", "group": "documents", "weight": 334, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRow" - }, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -5000,6 +5003,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "auth": { "Project": [] } @@ -5078,16 +5085,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocument", "group": "documents", "weight": 338, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteRow" - }, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -5100,6 +5104,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "auth": { "Project": [] } @@ -5159,13 +5167,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRows", "group": "rows", "weight": 413, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, @@ -5241,13 +5249,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRow", "group": "rows", "weight": 405, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, @@ -5404,13 +5412,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRow", "group": "rows", "weight": 406, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, @@ -5494,13 +5502,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRow", "group": "rows", "weight": 409, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, @@ -5615,13 +5623,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRow", "group": "rows", "weight": 407, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, @@ -5712,13 +5720,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRow", "group": "rows", "weight": 411, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, @@ -5790,13 +5798,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listExecutions", "group": "executions", "weight": 441, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-executions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -5864,13 +5872,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createExecution", "group": "executions", "weight": 439, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", "rate-limit": 0, @@ -5981,13 +5989,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getExecution", "group": "executions", "weight": 440, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.", "rate-limit": 0, @@ -6053,13 +6061,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "query", "group": "graphql", "weight": 255, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/query.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -6127,13 +6135,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "mutation", "group": "graphql", "weight": 254, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/mutation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -6199,13 +6207,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 70, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "rate-limit": 0, @@ -6251,13 +6259,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCodes", "group": null, "weight": 71, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "rate-limit": 0, @@ -6303,13 +6311,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listContinents", "group": null, "weight": 75, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-continents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "rate-limit": 0, @@ -6355,13 +6363,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountries", "group": null, "weight": 72, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "rate-limit": 0, @@ -6407,13 +6415,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesEU", "group": null, "weight": 73, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-e-u.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, @@ -6459,13 +6467,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesPhones", "group": null, "weight": 74, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-phones.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "rate-limit": 0, @@ -6511,13 +6519,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCurrencies", "group": null, "weight": 76, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-currencies.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "rate-limit": 0, @@ -6563,13 +6571,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLanguages", "group": null, "weight": 77, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-languages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "rate-limit": 0, @@ -6617,13 +6625,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSubscriber", "group": "subscribers", "weight": 301, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "rate-limit": 0, @@ -6702,13 +6710,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", "weight": 305, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "rate-limit": 0, @@ -6773,13 +6781,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFiles", "group": "files", "weight": 161, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-files.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "rate-limit": 0, @@ -6856,13 +6864,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFile", "group": "files", "weight": 160, "cookies": false, "type": "upload", - "deprecated": false, "demo": "storage\/create-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "rate-limit": 60, @@ -6946,13 +6954,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFile", "group": "files", "weight": 162, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "rate-limit": 0, @@ -7016,13 +7024,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFile", "group": "files", "weight": 167, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "rate-limit": 60, @@ -7105,13 +7113,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteFile", "group": "files", "weight": 168, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", "rate-limit": 60, @@ -7175,13 +7183,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFileDownload", "group": "files", "weight": 164, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "rate-limit": 0, @@ -7254,13 +7262,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFilePreview", "group": "files", "weight": 163, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-preview.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "rate-limit": 0, @@ -7461,13 +7469,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFileView", "group": "files", "weight": 165, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-view.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "rate-limit": 0, @@ -7540,13 +7548,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "teams", "weight": 172, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "rate-limit": 0, @@ -7615,13 +7623,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "teams", "weight": 171, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "rate-limit": 0, @@ -7705,13 +7713,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "teams", "weight": 173, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "rate-limit": 0, @@ -7767,13 +7775,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "teams", "weight": 175, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "rate-limit": 0, @@ -7842,13 +7850,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "teams", "weight": 177, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "rate-limit": 0, @@ -7904,13 +7912,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 179, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "rate-limit": 0, @@ -7987,13 +7995,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMembership", "group": "memberships", "weight": 178, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "rate-limit": 10, @@ -8100,13 +8108,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMembership", "group": "memberships", "weight": 180, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "rate-limit": 0, @@ -8170,13 +8178,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembership", "group": "memberships", "weight": 181, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "rate-limit": 0, @@ -8256,13 +8264,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMembership", "group": "memberships", "weight": 183, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "rate-limit": 0, @@ -8328,13 +8336,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", "weight": 182, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "rate-limit": 0, @@ -8422,13 +8430,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "teams", "weight": 174, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "rate-limit": 0, @@ -8483,13 +8491,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "teams", "weight": 176, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "rate-limit": 0, diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index a4d0050c5e..68b40a7c74 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -96,13 +96,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "account", "weight": 10, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", "rate-limit": 0, @@ -146,13 +146,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "account", "weight": 9, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", "rate-limit": 10, @@ -230,13 +230,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "account", "weight": 11, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md", "rate-limit": 0, @@ -280,13 +280,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "account", "weight": 35, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "rate-limit": 0, @@ -357,13 +357,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 58, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "rate-limit": 0, @@ -418,13 +418,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 59, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "rate-limit": 0, @@ -480,13 +480,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "tokens", "weight": 30, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, @@ -529,13 +529,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 32, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "rate-limit": 0, @@ -595,13 +595,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMFA", "group": "mfa", "weight": 45, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-m-f-a.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, @@ -667,13 +667,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", "weight": 47, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "rate-limit": 0, @@ -732,13 +732,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", "weight": 48, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "rate-limit": 0, @@ -810,13 +810,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 52, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -877,13 +877,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", "weight": 53, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "rate-limit": 10, @@ -954,13 +954,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", "weight": 54, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", "rate-limit": 10, @@ -1031,13 +1031,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 46, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", "rate-limit": 0, @@ -1081,13 +1081,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 51, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -1131,13 +1131,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 49, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -1181,13 +1181,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 50, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -1233,13 +1233,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "account", "weight": 33, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "rate-limit": 0, @@ -1305,13 +1305,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "account", "weight": 34, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "rate-limit": 10, @@ -1383,13 +1383,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "account", "weight": 36, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "rate-limit": 0, @@ -1460,13 +1460,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "account", "weight": 31, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "rate-limit": 0, @@ -1510,13 +1510,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "account", "weight": 37, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "rate-limit": 0, @@ -1582,13 +1582,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRecovery", "group": "recovery", "weight": 39, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", "rate-limit": 10, @@ -1662,13 +1662,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRecovery", "group": "recovery", "weight": 40, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "rate-limit": 10, @@ -1746,13 +1746,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 12, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "rate-limit": 0, @@ -1791,13 +1791,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 13, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", "rate-limit": 100, @@ -1843,13 +1843,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAnonymousSession", "group": "sessions", "weight": 18, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-anonymous-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", "rate-limit": 50, @@ -1894,13 +1894,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailPasswordSession", "group": "sessions", "weight": 17, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-password-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "rate-limit": 10, @@ -1972,13 +1972,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateMagicURLSession", "group": "sessions", "weight": 27, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-magic-u-r-l-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1990,6 +1990,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2045,13 +2046,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Session", "group": "sessions", "weight": 20, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, @@ -2182,13 +2183,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updatePhoneSession", "group": "sessions", "weight": 28, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-phone-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2200,6 +2201,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2260,13 +2262,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 19, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2336,13 +2338,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSession", "group": "sessions", "weight": 14, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", "rate-limit": 0, @@ -2396,13 +2398,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSession", "group": "sessions", "weight": 16, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", "rate-limit": 10, @@ -2451,13 +2453,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 15, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", "rate-limit": 100, @@ -2513,13 +2515,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "account", "weight": 38, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", "rate-limit": 0, @@ -2565,13 +2567,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", "weight": 55, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, @@ -2648,13 +2650,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", "weight": 56, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, @@ -2719,13 +2721,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", "weight": 57, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, @@ -2779,13 +2781,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailToken", "group": "tokens", "weight": 26, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", "rate-limit": 10, @@ -2866,13 +2868,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMagicURLToken", "group": "tokens", "weight": 25, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-magic-u-r-l-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, @@ -2954,13 +2956,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Token", "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, @@ -3091,13 +3093,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneToken", "group": "tokens", "weight": 29, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", "rate-limit": 10, @@ -3172,13 +3174,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVerification", "group": "verification", "weight": 41, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", "rate-limit": 10, @@ -3242,13 +3244,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVerification", "group": "verification", "weight": 42, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", "rate-limit": 10, @@ -3321,13 +3323,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneVerification", "group": "verification", "weight": 43, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", "rate-limit": 10, @@ -3374,13 +3376,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "verification", "weight": 44, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", "rate-limit": 10, @@ -3451,13 +3453,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBrowser", "group": null, "weight": 61, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-browser.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "rate-limit": 0, @@ -3576,13 +3578,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCreditCard", "group": null, "weight": 60, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-credit-card.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "rate-limit": 0, @@ -3707,13 +3709,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFavicon", "group": null, "weight": 64, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-favicon.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "rate-limit": 0, @@ -3770,13 +3772,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFlag", "group": null, "weight": 62, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-flag.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "rate-limit": 0, @@ -4257,13 +4259,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getImage", "group": null, "weight": 63, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-image.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "rate-limit": 0, @@ -4340,13 +4342,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getInitials", "group": null, "weight": 66, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-initials.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "rate-limit": 0, @@ -4431,13 +4433,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQR", "group": null, "weight": 65, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-q-r.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, @@ -4524,13 +4526,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "chat", "group": "console", "weight": 257, "cookies": false, "type": "", - "deprecated": false, "demo": "assistant\/chat.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/assistant\/chat.md", "rate-limit": 15, @@ -4587,13 +4589,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "getResource", "group": null, "weight": 481, "cookies": false, "type": "", - "deprecated": false, "demo": "console\/get-resource.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCheck if a resource ID is available.", "rate-limit": 120, @@ -4658,13 +4660,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "variables", "group": "console", "weight": 256, "cookies": false, "type": "", - "deprecated": false, "demo": "console\/variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/console\/variables.md", "rate-limit": 0, @@ -4706,13 +4708,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "databases", "weight": 321, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", "rate-limit": 0, @@ -4778,13 +4780,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "databases", "weight": 317, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", "rate-limit": 0, @@ -4860,13 +4862,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listUsage", "group": null, "weight": 324, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", "rate-limit": 0, @@ -4930,13 +4932,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "databases", "weight": 318, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", "rate-limit": 0, @@ -4989,13 +4991,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "databases", "weight": 319, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", "rate-limit": 0, @@ -5067,13 +5069,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "databases", "weight": 320, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", "rate-limit": 0, @@ -5126,16 +5128,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listCollections", "group": "collections", "weight": 329, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.list" - }, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -5146,6 +5145,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.list" + }, "auth": { "Project": [] } @@ -5209,16 +5212,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createCollection", "group": "collections", "weight": 325, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createTable" - }, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -5229,6 +5229,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createTable" + }, "auth": { "Project": [] } @@ -5317,16 +5321,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getCollection", "group": "collections", "weight": 326, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getTable" - }, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -5337,6 +5338,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getTable" + }, "auth": { "Project": [] } @@ -5387,16 +5392,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateCollection", "group": "collections", "weight": 327, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateTable" - }, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -5407,6 +5409,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateTable" + }, "auth": { "Project": [] } @@ -5491,16 +5497,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteCollection", "group": "collections", "weight": 328, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteTable" - }, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -5511,6 +5514,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteTable" + }, "auth": { "Project": [] } @@ -5561,16 +5568,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listAttributes", "group": "attributes", "weight": 346, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listColumns" - }, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5581,6 +5585,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumns" + }, "auth": { "Project": [] } @@ -5645,16 +5653,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", "weight": 347, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" - }, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5665,6 +5670,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createBooleanColumn" + }, "auth": { "Project": [] } @@ -5754,16 +5763,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", "weight": 348, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" - }, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5774,6 +5780,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateBooleanColumn" + }, "auth": { "Project": [] } @@ -5865,16 +5875,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", "weight": 349, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" - }, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5885,6 +5892,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createDatetimeColumn" + }, "auth": { "Project": [] } @@ -5974,16 +5985,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", "weight": 350, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" - }, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5994,6 +6002,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn" + }, "auth": { "Project": [] } @@ -6085,16 +6097,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", "weight": 351, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" - }, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -6105,6 +6114,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEmailColumn" + }, "auth": { "Project": [] } @@ -6194,16 +6207,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", "weight": 352, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" - }, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -6214,6 +6224,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEmailColumn" + }, "auth": { "Project": [] } @@ -6305,16 +6319,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", "weight": 353, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" - }, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -6325,6 +6336,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEnumColumn" + }, "auth": { "Project": [] } @@ -6424,16 +6439,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", "weight": 354, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" - }, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -6444,6 +6456,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEnumColumn" + }, "auth": { "Project": [] } @@ -6545,16 +6561,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", "weight": 355, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" - }, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -6565,6 +6578,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createFloatColumn" + }, "auth": { "Project": [] } @@ -6666,16 +6683,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", "weight": 356, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" - }, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6686,6 +6700,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateFloatColumn" + }, "auth": { "Project": [] } @@ -6789,16 +6807,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", "weight": 357, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" - }, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6809,6 +6824,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIntegerColumn" + }, "auth": { "Project": [] } @@ -6910,16 +6929,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", "weight": 358, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" - }, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6930,6 +6946,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIntegerColumn" + }, "auth": { "Project": [] } @@ -7033,16 +7053,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIpAttribute", "group": "attributes", "weight": 359, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createIpColumn" - }, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -7053,6 +7070,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIpColumn" + }, "auth": { "Project": [] } @@ -7142,16 +7163,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", "weight": 360, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" - }, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -7162,6 +7180,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIpColumn" + }, "auth": { "Project": [] } @@ -7253,16 +7275,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", "weight": 361, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" - }, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -7273,6 +7292,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRelationshipColumn" + }, "auth": { "Project": [] } @@ -7389,16 +7412,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createStringAttribute", "group": "attributes", "weight": 363, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createStringColumn" - }, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -7409,6 +7429,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createStringColumn" + }, "auth": { "Project": [] } @@ -7511,16 +7535,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", "weight": 364, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" - }, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -7531,6 +7552,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateStringColumn" + }, "auth": { "Project": [] } @@ -7628,16 +7653,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", "weight": 365, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" - }, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7648,6 +7670,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createUrlColumn" + }, "auth": { "Project": [] } @@ -7737,16 +7763,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", "weight": 366, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" - }, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7757,6 +7780,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateUrlColumn" + }, "auth": { "Project": [] } @@ -7877,16 +7904,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getAttribute", "group": "attributes", "weight": 344, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getColumn" - }, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7897,6 +7921,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumn" + }, "auth": { "Project": [] } @@ -7949,16 +7977,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteAttribute", "group": "attributes", "weight": 345, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteColumn" - }, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7969,6 +7994,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumn" + }, "auth": { "Project": [] } @@ -8028,16 +8057,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", "weight": 362, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" - }, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -8048,6 +8074,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn" + }, "auth": { "Project": [] } @@ -8133,16 +8163,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocuments", "group": "documents", "weight": 340, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listRows" - }, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -8155,6 +8182,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "auth": { "Project": [] } @@ -8218,16 +8249,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDocument", "group": "documents", "weight": 332, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createRow" - }, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -8240,6 +8268,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "methods": [ { "name": "createDocument", @@ -8384,16 +8416,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocuments", "group": "documents", "weight": 337, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.upsertRows" - }, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -8405,6 +8434,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRows" + }, "methods": [ { "name": "upsertDocuments", @@ -8494,16 +8527,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocuments", "group": "documents", "weight": 335, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRows" - }, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -8515,6 +8545,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRows" + }, "auth": { "Project": [] } @@ -8589,16 +8623,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocuments", "group": "documents", "weight": 339, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteRows" - }, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8610,6 +8641,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRows" + }, "auth": { "Project": [] } @@ -8678,16 +8713,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getDocument", "group": "documents", "weight": 333, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getRow" - }, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8700,6 +8732,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "auth": { "Project": [] } @@ -8771,16 +8807,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocument", "group": "documents", "weight": 336, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.upsertRow" - }, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8793,6 +8826,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "methods": [ { "name": "upsertDocument", @@ -8898,16 +8935,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocument", "group": "documents", "weight": 334, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRow" - }, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8920,6 +8954,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "auth": { "Project": [] } @@ -8998,16 +9036,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocument", "group": "documents", "weight": 338, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteRow" - }, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -9020,6 +9055,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "auth": { "Project": [] } @@ -9079,16 +9118,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocumentLogs", "group": "logs", "weight": 341, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listLogs" - }, "demo": "databases\/list-document-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", "rate-limit": 0, @@ -9099,6 +9135,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listLogs" + }, "auth": { "Project": [] } @@ -9170,16 +9210,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", "weight": 343, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.decrementColumn" - }, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -9191,6 +9228,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.decrementColumn" + }, "auth": { "Project": [] } @@ -9279,16 +9320,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", "weight": 342, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.incrementColumn" - }, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -9300,6 +9338,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.incrementColumn" + }, "auth": { "Project": [] } @@ -9386,16 +9428,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 370, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listColumnIndexes" - }, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -9406,6 +9445,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumnIndexes" + }, "auth": { "Project": [] } @@ -9468,16 +9511,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 367, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createColumnIndex" - }, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -9488,6 +9528,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createColumnIndex" + }, "auth": { "Project": [] } @@ -9598,16 +9642,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 368, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getColumnIndex" - }, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -9618,6 +9659,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumnIndex" + }, "auth": { "Project": [] } @@ -9670,16 +9715,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 369, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteColumnIndex" - }, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9690,6 +9732,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumnIndex" + }, "auth": { "Project": [] } @@ -9747,16 +9793,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listCollectionLogs", "group": "collections", "weight": 330, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listTableLogs" - }, "demo": "databases\/list-collection-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", "rate-limit": 0, @@ -9767,6 +9810,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listTableLogs" + }, "auth": { "Project": [] } @@ -9828,16 +9875,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getCollectionUsage", "group": null, "weight": 331, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getTableUsage" - }, "demo": "databases\/get-collection-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, @@ -9848,6 +9892,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getTableUsage" + }, "auth": { "Project": [] } @@ -9917,13 +9965,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 322, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", "rate-limit": 0, @@ -9987,13 +10035,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": null, "weight": 375, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, @@ -10067,13 +10115,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": null, "weight": 371, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, @@ -10172,13 +10220,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 372, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, @@ -10239,13 +10287,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": null, "weight": 373, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, @@ -10340,13 +10388,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": null, "weight": 374, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, @@ -10407,13 +10455,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listColumns", "group": "columns", "weight": 380, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -10488,13 +10536,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBooleanColumn", "group": "columns", "weight": 381, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, @@ -10594,13 +10642,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", "weight": 382, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, @@ -10702,13 +10750,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", "weight": 383, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, @@ -10808,13 +10856,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", "weight": 384, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, @@ -10916,13 +10964,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailColumn", "group": "columns", "weight": 385, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, @@ -11022,13 +11070,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailColumn", "group": "columns", "weight": 386, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, @@ -11130,13 +11178,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEnumColumn", "group": "columns", "weight": 387, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, @@ -11246,13 +11294,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEnumColumn", "group": "columns", "weight": 388, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, @@ -11364,13 +11412,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFloatColumn", "group": "columns", "weight": 389, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, @@ -11482,13 +11530,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFloatColumn", "group": "columns", "weight": 390, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, @@ -11602,13 +11650,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIntegerColumn", "group": "columns", "weight": 391, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, @@ -11720,13 +11768,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", "weight": 392, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, @@ -11840,13 +11888,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIpColumn", "group": "columns", "weight": 393, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, @@ -11946,13 +11994,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIpColumn", "group": "columns", "weight": 394, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, @@ -12054,13 +12102,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", "weight": 395, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, @@ -12187,13 +12235,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createStringColumn", "group": "columns", "weight": 397, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, @@ -12306,13 +12354,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStringColumn", "group": "columns", "weight": 398, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, @@ -12420,13 +12468,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createUrlColumn", "group": "columns", "weight": 399, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, @@ -12526,13 +12574,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateUrlColumn", "group": "columns", "weight": 400, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, @@ -12663,13 +12711,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getColumn", "group": "columns", "weight": 378, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, @@ -12732,13 +12780,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteColumn", "group": "columns", "weight": 379, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, @@ -12808,13 +12856,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", "weight": 396, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, @@ -12910,13 +12958,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 404, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -12989,13 +13037,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 401, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -13116,13 +13164,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 402, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -13185,13 +13233,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 403, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -13259,13 +13307,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "tables", "weight": 376, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", "rate-limit": 0, @@ -13337,13 +13385,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRows", "group": "rows", "weight": 413, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, @@ -13419,13 +13467,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRow", "group": "rows", "weight": 405, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, @@ -13582,13 +13630,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRows", "group": "rows", "weight": 410, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, @@ -13689,13 +13737,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRows", "group": "rows", "weight": 408, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, @@ -13781,13 +13829,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteRows", "group": "rows", "weight": 412, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, @@ -13867,13 +13915,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRow", "group": "rows", "weight": 406, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, @@ -13957,13 +14005,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRow", "group": "rows", "weight": 409, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, @@ -14078,13 +14126,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRow", "group": "rows", "weight": 407, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, @@ -14175,13 +14223,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRow", "group": "rows", "weight": 411, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, @@ -14253,13 +14301,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRowLogs", "group": "logs", "weight": 414, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-row-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", "rate-limit": 0, @@ -14341,13 +14389,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "decrementRowColumn", "group": "rows", "weight": 416, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, @@ -14447,13 +14495,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "incrementRowColumn", "group": "rows", "weight": 415, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, @@ -14551,13 +14599,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 377, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", "rate-limit": 0, @@ -14637,13 +14685,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDatabaseUsage", "group": null, "weight": 323, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-database-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, @@ -14715,13 +14763,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "functions", "weight": 425, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's functions. You can use the query params to filter your results.", "rate-limit": 0, @@ -14787,13 +14835,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "functions", "weight": 422, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", "rate-limit": 0, @@ -15038,13 +15086,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRuntimes", "group": "runtimes", "weight": 427, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-runtimes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all runtimes that are currently active on your instance.", "rate-limit": 0, @@ -15087,13 +15135,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "runtimes", "weight": 428, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed function specifications for this instance.", "rate-limit": 0, @@ -15137,13 +15185,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTemplates", "group": "templates", "weight": 451, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-templates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList available function templates. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", "rate-limit": 0, @@ -15231,13 +15279,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTemplate", "group": "templates", "weight": 450, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function template using ID. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", "rate-limit": 0, @@ -15289,13 +15337,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listUsage", "group": null, "weight": 444, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for all functions in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -15359,13 +15407,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "functions", "weight": 423, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function by its unique ID.", "rate-limit": 0, @@ -15418,13 +15466,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "functions", "weight": 424, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate function by its unique ID.", "rate-limit": 0, @@ -15665,13 +15713,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "functions", "weight": 426, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function by its unique ID.", "rate-limit": 0, @@ -15726,13 +15774,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", "weight": 431, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-function-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", "rate-limit": 0, @@ -15803,13 +15851,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 432, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the function's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -15883,13 +15931,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 429, "cookies": false, "type": "upload", - "deprecated": false, "demo": "functions\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "rate-limit": 0, @@ -15975,13 +16023,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 437, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -16060,13 +16108,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 434, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/functions#listTemplates) to find the template details.", "rate-limit": 0, @@ -16166,13 +16214,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 435, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -16262,13 +16310,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 430, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment by its unique ID.", "rate-limit": 0, @@ -16324,13 +16372,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 433, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a code deployment by its unique ID.", "rate-limit": 0, @@ -16391,13 +16439,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 436, "cookies": false, "type": "location", - "deprecated": false, "demo": "functions\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -16477,13 +16525,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 438, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -16544,13 +16592,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listExecutions", "group": "executions", "weight": 441, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-executions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -16618,13 +16666,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createExecution", "group": "executions", "weight": 439, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", "rate-limit": 0, @@ -16735,13 +16783,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getExecution", "group": "executions", "weight": 440, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.", "rate-limit": 0, @@ -16800,13 +16848,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteExecution", "group": "executions", "weight": 442, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function execution by its unique ID.", "rate-limit": 0, @@ -16867,13 +16915,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 443, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -16945,13 +16993,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 447, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific function.", "rate-limit": 0, @@ -17004,13 +17052,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 445, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", "rate-limit": 0, @@ -17094,13 +17142,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 446, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -17161,13 +17209,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 448, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -17253,13 +17301,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 449, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -17322,13 +17370,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "query", "group": "graphql", "weight": 255, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/query.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -17396,13 +17444,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "mutation", "group": "graphql", "weight": 254, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/mutation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -17468,13 +17516,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "health", "weight": 78, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", "rate-limit": 0, @@ -17517,13 +17565,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getAntivirus", "group": "health", "weight": 99, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-antivirus.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", "rate-limit": 0, @@ -17566,13 +17614,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCache", "group": "health", "weight": 81, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-cache.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", "rate-limit": 0, @@ -17615,13 +17663,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCertificate", "group": "health", "weight": 86, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-certificate.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", "rate-limit": 0, @@ -17673,13 +17721,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDB", "group": "health", "weight": 80, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-d-b.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, @@ -17722,13 +17770,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPubSub", "group": "health", "weight": 82, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-pub-sub.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", "rate-limit": 0, @@ -17771,13 +17819,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueBuilds", "group": "queue", "weight": 88, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-builds.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", "rate-limit": 0, @@ -17831,13 +17879,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueCertificates", "group": "queue", "weight": 87, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-certificates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", "rate-limit": 0, @@ -17891,13 +17939,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDatabases", "group": "queue", "weight": 89, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-databases.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", "rate-limit": 0, @@ -17960,13 +18008,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDeletes", "group": "queue", "weight": 90, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-deletes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", "rate-limit": 0, @@ -18020,13 +18068,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFailedJobs", "group": "queue", "weight": 100, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-failed-jobs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", "rate-limit": 0, @@ -18104,13 +18152,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueFunctions", "group": "queue", "weight": 94, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-functions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", "rate-limit": 0, @@ -18164,13 +18212,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueLogs", "group": "queue", "weight": 85, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", "rate-limit": 0, @@ -18224,13 +18272,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMails", "group": "queue", "weight": 91, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-mails.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", "rate-limit": 0, @@ -18284,13 +18332,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMessaging", "group": "queue", "weight": 92, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-messaging.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", "rate-limit": 0, @@ -18344,13 +18392,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMigrations", "group": "queue", "weight": 93, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-migrations.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", "rate-limit": 0, @@ -18404,13 +18452,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", "weight": 95, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-stats-resources.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", "rate-limit": 0, @@ -18464,13 +18512,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueUsage", "group": "queue", "weight": 96, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", "rate-limit": 0, @@ -18524,13 +18572,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", "weight": 84, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-webhooks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", "rate-limit": 0, @@ -18584,13 +18632,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorage", "group": "storage", "weight": 98, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", "rate-limit": 0, @@ -18633,13 +18681,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorageLocal", "group": "storage", "weight": 97, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage-local.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", "rate-limit": 0, @@ -18682,13 +18730,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTime", "group": "health", "weight": 83, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-time.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", "rate-limit": 0, @@ -18731,13 +18779,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 70, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "rate-limit": 0, @@ -18783,13 +18831,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCodes", "group": null, "weight": 71, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "rate-limit": 0, @@ -18835,13 +18883,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listContinents", "group": null, "weight": 75, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-continents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "rate-limit": 0, @@ -18887,13 +18935,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountries", "group": null, "weight": 72, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "rate-limit": 0, @@ -18939,13 +18987,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesEU", "group": null, "weight": 73, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-e-u.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, @@ -18991,13 +19039,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesPhones", "group": null, "weight": 74, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-phones.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "rate-limit": 0, @@ -19043,13 +19091,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCurrencies", "group": null, "weight": 76, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-currencies.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "rate-limit": 0, @@ -19095,13 +19143,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLanguages", "group": null, "weight": 77, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-languages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "rate-limit": 0, @@ -19147,13 +19195,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessages", "group": "messages", "weight": 309, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-messages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", "rate-limit": 0, @@ -19222,13 +19270,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmail", "group": "messages", "weight": 306, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", "rate-limit": 0, @@ -19380,13 +19428,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "messages", "weight": 313, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", "rate-limit": 0, @@ -19535,13 +19583,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPush", "group": "messages", "weight": 308, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", "rate-limit": 0, @@ -19730,13 +19778,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePush", "group": "messages", "weight": 315, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", "rate-limit": 0, @@ -19924,13 +19972,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSms", "group": "messages", "weight": 307, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", "rate-limit": 0, @@ -20042,13 +20090,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSms", "group": "messages", "weight": 314, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, @@ -20156,13 +20204,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMessage", "group": "messages", "weight": 312, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-message.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", "rate-limit": 0, @@ -20211,13 +20259,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "messages", "weight": 316, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", "rate-limit": 0, @@ -20271,13 +20319,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessageLogs", "group": "logs", "weight": 310, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-message-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", "rate-limit": 0, @@ -20343,13 +20391,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "messages", "weight": 311, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", "rate-limit": 0, @@ -20415,13 +20463,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviders", "group": "providers", "weight": 281, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-providers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", "rate-limit": 0, @@ -20490,13 +20538,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createApnsProvider", "group": "providers", "weight": 280, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", "rate-limit": 0, @@ -20605,13 +20653,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", "weight": 293, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", "rate-limit": 0, @@ -20718,13 +20766,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFcmProvider", "group": "providers", "weight": 279, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", "rate-limit": 0, @@ -20809,13 +20857,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", "weight": 292, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", "rate-limit": 0, @@ -20898,13 +20946,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMailgunProvider", "group": "providers", "weight": 271, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", "rate-limit": 0, @@ -21025,13 +21073,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", "weight": 284, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", "rate-limit": 0, @@ -21150,13 +21198,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMsg91Provider", "group": "providers", "weight": 274, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, @@ -21253,13 +21301,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", "weight": 287, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, @@ -21354,13 +21402,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSendgridProvider", "group": "providers", "weight": 272, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "rate-limit": 0, @@ -21469,13 +21517,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", "weight": 285, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "rate-limit": 0, @@ -21582,13 +21630,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", "weight": 273, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", "rate-limit": 0, @@ -21741,13 +21789,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", "weight": 286, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", "rate-limit": 0, @@ -21897,13 +21945,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTelesignProvider", "group": "providers", "weight": 275, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", "rate-limit": 0, @@ -22000,13 +22048,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", "weight": 288, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", "rate-limit": 0, @@ -22101,13 +22149,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", "weight": 276, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", "rate-limit": 0, @@ -22204,13 +22252,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", "weight": 289, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", "rate-limit": 0, @@ -22305,13 +22353,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTwilioProvider", "group": "providers", "weight": 277, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", "rate-limit": 0, @@ -22408,13 +22456,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", "weight": 290, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", "rate-limit": 0, @@ -22509,13 +22557,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVonageProvider", "group": "providers", "weight": 278, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", "rate-limit": 0, @@ -22612,13 +22660,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVonageProvider", "group": "providers", "weight": 291, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", "rate-limit": 0, @@ -22711,13 +22759,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getProvider", "group": "providers", "weight": 283, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", "rate-limit": 0, @@ -22766,13 +22814,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteProvider", "group": "providers", "weight": 294, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", "rate-limit": 0, @@ -22826,13 +22874,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviderLogs", "group": "providers", "weight": 282, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-provider-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", "rate-limit": 0, @@ -22898,13 +22946,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", "weight": 303, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscriber-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", "rate-limit": 0, @@ -22970,13 +23018,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopics", "group": "topics", "weight": 296, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topics.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", "rate-limit": 0, @@ -23043,13 +23091,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTopic", "group": "topics", "weight": 295, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", "rate-limit": 0, @@ -23131,13 +23179,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTopic", "group": "topics", "weight": 298, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", "rate-limit": 0, @@ -23191,13 +23239,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTopic", "group": "topics", "weight": 299, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", "rate-limit": 0, @@ -23270,13 +23318,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTopic", "group": "topics", "weight": 300, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", "rate-limit": 0, @@ -23330,13 +23378,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopicLogs", "group": "topics", "weight": 297, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topic-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", "rate-limit": 0, @@ -23402,13 +23450,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscribers", "group": "subscribers", "weight": 302, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscribers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "rate-limit": 0, @@ -23483,13 +23531,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSubscriber", "group": "subscribers", "weight": 301, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "rate-limit": 0, @@ -23571,13 +23619,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSubscriber", "group": "subscribers", "weight": 304, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "rate-limit": 0, @@ -23634,13 +23682,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", "weight": 305, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "rate-limit": 0, @@ -23705,13 +23753,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": null, "weight": 263, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/list-migrations.md", "rate-limit": 0, @@ -23778,13 +23826,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAppwriteMigration", "group": null, "weight": 258, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-appwrite-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite.md", "rate-limit": 0, @@ -23870,13 +23918,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getAppwriteReport", "group": null, "weight": 265, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-appwrite-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite-report.md", "rate-limit": 0, @@ -23958,13 +24006,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createCsvMigration", "group": null, "weight": 262, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-csv-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv.md", "rate-limit": 0, @@ -24042,13 +24090,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFirebaseMigration", "group": null, "weight": 259, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-firebase-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase.md", "rate-limit": 0, @@ -24120,13 +24168,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFirebaseReport", "group": null, "weight": 266, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-firebase-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase-report.md", "rate-limit": 0, @@ -24191,13 +24239,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createNHostMigration", "group": null, "weight": 261, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-n-host-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost.md", "rate-limit": 0, @@ -24310,13 +24358,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getNHostReport", "group": null, "weight": 268, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-n-host-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost-report.md", "rate-limit": 0, @@ -24430,13 +24478,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSupabaseMigration", "group": null, "weight": 260, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-supabase-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase.md", "rate-limit": 0, @@ -24542,13 +24590,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSupabaseReport", "group": null, "weight": 267, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-supabase-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase-report.md", "rate-limit": 0, @@ -24653,13 +24701,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 264, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/get-migration.md", "rate-limit": 0, @@ -24711,13 +24759,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "retry", "group": null, "weight": 269, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/retry.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/retry-migration.md", "rate-limit": 0, @@ -24764,13 +24812,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": null, "weight": 270, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/delete-migration.md", "rate-limit": 0, @@ -24822,13 +24870,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 149, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", "rate-limit": 0, @@ -24904,13 +24952,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": null, "weight": 151, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/list-variables.md", "rate-limit": 0, @@ -24952,13 +25000,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": null, "weight": 150, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/create-variable.md", "rate-limit": 0, @@ -25033,13 +25081,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": null, "weight": 152, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-variable.md", "rate-limit": 0, @@ -25091,13 +25139,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": null, "weight": 153, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/update-variable.md", "rate-limit": 0, @@ -25174,13 +25222,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": null, "weight": 154, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/delete-variable.md", "rate-limit": 0, @@ -25232,13 +25280,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "projects", "weight": 103, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list.md", "rate-limit": 0, @@ -25303,13 +25351,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "projects", "weight": 102, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", "rate-limit": 0, @@ -25450,13 +25498,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "projects", "weight": 104, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", "rate-limit": 0, @@ -25508,13 +25556,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "projects", "weight": 105, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", "rate-limit": 0, @@ -25633,13 +25681,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "projects", "weight": 122, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete.md", "rate-limit": 0, @@ -25693,13 +25741,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApiStatus", "group": "projects", "weight": 109, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-api-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status.md", "rate-limit": 0, @@ -25785,13 +25833,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", "weight": 110, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-api-status-all.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status-all.md", "rate-limit": 0, @@ -25863,13 +25911,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthDuration", "group": "auth", "weight": 115, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-duration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-duration.md", "rate-limit": 0, @@ -25941,13 +25989,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthLimit", "group": "auth", "weight": 114, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-limit.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-limit.md", "rate-limit": 0, @@ -26019,13 +26067,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", "weight": 120, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-sessions-limit.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-sessions-limit.md", "rate-limit": 0, @@ -26097,13 +26145,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", "weight": 113, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-memberships-privacy.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-memberships-privacy.md", "rate-limit": 0, @@ -26189,13 +26237,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMockNumbers", "group": "auth", "weight": 121, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-mock-numbers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-mock-numbers.md", "rate-limit": 0, @@ -26270,13 +26318,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", "weight": 118, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-password-dictionary.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-dictionary.md", "rate-limit": 0, @@ -26348,13 +26396,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", "weight": 117, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-password-history.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-history.md", "rate-limit": 0, @@ -26426,13 +26474,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", "weight": 119, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-personal-data-check.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-personal-data-check.md", "rate-limit": 0, @@ -26504,13 +26552,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", "weight": 112, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-session-alerts.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-alerts.md", "rate-limit": 0, @@ -26582,13 +26630,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", "weight": 148, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-session-invalidation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-invalidation.md", "rate-limit": 0, @@ -26660,13 +26708,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthStatus", "group": "auth", "weight": 116, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-status.md", "rate-limit": 0, @@ -26755,13 +26803,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDevKeys", "group": "devKeys", "weight": 420, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-dev-keys.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", "rate-limit": 0, @@ -26825,13 +26873,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDevKey", "group": "devKeys", "weight": 417, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", "rate-limit": 0, @@ -26908,13 +26956,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDevKey", "group": "devKeys", "weight": 419, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a project\\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.", "rate-limit": 0, @@ -26974,13 +27022,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDevKey", "group": "devKeys", "weight": 418, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a project\\'s dev key by its unique ID. Use this endpoint to update a project\\'s dev key name or expiration time.'", "rate-limit": 0, @@ -27060,13 +27108,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", "weight": 421, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a project\\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.", "rate-limit": 0, @@ -27128,13 +27176,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "auth", "weight": 134, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", "rate-limit": 0, @@ -27213,13 +27261,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listKeys", "group": "keys", "weight": 130, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-keys.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-keys.md", "rate-limit": 0, @@ -27271,13 +27319,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createKey", "group": "keys", "weight": 129, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-key.md", "rate-limit": 0, @@ -27363,13 +27411,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getKey", "group": "keys", "weight": 131, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-key.md", "rate-limit": 0, @@ -27429,13 +27477,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateKey", "group": "keys", "weight": 132, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-key.md", "rate-limit": 0, @@ -27524,13 +27572,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteKey", "group": "keys", "weight": 133, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-key.md", "rate-limit": 0, @@ -27592,13 +27640,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateOAuth2", "group": "auth", "weight": 111, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-o-auth2.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", "rate-limit": 0, @@ -27730,13 +27778,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listPlatforms", "group": "platforms", "weight": 136, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-platforms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-platforms.md", "rate-limit": 0, @@ -27788,13 +27836,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPlatform", "group": "platforms", "weight": 135, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-platform.md", "rate-limit": 0, @@ -27908,13 +27956,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPlatform", "group": "platforms", "weight": 137, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-platform.md", "rate-limit": 0, @@ -27974,13 +28022,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePlatform", "group": "platforms", "weight": 138, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-platform.md", "rate-limit": 0, @@ -28071,13 +28119,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deletePlatform", "group": "platforms", "weight": 139, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-platform.md", "rate-limit": 0, @@ -28139,13 +28187,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateServiceStatus", "group": "projects", "weight": 107, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-service-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status.md", "rate-limit": 0, @@ -28240,13 +28288,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", "weight": 108, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-service-status-all.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status-all.md", "rate-limit": 0, @@ -28318,13 +28366,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmtp", "group": "templates", "weight": 140, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-smtp.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-smtp.md", "rate-limit": 0, @@ -28447,13 +28495,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createSmtpTest", "group": "templates", "weight": 141, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-smtp-test.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-smtp-test.md", "rate-limit": 0, @@ -28585,13 +28633,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTeam", "group": "projects", "weight": 106, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-team.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", "rate-limit": 0, @@ -28661,13 +28709,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getEmailTemplate", "group": "templates", "weight": 143, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-email-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-email-template.md", "rate-limit": 0, @@ -28881,13 +28929,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", "weight": 145, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-email-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-email-template.md", "rate-limit": 0, @@ -29144,13 +29192,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", "weight": 147, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-email-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-email-template.md", "rate-limit": 0, @@ -29364,13 +29412,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSmsTemplate", "group": "templates", "weight": 142, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-sms-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-sms-template.md", "rate-limit": 0, @@ -29581,13 +29629,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", "weight": 144, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-sms-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-sms-template.md", "rate-limit": 0, @@ -29816,13 +29864,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", "weight": 146, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-sms-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-sms-template.md", "rate-limit": 0, @@ -30033,13 +30081,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listWebhooks", "group": "webhooks", "weight": 124, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-webhooks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-webhooks.md", "rate-limit": 0, @@ -30091,13 +30139,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createWebhook", "group": "webhooks", "weight": 123, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-webhook.md", "rate-limit": 0, @@ -30209,13 +30257,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getWebhook", "group": "webhooks", "weight": 125, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-webhook.md", "rate-limit": 0, @@ -30275,13 +30323,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateWebhook", "group": "webhooks", "weight": 126, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook.md", "rate-limit": 0, @@ -30396,13 +30444,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", "weight": 128, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-webhook.md", "rate-limit": 0, @@ -30464,13 +30512,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", "weight": 127, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-webhook-signature.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook-signature.md", "rate-limit": 0, @@ -30530,13 +30578,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRules", "group": null, "weight": 241, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/list-rules.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/list-rules.md", "rate-limit": 0, @@ -30603,13 +30651,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAPIRule", "group": null, "weight": 482, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-a-p-i-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for serving Appwrite's API on custom domain.", "rate-limit": 10, @@ -30673,13 +30721,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFunctionRule", "group": null, "weight": 484, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-function-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for executing Appwrite Function on custom domain.", "rate-limit": 10, @@ -30756,13 +30804,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRedirectRule", "group": null, "weight": 485, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-redirect-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for to redirect from custom domain to another domain.", "rate-limit": 10, @@ -30876,13 +30924,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSiteRule", "group": null, "weight": 483, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-site-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for serving Appwrite Site on custom domain.", "rate-limit": 10, @@ -30957,13 +31005,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRule", "group": null, "weight": 242, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/get-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/get-rule.md", "rate-limit": 0, @@ -31010,13 +31058,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRule", "group": null, "weight": 243, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/delete-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/delete-rule.md", "rate-limit": 0, @@ -31070,13 +31118,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRuleVerification", "group": null, "weight": 244, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/update-rule-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/update-rule-verification.md", "rate-limit": 0, @@ -31128,13 +31176,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "sites", "weight": 454, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's sites. You can use the query params to filter your results.", "rate-limit": 0, @@ -31200,13 +31248,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "sites", "weight": 452, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site.", "rate-limit": 0, @@ -31467,13 +31515,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFrameworks", "group": "frameworks", "weight": 457, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-frameworks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all frameworks that are currently available on the server instance.", "rate-limit": 0, @@ -31516,13 +31564,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "frameworks", "weight": 480, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed site specifications for this instance.", "rate-limit": 0, @@ -31566,13 +31614,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTemplates", "group": "templates", "weight": 476, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-templates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList available site templates. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", "rate-limit": 0, @@ -31660,13 +31708,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTemplate", "group": "templates", "weight": 477, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site template using ID. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", "rate-limit": 0, @@ -31718,13 +31766,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listUsage", "group": null, "weight": 478, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -31788,13 +31836,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "sites", "weight": 453, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site by its unique ID.", "rate-limit": 0, @@ -31847,13 +31895,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "sites", "weight": 455, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate site by its unique ID.", "rate-limit": 0, @@ -32109,13 +32157,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "sites", "weight": 456, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site by its unique ID.", "rate-limit": 0, @@ -32170,13 +32218,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", "weight": 463, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-site-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", "rate-limit": 0, @@ -32247,13 +32295,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 462, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the site's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -32327,13 +32375,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 458, "cookies": false, "type": "upload", - "deprecated": false, "demo": "sites\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID.", "rate-limit": 0, @@ -32427,13 +32475,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 466, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -32506,13 +32554,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 459, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/sites#listTemplates) to find the template details.", "rate-limit": 0, @@ -32612,13 +32660,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 460, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -32709,13 +32757,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 461, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment by its unique ID.", "rate-limit": 0, @@ -32771,13 +32819,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 464, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site deployment by its unique ID.", "rate-limit": 0, @@ -32838,13 +32886,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 465, "cookies": false, "type": "location", - "deprecated": false, "demo": "sites\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -32924,13 +32972,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 467, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -32991,13 +33039,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 469, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all site logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -33062,13 +33110,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getLog", "group": "logs", "weight": 468, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site request log by its unique ID.", "rate-limit": 0, @@ -33126,13 +33174,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteLog", "group": "logs", "weight": 470, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site log by its unique ID.", "rate-limit": 0, @@ -33193,13 +33241,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 479, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -33271,13 +33319,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 473, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific site.", "rate-limit": 0, @@ -33330,13 +33378,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 471, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", "rate-limit": 0, @@ -33420,13 +33468,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 472, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -33487,13 +33535,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 474, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -33579,13 +33627,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 475, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -33646,13 +33694,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listBuckets", "group": "buckets", "weight": 156, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-buckets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", "rate-limit": 0, @@ -33718,13 +33766,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBucket", "group": "buckets", "weight": 155, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/create-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", "rate-limit": 0, @@ -33855,13 +33903,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBucket", "group": "buckets", "weight": 157, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", "rate-limit": 0, @@ -33914,13 +33962,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBucket", "group": "buckets", "weight": 158, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", "rate-limit": 0, @@ -34047,13 +34095,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteBucket", "group": "buckets", "weight": 159, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", "rate-limit": 0, @@ -34106,13 +34154,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFiles", "group": "files", "weight": 161, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-files.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "rate-limit": 0, @@ -34189,13 +34237,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFile", "group": "files", "weight": 160, "cookies": false, "type": "upload", - "deprecated": false, "demo": "storage\/create-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "rate-limit": 60, @@ -34279,13 +34327,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFile", "group": "files", "weight": 162, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "rate-limit": 0, @@ -34349,13 +34397,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFile", "group": "files", "weight": 167, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "rate-limit": 60, @@ -34438,13 +34486,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteFile", "group": "files", "weight": 168, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", "rate-limit": 60, @@ -34508,13 +34556,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFileDownload", "group": "files", "weight": 164, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "rate-limit": 0, @@ -34587,13 +34635,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFilePreview", "group": "files", "weight": 163, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-preview.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "rate-limit": 0, @@ -34794,13 +34842,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFileView", "group": "files", "weight": 165, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-view.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "rate-limit": 0, @@ -34873,13 +34921,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 169, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", "rate-limit": 0, @@ -34943,13 +34991,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBucketUsage", "group": null, "weight": 170, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-bucket-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", "rate-limit": 0, @@ -35021,13 +35069,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "teams", "weight": 172, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "rate-limit": 0, @@ -35096,13 +35144,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "teams", "weight": 171, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "rate-limit": 0, @@ -35186,13 +35234,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "teams", "weight": 173, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "rate-limit": 0, @@ -35248,13 +35296,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "teams", "weight": 175, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "rate-limit": 0, @@ -35323,13 +35371,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "teams", "weight": 177, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "rate-limit": 0, @@ -35385,13 +35433,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 184, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md", "rate-limit": 0, @@ -35455,13 +35503,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 179, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "rate-limit": 0, @@ -35538,13 +35586,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMembership", "group": "memberships", "weight": 178, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "rate-limit": 10, @@ -35651,13 +35699,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMembership", "group": "memberships", "weight": 180, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "rate-limit": 0, @@ -35721,13 +35769,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembership", "group": "memberships", "weight": 181, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "rate-limit": 0, @@ -35807,13 +35855,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMembership", "group": "memberships", "weight": 183, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "rate-limit": 0, @@ -35879,13 +35927,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", "weight": 182, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "rate-limit": 0, @@ -35972,13 +36020,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "teams", "weight": 174, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "rate-limit": 0, @@ -36032,13 +36080,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "teams", "weight": 176, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "rate-limit": 0, @@ -36110,13 +36158,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "files", "weight": 488, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the tokens created for a specific file or bucket. You can use the query params to filter your results.", "rate-limit": 0, @@ -36190,13 +36238,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFileToken", "group": "files", "weight": 486, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/create-file-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, @@ -36274,13 +36322,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "tokens", "weight": 487, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a token by its unique ID.", "rate-limit": 0, @@ -36334,13 +36382,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "tokens", "weight": 489, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date.", "rate-limit": 60, @@ -36405,13 +36453,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "tokens", "weight": 490, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a token by its unique ID.", "rate-limit": 60, @@ -36465,13 +36513,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "users", "weight": 194, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", "rate-limit": 0, @@ -36537,13 +36585,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "users", "weight": 185, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", "rate-limit": 0, @@ -36632,13 +36680,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createArgon2User", "group": "users", "weight": 188, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-argon2user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, @@ -36723,13 +36771,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBcryptUser", "group": "users", "weight": 186, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-bcrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", "rate-limit": 0, @@ -36812,13 +36860,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 202, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", "rate-limit": 0, @@ -36881,13 +36929,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 225, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", "rate-limit": 0, @@ -36942,13 +36990,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMD5User", "group": "users", "weight": 187, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-m-d5user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, @@ -37033,13 +37081,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPHPassUser", "group": "users", "weight": 190, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-p-h-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, @@ -37124,13 +37172,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptUser", "group": "users", "weight": 191, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", "rate-limit": 0, @@ -37250,13 +37298,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", "weight": 192, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-modified-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", "rate-limit": 0, @@ -37362,13 +37410,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSHAUser", "group": "users", "weight": 189, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-s-h-a-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, @@ -37472,13 +37520,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 227, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", "rate-limit": 0, @@ -37542,13 +37590,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "users", "weight": 195, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", "rate-limit": 0, @@ -37596,13 +37644,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "users", "weight": 223, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", "rate-limit": 0, @@ -37657,13 +37705,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "users", "weight": 208, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", "rate-limit": 0, @@ -37736,13 +37784,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "sessions", "weight": 226, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, @@ -37818,13 +37866,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateLabels", "group": "users", "weight": 204, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-labels.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", "rate-limit": 0, @@ -37898,13 +37946,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 200, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", "rate-limit": 0, @@ -37969,13 +38017,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 199, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", "rate-limit": 0, @@ -38051,13 +38099,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfa", "group": "users", "weight": 213, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", "rate-limit": 0, @@ -38125,13 +38173,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 218, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -38197,13 +38245,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 214, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", "rate-limit": 0, @@ -38256,13 +38304,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 215, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -38315,13 +38363,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 217, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -38374,13 +38422,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 216, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -38435,13 +38483,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "users", "weight": 206, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", "rate-limit": 0, @@ -38514,13 +38562,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "users", "weight": 207, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", "rate-limit": 0, @@ -38593,13 +38641,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "users", "weight": 209, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", "rate-limit": 0, @@ -38670,13 +38718,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "users", "weight": 196, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", "rate-limit": 0, @@ -38729,13 +38777,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "users", "weight": 211, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", "rate-limit": 0, @@ -38806,13 +38854,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 198, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", "rate-limit": 0, @@ -38865,13 +38913,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 219, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", "rate-limit": 0, @@ -38919,13 +38967,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 222, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", "rate-limit": 0, @@ -38975,13 +39023,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 221, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", "rate-limit": 0, @@ -39044,13 +39092,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "users", "weight": 203, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", "rate-limit": 0, @@ -39121,13 +39169,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "targets", "weight": 201, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", "rate-limit": 0, @@ -39193,13 +39241,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTarget", "group": "targets", "weight": 193, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", "rate-limit": 0, @@ -39304,13 +39352,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTarget", "group": "targets", "weight": 197, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", "rate-limit": 0, @@ -39372,13 +39420,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTarget", "group": "targets", "weight": 212, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", "rate-limit": 0, @@ -39462,13 +39510,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTarget", "group": "targets", "weight": 224, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", "rate-limit": 0, @@ -39532,13 +39580,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createToken", "group": "sessions", "weight": 220, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", "rate-limit": 0, @@ -39614,13 +39662,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailVerification", "group": "users", "weight": 210, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", "rate-limit": 0, @@ -39693,13 +39741,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "users", "weight": 205, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", "rate-limit": 0, @@ -39772,13 +39820,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", "weight": 231, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/create-repository-detection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", "rate-limit": 0, @@ -39867,13 +39915,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRepositories", "group": "repositories", "weight": 232, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/list-repositories.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", "rate-limit": 0, @@ -39948,13 +39996,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRepository", "group": "repositories", "weight": 233, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/create-repository.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", "rate-limit": 0, @@ -40031,13 +40079,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRepository", "group": "repositories", "weight": 234, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/get-repository.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", "rate-limit": 0, @@ -40097,13 +40145,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", "weight": 235, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/list-repository-branches.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", "rate-limit": 0, @@ -40163,13 +40211,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", "weight": 230, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/get-repository-contents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", "rate-limit": 0, @@ -40246,13 +40294,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", "weight": 240, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/update-external-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", "rate-limit": 0, @@ -40330,13 +40378,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listInstallations", "group": "installations", "weight": 237, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/list-installations.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-installations.md", "rate-limit": 0, @@ -40401,13 +40449,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getInstallation", "group": "installations", "weight": 238, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/get-installation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-installation.md", "rate-limit": 0, @@ -40454,13 +40502,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteInstallation", "group": "installations", "weight": 239, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/delete-installation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/delete-installation.md", "rate-limit": 0, diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 1012823557..a1c10ef4ec 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -99,13 +99,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "account", "weight": 10, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", "rate-limit": 0, @@ -151,13 +151,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "account", "weight": 9, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", "rate-limit": 10, @@ -242,13 +242,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "account", "weight": 35, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "rate-limit": 0, @@ -321,13 +321,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 58, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "rate-limit": 0, @@ -384,13 +384,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 59, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "rate-limit": 0, @@ -448,13 +448,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "tokens", "weight": 30, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, @@ -497,13 +497,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 32, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "rate-limit": 0, @@ -565,13 +565,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMFA", "group": "mfa", "weight": 45, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-m-f-a.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, @@ -639,13 +639,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", "weight": 47, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "rate-limit": 0, @@ -706,13 +706,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", "weight": 48, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "rate-limit": 0, @@ -786,13 +786,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 52, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -855,13 +855,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", "weight": 53, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "rate-limit": 10, @@ -932,13 +932,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", "weight": 54, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", "rate-limit": 10, @@ -1011,13 +1011,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 46, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", "rate-limit": 0, @@ -1063,13 +1063,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 51, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -1115,13 +1115,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 49, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -1167,13 +1167,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 50, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -1221,13 +1221,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "account", "weight": 33, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "rate-limit": 0, @@ -1295,13 +1295,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "account", "weight": 34, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "rate-limit": 10, @@ -1375,13 +1375,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "account", "weight": 36, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "rate-limit": 0, @@ -1454,13 +1454,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "account", "weight": 31, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "rate-limit": 0, @@ -1506,13 +1506,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "account", "weight": 37, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "rate-limit": 0, @@ -1580,13 +1580,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRecovery", "group": "recovery", "weight": 39, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", "rate-limit": 10, @@ -1662,13 +1662,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRecovery", "group": "recovery", "weight": 40, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "rate-limit": 10, @@ -1748,13 +1748,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 12, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "rate-limit": 0, @@ -1795,13 +1795,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 13, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", "rate-limit": 100, @@ -1849,13 +1849,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAnonymousSession", "group": "sessions", "weight": 18, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-anonymous-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", "rate-limit": 50, @@ -1900,13 +1900,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailPasswordSession", "group": "sessions", "weight": 17, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-password-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "rate-limit": 10, @@ -1978,13 +1978,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateMagicURLSession", "group": "sessions", "weight": 27, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-magic-u-r-l-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1996,6 +1996,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2056,13 +2057,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updatePhoneSession", "group": "sessions", "weight": 28, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-phone-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2074,6 +2075,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2134,13 +2136,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 19, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2210,13 +2212,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSession", "group": "sessions", "weight": 14, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", "rate-limit": 0, @@ -2272,13 +2274,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSession", "group": "sessions", "weight": 16, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", "rate-limit": 10, @@ -2329,13 +2331,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 15, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", "rate-limit": 100, @@ -2393,13 +2395,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "account", "weight": 38, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", "rate-limit": 0, @@ -2447,13 +2449,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailToken", "group": "tokens", "weight": 26, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", "rate-limit": 10, @@ -2534,13 +2536,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMagicURLToken", "group": "tokens", "weight": 25, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-magic-u-r-l-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, @@ -2622,13 +2624,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Token", "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, @@ -2759,13 +2761,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneToken", "group": "tokens", "weight": 29, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", "rate-limit": 10, @@ -2840,13 +2842,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVerification", "group": "verification", "weight": 41, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", "rate-limit": 10, @@ -2912,13 +2914,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVerification", "group": "verification", "weight": 42, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", "rate-limit": 10, @@ -2993,13 +2995,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneVerification", "group": "verification", "weight": 43, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", "rate-limit": 10, @@ -3048,13 +3050,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "verification", "weight": 44, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", "rate-limit": 10, @@ -3127,13 +3129,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBrowser", "group": null, "weight": 61, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-browser.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "rate-limit": 0, @@ -3254,13 +3256,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCreditCard", "group": null, "weight": 60, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-credit-card.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "rate-limit": 0, @@ -3387,13 +3389,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFavicon", "group": null, "weight": 64, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-favicon.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "rate-limit": 0, @@ -3452,13 +3454,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFlag", "group": null, "weight": 62, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-flag.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "rate-limit": 0, @@ -3941,13 +3943,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getImage", "group": null, "weight": 63, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-image.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "rate-limit": 0, @@ -4026,13 +4028,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getInitials", "group": null, "weight": 66, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-initials.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "rate-limit": 0, @@ -4119,13 +4121,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQR", "group": null, "weight": 65, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-q-r.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, @@ -4212,13 +4214,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "databases", "weight": 321, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", "rate-limit": 0, @@ -4285,13 +4287,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "databases", "weight": 317, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", "rate-limit": 0, @@ -4368,13 +4370,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "databases", "weight": 318, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", "rate-limit": 0, @@ -4428,13 +4430,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "databases", "weight": 319, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", "rate-limit": 0, @@ -4507,13 +4509,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "databases", "weight": 320, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", "rate-limit": 0, @@ -4567,16 +4569,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listCollections", "group": "collections", "weight": 329, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.list" - }, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4587,6 +4586,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.list" + }, "auth": { "Project": [], "Key": [] @@ -4651,16 +4654,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createCollection", "group": "collections", "weight": 325, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createTable" - }, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -4671,6 +4671,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createTable" + }, "auth": { "Project": [], "Key": [] @@ -4760,16 +4764,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getCollection", "group": "collections", "weight": 326, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getTable" - }, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -4780,6 +4781,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getTable" + }, "auth": { "Project": [], "Key": [] @@ -4831,16 +4836,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateCollection", "group": "collections", "weight": 327, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateTable" - }, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -4851,6 +4853,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateTable" + }, "auth": { "Project": [], "Key": [] @@ -4936,16 +4942,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteCollection", "group": "collections", "weight": 328, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteTable" - }, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -4956,6 +4959,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteTable" + }, "auth": { "Project": [], "Key": [] @@ -5007,16 +5014,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listAttributes", "group": "attributes", "weight": 346, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listColumns" - }, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5027,6 +5031,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumns" + }, "auth": { "Project": [], "Key": [] @@ -5092,16 +5100,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", "weight": 347, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" - }, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5112,6 +5117,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createBooleanColumn" + }, "auth": { "Project": [], "Key": [] @@ -5202,16 +5211,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", "weight": 348, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" - }, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5222,6 +5228,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateBooleanColumn" + }, "auth": { "Project": [], "Key": [] @@ -5314,16 +5324,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", "weight": 349, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" - }, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5334,6 +5341,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createDatetimeColumn" + }, "auth": { "Project": [], "Key": [] @@ -5424,16 +5435,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", "weight": 350, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" - }, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5444,6 +5452,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn" + }, "auth": { "Project": [], "Key": [] @@ -5536,16 +5548,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", "weight": 351, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" - }, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5556,6 +5565,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEmailColumn" + }, "auth": { "Project": [], "Key": [] @@ -5646,16 +5659,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", "weight": 352, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" - }, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -5666,6 +5676,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEmailColumn" + }, "auth": { "Project": [], "Key": [] @@ -5758,16 +5772,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", "weight": 353, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" - }, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -5778,6 +5789,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEnumColumn" + }, "auth": { "Project": [], "Key": [] @@ -5878,16 +5893,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", "weight": 354, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" - }, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -5898,6 +5910,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEnumColumn" + }, "auth": { "Project": [], "Key": [] @@ -6000,16 +6016,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", "weight": 355, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" - }, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -6020,6 +6033,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createFloatColumn" + }, "auth": { "Project": [], "Key": [] @@ -6122,16 +6139,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", "weight": 356, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" - }, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6142,6 +6156,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateFloatColumn" + }, "auth": { "Project": [], "Key": [] @@ -6246,16 +6264,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", "weight": 357, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" - }, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6266,6 +6281,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIntegerColumn" + }, "auth": { "Project": [], "Key": [] @@ -6368,16 +6387,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", "weight": 358, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" - }, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6388,6 +6404,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIntegerColumn" + }, "auth": { "Project": [], "Key": [] @@ -6492,16 +6512,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIpAttribute", "group": "attributes", "weight": 359, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createIpColumn" - }, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6512,6 +6529,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIpColumn" + }, "auth": { "Project": [], "Key": [] @@ -6602,16 +6623,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", "weight": 360, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" - }, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6622,6 +6640,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIpColumn" + }, "auth": { "Project": [], "Key": [] @@ -6714,16 +6736,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", "weight": 361, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" - }, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -6734,6 +6753,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRelationshipColumn" + }, "auth": { "Project": [], "Key": [] @@ -6851,16 +6874,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createStringAttribute", "group": "attributes", "weight": 363, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createStringColumn" - }, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -6871,6 +6891,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createStringColumn" + }, "auth": { "Project": [], "Key": [] @@ -6974,16 +6998,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", "weight": 364, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" - }, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -6994,6 +7015,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateStringColumn" + }, "auth": { "Project": [], "Key": [] @@ -7092,16 +7117,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", "weight": 365, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" - }, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7112,6 +7134,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createUrlColumn" + }, "auth": { "Project": [], "Key": [] @@ -7202,16 +7228,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", "weight": 366, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" - }, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7222,6 +7245,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateUrlColumn" + }, "auth": { "Project": [], "Key": [] @@ -7343,16 +7370,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getAttribute", "group": "attributes", "weight": 344, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getColumn" - }, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7363,6 +7387,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumn" + }, "auth": { "Project": [], "Key": [] @@ -7416,16 +7444,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteAttribute", "group": "attributes", "weight": 345, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteColumn" - }, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7436,6 +7461,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumn" + }, "auth": { "Project": [], "Key": [] @@ -7496,16 +7525,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", "weight": 362, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" - }, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7516,6 +7542,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn" + }, "auth": { "Project": [], "Key": [] @@ -7602,16 +7632,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocuments", "group": "documents", "weight": 340, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listRows" - }, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7624,6 +7651,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "auth": { "Project": [], "Session": [] @@ -7689,16 +7720,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDocument", "group": "documents", "weight": 332, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createRow" - }, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -7711,6 +7739,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "methods": [ { "name": "createDocument", @@ -7857,16 +7889,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocuments", "group": "documents", "weight": 337, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.upsertRows" - }, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -7878,6 +7907,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRows" + }, "methods": [ { "name": "upsertDocuments", @@ -7968,16 +8001,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocuments", "group": "documents", "weight": 335, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRows" - }, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -7989,6 +8019,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRows" + }, "auth": { "Project": [], "Key": [] @@ -8064,16 +8098,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocuments", "group": "documents", "weight": 339, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteRows" - }, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8085,6 +8116,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRows" + }, "auth": { "Project": [], "Key": [] @@ -8154,16 +8189,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getDocument", "group": "documents", "weight": 333, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getRow" - }, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8176,6 +8208,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "auth": { "Project": [], "Session": [] @@ -8249,16 +8285,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocument", "group": "documents", "weight": 336, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.upsertRow" - }, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8271,6 +8304,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "methods": [ { "name": "upsertDocument", @@ -8378,16 +8415,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocument", "group": "documents", "weight": 334, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.updateRow" - }, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8400,6 +8434,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "auth": { "Project": [], "Session": [] @@ -8480,16 +8518,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocument", "group": "documents", "weight": 338, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteRow" - }, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8502,6 +8537,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "auth": { "Project": [], "Session": [] @@ -8565,16 +8604,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", "weight": 343, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.decrementColumn" - }, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -8586,6 +8622,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.decrementColumn" + }, "auth": { "Project": [], "Key": [] @@ -8675,16 +8715,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", "weight": 342, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.incrementColumn" - }, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -8696,6 +8733,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.incrementColumn" + }, "auth": { "Project": [], "Key": [] @@ -8783,16 +8824,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 370, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.listColumnIndexes" - }, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -8803,6 +8841,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumnIndexes" + }, "auth": { "Project": [], "Key": [] @@ -8866,16 +8908,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 367, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.createColumnIndex" - }, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -8886,6 +8925,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createColumnIndex" + }, "auth": { "Project": [], "Key": [] @@ -8997,16 +9040,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 368, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.getColumnIndex" - }, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -9017,6 +9057,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumnIndex" + }, "auth": { "Project": [], "Key": [] @@ -9070,16 +9114,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 369, "cookies": false, "type": "", - "deprecated": { - "since": "1.8.0", - "replaceWith": "tables.deleteColumnIndex" - }, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9090,6 +9131,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumnIndex" + }, "auth": { "Project": [], "Key": [] @@ -9148,13 +9193,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": null, "weight": 375, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, @@ -9229,13 +9274,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": null, "weight": 371, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, @@ -9335,13 +9380,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 372, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, @@ -9403,13 +9448,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": null, "weight": 373, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, @@ -9505,13 +9550,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": null, "weight": 374, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, @@ -9573,13 +9618,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listColumns", "group": "columns", "weight": 380, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -9655,13 +9700,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBooleanColumn", "group": "columns", "weight": 381, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, @@ -9762,13 +9807,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", "weight": 382, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, @@ -9871,13 +9916,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", "weight": 383, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, @@ -9978,13 +10023,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", "weight": 384, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, @@ -10087,13 +10132,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailColumn", "group": "columns", "weight": 385, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, @@ -10194,13 +10239,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailColumn", "group": "columns", "weight": 386, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, @@ -10303,13 +10348,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEnumColumn", "group": "columns", "weight": 387, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, @@ -10420,13 +10465,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEnumColumn", "group": "columns", "weight": 388, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, @@ -10539,13 +10584,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFloatColumn", "group": "columns", "weight": 389, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, @@ -10658,13 +10703,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFloatColumn", "group": "columns", "weight": 390, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, @@ -10779,13 +10824,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIntegerColumn", "group": "columns", "weight": 391, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, @@ -10898,13 +10943,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", "weight": 392, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, @@ -11019,13 +11064,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIpColumn", "group": "columns", "weight": 393, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, @@ -11126,13 +11171,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIpColumn", "group": "columns", "weight": 394, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, @@ -11235,13 +11280,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", "weight": 395, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, @@ -11369,13 +11414,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createStringColumn", "group": "columns", "weight": 397, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, @@ -11489,13 +11534,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStringColumn", "group": "columns", "weight": 398, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, @@ -11604,13 +11649,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createUrlColumn", "group": "columns", "weight": 399, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, @@ -11711,13 +11756,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateUrlColumn", "group": "columns", "weight": 400, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, @@ -11849,13 +11894,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getColumn", "group": "columns", "weight": 378, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, @@ -11919,13 +11964,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteColumn", "group": "columns", "weight": 379, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, @@ -11996,13 +12041,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", "weight": 396, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, @@ -12099,13 +12144,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 404, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -12179,13 +12224,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 401, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -12307,13 +12352,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 402, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -12377,13 +12422,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 403, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -12452,13 +12497,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRows", "group": "rows", "weight": 413, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, @@ -12536,13 +12581,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRow", "group": "rows", "weight": 405, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, @@ -12701,13 +12746,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRows", "group": "rows", "weight": 410, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, @@ -12809,13 +12854,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRows", "group": "rows", "weight": 408, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, @@ -12902,13 +12947,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteRows", "group": "rows", "weight": 412, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, @@ -12989,13 +13034,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRow", "group": "rows", "weight": 406, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, @@ -13081,13 +13126,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRow", "group": "rows", "weight": 409, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, @@ -13204,13 +13249,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRow", "group": "rows", "weight": 407, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, @@ -13303,13 +13348,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRow", "group": "rows", "weight": 411, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, @@ -13385,13 +13430,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "decrementRowColumn", "group": "rows", "weight": 416, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, @@ -13492,13 +13537,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "incrementRowColumn", "group": "rows", "weight": 415, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, @@ -13597,13 +13642,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "functions", "weight": 425, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's functions. You can use the query params to filter your results.", "rate-limit": 0, @@ -13670,13 +13715,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "functions", "weight": 422, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", "rate-limit": 0, @@ -13922,13 +13967,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRuntimes", "group": "runtimes", "weight": 427, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-runtimes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all runtimes that are currently active on your instance.", "rate-limit": 0, @@ -13972,13 +14017,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "runtimes", "weight": 428, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed function specifications for this instance.", "rate-limit": 0, @@ -14023,13 +14068,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "functions", "weight": 423, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function by its unique ID.", "rate-limit": 0, @@ -14083,13 +14128,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "functions", "weight": 424, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate function by its unique ID.", "rate-limit": 0, @@ -14331,13 +14376,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "functions", "weight": 426, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function by its unique ID.", "rate-limit": 0, @@ -14393,13 +14438,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", "weight": 431, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-function-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", "rate-limit": 0, @@ -14471,13 +14516,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 432, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the function's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -14552,13 +14597,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 429, "cookies": false, "type": "upload", - "deprecated": false, "demo": "functions\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "rate-limit": 0, @@ -14645,13 +14690,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 437, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -14731,13 +14776,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 434, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/functions#listTemplates) to find the template details.", "rate-limit": 0, @@ -14838,13 +14883,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 435, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -14935,13 +14980,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 430, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment by its unique ID.", "rate-limit": 0, @@ -14998,13 +15043,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 433, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a code deployment by its unique ID.", "rate-limit": 0, @@ -15066,13 +15111,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 436, "cookies": false, "type": "location", - "deprecated": false, "demo": "functions\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -15153,13 +15198,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 438, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -15221,13 +15266,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listExecutions", "group": "executions", "weight": 441, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-executions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -15297,13 +15342,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createExecution", "group": "executions", "weight": 439, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", "rate-limit": 0, @@ -15416,13 +15461,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getExecution", "group": "executions", "weight": 440, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.", "rate-limit": 0, @@ -15483,13 +15528,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteExecution", "group": "executions", "weight": 442, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function execution by its unique ID.", "rate-limit": 0, @@ -15551,13 +15596,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 447, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific function.", "rate-limit": 0, @@ -15611,13 +15656,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 445, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", "rate-limit": 0, @@ -15702,13 +15747,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 446, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -15770,13 +15815,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 448, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -15863,13 +15908,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 449, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -15933,13 +15978,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "query", "group": "graphql", "weight": 255, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/query.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -16009,13 +16054,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "mutation", "group": "graphql", "weight": 254, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/mutation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -16083,13 +16128,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "health", "weight": 78, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", "rate-limit": 0, @@ -16133,13 +16178,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getAntivirus", "group": "health", "weight": 99, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-antivirus.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", "rate-limit": 0, @@ -16183,13 +16228,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCache", "group": "health", "weight": 81, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-cache.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", "rate-limit": 0, @@ -16233,13 +16278,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCertificate", "group": "health", "weight": 86, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-certificate.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", "rate-limit": 0, @@ -16292,13 +16337,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDB", "group": "health", "weight": 80, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-d-b.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, @@ -16342,13 +16387,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPubSub", "group": "health", "weight": 82, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-pub-sub.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", "rate-limit": 0, @@ -16392,13 +16437,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueBuilds", "group": "queue", "weight": 88, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-builds.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", "rate-limit": 0, @@ -16453,13 +16498,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueCertificates", "group": "queue", "weight": 87, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-certificates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", "rate-limit": 0, @@ -16514,13 +16559,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDatabases", "group": "queue", "weight": 89, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-databases.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", "rate-limit": 0, @@ -16584,13 +16629,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDeletes", "group": "queue", "weight": 90, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-deletes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", "rate-limit": 0, @@ -16645,13 +16690,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFailedJobs", "group": "queue", "weight": 100, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-failed-jobs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", "rate-limit": 0, @@ -16730,13 +16775,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueFunctions", "group": "queue", "weight": 94, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-functions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", "rate-limit": 0, @@ -16791,13 +16836,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueLogs", "group": "queue", "weight": 85, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", "rate-limit": 0, @@ -16852,13 +16897,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMails", "group": "queue", "weight": 91, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-mails.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", "rate-limit": 0, @@ -16913,13 +16958,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMessaging", "group": "queue", "weight": 92, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-messaging.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", "rate-limit": 0, @@ -16974,13 +17019,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMigrations", "group": "queue", "weight": 93, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-migrations.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", "rate-limit": 0, @@ -17035,13 +17080,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", "weight": 95, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-stats-resources.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", "rate-limit": 0, @@ -17096,13 +17141,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueUsage", "group": "queue", "weight": 96, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", "rate-limit": 0, @@ -17157,13 +17202,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", "weight": 84, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-webhooks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", "rate-limit": 0, @@ -17218,13 +17263,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorage", "group": "storage", "weight": 98, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", "rate-limit": 0, @@ -17268,13 +17313,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorageLocal", "group": "storage", "weight": 97, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage-local.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", "rate-limit": 0, @@ -17318,13 +17363,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTime", "group": "health", "weight": 83, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-time.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", "rate-limit": 0, @@ -17368,13 +17413,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 70, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "rate-limit": 0, @@ -17422,13 +17467,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCodes", "group": null, "weight": 71, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "rate-limit": 0, @@ -17476,13 +17521,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listContinents", "group": null, "weight": 75, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-continents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "rate-limit": 0, @@ -17530,13 +17575,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountries", "group": null, "weight": 72, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "rate-limit": 0, @@ -17584,13 +17629,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesEU", "group": null, "weight": 73, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-e-u.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, @@ -17638,13 +17683,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesPhones", "group": null, "weight": 74, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-phones.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "rate-limit": 0, @@ -17692,13 +17737,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCurrencies", "group": null, "weight": 76, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-currencies.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "rate-limit": 0, @@ -17746,13 +17791,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLanguages", "group": null, "weight": 77, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-languages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "rate-limit": 0, @@ -17800,13 +17845,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessages", "group": "messages", "weight": 309, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-messages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", "rate-limit": 0, @@ -17876,13 +17921,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmail", "group": "messages", "weight": 306, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", "rate-limit": 0, @@ -18035,13 +18080,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "messages", "weight": 313, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", "rate-limit": 0, @@ -18191,13 +18236,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPush", "group": "messages", "weight": 308, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", "rate-limit": 0, @@ -18387,13 +18432,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePush", "group": "messages", "weight": 315, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", "rate-limit": 0, @@ -18582,13 +18627,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSms", "group": "messages", "weight": 307, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", "rate-limit": 0, @@ -18701,13 +18746,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSms", "group": "messages", "weight": 314, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, @@ -18816,13 +18861,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMessage", "group": "messages", "weight": 312, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-message.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", "rate-limit": 0, @@ -18872,13 +18917,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "messages", "weight": 316, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", "rate-limit": 0, @@ -18933,13 +18978,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessageLogs", "group": "logs", "weight": 310, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-message-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", "rate-limit": 0, @@ -19006,13 +19051,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "messages", "weight": 311, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", "rate-limit": 0, @@ -19079,13 +19124,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviders", "group": "providers", "weight": 281, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-providers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", "rate-limit": 0, @@ -19155,13 +19200,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createApnsProvider", "group": "providers", "weight": 280, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", "rate-limit": 0, @@ -19271,13 +19316,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", "weight": 293, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", "rate-limit": 0, @@ -19385,13 +19430,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFcmProvider", "group": "providers", "weight": 279, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", "rate-limit": 0, @@ -19477,13 +19522,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", "weight": 292, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", "rate-limit": 0, @@ -19567,13 +19612,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMailgunProvider", "group": "providers", "weight": 271, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", "rate-limit": 0, @@ -19695,13 +19740,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", "weight": 284, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", "rate-limit": 0, @@ -19821,13 +19866,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMsg91Provider", "group": "providers", "weight": 274, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, @@ -19925,13 +19970,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", "weight": 287, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, @@ -20027,13 +20072,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSendgridProvider", "group": "providers", "weight": 272, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "rate-limit": 0, @@ -20143,13 +20188,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", "weight": 285, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "rate-limit": 0, @@ -20257,13 +20302,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", "weight": 273, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", "rate-limit": 0, @@ -20417,13 +20462,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", "weight": 286, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", "rate-limit": 0, @@ -20574,13 +20619,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTelesignProvider", "group": "providers", "weight": 275, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", "rate-limit": 0, @@ -20678,13 +20723,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", "weight": 288, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", "rate-limit": 0, @@ -20780,13 +20825,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", "weight": 276, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", "rate-limit": 0, @@ -20884,13 +20929,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", "weight": 289, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", "rate-limit": 0, @@ -20986,13 +21031,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTwilioProvider", "group": "providers", "weight": 277, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", "rate-limit": 0, @@ -21090,13 +21135,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", "weight": 290, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", "rate-limit": 0, @@ -21192,13 +21237,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVonageProvider", "group": "providers", "weight": 278, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", "rate-limit": 0, @@ -21296,13 +21341,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVonageProvider", "group": "providers", "weight": 291, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", "rate-limit": 0, @@ -21396,13 +21441,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getProvider", "group": "providers", "weight": 283, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", "rate-limit": 0, @@ -21452,13 +21497,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteProvider", "group": "providers", "weight": 294, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", "rate-limit": 0, @@ -21513,13 +21558,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviderLogs", "group": "providers", "weight": 282, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-provider-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", "rate-limit": 0, @@ -21586,13 +21631,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", "weight": 303, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscriber-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", "rate-limit": 0, @@ -21659,13 +21704,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopics", "group": "topics", "weight": 296, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topics.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", "rate-limit": 0, @@ -21733,13 +21778,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTopic", "group": "topics", "weight": 295, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", "rate-limit": 0, @@ -21822,13 +21867,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTopic", "group": "topics", "weight": 298, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", "rate-limit": 0, @@ -21883,13 +21928,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTopic", "group": "topics", "weight": 299, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", "rate-limit": 0, @@ -21963,13 +22008,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTopic", "group": "topics", "weight": 300, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", "rate-limit": 0, @@ -22024,13 +22069,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopicLogs", "group": "topics", "weight": 297, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topic-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", "rate-limit": 0, @@ -22097,13 +22142,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscribers", "group": "subscribers", "weight": 302, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscribers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "rate-limit": 0, @@ -22179,13 +22224,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSubscriber", "group": "subscribers", "weight": 301, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "rate-limit": 0, @@ -22269,13 +22314,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSubscriber", "group": "subscribers", "weight": 304, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "rate-limit": 0, @@ -22333,13 +22378,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", "weight": 305, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "rate-limit": 0, @@ -22406,13 +22451,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "sites", "weight": 454, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's sites. You can use the query params to filter your results.", "rate-limit": 0, @@ -22479,13 +22524,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "sites", "weight": 452, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site.", "rate-limit": 0, @@ -22747,13 +22792,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFrameworks", "group": "frameworks", "weight": 457, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-frameworks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all frameworks that are currently available on the server instance.", "rate-limit": 0, @@ -22797,13 +22842,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "frameworks", "weight": 480, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed site specifications for this instance.", "rate-limit": 0, @@ -22848,13 +22893,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "sites", "weight": 453, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site by its unique ID.", "rate-limit": 0, @@ -22908,13 +22953,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "sites", "weight": 455, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate site by its unique ID.", "rate-limit": 0, @@ -23171,13 +23216,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "sites", "weight": 456, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site by its unique ID.", "rate-limit": 0, @@ -23233,13 +23278,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", "weight": 463, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-site-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", "rate-limit": 0, @@ -23311,13 +23356,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 462, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the site's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -23392,13 +23437,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 458, "cookies": false, "type": "upload", - "deprecated": false, "demo": "sites\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID.", "rate-limit": 0, @@ -23493,13 +23538,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 466, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -23573,13 +23618,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 459, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/sites#listTemplates) to find the template details.", "rate-limit": 0, @@ -23680,13 +23725,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 460, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -23778,13 +23823,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 461, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment by its unique ID.", "rate-limit": 0, @@ -23841,13 +23886,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 464, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site deployment by its unique ID.", "rate-limit": 0, @@ -23909,13 +23954,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 465, "cookies": false, "type": "location", - "deprecated": false, "demo": "sites\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -23996,13 +24041,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 467, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -24064,13 +24109,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 469, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all site logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -24136,13 +24181,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getLog", "group": "logs", "weight": 468, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site request log by its unique ID.", "rate-limit": 0, @@ -24201,13 +24246,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteLog", "group": "logs", "weight": 470, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site log by its unique ID.", "rate-limit": 0, @@ -24269,13 +24314,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 473, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific site.", "rate-limit": 0, @@ -24329,13 +24374,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 471, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", "rate-limit": 0, @@ -24420,13 +24465,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 472, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -24488,13 +24533,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 474, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -24581,13 +24626,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 475, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -24649,13 +24694,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listBuckets", "group": "buckets", "weight": 156, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-buckets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", "rate-limit": 0, @@ -24722,13 +24767,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBucket", "group": "buckets", "weight": 155, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/create-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", "rate-limit": 0, @@ -24860,13 +24905,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBucket", "group": "buckets", "weight": 157, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", "rate-limit": 0, @@ -24920,13 +24965,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBucket", "group": "buckets", "weight": 158, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", "rate-limit": 0, @@ -25054,13 +25099,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteBucket", "group": "buckets", "weight": 159, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", "rate-limit": 0, @@ -25114,13 +25159,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFiles", "group": "files", "weight": 161, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-files.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "rate-limit": 0, @@ -25199,13 +25244,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFile", "group": "files", "weight": 160, "cookies": false, "type": "upload", - "deprecated": false, "demo": "storage\/create-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "rate-limit": 60, @@ -25291,13 +25336,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFile", "group": "files", "weight": 162, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "rate-limit": 0, @@ -25363,13 +25408,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFile", "group": "files", "weight": 167, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "rate-limit": 60, @@ -25454,13 +25499,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteFile", "group": "files", "weight": 168, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", "rate-limit": 60, @@ -25526,13 +25571,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFileDownload", "group": "files", "weight": 164, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "rate-limit": 0, @@ -25607,13 +25652,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFilePreview", "group": "files", "weight": 163, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-preview.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "rate-limit": 0, @@ -25816,13 +25861,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFileView", "group": "files", "weight": 165, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-view.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "rate-limit": 0, @@ -25897,13 +25942,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "teams", "weight": 172, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "rate-limit": 0, @@ -25974,13 +26019,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "teams", "weight": 171, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "rate-limit": 0, @@ -26066,13 +26111,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "teams", "weight": 173, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "rate-limit": 0, @@ -26130,13 +26175,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "teams", "weight": 175, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "rate-limit": 0, @@ -26207,13 +26252,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "teams", "weight": 177, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "rate-limit": 0, @@ -26271,13 +26316,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 179, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "rate-limit": 0, @@ -26356,13 +26401,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMembership", "group": "memberships", "weight": 178, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "rate-limit": 10, @@ -26471,13 +26516,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMembership", "group": "memberships", "weight": 180, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "rate-limit": 0, @@ -26543,13 +26588,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembership", "group": "memberships", "weight": 181, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "rate-limit": 0, @@ -26631,13 +26676,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMembership", "group": "memberships", "weight": 183, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "rate-limit": 0, @@ -26705,13 +26750,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", "weight": 182, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "rate-limit": 0, @@ -26800,13 +26845,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "teams", "weight": 174, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "rate-limit": 0, @@ -26862,13 +26907,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "teams", "weight": 176, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "rate-limit": 0, @@ -26942,13 +26987,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "files", "weight": 488, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the tokens created for a specific file or bucket. You can use the query params to filter your results.", "rate-limit": 0, @@ -27023,13 +27068,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFileToken", "group": "files", "weight": 486, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/create-file-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, @@ -27108,13 +27153,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "tokens", "weight": 487, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a token by its unique ID.", "rate-limit": 0, @@ -27169,13 +27214,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "tokens", "weight": 489, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date.", "rate-limit": 60, @@ -27241,13 +27286,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "tokens", "weight": 490, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a token by its unique ID.", "rate-limit": 60, @@ -27302,13 +27347,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "users", "weight": 194, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", "rate-limit": 0, @@ -27375,13 +27420,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "users", "weight": 185, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", "rate-limit": 0, @@ -27471,13 +27516,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createArgon2User", "group": "users", "weight": 188, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-argon2user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, @@ -27563,13 +27608,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBcryptUser", "group": "users", "weight": 186, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-bcrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", "rate-limit": 0, @@ -27653,13 +27698,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 202, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", "rate-limit": 0, @@ -27723,13 +27768,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 225, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", "rate-limit": 0, @@ -27785,13 +27830,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMD5User", "group": "users", "weight": 187, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-m-d5user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, @@ -27877,13 +27922,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPHPassUser", "group": "users", "weight": 190, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-p-h-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, @@ -27969,13 +28014,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptUser", "group": "users", "weight": 191, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", "rate-limit": 0, @@ -28096,13 +28141,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", "weight": 192, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-modified-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", "rate-limit": 0, @@ -28209,13 +28254,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSHAUser", "group": "users", "weight": 189, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-s-h-a-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, @@ -28320,13 +28365,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "users", "weight": 195, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", "rate-limit": 0, @@ -28375,13 +28420,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "users", "weight": 223, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", "rate-limit": 0, @@ -28437,13 +28482,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "users", "weight": 208, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", "rate-limit": 0, @@ -28517,13 +28562,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "sessions", "weight": 226, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, @@ -28600,13 +28645,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateLabels", "group": "users", "weight": 204, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-labels.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", "rate-limit": 0, @@ -28681,13 +28726,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 200, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", "rate-limit": 0, @@ -28753,13 +28798,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 199, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", "rate-limit": 0, @@ -28836,13 +28881,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfa", "group": "users", "weight": 213, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", "rate-limit": 0, @@ -28911,13 +28956,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 218, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -28984,13 +29029,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 214, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", "rate-limit": 0, @@ -29044,13 +29089,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 215, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -29104,13 +29149,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 217, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -29164,13 +29209,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 216, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -29226,13 +29271,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "users", "weight": 206, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", "rate-limit": 0, @@ -29306,13 +29351,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "users", "weight": 207, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", "rate-limit": 0, @@ -29386,13 +29431,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "users", "weight": 209, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", "rate-limit": 0, @@ -29464,13 +29509,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "users", "weight": 196, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", "rate-limit": 0, @@ -29524,13 +29569,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "users", "weight": 211, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", "rate-limit": 0, @@ -29602,13 +29647,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 198, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", "rate-limit": 0, @@ -29662,13 +29707,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 219, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", "rate-limit": 0, @@ -29717,13 +29762,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 222, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", "rate-limit": 0, @@ -29774,13 +29819,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 221, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", "rate-limit": 0, @@ -29844,13 +29889,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "users", "weight": 203, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", "rate-limit": 0, @@ -29922,13 +29967,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "targets", "weight": 201, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", "rate-limit": 0, @@ -29995,13 +30040,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTarget", "group": "targets", "weight": 193, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", "rate-limit": 0, @@ -30107,13 +30152,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTarget", "group": "targets", "weight": 197, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", "rate-limit": 0, @@ -30176,13 +30221,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTarget", "group": "targets", "weight": 212, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", "rate-limit": 0, @@ -30267,13 +30312,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTarget", "group": "targets", "weight": 224, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", "rate-limit": 0, @@ -30338,13 +30383,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createToken", "group": "sessions", "weight": 220, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", "rate-limit": 0, @@ -30421,13 +30466,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailVerification", "group": "users", "weight": 210, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", "rate-limit": 0, @@ -30501,13 +30546,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "users", "weight": 205, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", "rate-limit": 0, diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index 19cafa10a4..b6298e1840 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -175,6 +175,11 @@ class Method return $this->type; } + public function isDeprecated(): bool + { + return $this->deprecated !== false; + } + public function getDeprecated(): bool|array { return $this->deprecated; diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index a7d0db6518..cefef28b4c 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -152,13 +152,13 @@ class OpenAPI3 extends Format 'tags' => [$namespace], 'description' => $descContents, 'responses' => [], + 'deprecated' => $sdk->isDeprecated(), 'x-appwrite' => [ // Appwrite related metadata 'method' => $method, 'group' => $sdk->getGroup(), 'weight' => $route->getOrder(), 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', - 'deprecated' => $sdk->getDeprecated(), 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '', 'rate-limit' => $route->getLabel('abuse-limit', 0), @@ -170,6 +170,10 @@ class OpenAPI3 extends Format ], ]; + if ($sdk->isDeprecated()) { + $temp['x-appwrite']['deprecated'] = $sdk->getDeprecated(); + } + if (!empty($additionalMethods)) { $temp['x-appwrite']['methods'] = []; foreach ($additionalMethods as $method) { diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 1d53b58d8c..ffd193d772 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -154,13 +154,13 @@ class Swagger2 extends Format 'tags' => [$namespace], 'description' => $descContents, 'responses' => [], + 'deprecated' => $sdk->isDeprecated(), 'x-appwrite' => [ // Appwrite related metadata 'method' => $method, 'group' => $sdk->getGroup(), 'weight' => $route->getOrder(), 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', - 'deprecated' => $sdk->getDeprecated(), 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '', 'rate-limit' => $route->getLabel('abuse-limit', 0), @@ -168,10 +168,14 @@ class Swagger2 extends Format 'rate-key' => $route->getLabel('abuse-key', 'url:{url},ip:{ip}'), 'scope' => $route->getLabel('scope', ''), 'platforms' => $sdkPlatforms, - 'packaging' => $sdk->isPackaging() + 'packaging' => $sdk->isPackaging(), ], ]; + if ($sdk->isDeprecated()) { + $temp['x-appwrite']['deprecated'] = $sdk->getDeprecated(); + } + if ($produces) { $temp['produces'][] = $produces; } From 8cc254a56f2df2a36b85e0250cf2358a8a3dc681 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Thu, 3 Jul 2025 11:29:41 +0530 Subject: [PATCH 221/362] fix: replacewith methods --- .../Modules/Databases/Http/Databases/Collections/Create.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Delete.php | 2 +- .../Databases/Collections/Documents/Attribute/Decrement.php | 2 +- .../Databases/Collections/Documents/Attribute/Increment.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Get.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Create.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Delete.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Get.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/XList.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Logs/XList.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Update.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Usage/Get.php | 2 +- 12 files changed, 12 insertions(+), 12 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 ba76c35655..7d72425645 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -64,7 +64,7 @@ class Create extends Action contentType: ContentType::JSON, deprecated: [ 'since' => '1.8.0', - 'replaceWith' => 'tables.createTable', + 'replaceWith' => 'tables.create', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php index 8203780e11..e78d03e9c8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php @@ -54,7 +54,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: [ 'since' => '1.8.0', - 'replaceWith' => 'tables.deleteTable', + 'replaceWith' => 'tables.delete', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php index 25c309492f..07a0342c80 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php @@ -64,7 +64,7 @@ class Decrement extends Action contentType: ContentType::JSON, deprecated: [ 'since' => '1.8.0', - 'replaceWith' => 'tables.decrementColumn', + 'replaceWith' => 'tables.decrementRowColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php index 785e319f3c..eed2399b53 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php @@ -64,7 +64,7 @@ class Increment extends Action contentType: ContentType::JSON, deprecated: [ 'since' => '1.8.0', - 'replaceWith' => 'tables.incrementColumn', + 'replaceWith' => 'tables.incrementRowColumn', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php index 503762535e..9faeefa949 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php @@ -49,7 +49,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: [ 'since' => '1.8.0', - 'replaceWith' => 'tables.getTable', + 'replaceWith' => 'tables.get', ], )) ->param('databaseId', '', new UID(), 'Database ID.') 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 e67ff99806..c01f3aeb2d 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 @@ -64,7 +64,7 @@ class Create extends Action contentType: ContentType::JSON, deprecated: [ 'since' => '1.8.0', - 'replaceWith' => 'tables.createColumnIndex', + 'replaceWith' => 'tables.createIndex', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index 23095b6425..2ba8922c35 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -59,7 +59,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: [ 'since' => '1.8.0', - 'replaceWith' => 'tables.deleteColumnIndex', + 'replaceWith' => 'tables.deleteIndex', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index ad94cc760f..f7b163b47c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -50,7 +50,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: [ 'since' => '1.8.0', - 'replaceWith' => 'tables.getColumnIndex', + 'replaceWith' => 'tables.getIndex', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index 5108bb1b3e..8b6e4ef8d0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -55,7 +55,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: [ 'since' => '1.8.0', - 'replaceWith' => 'tables.listColumnIndexes', + 'replaceWith' => 'tables.listIndexes', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 03578f367a..12c1b19340 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -61,7 +61,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: [ 'since' => '1.8.0', - 'replaceWith' => 'tables.listTableLogs', + 'replaceWith' => 'tables.listLogs', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index aa7214f5ad..e4c8b38c70 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: [ 'since' => '1.8.0', - 'replaceWith' => 'tables.updateTable', + 'replaceWith' => 'tables.update', ], )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php index 3bcdcb976b..ec24f1bab4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php @@ -54,7 +54,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: [ 'since' => '1.8.0', - 'replaceWith' => 'tables.getTableUsage', + 'replaceWith' => 'tables.getUsage', ], )) ->param('databaseId', '', new UID(), 'Database ID.') From a2b6ed3513bdd2d6d7ad58495b360321c255c862 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 7 Jul 2025 14:11:35 +0530 Subject: [PATCH 222/362] added response filters for version older than 1.8.x --- app/controllers/general.php | 4 +++ src/Appwrite/Utopia/Response/Filters/V20.php | 29 ++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 src/Appwrite/Utopia/Response/Filters/V20.php diff --git a/app/controllers/general.php b/app/controllers/general.php index 61a9cc9bfa..86b256a76a 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -27,6 +27,7 @@ use Appwrite\Utopia\Response\Filters\V16 as ResponseV16; use Appwrite\Utopia\Response\Filters\V17 as ResponseV17; use Appwrite\Utopia\Response\Filters\V18 as ResponseV18; use Appwrite\Utopia\Response\Filters\V19 as ResponseV19; +use Appwrite\Utopia\Response\Filters\V20 as ResponseV20; use Appwrite\Utopia\View; use Executor\Executor; use MaxMind\Db\Reader; @@ -1012,6 +1013,9 @@ App::init() if (version_compare($responseFormat, '1.7.0', '<')) { $response->addFilter(new ResponseV19()); } + if (version_compare($responseFormat, '1.8.0', '<')) { + $response->addFilter(new ResponseV20()); + } if (version_compare($responseFormat, APP_VERSION_STABLE, '>')) { $response->addHeader('X-Appwrite-Warning', "The current SDK is built for Appwrite " . $responseFormat . ". However, the current Appwrite server version is " . APP_VERSION_STABLE . ". Please downgrade your SDK to match the Appwrite version: https://appwrite.io/docs/sdks"); } diff --git a/src/Appwrite/Utopia/Response/Filters/V20.php b/src/Appwrite/Utopia/Response/Filters/V20.php new file mode 100644 index 0000000000..96e847fa1f --- /dev/null +++ b/src/Appwrite/Utopia/Response/Filters/V20.php @@ -0,0 +1,29 @@ +<?php + +namespace Appwrite\Utopia\Response\Filters; + +use Appwrite\Utopia\Response; +use Appwrite\Utopia\Response\Filter; + +class V20 extends Filter +{ + // removing $sequence from all versions less than 1.8 + public function parse(array $content, string $model): array + { + $parsedResponse = $content; + + $parsedResponse = match($model) { + Response::MODEL_DOCUMENT => $this->parseDocument($content), + Response::MODEL_DOCUMENT_LIST => $this->handleList($content, 'documents', fn ($item) => $this->parseDocument($item)), + default => $parsedResponse, + }; + + return $parsedResponse; + } + + protected function parseDocument(array $content): array + { + unset($content['$sequence']); + return $content; + } +} From 5b8751d270b83219e9b25518ab9f0d31958ea51f Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Thu, 17 Jul 2025 18:23:33 +0530 Subject: [PATCH 223/362] add: changes to module structure. --- .../Databases/Collections/Documents/Get.php | 10 +++- .../Databases/Collections/Documents/XList.php | 59 ++++++++++++++----- 2 files changed, 53 insertions(+), 16 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index 7376fe770a..0542123ee7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -87,7 +87,15 @@ class Get extends Action } try { - $document = $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId, $queries); + $selects = Query::groupByType($queries)['selections'] ?? []; + + if (! empty($selects)) { + // has selects, allow relationship on documents! + $document = $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId, $queries); + } else { + // has no selects, disable relationship looping on documents! + $document = $dbForProject->skipRelationships(fn () => $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId, $queries)); + } } catch (QueryException $e) { throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 2e76942db1..961ca2d5fd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -114,8 +114,21 @@ class XList extends Action $cursor->setValue($cursorDocument); } + + $selectQueries = []; + try { - $documents = $dbForProject->find('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $queries); + $selectQueries = Query::groupByType($queries)['selections'] ?? []; + + if (! empty($selectQueries)) { + // has selects, allow relationship on documents! + $documents = $dbForProject->find('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $queries); + } else { + // has no selects, disable relationship looping on documents! + /* @type Document[] $documents */ + $documents = $dbForProject->skipRelationships(fn () => $dbForProject->find('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $queries)); + } + $total = $dbForProject->count('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $queries, APP_LIMIT_COUNT); } catch (OrderException $e) { $documents = $this->isCollectionsAPI() ? 'documents' : 'rows'; @@ -150,24 +163,40 @@ class XList extends Action }, false); // Check if the SELECT query includes $databaseId and $collectionId + $hasWildcard = false; $hasDatabaseId = false; $hasCollectionId = false; - if ($select) { - $hasDatabaseId = \array_reduce($queries, function ($result, $query) { - return $result || ($query->getMethod() === Query::TYPE_SELECT && \in_array('$databaseId', $query->getValues())); - }, false); - $hasCollectionId = \array_reduce($queries, function ($result, $query) { - return $result || ($query->getMethod() === Query::TYPE_SELECT && \in_array('$collectionId', $query->getValues())); - }, false); - } + $hasSelectQueries = !empty($selectQueries); - if ($select) { - foreach ($documents as $document) { - if (!$hasDatabaseId) { - $document->removeAttribute('$databaseId'); + if ($hasSelectQueries) { + foreach ($selectQueries as $query) { + if ($query->getMethod() !== Query::TYPE_SELECT) { + continue; } - if (!$hasCollectionId) { - $document->removeAttribute('$collectionId'); + + $values = $query->getValues(); + if (\in_array('*', $values, true)) { + $hasWildcard = true; + break; + } + + if (\in_array('$databaseId', $values, true)) { + $hasDatabaseId = true; + } + + if (\in_array('$collectionId', $values, true)) { + $hasCollectionId = true; + } + } + + if (!$hasWildcard) { + foreach ($documents as $document) { + if (!$hasDatabaseId) { + $document->removeAttribute('$databaseId'); + } + if (!$hasCollectionId) { + $document->removeAttribute('$collectionId'); + } } } } From 944f5ed7c1ca97b5cababf0a94ea55bfe844e612 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Thu, 17 Jul 2025 18:58:56 +0530 Subject: [PATCH 224/362] update: mirror tests to Tables api. --- .../Databases/Tables/DatabasesBase.php | 37 ++++++++++--- .../Tables/DatabasesCustomServerTest.php | 52 ++++++++++++++++--- 2 files changed, 77 insertions(+), 12 deletions(-) diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Tables/DatabasesBase.php index 12426d78b2..29f92cc58a 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesBase.php @@ -4572,7 +4572,11 @@ trait DatabasesBase $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $personCollection . '/rows/' . $person2['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['*', 'libraries.*'])->toString() + ] + ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayNotHasKey('$table', $response['body']); @@ -4582,7 +4586,11 @@ trait DatabasesBase $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $libraryCollection . '/rows/library11', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['person_one_to_many.$id'])->toString() + ] + ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayHasKey('person_one_to_many', $response['body']); @@ -4732,7 +4740,11 @@ trait DatabasesBase $album = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/rows/album1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['*', 'artist.name', 'artist.$permissions'])->toString() + ] + ]); $this->assertEquals(200, $album['headers']['status-code']); $this->assertEquals('album1', $album['body']['$id']); @@ -4744,7 +4756,11 @@ trait DatabasesBase $artist = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $artists['body']['$id'] . '/rows/' . $album['body']['artist']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['*', 'albums.$id', 'albums.name', 'albums.$permissions'])->toString() + ] + ]); $this->assertEquals(200, $artist['headers']['status-code']); $this->assertEquals('Artist 1', $artist['body']['name']); @@ -4885,7 +4901,11 @@ trait DatabasesBase $sport = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/rows/sport1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['*', 'players.name', 'players.$permissions'])->toString() + ] + ]); $this->assertEquals(200, $sport['headers']['status-code']); $this->assertEquals('sport1', $sport['body']['$id']); @@ -4899,7 +4919,11 @@ trait DatabasesBase $player = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $players['body']['$id'] . '/rows/' . $sport['body']['players'][0]['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['*', 'sports.$id', 'sports.name', 'sports.$permissions'])->toString() + ] + ]); $this->assertEquals(200, $player['headers']['status-code']); $this->assertEquals('Player 1', $player['body']['name']); @@ -4927,6 +4951,7 @@ trait DatabasesBase ], $this->getHeaders()), [ 'queries' => [ Query::isNotNull('$id')->toString(), + Query::select(['*', 'libraries.*'])->toString(), Query::startsWith('fullName', 'Stevie')->toString(), Query::endsWith('fullName', 'Wonder')->toString(), Query::between('$createdAt', '1975-12-06', '2050-12-01')->toString(), diff --git a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php index 710b167b64..99f1b58c01 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php @@ -3740,7 +3740,11 @@ class DatabasesCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] - ])); + ]), [ + 'queries' => [ + Query::select(['new_level_2.*'])->toString() + ] + ]); $this->assertArrayHasKey('new_level_2', $newRow['body']); $this->assertEquals(1, count($newRow['body']['new_level_2'])); @@ -3850,7 +3854,11 @@ class DatabasesCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] - ])); + ]), [ + 'queries' => [ + Query::select(['new_level_2.*'])->toString() + ] + ]); $this->assertArrayHasKey('new_level_2', $newRow['body']); $this->assertNotEmpty($newRow['body']['new_level_2']); @@ -3960,7 +3968,11 @@ class DatabasesCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] - ])); + ]), [ + 'queries' => [ + Query::select(['new_level_2.*'])->toString() + ] + ]); $this->assertArrayHasKey('new_level_2', $newRow['body']); $this->assertNotEmpty($newRow['body']['new_level_2']); @@ -3971,7 +3983,11 @@ class DatabasesCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] - ])); + ]), [ + 'queries' => [ + Query::select(['*', 'level1.*'])->toString() + ] + ]); $this->assertArrayHasKey('level1', $level2Row['body']); $this->assertNotEmpty($level2Row['body']['level1']); @@ -4070,7 +4086,11 @@ class DatabasesCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] - ])); + ]), [ + 'queries' => [ + Query::select(['new_level_2.*'])->toString() + ] + ]); $this->assertArrayHasKey('new_level_2', $newRow['body']); $this->assertNotEmpty($newRow['body']['new_level_2']); @@ -4081,7 +4101,11 @@ class DatabasesCustomServerTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] - ])); + ]), [ + 'queries' => [ + Query::select(['*', 'level1.*'])->toString() + ] + ]); $this->assertArrayHasKey('level1', $level2Row['body']); $this->assertNotEmpty($level2Row['body']['level1']); @@ -4426,6 +4450,14 @@ class DatabasesCustomServerTest extends Scope $createBulkRows(); + /** + * Wait for database to purge cache... + * + * This test specifically failed on 1.6.x response format, + * could be due to the slow or overworked machine, but being safe here! + */ + sleep(5); + // TEST: Update all rows $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', @@ -4444,6 +4476,14 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(10, $response['body']['rows']); + /** + * Wait for database to purge cache... + * + * This test specifically failed on 1.6.x response format, + * could be due to the slow or overworked machine, but being safe here! + */ + sleep(5); + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], From 46c755336c657ae0ab2b8a01aed9732359c3d417 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 18 Jul 2025 10:28:29 +0530 Subject: [PATCH 225/362] bump: dependencies. --- composer.json | 2 +- composer.lock | 76 +++++++++++++++++++++++++-------------------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/composer.json b/composer.json index 4c36ab125d..2065139bb9 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.10.*", + "utopia-php/migration": "0.12.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index 72b460ec52..052644ba5b 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": "55bc52686a08d64930e6af7411ac0654", + "content-hash": "25ac1acb960988af5c10239c3bde258b", "packages": [ { "name": "adhocore/jwt", @@ -69,16 +69,16 @@ }, { "name": "appwrite/appwrite", - "version": "11.1.0", + "version": "15.0.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-for-php.git", - "reference": "1d043f543acdb17b9fdb440b1b2dd208e400bad3" + "reference": "deb97b62e0abed8a4fd5c5d48e77365cf89867cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/1d043f543acdb17b9fdb440b1b2dd208e400bad3", - "reference": "1d043f543acdb17b9fdb440b1b2dd208e400bad3", + "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/deb97b62e0abed8a4fd5c5d48e77365cf89867cf", + "reference": "deb97b62e0abed8a4fd5c5d48e77365cf89867cf", "shasum": "" }, "require": { @@ -104,10 +104,10 @@ "support": { "email": "team@appwrite.io", "issues": "https://github.com/appwrite/sdk-for-php/issues", - "source": "https://github.com/appwrite/sdk-for-php/tree/11.1.0", + "source": "https://github.com/appwrite/sdk-for-php/tree/15.0.0", "url": "https://appwrite.io/support" }, - "time": "2024-06-26T07:03:23+00:00" + "time": "2025-05-18T09:47:10+00:00" }, { "name": "appwrite/php-clamav", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.71.9", + "version": "0.71.10", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "eb2f759020bba617e99dd67973a9bd949b47f54e" + "reference": "83278d663f9c63c25a11d9e71c7922da7ec48636" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/eb2f759020bba617e99dd67973a9bd949b47f54e", - "reference": "eb2f759020bba617e99dd67973a9bd949b47f54e", + "url": "https://api.github.com/repos/utopia-php/database/zipball/83278d663f9c63c25a11d9e71c7922da7ec48636", + "reference": "83278d663f9c63c25a11d9e71c7922da7ec48636", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.71.9" + "source": "https://github.com/utopia-php/database/tree/0.71.10" }, - "time": "2025-07-02T16:37:41+00:00" + "time": "2025-07-18T00:05:55+00:00" }, { "name": "utopia-php/detector", @@ -3993,20 +3993,20 @@ }, { "name": "utopia-php/migration", - "version": "0.10.4", + "version": "0.12.0", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "0c85917482db172b3ccdc0704e42af3c1cc89361" + "reference": "973a4daa283f711a104e9bb7cf5a79dec2988df0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/0c85917482db172b3ccdc0704e42af3c1cc89361", - "reference": "0c85917482db172b3ccdc0704e42af3c1cc89361", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/973a4daa283f711a104e9bb7cf5a79dec2988df0", + "reference": "973a4daa283f711a104e9bb7cf5a79dec2988df0", "shasum": "" }, "require": { - "appwrite/appwrite": "11.*", + "appwrite/appwrite": "15.*", "ext-curl": "*", "ext-openssl": "*", "php": ">=8.1", @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.10.4" + "source": "https://github.com/utopia-php/migration/tree/0.12.0" }, - "time": "2025-07-02T18:31:09+00:00" + "time": "2025-07-17T12:20:11+00:00" }, { "name": "utopia-php/orchestration", @@ -4810,16 +4810,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.11", + "version": "0.41.15", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "60122cb613a5a1c82667ecc2217e351654a8d404" + "reference": "02a7e0df5a555c7bdfb50cb68db60460afb409e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/60122cb613a5a1c82667ecc2217e351654a8d404", - "reference": "60122cb613a5a1c82667ecc2217e351654a8d404", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/02a7e0df5a555c7bdfb50cb68db60460afb409e1", + "reference": "02a7e0df5a555c7bdfb50cb68db60460afb409e1", "shasum": "" }, "require": { @@ -4855,9 +4855,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.11" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.15" }, - "time": "2025-07-04T09:56:24+00:00" + "time": "2025-07-16T13:00:21+00:00" }, { "name": "doctrine/annotations", @@ -5084,16 +5084,16 @@ }, { "name": "laravel/pint", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "9ab851dba4faa51a3c3223dd3d07044129021024" + "reference": "0345f3b05f136801af8c339f9d16ef29e6b4df8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/9ab851dba4faa51a3c3223dd3d07044129021024", - "reference": "9ab851dba4faa51a3c3223dd3d07044129021024", + "url": "https://api.github.com/repos/laravel/pint/zipball/0345f3b05f136801af8c339f9d16ef29e6b4df8a", + "reference": "0345f3b05f136801af8c339f9d16ef29e6b4df8a", "shasum": "" }, "require": { @@ -5104,7 +5104,7 @@ "php": "^8.2.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.76.0", + "friendsofphp/php-cs-fixer": "^3.82.2", "illuminate/view": "^11.45.1", "larastan/larastan": "^3.5.0", "laravel-zero/framework": "^11.45.0", @@ -5149,7 +5149,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2025-07-03T10:37:47+00:00" + "time": "2025-07-10T18:09:32+00:00" }, { "name": "matthiasmullie/minify", @@ -5276,16 +5276,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.13.1", + "version": "1.13.3", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c" + "reference": "faed855a7b5f4d4637717c2b3863e277116beb36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c", - "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/faed855a7b5f4d4637717c2b3863e277116beb36", + "reference": "faed855a7b5f4d4637717c2b3863e277116beb36", "shasum": "" }, "require": { @@ -5324,7 +5324,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.3" }, "funding": [ { @@ -5332,7 +5332,7 @@ "type": "tidelift" } ], - "time": "2025-04-29T12:36:36+00:00" + "time": "2025-07-05T12:25:42+00:00" }, { "name": "nikic/php-parser", From 12f8374378599644e425ac4a2a70540637c6124d Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 18 Jul 2025 10:32:35 +0530 Subject: [PATCH 226/362] update: response modal. --- src/Appwrite/Utopia/Response/Model/MigrationReport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Model/MigrationReport.php b/src/Appwrite/Utopia/Response/Model/MigrationReport.php index 15164d56fc..56d17d3f7f 100644 --- a/src/Appwrite/Utopia/Response/Model/MigrationReport.php +++ b/src/Appwrite/Utopia/Response/Model/MigrationReport.php @@ -29,9 +29,9 @@ class MigrationReport extends Model 'default' => 0, 'example' => 20, ]) - ->addRule(Resource::TYPE_DOCUMENT, [ + ->addRule(Resource::TYPE_ROW, [ 'type' => self::TYPE_INTEGER, - 'description' => 'Number of documents to be migrated.', + 'description' => 'Number of rows to be migrated.', 'default' => 0, 'example' => 20, ]) From 40a619084415643348bcbd601d5fc85d0738b38f Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 18 Jul 2025 10:55:30 +0530 Subject: [PATCH 227/362] update: log message with fallbacks. --- app/controllers/shared/api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 76fe177b0b..bbfd3f8533 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -801,8 +801,8 @@ App::shutdown() Console::info("Triggering database event: \n" . \json_encode([ 'projectId' => $project->getId(), 'databaseId' => $queueForDatabase->getDatabase()?->getId(), - 'collectionId' => $queueForDatabase->getCollection()?->getId(), - 'documentId' => $queueForDatabase->getDocument()?->getId(), + 'tableId' => $queueForDatabase->getTable()?->getId() ?? $queueForDatabase->getCollection()?->getId(), + 'rowId' => $queueForDatabase->getRow()?->getId() ?? $queueForDatabase->getDocument()?->getId(), ])); $queueForDatabase->trigger(); } From 9b1f5eb905c47347cdbd23de4fa692637c6ca017 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 18 Jul 2025 10:55:48 +0530 Subject: [PATCH 228/362] update: tests. --- .../Services/Migrations/MigrationsBase.php | 170 ++++++++++-------- tests/unit/Migration/MigrationTest.php | 1 + 2 files changed, 92 insertions(+), 79 deletions(-) diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index b8b9439e64..1910d6d59f 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -436,25 +436,25 @@ trait MigrationsBase /** * @depends testAppwriteMigrationDatabase */ - public function testAppwriteMigrationDatabasesCollection(array $data): array + public function testAppwriteMigrationDatabasesTable(array $data): array { $databaseId = $data['databaseId']; - $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', [ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ], [ - 'collectionId' => ID::unique(), - 'name' => 'Test Collection', + 'tableId' => ID::unique(), + 'name' => 'Test Table', ]); - $this->assertEquals(201, $collection['headers']['status-code']); + $this->assertEquals(201, $table['headers']['status-code']); - $collectionId = $collection['body']['$id']; + $tableId = $table['body']['$id']; - // Create Attribute - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/string', [ + // Create Column + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -467,9 +467,9 @@ trait MigrationsBase $this->assertEquals(202, $response['headers']['status-code']); - // Wait for attribute to be ready - $this->assertEventually(function () use ($databaseId, $collectionId) { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/name', [ + // Wait for column to be ready + $this->assertEventually(function () use ($databaseId, $tableId) { + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/name', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -482,8 +482,8 @@ trait MigrationsBase $result = $this->performMigrationSync([ 'resources' => [ Resource::TYPE_DATABASE, - Resource::TYPE_COLLECTION, - Resource::TYPE_ATTRIBUTE, + Resource::TYPE_TABLE, + Resource::TYPE_COLUMN, ], 'endpoint' => 'http://localhost/v1', 'projectId' => $this->getProject()['$id'], @@ -491,9 +491,9 @@ trait MigrationsBase ]); $this->assertEquals('completed', $result['status']); - $this->assertEquals([Resource::TYPE_DATABASE, Resource::TYPE_COLLECTION, Resource::TYPE_ATTRIBUTE], $result['resources']); + $this->assertEquals([Resource::TYPE_DATABASE, Resource::TYPE_TABLE, Resource::TYPE_COLUMN], $result['resources']); - foreach ([Resource::TYPE_DATABASE, Resource::TYPE_COLLECTION, Resource::TYPE_ATTRIBUTE] as $resource) { + foreach ([Resource::TYPE_DATABASE, Resource::TYPE_TABLE, Resource::TYPE_COLUMN] as $resource) { $this->assertArrayHasKey($resource, $result['statusCounters']); $this->assertEquals(0, $result['statusCounters'][$resource]['error']); $this->assertEquals(0, $result['statusCounters'][$resource]['pending']); @@ -502,7 +502,7 @@ trait MigrationsBase $this->assertEquals(0, $result['statusCounters'][$resource]['warning']); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId, [ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -511,10 +511,10 @@ trait MigrationsBase $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']); - $this->assertEquals($collectionId, $response['body']['$id']); - $this->assertEquals('Test Collection', $response['body']['name']); + $this->assertEquals($tableId, $response['body']['$id']); + $this->assertEquals('Test Table', $response['body']['name']); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/name', [ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/name', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -536,41 +536,41 @@ trait MigrationsBase return [ 'databaseId' => $databaseId, - 'collectionId' => $collectionId, + 'tableId' => $tableId, ]; } /** - * @depends testAppwriteMigrationDatabasesCollection + * @depends testAppwriteMigrationDatabasesTable */ - public function testAppwriteMigrationDatabasesDocument(array $data): void + public function testAppwriteMigrationDatabasesRow(array $data): void { + $table = $data['tableId']; $databaseId = $data['databaseId']; - $collectionId = $data['collectionId']; - $document = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', [ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], ], [ - 'documentId' => ID::unique(), + 'rowId' => ID::unique(), 'data' => [ - 'name' => 'Test Document', + 'name' => 'Test Row', ] ]); - $this->assertEquals(201, $document['headers']['status-code']); - $this->assertNotEmpty($document['body']); - $this->assertNotEmpty($document['body']['$id']); + $this->assertEquals(201, $row['headers']['status-code']); + $this->assertNotEmpty($row['body']); + $this->assertNotEmpty($row['body']['$id']); - $documentId = $document['body']['$id']; + $rowId = $row['body']['$id']; $result = $this->performMigrationSync([ 'resources' => [ Resource::TYPE_DATABASE, - Resource::TYPE_COLLECTION, - Resource::TYPE_ATTRIBUTE, - Resource::TYPE_DOCUMENT, + Resource::TYPE_TABLE, + Resource::TYPE_COLUMN, + Resource::TYPE_ROW, ], 'endpoint' => 'http://localhost/v1', 'projectId' => $this->getProject()['$id'], @@ -586,10 +586,10 @@ trait MigrationsBase ]); $this->assertEquals('completed', $result['status']); - $this->assertEquals([Resource::TYPE_DATABASE, Resource::TYPE_COLLECTION, Resource::TYPE_ATTRIBUTE, Resource::TYPE_DOCUMENT], $result['resources']); + $this->assertEquals([Resource::TYPE_DATABASE, Resource::TYPE_TABLE, Resource::TYPE_COLUMN, Resource::TYPE_ROW], $result['resources']); - //TODO: Add TYPE_DOCUMENT to the migration status counters once pending issue is resolved - foreach ([Resource::TYPE_DATABASE, Resource::TYPE_COLLECTION, Resource::TYPE_ATTRIBUTE] as $resource) { + // TODO: Add TYPE_ROW to the migration status counters once pending issue is resolved + foreach ([Resource::TYPE_DATABASE, Resource::TYPE_TABLE, Resource::TYPE_COLUMN] as $resource) { $this->assertArrayHasKey($resource, $result['statusCounters']); $this->assertEquals(0, $result['statusCounters'][$resource]['error']); $this->assertEquals(0, $result['statusCounters'][$resource]['pending']); @@ -598,7 +598,7 @@ trait MigrationsBase $this->assertEquals(0, $result['statusCounters'][$resource]['warning']); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, [ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table . '/rows/' . $rowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -607,8 +607,8 @@ trait MigrationsBase $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']); - $this->assertEquals($documentId, $response['body']['$id']); - $this->assertEquals('Test Document', $response['body']['name']); + $this->assertEquals($rowId, $response['body']['$id']); + $this->assertEquals('Test Row', $response['body']['name']); // Cleanup $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, [ @@ -920,23 +920,23 @@ trait MigrationsBase $databaseId = $response['body']['$id']; - // make a collection - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + // make a table + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ - 'name' => 'Test collection', - 'collectionId' => ID::unique(), + 'name' => 'Test table', + 'tableId' => ID::unique(), ]); $this->assertEquals(201, $response['headers']['status-code']); - $this->assertEquals($response['body']['name'], 'Test collection'); + $this->assertEquals($response['body']['name'], 'Test table'); - $collectionId = $response['body']['$id']; + $tableId = $response['body']['$id']; - // make attributes - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/string', array_merge([ + // make columns + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -952,7 +952,7 @@ trait MigrationsBase $this->assertEquals($response['body']['size'], 256); $this->assertEquals($response['body']['required'], true); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/integer', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1026,16 +1026,16 @@ trait MigrationsBase $fileIds[$label] = $response['body']['$id']; } - // missing attribute, fail in worker. + // missing column, fail in worker. $missingColumn = $this->performCsvMigration( [ 'fileId' => $fileIds['missing-column'], 'bucketId' => $bucketIds['missing-column'], - 'resourceId' => $databaseId . ':' . $collectionId, + 'resourceId' => $databaseId . ':' . $tableId, ] ); - $this->assertEventually(function () use ($missingColumn, $databaseId, $collectionId) { + $this->assertEventually(function () use ($missingColumn, $databaseId, $tableId) { $migrationId = $missingColumn['body']['$id']; $migration = $this->client->call(Client::METHOD_GET, '/migrations/'.$migrationId, array_merge([ 'content-type' => 'application/json', @@ -1047,11 +1047,15 @@ trait MigrationsBase $this->assertEquals('failed', $migration['body']['status']); $this->assertEquals('CSV', $migration['body']['source']); $this->assertEquals('Appwrite', $migration['body']['destination']); - $this->assertContains(Resource::TYPE_DOCUMENT, $migration['body']['resources']); + $this->assertContains(Resource::TYPE_ROW, $migration['body']['resources']); $this->assertEmpty($migration['body']['statusCounters']); + + $errorJson = $migration['body']['errors'][0]; + $errorData = json_decode($errorJson, true); + $this->assertThat( - implode("\n", $migration['body']['errors']), - $this->stringContains("CSV header mismatch. Missing attribute: 'age'") + $errorData['message'], + $this->stringContains("CSV header mismatch. Missing column: 'age'") ); }, 60000, 500); @@ -1060,11 +1064,11 @@ trait MigrationsBase [ 'fileId' => $fileIds['missing-row'], 'bucketId' => $bucketIds['missing-row'], - 'resourceId' => $databaseId . ':' . $collectionId, + 'resourceId' => $databaseId . ':' . $tableId, ] ); - $this->assertEventually(function () use ($missingColumn, $databaseId, $collectionId) { + $this->assertEventually(function () use ($missingColumn, $databaseId, $tableId) { $migrationId = $missingColumn['body']['$id']; $migration = $this->client->call(Client::METHOD_GET, '/migrations/'.$migrationId, array_merge([ 'content-type' => 'application/json', @@ -1076,10 +1080,14 @@ trait MigrationsBase $this->assertEquals('failed', $migration['body']['status']); $this->assertEquals('CSV', $migration['body']['source']); $this->assertEquals('Appwrite', $migration['body']['destination']); - $this->assertContains(Resource::TYPE_DOCUMENT, $migration['body']['resources']); + $this->assertContains(Resource::TYPE_ROW, $migration['body']['resources']); $this->assertEmpty($migration['body']['statusCounters']); + + $errorJson = $migration['body']['errors'][0]; + $errorData = json_decode($errorJson, true); + $this->assertThat( - implode("\n", $migration['body']['errors']), + $errorData['message'], $this->stringContains('CSV row does not match the number of header columns') ); }, 60000, 500); @@ -1089,11 +1097,11 @@ trait MigrationsBase [ 'fileId' => $fileIds['irrelevant-column'], 'bucketId' => $bucketIds['irrelevant-column'], - 'resourceId' => $databaseId . ':' . $collectionId, + 'resourceId' => $databaseId . ':' . $tableId, ] ); - $this->assertEventually(function () use ($irrelevantColumn, $databaseId, $collectionId) { + $this->assertEventually(function () use ($irrelevantColumn, $databaseId, $tableId) { $migrationId = $irrelevantColumn['body']['$id']; $migration = $this->client->call(Client::METHOD_GET, '/migrations/'.$migrationId, array_merge([ 'content-type' => 'application/json', @@ -1105,11 +1113,15 @@ trait MigrationsBase $this->assertEquals('failed', $migration['body']['status']); $this->assertEquals('CSV', $migration['body']['source']); $this->assertEquals('Appwrite', $migration['body']['destination']); - $this->assertContains(Resource::TYPE_DOCUMENT, $migration['body']['resources']); + $this->assertContains(Resource::TYPE_ROW, $migration['body']['resources']); $this->assertEmpty($migration['body']['statusCounters']); + + $errorJson = $migration['body']['errors'][0]; + $errorData = json_decode($errorJson, true); + $this->assertThat( - implode("\n", $migration['body']['errors']), - $this->stringContains("CSV header mismatch. Unexpected attribute: 'email'") + $errorData['message'], + $this->stringContains("CSV header mismatch. Unexpected column: 'email'") ); }, 60000, 500); @@ -1119,7 +1131,7 @@ trait MigrationsBase 'endpoint' => 'http://localhost/v1', 'fileId' => $fileIds['default'], 'bucketId' => $bucketIds['default'], - 'resourceId' => $databaseId . ':' . $collectionId, + 'resourceId' => $databaseId . ':' . $tableId, ] ); @@ -1127,11 +1139,11 @@ trait MigrationsBase $this->assertEquals('CSV', $migration['body']['source']); $this->assertEquals('pending', $migration['body']['status']); $this->assertEquals('Appwrite', $migration['body']['destination']); - $this->assertContains(Resource::TYPE_DOCUMENT, $migration['body']['resources']); + $this->assertContains(Resource::TYPE_ROW, $migration['body']['resources']); return [ 'databaseId' => $databaseId, - 'collectionId' => $collectionId, + 'tableId' => $tableId, 'migrationId' => $migration['body']['$id'], ]; } @@ -1141,14 +1153,14 @@ trait MigrationsBase */ public function testImportSuccessful(array $response): void { + $tableId = $response['tableId']; $databaseId = $response['databaseId']; - $collectionId = $response['collectionId']; $migrationId = $response['migrationId']; - $documentsCountInCSV = 100; + $rowsCountInCSV = 100; // get migration stats - $this->assertEventually(function () use ($migrationId, $databaseId, $collectionId, $documentsCountInCSV) { + $this->assertEventually(function () use ($migrationId, $databaseId, $tableId, $rowsCountInCSV) { $migration = $this->client->call(Client::METHOD_GET, '/migrations/'.$migrationId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1159,13 +1171,13 @@ trait MigrationsBase $this->assertEquals('completed', $migration['body']['status']); $this->assertEquals('CSV', $migration['body']['source']); $this->assertEquals('Appwrite', $migration['body']['destination']); - $this->assertContains(Resource::TYPE_DOCUMENT, $migration['body']['resources']); - $this->assertArrayHasKey(Resource::TYPE_DOCUMENT, $migration['body']['statusCounters']); - $this->assertEquals($documentsCountInCSV, $migration['body']['statusCounters'][Resource::TYPE_DOCUMENT]['success']); - }, 60000, 500); + $this->assertContains(Resource::TYPE_ROW, $migration['body']['resources']); + $this->assertArrayHasKey(Resource::TYPE_ROW, $migration['body']['statusCounters']); + $this->assertEquals($rowsCountInCSV, $migration['body']['statusCounters'][Resource::TYPE_ROW]['success']); + }, 1000, 500); - // get documents count - $documents = $this->client->call(Client::METHOD_GET, '/databases/'.$databaseId.'/collections/'.$collectionId.'/documents', array_merge([ + // get rows count + $rows = $this->client->call(Client::METHOD_GET, '/databases/'.$databaseId.'/tables/'.$tableId.'/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1175,10 +1187,10 @@ trait MigrationsBase ] ]); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertIsArray($documents['body']['documents']); - $this->assertIsNumeric($documents['body']['total']); - $this->assertEquals($documentsCountInCSV, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertIsArray($rows['body']['rows']); + $this->assertIsNumeric($rows['body']['total']); + $this->assertEquals($rowsCountInCSV, $rows['body']['total']); } private function performCsvMigration(array $body): array diff --git a/tests/unit/Migration/MigrationTest.php b/tests/unit/Migration/MigrationTest.php index 536278d55b..bb6c49d2fc 100644 --- a/tests/unit/Migration/MigrationTest.php +++ b/tests/unit/Migration/MigrationTest.php @@ -41,6 +41,7 @@ abstract class MigrationTest extends TestCase foreach (Migration::$versions as $class) { $this->assertTrue(class_exists('Appwrite\\Migration\\Version\\' . $class)); } + // Test if current version exists // Only test official releases - skip if latest is release candidate if (!(\str_contains(APP_VERSION_STABLE, 'RC'))) { From dca9a17e7a79413853d0c1eb1220684862f43aed Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 18 Jul 2025 11:36:47 +0530 Subject: [PATCH 229/362] fix: `null` permissions. --- .../Databases/Http/Databases/Collections/Documents/Upsert.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index 7a077fed0d..0bf01d8573 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -74,7 +74,7 @@ class Upsert extends Action ->param('collectionId', '', new UID(), 'Collection ID.') ->param('documentId', '', new CustomId(), 'Document ID.') ->param('data', [], new JSON(), 'Document data as JSON object. Include all required attributes of the document to be created or updated.') - ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->param('permissions', [], new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->inject('requestTimestamp') ->inject('response') ->inject('dbForProject') From d3726f9a551bc308fddce8a42d05ef689c373bb3 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 18 Jul 2025 11:37:47 +0530 Subject: [PATCH 230/362] fix: `null` permissions on tables api as well. --- .../Modules/Databases/Http/Databases/Tables/Rows/Upsert.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php index 42a79e8a72..25794ec4a3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php @@ -61,7 +61,7 @@ class Upsert extends DocumentUpsert ->param('tableId', '', new UID(), 'Table ID.') ->param('rowId', '', new UID(), 'Row ID.') ->param('data', [], new JSON(), 'Row data as JSON object. Include all required columns of the row to be created or updated.', true) - ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->param('permissions', [], new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->inject('requestTimestamp') ->inject('response') ->inject('dbForProject') From 2c28fa5cacf78b2a515d724a1052b79b1d3e23c5 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 18 Jul 2025 11:48:19 +0530 Subject: [PATCH 231/362] bump: specs. --- app/config/specs/open-api3-1.8.x-client.json | 44 +- app/config/specs/open-api3-1.8.x-console.json | 490 ++++++++-------- app/config/specs/open-api3-1.8.x-server.json | 404 ++++++------- app/config/specs/open-api3-latest-client.json | 44 +- .../specs/open-api3-latest-console.json | 480 +++++++-------- app/config/specs/open-api3-latest-server.json | 394 ++++++------- app/config/specs/swagger2-1.8.x-client.json | 104 +--- app/config/specs/swagger2-1.8.x-console.json | 552 ++++++++---------- app/config/specs/swagger2-1.8.x-server.json | 466 +++++++-------- app/config/specs/swagger2-latest-client.json | 104 +--- app/config/specs/swagger2-latest-console.json | 486 ++++++++------- app/config/specs/swagger2-latest-server.json | 400 +++++++------ 12 files changed, 1872 insertions(+), 2096 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 3520fa9d9e..25beb73a88 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4361,7 +4361,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -4446,7 +4446,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -4513,7 +4513,7 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4611,7 +4611,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4690,7 +4690,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -4706,7 +4706,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4738,7 +4738,7 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4834,7 +4834,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4933,7 +4933,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -5017,7 +5017,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -5102,7 +5102,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 405, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -5267,7 +5267,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -5362,7 +5362,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -5487,7 +5487,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -5586,7 +5586,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -5670,7 +5670,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 441, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -5745,7 +5745,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 439, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -5860,7 +5860,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 440, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -5934,7 +5934,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 255, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -5986,7 +5986,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 254, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -6454,7 +6454,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -6537,7 +6537,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, 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 b6e1971407..223b655f72 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4359,7 +4359,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 257, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -4419,7 +4419,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 481, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -4494,7 +4494,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 256, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -4542,7 +4542,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 321, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4615,7 +4615,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 317, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4694,7 +4694,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 324, + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -4766,7 +4766,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 318, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4825,7 +4825,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 319, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4901,7 +4901,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 320, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4962,7 +4962,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 329, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -5045,7 +5045,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 325, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -5149,7 +5149,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 326, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -5218,7 +5218,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 327, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -5317,7 +5317,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 328, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -5388,7 +5388,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 346, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -5472,7 +5472,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5578,7 +5578,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 348, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5689,7 +5689,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5795,7 +5795,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 350, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5906,7 +5906,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -6012,7 +6012,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 352, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -6123,7 +6123,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -6238,7 +6238,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 354, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -6358,7 +6358,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6474,7 +6474,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 356, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6595,7 +6595,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6711,7 +6711,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 358, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6832,7 +6832,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 359, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6938,7 +6938,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 360, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -7049,7 +7049,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -7180,7 +7180,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 363, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7297,7 +7297,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 364, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7413,7 +7413,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7519,7 +7519,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 366, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7661,7 +7661,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 344, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7732,7 +7732,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 345, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7812,7 +7812,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 362, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7920,7 +7920,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8005,7 +8005,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -8072,7 +8072,7 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8152,7 +8152,7 @@ "tags": [ "databases" ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Documents List", @@ -8168,7 +8168,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 337, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8198,7 +8198,7 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8262,7 +8262,7 @@ "tags": [ "databases" ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { "description": "Documents List", @@ -8278,7 +8278,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 335, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8356,7 +8356,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8372,7 +8372,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 339, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8463,7 +8463,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8542,7 +8542,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -8558,7 +8558,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8590,7 +8590,7 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8686,7 +8686,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8785,7 +8785,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8869,7 +8869,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 341, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -8962,7 +8962,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 343, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -9074,7 +9074,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -9186,7 +9186,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 370, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9268,7 +9268,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 367, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -9396,7 +9396,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 368, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -9467,7 +9467,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 369, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9547,7 +9547,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 330, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -9630,7 +9630,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 331, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -9722,7 +9722,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 322, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -9795,7 +9795,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 375, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9878,7 +9878,7 @@ "x-appwrite": { "method": "create", "group": null, - "weight": 371, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -9982,7 +9982,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -10051,7 +10051,7 @@ "x-appwrite": { "method": "update", "group": null, - "weight": 373, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -10150,7 +10150,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 374, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -10221,7 +10221,7 @@ "x-appwrite": { "method": "listColumns", "group": "columns", - "weight": 380, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -10305,7 +10305,7 @@ "x-appwrite": { "method": "createBooleanColumn", "group": "columns", - "weight": 381, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -10411,7 +10411,7 @@ "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", - "weight": 382, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -10522,7 +10522,7 @@ "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", - "weight": 383, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -10628,7 +10628,7 @@ "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", - "weight": 384, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -10739,7 +10739,7 @@ "x-appwrite": { "method": "createEmailColumn", "group": "columns", - "weight": 385, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10845,7 +10845,7 @@ "x-appwrite": { "method": "updateEmailColumn", "group": "columns", - "weight": 386, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -10956,7 +10956,7 @@ "x-appwrite": { "method": "createEnumColumn", "group": "columns", - "weight": 387, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -11071,7 +11071,7 @@ "x-appwrite": { "method": "updateEnumColumn", "group": "columns", - "weight": 388, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -11191,7 +11191,7 @@ "x-appwrite": { "method": "createFloatColumn", "group": "columns", - "weight": 389, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -11307,7 +11307,7 @@ "x-appwrite": { "method": "updateFloatColumn", "group": "columns", - "weight": 390, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -11428,7 +11428,7 @@ "x-appwrite": { "method": "createIntegerColumn", "group": "columns", - "weight": 391, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -11544,7 +11544,7 @@ "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", - "weight": 392, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -11665,7 +11665,7 @@ "x-appwrite": { "method": "createIpColumn", "group": "columns", - "weight": 393, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -11771,7 +11771,7 @@ "x-appwrite": { "method": "updateIpColumn", "group": "columns", - "weight": 394, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11882,7 +11882,7 @@ "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", - "weight": 395, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -12013,7 +12013,7 @@ "x-appwrite": { "method": "createStringColumn", "group": "columns", - "weight": 397, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -12130,7 +12130,7 @@ "x-appwrite": { "method": "updateStringColumn", "group": "columns", - "weight": 398, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -12246,7 +12246,7 @@ "x-appwrite": { "method": "createUrlColumn", "group": "columns", - "weight": 399, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -12352,7 +12352,7 @@ "x-appwrite": { "method": "updateUrlColumn", "group": "columns", - "weight": 400, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -12494,7 +12494,7 @@ "x-appwrite": { "method": "getColumn", "group": "columns", - "weight": 378, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -12565,7 +12565,7 @@ "x-appwrite": { "method": "deleteColumn", "group": "columns", - "weight": 379, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -12645,7 +12645,7 @@ "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", - "weight": 396, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -12753,7 +12753,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 404, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -12835,7 +12835,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 401, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -12963,7 +12963,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 402, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -13034,7 +13034,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 403, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -13114,7 +13114,7 @@ "x-appwrite": { "method": "listLogs", "group": "tables", - "weight": 376, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -13197,7 +13197,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -13282,7 +13282,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 405, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -13445,7 +13445,7 @@ "x-appwrite": { "method": "upsertRows", "group": "rows", - "weight": 410, + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -13555,7 +13555,7 @@ "x-appwrite": { "method": "updateRows", "group": "rows", - "weight": 408, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -13649,7 +13649,7 @@ "x-appwrite": { "method": "deleteRows", "group": "rows", - "weight": 412, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -13740,7 +13740,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -13835,7 +13835,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -13960,7 +13960,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -14059,7 +14059,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -14143,7 +14143,7 @@ "x-appwrite": { "method": "listRowLogs", "group": "logs", - "weight": 414, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -14236,7 +14236,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 416, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -14348,7 +14348,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 415, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -14460,7 +14460,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 377, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -14552,7 +14552,7 @@ "x-appwrite": { "method": "getDatabaseUsage", "group": null, - "weight": 323, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -14634,7 +14634,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 425, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -14707,7 +14707,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 422, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -14940,7 +14940,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 427, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -14989,7 +14989,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 428, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -15039,7 +15039,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 451, + "weight": 450, "cookies": false, "type": "", "deprecated": false, @@ -15139,7 +15139,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 450, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -15199,7 +15199,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 444, + "weight": 443, "cookies": false, "type": "", "deprecated": false, @@ -15271,7 +15271,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 423, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -15330,7 +15330,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 424, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -15560,7 +15560,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 426, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -15621,7 +15621,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 431, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -15701,7 +15701,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 432, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -15784,7 +15784,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 429, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -15880,7 +15880,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 437, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -15965,7 +15965,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 434, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -16068,7 +16068,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 435, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -16165,7 +16165,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 430, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -16227,7 +16227,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 433, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -16291,7 +16291,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 436, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -16381,7 +16381,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 438, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -16452,7 +16452,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 441, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -16527,7 +16527,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 439, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -16642,7 +16642,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 440, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -16707,7 +16707,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 442, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -16778,7 +16778,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 443, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -16860,7 +16860,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 447, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -16919,7 +16919,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 445, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -17010,7 +17010,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 446, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -17079,7 +17079,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 448, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -17170,7 +17170,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 449, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -17241,7 +17241,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 255, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -17293,7 +17293,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 254, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -19056,7 +19056,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 309, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -19132,7 +19132,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 306, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -19276,7 +19276,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 313, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -19422,7 +19422,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 308, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -19596,7 +19596,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 315, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -19774,7 +19774,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 307, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -19883,7 +19883,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 314, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -19995,7 +19995,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 312, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -20048,7 +20048,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 316, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -20110,7 +20110,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 310, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -20185,7 +20185,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 311, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -20260,7 +20260,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 281, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -20336,7 +20336,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 280, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -20441,7 +20441,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 293, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -20549,7 +20549,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 279, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -20634,7 +20634,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 292, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -20722,7 +20722,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 271, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -20837,7 +20837,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 284, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -20955,7 +20955,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 274, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -21050,7 +21050,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 287, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -21148,7 +21148,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 272, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -21253,7 +21253,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 285, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -21361,7 +21361,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 273, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -21504,7 +21504,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 286, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -21649,7 +21649,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 275, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -21744,7 +21744,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 288, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -21842,7 +21842,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 276, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -21937,7 +21937,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 289, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -22035,7 +22035,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 277, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -22130,7 +22130,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 290, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -22228,7 +22228,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 278, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -22323,7 +22323,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 291, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -22421,7 +22421,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 283, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -22474,7 +22474,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 294, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -22536,7 +22536,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 282, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -22611,7 +22611,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 303, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -22686,7 +22686,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 296, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -22760,7 +22760,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 295, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -22843,7 +22843,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 298, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -22903,7 +22903,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 299, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -22980,7 +22980,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -23042,7 +23042,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 297, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -23117,7 +23117,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -23201,7 +23201,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -23291,7 +23291,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 304, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -23354,7 +23354,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -23429,7 +23429,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 263, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -23503,7 +23503,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 258, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -23591,7 +23591,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 265, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -23684,7 +23684,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 262, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -23763,7 +23763,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 259, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -23839,7 +23839,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 266, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -23911,7 +23911,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 261, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -24022,7 +24022,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 268, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -24155,7 +24155,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 260, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -24260,7 +24260,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 267, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -24384,7 +24384,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 264, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -24442,7 +24442,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 269, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -24493,7 +24493,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 270, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -26478,7 +26478,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 420, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -26546,7 +26546,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 417, + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -26631,7 +26631,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 419, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -26699,7 +26699,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 418, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -26785,7 +26785,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 421, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -30350,7 +30350,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 482, + "weight": 481, "cookies": false, "type": "", "deprecated": false, @@ -30417,7 +30417,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 484, + "weight": 483, "cookies": false, "type": "", "deprecated": false, @@ -30495,7 +30495,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 485, + "weight": 484, "cookies": false, "type": "", "deprecated": false, @@ -30608,7 +30608,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 483, + "weight": 482, "cookies": false, "type": "", "deprecated": false, @@ -30857,7 +30857,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 454, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -30927,7 +30927,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 452, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -31176,7 +31176,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 457, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -31225,7 +31225,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 480, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -31275,7 +31275,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 476, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -31375,7 +31375,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 477, + "weight": 476, "cookies": false, "type": "", "deprecated": false, @@ -31435,7 +31435,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 478, + "weight": 477, "cookies": false, "type": "", "deprecated": false, @@ -31507,7 +31507,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 453, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -31566,7 +31566,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 455, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -31811,7 +31811,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 456, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -31872,7 +31872,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 463, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -31952,7 +31952,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 462, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -32035,7 +32035,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 458, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -32136,7 +32136,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 466, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -32216,7 +32216,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 459, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -32319,7 +32319,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 460, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -32417,7 +32417,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 461, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -32479,7 +32479,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 464, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -32543,7 +32543,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 465, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -32633,7 +32633,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 467, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -32704,7 +32704,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 469, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -32775,7 +32775,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 468, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -32837,7 +32837,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 470, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -32908,7 +32908,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 479, + "weight": 478, "cookies": false, "type": "", "deprecated": false, @@ -32990,7 +32990,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 473, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -33049,7 +33049,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 471, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -33140,7 +33140,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 472, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -33209,7 +33209,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 474, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -33300,7 +33300,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 475, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -35874,7 +35874,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 488, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -35954,7 +35954,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 486, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -36043,7 +36043,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 487, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -36103,7 +36103,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 489, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -36173,7 +36173,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 490, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -39907,7 +39907,7 @@ "tags": [ "vcs" ], - "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { "description": "VCS Content List", 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 90b49ae65c..03ff69d4f9 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4060,7 +4060,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 321, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4134,7 +4134,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 317, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4214,7 +4214,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 318, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4274,7 +4274,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 319, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4351,7 +4351,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 320, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4413,7 +4413,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 329, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4497,7 +4497,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 325, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -4602,7 +4602,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 326, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -4672,7 +4672,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 327, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -4772,7 +4772,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 328, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -4844,7 +4844,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 346, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -4929,7 +4929,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5036,7 +5036,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 348, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5148,7 +5148,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5255,7 +5255,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 350, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5367,7 +5367,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5474,7 +5474,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 352, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5586,7 +5586,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5702,7 +5702,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 354, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -5823,7 +5823,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -5940,7 +5940,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 356, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6062,7 +6062,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6179,7 +6179,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 358, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6301,7 +6301,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 359, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6408,7 +6408,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 360, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6520,7 +6520,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6652,7 +6652,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 363, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -6770,7 +6770,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 364, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -6887,7 +6887,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -6994,7 +6994,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 366, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7137,7 +7137,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 344, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7209,7 +7209,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 345, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7290,7 +7290,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 362, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7399,7 +7399,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -7486,7 +7486,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -7553,7 +7553,7 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -7635,7 +7635,7 @@ "tags": [ "databases" ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Documents List", @@ -7651,7 +7651,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 337, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -7681,7 +7681,7 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -7746,7 +7746,7 @@ "tags": [ "databases" ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { "description": "Documents List", @@ -7762,7 +7762,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 335, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -7841,7 +7841,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -7857,7 +7857,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 339, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -7949,7 +7949,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8030,7 +8030,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -8046,7 +8046,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8078,7 +8078,7 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8176,7 +8176,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8277,7 +8277,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8363,7 +8363,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 343, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8476,7 +8476,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -8589,7 +8589,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 370, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8672,7 +8672,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 367, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -8801,7 +8801,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 368, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -8873,7 +8873,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 369, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -8954,7 +8954,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 375, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9038,7 +9038,7 @@ "x-appwrite": { "method": "create", "group": null, - "weight": 371, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -9143,7 +9143,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -9213,7 +9213,7 @@ "x-appwrite": { "method": "update", "group": null, - "weight": 373, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -9313,7 +9313,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 374, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -9385,7 +9385,7 @@ "x-appwrite": { "method": "listColumns", "group": "columns", - "weight": 380, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -9470,7 +9470,7 @@ "x-appwrite": { "method": "createBooleanColumn", "group": "columns", - "weight": 381, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -9577,7 +9577,7 @@ "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", - "weight": 382, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -9689,7 +9689,7 @@ "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", - "weight": 383, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -9796,7 +9796,7 @@ "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", - "weight": 384, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -9908,7 +9908,7 @@ "x-appwrite": { "method": "createEmailColumn", "group": "columns", - "weight": 385, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10015,7 +10015,7 @@ "x-appwrite": { "method": "updateEmailColumn", "group": "columns", - "weight": 386, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -10127,7 +10127,7 @@ "x-appwrite": { "method": "createEnumColumn", "group": "columns", - "weight": 387, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -10243,7 +10243,7 @@ "x-appwrite": { "method": "updateEnumColumn", "group": "columns", - "weight": 388, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -10364,7 +10364,7 @@ "x-appwrite": { "method": "createFloatColumn", "group": "columns", - "weight": 389, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -10481,7 +10481,7 @@ "x-appwrite": { "method": "updateFloatColumn", "group": "columns", - "weight": 390, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -10603,7 +10603,7 @@ "x-appwrite": { "method": "createIntegerColumn", "group": "columns", - "weight": 391, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -10720,7 +10720,7 @@ "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", - "weight": 392, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -10842,7 +10842,7 @@ "x-appwrite": { "method": "createIpColumn", "group": "columns", - "weight": 393, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -10949,7 +10949,7 @@ "x-appwrite": { "method": "updateIpColumn", "group": "columns", - "weight": 394, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11061,7 +11061,7 @@ "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", - "weight": 395, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -11193,7 +11193,7 @@ "x-appwrite": { "method": "createStringColumn", "group": "columns", - "weight": 397, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -11311,7 +11311,7 @@ "x-appwrite": { "method": "updateStringColumn", "group": "columns", - "weight": 398, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -11428,7 +11428,7 @@ "x-appwrite": { "method": "createUrlColumn", "group": "columns", - "weight": 399, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -11535,7 +11535,7 @@ "x-appwrite": { "method": "updateUrlColumn", "group": "columns", - "weight": 400, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -11678,7 +11678,7 @@ "x-appwrite": { "method": "getColumn", "group": "columns", - "weight": 378, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -11750,7 +11750,7 @@ "x-appwrite": { "method": "deleteColumn", "group": "columns", - "weight": 379, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -11831,7 +11831,7 @@ "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", - "weight": 396, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -11940,7 +11940,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 404, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -12023,7 +12023,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 401, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -12152,7 +12152,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 402, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -12224,7 +12224,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 403, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -12305,7 +12305,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -12392,7 +12392,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 405, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -12557,7 +12557,7 @@ "x-appwrite": { "method": "upsertRows", "group": "rows", - "weight": 410, + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -12668,7 +12668,7 @@ "x-appwrite": { "method": "updateRows", "group": "rows", - "weight": 408, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -12763,7 +12763,7 @@ "x-appwrite": { "method": "deleteRows", "group": "rows", - "weight": 412, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -12855,7 +12855,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -12952,7 +12952,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -13079,7 +13079,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -13180,7 +13180,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -13266,7 +13266,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 416, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -13379,7 +13379,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 415, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -13492,7 +13492,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 425, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -13566,7 +13566,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 422, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -13800,7 +13800,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 427, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -13850,7 +13850,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 428, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -13901,7 +13901,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 423, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -13961,7 +13961,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 424, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -14192,7 +14192,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 426, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -14254,7 +14254,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 431, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -14335,7 +14335,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 432, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -14419,7 +14419,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 429, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -14516,7 +14516,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 437, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -14602,7 +14602,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 434, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -14706,7 +14706,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 435, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -14804,7 +14804,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 430, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -14867,7 +14867,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 433, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -14932,7 +14932,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 436, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -15023,7 +15023,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 438, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -15095,7 +15095,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 441, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -15172,7 +15172,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 439, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -15289,7 +15289,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 440, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -15356,7 +15356,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 442, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -15428,7 +15428,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 447, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -15488,7 +15488,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 445, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -15580,7 +15580,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 446, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -15650,7 +15650,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 448, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -15742,7 +15742,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 449, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -15814,7 +15814,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 255, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -15868,7 +15868,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 254, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -17671,7 +17671,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 309, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -17748,7 +17748,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 306, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -17893,7 +17893,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 313, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -18040,7 +18040,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 308, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -18215,7 +18215,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 315, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -18394,7 +18394,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 307, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -18504,7 +18504,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 314, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -18617,7 +18617,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 312, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -18671,7 +18671,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 316, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -18734,7 +18734,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 310, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -18810,7 +18810,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 311, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -18886,7 +18886,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 281, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -18963,7 +18963,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 280, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -19069,7 +19069,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 293, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -19178,7 +19178,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 279, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -19264,7 +19264,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 292, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -19353,7 +19353,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 271, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -19469,7 +19469,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 284, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -19588,7 +19588,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 274, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -19684,7 +19684,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 287, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -19783,7 +19783,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 272, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -19889,7 +19889,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 285, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -19998,7 +19998,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 273, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -20142,7 +20142,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 286, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -20288,7 +20288,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 275, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -20384,7 +20384,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 288, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -20483,7 +20483,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 276, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -20579,7 +20579,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 289, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -20678,7 +20678,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 277, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -20774,7 +20774,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 290, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -20873,7 +20873,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 278, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -20969,7 +20969,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 291, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -21068,7 +21068,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 283, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -21122,7 +21122,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 294, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -21185,7 +21185,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 282, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -21261,7 +21261,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 303, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -21337,7 +21337,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 296, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -21412,7 +21412,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 295, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -21496,7 +21496,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 298, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -21557,7 +21557,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 299, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -21635,7 +21635,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -21698,7 +21698,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 297, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -21774,7 +21774,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -21859,7 +21859,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -21951,7 +21951,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 304, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -22015,7 +22015,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -22092,7 +22092,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 454, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -22163,7 +22163,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 452, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -22413,7 +22413,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 457, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -22463,7 +22463,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 480, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -22514,7 +22514,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 453, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -22574,7 +22574,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 455, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -22820,7 +22820,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 456, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -22882,7 +22882,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 463, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -22963,7 +22963,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 462, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -23047,7 +23047,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 458, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -23149,7 +23149,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 466, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -23230,7 +23230,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 459, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -23334,7 +23334,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 460, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -23433,7 +23433,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 461, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -23496,7 +23496,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 464, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -23561,7 +23561,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 465, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -23652,7 +23652,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 467, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -23724,7 +23724,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 469, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -23796,7 +23796,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 468, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -23859,7 +23859,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 470, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -23931,7 +23931,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 473, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -23991,7 +23991,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 471, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -24083,7 +24083,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 472, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -24153,7 +24153,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 474, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -24245,7 +24245,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 475, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -26640,7 +26640,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 488, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -26721,7 +26721,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 486, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -26811,7 +26811,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 487, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -26872,7 +26872,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 489, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -26943,7 +26943,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 490, + "weight": 489, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 3520fa9d9e..25beb73a88 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4361,7 +4361,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -4446,7 +4446,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -4513,7 +4513,7 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4611,7 +4611,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4690,7 +4690,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -4706,7 +4706,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4738,7 +4738,7 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4834,7 +4834,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4933,7 +4933,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -5017,7 +5017,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -5102,7 +5102,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 405, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -5267,7 +5267,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -5362,7 +5362,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -5487,7 +5487,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -5586,7 +5586,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -5670,7 +5670,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 441, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -5745,7 +5745,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 439, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -5860,7 +5860,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 440, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -5934,7 +5934,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 255, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -5986,7 +5986,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 254, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -6454,7 +6454,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -6537,7 +6537,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index e004ad35c9..223b655f72 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4359,7 +4359,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 257, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -4419,7 +4419,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 481, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -4494,7 +4494,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 256, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -4542,7 +4542,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 321, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4615,7 +4615,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 317, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4694,7 +4694,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 324, + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -4766,7 +4766,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 318, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4825,7 +4825,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 319, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4901,7 +4901,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 320, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4962,7 +4962,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 329, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -5045,7 +5045,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 325, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -5149,7 +5149,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 326, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -5218,7 +5218,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 327, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -5317,7 +5317,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 328, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -5388,7 +5388,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 346, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -5472,7 +5472,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5578,7 +5578,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 348, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5689,7 +5689,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5795,7 +5795,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 350, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5906,7 +5906,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -6012,7 +6012,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 352, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -6123,7 +6123,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -6238,7 +6238,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 354, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -6358,7 +6358,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6474,7 +6474,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 356, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6595,7 +6595,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6711,7 +6711,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 358, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6832,7 +6832,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 359, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6938,7 +6938,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 360, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -7049,7 +7049,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -7180,7 +7180,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 363, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7297,7 +7297,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 364, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7413,7 +7413,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7519,7 +7519,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 366, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7661,7 +7661,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 344, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7732,7 +7732,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 345, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7812,7 +7812,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 362, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7920,7 +7920,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8005,7 +8005,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -8168,7 +8168,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 337, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8198,7 +8198,7 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8278,7 +8278,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 335, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8372,7 +8372,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 339, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8463,7 +8463,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8558,7 +8558,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8590,7 +8590,7 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8686,7 +8686,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8785,7 +8785,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8869,7 +8869,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 341, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -8962,7 +8962,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 343, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -9074,7 +9074,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -9186,7 +9186,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 370, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9268,7 +9268,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 367, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -9396,7 +9396,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 368, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -9467,7 +9467,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 369, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9547,7 +9547,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 330, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -9630,7 +9630,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 331, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -9722,7 +9722,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 322, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -9795,7 +9795,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 375, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9878,7 +9878,7 @@ "x-appwrite": { "method": "create", "group": null, - "weight": 371, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -9982,7 +9982,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -10051,7 +10051,7 @@ "x-appwrite": { "method": "update", "group": null, - "weight": 373, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -10150,7 +10150,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 374, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -10221,7 +10221,7 @@ "x-appwrite": { "method": "listColumns", "group": "columns", - "weight": 380, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -10305,7 +10305,7 @@ "x-appwrite": { "method": "createBooleanColumn", "group": "columns", - "weight": 381, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -10411,7 +10411,7 @@ "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", - "weight": 382, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -10522,7 +10522,7 @@ "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", - "weight": 383, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -10628,7 +10628,7 @@ "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", - "weight": 384, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -10739,7 +10739,7 @@ "x-appwrite": { "method": "createEmailColumn", "group": "columns", - "weight": 385, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10845,7 +10845,7 @@ "x-appwrite": { "method": "updateEmailColumn", "group": "columns", - "weight": 386, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -10956,7 +10956,7 @@ "x-appwrite": { "method": "createEnumColumn", "group": "columns", - "weight": 387, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -11071,7 +11071,7 @@ "x-appwrite": { "method": "updateEnumColumn", "group": "columns", - "weight": 388, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -11191,7 +11191,7 @@ "x-appwrite": { "method": "createFloatColumn", "group": "columns", - "weight": 389, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -11307,7 +11307,7 @@ "x-appwrite": { "method": "updateFloatColumn", "group": "columns", - "weight": 390, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -11428,7 +11428,7 @@ "x-appwrite": { "method": "createIntegerColumn", "group": "columns", - "weight": 391, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -11544,7 +11544,7 @@ "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", - "weight": 392, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -11665,7 +11665,7 @@ "x-appwrite": { "method": "createIpColumn", "group": "columns", - "weight": 393, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -11771,7 +11771,7 @@ "x-appwrite": { "method": "updateIpColumn", "group": "columns", - "weight": 394, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11882,7 +11882,7 @@ "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", - "weight": 395, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -12013,7 +12013,7 @@ "x-appwrite": { "method": "createStringColumn", "group": "columns", - "weight": 397, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -12130,7 +12130,7 @@ "x-appwrite": { "method": "updateStringColumn", "group": "columns", - "weight": 398, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -12246,7 +12246,7 @@ "x-appwrite": { "method": "createUrlColumn", "group": "columns", - "weight": 399, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -12352,7 +12352,7 @@ "x-appwrite": { "method": "updateUrlColumn", "group": "columns", - "weight": 400, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -12494,7 +12494,7 @@ "x-appwrite": { "method": "getColumn", "group": "columns", - "weight": 378, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -12565,7 +12565,7 @@ "x-appwrite": { "method": "deleteColumn", "group": "columns", - "weight": 379, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -12645,7 +12645,7 @@ "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", - "weight": 396, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -12753,7 +12753,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 404, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -12835,7 +12835,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 401, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -12963,7 +12963,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 402, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -13034,7 +13034,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 403, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -13114,7 +13114,7 @@ "x-appwrite": { "method": "listLogs", "group": "tables", - "weight": 376, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -13197,7 +13197,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -13282,7 +13282,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 405, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -13445,7 +13445,7 @@ "x-appwrite": { "method": "upsertRows", "group": "rows", - "weight": 410, + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -13555,7 +13555,7 @@ "x-appwrite": { "method": "updateRows", "group": "rows", - "weight": 408, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -13649,7 +13649,7 @@ "x-appwrite": { "method": "deleteRows", "group": "rows", - "weight": 412, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -13740,7 +13740,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -13835,7 +13835,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -13960,7 +13960,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -14059,7 +14059,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -14143,7 +14143,7 @@ "x-appwrite": { "method": "listRowLogs", "group": "logs", - "weight": 414, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -14236,7 +14236,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 416, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -14348,7 +14348,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 415, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -14460,7 +14460,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 377, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -14552,7 +14552,7 @@ "x-appwrite": { "method": "getDatabaseUsage", "group": null, - "weight": 323, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -14634,7 +14634,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 425, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -14707,7 +14707,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 422, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -14940,7 +14940,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 427, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -14989,7 +14989,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 428, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -15039,7 +15039,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 451, + "weight": 450, "cookies": false, "type": "", "deprecated": false, @@ -15139,7 +15139,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 450, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -15199,7 +15199,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 444, + "weight": 443, "cookies": false, "type": "", "deprecated": false, @@ -15271,7 +15271,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 423, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -15330,7 +15330,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 424, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -15560,7 +15560,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 426, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -15621,7 +15621,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 431, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -15701,7 +15701,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 432, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -15784,7 +15784,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 429, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -15880,7 +15880,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 437, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -15965,7 +15965,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 434, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -16068,7 +16068,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 435, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -16165,7 +16165,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 430, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -16227,7 +16227,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 433, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -16291,7 +16291,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 436, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -16381,7 +16381,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 438, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -16452,7 +16452,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 441, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -16527,7 +16527,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 439, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -16642,7 +16642,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 440, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -16707,7 +16707,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 442, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -16778,7 +16778,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 443, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -16860,7 +16860,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 447, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -16919,7 +16919,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 445, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -17010,7 +17010,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 446, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -17079,7 +17079,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 448, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -17170,7 +17170,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 449, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -17241,7 +17241,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 255, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -17293,7 +17293,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 254, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -19056,7 +19056,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 309, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -19132,7 +19132,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 306, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -19276,7 +19276,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 313, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -19422,7 +19422,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 308, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -19596,7 +19596,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 315, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -19774,7 +19774,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 307, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -19883,7 +19883,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 314, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -19995,7 +19995,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 312, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -20048,7 +20048,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 316, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -20110,7 +20110,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 310, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -20185,7 +20185,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 311, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -20260,7 +20260,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 281, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -20336,7 +20336,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 280, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -20441,7 +20441,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 293, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -20549,7 +20549,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 279, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -20634,7 +20634,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 292, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -20722,7 +20722,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 271, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -20837,7 +20837,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 284, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -20955,7 +20955,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 274, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -21050,7 +21050,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 287, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -21148,7 +21148,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 272, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -21253,7 +21253,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 285, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -21361,7 +21361,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 273, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -21504,7 +21504,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 286, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -21649,7 +21649,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 275, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -21744,7 +21744,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 288, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -21842,7 +21842,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 276, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -21937,7 +21937,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 289, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -22035,7 +22035,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 277, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -22130,7 +22130,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 290, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -22228,7 +22228,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 278, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -22323,7 +22323,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 291, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -22421,7 +22421,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 283, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -22474,7 +22474,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 294, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -22536,7 +22536,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 282, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -22611,7 +22611,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 303, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -22686,7 +22686,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 296, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -22760,7 +22760,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 295, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -22843,7 +22843,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 298, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -22903,7 +22903,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 299, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -22980,7 +22980,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -23042,7 +23042,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 297, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -23117,7 +23117,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -23201,7 +23201,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -23291,7 +23291,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 304, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -23354,7 +23354,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -23429,7 +23429,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 263, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -23503,7 +23503,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 258, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -23591,7 +23591,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 265, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -23684,7 +23684,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 262, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -23763,7 +23763,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 259, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -23839,7 +23839,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 266, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -23911,7 +23911,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 261, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -24022,7 +24022,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 268, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -24155,7 +24155,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 260, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -24260,7 +24260,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 267, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -24384,7 +24384,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 264, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -24442,7 +24442,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 269, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -24493,7 +24493,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 270, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -26478,7 +26478,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 420, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -26546,7 +26546,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 417, + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -26631,7 +26631,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 419, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -26699,7 +26699,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 418, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -26785,7 +26785,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 421, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -30350,7 +30350,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 482, + "weight": 481, "cookies": false, "type": "", "deprecated": false, @@ -30417,7 +30417,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 484, + "weight": 483, "cookies": false, "type": "", "deprecated": false, @@ -30495,7 +30495,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 485, + "weight": 484, "cookies": false, "type": "", "deprecated": false, @@ -30608,7 +30608,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 483, + "weight": 482, "cookies": false, "type": "", "deprecated": false, @@ -30857,7 +30857,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 454, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -30927,7 +30927,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 452, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -31176,7 +31176,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 457, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -31225,7 +31225,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 480, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -31275,7 +31275,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 476, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -31375,7 +31375,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 477, + "weight": 476, "cookies": false, "type": "", "deprecated": false, @@ -31435,7 +31435,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 478, + "weight": 477, "cookies": false, "type": "", "deprecated": false, @@ -31507,7 +31507,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 453, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -31566,7 +31566,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 455, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -31811,7 +31811,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 456, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -31872,7 +31872,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 463, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -31952,7 +31952,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 462, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -32035,7 +32035,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 458, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -32136,7 +32136,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 466, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -32216,7 +32216,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 459, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -32319,7 +32319,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 460, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -32417,7 +32417,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 461, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -32479,7 +32479,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 464, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -32543,7 +32543,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 465, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -32633,7 +32633,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 467, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -32704,7 +32704,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 469, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -32775,7 +32775,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 468, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -32837,7 +32837,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 470, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -32908,7 +32908,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 479, + "weight": 478, "cookies": false, "type": "", "deprecated": false, @@ -32990,7 +32990,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 473, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -33049,7 +33049,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 471, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -33140,7 +33140,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 472, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -33209,7 +33209,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 474, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -33300,7 +33300,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 475, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -35874,7 +35874,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 488, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -35954,7 +35954,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 486, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -36043,7 +36043,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 487, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -36103,7 +36103,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 489, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -36173,7 +36173,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 490, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -39907,7 +39907,7 @@ "tags": [ "vcs" ], - "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { "description": "VCS Content List", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 042398d8f3..03ff69d4f9 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -4060,7 +4060,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 321, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4134,7 +4134,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 317, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4214,7 +4214,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 318, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4274,7 +4274,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 319, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4351,7 +4351,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 320, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4413,7 +4413,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 329, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4497,7 +4497,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 325, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -4602,7 +4602,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 326, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -4672,7 +4672,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 327, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -4772,7 +4772,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 328, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -4844,7 +4844,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 346, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -4929,7 +4929,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5036,7 +5036,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 348, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5148,7 +5148,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5255,7 +5255,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 350, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5367,7 +5367,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5474,7 +5474,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 352, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5586,7 +5586,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5702,7 +5702,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 354, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -5823,7 +5823,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -5940,7 +5940,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 356, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6062,7 +6062,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6179,7 +6179,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 358, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6301,7 +6301,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 359, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6408,7 +6408,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 360, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6520,7 +6520,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6652,7 +6652,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 363, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -6770,7 +6770,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 364, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -6887,7 +6887,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -6994,7 +6994,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 366, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7137,7 +7137,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 344, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7209,7 +7209,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 345, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7290,7 +7290,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 362, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7399,7 +7399,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -7486,7 +7486,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -7651,7 +7651,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 337, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -7681,7 +7681,7 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -7762,7 +7762,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 335, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -7857,7 +7857,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 339, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -7949,7 +7949,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8046,7 +8046,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8078,7 +8078,7 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8176,7 +8176,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8277,7 +8277,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8363,7 +8363,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 343, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8476,7 +8476,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -8589,7 +8589,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 370, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8672,7 +8672,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 367, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -8801,7 +8801,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 368, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -8873,7 +8873,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 369, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -8954,7 +8954,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 375, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9038,7 +9038,7 @@ "x-appwrite": { "method": "create", "group": null, - "weight": 371, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -9143,7 +9143,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -9213,7 +9213,7 @@ "x-appwrite": { "method": "update", "group": null, - "weight": 373, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -9313,7 +9313,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 374, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -9385,7 +9385,7 @@ "x-appwrite": { "method": "listColumns", "group": "columns", - "weight": 380, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -9470,7 +9470,7 @@ "x-appwrite": { "method": "createBooleanColumn", "group": "columns", - "weight": 381, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -9577,7 +9577,7 @@ "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", - "weight": 382, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -9689,7 +9689,7 @@ "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", - "weight": 383, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -9796,7 +9796,7 @@ "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", - "weight": 384, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -9908,7 +9908,7 @@ "x-appwrite": { "method": "createEmailColumn", "group": "columns", - "weight": 385, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10015,7 +10015,7 @@ "x-appwrite": { "method": "updateEmailColumn", "group": "columns", - "weight": 386, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -10127,7 +10127,7 @@ "x-appwrite": { "method": "createEnumColumn", "group": "columns", - "weight": 387, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -10243,7 +10243,7 @@ "x-appwrite": { "method": "updateEnumColumn", "group": "columns", - "weight": 388, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -10364,7 +10364,7 @@ "x-appwrite": { "method": "createFloatColumn", "group": "columns", - "weight": 389, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -10481,7 +10481,7 @@ "x-appwrite": { "method": "updateFloatColumn", "group": "columns", - "weight": 390, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -10603,7 +10603,7 @@ "x-appwrite": { "method": "createIntegerColumn", "group": "columns", - "weight": 391, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -10720,7 +10720,7 @@ "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", - "weight": 392, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -10842,7 +10842,7 @@ "x-appwrite": { "method": "createIpColumn", "group": "columns", - "weight": 393, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -10949,7 +10949,7 @@ "x-appwrite": { "method": "updateIpColumn", "group": "columns", - "weight": 394, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11061,7 +11061,7 @@ "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", - "weight": 395, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -11193,7 +11193,7 @@ "x-appwrite": { "method": "createStringColumn", "group": "columns", - "weight": 397, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -11311,7 +11311,7 @@ "x-appwrite": { "method": "updateStringColumn", "group": "columns", - "weight": 398, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -11428,7 +11428,7 @@ "x-appwrite": { "method": "createUrlColumn", "group": "columns", - "weight": 399, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -11535,7 +11535,7 @@ "x-appwrite": { "method": "updateUrlColumn", "group": "columns", - "weight": 400, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -11678,7 +11678,7 @@ "x-appwrite": { "method": "getColumn", "group": "columns", - "weight": 378, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -11750,7 +11750,7 @@ "x-appwrite": { "method": "deleteColumn", "group": "columns", - "weight": 379, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -11831,7 +11831,7 @@ "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", - "weight": 396, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -11940,7 +11940,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 404, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -12023,7 +12023,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 401, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -12152,7 +12152,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 402, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -12224,7 +12224,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 403, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -12305,7 +12305,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -12392,7 +12392,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 405, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -12557,7 +12557,7 @@ "x-appwrite": { "method": "upsertRows", "group": "rows", - "weight": 410, + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -12668,7 +12668,7 @@ "x-appwrite": { "method": "updateRows", "group": "rows", - "weight": 408, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -12763,7 +12763,7 @@ "x-appwrite": { "method": "deleteRows", "group": "rows", - "weight": 412, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -12855,7 +12855,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -12952,7 +12952,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -13079,7 +13079,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -13180,7 +13180,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -13266,7 +13266,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 416, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -13379,7 +13379,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 415, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -13492,7 +13492,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 425, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -13566,7 +13566,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 422, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -13800,7 +13800,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 427, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -13850,7 +13850,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 428, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -13901,7 +13901,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 423, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -13961,7 +13961,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 424, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -14192,7 +14192,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 426, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -14254,7 +14254,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 431, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -14335,7 +14335,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 432, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -14419,7 +14419,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 429, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -14516,7 +14516,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 437, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -14602,7 +14602,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 434, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -14706,7 +14706,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 435, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -14804,7 +14804,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 430, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -14867,7 +14867,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 433, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -14932,7 +14932,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 436, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -15023,7 +15023,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 438, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -15095,7 +15095,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 441, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -15172,7 +15172,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 439, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -15289,7 +15289,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 440, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -15356,7 +15356,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 442, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -15428,7 +15428,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 447, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -15488,7 +15488,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 445, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -15580,7 +15580,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 446, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -15650,7 +15650,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 448, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -15742,7 +15742,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 449, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -15814,7 +15814,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 255, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -15868,7 +15868,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 254, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -17671,7 +17671,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 309, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -17748,7 +17748,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 306, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -17893,7 +17893,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 313, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -18040,7 +18040,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 308, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -18215,7 +18215,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 315, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -18394,7 +18394,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 307, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -18504,7 +18504,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 314, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -18617,7 +18617,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 312, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -18671,7 +18671,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 316, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -18734,7 +18734,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 310, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -18810,7 +18810,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 311, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -18886,7 +18886,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 281, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -18963,7 +18963,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 280, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -19069,7 +19069,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 293, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -19178,7 +19178,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 279, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -19264,7 +19264,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 292, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -19353,7 +19353,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 271, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -19469,7 +19469,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 284, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -19588,7 +19588,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 274, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -19684,7 +19684,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 287, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -19783,7 +19783,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 272, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -19889,7 +19889,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 285, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -19998,7 +19998,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 273, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -20142,7 +20142,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 286, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -20288,7 +20288,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 275, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -20384,7 +20384,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 288, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -20483,7 +20483,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 276, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -20579,7 +20579,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 289, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -20678,7 +20678,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 277, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -20774,7 +20774,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 290, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -20873,7 +20873,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 278, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -20969,7 +20969,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 291, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -21068,7 +21068,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 283, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -21122,7 +21122,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 294, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -21185,7 +21185,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 282, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -21261,7 +21261,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 303, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -21337,7 +21337,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 296, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -21412,7 +21412,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 295, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -21496,7 +21496,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 298, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -21557,7 +21557,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 299, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -21635,7 +21635,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -21698,7 +21698,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 297, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -21774,7 +21774,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -21859,7 +21859,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -21951,7 +21951,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 304, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -22015,7 +22015,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -22092,7 +22092,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 454, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -22163,7 +22163,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 452, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -22413,7 +22413,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 457, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -22463,7 +22463,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 480, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -22514,7 +22514,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 453, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -22574,7 +22574,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 455, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -22820,7 +22820,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 456, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -22882,7 +22882,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 463, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -22963,7 +22963,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 462, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -23047,7 +23047,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 458, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -23149,7 +23149,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 466, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -23230,7 +23230,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 459, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -23334,7 +23334,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 460, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -23433,7 +23433,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 461, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -23496,7 +23496,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 464, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -23561,7 +23561,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 465, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -23652,7 +23652,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 467, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -23724,7 +23724,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 469, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -23796,7 +23796,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 468, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -23859,7 +23859,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 470, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -23931,7 +23931,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 473, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -23991,7 +23991,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 471, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -24083,7 +24083,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 472, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -24153,7 +24153,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 474, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -24245,7 +24245,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 475, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -26640,7 +26640,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 488, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -26721,7 +26721,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 486, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -26811,7 +26811,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 487, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -26872,7 +26872,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 489, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -26943,7 +26943,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 490, + "weight": 489, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index b641397258..c032d4e2ab 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -3451,7 +3451,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3576,7 +3575,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3707,7 +3705,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3770,7 +3767,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4257,7 +4253,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4340,7 +4335,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4431,7 +4425,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4510,7 +4503,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -4522,7 +4515,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4592,7 +4584,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -4604,7 +4596,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4659,7 +4650,7 @@ "model": "#\/definitions\/documentList" } ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4755,7 +4746,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4767,7 +4758,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4833,7 +4823,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -4845,7 +4835,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4857,7 +4847,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4877,7 +4866,7 @@ "model": "#\/definitions\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4969,7 +4958,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4981,7 +4970,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5066,7 +5054,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -5078,7 +5066,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5144,7 +5131,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -5156,7 +5143,6 @@ "scope": "rows.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5226,7 +5212,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 405, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -5238,7 +5224,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5389,7 +5374,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -5401,7 +5386,6 @@ "scope": "rows.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5479,7 +5463,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -5491,7 +5475,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5600,7 +5583,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -5612,7 +5595,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5697,7 +5679,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -5709,7 +5691,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5775,7 +5756,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 441, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -5787,7 +5768,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5849,7 +5829,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 439, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -5861,7 +5841,6 @@ "scope": "execution.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5966,7 +5945,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 440, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -5978,7 +5957,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6038,7 +6016,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 255, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -6050,8 +6028,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -6112,7 +6089,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 254, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -6124,8 +6101,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -6196,7 +6172,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6248,7 +6223,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6300,7 +6274,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6352,7 +6325,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6404,7 +6376,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6456,7 +6427,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6508,7 +6478,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6560,7 +6529,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6602,7 +6570,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -6615,8 +6583,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -6687,7 +6654,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -6700,8 +6667,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -6770,7 +6736,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6853,7 +6818,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6943,7 +6907,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7013,7 +6976,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7102,7 +7064,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7172,7 +7133,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7251,7 +7211,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7458,7 +7417,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7537,7 +7495,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7612,7 +7569,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7702,7 +7658,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7764,7 +7719,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7839,7 +7793,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7901,7 +7854,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7984,7 +7936,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8097,7 +8048,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8167,7 +8117,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8253,7 +8202,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 85836ff2b8..24dda66db4 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -3466,7 +3466,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3591,7 +3590,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3722,7 +3720,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3785,7 +3782,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4272,7 +4268,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4355,7 +4350,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4446,7 +4440,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4527,7 +4520,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 257, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -4590,7 +4583,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 481, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -4661,7 +4654,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 256, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -4709,7 +4702,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 321, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4781,7 +4774,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 317, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4863,7 +4856,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 324, + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -4933,7 +4926,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 318, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4992,7 +4985,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 319, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -5070,7 +5063,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 320, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -5129,7 +5122,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 329, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -5209,7 +5202,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 325, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -5314,7 +5307,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 326, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -5381,7 +5374,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 327, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -5482,7 +5475,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 328, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -5549,7 +5542,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 346, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -5630,7 +5623,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5736,7 +5729,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 348, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5844,7 +5837,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5950,7 +5943,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 350, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -6058,7 +6051,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -6164,7 +6157,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 352, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -6272,7 +6265,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -6388,7 +6381,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 354, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -6506,7 +6499,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6624,7 +6617,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 356, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6744,7 +6737,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6862,7 +6855,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 358, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6982,7 +6975,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 359, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -7088,7 +7081,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 360, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -7196,7 +7189,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -7329,7 +7322,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 363, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7448,7 +7441,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 364, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7562,7 +7555,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7668,7 +7661,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 366, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7805,7 +7798,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 344, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7874,7 +7867,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 345, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7950,7 +7943,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 362, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -8052,7 +8045,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8064,7 +8057,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8134,7 +8126,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -8146,7 +8138,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8201,7 +8192,7 @@ "model": "#\/definitions\/documentList" } ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8285,7 +8276,7 @@ "tags": [ "databases" ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Documents List", @@ -8297,7 +8288,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 337, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8327,7 +8318,7 @@ "model": "#\/definitions\/documentList" } ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8392,7 +8383,7 @@ "tags": [ "databases" ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { "description": "Documents List", @@ -8404,7 +8395,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 335, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8484,7 +8475,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -8496,7 +8487,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 339, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8582,7 +8573,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8594,7 +8585,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8660,7 +8650,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -8672,7 +8662,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8684,7 +8674,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8704,7 +8693,7 @@ "model": "#\/definitions\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8796,7 +8785,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8808,7 +8797,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8893,7 +8881,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8905,7 +8893,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8971,7 +8958,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 341, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -9059,7 +9046,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 343, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -9165,7 +9152,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -9269,7 +9256,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 370, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9348,7 +9335,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 367, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -9475,7 +9462,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 368, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -9544,7 +9531,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 369, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9618,7 +9605,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 330, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -9696,7 +9683,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 331, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -9782,7 +9769,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 322, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -9852,7 +9839,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 375, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9932,7 +9919,7 @@ "x-appwrite": { "method": "create", "group": null, - "weight": 371, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -10037,7 +10024,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -10104,7 +10091,7 @@ "x-appwrite": { "method": "update", "group": null, - "weight": 373, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -10205,7 +10192,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 374, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -10272,7 +10259,7 @@ "x-appwrite": { "method": "listColumns", "group": "columns", - "weight": 380, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -10353,7 +10340,7 @@ "x-appwrite": { "method": "createBooleanColumn", "group": "columns", - "weight": 381, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -10459,7 +10446,7 @@ "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", - "weight": 382, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -10567,7 +10554,7 @@ "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", - "weight": 383, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -10673,7 +10660,7 @@ "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", - "weight": 384, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -10781,7 +10768,7 @@ "x-appwrite": { "method": "createEmailColumn", "group": "columns", - "weight": 385, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10887,7 +10874,7 @@ "x-appwrite": { "method": "updateEmailColumn", "group": "columns", - "weight": 386, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -10995,7 +10982,7 @@ "x-appwrite": { "method": "createEnumColumn", "group": "columns", - "weight": 387, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -11111,7 +11098,7 @@ "x-appwrite": { "method": "updateEnumColumn", "group": "columns", - "weight": 388, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -11229,7 +11216,7 @@ "x-appwrite": { "method": "createFloatColumn", "group": "columns", - "weight": 389, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -11347,7 +11334,7 @@ "x-appwrite": { "method": "updateFloatColumn", "group": "columns", - "weight": 390, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -11467,7 +11454,7 @@ "x-appwrite": { "method": "createIntegerColumn", "group": "columns", - "weight": 391, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -11585,7 +11572,7 @@ "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", - "weight": 392, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -11705,7 +11692,7 @@ "x-appwrite": { "method": "createIpColumn", "group": "columns", - "weight": 393, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -11811,7 +11798,7 @@ "x-appwrite": { "method": "updateIpColumn", "group": "columns", - "weight": 394, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11919,7 +11906,7 @@ "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", - "weight": 395, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -12052,7 +12039,7 @@ "x-appwrite": { "method": "createStringColumn", "group": "columns", - "weight": 397, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -12171,7 +12158,7 @@ "x-appwrite": { "method": "updateStringColumn", "group": "columns", - "weight": 398, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -12285,7 +12272,7 @@ "x-appwrite": { "method": "createUrlColumn", "group": "columns", - "weight": 399, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -12391,7 +12378,7 @@ "x-appwrite": { "method": "updateUrlColumn", "group": "columns", - "weight": 400, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -12528,7 +12515,7 @@ "x-appwrite": { "method": "getColumn", "group": "columns", - "weight": 378, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -12597,7 +12584,7 @@ "x-appwrite": { "method": "deleteColumn", "group": "columns", - "weight": 379, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -12673,7 +12660,7 @@ "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", - "weight": 396, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -12775,7 +12762,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 404, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -12854,7 +12841,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 401, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -12981,7 +12968,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 402, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -13050,7 +13037,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 403, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -13124,7 +13111,7 @@ "x-appwrite": { "method": "listLogs", "group": "tables", - "weight": 376, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -13202,7 +13189,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -13214,7 +13201,6 @@ "scope": "rows.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13284,7 +13270,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 405, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -13296,7 +13282,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13447,7 +13432,7 @@ "x-appwrite": { "method": "upsertRows", "group": "rows", - "weight": 410, + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -13554,7 +13539,7 @@ "x-appwrite": { "method": "updateRows", "group": "rows", - "weight": 408, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -13646,7 +13631,7 @@ "x-appwrite": { "method": "deleteRows", "group": "rows", - "weight": 412, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -13732,7 +13717,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -13744,7 +13729,6 @@ "scope": "rows.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13822,7 +13806,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -13834,7 +13818,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13943,7 +13926,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -13955,7 +13938,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -14040,7 +14022,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -14052,7 +14034,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -14118,7 +14099,7 @@ "x-appwrite": { "method": "listRowLogs", "group": "logs", - "weight": 414, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -14206,7 +14187,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 416, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -14312,7 +14293,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 415, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -14416,7 +14397,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 377, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -14502,7 +14483,7 @@ "x-appwrite": { "method": "getDatabaseUsage", "group": null, - "weight": 323, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -14580,7 +14561,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 425, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -14652,7 +14633,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 422, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -14903,7 +14884,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 427, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -14952,7 +14933,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 428, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -15002,7 +14983,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 451, + "weight": 450, "cookies": false, "type": "", "deprecated": false, @@ -15096,7 +15077,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 450, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -15154,7 +15135,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 444, + "weight": 443, "cookies": false, "type": "", "deprecated": false, @@ -15224,7 +15205,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 423, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -15283,7 +15264,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 424, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -15530,7 +15511,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 426, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -15591,7 +15572,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 431, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -15668,7 +15649,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 432, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -15748,7 +15729,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 429, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -15840,7 +15821,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 437, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -15925,7 +15906,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 434, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -16031,7 +16012,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 435, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -16127,7 +16108,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 430, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -16189,7 +16170,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 433, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -16256,7 +16237,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 436, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -16267,7 +16248,6 @@ "rate-key": "url:{url},ip:{ip}", "scope": "functions.read", "platforms": [ - "server", "server" ], "packaging": false, @@ -16342,7 +16322,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 438, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -16409,7 +16389,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 441, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -16421,7 +16401,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -16483,7 +16462,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 439, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -16495,7 +16474,6 @@ "scope": "execution.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -16600,7 +16578,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 440, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -16612,7 +16590,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -16665,7 +16642,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 442, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -16732,7 +16709,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 443, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -16810,7 +16787,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 447, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -16869,7 +16846,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 445, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -16959,7 +16936,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 446, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -17026,7 +17003,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 448, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -17118,7 +17095,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 449, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -17187,7 +17164,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 255, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -17199,8 +17176,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -17261,7 +17237,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 254, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -17273,8 +17249,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -18608,7 +18583,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -18660,7 +18634,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -18712,7 +18685,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -18764,7 +18736,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -18816,7 +18787,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -18868,7 +18838,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -18920,7 +18889,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -18972,7 +18940,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -19012,7 +18979,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 309, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -19087,7 +19054,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 306, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -19245,7 +19212,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 313, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -19400,7 +19367,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 308, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -19595,7 +19562,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 315, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -19789,7 +19756,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 307, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -19907,7 +19874,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 314, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -20021,7 +19988,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 312, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -20076,7 +20043,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 316, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -20136,7 +20103,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 310, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -20208,7 +20175,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 311, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -20280,7 +20247,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 281, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -20355,7 +20322,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 280, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -20470,7 +20437,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 293, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -20583,7 +20550,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 279, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -20674,7 +20641,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 292, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -20763,7 +20730,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 271, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -20890,7 +20857,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 284, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -21015,7 +20982,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 274, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -21118,7 +21085,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 287, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -21219,7 +21186,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 272, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -21334,7 +21301,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 285, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -21447,7 +21414,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 273, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -21606,7 +21573,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 286, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -21762,7 +21729,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 275, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -21865,7 +21832,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 288, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -21966,7 +21933,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 276, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -22069,7 +22036,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 289, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -22170,7 +22137,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 277, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -22273,7 +22240,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 290, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -22374,7 +22341,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 278, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -22477,7 +22444,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 291, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -22576,7 +22543,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 283, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -22631,7 +22598,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 294, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -22691,7 +22658,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 282, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -22763,7 +22730,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 303, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -22835,7 +22802,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 296, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -22908,7 +22875,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 295, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -22996,7 +22963,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 298, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -23056,7 +23023,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 299, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -23135,7 +23102,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -23195,7 +23162,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 297, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -23267,7 +23234,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -23348,7 +23315,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -23361,8 +23328,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -23436,7 +23402,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 304, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -23499,7 +23465,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -23512,8 +23478,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -23570,7 +23535,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 263, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -23643,7 +23608,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 258, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -23735,7 +23700,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 265, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -23823,7 +23788,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 262, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -23907,7 +23872,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 259, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -23985,7 +23950,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 266, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -24056,7 +24021,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 261, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -24175,7 +24140,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 268, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -24295,7 +24260,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 260, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -24407,7 +24372,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 267, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -24518,7 +24483,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 264, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -24576,7 +24541,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 269, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -24629,7 +24594,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 270, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -26620,7 +26585,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 420, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -26690,7 +26655,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 417, + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -26773,7 +26738,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 419, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -26839,7 +26804,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 418, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -26925,7 +26890,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 421, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -30468,7 +30433,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 482, + "weight": 481, "cookies": false, "type": "", "deprecated": false, @@ -30538,7 +30503,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 484, + "weight": 483, "cookies": false, "type": "", "deprecated": false, @@ -30621,7 +30586,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 485, + "weight": 484, "cookies": false, "type": "", "deprecated": false, @@ -30741,7 +30706,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 483, + "weight": 482, "cookies": false, "type": "", "deprecated": false, @@ -30993,7 +30958,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 454, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -31065,7 +31030,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 452, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -31332,7 +31297,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 457, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -31381,7 +31346,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 480, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -31431,7 +31396,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 476, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -31525,7 +31490,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 477, + "weight": 476, "cookies": false, "type": "", "deprecated": false, @@ -31583,7 +31548,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 478, + "weight": 477, "cookies": false, "type": "", "deprecated": false, @@ -31653,7 +31618,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 453, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -31712,7 +31677,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 455, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -31974,7 +31939,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 456, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -32035,7 +32000,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 463, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -32112,7 +32077,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 462, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -32192,7 +32157,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 458, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -32292,7 +32257,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 466, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -32371,7 +32336,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 459, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -32477,7 +32442,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 460, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -32574,7 +32539,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 461, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -32636,7 +32601,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 464, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -32703,7 +32668,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 465, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -32714,7 +32679,6 @@ "rate-key": "url:{url},ip:{ip}", "scope": "sites.read", "platforms": [ - "server", "server" ], "packaging": false, @@ -32789,7 +32753,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 467, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -32856,7 +32820,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 469, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -32927,7 +32891,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 468, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -32991,7 +32955,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 470, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -33058,7 +33022,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 479, + "weight": 478, "cookies": false, "type": "", "deprecated": false, @@ -33136,7 +33100,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 473, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -33195,7 +33159,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 471, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -33285,7 +33249,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 472, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -33352,7 +33316,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 474, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -33444,7 +33408,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 475, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -33983,7 +33947,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -34066,7 +34029,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -34156,7 +34118,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -34226,7 +34187,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -34315,7 +34275,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -34385,7 +34344,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -34464,7 +34422,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -34671,7 +34628,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -34898,7 +34854,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -34973,7 +34928,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -35063,7 +35017,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -35125,7 +35078,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -35200,7 +35152,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -35332,7 +35283,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -35415,7 +35365,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -35528,7 +35477,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -35598,7 +35546,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -35684,7 +35631,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -35975,7 +35921,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 488, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -36055,7 +36001,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 486, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -36139,7 +36085,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 487, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -36199,7 +36145,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 489, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -36270,7 +36216,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 490, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -40016,7 +39962,7 @@ "tags": [ "vcs" ], - "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { "description": "VCS Content List", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index b0a58b264d..96f69b1465 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -3142,7 +3142,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3269,7 +3268,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3402,7 +3400,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3467,7 +3464,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3956,7 +3952,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4041,7 +4036,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4134,7 +4128,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4215,7 +4208,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 321, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4288,7 +4281,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 317, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4371,7 +4364,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 318, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4431,7 +4424,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 319, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4510,7 +4503,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 320, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4570,7 +4563,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 329, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4651,7 +4644,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 325, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -4757,7 +4750,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 326, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -4825,7 +4818,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 327, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -4927,7 +4920,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 328, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -4995,7 +4988,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 346, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -5077,7 +5070,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5184,7 +5177,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 348, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5293,7 +5286,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5400,7 +5393,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 350, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5509,7 +5502,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5616,7 +5609,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 352, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5725,7 +5718,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5842,7 +5835,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 354, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -5961,7 +5954,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6080,7 +6073,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 356, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6201,7 +6194,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6320,7 +6313,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 358, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6441,7 +6434,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 359, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6548,7 +6541,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 360, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6657,7 +6650,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6791,7 +6784,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 363, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -6911,7 +6904,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 364, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7026,7 +7019,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7133,7 +7126,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 366, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7271,7 +7264,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 344, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7341,7 +7334,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 345, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7418,7 +7411,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 362, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7521,7 +7514,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -7533,7 +7526,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7605,7 +7597,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -7617,7 +7609,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7672,7 +7663,7 @@ "model": "#\/definitions\/documentList" } ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -7758,7 +7749,7 @@ "tags": [ "databases" ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Documents List", @@ -7770,7 +7761,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 337, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -7800,7 +7791,7 @@ "model": "#\/definitions\/documentList" } ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -7866,7 +7857,7 @@ "tags": [ "databases" ], - "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nUpdate all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", "responses": { "200": { "description": "Documents List", @@ -7878,7 +7869,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 335, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -7959,7 +7950,7 @@ "tags": [ "databases" ], - "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nBulk delete documents using queries, if no queries are passed then all documents are deleted.", "responses": { "200": { "description": "Documents List", @@ -7971,7 +7962,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 339, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8058,7 +8049,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8070,7 +8061,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8138,7 +8128,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -8150,7 +8140,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8162,7 +8152,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8182,7 +8171,7 @@ "model": "#\/definitions\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8276,7 +8265,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8288,7 +8277,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8375,7 +8363,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8387,7 +8375,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8457,7 +8444,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 343, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8564,7 +8551,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -8669,7 +8656,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 370, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8749,7 +8736,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 367, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -8877,7 +8864,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 368, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -8947,7 +8934,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 369, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9022,7 +9009,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 375, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9103,7 +9090,7 @@ "x-appwrite": { "method": "create", "group": null, - "weight": 371, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -9209,7 +9196,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -9277,7 +9264,7 @@ "x-appwrite": { "method": "update", "group": null, - "weight": 373, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -9379,7 +9366,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 374, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -9447,7 +9434,7 @@ "x-appwrite": { "method": "listColumns", "group": "columns", - "weight": 380, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -9529,7 +9516,7 @@ "x-appwrite": { "method": "createBooleanColumn", "group": "columns", - "weight": 381, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -9636,7 +9623,7 @@ "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", - "weight": 382, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -9745,7 +9732,7 @@ "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", - "weight": 383, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -9852,7 +9839,7 @@ "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", - "weight": 384, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -9961,7 +9948,7 @@ "x-appwrite": { "method": "createEmailColumn", "group": "columns", - "weight": 385, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10068,7 +10055,7 @@ "x-appwrite": { "method": "updateEmailColumn", "group": "columns", - "weight": 386, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -10177,7 +10164,7 @@ "x-appwrite": { "method": "createEnumColumn", "group": "columns", - "weight": 387, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -10294,7 +10281,7 @@ "x-appwrite": { "method": "updateEnumColumn", "group": "columns", - "weight": 388, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -10413,7 +10400,7 @@ "x-appwrite": { "method": "createFloatColumn", "group": "columns", - "weight": 389, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -10532,7 +10519,7 @@ "x-appwrite": { "method": "updateFloatColumn", "group": "columns", - "weight": 390, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -10653,7 +10640,7 @@ "x-appwrite": { "method": "createIntegerColumn", "group": "columns", - "weight": 391, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -10772,7 +10759,7 @@ "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", - "weight": 392, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -10893,7 +10880,7 @@ "x-appwrite": { "method": "createIpColumn", "group": "columns", - "weight": 393, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -11000,7 +10987,7 @@ "x-appwrite": { "method": "updateIpColumn", "group": "columns", - "weight": 394, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11109,7 +11096,7 @@ "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", - "weight": 395, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -11243,7 +11230,7 @@ "x-appwrite": { "method": "createStringColumn", "group": "columns", - "weight": 397, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -11363,7 +11350,7 @@ "x-appwrite": { "method": "updateStringColumn", "group": "columns", - "weight": 398, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -11478,7 +11465,7 @@ "x-appwrite": { "method": "createUrlColumn", "group": "columns", - "weight": 399, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -11585,7 +11572,7 @@ "x-appwrite": { "method": "updateUrlColumn", "group": "columns", - "weight": 400, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -11723,7 +11710,7 @@ "x-appwrite": { "method": "getColumn", "group": "columns", - "weight": 378, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -11793,7 +11780,7 @@ "x-appwrite": { "method": "deleteColumn", "group": "columns", - "weight": 379, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -11870,7 +11857,7 @@ "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", - "weight": 396, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -11973,7 +11960,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 404, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -12053,7 +12040,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 401, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -12181,7 +12168,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 402, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -12251,7 +12238,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 403, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -12326,7 +12313,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -12338,7 +12325,6 @@ "scope": "rows.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -12410,7 +12396,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 405, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -12422,7 +12408,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -12575,7 +12560,7 @@ "x-appwrite": { "method": "upsertRows", "group": "rows", - "weight": 410, + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -12683,7 +12668,7 @@ "x-appwrite": { "method": "updateRows", "group": "rows", - "weight": 408, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -12776,7 +12761,7 @@ "x-appwrite": { "method": "deleteRows", "group": "rows", - "weight": 412, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -12863,7 +12848,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -12875,7 +12860,6 @@ "scope": "rows.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -12955,7 +12939,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -12967,7 +12951,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13078,7 +13061,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -13090,7 +13073,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13177,7 +13159,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -13189,7 +13171,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13259,7 +13240,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 416, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -13366,7 +13347,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 415, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -13471,7 +13452,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 425, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -13544,7 +13525,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 422, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -13796,7 +13777,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 427, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -13846,7 +13827,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 428, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -13897,7 +13878,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 423, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -13957,7 +13938,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 424, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -14205,7 +14186,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 426, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -14267,7 +14248,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 431, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -14345,7 +14326,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 432, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -14426,7 +14407,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 429, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -14519,7 +14500,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 437, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -14605,7 +14586,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 434, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -14712,7 +14693,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 435, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -14809,7 +14790,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 430, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -14872,7 +14853,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 433, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -14940,7 +14921,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 436, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -14951,7 +14932,6 @@ "rate-key": "url:{url},ip:{ip}", "scope": "functions.read", "platforms": [ - "server", "server" ], "packaging": false, @@ -15027,7 +15007,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 438, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -15095,7 +15075,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 441, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -15107,7 +15087,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -15171,7 +15150,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 439, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -15183,7 +15162,6 @@ "scope": "execution.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -15290,7 +15268,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 440, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -15302,7 +15280,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -15357,7 +15334,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 442, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -15425,7 +15402,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 447, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -15485,7 +15462,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 445, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -15576,7 +15553,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 446, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -15644,7 +15621,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 448, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -15737,7 +15714,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 449, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -15807,7 +15784,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 255, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -15819,8 +15796,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -15883,7 +15859,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 254, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -15895,8 +15871,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -17254,7 +17229,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -17308,7 +17282,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -17362,7 +17335,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -17416,7 +17388,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -17470,7 +17441,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -17524,7 +17494,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -17578,7 +17547,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -17632,7 +17600,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -17674,7 +17641,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 309, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -17750,7 +17717,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 306, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -17909,7 +17876,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 313, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -18065,7 +18032,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 308, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -18261,7 +18228,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 315, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -18456,7 +18423,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 307, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -18575,7 +18542,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 314, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -18690,7 +18657,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 312, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -18746,7 +18713,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 316, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -18807,7 +18774,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 310, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -18880,7 +18847,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 311, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -18953,7 +18920,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 281, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -19029,7 +18996,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 280, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -19145,7 +19112,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 293, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -19259,7 +19226,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 279, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -19351,7 +19318,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 292, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -19441,7 +19408,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 271, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -19569,7 +19536,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 284, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -19695,7 +19662,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 274, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -19799,7 +19766,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 287, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -19901,7 +19868,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 272, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -20017,7 +19984,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 285, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -20131,7 +20098,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 273, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -20291,7 +20258,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 286, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -20448,7 +20415,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 275, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -20552,7 +20519,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 288, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -20654,7 +20621,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 276, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -20758,7 +20725,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 289, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -20860,7 +20827,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 277, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -20964,7 +20931,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 290, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -21066,7 +21033,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 278, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -21170,7 +21137,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 291, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -21270,7 +21237,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 283, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -21326,7 +21293,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 294, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -21387,7 +21354,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 282, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -21460,7 +21427,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 303, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -21533,7 +21500,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 296, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -21607,7 +21574,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 295, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -21696,7 +21663,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 298, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -21757,7 +21724,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 299, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -21837,7 +21804,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -21898,7 +21865,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 297, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -21971,7 +21938,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -22053,7 +22020,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -22066,8 +22033,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -22143,7 +22109,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 304, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -22207,7 +22173,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -22220,8 +22186,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -22280,7 +22245,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 454, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -22353,7 +22318,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 452, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -22621,7 +22586,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 457, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -22671,7 +22636,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 480, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -22722,7 +22687,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 453, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -22782,7 +22747,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 455, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -23045,7 +23010,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 456, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -23107,7 +23072,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 463, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -23185,7 +23150,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 462, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -23266,7 +23231,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 458, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -23367,7 +23332,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 466, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -23447,7 +23412,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 459, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -23554,7 +23519,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 460, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -23652,7 +23617,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 461, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -23715,7 +23680,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 464, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -23783,7 +23748,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 465, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -23794,7 +23759,6 @@ "rate-key": "url:{url},ip:{ip}", "scope": "sites.read", "platforms": [ - "server", "server" ], "packaging": false, @@ -23870,7 +23834,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 467, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -23938,7 +23902,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 469, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -24010,7 +23974,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 468, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -24075,7 +24039,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 470, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -24143,7 +24107,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 473, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -24203,7 +24167,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 471, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -24294,7 +24258,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 472, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -24362,7 +24326,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 474, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -24455,7 +24419,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 475, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -25000,7 +24964,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -25085,7 +25048,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -25177,7 +25139,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -25249,7 +25210,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -25340,7 +25300,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -25412,7 +25371,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -25493,7 +25451,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -25702,7 +25659,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -25783,7 +25739,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -25860,7 +25815,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -25952,7 +25906,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -26016,7 +25969,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -26093,7 +26045,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -26157,7 +26108,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -26242,7 +26192,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -26357,7 +26306,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -26429,7 +26377,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -26517,7 +26464,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -26816,7 +26762,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 488, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -26897,7 +26843,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 486, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -26982,7 +26928,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 487, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -27043,7 +26989,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 489, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -27115,7 +27061,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 490, + "weight": 489, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index b641397258..c032d4e2ab 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -3451,7 +3451,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3576,7 +3575,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3707,7 +3705,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3770,7 +3767,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4257,7 +4253,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4340,7 +4335,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4431,7 +4425,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4510,7 +4503,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -4522,7 +4515,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4592,7 +4584,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -4604,7 +4596,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4659,7 +4650,7 @@ "model": "#\/definitions\/documentList" } ], - "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4755,7 +4746,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -4767,7 +4758,6 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4833,7 +4823,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -4845,7 +4835,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4857,7 +4847,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4877,7 +4866,7 @@ "model": "#\/definitions\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4969,7 +4958,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -4981,7 +4970,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5066,7 +5054,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -5078,7 +5066,6 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5144,7 +5131,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -5156,7 +5143,6 @@ "scope": "rows.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5226,7 +5212,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 405, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -5238,7 +5224,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5389,7 +5374,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -5401,7 +5386,6 @@ "scope": "rows.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5479,7 +5463,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -5491,7 +5475,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5600,7 +5583,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -5612,7 +5595,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5697,7 +5679,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -5709,7 +5691,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5775,7 +5756,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 441, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -5787,7 +5768,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5849,7 +5829,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 439, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -5861,7 +5841,6 @@ "scope": "execution.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5966,7 +5945,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 440, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -5978,7 +5957,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6038,7 +6016,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 255, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -6050,8 +6028,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -6112,7 +6089,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 254, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -6124,8 +6101,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -6196,7 +6172,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6248,7 +6223,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6300,7 +6274,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6352,7 +6325,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6404,7 +6376,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6456,7 +6427,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6508,7 +6478,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6560,7 +6529,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6602,7 +6570,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -6615,8 +6583,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -6687,7 +6654,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -6700,8 +6667,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -6770,7 +6736,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6853,7 +6818,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6943,7 +6907,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7013,7 +6976,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7102,7 +7064,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7172,7 +7133,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7251,7 +7211,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7458,7 +7417,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7537,7 +7495,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7612,7 +7569,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7702,7 +7658,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7764,7 +7719,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7839,7 +7793,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7901,7 +7854,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7984,7 +7936,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8097,7 +8048,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8167,7 +8117,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8253,7 +8202,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index b124a3cf0a..24dda66db4 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4520,7 +4520,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 257, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -4583,7 +4583,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 481, + "weight": 480, "cookies": false, "type": "", "deprecated": false, @@ -4654,7 +4654,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 256, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -4702,7 +4702,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 321, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4774,7 +4774,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 317, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4856,7 +4856,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 324, + "weight": 323, "cookies": false, "type": "", "deprecated": false, @@ -4926,7 +4926,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 318, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4985,7 +4985,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 319, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -5063,7 +5063,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 320, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -5122,7 +5122,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 329, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -5202,7 +5202,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 325, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -5307,7 +5307,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 326, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -5374,7 +5374,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 327, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -5475,7 +5475,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 328, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -5542,7 +5542,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 346, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -5623,7 +5623,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5729,7 +5729,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 348, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5837,7 +5837,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5943,7 +5943,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 350, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -6051,7 +6051,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -6157,7 +6157,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 352, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -6265,7 +6265,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -6381,7 +6381,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 354, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -6499,7 +6499,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6617,7 +6617,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 356, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6737,7 +6737,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6855,7 +6855,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 358, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6975,7 +6975,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 359, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -7081,7 +7081,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 360, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -7189,7 +7189,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -7322,7 +7322,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 363, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -7441,7 +7441,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 364, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7555,7 +7555,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7661,7 +7661,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 366, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7798,7 +7798,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 344, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7867,7 +7867,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 345, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7943,7 +7943,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 362, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -8045,7 +8045,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -8126,7 +8126,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -8288,7 +8288,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 337, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -8318,7 +8318,7 @@ "model": "#\/definitions\/documentList" } ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8395,7 +8395,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 335, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -8487,7 +8487,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 339, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8573,7 +8573,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8662,7 +8662,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8693,7 +8693,7 @@ "model": "#\/definitions\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8785,7 +8785,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8881,7 +8881,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8958,7 +8958,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 341, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -9046,7 +9046,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 343, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -9152,7 +9152,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -9256,7 +9256,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 370, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -9335,7 +9335,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 367, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -9462,7 +9462,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 368, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -9531,7 +9531,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 369, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9605,7 +9605,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 330, + "weight": 329, "cookies": false, "type": "", "deprecated": false, @@ -9683,7 +9683,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 331, + "weight": 330, "cookies": false, "type": "", "deprecated": false, @@ -9769,7 +9769,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 322, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -9839,7 +9839,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 375, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9919,7 +9919,7 @@ "x-appwrite": { "method": "create", "group": null, - "weight": 371, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -10024,7 +10024,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -10091,7 +10091,7 @@ "x-appwrite": { "method": "update", "group": null, - "weight": 373, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -10192,7 +10192,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 374, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -10259,7 +10259,7 @@ "x-appwrite": { "method": "listColumns", "group": "columns", - "weight": 380, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -10340,7 +10340,7 @@ "x-appwrite": { "method": "createBooleanColumn", "group": "columns", - "weight": 381, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -10446,7 +10446,7 @@ "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", - "weight": 382, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -10554,7 +10554,7 @@ "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", - "weight": 383, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -10660,7 +10660,7 @@ "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", - "weight": 384, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -10768,7 +10768,7 @@ "x-appwrite": { "method": "createEmailColumn", "group": "columns", - "weight": 385, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10874,7 +10874,7 @@ "x-appwrite": { "method": "updateEmailColumn", "group": "columns", - "weight": 386, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -10982,7 +10982,7 @@ "x-appwrite": { "method": "createEnumColumn", "group": "columns", - "weight": 387, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -11098,7 +11098,7 @@ "x-appwrite": { "method": "updateEnumColumn", "group": "columns", - "weight": 388, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -11216,7 +11216,7 @@ "x-appwrite": { "method": "createFloatColumn", "group": "columns", - "weight": 389, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -11334,7 +11334,7 @@ "x-appwrite": { "method": "updateFloatColumn", "group": "columns", - "weight": 390, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -11454,7 +11454,7 @@ "x-appwrite": { "method": "createIntegerColumn", "group": "columns", - "weight": 391, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -11572,7 +11572,7 @@ "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", - "weight": 392, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -11692,7 +11692,7 @@ "x-appwrite": { "method": "createIpColumn", "group": "columns", - "weight": 393, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -11798,7 +11798,7 @@ "x-appwrite": { "method": "updateIpColumn", "group": "columns", - "weight": 394, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11906,7 +11906,7 @@ "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", - "weight": 395, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -12039,7 +12039,7 @@ "x-appwrite": { "method": "createStringColumn", "group": "columns", - "weight": 397, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -12158,7 +12158,7 @@ "x-appwrite": { "method": "updateStringColumn", "group": "columns", - "weight": 398, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -12272,7 +12272,7 @@ "x-appwrite": { "method": "createUrlColumn", "group": "columns", - "weight": 399, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -12378,7 +12378,7 @@ "x-appwrite": { "method": "updateUrlColumn", "group": "columns", - "weight": 400, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -12515,7 +12515,7 @@ "x-appwrite": { "method": "getColumn", "group": "columns", - "weight": 378, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -12584,7 +12584,7 @@ "x-appwrite": { "method": "deleteColumn", "group": "columns", - "weight": 379, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -12660,7 +12660,7 @@ "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", - "weight": 396, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -12762,7 +12762,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 404, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -12841,7 +12841,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 401, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -12968,7 +12968,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 402, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -13037,7 +13037,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 403, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -13111,7 +13111,7 @@ "x-appwrite": { "method": "listLogs", "group": "tables", - "weight": 376, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -13189,7 +13189,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -13201,7 +13201,6 @@ "scope": "rows.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13271,7 +13270,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 405, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -13283,7 +13282,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13434,7 +13432,7 @@ "x-appwrite": { "method": "upsertRows", "group": "rows", - "weight": 410, + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -13541,7 +13539,7 @@ "x-appwrite": { "method": "updateRows", "group": "rows", - "weight": 408, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -13633,7 +13631,7 @@ "x-appwrite": { "method": "deleteRows", "group": "rows", - "weight": 412, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -13719,7 +13717,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -13731,7 +13729,6 @@ "scope": "rows.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13809,7 +13806,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -13821,7 +13818,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13930,7 +13926,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -13942,7 +13938,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -14027,7 +14022,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -14039,7 +14034,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -14105,7 +14099,7 @@ "x-appwrite": { "method": "listRowLogs", "group": "logs", - "weight": 414, + "weight": 413, "cookies": false, "type": "", "deprecated": false, @@ -14193,7 +14187,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 416, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -14299,7 +14293,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 415, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -14403,7 +14397,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 377, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -14489,7 +14483,7 @@ "x-appwrite": { "method": "getDatabaseUsage", "group": null, - "weight": 323, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -14567,7 +14561,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 425, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -14639,7 +14633,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 422, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -14890,7 +14884,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 427, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -14939,7 +14933,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 428, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -14989,7 +14983,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 451, + "weight": 450, "cookies": false, "type": "", "deprecated": false, @@ -15083,7 +15077,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 450, + "weight": 449, "cookies": false, "type": "", "deprecated": false, @@ -15141,7 +15135,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 444, + "weight": 443, "cookies": false, "type": "", "deprecated": false, @@ -15211,7 +15205,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 423, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -15270,7 +15264,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 424, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -15517,7 +15511,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 426, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -15578,7 +15572,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 431, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -15655,7 +15649,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 432, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -15735,7 +15729,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 429, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -15827,7 +15821,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 437, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -15912,7 +15906,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 434, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -16018,7 +16012,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 435, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -16114,7 +16108,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 430, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -16176,7 +16170,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 433, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -16243,7 +16237,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 436, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -16328,7 +16322,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 438, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -16395,7 +16389,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 441, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -16468,7 +16462,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 439, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -16584,7 +16578,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 440, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -16648,7 +16642,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 442, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -16715,7 +16709,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 443, + "weight": 442, "cookies": false, "type": "", "deprecated": false, @@ -16793,7 +16787,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 447, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -16852,7 +16846,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 445, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -16942,7 +16936,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 446, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -17009,7 +17003,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 448, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -17101,7 +17095,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 449, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -17170,7 +17164,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 255, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -17243,7 +17237,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 254, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -18985,7 +18979,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 309, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -19060,7 +19054,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 306, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -19218,7 +19212,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 313, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -19373,7 +19367,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 308, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -19568,7 +19562,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 315, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -19762,7 +19756,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 307, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -19880,7 +19874,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 314, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -19994,7 +19988,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 312, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -20049,7 +20043,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 316, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -20109,7 +20103,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 310, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -20181,7 +20175,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 311, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -20253,7 +20247,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 281, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -20328,7 +20322,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 280, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -20443,7 +20437,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 293, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -20556,7 +20550,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 279, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -20647,7 +20641,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 292, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -20736,7 +20730,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 271, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -20863,7 +20857,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 284, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -20988,7 +20982,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 274, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -21091,7 +21085,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 287, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -21192,7 +21186,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 272, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -21307,7 +21301,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 285, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -21420,7 +21414,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 273, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -21579,7 +21573,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 286, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -21735,7 +21729,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 275, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -21838,7 +21832,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 288, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -21939,7 +21933,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 276, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -22042,7 +22036,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 289, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -22143,7 +22137,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 277, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -22246,7 +22240,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 290, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -22347,7 +22341,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 278, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -22450,7 +22444,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 291, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -22549,7 +22543,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 283, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -22604,7 +22598,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 294, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -22664,7 +22658,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 282, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -22736,7 +22730,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 303, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -22808,7 +22802,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 296, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -22881,7 +22875,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 295, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -22969,7 +22963,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 298, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -23029,7 +23023,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 299, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -23108,7 +23102,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -23168,7 +23162,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 297, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -23240,7 +23234,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -23321,7 +23315,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -23408,7 +23402,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 304, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -23471,7 +23465,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -23541,7 +23535,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 263, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -23614,7 +23608,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 258, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -23706,7 +23700,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 265, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -23794,7 +23788,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 262, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -23878,7 +23872,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 259, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -23956,7 +23950,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 266, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -24027,7 +24021,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 261, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -24146,7 +24140,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 268, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -24266,7 +24260,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 260, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -24378,7 +24372,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 267, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -24489,7 +24483,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 264, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -24547,7 +24541,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 269, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -24600,7 +24594,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 270, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -26591,7 +26585,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 420, + "weight": 419, "cookies": false, "type": "", "deprecated": false, @@ -26661,7 +26655,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 417, + "weight": 416, "cookies": false, "type": "", "deprecated": false, @@ -26744,7 +26738,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 419, + "weight": 418, "cookies": false, "type": "", "deprecated": false, @@ -26810,7 +26804,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 418, + "weight": 417, "cookies": false, "type": "", "deprecated": false, @@ -26896,7 +26890,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 421, + "weight": 420, "cookies": false, "type": "", "deprecated": false, @@ -30439,7 +30433,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 482, + "weight": 481, "cookies": false, "type": "", "deprecated": false, @@ -30509,7 +30503,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 484, + "weight": 483, "cookies": false, "type": "", "deprecated": false, @@ -30592,7 +30586,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 485, + "weight": 484, "cookies": false, "type": "", "deprecated": false, @@ -30712,7 +30706,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 483, + "weight": 482, "cookies": false, "type": "", "deprecated": false, @@ -30964,7 +30958,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 454, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -31036,7 +31030,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 452, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -31303,7 +31297,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 457, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -31352,7 +31346,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 480, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -31402,7 +31396,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 476, + "weight": 475, "cookies": false, "type": "", "deprecated": false, @@ -31496,7 +31490,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 477, + "weight": 476, "cookies": false, "type": "", "deprecated": false, @@ -31554,7 +31548,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 478, + "weight": 477, "cookies": false, "type": "", "deprecated": false, @@ -31624,7 +31618,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 453, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -31683,7 +31677,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 455, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -31945,7 +31939,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 456, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -32006,7 +32000,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 463, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -32083,7 +32077,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 462, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -32163,7 +32157,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 458, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -32263,7 +32257,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 466, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -32342,7 +32336,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 459, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -32448,7 +32442,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 460, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -32545,7 +32539,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 461, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -32607,7 +32601,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 464, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -32674,7 +32668,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 465, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -32759,7 +32753,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 467, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -32826,7 +32820,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 469, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -32897,7 +32891,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 468, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -32961,7 +32955,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 470, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -33028,7 +33022,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 479, + "weight": 478, "cookies": false, "type": "", "deprecated": false, @@ -33106,7 +33100,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 473, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -33165,7 +33159,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 471, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -33255,7 +33249,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 472, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -33322,7 +33316,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 474, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -33414,7 +33408,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 475, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -35927,7 +35921,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 488, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -36007,7 +36001,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 486, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -36091,7 +36085,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 487, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -36151,7 +36145,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 489, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -36222,7 +36216,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 490, + "weight": 489, "cookies": false, "type": "", "deprecated": false, @@ -39968,7 +39962,7 @@ "tags": [ "vcs" ], - "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.\n", + "description": "Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.", "responses": { "200": { "description": "VCS Content List", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index d9779cceb2..96f69b1465 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -4208,7 +4208,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 321, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -4281,7 +4281,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 317, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -4364,7 +4364,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 318, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -4424,7 +4424,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 319, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -4503,7 +4503,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 320, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -4563,7 +4563,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 329, + "weight": 328, "cookies": false, "type": "", "deprecated": false, @@ -4644,7 +4644,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 325, + "weight": 324, "cookies": false, "type": "", "deprecated": false, @@ -4750,7 +4750,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 326, + "weight": 325, "cookies": false, "type": "", "deprecated": false, @@ -4818,7 +4818,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 327, + "weight": 326, "cookies": false, "type": "", "deprecated": false, @@ -4920,7 +4920,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 328, + "weight": 327, "cookies": false, "type": "", "deprecated": false, @@ -4988,7 +4988,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 346, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -5070,7 +5070,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 347, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -5177,7 +5177,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 348, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -5286,7 +5286,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 349, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -5393,7 +5393,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 350, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -5502,7 +5502,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 351, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -5609,7 +5609,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 352, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -5718,7 +5718,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 353, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -5835,7 +5835,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 354, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -5954,7 +5954,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 355, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -6073,7 +6073,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 356, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -6194,7 +6194,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 357, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -6313,7 +6313,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 358, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -6434,7 +6434,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 359, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -6541,7 +6541,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 360, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -6650,7 +6650,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 361, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -6784,7 +6784,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 363, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -6904,7 +6904,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 364, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -7019,7 +7019,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 365, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -7126,7 +7126,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 366, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -7264,7 +7264,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 344, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -7334,7 +7334,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 345, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -7411,7 +7411,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 362, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -7514,7 +7514,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 340, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -7597,7 +7597,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 332, + "weight": 331, "cookies": false, "type": "", "deprecated": false, @@ -7761,7 +7761,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 337, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -7791,7 +7791,7 @@ "model": "#\/definitions\/documentList" } ], - "description": "Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -7869,7 +7869,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 335, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -7962,7 +7962,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 339, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -8049,7 +8049,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 333, + "weight": 332, "cookies": false, "type": "", "deprecated": false, @@ -8140,7 +8140,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 336, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -8171,7 +8171,7 @@ "model": "#\/definitions\/document" } ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -8265,7 +8265,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 334, + "weight": 333, "cookies": false, "type": "", "deprecated": false, @@ -8363,7 +8363,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 338, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -8444,7 +8444,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 343, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -8551,7 +8551,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 342, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -8656,7 +8656,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 370, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -8736,7 +8736,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 367, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -8864,7 +8864,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 368, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -8934,7 +8934,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 369, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -9009,7 +9009,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 375, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -9090,7 +9090,7 @@ "x-appwrite": { "method": "create", "group": null, - "weight": 371, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -9196,7 +9196,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 372, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -9264,7 +9264,7 @@ "x-appwrite": { "method": "update", "group": null, - "weight": 373, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -9366,7 +9366,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 374, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -9434,7 +9434,7 @@ "x-appwrite": { "method": "listColumns", "group": "columns", - "weight": 380, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -9516,7 +9516,7 @@ "x-appwrite": { "method": "createBooleanColumn", "group": "columns", - "weight": 381, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -9623,7 +9623,7 @@ "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", - "weight": 382, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -9732,7 +9732,7 @@ "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", - "weight": 383, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -9839,7 +9839,7 @@ "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", - "weight": 384, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -9948,7 +9948,7 @@ "x-appwrite": { "method": "createEmailColumn", "group": "columns", - "weight": 385, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -10055,7 +10055,7 @@ "x-appwrite": { "method": "updateEmailColumn", "group": "columns", - "weight": 386, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -10164,7 +10164,7 @@ "x-appwrite": { "method": "createEnumColumn", "group": "columns", - "weight": 387, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -10281,7 +10281,7 @@ "x-appwrite": { "method": "updateEnumColumn", "group": "columns", - "weight": 388, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -10400,7 +10400,7 @@ "x-appwrite": { "method": "createFloatColumn", "group": "columns", - "weight": 389, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -10519,7 +10519,7 @@ "x-appwrite": { "method": "updateFloatColumn", "group": "columns", - "weight": 390, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -10640,7 +10640,7 @@ "x-appwrite": { "method": "createIntegerColumn", "group": "columns", - "weight": 391, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -10759,7 +10759,7 @@ "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", - "weight": 392, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -10880,7 +10880,7 @@ "x-appwrite": { "method": "createIpColumn", "group": "columns", - "weight": 393, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -10987,7 +10987,7 @@ "x-appwrite": { "method": "updateIpColumn", "group": "columns", - "weight": 394, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -11096,7 +11096,7 @@ "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", - "weight": 395, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -11230,7 +11230,7 @@ "x-appwrite": { "method": "createStringColumn", "group": "columns", - "weight": 397, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -11350,7 +11350,7 @@ "x-appwrite": { "method": "updateStringColumn", "group": "columns", - "weight": 398, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -11465,7 +11465,7 @@ "x-appwrite": { "method": "createUrlColumn", "group": "columns", - "weight": 399, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -11572,7 +11572,7 @@ "x-appwrite": { "method": "updateUrlColumn", "group": "columns", - "weight": 400, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -11710,7 +11710,7 @@ "x-appwrite": { "method": "getColumn", "group": "columns", - "weight": 378, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -11780,7 +11780,7 @@ "x-appwrite": { "method": "deleteColumn", "group": "columns", - "weight": 379, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -11857,7 +11857,7 @@ "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", - "weight": 396, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -11960,7 +11960,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 404, + "weight": 403, "cookies": false, "type": "", "deprecated": false, @@ -12040,7 +12040,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 401, + "weight": 400, "cookies": false, "type": "", "deprecated": false, @@ -12168,7 +12168,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 402, + "weight": 401, "cookies": false, "type": "", "deprecated": false, @@ -12238,7 +12238,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 403, + "weight": 402, "cookies": false, "type": "", "deprecated": false, @@ -12313,7 +12313,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 413, + "weight": 412, "cookies": false, "type": "", "deprecated": false, @@ -12325,7 +12325,6 @@ "scope": "rows.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -12397,7 +12396,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 405, + "weight": 404, "cookies": false, "type": "", "deprecated": false, @@ -12409,7 +12408,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -12562,7 +12560,7 @@ "x-appwrite": { "method": "upsertRows", "group": "rows", - "weight": 410, + "weight": 409, "cookies": false, "type": "", "deprecated": false, @@ -12670,7 +12668,7 @@ "x-appwrite": { "method": "updateRows", "group": "rows", - "weight": 408, + "weight": 407, "cookies": false, "type": "", "deprecated": false, @@ -12763,7 +12761,7 @@ "x-appwrite": { "method": "deleteRows", "group": "rows", - "weight": 412, + "weight": 411, "cookies": false, "type": "", "deprecated": false, @@ -12850,7 +12848,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 406, + "weight": 405, "cookies": false, "type": "", "deprecated": false, @@ -12862,7 +12860,6 @@ "scope": "rows.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -12942,7 +12939,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 409, + "weight": 408, "cookies": false, "type": "", "deprecated": false, @@ -12954,7 +12951,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13065,7 +13061,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 407, + "weight": 406, "cookies": false, "type": "", "deprecated": false, @@ -13077,7 +13073,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13164,7 +13159,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 411, + "weight": 410, "cookies": false, "type": "", "deprecated": false, @@ -13176,7 +13171,6 @@ "scope": "rows.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -13246,7 +13240,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 416, + "weight": 415, "cookies": false, "type": "", "deprecated": false, @@ -13353,7 +13347,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 415, + "weight": 414, "cookies": false, "type": "", "deprecated": false, @@ -13458,7 +13452,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 425, + "weight": 424, "cookies": false, "type": "", "deprecated": false, @@ -13531,7 +13525,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 422, + "weight": 421, "cookies": false, "type": "", "deprecated": false, @@ -13783,7 +13777,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 427, + "weight": 426, "cookies": false, "type": "", "deprecated": false, @@ -13833,7 +13827,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 428, + "weight": 427, "cookies": false, "type": "", "deprecated": false, @@ -13884,7 +13878,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 423, + "weight": 422, "cookies": false, "type": "", "deprecated": false, @@ -13944,7 +13938,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 424, + "weight": 423, "cookies": false, "type": "", "deprecated": false, @@ -14192,7 +14186,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 426, + "weight": 425, "cookies": false, "type": "", "deprecated": false, @@ -14254,7 +14248,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 431, + "weight": 430, "cookies": false, "type": "", "deprecated": false, @@ -14332,7 +14326,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 432, + "weight": 431, "cookies": false, "type": "", "deprecated": false, @@ -14413,7 +14407,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 429, + "weight": 428, "cookies": false, "type": "upload", "deprecated": false, @@ -14506,7 +14500,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 437, + "weight": 436, "cookies": false, "type": "", "deprecated": false, @@ -14592,7 +14586,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 434, + "weight": 433, "cookies": false, "type": "", "deprecated": false, @@ -14699,7 +14693,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 435, + "weight": 434, "cookies": false, "type": "", "deprecated": false, @@ -14796,7 +14790,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 430, + "weight": 429, "cookies": false, "type": "", "deprecated": false, @@ -14859,7 +14853,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 433, + "weight": 432, "cookies": false, "type": "", "deprecated": false, @@ -14927,7 +14921,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 436, + "weight": 435, "cookies": false, "type": "location", "deprecated": false, @@ -15013,7 +15007,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 438, + "weight": 437, "cookies": false, "type": "", "deprecated": false, @@ -15081,7 +15075,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 441, + "weight": 440, "cookies": false, "type": "", "deprecated": false, @@ -15156,7 +15150,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 439, + "weight": 438, "cookies": false, "type": "", "deprecated": false, @@ -15274,7 +15268,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 440, + "weight": 439, "cookies": false, "type": "", "deprecated": false, @@ -15340,7 +15334,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 442, + "weight": 441, "cookies": false, "type": "", "deprecated": false, @@ -15408,7 +15402,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 447, + "weight": 446, "cookies": false, "type": "", "deprecated": false, @@ -15468,7 +15462,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 445, + "weight": 444, "cookies": false, "type": "", "deprecated": false, @@ -15559,7 +15553,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 446, + "weight": 445, "cookies": false, "type": "", "deprecated": false, @@ -15627,7 +15621,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 448, + "weight": 447, "cookies": false, "type": "", "deprecated": false, @@ -15720,7 +15714,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 449, + "weight": 448, "cookies": false, "type": "", "deprecated": false, @@ -15790,7 +15784,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 255, + "weight": 254, "cookies": false, "type": "graphql", "deprecated": false, @@ -15865,7 +15859,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 254, + "weight": 253, "cookies": false, "type": "graphql", "deprecated": false, @@ -17647,7 +17641,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 309, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -17723,7 +17717,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 306, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -17882,7 +17876,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 313, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -18038,7 +18032,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 308, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -18234,7 +18228,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 315, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -18429,7 +18423,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 307, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -18548,7 +18542,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 314, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -18663,7 +18657,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 312, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -18719,7 +18713,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 316, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -18780,7 +18774,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 310, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -18853,7 +18847,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 311, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -18926,7 +18920,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 281, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -19002,7 +18996,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 280, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -19118,7 +19112,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 293, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -19232,7 +19226,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 279, + "weight": 278, "cookies": false, "type": "", "deprecated": false, @@ -19324,7 +19318,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 292, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -19414,7 +19408,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 271, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -19542,7 +19536,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 284, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -19668,7 +19662,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 274, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -19772,7 +19766,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 287, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -19874,7 +19868,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 272, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -19990,7 +19984,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 285, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -20104,7 +20098,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 273, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -20264,7 +20258,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 286, + "weight": 285, "cookies": false, "type": "", "deprecated": false, @@ -20421,7 +20415,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 275, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -20525,7 +20519,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 288, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -20627,7 +20621,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 276, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -20731,7 +20725,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 289, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -20833,7 +20827,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 277, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -20937,7 +20931,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 290, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -21039,7 +21033,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 278, + "weight": 277, "cookies": false, "type": "", "deprecated": false, @@ -21143,7 +21137,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 291, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -21243,7 +21237,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 283, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -21299,7 +21293,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 294, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -21360,7 +21354,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 282, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -21433,7 +21427,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 303, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -21506,7 +21500,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 296, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -21580,7 +21574,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 295, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -21669,7 +21663,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 298, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -21730,7 +21724,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 299, + "weight": 298, "cookies": false, "type": "", "deprecated": false, @@ -21810,7 +21804,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 300, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -21871,7 +21865,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 297, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -21944,7 +21938,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 302, + "weight": 301, "cookies": false, "type": "", "deprecated": false, @@ -22026,7 +22020,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 301, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -22115,7 +22109,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 304, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -22179,7 +22173,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 305, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -22251,7 +22245,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 454, + "weight": 453, "cookies": false, "type": "", "deprecated": false, @@ -22324,7 +22318,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 452, + "weight": 451, "cookies": false, "type": "", "deprecated": false, @@ -22592,7 +22586,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 457, + "weight": 456, "cookies": false, "type": "", "deprecated": false, @@ -22642,7 +22636,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 480, + "weight": 479, "cookies": false, "type": "", "deprecated": false, @@ -22693,7 +22687,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 453, + "weight": 452, "cookies": false, "type": "", "deprecated": false, @@ -22753,7 +22747,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 455, + "weight": 454, "cookies": false, "type": "", "deprecated": false, @@ -23016,7 +23010,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 456, + "weight": 455, "cookies": false, "type": "", "deprecated": false, @@ -23078,7 +23072,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 463, + "weight": 462, "cookies": false, "type": "", "deprecated": false, @@ -23156,7 +23150,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 462, + "weight": 461, "cookies": false, "type": "", "deprecated": false, @@ -23237,7 +23231,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 458, + "weight": 457, "cookies": false, "type": "upload", "deprecated": false, @@ -23338,7 +23332,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 466, + "weight": 465, "cookies": false, "type": "", "deprecated": false, @@ -23418,7 +23412,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 459, + "weight": 458, "cookies": false, "type": "", "deprecated": false, @@ -23525,7 +23519,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 460, + "weight": 459, "cookies": false, "type": "", "deprecated": false, @@ -23623,7 +23617,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 461, + "weight": 460, "cookies": false, "type": "", "deprecated": false, @@ -23686,7 +23680,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 464, + "weight": 463, "cookies": false, "type": "", "deprecated": false, @@ -23754,7 +23748,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 465, + "weight": 464, "cookies": false, "type": "location", "deprecated": false, @@ -23840,7 +23834,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 467, + "weight": 466, "cookies": false, "type": "", "deprecated": false, @@ -23908,7 +23902,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 469, + "weight": 468, "cookies": false, "type": "", "deprecated": false, @@ -23980,7 +23974,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 468, + "weight": 467, "cookies": false, "type": "", "deprecated": false, @@ -24045,7 +24039,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 470, + "weight": 469, "cookies": false, "type": "", "deprecated": false, @@ -24113,7 +24107,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 473, + "weight": 472, "cookies": false, "type": "", "deprecated": false, @@ -24173,7 +24167,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 471, + "weight": 470, "cookies": false, "type": "", "deprecated": false, @@ -24264,7 +24258,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 472, + "weight": 471, "cookies": false, "type": "", "deprecated": false, @@ -24332,7 +24326,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 474, + "weight": 473, "cookies": false, "type": "", "deprecated": false, @@ -24425,7 +24419,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 475, + "weight": 474, "cookies": false, "type": "", "deprecated": false, @@ -26768,7 +26762,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 488, + "weight": 487, "cookies": false, "type": "", "deprecated": false, @@ -26849,7 +26843,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 486, + "weight": 485, "cookies": false, "type": "", "deprecated": false, @@ -26934,7 +26928,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 487, + "weight": 486, "cookies": false, "type": "", "deprecated": false, @@ -26995,7 +26989,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 489, + "weight": 488, "cookies": false, "type": "", "deprecated": false, @@ -27067,7 +27061,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 490, + "weight": 489, "cookies": false, "type": "", "deprecated": false, From 5a44f6bcea1e3411a4540a3ce94bc7b59cee02e2 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 18 Jul 2025 12:03:46 +0530 Subject: [PATCH 232/362] update: maintain consistency for permissions with a null check. --- .../Databases/Http/Databases/Collections/Documents/Upsert.php | 4 ++-- .../Modules/Databases/Http/Databases/Tables/Rows/Upsert.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index 0bf01d8573..28c57cea15 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -74,7 +74,7 @@ class Upsert extends Action ->param('collectionId', '', new UID(), 'Collection ID.') ->param('documentId', '', new CustomId(), 'Document ID.') ->param('data', [], new JSON(), 'Document data as JSON object. Include all required attributes of the document to be created or updated.') - ->param('permissions', [], new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->inject('requestTimestamp') ->inject('response') ->inject('dbForProject') @@ -133,7 +133,7 @@ class Upsert extends Action } $data['$id'] = $documentId; - $data['$permissions'] = $permissions; + $data['$permissions'] = \is_null($permissions) ? [] : $permissions; $newDocument = new Document($data); $operations = 0; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php index 25794ec4a3..42a79e8a72 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php @@ -61,7 +61,7 @@ class Upsert extends DocumentUpsert ->param('tableId', '', new UID(), 'Table ID.') ->param('rowId', '', new UID(), 'Row ID.') ->param('data', [], new JSON(), 'Row data as JSON object. Include all required columns of the row to be created or updated.', true) - ->param('permissions', [], new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->inject('requestTimestamp') ->inject('response') ->inject('dbForProject') From d6ec18bda750a185dcb7ed2f66b785a2277cf660 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 18 Jul 2025 12:14:02 +0530 Subject: [PATCH 233/362] update: maintain tests consistency. --- .../Databases/Tables/DatabasesBase.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Tables/DatabasesBase.php index 29f92cc58a..de54f3ce04 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesBase.php @@ -1984,6 +1984,36 @@ trait DatabasesBase ]); $this->assertEquals(2, $rows['body']['total']); + + // test without passing permissions + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2000 + ] + ]); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $row['body']['title']); + + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $row['headers']['status-code']); + + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(204, $deleteResponse['headers']['status-code']); } /** From 5b60eb8b947f6e26f09fd7495409af85973c4699 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 18 Jul 2025 12:44:51 +0530 Subject: [PATCH 234/362] update: code quality. Co-authored-by: Jake Barnby <jakeb994@gmail.com> --- .../Databases/Http/Databases/Collections/Documents/Upsert.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index 28c57cea15..09e59c2ead 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -133,7 +133,7 @@ class Upsert extends Action } $data['$id'] = $documentId; - $data['$permissions'] = \is_null($permissions) ? [] : $permissions; + $data['$permissions'] = $permissions ?? []; $newDocument = new Document($data); $operations = 0; From 97a4e5f3559e7258ea1cb8335f2fd0109b6ada7d Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Fri, 18 Jul 2025 21:38:35 +1200 Subject: [PATCH 235/362] Bump version --- README-CN.md | 6 +++--- README.md | 6 +++--- app/init/constants.php | 2 +- src/Appwrite/Migration/Migration.php | 1 + src/Appwrite/Platform/Tasks/Migrate.php | 4 ++-- src/Appwrite/Platform/Tasks/SDKs.php | 23 ++++++++++++++++++++++- 6 files changed, 32 insertions(+), 10 deletions(-) diff --git a/README-CN.md b/README-CN.md index a9a6b3c867..c10439caaa 100644 --- a/README-CN.md +++ b/README-CN.md @@ -72,7 +72,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.7.4 + appwrite/appwrite:1.8.0 ``` ### Windows @@ -84,7 +84,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.7.4 + appwrite/appwrite:1.8.0 ``` #### PowerShell @@ -94,7 +94,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.7.4 + appwrite/appwrite:1.8.0 ``` 运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。 diff --git a/README.md b/README.md index 88d3fe89df..ee8da58d2d 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.7.4 + appwrite/appwrite:1.8.0 ``` ### Windows @@ -90,7 +90,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.7.4 + appwrite/appwrite:1.8.0 ``` #### PowerShell @@ -100,7 +100,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.7.4 + appwrite/appwrite:1.8.0 ``` Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation. diff --git a/app/init/constants.php b/app/init/constants.php index ebf79086a7..c204f039d1 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -38,7 +38,7 @@ const APP_RESOURCE_TOKEN_ACCESS = 24 * 60 * 60; // 24 hours const APP_FILE_ACCESS = 24 * 60 * 60; // 24 hours const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours const APP_CACHE_BUSTER = 4320; -const APP_VERSION_STABLE = '1.7.4'; +const APP_VERSION_STABLE = '1.8.0'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; const APP_DATABASE_ATTRIBUTE_ENUM = 'enum'; const APP_DATABASE_ATTRIBUTE_IP = 'ip'; diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 9071e0cabe..d47490e604 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -120,6 +120,7 @@ abstract class Migration * @param Document $project * @param Database $dbForProject * @param Database $dbForPlatform + * @param callable|null $getProjectDB * @return self */ public function setProject( diff --git a/src/Appwrite/Platform/Tasks/Migrate.php b/src/Appwrite/Platform/Tasks/Migrate.php index 5407c772ab..3e35c1c1fa 100644 --- a/src/Appwrite/Platform/Tasks/Migrate.php +++ b/src/Appwrite/Platform/Tasks/Migrate.php @@ -51,12 +51,12 @@ class Migrate extends Action Authorization::disable(); if (!\array_key_exists($version, Migration::$versions)) { - Console::error("Version {$version} not found."); + Console::error("No migration found for version $version."); Console::exit(1); return; } - Console::success('Starting Data Migration to version ' . $version); + Console::success('Starting data migration to version ' . $version); $class = 'Appwrite\\Migration\\Version\\' . Migration::$versions[$version]; diff --git a/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index ea73af541c..19eda3e81f 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -64,7 +64,28 @@ class SDKs extends Action $message ??= Console::confirm('Please enter your commit message:'); } - if (!\in_array($version, ['0.6.x', '0.7.x', '0.8.x', '0.9.x', '0.10.x', '0.11.x', '0.12.x', '0.13.x', '0.14.x', '0.15.x', '1.0.x', '1.1.x', '1.2.x', '1.3.x', '1.4.x', '1.5.x', '1.6.x', '1.7.x', '1.8.x', 'latest'])) { + if (!\in_array($version, [ + '0.6.x', + '0.7.x', + '0.8.x', + '0.9.x', + '0.10.x', + '0.11.x', + '0.12.x', + '0.13.x', + '0.14.x', + '0.15.x', + '1.0.x', + '1.1.x', + '1.2.x', + '1.3.x', + '1.4.x', + '1.5.x', + '1.6.x', + '1.7.x', + '1.8.x', + 'latest' + ])) { throw new \Exception('Unknown version given'); } From 5243af937f987cf0e281e61952297c11767592e1 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 20 Jul 2025 14:40:30 +0530 Subject: [PATCH 236/362] fix: the default templates. --- .../locale/templates/email-smtp-test.tpl | 2 +- .../locale/templates/email-webhook-failed.tpl | 2 +- app/controllers/api/projects.php | 53 ++++++++++++++++--- src/Appwrite/Event/Mail.php | 4 +- .../Platform/Workers/Certificates.php | 2 +- src/Appwrite/Template/Template.php | 4 +- 6 files changed, 52 insertions(+), 15 deletions(-) diff --git a/app/config/locale/templates/email-smtp-test.tpl b/app/config/locale/templates/email-smtp-test.tpl index e40b7ba5c8..1b1eccdb7c 100644 --- a/app/config/locale/templates/email-smtp-test.tpl +++ b/app/config/locale/templates/email-smtp-test.tpl @@ -9,4 +9,4 @@ <p>If you have trouble with the sender's image, ensure it is set in the <a href="https://gravatar.com/">Gravatar database</a>.</p> <p style="margin-block-end: 0;">Best regards,</p> -<p style="margin-block-start: 0;">Appwrtite team</p> \ No newline at end of file +<p style="margin-block-start: 0;">Appwrite team</p> \ No newline at end of file diff --git a/app/config/locale/templates/email-webhook-failed.tpl b/app/config/locale/templates/email-webhook-failed.tpl index 921af9ee29..a176de5754 100644 --- a/app/config/locale/templates/email-webhook-failed.tpl +++ b/app/config/locale/templates/email-webhook-failed.tpl @@ -14,7 +14,7 @@ <table border="0" cellspacing="0" cellpadding="0" style="padding-top: 10px; padding-bottom: 10px; margin-top: 32px"> <tr> <td style="border-radius: 8px; display: block; width: 100%;"> - <a class="mobile-full-width" rel="noopener" target="_blank" href="{{host}}{{path}}" style="font-size: 14px; font-family: Inter; color: #ffffff; text-decoration: none; background-color: #FD366E; border-radius: 8px; padding: 9px 14px; border: 1px solid #FD366E; display: inline-block; text-align:center; box-sizing: border-box;">Webhook settings</a> + <a class="mobile-full-width" rel="noopener" target="_blank" href="{{host}}{{path}}" style="font-size: 14px; font-family: Inter; color: #ffffff; text-decoration: none; background-color: #2D2D31; border-radius: 8px; padding: 9px 14px; border: 1px solid #414146; display: inline-block; text-align:center; box-sizing: border-box;">Webhook settings</a> </td> </tr> </table> \ No newline at end of file diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 34ed85a418..6b701ded50 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -2176,7 +2176,7 @@ App::post('/v1/projects/:projectId/smtp/tests') ->setSmtpSenderName($senderName) ->setRecipient($email) ->setName('') - ->setbodyTemplate(__DIR__ . '/../../config/locale/templates/email-base-styled.tpl') + ->setBodyTemplate(__DIR__ . '/../../config/locale/templates/email-base-styled.tpl') ->setBody($template->render()) ->setVariables([]) ->setSubject($subject) @@ -2269,16 +2269,53 @@ App::get('/v1/projects/:projectId/templates/email/:type/:locale') $localeObj = new Locale($locale); if (is_null($template)) { - $message = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-inner-base.tpl'); + /** + * different templates, different placeholders. + */ + $templateConfigs = [ + 'magicSession' => [ + 'file' => 'email-magic-url.tpl', + 'placeholders' => ['optionButton', 'buttonText', 'optionUrl', 'clientInfo', 'securityPhrase'] + ], + 'mfaChallenge' => [ + 'file' => 'email-mfa-challenge.tpl', + 'placeholders' => ['description', 'clientInfo'] + ], + 'otpSession' => [ + 'file' => 'email-otp.tpl', + 'placeholders' => ['description', 'clientInfo', 'securityPhrase'] + ], + 'sessionAlert' => [ + 'file' => 'email-inner-base.tpl', + 'placeholders' => ['body', 'listDevice', 'listIpAddress', 'listCountry', 'footer'] + ], + ]; + + // fallback to the base template. + $config = $templateConfigs[$type] ?? [ + 'file' => 'email-inner-base.tpl', + 'placeholders' => ['buttonText', 'body', 'footer'] + ]; + + $templateString = file_get_contents(__DIR__ . '/../../config/locale/templates/' . $config['file']); + + // We use `fromString` due to the replace above + $message = Template::fromString($templateString); + + // Set type-specific parameters + foreach ($config['placeholders'] as $param) { + $escapeHtml = !in_array($param, ['clientInfo', 'body', 'footer', 'description']); + $message->setParam("{{{$param}}}", $localeObj->getText("emails.{$type}.{$param}"), escapeHtml: $escapeHtml); + } + $message + // common placeholders on all the templates ->setParam('{{hello}}', $localeObj->getText("emails.{$type}.hello")) - ->setParam('{{footer}}', $localeObj->getText("emails.{$type}.footer")) - ->setParam('{{body}}', $localeObj->getText('emails.' . $type . '.body'), escapeHtml: false) ->setParam('{{thanks}}', $localeObj->getText("emails.{$type}.thanks")) - ->setParam('{{buttonText}}', $localeObj->getText("emails.{$type}.buttonText")) - ->setParam('{{signature}}', $localeObj->getText("emails.{$type}.signature")) - ->setParam('{{direction}}', $localeObj->getText('settings.direction')); - $message = $message->render(); + ->setParam('{{signature}}', $localeObj->getText("emails.{$type}.signature")); + + // `useContent: false` will strip new lines! + $message = $message->render(useContent: true); $template = [ 'message' => $message, diff --git a/src/Appwrite/Event/Mail.php b/src/Appwrite/Event/Mail.php index 87312182ea..1d0ae2a471 100644 --- a/src/Appwrite/Event/Mail.php +++ b/src/Appwrite/Event/Mail.php @@ -122,7 +122,7 @@ class Mail extends Event * @param string $bodyTemplate * @return self */ - public function setbodyTemplate(string $bodyTemplate): self + public function setBodyTemplate(string $bodyTemplate): self { $this->bodyTemplate = $bodyTemplate; @@ -134,7 +134,7 @@ class Mail extends Event * * @return string */ - public function getbodyTemplate(): string + public function getBodyTemplate(): string { return $this->bodyTemplate; } diff --git a/src/Appwrite/Platform/Workers/Certificates.php b/src/Appwrite/Platform/Workers/Certificates.php index a9104e0017..381d4f4ecd 100644 --- a/src/Appwrite/Platform/Workers/Certificates.php +++ b/src/Appwrite/Platform/Workers/Certificates.php @@ -387,7 +387,7 @@ class Certificates extends Action ->setSubject($subject) ->setBody($body) ->setName('Appwrite Administrator') - ->setbodyTemplate(__DIR__ . '/../../../../app/config/locale/templates/email-base-styled.tpl') + ->setBodyTemplate(__DIR__ . '/../../../../app/config/locale/templates/email-base-styled.tpl') ->setVariables($emailVariables) ->setRecipient(System::getEnv('_APP_EMAIL_CERTIFICATES', System::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS'))) ->trigger(); diff --git a/src/Appwrite/Template/Template.php b/src/Appwrite/Template/Template.php index c01d54389b..e0568c98e9 100644 --- a/src/Appwrite/Template/Template.php +++ b/src/Appwrite/Template/Template.php @@ -63,7 +63,7 @@ class Template extends View * * @throws Exception */ - public function render($minify = true): string + public function render($minify = true, $useContent = false): string { if ($this->rendered) { // Don't render any template return ''; @@ -72,7 +72,7 @@ class Template extends View if (\is_readable($this->path)) { $template = \file_get_contents($this->path); // Include template file } elseif (!empty($this->content)) { - $template = $this->print($this->content, self::FILTER_NL2P); + $template = !$useContent ? $this->print($this->content, self::FILTER_NL2P) : $this->content; } else { throw new Exception('"' . $this->path . '" template is not readable or not found'); } From 0926250f17274e84044b64e54e58649bb4921430 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 20 Jul 2025 16:39:08 +0530 Subject: [PATCH 237/362] fix: session alerts template. --- app/controllers/api/projects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 6b701ded50..7829c44cff 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -2286,7 +2286,7 @@ App::get('/v1/projects/:projectId/templates/email/:type/:locale') 'placeholders' => ['description', 'clientInfo', 'securityPhrase'] ], 'sessionAlert' => [ - 'file' => 'email-inner-base.tpl', + 'file' => 'email-session-alert.tpl', 'placeholders' => ['body', 'listDevice', 'listIpAddress', 'listCountry', 'footer'] ], ]; From 373ceecebbf3a82f5c951be52e48ba96511c6676 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 20 Jul 2025 16:40:29 +0530 Subject: [PATCH 238/362] fix: add a default client name for session alerts --- app/controllers/api/account.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index b8860b1a17..ec951bb747 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -132,6 +132,12 @@ function sendSessionAlert(Locale $locale, Document $user, Document $project, Doc ->setSmtpSenderName($senderName); } + // making sure that the session alerts always have a client name! + if (isset($session['clientName']) && empty($session['clientName'])) { + // fallback to the user agent and then unknown! + $session['clientName'] = !empty($session['userAgent']) ? $session['userAgent'] : 'UNKNOWN'; + } + $emailVariables = [ 'direction' => $locale->getText('settings.direction'), 'date' => (new \DateTime())->format('F j'), From e7315e23c734f39b6291a6df2f4a24db3c7eaeb1 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 20 Jul 2025 17:28:44 +0530 Subject: [PATCH 239/362] fix: address comment. --- app/controllers/api/account.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index ec951bb747..f27b5ad7e8 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -132,10 +132,14 @@ function sendSessionAlert(Locale $locale, Document $user, Document $project, Doc ->setSmtpSenderName($senderName); } - // making sure that the session alerts always have a client name! - if (isset($session['clientName']) && empty($session['clientName'])) { + // session alerts should always have a client name! + $clientName = $session->getAttribute('clientName'); + if (empty($clientName)) { // fallback to the user agent and then unknown! - $session['clientName'] = !empty($session['userAgent']) ? $session['userAgent'] : 'UNKNOWN'; + $userAgent = $session->getAttribute('userAgent'); + $clientName = !empty($userAgent) ? $userAgent : 'UNKNOWN'; + + $session->setAttribute('clientName', $clientName); } $emailVariables = [ From 25074ca2b182805279d053e1cbee5c830b578c96 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Mon, 21 Jul 2025 18:53:54 +1200 Subject: [PATCH 240/362] Update console --- app/views/install/compose.phtml | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 89facfe0f1..c526687d8f 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -177,7 +177,7 @@ $image = $this->getParam('image', ''); appwrite-console: <<: *x-logging container_name: appwrite-console - image: <?php echo $organization; ?>/console:6.0.13 + image: <?php echo $organization; ?>/console:6.2.0 restart: unless-stopped networks: - appwrite diff --git a/docker-compose.yml b/docker-compose.yml index 58b78fcd8e..ad135c708b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -214,7 +214,7 @@ services: appwrite-console: <<: *x-logging container_name: appwrite-console - image: appwrite/console:6.1.12 + image: appwrite/console:6.2.0 restart: unless-stopped networks: - appwrite From f0f7381b973923d2c3e358507ea3da4a9124cb97 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Mon, 21 Jul 2025 19:13:34 +1200 Subject: [PATCH 241/362] Update libs --- composer.json | 4 +-- composer.lock | 26 +++++++++---------- .../Databases/Legacy/DatabasesBase.php | 8 ++++-- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index 2065139bb9..1ebd6716e3 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.71.*", + "utopia-php/database": "0.72.*", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.12.*", + "utopia-php/migration": "0.13.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index 73baf27824..f21c4566ea 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": "25ac1acb960988af5c10239c3bde258b", + "content-hash": "040a8234ecf1038a7e6dc16aa2dda084", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.71.10", + "version": "0.72.0", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "83278d663f9c63c25a11d9e71c7922da7ec48636" + "reference": "276fffbf889a455fefd5f3dcda89f249a92fd5e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/83278d663f9c63c25a11d9e71c7922da7ec48636", - "reference": "83278d663f9c63c25a11d9e71c7922da7ec48636", + "url": "https://api.github.com/repos/utopia-php/database/zipball/276fffbf889a455fefd5f3dcda89f249a92fd5e2", + "reference": "276fffbf889a455fefd5f3dcda89f249a92fd5e2", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.71.10" + "source": "https://github.com/utopia-php/database/tree/0.72.0" }, - "time": "2025-07-18T00:05:55+00:00" + "time": "2025-07-21T03:45:49+00:00" }, { "name": "utopia-php/detector", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.12.0", + "version": "0.13.0", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "973a4daa283f711a104e9bb7cf5a79dec2988df0" + "reference": "626aa1f1e9e5bd494dc14d8639eb2fd3c29673ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/973a4daa283f711a104e9bb7cf5a79dec2988df0", - "reference": "973a4daa283f711a104e9bb7cf5a79dec2988df0", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/626aa1f1e9e5bd494dc14d8639eb2fd3c29673ab", + "reference": "626aa1f1e9e5bd494dc14d8639eb2fd3c29673ab", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.12.0" + "source": "https://github.com/utopia-php/migration/tree/0.13.0" }, - "time": "2025-07-17T12:20:11+00:00" + "time": "2025-07-21T07:10:25+00:00" }, { "name": "utopia-php/orchestration", diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index a2089e3dc0..248bc3b12d 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -1384,7 +1384,9 @@ trait DatabasesBase 'attributes' => ['integers'], // array attribute 'orders' => ['DESC'], // Check order is removed in API ]); - $this->assertEquals(202, $index1['headers']['status-code']); + + // Array attributes can not be indexed due to MySQL bug + $this->assertEquals(400, $index1['headers']['status-code']); $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1395,7 +1397,9 @@ trait DatabasesBase 'type' => 'key', 'attributes' => ['integers'], // array attribute ]); - $this->assertEquals(202, $index2['headers']['status-code']); + + // Array attributes can not be indexed due to MySQL bug + $this->assertEquals(400, $index2['headers']['status-code']); /** * Create Indexes by worker From 1aea95c6a9518631d7dac7e923887aec3e73b8e0 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Mon, 21 Jul 2025 21:09:07 +1200 Subject: [PATCH 242/362] Revert DB --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 1ebd6716e3..d39cb697ae 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.72.*", + "utopia-php/database": "0.71.*", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index f21c4566ea..1ff4873f4d 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": "040a8234ecf1038a7e6dc16aa2dda084", + "content-hash": "ab1e70292d43534acfbab067f0341181", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.72.0", + "version": "0.71.10", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "276fffbf889a455fefd5f3dcda89f249a92fd5e2" + "reference": "83278d663f9c63c25a11d9e71c7922da7ec48636" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/276fffbf889a455fefd5f3dcda89f249a92fd5e2", - "reference": "276fffbf889a455fefd5f3dcda89f249a92fd5e2", + "url": "https://api.github.com/repos/utopia-php/database/zipball/83278d663f9c63c25a11d9e71c7922da7ec48636", + "reference": "83278d663f9c63c25a11d9e71c7922da7ec48636", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.72.0" + "source": "https://github.com/utopia-php/database/tree/0.71.10" }, - "time": "2025-07-21T03:45:49+00:00" + "time": "2025-07-18T00:05:55+00:00" }, { "name": "utopia-php/detector", From 75bd0dc55ba9354e9af8ff5689c42f9ce8ea2d71 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Mon, 21 Jul 2025 21:26:08 +1200 Subject: [PATCH 243/362] Update tables test --- tests/e2e/Services/Databases/Tables/DatabasesBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Tables/DatabasesBase.php index de54f3ce04..7804fd0ec2 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesBase.php @@ -1384,7 +1384,7 @@ trait DatabasesBase 'columns' => ['integers'], // array attribute 'orders' => ['DESC'], // Check order is removed in API ]); - $this->assertEquals(202, $index1['headers']['status-code']); + $this->assertEquals(400, $index1['headers']['status-code']); $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1395,7 +1395,7 @@ trait DatabasesBase 'type' => 'key', 'columns' => ['integers'], // array attribute ]); - $this->assertEquals(202, $index2['headers']['status-code']); + $this->assertEquals(400, $index2['headers']['status-code']); /** * Create Indexes by worker From 58aaee1c4ac6e54230c1dd6fde722fc1336fcf06 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Mon, 21 Jul 2025 22:56:19 +1200 Subject: [PATCH 244/362] Downgrade migrations --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index d39cb697ae..2065139bb9 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.13.*", + "utopia-php/migration": "0.12.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index 1ff4873f4d..73baf27824 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": "ab1e70292d43534acfbab067f0341181", + "content-hash": "25ac1acb960988af5c10239c3bde258b", "packages": [ { "name": "adhocore/jwt", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.13.0", + "version": "0.12.0", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "626aa1f1e9e5bd494dc14d8639eb2fd3c29673ab" + "reference": "973a4daa283f711a104e9bb7cf5a79dec2988df0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/626aa1f1e9e5bd494dc14d8639eb2fd3c29673ab", - "reference": "626aa1f1e9e5bd494dc14d8639eb2fd3c29673ab", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/973a4daa283f711a104e9bb7cf5a79dec2988df0", + "reference": "973a4daa283f711a104e9bb7cf5a79dec2988df0", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.13.0" + "source": "https://github.com/utopia-php/migration/tree/0.12.0" }, - "time": "2025-07-21T07:10:25+00:00" + "time": "2025-07-17T12:20:11+00:00" }, { "name": "utopia-php/orchestration", From ffb3a522b005aeeecb50e13ef1b30e0bcf05fbfd Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 21 Jul 2025 14:06:39 +0300 Subject: [PATCH 245/362] Check tests --- composer.json | 2 +- composer.lock | 16 ++++++++-------- .../Databases/Collections/Indexes/Create.php | 1 + .../Services/Databases/Legacy/DatabasesBase.php | 6 +++--- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index d39cb697ae..1ebd6716e3 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.71.*", + "utopia-php/database": "0.72.*", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index 1ff4873f4d..1ab388d5a8 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": "ab1e70292d43534acfbab067f0341181", + "content-hash": "040a8234ecf1038a7e6dc16aa2dda084", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.71.10", + "version": "0.72.0", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "83278d663f9c63c25a11d9e71c7922da7ec48636" + "reference": "276fffbf889a455fefd5f3dcda89f249a92fd5e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/83278d663f9c63c25a11d9e71c7922da7ec48636", - "reference": "83278d663f9c63c25a11d9e71c7922da7ec48636", + "url": "https://api.github.com/repos/utopia-php/database/zipball/276fffbf889a455fefd5f3dcda89f249a92fd5e2", + "reference": "276fffbf889a455fefd5f3dcda89f249a92fd5e2", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.71.10" + "source": "https://github.com/utopia-php/database/tree/0.72.0" }, - "time": "2025-07-18T00:05:55+00:00" + "time": "2025-07-21T03:45:49+00:00" }, { "name": "utopia-php/detector", @@ -8239,7 +8239,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { 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 9003fbb4a9..7247d246ef 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 @@ -187,6 +187,7 @@ class Create extends Action $collection->getAttribute('attributes'), $dbForProject->getAdapter()->getMaxIndexLength(), $dbForProject->getAdapter()->getInternalIndexesKeys(), + $dbForProject->getAdapter()->getSupportForIndexArray() ); if (!$validator->isValid($index)) { diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 248bc3b12d..87116b5c60 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -438,7 +438,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $attribute['headers']['status-code']); $this->assertEquals($attribute['body']['size'], 100); - +var_dump($attribute); sleep(1); $index = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/collections/'.$collection['body']['$id'].'/indexes', array_merge([ @@ -453,7 +453,7 @@ trait DatabasesBase $this->assertEquals(202, $index['headers']['status-code']); sleep(1); - +var_dump($index); /** * Update attribute size to exceed Index maximum length */ @@ -466,7 +466,7 @@ trait DatabasesBase 'required' => true, 'default' => null, ]); - +var_dump($attribute); $this->assertEquals(400, $attribute['headers']['status-code']); $this->assertStringContainsString('Index length is longer than the maximum: 76', $attribute['body']['message']); } From 1ff1b5529882f4e191034a71d3535a0c3e4a642d Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 21 Jul 2025 14:12:10 +0300 Subject: [PATCH 246/362] Check tests --- tests/e2e/Services/Databases/Legacy/DatabasesBase.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 87116b5c60..27b23a2eb4 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -454,6 +454,8 @@ var_dump($attribute); sleep(1); var_dump($index); + $this->assertEquals('shmuel', 'dsdsd'); + /** * Update attribute size to exceed Index maximum length */ From 59fce99ef6e69c4a756a471ff21cbde3f9aebaf9 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 21 Jul 2025 19:15:29 +0530 Subject: [PATCH 247/362] bump: response format for preview sdk. --- src/Appwrite/Platform/Tasks/SDKs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index 9ec968a9c0..a4346ca83d 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -271,7 +271,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ->setTwitter(APP_SOCIAL_TWITTER_HANDLE) ->setDiscord(APP_SOCIAL_DISCORD_CHANNEL, APP_SOCIAL_DISCORD) ->setDefaultHeaders([ - 'X-Appwrite-Response-Format' => '1.7.0', + 'X-Appwrite-Response-Format' => '1.8.0', ]) ->setExclude($language['exclude'] ?? []); From b2cd1413ce0a23039bacdc5579709d8031870684 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 21 Jul 2025 17:45:34 +0300 Subject: [PATCH 248/362] Fallback index length 0 --- composer.json | 2 +- composer.lock | 27 ++++++++++++------- .../Databases/Collections/Indexes/Create.php | 4 ++- .../Databases/Legacy/DatabasesBase.php | 2 +- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 1ebd6716e3..929a0acfaf 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.72.*", + "utopia-php/database": "dev-fix-index-length as 0.72.10", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index 1ab388d5a8..8ebb9c7539 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": "040a8234ecf1038a7e6dc16aa2dda084", + "content-hash": "b855431b456629b5ecebe208bdd4b403", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.72.0", + "version": "dev-fix-index-length", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "276fffbf889a455fefd5f3dcda89f249a92fd5e2" + "reference": "b743f4a1408efdafe664b381c2b29763d4363fde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/276fffbf889a455fefd5f3dcda89f249a92fd5e2", - "reference": "276fffbf889a455fefd5f3dcda89f249a92fd5e2", + "url": "https://api.github.com/repos/utopia-php/database/zipball/b743f4a1408efdafe664b381c2b29763d4363fde", + "reference": "b743f4a1408efdafe664b381c2b29763d4363fde", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.72.0" + "source": "https://github.com/utopia-php/database/tree/fix-index-length" }, - "time": "2025-07-21T03:45:49+00:00" + "time": "2025-07-21T12:57:09+00:00" }, { "name": "utopia-php/detector", @@ -8237,9 +8237,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-fix-index-length", + "alias": "0.72.10", + "alias_normalized": "0.72.10.0" + } + ], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "utopia-php/database": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { 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 7247d246ef..199ace5180 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 @@ -161,7 +161,9 @@ class Create extends Action throw new Exception($this->getParentNotAvailableException(), "$contextType not available: " . $oldAttributes[$attributeIndex]['key']); } - $lengths[$i] ??= null; + if (empty($lengths[$i])) { + $lengths[$i] = null; + } if ($attributeArray === true) { $lengths[$i] = Database::ARRAY_INDEX_LENGTH; diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 27b23a2eb4..d7aaada24f 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -454,7 +454,7 @@ var_dump($attribute); sleep(1); var_dump($index); - $this->assertEquals('shmuel', 'dsdsd'); + //$this->assertEquals('shmuel', 'dsdsd'); /** * Update attribute size to exceed Index maximum length From 51f518ae03af18460334872250693286d7616581 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 21 Jul 2025 18:11:13 +0300 Subject: [PATCH 249/362] Remove var_dump --- tests/e2e/Services/Databases/Legacy/DatabasesBase.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index d7aaada24f..644f6a130c 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -438,7 +438,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $attribute['headers']['status-code']); $this->assertEquals($attribute['body']['size'], 100); -var_dump($attribute); + sleep(1); $index = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/collections/'.$collection['body']['$id'].'/indexes', array_merge([ @@ -453,8 +453,6 @@ var_dump($attribute); $this->assertEquals(202, $index['headers']['status-code']); sleep(1); -var_dump($index); - //$this->assertEquals('shmuel', 'dsdsd'); /** * Update attribute size to exceed Index maximum length From 64d1d78d84e88b55ccc32af25fda1b1919a9385a Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 21 Jul 2025 18:15:48 +0300 Subject: [PATCH 250/362] lock --- composer.lock | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/composer.lock b/composer.lock index 73baf27824..94d7921139 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": "25ac1acb960988af5c10239c3bde258b", + "content-hash": "9a018b6bf824147378fb0b5b51ed8b58", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.71.10", + "version": "dev-fix-index-length", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "83278d663f9c63c25a11d9e71c7922da7ec48636" + "reference": "b743f4a1408efdafe664b381c2b29763d4363fde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/83278d663f9c63c25a11d9e71c7922da7ec48636", - "reference": "83278d663f9c63c25a11d9e71c7922da7ec48636", + "url": "https://api.github.com/repos/utopia-php/database/zipball/b743f4a1408efdafe664b381c2b29763d4363fde", + "reference": "b743f4a1408efdafe664b381c2b29763d4363fde", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.71.10" + "source": "https://github.com/utopia-php/database/tree/fix-index-length" }, - "time": "2025-07-18T00:05:55+00:00" + "time": "2025-07-21T12:57:09+00:00" }, { "name": "utopia-php/detector", @@ -8237,9 +8237,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-fix-index-length", + "alias": "0.72.10", + "alias_normalized": "0.72.10.0" + } + ], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/database": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From e82003873a981a660b6b396cae09464dd62e73a6 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 21 Jul 2025 18:17:12 +0300 Subject: [PATCH 251/362] formatting --- tests/e2e/Services/Databases/Legacy/DatabasesBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 644f6a130c..77b6255bed 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -466,7 +466,7 @@ trait DatabasesBase 'required' => true, 'default' => null, ]); -var_dump($attribute); + var_dump($attribute); $this->assertEquals(400, $attribute['headers']['status-code']); $this->assertStringContainsString('Index length is longer than the maximum: 76', $attribute['body']['message']); } From ee5ce895f79cd88d9b1ecce8433cdd7783c3ccfb Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 21 Jul 2025 18:26:53 +0300 Subject: [PATCH 252/362] Remove var_dump --- tests/e2e/Services/Databases/Legacy/DatabasesBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 77b6255bed..248bc3b12d 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -466,7 +466,7 @@ trait DatabasesBase 'required' => true, 'default' => null, ]); - var_dump($attribute); + $this->assertEquals(400, $attribute['headers']['status-code']); $this->assertStringContainsString('Index length is longer than the maximum: 76', $attribute['body']['message']); } From 9a6032c80485a37f7a82471f1e8bb3fbb5f20c95 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 12:11:03 +1200 Subject: [PATCH 253/362] Update libs --- composer.json | 4 +- composer.lock | 38 +++++++++---------- .../Databases/Collections/Indexes/Create.php | 1 + 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/composer.json b/composer.json index 2065139bb9..1ebd6716e3 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.71.*", + "utopia-php/database": "0.72.*", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.12.*", + "utopia-php/migration": "0.13.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index 73baf27824..102f61937c 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": "25ac1acb960988af5c10239c3bde258b", + "content-hash": "040a8234ecf1038a7e6dc16aa2dda084", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.71.10", + "version": "0.72.0", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "83278d663f9c63c25a11d9e71c7922da7ec48636" + "reference": "276fffbf889a455fefd5f3dcda89f249a92fd5e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/83278d663f9c63c25a11d9e71c7922da7ec48636", - "reference": "83278d663f9c63c25a11d9e71c7922da7ec48636", + "url": "https://api.github.com/repos/utopia-php/database/zipball/276fffbf889a455fefd5f3dcda89f249a92fd5e2", + "reference": "276fffbf889a455fefd5f3dcda89f249a92fd5e2", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.71.10" + "source": "https://github.com/utopia-php/database/tree/0.72.0" }, - "time": "2025-07-18T00:05:55+00:00" + "time": "2025-07-21T03:45:49+00:00" }, { "name": "utopia-php/detector", @@ -3942,16 +3942,16 @@ }, { "name": "utopia-php/messaging", - "version": "0.18.1", + "version": "0.18.2", "source": { "type": "git", "url": "https://github.com/utopia-php/messaging.git", - "reference": "5d1245207a61d7ca065daddad7ac5f1d5640152f" + "reference": "0d364edacf4d4867964c7e17f653031dd39394bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/5d1245207a61d7ca065daddad7ac5f1d5640152f", - "reference": "5d1245207a61d7ca065daddad7ac5f1d5640152f", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/0d364edacf4d4867964c7e17f653031dd39394bf", + "reference": "0d364edacf4d4867964c7e17f653031dd39394bf", "shasum": "" }, "require": { @@ -3987,22 +3987,22 @@ ], "support": { "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/0.18.1" + "source": "https://github.com/utopia-php/messaging/tree/0.18.2" }, - "time": "2025-06-26T18:26:07+00:00" + "time": "2025-07-21T18:27:03+00:00" }, { "name": "utopia-php/migration", - "version": "0.12.0", + "version": "0.13.1", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "973a4daa283f711a104e9bb7cf5a79dec2988df0" + "reference": "b3c51e39f35efeb15431c6bc8f5bc6cf78fac9cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/973a4daa283f711a104e9bb7cf5a79dec2988df0", - "reference": "973a4daa283f711a104e9bb7cf5a79dec2988df0", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/b3c51e39f35efeb15431c6bc8f5bc6cf78fac9cc", + "reference": "b3c51e39f35efeb15431c6bc8f5bc6cf78fac9cc", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.12.0" + "source": "https://github.com/utopia-php/migration/tree/0.13.1" }, - "time": "2025-07-17T12:20:11+00:00" + "time": "2025-07-21T23:22:05+00:00" }, { "name": "utopia-php/orchestration", 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 9003fbb4a9..7247d246ef 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 @@ -187,6 +187,7 @@ class Create extends Action $collection->getAttribute('attributes'), $dbForProject->getAdapter()->getMaxIndexLength(), $dbForProject->getAdapter()->getInternalIndexesKeys(), + $dbForProject->getAdapter()->getSupportForIndexArray() ); if (!$validator->isValid($index)) { From f33ed64f6aac045b83a33b6698fa4233ca957615 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 14:14:08 +1200 Subject: [PATCH 254/362] Fix index tests --- tests/e2e/Services/Databases/Legacy/DatabasesBase.php | 8 ++++---- tests/e2e/Services/Databases/Tables/DatabasesBase.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 248bc3b12d..c44be93b56 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -1344,7 +1344,8 @@ trait DatabasesBase 'attributes' => ['actors'], ]); - $this->assertEquals(202, $actorsArray['headers']['status-code']); + // Indexes on array attributes are disabled due to MySQL bug + $this->assertEquals(400, $actorsArray['headers']['status-code']); $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1357,9 +1358,8 @@ trait DatabasesBase 'orders' => ['DESC', 'DESC'], ]); - $this->assertEquals(202, $twoLevelsArray['headers']['status-code']); - $this->assertEquals('DESC', $twoLevelsArray['body']['orders'][0]); - $this->assertEquals(null, $twoLevelsArray['body']['orders'][1]); // Overwrite by API (array) + // Indexes on array attributes are disabled due to MySQL bug + $this->assertEquals(400, $twoLevelsArray['headers']['status-code']); $unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Tables/DatabasesBase.php index 7804fd0ec2..19f5cc0d8c 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesBase.php @@ -1344,7 +1344,8 @@ trait DatabasesBase 'columns' => ['actors'], ]); - $this->assertEquals(202, $actorsArray['headers']['status-code']); + // Indexes on array attributes are disabled due to MySQL bug + $this->assertEquals(400, $actorsArray['headers']['status-code']); $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', @@ -1357,9 +1358,8 @@ trait DatabasesBase 'orders' => ['DESC', 'DESC'], ]); - $this->assertEquals(202, $twoLevelsArray['headers']['status-code']); - $this->assertEquals('DESC', $twoLevelsArray['body']['orders'][0]); - $this->assertEquals(null, $twoLevelsArray['body']['orders'][1]); // Overwrite by API (array) + // Indexes on array attributes are disabled due to MySQL bug + $this->assertEquals(400, $twoLevelsArray['headers']['status-code']); $unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', From afd6730a81028836ea4231abd38a7906bde7321b Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 14:43:32 +1200 Subject: [PATCH 255/362] FIx name mismatch --- app/controllers/api/projects.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 34ed85a418..92356526bd 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -2523,7 +2523,7 @@ App::patch('/v1/projects/:projectId/auth/session-invalidation') ->param('enabled', false, new Boolean(), 'Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change') ->inject('response') ->inject('dbForPlatform') - ->action(function (string $projectId, bool $invalidateSessions, Response $response, Database $dbForPlatform) { + ->action(function (string $projectId, bool $enabled, Response $response, Database $dbForPlatform) { $project = $dbForPlatform->getDocument('projects', $projectId); @@ -2532,7 +2532,7 @@ App::patch('/v1/projects/:projectId/auth/session-invalidation') } $auths = $project->getAttribute('auths', []); - $auths['invalidateSessions'] = $invalidateSessions; + $auths['invalidateSessions'] = $enabled; $dbForPlatform->updateDocument('projects', $project->getId(), $project ->setAttribute('auths', $auths)); From 724ee41eff65430b0db92972c46814227974e65a Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 14:48:48 +1200 Subject: [PATCH 256/362] Fix index tests --- tests/e2e/Services/Databases/Legacy/DatabasesBase.php | 6 +++--- tests/e2e/Services/Databases/Tables/DatabasesBase.php | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index c44be93b56..26111fcab9 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -1385,7 +1385,7 @@ trait DatabasesBase 'orders' => ['DESC'], // Check order is removed in API ]); - // Array attributes can not be indexed due to MySQL bug + // Indexes on array attributes are disabled due to MySQL bug $this->assertEquals(400, $index1['headers']['status-code']); $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/indexes', array_merge([ @@ -1398,7 +1398,7 @@ trait DatabasesBase 'attributes' => ['integers'], // array attribute ]); - // Array attributes can not be indexed due to MySQL bug + // Indexes on array attributes are disabled due to MySQL bug $this->assertEquals(400, $index2['headers']['status-code']); /** @@ -1413,7 +1413,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']); diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Tables/DatabasesBase.php index 19f5cc0d8c..89148627a2 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesBase.php @@ -1384,6 +1384,8 @@ trait DatabasesBase 'columns' => ['integers'], // array attribute 'orders' => ['DESC'], // Check order is removed in API ]); + + // Indexes on array attributes are disabled due to MySQL bug $this->assertEquals(400, $index1['headers']['status-code']); $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ @@ -1395,6 +1397,8 @@ trait DatabasesBase 'type' => 'key', 'columns' => ['integers'], // array attribute ]); + + // Indexes on array attributes are disabled due to MySQL bug $this->assertEquals(400, $index2['headers']['status-code']); /** @@ -1409,7 +1413,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']); From 8056a9d675b54460ad1f2d303b0b35d9fb0b66da Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 15:47:38 +1200 Subject: [PATCH 257/362] Update database --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 3de63bc90b..278f6a1dfe 100644 --- a/composer.lock +++ b/composer.lock @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.72.1", + "version": "0.72.2", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "239b19b5374a08ba62ecefbbc765a5c8d744c851" + "reference": "ad7613ac19bb799fc911cf82636a09345b2573fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/239b19b5374a08ba62ecefbbc765a5c8d744c851", - "reference": "239b19b5374a08ba62ecefbbc765a5c8d744c851", + "url": "https://api.github.com/repos/utopia-php/database/zipball/ad7613ac19bb799fc911cf82636a09345b2573fe", + "reference": "ad7613ac19bb799fc911cf82636a09345b2573fe", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.72.1" + "source": "https://github.com/utopia-php/database/tree/0.72.2" }, - "time": "2025-07-22T01:39:17+00:00" + "time": "2025-07-22T03:13:31+00:00" }, { "name": "utopia-php/detector", From 97c54aeaacdb56502abe9d0712c2b1dca2af0c9b Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Tue, 22 Jul 2025 09:31:09 +0530 Subject: [PATCH 258/362] fix: add wildcards on `getDocument` response model as well. --- src/Appwrite/Utopia/Request/Filters/V20.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Utopia/Request/Filters/V20.php b/src/Appwrite/Utopia/Request/Filters/V20.php index 8719cf7325..bb25f39c8e 100644 --- a/src/Appwrite/Utopia/Request/Filters/V20.php +++ b/src/Appwrite/Utopia/Request/Filters/V20.php @@ -16,7 +16,7 @@ class V20 extends Filter switch ($model) { case 'databases.getDocument': case 'databases.listDocuments': - $content = $this->manageSelectQueries($content, $model); + $content = $this->manageSelectQueries($content); break; } return $content; @@ -30,7 +30,7 @@ class V20 extends Filter * This filter preserves 1.7.x behavior by including all related documents for backward compatibility with * `listDocuments` and `getDocument` calls. */ - protected function manageSelectQueries(array $content, string $model): array + protected function manageSelectQueries(array $content): array { $hasWildcard = false; if (! isset($content['queries'])) { @@ -58,7 +58,10 @@ class V20 extends Filter } } - if ($hasWildcard && $model === 'databases.listDocuments') { + /** + * Add `keys.*` for all model types! + */ + if ($hasWildcard) { $relatedKeys = $this->getRelatedCollectionKeys(); if (! empty($relatedKeys)) { From 7355711f24b8bce2f8abf2df54ef21dbc753fb56 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 16:35:35 +1200 Subject: [PATCH 259/362] Fix index tests --- .../Databases/Legacy/DatabasesBase.php | 21 ------------------- .../Databases/Tables/DatabasesBase.php | 21 ------------------- 2 files changed, 42 deletions(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 26111fcab9..12bf07e79c 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -1467,27 +1467,6 @@ 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::ARRAY_INDEX_LENGTH - $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$collectionId}/indexes", [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'key' => 'lengthOverrideTestIndex', - 'type' => 'key', - '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::ARRAY_INDEX_LENGTH], $index['body']['lengths']); - // Test case for count of lengths greater than attributes (should throw 400) $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$collectionId}/indexes", [ 'content-type' => 'application/json', diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Tables/DatabasesBase.php index 89148627a2..ad1d84eee1 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesBase.php @@ -1456,27 +1456,6 @@ 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::ARRAY_INDEX_LENGTH - $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$tableId}/indexes", [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ], [ - 'key' => 'lengthOverrideTestIndex', - 'type' => 'key', - 'columns' => ['actors'], - 'lengths' => [120] - ]); - $this->assertEquals(202, $create['headers']['status-code']); - - $index = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$tableId}/indexes/lengthOverrideTestIndex", [ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ]); - $this->assertEquals([Database::ARRAY_INDEX_LENGTH], $index['body']['lengths']); - // Test case for count of lengths greater than attributes (should throw 400) $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', From d6d78ff218931e5fede6162d4a7974ee0f37497c Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 19:25:44 +1200 Subject: [PATCH 260/362] Update database --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 278f6a1dfe..6f7f568916 100644 --- a/composer.lock +++ b/composer.lock @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.72.2", + "version": "0.72.3", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "ad7613ac19bb799fc911cf82636a09345b2573fe" + "reference": "fd24f3637bbf31ecb84793512b6f01f5f2863a90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/ad7613ac19bb799fc911cf82636a09345b2573fe", - "reference": "ad7613ac19bb799fc911cf82636a09345b2573fe", + "url": "https://api.github.com/repos/utopia-php/database/zipball/fd24f3637bbf31ecb84793512b6f01f5f2863a90", + "reference": "fd24f3637bbf31ecb84793512b6f01f5f2863a90", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.72.2" + "source": "https://github.com/utopia-php/database/tree/0.72.3" }, - "time": "2025-07-22T03:13:31+00:00" + "time": "2025-07-22T07:20:59+00:00" }, { "name": "utopia-php/detector", From 07dfa58eba707ff3bdc8adc549b85dfa0eed61e1 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 19:32:36 +1200 Subject: [PATCH 261/362] Update specs --- app/config/specs/open-api3-1.8.x-client.json | 26 +------------------ app/config/specs/open-api3-1.8.x-console.json | 12 ++++----- app/config/specs/open-api3-1.8.x-server.json | 6 ++--- app/config/specs/open-api3-latest-client.json | 26 +------------------ .../specs/open-api3-latest-console.json | 12 ++++----- app/config/specs/open-api3-latest-server.json | 6 ++--- app/config/specs/swagger2-1.8.x-client.json | 26 +------------------ app/config/specs/swagger2-1.8.x-console.json | 12 ++++----- app/config/specs/swagger2-1.8.x-server.json | 6 ++--- app/config/specs/swagger2-latest-client.json | 26 +------------------ app/config/specs/swagger2-latest-console.json | 12 ++++----- app/config/specs/swagger2-latest-server.json | 6 ++--- 12 files changed, 40 insertions(+), 136 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 25beb73a88..54e08925d5 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.4", + "version": "1.8.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4490,30 +4490,6 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." - }, - { - "name": "createDocuments", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { 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 223b655f72..859a4e00a9 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.4", + "version": "1.8.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -8152,7 +8152,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -8198,7 +8198,7 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" } ], "auth": { @@ -50039,9 +50039,9 @@ "x-example": 20, "format": "int32" }, - "document": { + "row": { "type": "integer", - "description": "Number of documents to be migrated.", + "description": "Number of rows to be migrated.", "x-example": 20, "format": "int32" }, @@ -50079,7 +50079,7 @@ "user", "team", "database", - "document", + "row", "file", "bucket", "function", 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 03ff69d4f9..c2dfdd7715 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.4", + "version": "1.8.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -7635,7 +7635,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -7681,7 +7681,7 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" } ], "auth": { diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 25beb73a88..54e08925d5 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.4", + "version": "1.8.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4490,30 +4490,6 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." - }, - { - "name": "createDocuments", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 223b655f72..859a4e00a9 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.4", + "version": "1.8.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -8152,7 +8152,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -8198,7 +8198,7 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" } ], "auth": { @@ -50039,9 +50039,9 @@ "x-example": 20, "format": "int32" }, - "document": { + "row": { "type": "integer", - "description": "Number of documents to be migrated.", + "description": "Number of rows to be migrated.", "x-example": 20, "format": "int32" }, @@ -50079,7 +50079,7 @@ "user", "team", "database", - "document", + "row", "file", "bucket", "function", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 03ff69d4f9..c2dfdd7715 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -1,7 +1,7 @@ { "openapi": "3.0.0", "info": { - "version": "1.7.4", + "version": "1.8.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -7635,7 +7635,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -7681,7 +7681,7 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" } ], "auth": { diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index c032d4e2ab..dd4eb9ed38 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.4", + "version": "1.8.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4627,30 +4627,6 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." - }, - { - "name": "createDocuments", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 24dda66db4..3982fdaa33 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.4", + "version": "1.8.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -8276,7 +8276,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -8318,7 +8318,7 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" } ], "auth": { @@ -50212,9 +50212,9 @@ "x-example": 20, "format": "int32" }, - "document": { + "row": { "type": "integer", - "description": "Number of documents to be migrated.", + "description": "Number of rows to be migrated.", "x-example": 20, "format": "int32" }, @@ -50252,7 +50252,7 @@ "user", "team", "database", - "document", + "row", "file", "bucket", "function", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 96f69b1465..08a4f03093 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.4", + "version": "1.8.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -7749,7 +7749,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -7791,7 +7791,7 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" } ], "auth": { diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index c032d4e2ab..dd4eb9ed38 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.4", + "version": "1.8.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -4627,30 +4627,6 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." - }, - { - "name": "createDocuments", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 24dda66db4..3982fdaa33 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.4", + "version": "1.8.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -8276,7 +8276,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -8318,7 +8318,7 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" } ], "auth": { @@ -50212,9 +50212,9 @@ "x-example": 20, "format": "int32" }, - "document": { + "row": { "type": "integer", - "description": "Number of documents to be migrated.", + "description": "Number of rows to be migrated.", "x-example": 20, "format": "int32" }, @@ -50252,7 +50252,7 @@ "user", "team", "database", - "document", + "row", "file", "bucket", "function", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 96f69b1465..08a4f03093 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "1.7.4", + "version": "1.8.0", "title": "Appwrite", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)", "termsOfService": "https:\/\/appwrite.io\/policy\/terms", @@ -7749,7 +7749,7 @@ "tags": [ "databases" ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Documents List", @@ -7791,7 +7791,7 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" } ], "auth": { From 2e783865b99033ff115b751558582af1f3e8baa8 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 19:38:12 +1200 Subject: [PATCH 262/362] Update service defs --- app/config/services.php | 15 ++++++++++++++- docs/services/databases.md | 2 +- docs/services/tables.md | 7 +++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 docs/services/tables.md diff --git a/app/config/services.php b/app/config/services.php index 2dfc97fcbe..64fe12f62e 100644 --- a/app/config/services.php +++ b/app/config/services.php @@ -55,7 +55,7 @@ return [ ], 'databases' => [ 'key' => 'databases', - 'name' => 'Databases', + 'name' => 'Databases (Legacy)', 'subtitle' => 'The Databases service allows you to create structured collections of documents, query and filter lists of documents', 'description' => '/docs/services/databases.md', 'controller' => '', // Uses modules @@ -66,6 +66,19 @@ return [ 'optional' => true, 'icon' => '/images/services/databases.png', ], + 'tables' => [ + 'key' => 'tables', + 'name' => 'Tables', + 'subtitle' => 'The Tables service allows you to create structured tables of rows, query and filter lists of rows', + 'description' => '/docs/services/tables.md', + 'controller' => '', // Uses modules + 'sdk' => true, + 'docs' => true, + 'docsUrl' => 'https://appwrite.io/docs/client/tables', + 'tests' => false, + 'optional' => true, + 'icon' => '/images/services/databases.png', + ], 'locale' => [ 'key' => 'locale', 'name' => 'Locale', diff --git a/docs/services/databases.md b/docs/services/databases.md index 9c1eef19a5..d92bb7f72e 100644 --- a/docs/services/databases.md +++ b/docs/services/databases.md @@ -1,6 +1,6 @@ The Databases service allows you to create structured collections of documents, query and filter lists of documents, and manage an advanced set of read and write access permissions. -All data returned by the Databases service are represented as structured JSON documents. +All data returned by the Databases service are represented as structured JSON objects. The Databases service can contain multiple databases, each database can contain multiple collections. A collection is a group of similarly structured documents. The accepted structure of documents is defined by [collection attributes](https://appwrite.io/docs/databases#attributes). The collection attributes help you ensure all your user-submitted data is validated and stored according to the collection structure. diff --git a/docs/services/tables.md b/docs/services/tables.md new file mode 100644 index 0000000000..f0c252db30 --- /dev/null +++ b/docs/services/tables.md @@ -0,0 +1,7 @@ +The Tables service allows you to create structured tables of rows, query and filter lists of rows, and manage an advanced set of read and write access permissions. + +All data returned by the Tables service are represented as structured JSON objects. + +The Tables service can contain multiple databases, each database can contain multiple tables. A table is a group of similarly structured rows. The accepted structure of rows is defined by [table columns](https://appwrite.io/docs/databases#columns). The table columns help you ensure all your user-submitted data is validated and stored according to the table structure. + +Using Appwrite permissions architecture, you can assign read or write access to each table or row in your project for either a specific user, team, user role, or even grant it with public access (`any`). You can learn more about [how Appwrite handles permissions and access control](https://appwrite.io/docs/permissions). \ No newline at end of file From 5a06fab2a362fdaf9f5cdc8c9d8f3561b20ac0e9 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 20:09:50 +1200 Subject: [PATCH 263/362] Update specs --- app/config/services.php | 2 +- app/config/specs/open-api3-1.8.x-client.json | 28 +++---------------- app/config/specs/open-api3-1.8.x-console.json | 13 ++++++++- app/config/specs/open-api3-1.8.x-server.json | 4 +++ app/config/specs/open-api3-latest-client.json | 28 +++---------------- .../specs/open-api3-latest-console.json | 13 ++++++++- app/config/specs/open-api3-latest-server.json | 4 +++ app/config/specs/swagger2-1.8.x-client.json | 28 +++---------------- app/config/specs/swagger2-1.8.x-console.json | 13 ++++++++- app/config/specs/swagger2-1.8.x-server.json | 4 +++ app/config/specs/swagger2-latest-client.json | 28 +++---------------- app/config/specs/swagger2-latest-console.json | 13 ++++++++- app/config/specs/swagger2-latest-server.json | 4 +++ 13 files changed, 81 insertions(+), 101 deletions(-) diff --git a/app/config/services.php b/app/config/services.php index 64fe12f62e..696184d0c5 100644 --- a/app/config/services.php +++ b/app/config/services.php @@ -55,7 +55,7 @@ return [ ], 'databases' => [ 'key' => 'databases', - 'name' => 'Databases (Legacy)', + 'name' => 'Databases (legacy)', 'subtitle' => 'The Databases service allows you to create structured collections of documents, query and filter lists of documents', 'description' => '/docs/services/databases.md', 'controller' => '', // Uses modules 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 54e08925d5..b9cc9f7b07 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -5122,30 +5122,6 @@ } ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." } ], "auth": { @@ -8414,6 +8390,10 @@ "name": "databases", "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, + { + "name": "tables", + "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." 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 859a4e00a9..0a96ef4660 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -27922,6 +27922,7 @@ "account", "avatars", "databases", + "tables", "locale", "health", "storage", @@ -40273,6 +40274,10 @@ "name": "databases", "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, + { + "name": "tables", + "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." @@ -46625,7 +46630,12 @@ }, "serviceStatusForDatabases": { "type": "boolean", - "description": "Databases service status", + "description": "Databases (legacy) service status", + "x-example": true + }, + "serviceStatusForTables": { + "type": "boolean", + "description": "Tables service status", "x-example": true }, "serviceStatusForLocale": { @@ -46727,6 +46737,7 @@ "serviceStatusForAccount", "serviceStatusForAvatars", "serviceStatusForDatabases", + "serviceStatusForTables", "serviceStatusForLocale", "serviceStatusForHealth", "serviceStatusForStorage", 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 c2dfdd7715..f849e89a4e 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -30249,6 +30249,10 @@ "name": "databases", "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, + { + "name": "tables", + "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 54e08925d5..b9cc9f7b07 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -5122,30 +5122,6 @@ } ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." } ], "auth": { @@ -8414,6 +8390,10 @@ "name": "databases", "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, + { + "name": "tables", + "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 859a4e00a9..0a96ef4660 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -27922,6 +27922,7 @@ "account", "avatars", "databases", + "tables", "locale", "health", "storage", @@ -40273,6 +40274,10 @@ "name": "databases", "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, + { + "name": "tables", + "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." @@ -46625,7 +46630,12 @@ }, "serviceStatusForDatabases": { "type": "boolean", - "description": "Databases service status", + "description": "Databases (legacy) service status", + "x-example": true + }, + "serviceStatusForTables": { + "type": "boolean", + "description": "Tables service status", "x-example": true }, "serviceStatusForLocale": { @@ -46727,6 +46737,7 @@ "serviceStatusForAccount", "serviceStatusForAvatars", "serviceStatusForDatabases", + "serviceStatusForTables", "serviceStatusForLocale", "serviceStatusForHealth", "serviceStatusForStorage", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index c2dfdd7715..f849e89a4e 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -30249,6 +30249,10 @@ "name": "databases", "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, + { + "name": "tables", + "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index dd4eb9ed38..0dda6df3b1 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -5231,30 +5231,6 @@ } ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." } ], "auth": { @@ -8462,6 +8438,10 @@ "name": "databases", "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, + { + "name": "tables", + "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 3982fdaa33..75f81550da 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -28016,6 +28016,7 @@ "account", "avatars", "databases", + "tables", "locale", "health", "storage", @@ -40314,6 +40315,10 @@ "name": "databases", "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, + { + "name": "tables", + "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." @@ -46702,7 +46707,12 @@ }, "serviceStatusForDatabases": { "type": "boolean", - "description": "Databases service status", + "description": "Databases (legacy) service status", + "x-example": true + }, + "serviceStatusForTables": { + "type": "boolean", + "description": "Tables service status", "x-example": true }, "serviceStatusForLocale": { @@ -46804,6 +46814,7 @@ "serviceStatusForAccount", "serviceStatusForAvatars", "serviceStatusForDatabases", + "serviceStatusForTables", "serviceStatusForLocale", "serviceStatusForHealth", "serviceStatusForStorage", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 08a4f03093..d55457e34b 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -30390,6 +30390,10 @@ "name": "databases", "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, + { + "name": "tables", + "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index dd4eb9ed38..0dda6df3b1 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -5231,30 +5231,6 @@ } ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." } ], "auth": { @@ -8462,6 +8438,10 @@ "name": "databases", "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, + { + "name": "tables", + "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 3982fdaa33..75f81550da 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -28016,6 +28016,7 @@ "account", "avatars", "databases", + "tables", "locale", "health", "storage", @@ -40314,6 +40315,10 @@ "name": "databases", "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, + { + "name": "tables", + "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." @@ -46702,7 +46707,12 @@ }, "serviceStatusForDatabases": { "type": "boolean", - "description": "Databases service status", + "description": "Databases (legacy) service status", + "x-example": true + }, + "serviceStatusForTables": { + "type": "boolean", + "description": "Tables service status", "x-example": true }, "serviceStatusForLocale": { @@ -46804,6 +46814,7 @@ "serviceStatusForAccount", "serviceStatusForAvatars", "serviceStatusForDatabases", + "serviceStatusForTables", "serviceStatusForLocale", "serviceStatusForHealth", "serviceStatusForStorage", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 08a4f03093..d55457e34b 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -30390,6 +30390,10 @@ "name": "databases", "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, + { + "name": "tables", + "description": "The Tables service allows you to create structured tables of rows, query and filter lists of rows" + }, { "name": "locale", "description": "The Locale service allows you to customize your app based on your users' location." From f5ef8b5b7ef584688141daa4aa37816846dc1b6f Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 20:36:01 +1200 Subject: [PATCH 264/362] Trigger CI From c398e08f90ab660693c3626f4630090b761aef7f Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 22 Jul 2025 14:10:58 +0530 Subject: [PATCH 265/362] Add user injection and permission handling in Upsert actions --- .../Collections/Documents/Upsert.php | 26 ++- .../Http/Databases/Tables/Rows/Upsert.php | 1 + .../Databases/Legacy/DatabasesBase.php | 154 ++++++++++++++++++ .../Databases/Tables/DatabasesBase.php | 154 ++++++++++++++++++ 4 files changed, 330 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index 09e59c2ead..cac34a4fbd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -77,13 +77,14 @@ class Upsert extends Action ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->inject('requestTimestamp') ->inject('response') + ->inject('user') ->inject('dbForProject') ->inject('queueForEvents') ->inject('queueForStatsUsage') ->callback($this->action(...)); } - public function action(string $databaseId, string $collectionId, string $documentId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void + public function action(string $databaseId, string $collectionId, string $documentId, string|array $data, ?array $permissions, ?\DateTime $requestTimestamp, UtopiaResponse $response, Document $user, Database $dbForProject, Event $queueForEvents, StatsUsage $queueForStatsUsage): void { $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array @@ -104,12 +105,28 @@ class Upsert extends Action throw new Exception($this->getParentNotFoundException()); } - // Map aggregate permissions into the multiple permissions they represent. - $permissions = Permission::aggregate($permissions, [ + $allowedPermissions = [ Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, - ]); + ]; + + $permissions = Permission::aggregate($permissions, $allowedPermissions); + // if no permission, upsert permission from the old document if present (update scenario) else add default permission (create scenario) + if (\is_null($permissions)) { + $oldDocument = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId)); + if ($oldDocument->isEmpty()) { + if (!empty($user->getId())) { + $defaultPermissions = []; + foreach ($allowedPermissions as $permission) { + $defaultPermissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); + } + $permissions = $defaultPermissions; + } + } else { + $permissions = $oldDocument->getPermissions(); + } + } // Users can only manage their own roles, API keys and Admin users can manage any $roles = Authorization::getRoles(); @@ -135,7 +152,6 @@ class Upsert extends Action $data['$id'] = $documentId; $data['$permissions'] = $permissions ?? []; $newDocument = new Document($data); - $operations = 0; $setCollection = (function (Document $collection, Document $document) use (&$setCollection, $dbForProject, $database, &$operations) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php index c442b40e0f..d6207a5c1f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php @@ -64,6 +64,7 @@ class Upsert extends DocumentUpsert ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->inject('requestTimestamp') ->inject('response') + ->inject('user') ->inject('dbForProject') ->inject('queueForEvents') ->inject('queueForStatsUsage') diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 12bf07e79c..c37615125e 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -2008,6 +2008,160 @@ trait DatabasesBase ])); $this->assertEquals(204, $deleteResponse['headers']['status-code']); + + if ($this->getSide() === 'client') { + // Skipped on server side: Creating a document with no permissions results in an empty permissions array, whereas on client side it assigns permissions to the current user + + // test without passing permissions + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2000 + ] + ]); + + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + $this->assertCount(3, $document['body']['$permissions']); + $permissionsCreated = $document['body']['$permissions']; + // checking the default created permission + $defaultPermission = [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])) + ]; + // ignoring the order of the permission and checking the permissions + $this->assertEqualsCanonicalizing($defaultPermission, $permissionsCreated); + + $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $document['headers']['status-code']); + + // updating the created doc + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2002 + ] + ]); + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + $this->assertEquals(2002, $document['body']['releaseYear']); + $this->assertCount(3, $document['body']['$permissions']); + $this->assertEquals($permissionsCreated, $document['body']['$permissions']); + + // removing the delete permission + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2002 + ], + 'permissions' => [ + Permission::update(Role::user($this->getUser()['$id'])) + ] + ]); + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + $this->assertEquals(2002, $document['body']['releaseYear']); + $this->assertCount(1, $document['body']['$permissions']); + + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(401, $deleteResponse['headers']['status-code']); + + // giving the delete permission + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2002 + ], + 'permissions' => [ + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])) + ] + ]); + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + $this->assertEquals(2002, $document['body']['releaseYear']); + $this->assertCount(2, $document['body']['$permissions']); + + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(204, $deleteResponse['headers']['status-code']); + + // upsertion for the related document without passing permissions + // data should get added + $newPersonId = ID::unique(); + $personNoPerm = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents/' . $newPersonId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'library' => [ + '$id' => 'library3', + 'libraryName' => 'Library 3', + ], + ], + ]); + + $this->assertEquals('Library 3', $personNoPerm['body']['library']['libraryName']); + $this->assertCount(3, $personNoPerm['body']['library']['$permissions']); + $this->assertCount(3, $personNoPerm['body']['$permissions']); + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['fullName', 'library.*'])->toString() + ], + ]); + $this->assertGreaterThanOrEqual(1, $documents['body']['total']); + $documentsDetails = $documents['body']['documents']; + foreach ($documentsDetails as $doc) { + $this->assertCount(3, $doc['$permissions']); + } + $found = false; + foreach ($documents['body']['documents'] as $doc) { + if (isset($doc['library']['libraryName']) && $doc['library']['libraryName'] === 'Library 3') { + $found = true; + break; + } + } + $this->assertTrue($found, 'Library 3 should be present in the upserted documents.'); + + // Fetch the related library and assert on its permissions (should be default/inherited) + $library3 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $library['body']['$id'] . '/documents/library3', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $library3['headers']['status-code']); + $this->assertEquals('Library 3', $library3['body']['libraryName']); + $this->assertArrayHasKey('$permissions', $library3['body']); + $this->assertCount(3, $library3['body']['$permissions']); + $this->assertNotEmpty($library3['body']['$permissions']); + } } /** diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Tables/DatabasesBase.php index ad1d84eee1..58de6754ef 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Tables/DatabasesBase.php @@ -1997,6 +1997,160 @@ trait DatabasesBase ])); $this->assertEquals(204, $deleteResponse['headers']['status-code']); + + if ($this->getSide() === 'client') { + // Skipped on server side: Creating a document with no permissions results in an empty permissions array, whereas on client side it assigns permissions to the current user + + // test without passing permissions + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2000 + ] + ]); + + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + $this->assertCount(3, $document['body']['$permissions']); + $permissionsCreated = $document['body']['$permissions']; + // checking the default created permission + $defaultPermission = [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])) + ]; + // ignoring the order of the permission and checking the permissions + $this->assertEqualsCanonicalizing($defaultPermission, $permissionsCreated); + + $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $document['headers']['status-code']); + + // updating the created doc + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2002 + ] + ]); + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + $this->assertEquals(2002, $document['body']['releaseYear']); + $this->assertCount(3, $document['body']['$permissions']); + $this->assertEquals($permissionsCreated, $document['body']['$permissions']); + + // removing the delete permission + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2002 + ], + 'permissions' => [ + Permission::update(Role::user($this->getUser()['$id'])) + ] + ]); + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + $this->assertEquals(2002, $document['body']['releaseYear']); + $this->assertCount(1, $document['body']['$permissions']); + + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(401, $deleteResponse['headers']['status-code']); + + // giving the delete permission + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2002 + ], + 'permissions' => [ + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])) + ] + ]); + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $document['body']['title']); + $this->assertEquals(2002, $document['body']['releaseYear']); + $this->assertCount(2, $document['body']['$permissions']); + + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(204, $deleteResponse['headers']['status-code']); + + // upsertion for the related document without passing permissions + // data should get added + $newPersonId = ID::unique(); + $personNoPerm = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents/' . $newPersonId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'library' => [ + '$id' => 'library3', + 'libraryName' => 'Library 3', + ], + ], + ]); + + $this->assertEquals('Library 3', $personNoPerm['body']['library']['libraryName']); + $this->assertCount(3, $personNoPerm['body']['library']['$permissions']); + $this->assertCount(3, $personNoPerm['body']['$permissions']); + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::select(['fullName', 'library.*'])->toString() + ], + ]); + $this->assertGreaterThanOrEqual(1, $documents['body']['total']); + $documentsDetails = $documents['body']['documents']; + foreach ($documentsDetails as $doc) { + $this->assertCount(3, $doc['$permissions']); + } + $found = false; + foreach ($documents['body']['documents'] as $doc) { + if (isset($doc['library']['libraryName']) && $doc['library']['libraryName'] === 'Library 3') { + $found = true; + break; + } + } + $this->assertTrue($found, 'Library 3 should be present in the upserted documents.'); + + // Fetch the related library and assert on its permissions (should be default/inherited) + $library3 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $library['body']['$id'] . '/documents/library3', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $library3['headers']['status-code']); + $this->assertEquals('Library 3', $library3['body']['libraryName']); + $this->assertArrayHasKey('$permissions', $library3['body']); + $this->assertCount(3, $library3['body']['$permissions']); + $this->assertNotEmpty($library3['body']['$permissions']); + } } /** From 959e101c889f07b537bac880bb27d1327cf14816 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 21:23:32 +1200 Subject: [PATCH 266/362] Fix merge --- .../Http/Databases/Collections/Attributes/String/Create.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index 8ce8626f3a..0329ee6957 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -10,6 +10,7 @@ use Appwrite\SDK\AuthType; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; +use Utopia\App; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Key; @@ -88,7 +89,7 @@ class Create extends Action Event $queueForEvents, array $plan ): void { - if ($encrypt && !empty($plan) && !($plan['databasesAllowEncrypt'] ?? false)) { + if (!App::isDevelopment() && $encrypt && !empty($plan) && !($plan['databasesAllowEncrypt'] ?? false)) { throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Encrypted string ' . $this->getSdkGroup() . ' are not available on your plan. Please upgrade to create encrypted string ' . $this->getSdkGroup() . '.'); } From 5227ce267ea03cdfd5db4d47aa2466cf8badca83 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 21:47:08 +1200 Subject: [PATCH 267/362] Downgrade migrations --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 1ebd6716e3..9137a6afde 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.13.*", + "utopia-php/migration": "0.12.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index 6f7f568916..b3ab412c35 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": "040a8234ecf1038a7e6dc16aa2dda084", + "content-hash": "24f4a52809c9a5bc63122c16db0a9350", "packages": [ { "name": "adhocore/jwt", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.13.1", + "version": "0.12.0", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "b3c51e39f35efeb15431c6bc8f5bc6cf78fac9cc" + "reference": "973a4daa283f711a104e9bb7cf5a79dec2988df0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/b3c51e39f35efeb15431c6bc8f5bc6cf78fac9cc", - "reference": "b3c51e39f35efeb15431c6bc8f5bc6cf78fac9cc", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/973a4daa283f711a104e9bb7cf5a79dec2988df0", + "reference": "973a4daa283f711a104e9bb7cf5a79dec2988df0", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.13.1" + "source": "https://github.com/utopia-php/migration/tree/0.12.0" }, - "time": "2025-07-21T23:22:05+00:00" + "time": "2025-07-17T12:20:11+00:00" }, { "name": "utopia-php/orchestration", From d0682b4b670d745e1d5524c8ec0e31550a5c268a Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 22 Jul 2025 21:56:07 +1200 Subject: [PATCH 268/362] Revert "Downgrade migrations" This reverts commit 5227ce267ea03cdfd5db4d47aa2466cf8badca83. --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 9137a6afde..1ebd6716e3 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.12.*", + "utopia-php/migration": "0.13.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index b3ab412c35..6f7f568916 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": "24f4a52809c9a5bc63122c16db0a9350", + "content-hash": "040a8234ecf1038a7e6dc16aa2dda084", "packages": [ { "name": "adhocore/jwt", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.12.0", + "version": "0.13.1", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "973a4daa283f711a104e9bb7cf5a79dec2988df0" + "reference": "b3c51e39f35efeb15431c6bc8f5bc6cf78fac9cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/973a4daa283f711a104e9bb7cf5a79dec2988df0", - "reference": "973a4daa283f711a104e9bb7cf5a79dec2988df0", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/b3c51e39f35efeb15431c6bc8f5bc6cf78fac9cc", + "reference": "b3c51e39f35efeb15431c6bc8f5bc6cf78fac9cc", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.12.0" + "source": "https://github.com/utopia-php/migration/tree/0.13.1" }, - "time": "2025-07-17T12:20:11+00:00" + "time": "2025-07-21T23:22:05+00:00" }, { "name": "utopia-php/orchestration", From 51064b0154148cab01f6f1d4ab4772f6fab39d26 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 22 Jul 2025 15:44:57 +0530 Subject: [PATCH 269/362] chore: regen specs --- app/config/specs/open-api3-1.8.x-client.json | 48 + app/config/specs/open-api3-1.8.x-console.json | 24 +- app/config/specs/open-api3-1.8.x-server.json | 20 +- app/config/specs/open-api3-latest-client.json | 280 +++-- .../specs/open-api3-latest-console.json | 1108 ++++++++++------- app/config/specs/open-api3-latest-server.json | 860 ++++++++----- app/config/specs/swagger2-1.8.x-client.json | 48 + app/config/specs/swagger2-1.8.x-console.json | 24 +- app/config/specs/swagger2-1.8.x-server.json | 20 +- app/config/specs/swagger2-latest-client.json | 334 ++--- app/config/specs/swagger2-latest-console.json | 1108 ++++++++++------- app/config/specs/swagger2-latest-server.json | 860 ++++++++----- 12 files changed, 2826 insertions(+), 1908 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 49ccbbf5c2..2754476939 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4500,6 +4500,30 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -5148,6 +5172,30 @@ } ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." } ], "auth": { 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 c4f1ec939a..22357e7b0b 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -5067,7 +5067,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createTable" + "replaceWith": "tables.create" }, "auth": { "Project": [] @@ -5175,7 +5175,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getTable" + "replaceWith": "tables.get" }, "auth": { "Project": [] @@ -5248,7 +5248,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateTable" + "replaceWith": "tables.update" }, "auth": { "Project": [] @@ -5351,7 +5351,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteTable" + "replaceWith": "tables.delete" }, "auth": { "Project": [] @@ -9133,7 +9133,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementColumn" + "replaceWith": "tables.decrementRowColumn" }, "auth": { "Project": [] @@ -9249,7 +9249,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementColumn" + "replaceWith": "tables.incrementRowColumn" }, "auth": { "Project": [] @@ -9364,7 +9364,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumnIndexes" + "replaceWith": "tables.listIndexes" }, "auth": { "Project": [] @@ -9450,7 +9450,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createColumnIndex" + "replaceWith": "tables.createIndex" }, "auth": { "Project": [] @@ -9582,7 +9582,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumnIndex" + "replaceWith": "tables.getIndex" }, "auth": { "Project": [] @@ -9657,7 +9657,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumnIndex" + "replaceWith": "tables.deleteIndex" }, "auth": { "Project": [] @@ -9741,7 +9741,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listTableLogs" + "replaceWith": "tables.listLogs" }, "auth": { "Project": [] @@ -9828,7 +9828,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getTableUsage" + "replaceWith": "tables.getUsage" }, "auth": { "Project": [] 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 60e2656d15..09572fe6b5 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4519,7 +4519,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createTable" + "replaceWith": "tables.create" }, "auth": { "Project": [], @@ -4628,7 +4628,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getTable" + "replaceWith": "tables.get" }, "auth": { "Project": [], @@ -4702,7 +4702,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateTable" + "replaceWith": "tables.update" }, "auth": { "Project": [], @@ -4806,7 +4806,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteTable" + "replaceWith": "tables.delete" }, "auth": { "Project": [], @@ -8530,7 +8530,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementColumn" + "replaceWith": "tables.decrementRowColumn" }, "auth": { "Project": [], @@ -8647,7 +8647,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementColumn" + "replaceWith": "tables.incrementRowColumn" }, "auth": { "Project": [], @@ -8763,7 +8763,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumnIndexes" + "replaceWith": "tables.listIndexes" }, "auth": { "Project": [], @@ -8850,7 +8850,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createColumnIndex" + "replaceWith": "tables.createIndex" }, "auth": { "Project": [], @@ -8983,7 +8983,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumnIndex" + "replaceWith": "tables.getIndex" }, "auth": { "Project": [], @@ -9059,7 +9059,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumnIndex" + "replaceWith": "tables.deleteIndex" }, "auth": { "Project": [], diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 3f947d42ff..2754476939 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -44,13 +44,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "account", "weight": 10, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", "rate-limit": 0, @@ -93,13 +93,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "account", "weight": 9, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", "rate-limit": 10, @@ -178,13 +178,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "account", "weight": 35, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "rate-limit": 0, @@ -254,13 +254,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 58, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "rate-limit": 0, @@ -313,13 +313,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 59, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "rate-limit": 0, @@ -376,13 +376,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "tokens", "weight": 30, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, @@ -425,13 +425,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 32, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "rate-limit": 0, @@ -491,13 +491,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMFA", "group": "mfa", "weight": 45, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-m-f-a.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, @@ -561,13 +561,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", "weight": 47, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "rate-limit": 0, @@ -627,13 +627,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", "weight": 48, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "rate-limit": 0, @@ -705,13 +705,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 52, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -773,13 +773,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", "weight": 53, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "rate-limit": 10, @@ -847,13 +847,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", "weight": 54, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", "rate-limit": 10, @@ -923,13 +923,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 46, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", "rate-limit": 0, @@ -974,13 +974,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 51, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -1023,13 +1023,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 49, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -1072,13 +1072,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 50, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -1123,13 +1123,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "account", "weight": 33, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "rate-limit": 0, @@ -1193,13 +1193,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "account", "weight": 34, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "rate-limit": 10, @@ -1268,13 +1268,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "account", "weight": 36, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "rate-limit": 0, @@ -1344,13 +1344,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "account", "weight": 31, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "rate-limit": 0, @@ -1393,13 +1393,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "account", "weight": 37, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "rate-limit": 0, @@ -1463,13 +1463,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRecovery", "group": "recovery", "weight": 39, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", "rate-limit": 10, @@ -1540,13 +1540,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRecovery", "group": "recovery", "weight": 40, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "rate-limit": 10, @@ -1622,13 +1622,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 12, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "rate-limit": 0, @@ -1664,13 +1664,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 13, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", "rate-limit": 100, @@ -1715,13 +1715,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAnonymousSession", "group": "sessions", "weight": 18, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-anonymous-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", "rate-limit": 50, @@ -1764,13 +1764,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailPasswordSession", "group": "sessions", "weight": 17, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-password-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "rate-limit": 10, @@ -1838,13 +1838,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateMagicURLSession", "group": "sessions", "weight": 27, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-magic-u-r-l-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1856,6 +1856,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -1905,13 +1906,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Session", "group": "sessions", "weight": 20, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, @@ -2047,13 +2048,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updatePhoneSession", "group": "sessions", "weight": 28, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-phone-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2065,6 +2066,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2121,13 +2123,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 19, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2195,13 +2197,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSession", "group": "sessions", "weight": 14, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", "rate-limit": 0, @@ -2256,13 +2258,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSession", "group": "sessions", "weight": 16, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", "rate-limit": 10, @@ -2310,13 +2312,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 15, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", "rate-limit": 100, @@ -2373,13 +2375,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "account", "weight": 38, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", "rate-limit": 0, @@ -2424,13 +2426,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", "weight": 55, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, @@ -2503,13 +2505,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", "weight": 56, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, @@ -2574,13 +2576,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", "weight": 57, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, @@ -2635,13 +2637,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailToken", "group": "tokens", "weight": 26, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", "rate-limit": 10, @@ -2717,13 +2719,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMagicURLToken", "group": "tokens", "weight": 25, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-magic-u-r-l-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, @@ -2797,13 +2799,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Token", "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, @@ -2939,13 +2941,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneToken", "group": "tokens", "weight": 29, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", "rate-limit": 10, @@ -3016,13 +3018,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVerification", "group": "verification", "weight": 41, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", "rate-limit": 10, @@ -3084,13 +3086,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVerification", "group": "verification", "weight": 42, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", "rate-limit": 10, @@ -3160,13 +3162,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneVerification", "group": "verification", "weight": 43, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", "rate-limit": 10, @@ -3212,13 +3214,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "verification", "weight": 44, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", "rate-limit": 10, @@ -3281,13 +3283,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getBrowser", "group": null, "weight": 61, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-browser.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "rate-limit": 0, @@ -3407,13 +3409,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getCreditCard", "group": null, "weight": 60, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-credit-card.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "rate-limit": 0, @@ -3539,13 +3541,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFavicon", "group": null, "weight": 64, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-favicon.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "rate-limit": 0, @@ -3597,13 +3599,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFlag", "group": null, "weight": 62, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-flag.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "rate-limit": 0, @@ -4085,13 +4087,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getImage", "group": null, "weight": 63, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-image.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "rate-limit": 0, @@ -4167,13 +4169,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getInitials", "group": null, "weight": 66, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-initials.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "rate-limit": 0, @@ -4259,13 +4261,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getQR", "group": null, "weight": 65, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-q-r.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, @@ -4358,13 +4360,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocuments", "group": "documents", "weight": 339, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -4377,6 +4379,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "auth": { "Project": [] } @@ -4443,13 +4449,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDocument", "group": "documents", "weight": 331, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -4462,6 +4468,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "methods": [ { "name": "createDocument", @@ -4490,6 +4500,30 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4584,13 +4618,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getDocument", "group": "documents", "weight": 332, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -4603,6 +4637,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "auth": { "Project": [] } @@ -4666,7 +4704,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -4679,13 +4717,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocument", "group": "documents", "weight": 335, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -4698,6 +4736,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "methods": [ { "name": "upsertDocument", @@ -4807,13 +4849,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocument", "group": "documents", "weight": 333, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -4826,6 +4868,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "auth": { "Project": [] } @@ -4906,13 +4952,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocument", "group": "documents", "weight": 337, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -4925,6 +4971,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "auth": { "Project": [] } @@ -4990,13 +5040,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRows", "group": "rows", "weight": 412, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, @@ -5075,13 +5125,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRow", "group": "rows", "weight": 404, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, @@ -5122,6 +5172,30 @@ } ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." } ], "auth": { @@ -5216,13 +5290,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRow", "group": "rows", "weight": 405, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, @@ -5311,13 +5385,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRow", "group": "rows", "weight": 408, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, @@ -5436,13 +5510,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRow", "group": "rows", "weight": 406, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, @@ -5535,13 +5609,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRow", "group": "rows", "weight": 410, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, @@ -5619,13 +5693,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listExecutions", "group": "executions", "weight": 440, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-executions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -5694,13 +5768,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createExecution", "group": "executions", "weight": 438, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", "rate-limit": 0, @@ -5809,13 +5883,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getExecution", "group": "executions", "weight": 439, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.", "rate-limit": 0, @@ -5883,13 +5957,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "query", "group": "graphql", "weight": 254, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/query.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -5935,13 +6009,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "mutation", "group": "graphql", "weight": 253, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/mutation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -5987,13 +6061,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 70, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "rate-limit": 0, @@ -6039,13 +6113,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCodes", "group": null, "weight": 71, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "rate-limit": 0, @@ -6091,13 +6165,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listContinents", "group": null, "weight": 75, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-continents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "rate-limit": 0, @@ -6143,13 +6217,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountries", "group": null, "weight": 72, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "rate-limit": 0, @@ -6195,13 +6269,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesEU", "group": null, "weight": 73, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-e-u.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, @@ -6247,13 +6321,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesPhones", "group": null, "weight": 74, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-phones.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "rate-limit": 0, @@ -6299,13 +6373,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCurrencies", "group": null, "weight": 76, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-currencies.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "rate-limit": 0, @@ -6351,13 +6425,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLanguages", "group": null, "weight": 77, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-languages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "rate-limit": 0, @@ -6403,13 +6477,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSubscriber", "group": "subscribers", "weight": 300, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "rate-limit": 0, @@ -6486,13 +6560,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", "weight": 304, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "rate-limit": 0, @@ -6561,13 +6635,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFiles", "group": "files", "weight": 161, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-files.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "rate-limit": 0, @@ -6647,13 +6721,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFile", "group": "files", "weight": 160, "cookies": false, "type": "upload", - "deprecated": false, "demo": "storage\/create-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "rate-limit": 60, @@ -6745,13 +6819,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFile", "group": "files", "weight": 162, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "rate-limit": 0, @@ -6817,13 +6891,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFile", "group": "files", "weight": 167, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "rate-limit": 60, @@ -6906,13 +6980,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteFile", "group": "files", "weight": 168, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", "rate-limit": 60, @@ -6973,13 +7047,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getFileDownload", "group": "files", "weight": 164, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "rate-limit": 0, @@ -7051,13 +7125,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFilePreview", "group": "files", "weight": 163, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-preview.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "rate-limit": 0, @@ -7279,13 +7353,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getFileView", "group": "files", "weight": 165, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-view.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "rate-limit": 0, @@ -7364,13 +7438,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "teams", "weight": 172, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "rate-limit": 0, @@ -7440,13 +7514,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "teams", "weight": 171, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "rate-limit": 0, @@ -7525,13 +7599,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "teams", "weight": 173, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "rate-limit": 0, @@ -7587,13 +7661,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "teams", "weight": 175, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "rate-limit": 0, @@ -7661,13 +7735,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "teams", "weight": 177, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "rate-limit": 0, @@ -7725,13 +7799,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 179, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "rate-limit": 0, @@ -7811,13 +7885,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMembership", "group": "memberships", "weight": 178, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "rate-limit": 10, @@ -7922,13 +7996,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMembership", "group": "memberships", "weight": 180, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "rate-limit": 0, @@ -7994,13 +8068,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembership", "group": "memberships", "weight": 181, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "rate-limit": 0, @@ -8081,13 +8155,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMembership", "group": "memberships", "weight": 183, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "rate-limit": 0, @@ -8155,13 +8229,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", "weight": 182, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "rate-limit": 0, @@ -8253,13 +8327,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "teams", "weight": 174, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "rate-limit": 0, @@ -8314,13 +8388,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "teams", "weight": 176, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "rate-limit": 0, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 0a96ef4660..22357e7b0b 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -44,13 +44,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "account", "weight": 10, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", "rate-limit": 0, @@ -92,13 +92,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "account", "weight": 9, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", "rate-limit": 10, @@ -168,13 +168,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "account", "weight": 11, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md", "rate-limit": 0, @@ -216,13 +216,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "account", "weight": 35, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "rate-limit": 0, @@ -291,13 +291,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 58, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "rate-limit": 0, @@ -349,13 +349,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 59, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "rate-limit": 0, @@ -411,13 +411,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "tokens", "weight": 30, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, @@ -460,13 +460,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 32, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "rate-limit": 0, @@ -525,13 +525,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMFA", "group": "mfa", "weight": 45, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-m-f-a.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, @@ -594,13 +594,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", "weight": 47, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "rate-limit": 0, @@ -659,13 +659,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", "weight": 48, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "rate-limit": 0, @@ -736,13 +736,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 52, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -803,13 +803,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", "weight": 53, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "rate-limit": 10, @@ -877,13 +877,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", "weight": 54, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", "rate-limit": 10, @@ -952,13 +952,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 46, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", "rate-limit": 0, @@ -1002,13 +1002,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 51, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -1050,13 +1050,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 49, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -1098,13 +1098,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 50, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -1148,13 +1148,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "account", "weight": 33, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "rate-limit": 0, @@ -1217,13 +1217,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "account", "weight": 34, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "rate-limit": 10, @@ -1291,13 +1291,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "account", "weight": 36, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "rate-limit": 0, @@ -1366,13 +1366,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "account", "weight": 31, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "rate-limit": 0, @@ -1414,13 +1414,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "account", "weight": 37, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "rate-limit": 0, @@ -1483,13 +1483,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRecovery", "group": "recovery", "weight": 39, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", "rate-limit": 10, @@ -1559,13 +1559,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRecovery", "group": "recovery", "weight": 40, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "rate-limit": 10, @@ -1640,13 +1640,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 12, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "rate-limit": 0, @@ -1681,13 +1681,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 13, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", "rate-limit": 100, @@ -1731,13 +1731,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAnonymousSession", "group": "sessions", "weight": 18, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-anonymous-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", "rate-limit": 50, @@ -1780,13 +1780,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailPasswordSession", "group": "sessions", "weight": 17, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-password-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "rate-limit": 10, @@ -1854,13 +1854,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateMagicURLSession", "group": "sessions", "weight": 27, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-magic-u-r-l-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1872,6 +1872,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -1921,13 +1922,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Session", "group": "sessions", "weight": 20, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, @@ -2063,13 +2064,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updatePhoneSession", "group": "sessions", "weight": 28, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-phone-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2081,6 +2082,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2137,13 +2139,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 19, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2211,13 +2213,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSession", "group": "sessions", "weight": 14, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", "rate-limit": 0, @@ -2271,13 +2273,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSession", "group": "sessions", "weight": 16, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", "rate-limit": 10, @@ -2324,13 +2326,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 15, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", "rate-limit": 100, @@ -2386,13 +2388,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "account", "weight": 38, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", "rate-limit": 0, @@ -2436,13 +2438,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", "weight": 55, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, @@ -2514,13 +2516,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", "weight": 56, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, @@ -2584,13 +2586,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", "weight": 57, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, @@ -2644,13 +2646,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailToken", "group": "tokens", "weight": 26, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", "rate-limit": 10, @@ -2726,13 +2728,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMagicURLToken", "group": "tokens", "weight": 25, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-magic-u-r-l-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, @@ -2806,13 +2808,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Token", "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, @@ -2948,13 +2950,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneToken", "group": "tokens", "weight": 29, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", "rate-limit": 10, @@ -3025,13 +3027,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVerification", "group": "verification", "weight": 41, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", "rate-limit": 10, @@ -3092,13 +3094,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVerification", "group": "verification", "weight": 42, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", "rate-limit": 10, @@ -3167,13 +3169,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneVerification", "group": "verification", "weight": 43, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", "rate-limit": 10, @@ -3218,13 +3220,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "verification", "weight": 44, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", "rate-limit": 10, @@ -3286,13 +3288,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getBrowser", "group": null, "weight": 61, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-browser.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "rate-limit": 0, @@ -3412,13 +3414,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getCreditCard", "group": null, "weight": 60, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-credit-card.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "rate-limit": 0, @@ -3544,13 +3546,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFavicon", "group": null, "weight": 64, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-favicon.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "rate-limit": 0, @@ -3602,13 +3604,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFlag", "group": null, "weight": 62, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-flag.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "rate-limit": 0, @@ -4090,13 +4092,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getImage", "group": null, "weight": 63, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-image.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "rate-limit": 0, @@ -4172,13 +4174,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getInitials", "group": null, "weight": 66, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-initials.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "rate-limit": 0, @@ -4264,13 +4266,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getQR", "group": null, "weight": 65, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-q-r.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, @@ -4356,13 +4358,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "chat", "group": "console", "weight": 256, "cookies": false, "type": "", - "deprecated": false, "demo": "assistant\/chat.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/assistant\/chat.md", "rate-limit": 15, @@ -4416,13 +4418,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "getResource", "group": null, "weight": 480, "cookies": false, "type": "", - "deprecated": false, "demo": "console\/get-resource.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCheck if a resource ID is available.", "rate-limit": 120, @@ -4491,13 +4493,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "variables", "group": "console", "weight": 255, "cookies": false, "type": "", - "deprecated": false, "demo": "console\/variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/console\/variables.md", "rate-limit": 0, @@ -4539,13 +4541,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "databases", "weight": 320, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", "rate-limit": 0, @@ -4612,13 +4614,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "databases", "weight": 316, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", "rate-limit": 0, @@ -4691,13 +4693,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listUsage", "group": null, "weight": 323, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", "rate-limit": 0, @@ -4763,13 +4765,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "databases", "weight": 317, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", "rate-limit": 0, @@ -4822,13 +4824,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "databases", "weight": 318, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", "rate-limit": 0, @@ -4898,13 +4900,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "databases", "weight": 319, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", "rate-limit": 0, @@ -4959,13 +4961,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listCollections", "group": "collections", "weight": 328, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4976,6 +4978,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.list" + }, "auth": { "Project": [] } @@ -5042,13 +5048,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createCollection", "group": "collections", "weight": 324, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -5059,6 +5065,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.create" + }, "auth": { "Project": [] } @@ -5146,13 +5156,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getCollection", "group": "collections", "weight": 325, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -5163,6 +5173,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.get" + }, "auth": { "Project": [] } @@ -5215,13 +5229,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateCollection", "group": "collections", "weight": 326, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -5232,6 +5246,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.update" + }, "auth": { "Project": [] } @@ -5314,13 +5332,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteCollection", "group": "collections", "weight": 327, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -5331,6 +5349,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.delete" + }, "auth": { "Project": [] } @@ -5385,13 +5407,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listAttributes", "group": "attributes", "weight": 345, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5402,6 +5424,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumns" + }, "auth": { "Project": [] } @@ -5469,13 +5495,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", "weight": 346, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5486,6 +5512,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createBooleanColumn" + }, "auth": { "Project": [] } @@ -5575,13 +5605,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", "weight": 347, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5592,6 +5622,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateBooleanColumn" + }, "auth": { "Project": [] } @@ -5686,13 +5720,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", "weight": 348, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5703,6 +5737,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createDatetimeColumn" + }, "auth": { "Project": [] } @@ -5792,13 +5830,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", "weight": 349, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5809,6 +5847,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn" + }, "auth": { "Project": [] } @@ -5903,13 +5945,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", "weight": 350, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5920,6 +5962,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEmailColumn" + }, "auth": { "Project": [] } @@ -6009,13 +6055,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", "weight": 351, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -6026,6 +6072,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEmailColumn" + }, "auth": { "Project": [] } @@ -6120,13 +6170,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", "weight": 352, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -6137,6 +6187,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEnumColumn" + }, "auth": { "Project": [] } @@ -6235,13 +6289,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", "weight": 353, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -6252,6 +6306,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEnumColumn" + }, "auth": { "Project": [] } @@ -6355,13 +6413,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", "weight": 354, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -6372,6 +6430,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createFloatColumn" + }, "auth": { "Project": [] } @@ -6471,13 +6533,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", "weight": 355, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6488,6 +6550,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateFloatColumn" + }, "auth": { "Project": [] } @@ -6592,13 +6658,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", "weight": 356, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6609,6 +6675,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIntegerColumn" + }, "auth": { "Project": [] } @@ -6708,13 +6778,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", "weight": 357, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6725,6 +6795,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIntegerColumn" + }, "auth": { "Project": [] } @@ -6829,13 +6903,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIpAttribute", "group": "attributes", "weight": 358, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6846,6 +6920,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIpColumn" + }, "auth": { "Project": [] } @@ -6935,13 +7013,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", "weight": 359, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6952,6 +7030,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIpColumn" + }, "auth": { "Project": [] } @@ -7046,13 +7128,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", "weight": 360, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -7063,6 +7145,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRelationshipColumn" + }, "auth": { "Project": [] } @@ -7177,13 +7263,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createStringAttribute", "group": "attributes", "weight": 362, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -7194,6 +7280,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createStringColumn" + }, "auth": { "Project": [] } @@ -7294,13 +7384,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", "weight": 363, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -7311,6 +7401,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateStringColumn" + }, "auth": { "Project": [] } @@ -7410,13 +7504,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", "weight": 364, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7427,6 +7521,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createUrlColumn" + }, "auth": { "Project": [] } @@ -7516,13 +7614,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", "weight": 365, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7533,6 +7631,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateUrlColumn" + }, "auth": { "Project": [] } @@ -7658,13 +7760,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getAttribute", "group": "attributes", "weight": 343, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7675,6 +7777,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumn" + }, "auth": { "Project": [] } @@ -7729,13 +7835,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteAttribute", "group": "attributes", "weight": 344, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7746,6 +7852,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumn" + }, "auth": { "Project": [] } @@ -7809,13 +7919,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", "weight": 361, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7826,6 +7936,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn" + }, "auth": { "Project": [] } @@ -7917,13 +8031,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocuments", "group": "documents", "weight": 339, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7936,6 +8050,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "auth": { "Project": [] } @@ -8002,13 +8120,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDocument", "group": "documents", "weight": 331, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -8021,6 +8139,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "methods": [ { "name": "createDocument", @@ -8165,13 +8287,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocuments", "group": "documents", "weight": 336, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -8183,6 +8305,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRows" + }, "methods": [ { "name": "upsertDocuments", @@ -8275,13 +8401,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocuments", "group": "documents", "weight": 334, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -8293,6 +8419,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRows" + }, "auth": { "Project": [] } @@ -8369,13 +8499,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocuments", "group": "documents", "weight": 338, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8387,6 +8517,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRows" + }, "auth": { "Project": [] } @@ -8460,13 +8594,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getDocument", "group": "documents", "weight": 332, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8479,6 +8613,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "auth": { "Project": [] } @@ -8555,13 +8693,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocument", "group": "documents", "weight": 335, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8574,6 +8712,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "methods": [ { "name": "upsertDocument", @@ -8683,13 +8825,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocument", "group": "documents", "weight": 333, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8702,6 +8844,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "auth": { "Project": [] } @@ -8782,13 +8928,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocument", "group": "documents", "weight": 337, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8801,6 +8947,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "auth": { "Project": [] } @@ -8866,13 +9016,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocumentLogs", "group": "logs", "weight": 340, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-document-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", "rate-limit": 0, @@ -8883,6 +9033,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listLogs" + }, "auth": { "Project": [] } @@ -8959,13 +9113,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", "weight": 342, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -8977,6 +9131,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.decrementRowColumn" + }, "auth": { "Project": [] } @@ -9071,13 +9229,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", "weight": 341, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -9089,6 +9247,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.incrementRowColumn" + }, "auth": { "Project": [] } @@ -9183,13 +9345,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 369, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -9200,6 +9362,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listIndexes" + }, "auth": { "Project": [] } @@ -9265,13 +9431,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 366, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -9282,6 +9448,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIndex" + }, "auth": { "Project": [] } @@ -9393,13 +9563,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 367, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -9410,6 +9580,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getIndex" + }, "auth": { "Project": [] } @@ -9464,13 +9638,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 368, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9481,6 +9655,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteIndex" + }, "auth": { "Project": [] } @@ -9544,13 +9722,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listCollectionLogs", "group": "collections", "weight": 329, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-collection-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", "rate-limit": 0, @@ -9561,6 +9739,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listLogs" + }, "auth": { "Project": [] } @@ -9627,13 +9809,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getCollectionUsage", "group": null, "weight": 330, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-collection-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, @@ -9644,6 +9826,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getUsage" + }, "auth": { "Project": [] } @@ -9719,13 +9905,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 321, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", "rate-limit": 0, @@ -9792,13 +9978,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": null, "weight": 374, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, @@ -9875,13 +10061,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": null, "weight": 370, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, @@ -9979,13 +10165,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 371, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, @@ -10048,13 +10234,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": null, "weight": 372, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, @@ -10147,13 +10333,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": null, "weight": 373, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, @@ -10218,13 +10404,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listColumns", "group": "columns", "weight": 379, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -10302,13 +10488,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBooleanColumn", "group": "columns", "weight": 380, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, @@ -10408,13 +10594,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", "weight": 381, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, @@ -10519,13 +10705,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", "weight": 382, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, @@ -10625,13 +10811,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", "weight": 383, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, @@ -10736,13 +10922,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailColumn", "group": "columns", "weight": 384, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, @@ -10842,13 +11028,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailColumn", "group": "columns", "weight": 385, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, @@ -10953,13 +11139,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEnumColumn", "group": "columns", "weight": 386, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, @@ -11068,13 +11254,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEnumColumn", "group": "columns", "weight": 387, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, @@ -11188,13 +11374,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFloatColumn", "group": "columns", "weight": 388, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, @@ -11304,13 +11490,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFloatColumn", "group": "columns", "weight": 389, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, @@ -11425,13 +11611,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIntegerColumn", "group": "columns", "weight": 390, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, @@ -11541,13 +11727,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", "weight": 391, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, @@ -11662,13 +11848,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIpColumn", "group": "columns", "weight": 392, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, @@ -11768,13 +11954,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIpColumn", "group": "columns", "weight": 393, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, @@ -11879,13 +12065,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", "weight": 394, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, @@ -12010,13 +12196,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createStringColumn", "group": "columns", "weight": 396, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, @@ -12127,13 +12313,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStringColumn", "group": "columns", "weight": 397, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, @@ -12243,13 +12429,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createUrlColumn", "group": "columns", "weight": 398, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, @@ -12349,13 +12535,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateUrlColumn", "group": "columns", "weight": 399, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, @@ -12491,13 +12677,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getColumn", "group": "columns", "weight": 377, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, @@ -12562,13 +12748,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteColumn", "group": "columns", "weight": 378, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, @@ -12642,13 +12828,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", "weight": 395, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, @@ -12750,13 +12936,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 403, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -12832,13 +13018,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 400, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -12960,13 +13146,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 401, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -13031,13 +13217,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 402, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -13111,13 +13297,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "tables", "weight": 375, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", "rate-limit": 0, @@ -13194,13 +13380,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRows", "group": "rows", "weight": 412, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, @@ -13279,13 +13465,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRow", "group": "rows", "weight": 404, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, @@ -13442,13 +13628,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRows", "group": "rows", "weight": 409, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, @@ -13552,13 +13738,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRows", "group": "rows", "weight": 407, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, @@ -13646,13 +13832,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteRows", "group": "rows", "weight": 411, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, @@ -13737,13 +13923,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRow", "group": "rows", "weight": 405, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, @@ -13832,13 +14018,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRow", "group": "rows", "weight": 408, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, @@ -13957,13 +14143,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRow", "group": "rows", "weight": 406, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, @@ -14056,13 +14242,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRow", "group": "rows", "weight": 410, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, @@ -14140,13 +14326,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRowLogs", "group": "logs", "weight": 413, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-row-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", "rate-limit": 0, @@ -14233,13 +14419,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "decrementRowColumn", "group": "rows", "weight": 415, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, @@ -14345,13 +14531,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "incrementRowColumn", "group": "rows", "weight": 414, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, @@ -14457,13 +14643,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 376, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", "rate-limit": 0, @@ -14549,13 +14735,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDatabaseUsage", "group": null, "weight": 322, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-database-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, @@ -14631,13 +14817,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "functions", "weight": 424, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's functions. You can use the query params to filter your results.", "rate-limit": 0, @@ -14704,13 +14890,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "functions", "weight": 421, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", "rate-limit": 0, @@ -14937,13 +15123,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRuntimes", "group": "runtimes", "weight": 426, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-runtimes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all runtimes that are currently active on your instance.", "rate-limit": 0, @@ -14986,13 +15172,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "runtimes", "weight": 427, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed function specifications for this instance.", "rate-limit": 0, @@ -15036,13 +15222,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTemplates", "group": "templates", "weight": 450, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-templates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList available function templates. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", "rate-limit": 0, @@ -15136,13 +15322,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTemplate", "group": "templates", "weight": 449, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function template using ID. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", "rate-limit": 0, @@ -15196,13 +15382,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listUsage", "group": null, "weight": 443, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for all functions in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -15268,13 +15454,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "functions", "weight": 422, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function by its unique ID.", "rate-limit": 0, @@ -15327,13 +15513,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "functions", "weight": 423, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate function by its unique ID.", "rate-limit": 0, @@ -15557,13 +15743,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "functions", "weight": 425, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function by its unique ID.", "rate-limit": 0, @@ -15618,13 +15804,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", "weight": 430, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-function-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", "rate-limit": 0, @@ -15698,13 +15884,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 431, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the function's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -15781,13 +15967,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 428, "cookies": false, "type": "upload", - "deprecated": false, "demo": "functions\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "rate-limit": 0, @@ -15877,13 +16063,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 436, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -15962,13 +16148,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 433, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/functions#listTemplates) to find the template details.", "rate-limit": 0, @@ -16065,13 +16251,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 434, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -16162,13 +16348,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 429, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment by its unique ID.", "rate-limit": 0, @@ -16224,13 +16410,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 432, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a code deployment by its unique ID.", "rate-limit": 0, @@ -16288,13 +16474,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 435, "cookies": false, "type": "location", - "deprecated": false, "demo": "functions\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -16378,13 +16564,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 437, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -16449,13 +16635,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listExecutions", "group": "executions", "weight": 440, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-executions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -16524,13 +16710,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createExecution", "group": "executions", "weight": 438, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", "rate-limit": 0, @@ -16639,13 +16825,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getExecution", "group": "executions", "weight": 439, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.", "rate-limit": 0, @@ -16704,13 +16890,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteExecution", "group": "executions", "weight": 441, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function execution by its unique ID.", "rate-limit": 0, @@ -16775,13 +16961,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 442, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -16857,13 +17043,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 446, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific function.", "rate-limit": 0, @@ -16916,13 +17102,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 444, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", "rate-limit": 0, @@ -17007,13 +17193,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 445, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -17076,13 +17262,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 447, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -17167,13 +17353,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 448, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -17238,13 +17424,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "query", "group": "graphql", "weight": 254, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/query.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -17290,13 +17476,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "mutation", "group": "graphql", "weight": 253, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/mutation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -17342,13 +17528,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "health", "weight": 78, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", "rate-limit": 0, @@ -17391,13 +17577,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getAntivirus", "group": "health", "weight": 99, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-antivirus.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", "rate-limit": 0, @@ -17440,13 +17626,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCache", "group": "health", "weight": 81, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-cache.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", "rate-limit": 0, @@ -17489,13 +17675,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCertificate", "group": "health", "weight": 86, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-certificate.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", "rate-limit": 0, @@ -17549,13 +17735,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDB", "group": "health", "weight": 80, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-d-b.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, @@ -17598,13 +17784,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPubSub", "group": "health", "weight": 82, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-pub-sub.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", "rate-limit": 0, @@ -17647,13 +17833,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueBuilds", "group": "queue", "weight": 88, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-builds.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", "rate-limit": 0, @@ -17709,13 +17895,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueCertificates", "group": "queue", "weight": 87, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-certificates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", "rate-limit": 0, @@ -17771,13 +17957,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDatabases", "group": "queue", "weight": 89, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-databases.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", "rate-limit": 0, @@ -17844,13 +18030,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDeletes", "group": "queue", "weight": 90, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-deletes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", "rate-limit": 0, @@ -17906,13 +18092,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFailedJobs", "group": "queue", "weight": 100, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-failed-jobs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", "rate-limit": 0, @@ -17994,13 +18180,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueFunctions", "group": "queue", "weight": 94, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-functions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", "rate-limit": 0, @@ -18056,13 +18242,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueLogs", "group": "queue", "weight": 85, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", "rate-limit": 0, @@ -18118,13 +18304,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMails", "group": "queue", "weight": 91, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-mails.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", "rate-limit": 0, @@ -18180,13 +18366,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMessaging", "group": "queue", "weight": 92, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-messaging.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", "rate-limit": 0, @@ -18242,13 +18428,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMigrations", "group": "queue", "weight": 93, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-migrations.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", "rate-limit": 0, @@ -18304,13 +18490,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", "weight": 95, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-stats-resources.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", "rate-limit": 0, @@ -18366,13 +18552,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueUsage", "group": "queue", "weight": 96, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", "rate-limit": 0, @@ -18428,13 +18614,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", "weight": 84, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-webhooks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", "rate-limit": 0, @@ -18490,13 +18676,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorage", "group": "storage", "weight": 98, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", "rate-limit": 0, @@ -18539,13 +18725,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorageLocal", "group": "storage", "weight": 97, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage-local.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", "rate-limit": 0, @@ -18588,13 +18774,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTime", "group": "health", "weight": 83, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-time.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", "rate-limit": 0, @@ -18637,13 +18823,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 70, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "rate-limit": 0, @@ -18689,13 +18875,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCodes", "group": null, "weight": 71, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "rate-limit": 0, @@ -18741,13 +18927,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listContinents", "group": null, "weight": 75, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-continents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "rate-limit": 0, @@ -18793,13 +18979,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountries", "group": null, "weight": 72, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "rate-limit": 0, @@ -18845,13 +19031,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesEU", "group": null, "weight": 73, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-e-u.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, @@ -18897,13 +19083,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesPhones", "group": null, "weight": 74, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-phones.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "rate-limit": 0, @@ -18949,13 +19135,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCurrencies", "group": null, "weight": 76, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-currencies.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "rate-limit": 0, @@ -19001,13 +19187,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLanguages", "group": null, "weight": 77, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-languages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "rate-limit": 0, @@ -19053,13 +19239,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessages", "group": "messages", "weight": 308, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-messages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", "rate-limit": 0, @@ -19129,13 +19315,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmail", "group": "messages", "weight": 305, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", "rate-limit": 0, @@ -19273,13 +19459,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "messages", "weight": 312, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", "rate-limit": 0, @@ -19419,13 +19605,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPush", "group": "messages", "weight": 307, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", "rate-limit": 0, @@ -19593,13 +19779,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePush", "group": "messages", "weight": 314, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", "rate-limit": 0, @@ -19771,13 +19957,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSms", "group": "messages", "weight": 306, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", "rate-limit": 0, @@ -19880,13 +20066,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSms", "group": "messages", "weight": 313, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, @@ -19992,13 +20178,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMessage", "group": "messages", "weight": 311, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-message.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", "rate-limit": 0, @@ -20045,13 +20231,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "messages", "weight": 315, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", "rate-limit": 0, @@ -20107,13 +20293,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessageLogs", "group": "logs", "weight": 309, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-message-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", "rate-limit": 0, @@ -20182,13 +20368,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "messages", "weight": 310, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", "rate-limit": 0, @@ -20257,13 +20443,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviders", "group": "providers", "weight": 280, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-providers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", "rate-limit": 0, @@ -20333,13 +20519,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createApnsProvider", "group": "providers", "weight": 279, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", "rate-limit": 0, @@ -20438,13 +20624,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", "weight": 292, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", "rate-limit": 0, @@ -20546,13 +20732,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFcmProvider", "group": "providers", "weight": 278, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", "rate-limit": 0, @@ -20631,13 +20817,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", "weight": 291, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", "rate-limit": 0, @@ -20719,13 +20905,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMailgunProvider", "group": "providers", "weight": 270, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", "rate-limit": 0, @@ -20834,13 +21020,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", "weight": 283, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", "rate-limit": 0, @@ -20952,13 +21138,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMsg91Provider", "group": "providers", "weight": 273, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, @@ -21047,13 +21233,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", "weight": 286, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, @@ -21145,13 +21331,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSendgridProvider", "group": "providers", "weight": 271, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "rate-limit": 0, @@ -21250,13 +21436,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", "weight": 284, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "rate-limit": 0, @@ -21358,13 +21544,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", "weight": 272, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", "rate-limit": 0, @@ -21501,13 +21687,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", "weight": 285, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", "rate-limit": 0, @@ -21646,13 +21832,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTelesignProvider", "group": "providers", "weight": 274, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", "rate-limit": 0, @@ -21741,13 +21927,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", "weight": 287, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", "rate-limit": 0, @@ -21839,13 +22025,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", "weight": 275, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", "rate-limit": 0, @@ -21934,13 +22120,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", "weight": 288, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", "rate-limit": 0, @@ -22032,13 +22218,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTwilioProvider", "group": "providers", "weight": 276, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", "rate-limit": 0, @@ -22127,13 +22313,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", "weight": 289, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", "rate-limit": 0, @@ -22225,13 +22411,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVonageProvider", "group": "providers", "weight": 277, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", "rate-limit": 0, @@ -22320,13 +22506,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVonageProvider", "group": "providers", "weight": 290, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", "rate-limit": 0, @@ -22418,13 +22604,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getProvider", "group": "providers", "weight": 282, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", "rate-limit": 0, @@ -22471,13 +22657,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteProvider", "group": "providers", "weight": 293, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", "rate-limit": 0, @@ -22533,13 +22719,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviderLogs", "group": "providers", "weight": 281, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-provider-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", "rate-limit": 0, @@ -22608,13 +22794,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", "weight": 302, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscriber-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", "rate-limit": 0, @@ -22683,13 +22869,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopics", "group": "topics", "weight": 295, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topics.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", "rate-limit": 0, @@ -22757,13 +22943,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTopic", "group": "topics", "weight": 294, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", "rate-limit": 0, @@ -22840,13 +23026,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTopic", "group": "topics", "weight": 297, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", "rate-limit": 0, @@ -22900,13 +23086,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTopic", "group": "topics", "weight": 298, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", "rate-limit": 0, @@ -22977,13 +23163,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTopic", "group": "topics", "weight": 299, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", "rate-limit": 0, @@ -23039,13 +23225,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopicLogs", "group": "topics", "weight": 296, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topic-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", "rate-limit": 0, @@ -23114,13 +23300,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscribers", "group": "subscribers", "weight": 301, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscribers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "rate-limit": 0, @@ -23198,13 +23384,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSubscriber", "group": "subscribers", "weight": 300, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "rate-limit": 0, @@ -23288,13 +23474,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSubscriber", "group": "subscribers", "weight": 303, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "rate-limit": 0, @@ -23351,13 +23537,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", "weight": 304, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "rate-limit": 0, @@ -23426,13 +23612,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": null, "weight": 262, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/list-migrations.md", "rate-limit": 0, @@ -23500,13 +23686,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAppwriteMigration", "group": null, "weight": 257, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-appwrite-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite.md", "rate-limit": 0, @@ -23588,13 +23774,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getAppwriteReport", "group": null, "weight": 264, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-appwrite-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite-report.md", "rate-limit": 0, @@ -23681,13 +23867,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createCsvMigration", "group": null, "weight": 261, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-csv-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv.md", "rate-limit": 0, @@ -23760,13 +23946,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFirebaseMigration", "group": null, "weight": 258, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-firebase-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase.md", "rate-limit": 0, @@ -23836,13 +24022,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFirebaseReport", "group": null, "weight": 265, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-firebase-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase-report.md", "rate-limit": 0, @@ -23908,13 +24094,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createNHostMigration", "group": null, "weight": 260, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-n-host-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost.md", "rate-limit": 0, @@ -24019,13 +24205,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getNHostReport", "group": null, "weight": 267, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-n-host-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost-report.md", "rate-limit": 0, @@ -24152,13 +24338,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSupabaseMigration", "group": null, "weight": 259, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-supabase-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase.md", "rate-limit": 0, @@ -24257,13 +24443,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSupabaseReport", "group": null, "weight": 266, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-supabase-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase-report.md", "rate-limit": 0, @@ -24381,13 +24567,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 263, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/get-migration.md", "rate-limit": 0, @@ -24439,13 +24625,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "retry", "group": null, "weight": 268, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/retry.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/retry-migration.md", "rate-limit": 0, @@ -24490,13 +24676,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": null, "weight": 269, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/delete-migration.md", "rate-limit": 0, @@ -24550,13 +24736,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 149, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", "rate-limit": 0, @@ -24638,13 +24824,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": null, "weight": 151, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/list-variables.md", "rate-limit": 0, @@ -24684,13 +24870,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": null, "weight": 150, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/create-variable.md", "rate-limit": 0, @@ -24762,13 +24948,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": null, "weight": 152, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-variable.md", "rate-limit": 0, @@ -24820,13 +25006,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": null, "weight": 153, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/update-variable.md", "rate-limit": 0, @@ -24900,13 +25086,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": null, "weight": 154, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/delete-variable.md", "rate-limit": 0, @@ -24960,13 +25146,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "projects", "weight": 103, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list.md", "rate-limit": 0, @@ -25032,13 +25218,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "projects", "weight": 102, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", "rate-limit": 0, @@ -25166,13 +25352,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "projects", "weight": 104, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", "rate-limit": 0, @@ -25224,13 +25410,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "projects", "weight": 105, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", "rate-limit": 0, @@ -25339,13 +25525,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "projects", "weight": 122, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete.md", "rate-limit": 0, @@ -25399,13 +25585,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApiStatus", "group": "projects", "weight": 109, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-api-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status.md", "rate-limit": 0, @@ -25491,13 +25677,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", "weight": 110, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-api-status-all.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status-all.md", "rate-limit": 0, @@ -25570,13 +25756,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthDuration", "group": "auth", "weight": 115, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-duration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-duration.md", "rate-limit": 0, @@ -25649,13 +25835,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthLimit", "group": "auth", "weight": 114, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-limit.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-limit.md", "rate-limit": 0, @@ -25728,13 +25914,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", "weight": 120, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-sessions-limit.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-sessions-limit.md", "rate-limit": 0, @@ -25807,13 +25993,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", "weight": 113, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-memberships-privacy.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-memberships-privacy.md", "rate-limit": 0, @@ -25898,13 +26084,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMockNumbers", "group": "auth", "weight": 121, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-mock-numbers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-mock-numbers.md", "rate-limit": 0, @@ -25980,13 +26166,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", "weight": 118, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-password-dictionary.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-dictionary.md", "rate-limit": 0, @@ -26059,13 +26245,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", "weight": 117, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-password-history.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-history.md", "rate-limit": 0, @@ -26138,13 +26324,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", "weight": 119, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-personal-data-check.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-personal-data-check.md", "rate-limit": 0, @@ -26217,13 +26403,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", "weight": 112, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-session-alerts.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-alerts.md", "rate-limit": 0, @@ -26296,13 +26482,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", "weight": 148, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-session-invalidation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-invalidation.md", "rate-limit": 0, @@ -26375,13 +26561,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthStatus", "group": "auth", "weight": 116, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-status.md", "rate-limit": 0, @@ -26475,13 +26661,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDevKeys", "group": "devKeys", "weight": 419, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-dev-keys.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", "rate-limit": 0, @@ -26543,13 +26729,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDevKey", "group": "devKeys", "weight": 416, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", "rate-limit": 0, @@ -26628,13 +26814,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDevKey", "group": "devKeys", "weight": 418, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a project\\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.", "rate-limit": 0, @@ -26696,13 +26882,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDevKey", "group": "devKeys", "weight": 417, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a project\\'s dev key by its unique ID. Use this endpoint to update a project\\'s dev key name or expiration time.'", "rate-limit": 0, @@ -26782,13 +26968,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", "weight": 420, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a project\\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.", "rate-limit": 0, @@ -26852,13 +27038,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "auth", "weight": 134, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", "rate-limit": 0, @@ -26939,13 +27125,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listKeys", "group": "keys", "weight": 130, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-keys.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-keys.md", "rate-limit": 0, @@ -26997,13 +27183,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createKey", "group": "keys", "weight": 129, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-key.md", "rate-limit": 0, @@ -27090,13 +27276,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getKey", "group": "keys", "weight": 131, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-key.md", "rate-limit": 0, @@ -27158,13 +27344,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateKey", "group": "keys", "weight": 132, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-key.md", "rate-limit": 0, @@ -27252,13 +27438,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteKey", "group": "keys", "weight": 133, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-key.md", "rate-limit": 0, @@ -27322,13 +27508,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateOAuth2", "group": "auth", "weight": 111, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-o-auth2.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", "rate-limit": 0, @@ -27460,13 +27646,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listPlatforms", "group": "platforms", "weight": 136, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-platforms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-platforms.md", "rate-limit": 0, @@ -27518,13 +27704,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPlatform", "group": "platforms", "weight": 135, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-platform.md", "rate-limit": 0, @@ -27637,13 +27823,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPlatform", "group": "platforms", "weight": 137, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-platform.md", "rate-limit": 0, @@ -27705,13 +27891,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePlatform", "group": "platforms", "weight": 138, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-platform.md", "rate-limit": 0, @@ -27800,13 +27986,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deletePlatform", "group": "platforms", "weight": 139, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-platform.md", "rate-limit": 0, @@ -27870,13 +28056,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateServiceStatus", "group": "projects", "weight": 107, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-service-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status.md", "rate-limit": 0, @@ -27972,13 +28158,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", "weight": 108, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-service-status-all.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status-all.md", "rate-limit": 0, @@ -28051,13 +28237,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmtp", "group": "templates", "weight": 140, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-smtp.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-smtp.md", "rate-limit": 0, @@ -28169,13 +28355,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createSmtpTest", "group": "templates", "weight": 141, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-smtp-test.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-smtp-test.md", "rate-limit": 0, @@ -28300,13 +28486,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTeam", "group": "projects", "weight": 106, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-team.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", "rate-limit": 0, @@ -28379,13 +28565,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getEmailTemplate", "group": "templates", "weight": 143, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-email-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-email-template.md", "rate-limit": 0, @@ -28603,13 +28789,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", "weight": 145, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-email-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-email-template.md", "rate-limit": 0, @@ -28867,13 +29053,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", "weight": 147, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-email-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-email-template.md", "rate-limit": 0, @@ -29093,13 +29279,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSmsTemplate", "group": "templates", "weight": 142, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-sms-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-sms-template.md", "rate-limit": 0, @@ -29314,13 +29500,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", "weight": 144, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-sms-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-sms-template.md", "rate-limit": 0, @@ -29554,13 +29740,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", "weight": 146, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-sms-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-sms-template.md", "rate-limit": 0, @@ -29777,13 +29963,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listWebhooks", "group": "webhooks", "weight": 124, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-webhooks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-webhooks.md", "rate-limit": 0, @@ -29835,13 +30021,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createWebhook", "group": "webhooks", "weight": 123, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-webhook.md", "rate-limit": 0, @@ -29950,13 +30136,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getWebhook", "group": "webhooks", "weight": 125, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-webhook.md", "rate-limit": 0, @@ -30018,13 +30204,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateWebhook", "group": "webhooks", "weight": 126, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook.md", "rate-limit": 0, @@ -30134,13 +30320,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", "weight": 128, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-webhook.md", "rate-limit": 0, @@ -30204,13 +30390,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", "weight": 127, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-webhook-signature.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook-signature.md", "rate-limit": 0, @@ -30274,13 +30460,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRules", "group": null, "weight": 241, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/list-rules.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/list-rules.md", "rate-limit": 0, @@ -30348,13 +30534,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAPIRule", "group": null, "weight": 481, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-a-p-i-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for serving Appwrite's API on custom domain.", "rate-limit": 10, @@ -30415,13 +30601,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFunctionRule", "group": null, "weight": 483, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-function-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for executing Appwrite Function on custom domain.", "rate-limit": 10, @@ -30493,13 +30679,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRedirectRule", "group": null, "weight": 484, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-redirect-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for to redirect from custom domain to another domain.", "rate-limit": 10, @@ -30606,13 +30792,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSiteRule", "group": null, "weight": 482, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-site-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for serving Appwrite Site on custom domain.", "rate-limit": 10, @@ -30684,13 +30870,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRule", "group": null, "weight": 242, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/get-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/get-rule.md", "rate-limit": 0, @@ -30735,13 +30921,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRule", "group": null, "weight": 243, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/delete-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/delete-rule.md", "rate-limit": 0, @@ -30795,13 +30981,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRuleVerification", "group": null, "weight": 244, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/update-rule-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/update-rule-verification.md", "rate-limit": 0, @@ -30855,13 +31041,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "sites", "weight": 453, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's sites. You can use the query params to filter your results.", "rate-limit": 0, @@ -30925,13 +31111,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "sites", "weight": 451, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site.", "rate-limit": 0, @@ -31174,13 +31360,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFrameworks", "group": "frameworks", "weight": 456, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-frameworks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all frameworks that are currently available on the server instance.", "rate-limit": 0, @@ -31223,13 +31409,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "frameworks", "weight": 479, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed site specifications for this instance.", "rate-limit": 0, @@ -31273,13 +31459,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTemplates", "group": "templates", "weight": 475, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-templates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList available site templates. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", "rate-limit": 0, @@ -31373,13 +31559,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTemplate", "group": "templates", "weight": 476, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site template using ID. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", "rate-limit": 0, @@ -31433,13 +31619,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listUsage", "group": null, "weight": 477, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -31505,13 +31691,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "sites", "weight": 452, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site by its unique ID.", "rate-limit": 0, @@ -31564,13 +31750,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "sites", "weight": 454, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate site by its unique ID.", "rate-limit": 0, @@ -31809,13 +31995,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "sites", "weight": 455, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site by its unique ID.", "rate-limit": 0, @@ -31870,13 +32056,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", "weight": 462, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-site-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", "rate-limit": 0, @@ -31950,13 +32136,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 461, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the site's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -32033,13 +32219,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 457, "cookies": false, "type": "upload", - "deprecated": false, "demo": "sites\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID.", "rate-limit": 0, @@ -32134,13 +32320,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 465, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -32214,13 +32400,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 458, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/sites#listTemplates) to find the template details.", "rate-limit": 0, @@ -32317,13 +32503,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 459, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -32415,13 +32601,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 460, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment by its unique ID.", "rate-limit": 0, @@ -32477,13 +32663,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 463, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site deployment by its unique ID.", "rate-limit": 0, @@ -32541,13 +32727,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 464, "cookies": false, "type": "location", - "deprecated": false, "demo": "sites\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -32631,13 +32817,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 466, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -32702,13 +32888,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 468, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all site logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -32773,13 +32959,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getLog", "group": "logs", "weight": 467, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site request log by its unique ID.", "rate-limit": 0, @@ -32835,13 +33021,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteLog", "group": "logs", "weight": 469, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site log by its unique ID.", "rate-limit": 0, @@ -32906,13 +33092,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 478, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -32988,13 +33174,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 472, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific site.", "rate-limit": 0, @@ -33047,13 +33233,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 470, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", "rate-limit": 0, @@ -33138,13 +33324,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 471, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -33207,13 +33393,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 473, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -33298,13 +33484,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 474, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -33369,13 +33555,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listBuckets", "group": "buckets", "weight": 156, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-buckets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", "rate-limit": 0, @@ -33442,13 +33628,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBucket", "group": "buckets", "weight": 155, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/create-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", "rate-limit": 0, @@ -33569,13 +33755,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBucket", "group": "buckets", "weight": 157, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", "rate-limit": 0, @@ -33628,13 +33814,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBucket", "group": "buckets", "weight": 158, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", "rate-limit": 0, @@ -33752,13 +33938,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteBucket", "group": "buckets", "weight": 159, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", "rate-limit": 0, @@ -33813,13 +33999,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFiles", "group": "files", "weight": 161, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-files.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "rate-limit": 0, @@ -33899,13 +34085,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFile", "group": "files", "weight": 160, "cookies": false, "type": "upload", - "deprecated": false, "demo": "storage\/create-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "rate-limit": 60, @@ -33997,13 +34183,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFile", "group": "files", "weight": 162, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "rate-limit": 0, @@ -34069,13 +34255,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFile", "group": "files", "weight": 167, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "rate-limit": 60, @@ -34158,13 +34344,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteFile", "group": "files", "weight": 168, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", "rate-limit": 60, @@ -34225,13 +34411,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getFileDownload", "group": "files", "weight": 164, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "rate-limit": 0, @@ -34303,13 +34489,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFilePreview", "group": "files", "weight": 163, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-preview.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "rate-limit": 0, @@ -34531,13 +34717,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getFileView", "group": "files", "weight": 165, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-view.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "rate-limit": 0, @@ -34616,13 +34802,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 169, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", "rate-limit": 0, @@ -34688,13 +34874,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBucketUsage", "group": null, "weight": 170, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-bucket-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", "rate-limit": 0, @@ -34770,13 +34956,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "teams", "weight": 172, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "rate-limit": 0, @@ -34846,13 +35032,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "teams", "weight": 171, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "rate-limit": 0, @@ -34931,13 +35117,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "teams", "weight": 173, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "rate-limit": 0, @@ -34993,13 +35179,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "teams", "weight": 175, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "rate-limit": 0, @@ -35067,13 +35253,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "teams", "weight": 177, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "rate-limit": 0, @@ -35131,13 +35317,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 184, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md", "rate-limit": 0, @@ -35204,13 +35390,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 179, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "rate-limit": 0, @@ -35290,13 +35476,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMembership", "group": "memberships", "weight": 178, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "rate-limit": 10, @@ -35401,13 +35587,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMembership", "group": "memberships", "weight": 180, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "rate-limit": 0, @@ -35473,13 +35659,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembership", "group": "memberships", "weight": 181, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "rate-limit": 0, @@ -35560,13 +35746,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMembership", "group": "memberships", "weight": 183, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "rate-limit": 0, @@ -35634,13 +35820,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", "weight": 182, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "rate-limit": 0, @@ -35731,13 +35917,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "teams", "weight": 174, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "rate-limit": 0, @@ -35791,13 +35977,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "teams", "weight": 176, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "rate-limit": 0, @@ -35872,13 +36058,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "files", "weight": 487, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the tokens created for a specific file or bucket. You can use the query params to filter your results.", "rate-limit": 0, @@ -35952,13 +36138,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFileToken", "group": "files", "weight": 485, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/create-file-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, @@ -36041,13 +36227,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "tokens", "weight": 486, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a token by its unique ID.", "rate-limit": 0, @@ -36101,13 +36287,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "tokens", "weight": 488, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date.", "rate-limit": 60, @@ -36171,13 +36357,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "tokens", "weight": 489, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a token by its unique ID.", "rate-limit": 60, @@ -36233,13 +36419,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "users", "weight": 194, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", "rate-limit": 0, @@ -36306,13 +36492,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "users", "weight": 185, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", "rate-limit": 0, @@ -36394,13 +36580,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createArgon2User", "group": "users", "weight": 188, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-argon2user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, @@ -36479,13 +36665,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBcryptUser", "group": "users", "weight": 186, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-bcrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", "rate-limit": 0, @@ -36564,13 +36750,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 202, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", "rate-limit": 0, @@ -36632,13 +36818,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 225, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", "rate-limit": 0, @@ -36693,13 +36879,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMD5User", "group": "users", "weight": 187, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-m-d5user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, @@ -36778,13 +36964,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPHPassUser", "group": "users", "weight": 190, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-p-h-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, @@ -36863,13 +37049,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptUser", "group": "users", "weight": 191, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", "rate-limit": 0, @@ -36978,13 +37164,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", "weight": 192, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-modified-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", "rate-limit": 0, @@ -37081,13 +37267,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSHAUser", "group": "users", "weight": 189, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-s-h-a-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, @@ -37186,13 +37372,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 227, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", "rate-limit": 0, @@ -37258,13 +37444,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "users", "weight": 195, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", "rate-limit": 0, @@ -37310,13 +37496,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "users", "weight": 223, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", "rate-limit": 0, @@ -37371,13 +37557,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "users", "weight": 208, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", "rate-limit": 0, @@ -37451,13 +37637,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "sessions", "weight": 226, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, @@ -37533,13 +37719,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateLabels", "group": "users", "weight": 204, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-labels.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", "rate-limit": 0, @@ -37616,13 +37802,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 200, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", "rate-limit": 0, @@ -37690,13 +37876,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 199, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", "rate-limit": 0, @@ -37775,13 +37961,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfa", "group": "users", "weight": 213, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", "rate-limit": 0, @@ -37848,13 +38034,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 218, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -37924,13 +38110,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 214, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", "rate-limit": 0, @@ -37985,13 +38171,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 215, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -38044,13 +38230,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 217, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -38103,13 +38289,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 216, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -38164,13 +38350,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "users", "weight": 206, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", "rate-limit": 0, @@ -38244,13 +38430,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "users", "weight": 207, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", "rate-limit": 0, @@ -38324,13 +38510,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "users", "weight": 209, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", "rate-limit": 0, @@ -38404,13 +38590,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "users", "weight": 196, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", "rate-limit": 0, @@ -38463,13 +38649,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "users", "weight": 211, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", "rate-limit": 0, @@ -38543,13 +38729,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 198, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", "rate-limit": 0, @@ -38602,13 +38788,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 219, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", "rate-limit": 0, @@ -38654,13 +38840,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 222, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", "rate-limit": 0, @@ -38708,13 +38894,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 221, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", "rate-limit": 0, @@ -38779,13 +38965,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "users", "weight": 203, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", "rate-limit": 0, @@ -38859,13 +39045,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "targets", "weight": 201, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", "rate-limit": 0, @@ -38932,13 +39118,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTarget", "group": "targets", "weight": 193, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", "rate-limit": 0, @@ -39042,13 +39228,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTarget", "group": "targets", "weight": 197, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", "rate-limit": 0, @@ -39112,13 +39298,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTarget", "group": "targets", "weight": 212, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", "rate-limit": 0, @@ -39201,13 +39387,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTarget", "group": "targets", "weight": 224, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", "rate-limit": 0, @@ -39273,13 +39459,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createToken", "group": "sessions", "weight": 220, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", "rate-limit": 0, @@ -39355,13 +39541,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailVerification", "group": "users", "weight": 210, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", "rate-limit": 0, @@ -39435,13 +39621,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "users", "weight": 205, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", "rate-limit": 0, @@ -39515,13 +39701,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", "weight": 231, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/create-repository-detection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", "rate-limit": 0, @@ -39611,13 +39797,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRepositories", "group": "repositories", "weight": 232, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/list-repositories.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", "rate-limit": 0, @@ -39696,13 +39882,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRepository", "group": "repositories", "weight": 233, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/create-repository.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", "rate-limit": 0, @@ -39781,13 +39967,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRepository", "group": "repositories", "weight": 234, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/get-repository.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", "rate-limit": 0, @@ -39851,13 +40037,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", "weight": 235, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/list-repository-branches.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", "rate-limit": 0, @@ -39921,13 +40107,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", "weight": 230, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/get-repository-contents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", "rate-limit": 0, @@ -40006,13 +40192,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", "weight": 240, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/update-external-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", "rate-limit": 0, @@ -40095,13 +40281,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listInstallations", "group": "installations", "weight": 237, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/list-installations.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-installations.md", "rate-limit": 0, @@ -40169,13 +40355,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getInstallation", "group": "installations", "weight": 238, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/get-installation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-installation.md", "rate-limit": 0, @@ -40220,13 +40406,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteInstallation", "group": "installations", "weight": 239, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/delete-installation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/delete-installation.md", "rate-limit": 0, diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index f849e89a4e..09572fe6b5 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -44,13 +44,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "account", "weight": 10, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", "rate-limit": 0, @@ -94,13 +94,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "account", "weight": 9, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", "rate-limit": 10, @@ -179,13 +179,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "account", "weight": 35, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "rate-limit": 0, @@ -256,13 +256,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 58, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "rate-limit": 0, @@ -316,13 +316,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 59, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "rate-limit": 0, @@ -380,13 +380,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "tokens", "weight": 30, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, @@ -429,13 +429,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 32, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "rate-limit": 0, @@ -496,13 +496,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMFA", "group": "mfa", "weight": 45, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-m-f-a.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, @@ -567,13 +567,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", "weight": 47, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "rate-limit": 0, @@ -634,13 +634,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", "weight": 48, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "rate-limit": 0, @@ -713,13 +713,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 52, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -782,13 +782,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", "weight": 53, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "rate-limit": 10, @@ -856,13 +856,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", "weight": 54, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", "rate-limit": 10, @@ -933,13 +933,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 46, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", "rate-limit": 0, @@ -985,13 +985,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 51, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -1035,13 +1035,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 49, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -1085,13 +1085,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 50, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -1137,13 +1137,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "account", "weight": 33, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "rate-limit": 0, @@ -1208,13 +1208,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "account", "weight": 34, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "rate-limit": 10, @@ -1284,13 +1284,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "account", "weight": 36, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "rate-limit": 0, @@ -1361,13 +1361,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "account", "weight": 31, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "rate-limit": 0, @@ -1411,13 +1411,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "account", "weight": 37, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "rate-limit": 0, @@ -1482,13 +1482,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRecovery", "group": "recovery", "weight": 39, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", "rate-limit": 10, @@ -1560,13 +1560,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRecovery", "group": "recovery", "weight": 40, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "rate-limit": 10, @@ -1643,13 +1643,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 12, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "rate-limit": 0, @@ -1686,13 +1686,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 13, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", "rate-limit": 100, @@ -1738,13 +1738,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAnonymousSession", "group": "sessions", "weight": 18, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-anonymous-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", "rate-limit": 50, @@ -1787,13 +1787,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailPasswordSession", "group": "sessions", "weight": 17, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-password-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "rate-limit": 10, @@ -1861,13 +1861,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateMagicURLSession", "group": "sessions", "weight": 27, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-magic-u-r-l-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1879,6 +1879,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -1935,13 +1936,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updatePhoneSession", "group": "sessions", "weight": 28, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-phone-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1953,6 +1954,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2009,13 +2011,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 19, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2083,13 +2085,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSession", "group": "sessions", "weight": 14, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", "rate-limit": 0, @@ -2145,13 +2147,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSession", "group": "sessions", "weight": 16, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", "rate-limit": 10, @@ -2200,13 +2202,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 15, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", "rate-limit": 100, @@ -2264,13 +2266,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "account", "weight": 38, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", "rate-limit": 0, @@ -2316,13 +2318,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailToken", "group": "tokens", "weight": 26, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", "rate-limit": 10, @@ -2398,13 +2400,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMagicURLToken", "group": "tokens", "weight": 25, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-magic-u-r-l-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, @@ -2478,13 +2480,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Token", "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, @@ -2620,13 +2622,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneToken", "group": "tokens", "weight": 29, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", "rate-limit": 10, @@ -2697,13 +2699,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVerification", "group": "verification", "weight": 41, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", "rate-limit": 10, @@ -2766,13 +2768,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVerification", "group": "verification", "weight": 42, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", "rate-limit": 10, @@ -2843,13 +2845,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneVerification", "group": "verification", "weight": 43, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", "rate-limit": 10, @@ -2896,13 +2898,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "verification", "weight": 44, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", "rate-limit": 10, @@ -2966,13 +2968,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getBrowser", "group": null, "weight": 61, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-browser.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "rate-limit": 0, @@ -3094,13 +3096,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getCreditCard", "group": null, "weight": 60, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-credit-card.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "rate-limit": 0, @@ -3228,13 +3230,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFavicon", "group": null, "weight": 64, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-favicon.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "rate-limit": 0, @@ -3288,13 +3290,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFlag", "group": null, "weight": 62, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-flag.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "rate-limit": 0, @@ -3778,13 +3780,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getImage", "group": null, "weight": 63, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-image.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "rate-limit": 0, @@ -3862,13 +3864,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getInitials", "group": null, "weight": 66, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-initials.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "rate-limit": 0, @@ -3956,13 +3958,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getQR", "group": null, "weight": 65, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-q-r.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, @@ -4057,13 +4059,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "databases", "weight": 320, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", "rate-limit": 0, @@ -4131,13 +4133,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "databases", "weight": 316, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", "rate-limit": 0, @@ -4211,13 +4213,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "databases", "weight": 317, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", "rate-limit": 0, @@ -4271,13 +4273,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "databases", "weight": 318, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", "rate-limit": 0, @@ -4348,13 +4350,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "databases", "weight": 319, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", "rate-limit": 0, @@ -4410,13 +4412,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listCollections", "group": "collections", "weight": 328, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4427,6 +4429,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.list" + }, "auth": { "Project": [], "Key": [] @@ -4494,13 +4500,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createCollection", "group": "collections", "weight": 324, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -4511,6 +4517,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.create" + }, "auth": { "Project": [], "Key": [] @@ -4599,13 +4609,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getCollection", "group": "collections", "weight": 325, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -4616,6 +4626,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.get" + }, "auth": { "Project": [], "Key": [] @@ -4669,13 +4683,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateCollection", "group": "collections", "weight": 326, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -4686,6 +4700,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.update" + }, "auth": { "Project": [], "Key": [] @@ -4769,13 +4787,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteCollection", "group": "collections", "weight": 327, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -4786,6 +4804,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.delete" + }, "auth": { "Project": [], "Key": [] @@ -4841,13 +4863,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listAttributes", "group": "attributes", "weight": 345, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -4858,6 +4880,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumns" + }, "auth": { "Project": [], "Key": [] @@ -4926,13 +4952,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", "weight": 346, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -4943,6 +4969,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createBooleanColumn" + }, "auth": { "Project": [], "Key": [] @@ -5033,13 +5063,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", "weight": 347, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5050,6 +5080,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateBooleanColumn" + }, "auth": { "Project": [], "Key": [] @@ -5145,13 +5179,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", "weight": 348, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5162,6 +5196,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createDatetimeColumn" + }, "auth": { "Project": [], "Key": [] @@ -5252,13 +5290,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", "weight": 349, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5269,6 +5307,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn" + }, "auth": { "Project": [], "Key": [] @@ -5364,13 +5406,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", "weight": 350, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5381,6 +5423,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEmailColumn" + }, "auth": { "Project": [], "Key": [] @@ -5471,13 +5517,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", "weight": 351, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -5488,6 +5534,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEmailColumn" + }, "auth": { "Project": [], "Key": [] @@ -5583,13 +5633,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", "weight": 352, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -5600,6 +5650,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEnumColumn" + }, "auth": { "Project": [], "Key": [] @@ -5699,13 +5753,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", "weight": 353, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -5716,6 +5770,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEnumColumn" + }, "auth": { "Project": [], "Key": [] @@ -5820,13 +5878,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", "weight": 354, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -5837,6 +5895,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createFloatColumn" + }, "auth": { "Project": [], "Key": [] @@ -5937,13 +5999,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", "weight": 355, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -5954,6 +6016,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateFloatColumn" + }, "auth": { "Project": [], "Key": [] @@ -6059,13 +6125,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", "weight": 356, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6076,6 +6142,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIntegerColumn" + }, "auth": { "Project": [], "Key": [] @@ -6176,13 +6246,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", "weight": 357, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6193,6 +6263,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIntegerColumn" + }, "auth": { "Project": [], "Key": [] @@ -6298,13 +6372,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIpAttribute", "group": "attributes", "weight": 358, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6315,6 +6389,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIpColumn" + }, "auth": { "Project": [], "Key": [] @@ -6405,13 +6483,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", "weight": 359, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6422,6 +6500,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIpColumn" + }, "auth": { "Project": [], "Key": [] @@ -6517,13 +6599,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", "weight": 360, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -6534,6 +6616,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRelationshipColumn" + }, "auth": { "Project": [], "Key": [] @@ -6649,13 +6735,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createStringAttribute", "group": "attributes", "weight": 362, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -6666,6 +6752,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createStringColumn" + }, "auth": { "Project": [], "Key": [] @@ -6767,13 +6857,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", "weight": 363, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -6784,6 +6874,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateStringColumn" + }, "auth": { "Project": [], "Key": [] @@ -6884,13 +6978,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", "weight": 364, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -6901,6 +6995,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createUrlColumn" + }, "auth": { "Project": [], "Key": [] @@ -6991,13 +7089,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", "weight": 365, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7008,6 +7106,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateUrlColumn" + }, "auth": { "Project": [], "Key": [] @@ -7134,13 +7236,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getAttribute", "group": "attributes", "weight": 343, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7151,6 +7253,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumn" + }, "auth": { "Project": [], "Key": [] @@ -7206,13 +7312,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteAttribute", "group": "attributes", "weight": 344, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7223,6 +7329,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumn" + }, "auth": { "Project": [], "Key": [] @@ -7287,13 +7397,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", "weight": 361, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7304,6 +7414,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn" + }, "auth": { "Project": [], "Key": [] @@ -7396,13 +7510,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocuments", "group": "documents", "weight": 339, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7415,6 +7529,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "auth": { "Project": [], "Session": [] @@ -7483,13 +7601,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDocument", "group": "documents", "weight": 331, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -7502,6 +7620,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "methods": [ { "name": "createDocument", @@ -7648,13 +7770,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocuments", "group": "documents", "weight": 336, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -7666,6 +7788,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRows" + }, "methods": [ { "name": "upsertDocuments", @@ -7759,13 +7885,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocuments", "group": "documents", "weight": 334, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -7777,6 +7903,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRows" + }, "auth": { "Project": [], "Key": [] @@ -7854,13 +7984,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocuments", "group": "documents", "weight": 338, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -7872,6 +8002,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRows" + }, "auth": { "Project": [], "Key": [] @@ -7946,13 +8080,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getDocument", "group": "documents", "weight": 332, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -7965,6 +8099,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "auth": { "Project": [], "Session": [] @@ -8043,13 +8181,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocument", "group": "documents", "weight": 335, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8062,6 +8200,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "methods": [ { "name": "upsertDocument", @@ -8173,13 +8315,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocument", "group": "documents", "weight": 333, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8192,6 +8334,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "auth": { "Project": [], "Session": [] @@ -8274,13 +8420,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocument", "group": "documents", "weight": 337, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8293,6 +8439,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "auth": { "Project": [], "Session": [] @@ -8360,13 +8510,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", "weight": 342, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -8378,6 +8528,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.decrementRowColumn" + }, "auth": { "Project": [], "Key": [] @@ -8473,13 +8627,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", "weight": 341, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -8491,6 +8645,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.incrementRowColumn" + }, "auth": { "Project": [], "Key": [] @@ -8586,13 +8744,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 369, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -8603,6 +8761,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listIndexes" + }, "auth": { "Project": [], "Key": [] @@ -8669,13 +8831,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 366, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -8686,6 +8848,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIndex" + }, "auth": { "Project": [], "Key": [] @@ -8798,13 +8964,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 367, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -8815,6 +8981,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getIndex" + }, "auth": { "Project": [], "Key": [] @@ -8870,13 +9040,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 368, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -8887,6 +9057,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteIndex" + }, "auth": { "Project": [], "Key": [] @@ -8951,13 +9125,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": null, "weight": 374, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, @@ -9035,13 +9209,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": null, "weight": 370, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, @@ -9140,13 +9314,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 371, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, @@ -9210,13 +9384,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": null, "weight": 372, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, @@ -9310,13 +9484,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": null, "weight": 373, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, @@ -9382,13 +9556,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listColumns", "group": "columns", "weight": 379, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -9467,13 +9641,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBooleanColumn", "group": "columns", "weight": 380, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, @@ -9574,13 +9748,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", "weight": 381, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, @@ -9686,13 +9860,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", "weight": 382, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, @@ -9793,13 +9967,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", "weight": 383, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, @@ -9905,13 +10079,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailColumn", "group": "columns", "weight": 384, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, @@ -10012,13 +10186,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailColumn", "group": "columns", "weight": 385, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, @@ -10124,13 +10298,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEnumColumn", "group": "columns", "weight": 386, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, @@ -10240,13 +10414,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEnumColumn", "group": "columns", "weight": 387, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, @@ -10361,13 +10535,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFloatColumn", "group": "columns", "weight": 388, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, @@ -10478,13 +10652,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFloatColumn", "group": "columns", "weight": 389, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, @@ -10600,13 +10774,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIntegerColumn", "group": "columns", "weight": 390, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, @@ -10717,13 +10891,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", "weight": 391, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, @@ -10839,13 +11013,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIpColumn", "group": "columns", "weight": 392, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, @@ -10946,13 +11120,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIpColumn", "group": "columns", "weight": 393, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, @@ -11058,13 +11232,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", "weight": 394, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, @@ -11190,13 +11364,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createStringColumn", "group": "columns", "weight": 396, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, @@ -11308,13 +11482,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStringColumn", "group": "columns", "weight": 397, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, @@ -11425,13 +11599,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createUrlColumn", "group": "columns", "weight": 398, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, @@ -11532,13 +11706,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateUrlColumn", "group": "columns", "weight": 399, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, @@ -11675,13 +11849,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getColumn", "group": "columns", "weight": 377, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, @@ -11747,13 +11921,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteColumn", "group": "columns", "weight": 378, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, @@ -11828,13 +12002,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", "weight": 395, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, @@ -11937,13 +12111,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 403, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -12020,13 +12194,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 400, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -12149,13 +12323,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 401, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -12221,13 +12395,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 402, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -12302,13 +12476,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRows", "group": "rows", "weight": 412, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, @@ -12389,13 +12563,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRow", "group": "rows", "weight": 404, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, @@ -12554,13 +12728,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRows", "group": "rows", "weight": 409, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, @@ -12665,13 +12839,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRows", "group": "rows", "weight": 407, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, @@ -12760,13 +12934,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteRows", "group": "rows", "weight": 411, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, @@ -12852,13 +13026,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRow", "group": "rows", "weight": 405, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, @@ -12949,13 +13123,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRow", "group": "rows", "weight": 408, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, @@ -13076,13 +13250,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRow", "group": "rows", "weight": 406, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, @@ -13177,13 +13351,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRow", "group": "rows", "weight": 410, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, @@ -13263,13 +13437,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "decrementRowColumn", "group": "rows", "weight": 415, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, @@ -13376,13 +13550,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "incrementRowColumn", "group": "rows", "weight": 414, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, @@ -13489,13 +13663,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "functions", "weight": 424, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's functions. You can use the query params to filter your results.", "rate-limit": 0, @@ -13563,13 +13737,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "functions", "weight": 421, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", "rate-limit": 0, @@ -13797,13 +13971,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRuntimes", "group": "runtimes", "weight": 426, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-runtimes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all runtimes that are currently active on your instance.", "rate-limit": 0, @@ -13847,13 +14021,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "runtimes", "weight": 427, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed function specifications for this instance.", "rate-limit": 0, @@ -13898,13 +14072,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "functions", "weight": 422, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function by its unique ID.", "rate-limit": 0, @@ -13958,13 +14132,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "functions", "weight": 423, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate function by its unique ID.", "rate-limit": 0, @@ -14189,13 +14363,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "functions", "weight": 425, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function by its unique ID.", "rate-limit": 0, @@ -14251,13 +14425,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", "weight": 430, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-function-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", "rate-limit": 0, @@ -14332,13 +14506,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 431, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the function's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -14416,13 +14590,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 428, "cookies": false, "type": "upload", - "deprecated": false, "demo": "functions\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "rate-limit": 0, @@ -14513,13 +14687,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 436, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -14599,13 +14773,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 433, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/functions#listTemplates) to find the template details.", "rate-limit": 0, @@ -14703,13 +14877,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 434, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -14801,13 +14975,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 429, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment by its unique ID.", "rate-limit": 0, @@ -14864,13 +15038,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 432, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a code deployment by its unique ID.", "rate-limit": 0, @@ -14929,13 +15103,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 435, "cookies": false, "type": "location", - "deprecated": false, "demo": "functions\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -15020,13 +15194,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 437, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -15092,13 +15266,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listExecutions", "group": "executions", "weight": 440, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-executions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -15169,13 +15343,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createExecution", "group": "executions", "weight": 438, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", "rate-limit": 0, @@ -15286,13 +15460,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getExecution", "group": "executions", "weight": 439, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.", "rate-limit": 0, @@ -15353,13 +15527,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteExecution", "group": "executions", "weight": 441, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function execution by its unique ID.", "rate-limit": 0, @@ -15425,13 +15599,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 446, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific function.", "rate-limit": 0, @@ -15485,13 +15659,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 444, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", "rate-limit": 0, @@ -15577,13 +15751,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 445, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -15647,13 +15821,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 447, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -15739,13 +15913,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 448, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -15811,13 +15985,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "query", "group": "graphql", "weight": 254, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/query.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -15865,13 +16039,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "mutation", "group": "graphql", "weight": 253, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/mutation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -15919,13 +16093,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "health", "weight": 78, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", "rate-limit": 0, @@ -15969,13 +16143,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getAntivirus", "group": "health", "weight": 99, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-antivirus.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", "rate-limit": 0, @@ -16019,13 +16193,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCache", "group": "health", "weight": 81, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-cache.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", "rate-limit": 0, @@ -16069,13 +16243,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCertificate", "group": "health", "weight": 86, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-certificate.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", "rate-limit": 0, @@ -16130,13 +16304,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDB", "group": "health", "weight": 80, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-d-b.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, @@ -16180,13 +16354,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPubSub", "group": "health", "weight": 82, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-pub-sub.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", "rate-limit": 0, @@ -16230,13 +16404,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueBuilds", "group": "queue", "weight": 88, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-builds.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", "rate-limit": 0, @@ -16293,13 +16467,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueCertificates", "group": "queue", "weight": 87, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-certificates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", "rate-limit": 0, @@ -16356,13 +16530,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDatabases", "group": "queue", "weight": 89, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-databases.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", "rate-limit": 0, @@ -16430,13 +16604,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDeletes", "group": "queue", "weight": 90, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-deletes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", "rate-limit": 0, @@ -16493,13 +16667,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFailedJobs", "group": "queue", "weight": 100, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-failed-jobs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", "rate-limit": 0, @@ -16582,13 +16756,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueFunctions", "group": "queue", "weight": 94, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-functions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", "rate-limit": 0, @@ -16645,13 +16819,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueLogs", "group": "queue", "weight": 85, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", "rate-limit": 0, @@ -16708,13 +16882,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMails", "group": "queue", "weight": 91, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-mails.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", "rate-limit": 0, @@ -16771,13 +16945,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMessaging", "group": "queue", "weight": 92, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-messaging.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", "rate-limit": 0, @@ -16834,13 +17008,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMigrations", "group": "queue", "weight": 93, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-migrations.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", "rate-limit": 0, @@ -16897,13 +17071,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", "weight": 95, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-stats-resources.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", "rate-limit": 0, @@ -16960,13 +17134,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueUsage", "group": "queue", "weight": 96, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", "rate-limit": 0, @@ -17023,13 +17197,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", "weight": 84, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-webhooks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", "rate-limit": 0, @@ -17086,13 +17260,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorage", "group": "storage", "weight": 98, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", "rate-limit": 0, @@ -17136,13 +17310,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorageLocal", "group": "storage", "weight": 97, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage-local.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", "rate-limit": 0, @@ -17186,13 +17360,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTime", "group": "health", "weight": 83, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-time.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", "rate-limit": 0, @@ -17236,13 +17410,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 70, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "rate-limit": 0, @@ -17290,13 +17464,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCodes", "group": null, "weight": 71, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "rate-limit": 0, @@ -17344,13 +17518,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listContinents", "group": null, "weight": 75, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-continents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "rate-limit": 0, @@ -17398,13 +17572,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountries", "group": null, "weight": 72, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "rate-limit": 0, @@ -17452,13 +17626,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesEU", "group": null, "weight": 73, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-e-u.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, @@ -17506,13 +17680,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesPhones", "group": null, "weight": 74, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-phones.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "rate-limit": 0, @@ -17560,13 +17734,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCurrencies", "group": null, "weight": 76, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-currencies.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "rate-limit": 0, @@ -17614,13 +17788,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLanguages", "group": null, "weight": 77, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-languages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "rate-limit": 0, @@ -17668,13 +17842,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessages", "group": "messages", "weight": 308, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-messages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", "rate-limit": 0, @@ -17745,13 +17919,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmail", "group": "messages", "weight": 305, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", "rate-limit": 0, @@ -17890,13 +18064,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "messages", "weight": 312, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", "rate-limit": 0, @@ -18037,13 +18211,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPush", "group": "messages", "weight": 307, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", "rate-limit": 0, @@ -18212,13 +18386,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePush", "group": "messages", "weight": 314, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", "rate-limit": 0, @@ -18391,13 +18565,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSms", "group": "messages", "weight": 306, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", "rate-limit": 0, @@ -18501,13 +18675,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSms", "group": "messages", "weight": 313, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, @@ -18614,13 +18788,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMessage", "group": "messages", "weight": 311, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-message.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", "rate-limit": 0, @@ -18668,13 +18842,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "messages", "weight": 315, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", "rate-limit": 0, @@ -18731,13 +18905,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessageLogs", "group": "logs", "weight": 309, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-message-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", "rate-limit": 0, @@ -18807,13 +18981,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "messages", "weight": 310, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", "rate-limit": 0, @@ -18883,13 +19057,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviders", "group": "providers", "weight": 280, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-providers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", "rate-limit": 0, @@ -18960,13 +19134,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createApnsProvider", "group": "providers", "weight": 279, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", "rate-limit": 0, @@ -19066,13 +19240,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", "weight": 292, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", "rate-limit": 0, @@ -19175,13 +19349,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFcmProvider", "group": "providers", "weight": 278, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", "rate-limit": 0, @@ -19261,13 +19435,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", "weight": 291, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", "rate-limit": 0, @@ -19350,13 +19524,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMailgunProvider", "group": "providers", "weight": 270, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", "rate-limit": 0, @@ -19466,13 +19640,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", "weight": 283, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", "rate-limit": 0, @@ -19585,13 +19759,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMsg91Provider", "group": "providers", "weight": 273, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, @@ -19681,13 +19855,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", "weight": 286, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, @@ -19780,13 +19954,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSendgridProvider", "group": "providers", "weight": 271, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "rate-limit": 0, @@ -19886,13 +20060,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", "weight": 284, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "rate-limit": 0, @@ -19995,13 +20169,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", "weight": 272, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", "rate-limit": 0, @@ -20139,13 +20313,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", "weight": 285, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", "rate-limit": 0, @@ -20285,13 +20459,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTelesignProvider", "group": "providers", "weight": 274, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", "rate-limit": 0, @@ -20381,13 +20555,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", "weight": 287, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", "rate-limit": 0, @@ -20480,13 +20654,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", "weight": 275, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", "rate-limit": 0, @@ -20576,13 +20750,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", "weight": 288, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", "rate-limit": 0, @@ -20675,13 +20849,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTwilioProvider", "group": "providers", "weight": 276, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", "rate-limit": 0, @@ -20771,13 +20945,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", "weight": 289, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", "rate-limit": 0, @@ -20870,13 +21044,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVonageProvider", "group": "providers", "weight": 277, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", "rate-limit": 0, @@ -20966,13 +21140,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVonageProvider", "group": "providers", "weight": 290, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", "rate-limit": 0, @@ -21065,13 +21239,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getProvider", "group": "providers", "weight": 282, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", "rate-limit": 0, @@ -21119,13 +21293,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteProvider", "group": "providers", "weight": 293, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", "rate-limit": 0, @@ -21182,13 +21356,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviderLogs", "group": "providers", "weight": 281, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-provider-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", "rate-limit": 0, @@ -21258,13 +21432,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", "weight": 302, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscriber-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", "rate-limit": 0, @@ -21334,13 +21508,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopics", "group": "topics", "weight": 295, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topics.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", "rate-limit": 0, @@ -21409,13 +21583,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTopic", "group": "topics", "weight": 294, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", "rate-limit": 0, @@ -21493,13 +21667,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTopic", "group": "topics", "weight": 297, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", "rate-limit": 0, @@ -21554,13 +21728,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTopic", "group": "topics", "weight": 298, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", "rate-limit": 0, @@ -21632,13 +21806,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTopic", "group": "topics", "weight": 299, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", "rate-limit": 0, @@ -21695,13 +21869,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopicLogs", "group": "topics", "weight": 296, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topic-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", "rate-limit": 0, @@ -21771,13 +21945,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscribers", "group": "subscribers", "weight": 301, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscribers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "rate-limit": 0, @@ -21856,13 +22030,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSubscriber", "group": "subscribers", "weight": 300, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "rate-limit": 0, @@ -21948,13 +22122,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSubscriber", "group": "subscribers", "weight": 303, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "rate-limit": 0, @@ -22012,13 +22186,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", "weight": 304, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "rate-limit": 0, @@ -22089,13 +22263,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "sites", "weight": 453, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's sites. You can use the query params to filter your results.", "rate-limit": 0, @@ -22160,13 +22334,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "sites", "weight": 451, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site.", "rate-limit": 0, @@ -22410,13 +22584,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFrameworks", "group": "frameworks", "weight": 456, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-frameworks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all frameworks that are currently available on the server instance.", "rate-limit": 0, @@ -22460,13 +22634,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "frameworks", "weight": 479, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed site specifications for this instance.", "rate-limit": 0, @@ -22511,13 +22685,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "sites", "weight": 452, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site by its unique ID.", "rate-limit": 0, @@ -22571,13 +22745,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "sites", "weight": 454, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate site by its unique ID.", "rate-limit": 0, @@ -22817,13 +22991,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "sites", "weight": 455, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site by its unique ID.", "rate-limit": 0, @@ -22879,13 +23053,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", "weight": 462, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-site-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", "rate-limit": 0, @@ -22960,13 +23134,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 461, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the site's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -23044,13 +23218,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 457, "cookies": false, "type": "upload", - "deprecated": false, "demo": "sites\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID.", "rate-limit": 0, @@ -23146,13 +23320,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 465, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -23227,13 +23401,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 458, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/sites#listTemplates) to find the template details.", "rate-limit": 0, @@ -23331,13 +23505,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 459, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -23430,13 +23604,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 460, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment by its unique ID.", "rate-limit": 0, @@ -23493,13 +23667,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 463, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site deployment by its unique ID.", "rate-limit": 0, @@ -23558,13 +23732,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 464, "cookies": false, "type": "location", - "deprecated": false, "demo": "sites\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -23649,13 +23823,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 466, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -23721,13 +23895,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 468, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all site logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -23793,13 +23967,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getLog", "group": "logs", "weight": 467, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site request log by its unique ID.", "rate-limit": 0, @@ -23856,13 +24030,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteLog", "group": "logs", "weight": 469, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site log by its unique ID.", "rate-limit": 0, @@ -23928,13 +24102,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 472, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific site.", "rate-limit": 0, @@ -23988,13 +24162,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 470, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", "rate-limit": 0, @@ -24080,13 +24254,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 471, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -24150,13 +24324,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 473, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -24242,13 +24416,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 474, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -24314,13 +24488,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listBuckets", "group": "buckets", "weight": 156, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-buckets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", "rate-limit": 0, @@ -24388,13 +24562,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBucket", "group": "buckets", "weight": 155, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/create-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", "rate-limit": 0, @@ -24516,13 +24690,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBucket", "group": "buckets", "weight": 157, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", "rate-limit": 0, @@ -24576,13 +24750,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBucket", "group": "buckets", "weight": 158, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", "rate-limit": 0, @@ -24701,13 +24875,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteBucket", "group": "buckets", "weight": 159, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", "rate-limit": 0, @@ -24763,13 +24937,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFiles", "group": "files", "weight": 161, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-files.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "rate-limit": 0, @@ -24851,13 +25025,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFile", "group": "files", "weight": 160, "cookies": false, "type": "upload", - "deprecated": false, "demo": "storage\/create-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "rate-limit": 60, @@ -24951,13 +25125,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFile", "group": "files", "weight": 162, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "rate-limit": 0, @@ -25025,13 +25199,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFile", "group": "files", "weight": 167, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "rate-limit": 60, @@ -25116,13 +25290,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteFile", "group": "files", "weight": 168, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", "rate-limit": 60, @@ -25185,13 +25359,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getFileDownload", "group": "files", "weight": 164, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "rate-limit": 0, @@ -25265,13 +25439,13 @@ "description": "Image" } }, + "deprecated": false, "x-appwrite": { "method": "getFilePreview", "group": "files", "weight": 163, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-preview.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "rate-limit": 0, @@ -25495,13 +25669,13 @@ "description": "File" } }, + "deprecated": false, "x-appwrite": { "method": "getFileView", "group": "files", "weight": 165, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-view.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "rate-limit": 0, @@ -25582,13 +25756,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "teams", "weight": 172, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "rate-limit": 0, @@ -25660,13 +25834,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "teams", "weight": 171, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "rate-limit": 0, @@ -25747,13 +25921,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "teams", "weight": 173, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "rate-limit": 0, @@ -25811,13 +25985,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "teams", "weight": 175, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "rate-limit": 0, @@ -25887,13 +26061,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "teams", "weight": 177, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "rate-limit": 0, @@ -25953,13 +26127,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 179, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "rate-limit": 0, @@ -26041,13 +26215,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMembership", "group": "memberships", "weight": 178, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "rate-limit": 10, @@ -26154,13 +26328,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMembership", "group": "memberships", "weight": 180, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "rate-limit": 0, @@ -26228,13 +26402,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembership", "group": "memberships", "weight": 181, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "rate-limit": 0, @@ -26317,13 +26491,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMembership", "group": "memberships", "weight": 183, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "rate-limit": 0, @@ -26393,13 +26567,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", "weight": 182, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "rate-limit": 0, @@ -26492,13 +26666,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "teams", "weight": 174, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "rate-limit": 0, @@ -26554,13 +26728,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "teams", "weight": 176, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "rate-limit": 0, @@ -26637,13 +26811,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "files", "weight": 487, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the tokens created for a specific file or bucket. You can use the query params to filter your results.", "rate-limit": 0, @@ -26718,13 +26892,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFileToken", "group": "files", "weight": 485, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/create-file-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, @@ -26808,13 +26982,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "tokens", "weight": 486, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a token by its unique ID.", "rate-limit": 0, @@ -26869,13 +27043,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "tokens", "weight": 488, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date.", "rate-limit": 60, @@ -26940,13 +27114,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "tokens", "weight": 489, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a token by its unique ID.", "rate-limit": 60, @@ -27003,13 +27177,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "users", "weight": 194, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", "rate-limit": 0, @@ -27077,13 +27251,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "users", "weight": 185, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", "rate-limit": 0, @@ -27166,13 +27340,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createArgon2User", "group": "users", "weight": 188, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-argon2user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, @@ -27252,13 +27426,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBcryptUser", "group": "users", "weight": 186, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-bcrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", "rate-limit": 0, @@ -27338,13 +27512,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 202, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", "rate-limit": 0, @@ -27407,13 +27581,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 225, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", "rate-limit": 0, @@ -27469,13 +27643,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMD5User", "group": "users", "weight": 187, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-m-d5user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, @@ -27555,13 +27729,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPHPassUser", "group": "users", "weight": 190, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-p-h-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, @@ -27641,13 +27815,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptUser", "group": "users", "weight": 191, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", "rate-limit": 0, @@ -27757,13 +27931,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", "weight": 192, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-modified-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", "rate-limit": 0, @@ -27861,13 +28035,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSHAUser", "group": "users", "weight": 189, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-s-h-a-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, @@ -27967,13 +28141,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "users", "weight": 195, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", "rate-limit": 0, @@ -28020,13 +28194,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "users", "weight": 223, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", "rate-limit": 0, @@ -28082,13 +28256,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "users", "weight": 208, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", "rate-limit": 0, @@ -28163,13 +28337,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "sessions", "weight": 226, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, @@ -28246,13 +28420,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateLabels", "group": "users", "weight": 204, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-labels.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", "rate-limit": 0, @@ -28330,13 +28504,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 200, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", "rate-limit": 0, @@ -28405,13 +28579,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 199, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", "rate-limit": 0, @@ -28491,13 +28665,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfa", "group": "users", "weight": 213, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", "rate-limit": 0, @@ -28565,13 +28739,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 218, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -28642,13 +28816,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 214, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", "rate-limit": 0, @@ -28704,13 +28878,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 215, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -28764,13 +28938,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 217, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -28824,13 +28998,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 216, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -28886,13 +29060,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "users", "weight": 206, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", "rate-limit": 0, @@ -28967,13 +29141,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "users", "weight": 207, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", "rate-limit": 0, @@ -29048,13 +29222,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "users", "weight": 209, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", "rate-limit": 0, @@ -29129,13 +29303,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "users", "weight": 196, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", "rate-limit": 0, @@ -29189,13 +29363,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "users", "weight": 211, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", "rate-limit": 0, @@ -29270,13 +29444,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 198, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", "rate-limit": 0, @@ -29330,13 +29504,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 219, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", "rate-limit": 0, @@ -29383,13 +29557,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 222, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", "rate-limit": 0, @@ -29438,13 +29612,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 221, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", "rate-limit": 0, @@ -29510,13 +29684,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "users", "weight": 203, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", "rate-limit": 0, @@ -29591,13 +29765,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "targets", "weight": 201, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", "rate-limit": 0, @@ -29665,13 +29839,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTarget", "group": "targets", "weight": 193, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", "rate-limit": 0, @@ -29776,13 +29950,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTarget", "group": "targets", "weight": 197, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", "rate-limit": 0, @@ -29847,13 +30021,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTarget", "group": "targets", "weight": 212, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", "rate-limit": 0, @@ -29937,13 +30111,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTarget", "group": "targets", "weight": 224, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", "rate-limit": 0, @@ -30010,13 +30184,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createToken", "group": "sessions", "weight": 220, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", "rate-limit": 0, @@ -30093,13 +30267,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailVerification", "group": "users", "weight": 210, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", "rate-limit": 0, @@ -30174,13 +30348,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "users", "weight": 205, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", "rate-limit": 0, diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 5021a442f2..d866d2c097 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -4637,6 +4637,30 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -5257,6 +5281,30 @@ } ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." } ], "auth": { diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 919cf5be52..94fff6695c 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -5224,7 +5224,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createTable" + "replaceWith": "tables.create" }, "auth": { "Project": [] @@ -5333,7 +5333,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getTable" + "replaceWith": "tables.get" }, "auth": { "Project": [] @@ -5404,7 +5404,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateTable" + "replaceWith": "tables.update" }, "auth": { "Project": [] @@ -5509,7 +5509,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteTable" + "replaceWith": "tables.delete" }, "auth": { "Project": [] @@ -9217,7 +9217,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementColumn" + "replaceWith": "tables.decrementRowColumn" }, "auth": { "Project": [] @@ -9327,7 +9327,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementColumn" + "replaceWith": "tables.incrementRowColumn" }, "auth": { "Project": [] @@ -9434,7 +9434,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumnIndexes" + "replaceWith": "tables.listIndexes" }, "auth": { "Project": [] @@ -9517,7 +9517,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createColumnIndex" + "replaceWith": "tables.createIndex" }, "auth": { "Project": [] @@ -9648,7 +9648,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumnIndex" + "replaceWith": "tables.getIndex" }, "auth": { "Project": [] @@ -9721,7 +9721,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumnIndex" + "replaceWith": "tables.deleteIndex" }, "auth": { "Project": [] @@ -9799,7 +9799,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listTableLogs" + "replaceWith": "tables.listLogs" }, "auth": { "Project": [] @@ -9881,7 +9881,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getTableUsage" + "replaceWith": "tables.getUsage" }, "auth": { "Project": [] diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 7b3b428347..cb96855956 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -4666,7 +4666,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createTable" + "replaceWith": "tables.create" }, "auth": { "Project": [], @@ -4776,7 +4776,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getTable" + "replaceWith": "tables.get" }, "auth": { "Project": [], @@ -4848,7 +4848,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateTable" + "replaceWith": "tables.update" }, "auth": { "Project": [], @@ -4954,7 +4954,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteTable" + "replaceWith": "tables.delete" }, "auth": { "Project": [], @@ -8611,7 +8611,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementColumn" + "replaceWith": "tables.decrementRowColumn" }, "auth": { "Project": [], @@ -8722,7 +8722,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementColumn" + "replaceWith": "tables.incrementRowColumn" }, "auth": { "Project": [], @@ -8830,7 +8830,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumnIndexes" + "replaceWith": "tables.listIndexes" }, "auth": { "Project": [], @@ -8914,7 +8914,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createColumnIndex" + "replaceWith": "tables.createIndex" }, "auth": { "Project": [], @@ -9046,7 +9046,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumnIndex" + "replaceWith": "tables.getIndex" }, "auth": { "Project": [], @@ -9120,7 +9120,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumnIndex" + "replaceWith": "tables.deleteIndex" }, "auth": { "Project": [], diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 8f9698dca8..d866d2c097 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -90,13 +90,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "account", "weight": 10, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", "rate-limit": 0, @@ -141,13 +141,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "account", "weight": 9, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", "rate-limit": 10, @@ -232,13 +232,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "account", "weight": 35, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "rate-limit": 0, @@ -310,13 +310,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 58, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "rate-limit": 0, @@ -372,13 +372,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 59, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "rate-limit": 0, @@ -435,13 +435,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "tokens", "weight": 30, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, @@ -484,13 +484,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 32, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "rate-limit": 0, @@ -551,13 +551,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMFA", "group": "mfa", "weight": 45, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-m-f-a.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, @@ -624,13 +624,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", "weight": 47, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "rate-limit": 0, @@ -690,13 +690,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", "weight": 48, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "rate-limit": 0, @@ -769,13 +769,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 52, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -837,13 +837,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", "weight": 53, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "rate-limit": 10, @@ -914,13 +914,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", "weight": 54, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", "rate-limit": 10, @@ -992,13 +992,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 46, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", "rate-limit": 0, @@ -1043,13 +1043,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 51, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -1094,13 +1094,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 49, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -1145,13 +1145,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 50, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -1198,13 +1198,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "account", "weight": 33, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "rate-limit": 0, @@ -1271,13 +1271,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "account", "weight": 34, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "rate-limit": 10, @@ -1350,13 +1350,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "account", "weight": 36, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "rate-limit": 0, @@ -1428,13 +1428,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "account", "weight": 31, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "rate-limit": 0, @@ -1479,13 +1479,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "account", "weight": 37, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "rate-limit": 0, @@ -1552,13 +1552,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRecovery", "group": "recovery", "weight": 39, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", "rate-limit": 10, @@ -1633,13 +1633,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRecovery", "group": "recovery", "weight": 40, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "rate-limit": 10, @@ -1718,13 +1718,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 12, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "rate-limit": 0, @@ -1764,13 +1764,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 13, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", "rate-limit": 100, @@ -1817,13 +1817,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAnonymousSession", "group": "sessions", "weight": 18, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-anonymous-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", "rate-limit": 50, @@ -1868,13 +1868,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailPasswordSession", "group": "sessions", "weight": 17, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-password-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "rate-limit": 10, @@ -1946,13 +1946,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateMagicURLSession", "group": "sessions", "weight": 27, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-magic-u-r-l-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1964,6 +1964,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2019,13 +2020,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Session", "group": "sessions", "weight": 20, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, @@ -2156,13 +2157,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updatePhoneSession", "group": "sessions", "weight": 28, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-phone-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2174,6 +2175,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2234,13 +2236,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 19, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2310,13 +2312,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSession", "group": "sessions", "weight": 14, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", "rate-limit": 0, @@ -2371,13 +2373,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSession", "group": "sessions", "weight": 16, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", "rate-limit": 10, @@ -2427,13 +2429,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 15, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", "rate-limit": 100, @@ -2490,13 +2492,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "account", "weight": 38, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", "rate-limit": 0, @@ -2543,13 +2545,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", "weight": 55, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, @@ -2627,13 +2629,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", "weight": 56, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, @@ -2699,13 +2701,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", "weight": 57, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, @@ -2760,13 +2762,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailToken", "group": "tokens", "weight": 26, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", "rate-limit": 10, @@ -2847,13 +2849,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMagicURLToken", "group": "tokens", "weight": 25, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-magic-u-r-l-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, @@ -2935,13 +2937,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Token", "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, @@ -3072,13 +3074,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneToken", "group": "tokens", "weight": 29, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", "rate-limit": 10, @@ -3153,13 +3155,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVerification", "group": "verification", "weight": 41, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", "rate-limit": 10, @@ -3224,13 +3226,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVerification", "group": "verification", "weight": 42, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", "rate-limit": 10, @@ -3304,13 +3306,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneVerification", "group": "verification", "weight": 43, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", "rate-limit": 10, @@ -3358,13 +3360,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "verification", "weight": 44, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", "rate-limit": 10, @@ -3436,13 +3438,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBrowser", "group": null, "weight": 61, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-browser.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "rate-limit": 0, @@ -3451,7 +3453,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3561,13 +3562,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCreditCard", "group": null, "weight": 60, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-credit-card.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "rate-limit": 0, @@ -3576,7 +3577,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3692,13 +3692,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFavicon", "group": null, "weight": 64, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-favicon.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "rate-limit": 0, @@ -3707,7 +3707,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -3755,13 +3754,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFlag", "group": null, "weight": 62, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-flag.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "rate-limit": 0, @@ -3770,7 +3769,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4242,13 +4240,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getImage", "group": null, "weight": 63, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-image.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "rate-limit": 0, @@ -4257,7 +4255,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4325,13 +4322,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getInitials", "group": null, "weight": 66, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-initials.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "rate-limit": 0, @@ -4340,7 +4337,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4416,13 +4412,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQR", "group": null, "weight": 65, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-q-r.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, @@ -4431,7 +4427,6 @@ "scope": "avatars.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -4507,13 +4502,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocuments", "group": "documents", "weight": 339, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -4522,10 +4517,13 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "auth": { "Project": [] } @@ -4589,13 +4587,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDocument", "group": "documents", "weight": 331, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -4604,10 +4602,13 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "methods": [ { "name": "createDocument", @@ -4636,6 +4637,30 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { @@ -4728,13 +4753,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getDocument", "group": "documents", "weight": 332, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -4743,10 +4768,13 @@ "scope": "documents.read", "platforms": [ "client", - "server", "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "auth": { "Project": [] } @@ -4809,7 +4837,7 @@ "tags": [ "databases" ], - "description": "Create or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", "responses": { "201": { "description": "Document", @@ -4818,13 +4846,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocument", "group": "documents", "weight": 335, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -4833,10 +4861,13 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "methods": [ { "name": "upsertDocument", @@ -4942,13 +4973,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocument", "group": "documents", "weight": 333, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -4957,10 +4988,13 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "auth": { "Project": [] } @@ -5039,13 +5073,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocument", "group": "documents", "weight": 337, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -5054,10 +5088,13 @@ "scope": "documents.write", "platforms": [ "client", - "server", "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "auth": { "Project": [] } @@ -5117,13 +5154,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRows", "group": "rows", "weight": 412, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, @@ -5198,13 +5235,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRow", "group": "rows", "weight": 404, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, @@ -5244,6 +5281,30 @@ } ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." + }, + { + "name": "createRows", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/rowList" + } + ], + "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." } ], "auth": { @@ -5336,13 +5397,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRow", "group": "rows", "weight": 405, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, @@ -5425,13 +5486,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRow", "group": "rows", "weight": 408, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, @@ -5545,13 +5606,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRow", "group": "rows", "weight": 406, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, @@ -5641,13 +5702,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRow", "group": "rows", "weight": 410, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, @@ -5718,13 +5779,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listExecutions", "group": "executions", "weight": 440, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-executions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -5733,7 +5794,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5792,13 +5852,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createExecution", "group": "executions", "weight": 438, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", "rate-limit": 0, @@ -5807,7 +5867,6 @@ "scope": "execution.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5909,13 +5968,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getExecution", "group": "executions", "weight": 439, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.", "rate-limit": 0, @@ -5924,7 +5983,6 @@ "scope": "execution.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -5981,13 +6039,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "query", "group": "graphql", "weight": 254, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/query.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -5996,8 +6054,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -6055,13 +6112,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "mutation", "group": "graphql", "weight": 253, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/mutation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -6070,8 +6127,7 @@ "scope": "graphql", "platforms": [ "server", - "client", - "server" + "client" ], "packaging": false, "auth": { @@ -6127,13 +6183,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 70, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "rate-limit": 0, @@ -6142,7 +6198,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6179,13 +6234,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCodes", "group": null, "weight": 71, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "rate-limit": 0, @@ -6194,7 +6249,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6231,13 +6285,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listContinents", "group": null, "weight": 75, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-continents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "rate-limit": 0, @@ -6246,7 +6300,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6283,13 +6336,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountries", "group": null, "weight": 72, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "rate-limit": 0, @@ -6298,7 +6351,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6335,13 +6387,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesEU", "group": null, "weight": 73, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-e-u.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, @@ -6350,7 +6402,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6387,13 +6438,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesPhones", "group": null, "weight": 74, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-phones.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "rate-limit": 0, @@ -6402,7 +6453,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6439,13 +6489,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCurrencies", "group": null, "weight": 76, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-currencies.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "rate-limit": 0, @@ -6454,7 +6504,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6491,13 +6540,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLanguages", "group": null, "weight": 77, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-languages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "rate-limit": 0, @@ -6506,7 +6555,6 @@ "scope": "locale.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6545,13 +6593,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSubscriber", "group": "subscribers", "weight": 300, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "rate-limit": 0, @@ -6561,8 +6609,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -6630,13 +6677,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", "weight": 304, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "rate-limit": 0, @@ -6646,8 +6693,7 @@ "platforms": [ "server", "client", - "console", - "server" + "console" ], "packaging": false, "auth": { @@ -6701,13 +6747,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFiles", "group": "files", "weight": 161, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-files.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "rate-limit": 0, @@ -6716,7 +6762,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6784,13 +6829,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFile", "group": "files", "weight": 160, "cookies": false, "type": "upload", - "deprecated": false, "demo": "storage\/create-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "rate-limit": 60, @@ -6799,7 +6844,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6874,13 +6918,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFile", "group": "files", "weight": 162, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "rate-limit": 0, @@ -6889,7 +6933,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -6944,13 +6987,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFile", "group": "files", "weight": 167, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "rate-limit": 60, @@ -6959,7 +7002,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7033,13 +7075,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteFile", "group": "files", "weight": 168, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", "rate-limit": 60, @@ -7048,7 +7090,6 @@ "scope": "files.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7103,13 +7144,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFileDownload", "group": "files", "weight": 164, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "rate-limit": 0, @@ -7118,7 +7159,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7182,13 +7222,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFilePreview", "group": "files", "weight": 163, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-preview.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "rate-limit": 0, @@ -7197,7 +7237,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7389,13 +7428,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFileView", "group": "files", "weight": 165, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-view.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "rate-limit": 0, @@ -7404,7 +7443,6 @@ "scope": "files.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7468,13 +7506,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "teams", "weight": 172, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "rate-limit": 0, @@ -7483,7 +7521,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7543,13 +7580,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "teams", "weight": 171, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "rate-limit": 0, @@ -7558,7 +7595,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7633,13 +7669,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "teams", "weight": 173, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "rate-limit": 0, @@ -7648,7 +7684,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7695,13 +7730,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "teams", "weight": 175, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "rate-limit": 0, @@ -7710,7 +7745,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7770,13 +7804,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "teams", "weight": 177, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "rate-limit": 0, @@ -7785,7 +7819,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7832,13 +7865,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 179, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "rate-limit": 0, @@ -7847,7 +7880,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -7915,13 +7947,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMembership", "group": "memberships", "weight": 178, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "rate-limit": 10, @@ -7930,7 +7962,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8028,13 +8059,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMembership", "group": "memberships", "weight": 180, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "rate-limit": 0, @@ -8043,7 +8074,6 @@ "scope": "teams.read", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8098,13 +8128,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembership", "group": "memberships", "weight": 181, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "rate-limit": 0, @@ -8113,7 +8143,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8184,13 +8213,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMembership", "group": "memberships", "weight": 183, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "rate-limit": 0, @@ -8199,7 +8228,6 @@ "scope": "teams.write", "platforms": [ "client", - "server", "server" ], "packaging": false, @@ -8256,13 +8284,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", "weight": 182, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "rate-limit": 0, @@ -8350,13 +8378,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "teams", "weight": 174, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "rate-limit": 0, @@ -8411,13 +8439,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "teams", "weight": 176, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "rate-limit": 0, diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 75f81550da..94fff6695c 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -96,13 +96,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "account", "weight": 10, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", "rate-limit": 0, @@ -146,13 +146,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "account", "weight": 9, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", "rate-limit": 10, @@ -230,13 +230,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "account", "weight": 11, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md", "rate-limit": 0, @@ -280,13 +280,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "account", "weight": 35, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "rate-limit": 0, @@ -357,13 +357,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 58, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "rate-limit": 0, @@ -418,13 +418,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 59, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "rate-limit": 0, @@ -480,13 +480,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "tokens", "weight": 30, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, @@ -529,13 +529,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 32, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "rate-limit": 0, @@ -595,13 +595,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMFA", "group": "mfa", "weight": 45, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-m-f-a.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, @@ -667,13 +667,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", "weight": 47, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "rate-limit": 0, @@ -732,13 +732,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", "weight": 48, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "rate-limit": 0, @@ -810,13 +810,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 52, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -877,13 +877,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", "weight": 53, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "rate-limit": 10, @@ -954,13 +954,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", "weight": 54, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", "rate-limit": 10, @@ -1031,13 +1031,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 46, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", "rate-limit": 0, @@ -1081,13 +1081,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 51, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -1131,13 +1131,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 49, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -1181,13 +1181,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 50, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -1233,13 +1233,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "account", "weight": 33, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "rate-limit": 0, @@ -1305,13 +1305,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "account", "weight": 34, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "rate-limit": 10, @@ -1383,13 +1383,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "account", "weight": 36, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "rate-limit": 0, @@ -1460,13 +1460,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "account", "weight": 31, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "rate-limit": 0, @@ -1510,13 +1510,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "account", "weight": 37, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "rate-limit": 0, @@ -1582,13 +1582,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRecovery", "group": "recovery", "weight": 39, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", "rate-limit": 10, @@ -1662,13 +1662,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRecovery", "group": "recovery", "weight": 40, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "rate-limit": 10, @@ -1746,13 +1746,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 12, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "rate-limit": 0, @@ -1791,13 +1791,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 13, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", "rate-limit": 100, @@ -1843,13 +1843,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAnonymousSession", "group": "sessions", "weight": 18, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-anonymous-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", "rate-limit": 50, @@ -1894,13 +1894,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailPasswordSession", "group": "sessions", "weight": 17, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-password-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "rate-limit": 10, @@ -1972,13 +1972,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateMagicURLSession", "group": "sessions", "weight": 27, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-magic-u-r-l-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1990,6 +1990,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2045,13 +2046,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Session", "group": "sessions", "weight": 20, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md", "rate-limit": 50, @@ -2182,13 +2183,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updatePhoneSession", "group": "sessions", "weight": 28, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-phone-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2200,6 +2201,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2260,13 +2262,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 19, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2336,13 +2338,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSession", "group": "sessions", "weight": 14, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", "rate-limit": 0, @@ -2396,13 +2398,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSession", "group": "sessions", "weight": 16, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", "rate-limit": 10, @@ -2451,13 +2453,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 15, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", "rate-limit": 100, @@ -2513,13 +2515,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "account", "weight": 38, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", "rate-limit": 0, @@ -2565,13 +2567,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPushTarget", "group": "pushTargets", "weight": 55, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-push-target.md", "rate-limit": 0, @@ -2648,13 +2650,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePushTarget", "group": "pushTargets", "weight": 56, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-push-target.md", "rate-limit": 0, @@ -2719,13 +2721,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deletePushTarget", "group": "pushTargets", "weight": 57, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-push-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-push-target.md", "rate-limit": 0, @@ -2779,13 +2781,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailToken", "group": "tokens", "weight": 26, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", "rate-limit": 10, @@ -2866,13 +2868,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMagicURLToken", "group": "tokens", "weight": 25, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-magic-u-r-l-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, @@ -2954,13 +2956,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Token", "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, @@ -3091,13 +3093,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneToken", "group": "tokens", "weight": 29, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", "rate-limit": 10, @@ -3172,13 +3174,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVerification", "group": "verification", "weight": 41, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", "rate-limit": 10, @@ -3242,13 +3244,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVerification", "group": "verification", "weight": 42, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", "rate-limit": 10, @@ -3321,13 +3323,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneVerification", "group": "verification", "weight": 43, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", "rate-limit": 10, @@ -3374,13 +3376,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "verification", "weight": 44, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", "rate-limit": 10, @@ -3451,13 +3453,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBrowser", "group": null, "weight": 61, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-browser.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "rate-limit": 0, @@ -3575,13 +3577,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCreditCard", "group": null, "weight": 60, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-credit-card.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "rate-limit": 0, @@ -3705,13 +3707,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFavicon", "group": null, "weight": 64, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-favicon.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "rate-limit": 0, @@ -3767,13 +3769,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFlag", "group": null, "weight": 62, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-flag.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "rate-limit": 0, @@ -4253,13 +4255,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getImage", "group": null, "weight": 63, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-image.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "rate-limit": 0, @@ -4335,13 +4337,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getInitials", "group": null, "weight": 66, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-initials.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "rate-limit": 0, @@ -4425,13 +4427,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQR", "group": null, "weight": 65, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-q-r.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, @@ -4517,13 +4519,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "chat", "group": "console", "weight": 256, "cookies": false, "type": "", - "deprecated": false, "demo": "assistant\/chat.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/assistant\/chat.md", "rate-limit": 15, @@ -4580,13 +4582,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "getResource", "group": null, "weight": 480, "cookies": false, "type": "", - "deprecated": false, "demo": "console\/get-resource.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCheck if a resource ID is available.", "rate-limit": 120, @@ -4651,13 +4653,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "variables", "group": "console", "weight": 255, "cookies": false, "type": "", - "deprecated": false, "demo": "console\/variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/console\/variables.md", "rate-limit": 0, @@ -4699,13 +4701,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "databases", "weight": 320, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", "rate-limit": 0, @@ -4771,13 +4773,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "databases", "weight": 316, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", "rate-limit": 0, @@ -4853,13 +4855,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listUsage", "group": null, "weight": 323, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-usage.md", "rate-limit": 0, @@ -4923,13 +4925,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "databases", "weight": 317, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", "rate-limit": 0, @@ -4982,13 +4984,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "databases", "weight": 318, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", "rate-limit": 0, @@ -5060,13 +5062,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "databases", "weight": 319, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", "rate-limit": 0, @@ -5119,13 +5121,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listCollections", "group": "collections", "weight": 328, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -5136,6 +5138,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.list" + }, "auth": { "Project": [] } @@ -5199,13 +5205,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createCollection", "group": "collections", "weight": 324, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -5216,6 +5222,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.create" + }, "auth": { "Project": [] } @@ -5304,13 +5314,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getCollection", "group": "collections", "weight": 325, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -5321,6 +5331,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.get" + }, "auth": { "Project": [] } @@ -5371,13 +5385,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateCollection", "group": "collections", "weight": 326, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -5388,6 +5402,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.update" + }, "auth": { "Project": [] } @@ -5472,13 +5490,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteCollection", "group": "collections", "weight": 327, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -5489,6 +5507,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.delete" + }, "auth": { "Project": [] } @@ -5539,13 +5561,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listAttributes", "group": "attributes", "weight": 345, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5556,6 +5578,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumns" + }, "auth": { "Project": [] } @@ -5620,13 +5646,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", "weight": 346, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5637,6 +5663,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createBooleanColumn" + }, "auth": { "Project": [] } @@ -5726,13 +5756,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", "weight": 347, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5743,6 +5773,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateBooleanColumn" + }, "auth": { "Project": [] } @@ -5834,13 +5868,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", "weight": 348, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5851,6 +5885,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createDatetimeColumn" + }, "auth": { "Project": [] } @@ -5940,13 +5978,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", "weight": 349, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5957,6 +5995,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn" + }, "auth": { "Project": [] } @@ -6048,13 +6090,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", "weight": 350, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -6065,6 +6107,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEmailColumn" + }, "auth": { "Project": [] } @@ -6154,13 +6200,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", "weight": 351, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -6171,6 +6217,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEmailColumn" + }, "auth": { "Project": [] } @@ -6262,13 +6312,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", "weight": 352, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -6279,6 +6329,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEnumColumn" + }, "auth": { "Project": [] } @@ -6378,13 +6432,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", "weight": 353, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -6395,6 +6449,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEnumColumn" + }, "auth": { "Project": [] } @@ -6496,13 +6554,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", "weight": 354, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -6513,6 +6571,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createFloatColumn" + }, "auth": { "Project": [] } @@ -6614,13 +6676,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", "weight": 355, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6631,6 +6693,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateFloatColumn" + }, "auth": { "Project": [] } @@ -6734,13 +6800,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", "weight": 356, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6751,6 +6817,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIntegerColumn" + }, "auth": { "Project": [] } @@ -6852,13 +6922,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", "weight": 357, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6869,6 +6939,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIntegerColumn" + }, "auth": { "Project": [] } @@ -6972,13 +7046,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIpAttribute", "group": "attributes", "weight": 358, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6989,6 +7063,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIpColumn" + }, "auth": { "Project": [] } @@ -7078,13 +7156,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", "weight": 359, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -7095,6 +7173,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIpColumn" + }, "auth": { "Project": [] } @@ -7186,13 +7268,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", "weight": 360, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -7203,6 +7285,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRelationshipColumn" + }, "auth": { "Project": [] } @@ -7319,13 +7405,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createStringAttribute", "group": "attributes", "weight": 362, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -7336,6 +7422,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createStringColumn" + }, "auth": { "Project": [] } @@ -7438,13 +7528,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", "weight": 363, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -7455,6 +7545,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateStringColumn" + }, "auth": { "Project": [] } @@ -7552,13 +7646,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", "weight": 364, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7569,6 +7663,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createUrlColumn" + }, "auth": { "Project": [] } @@ -7658,13 +7756,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", "weight": 365, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7675,6 +7773,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateUrlColumn" + }, "auth": { "Project": [] } @@ -7795,13 +7897,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getAttribute", "group": "attributes", "weight": 343, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7812,6 +7914,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumn" + }, "auth": { "Project": [] } @@ -7864,13 +7970,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteAttribute", "group": "attributes", "weight": 344, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7881,6 +7987,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumn" + }, "auth": { "Project": [] } @@ -7940,13 +8050,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", "weight": 361, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7957,6 +8067,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn" + }, "auth": { "Project": [] } @@ -8042,13 +8156,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocuments", "group": "documents", "weight": 339, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -8060,6 +8174,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "auth": { "Project": [] } @@ -8123,13 +8241,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDocument", "group": "documents", "weight": 331, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -8141,6 +8259,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "methods": [ { "name": "createDocument", @@ -8285,13 +8407,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocuments", "group": "documents", "weight": 336, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -8303,6 +8425,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRows" + }, "methods": [ { "name": "upsertDocuments", @@ -8392,13 +8518,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocuments", "group": "documents", "weight": 334, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -8410,6 +8536,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRows" + }, "auth": { "Project": [] } @@ -8484,13 +8614,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocuments", "group": "documents", "weight": 338, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -8502,6 +8632,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRows" + }, "auth": { "Project": [] } @@ -8570,13 +8704,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getDocument", "group": "documents", "weight": 332, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8588,6 +8722,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "auth": { "Project": [] } @@ -8659,13 +8797,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocument", "group": "documents", "weight": 335, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8677,6 +8815,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "methods": [ { "name": "upsertDocument", @@ -8782,13 +8924,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocument", "group": "documents", "weight": 333, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8800,6 +8942,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "auth": { "Project": [] } @@ -8878,13 +9024,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocument", "group": "documents", "weight": 337, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8896,6 +9042,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "auth": { "Project": [] } @@ -8955,13 +9105,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocumentLogs", "group": "logs", "weight": 340, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-document-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md", "rate-limit": 0, @@ -8972,6 +9122,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listLogs" + }, "auth": { "Project": [] } @@ -9043,13 +9197,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", "weight": 342, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -9061,6 +9215,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.decrementRowColumn" + }, "auth": { "Project": [] } @@ -9149,13 +9307,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", "weight": 341, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -9167,6 +9325,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.incrementRowColumn" + }, "auth": { "Project": [] } @@ -9253,13 +9415,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 369, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -9270,6 +9432,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listIndexes" + }, "auth": { "Project": [] } @@ -9332,13 +9498,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 366, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -9349,6 +9515,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIndex" + }, "auth": { "Project": [] } @@ -9459,13 +9629,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 367, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -9476,6 +9646,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getIndex" + }, "auth": { "Project": [] } @@ -9528,13 +9702,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 368, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -9545,6 +9719,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteIndex" + }, "auth": { "Project": [] } @@ -9602,13 +9780,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listCollectionLogs", "group": "collections", "weight": 329, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-collection-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md", "rate-limit": 0, @@ -9619,6 +9797,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listLogs" + }, "auth": { "Project": [] } @@ -9680,13 +9862,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getCollectionUsage", "group": null, "weight": 330, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-collection-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-usage.md", "rate-limit": 0, @@ -9697,6 +9879,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getUsage" + }, "auth": { "Project": [] } @@ -9766,13 +9952,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 321, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", "rate-limit": 0, @@ -9836,13 +10022,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": null, "weight": 374, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, @@ -9916,13 +10102,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": null, "weight": 370, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, @@ -10021,13 +10207,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 371, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, @@ -10088,13 +10274,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": null, "weight": 372, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, @@ -10189,13 +10375,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": null, "weight": 373, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, @@ -10256,13 +10442,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listColumns", "group": "columns", "weight": 379, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -10337,13 +10523,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBooleanColumn", "group": "columns", "weight": 380, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, @@ -10443,13 +10629,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", "weight": 381, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, @@ -10551,13 +10737,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", "weight": 382, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, @@ -10657,13 +10843,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", "weight": 383, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, @@ -10765,13 +10951,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailColumn", "group": "columns", "weight": 384, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, @@ -10871,13 +11057,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailColumn", "group": "columns", "weight": 385, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, @@ -10979,13 +11165,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEnumColumn", "group": "columns", "weight": 386, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, @@ -11095,13 +11281,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEnumColumn", "group": "columns", "weight": 387, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, @@ -11213,13 +11399,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFloatColumn", "group": "columns", "weight": 388, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, @@ -11331,13 +11517,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFloatColumn", "group": "columns", "weight": 389, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, @@ -11451,13 +11637,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIntegerColumn", "group": "columns", "weight": 390, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, @@ -11569,13 +11755,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", "weight": 391, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, @@ -11689,13 +11875,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIpColumn", "group": "columns", "weight": 392, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, @@ -11795,13 +11981,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIpColumn", "group": "columns", "weight": 393, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, @@ -11903,13 +12089,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", "weight": 394, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, @@ -12036,13 +12222,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createStringColumn", "group": "columns", "weight": 396, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, @@ -12155,13 +12341,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStringColumn", "group": "columns", "weight": 397, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, @@ -12269,13 +12455,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createUrlColumn", "group": "columns", "weight": 398, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, @@ -12375,13 +12561,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateUrlColumn", "group": "columns", "weight": 399, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, @@ -12512,13 +12698,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getColumn", "group": "columns", "weight": 377, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, @@ -12581,13 +12767,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteColumn", "group": "columns", "weight": 378, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, @@ -12657,13 +12843,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", "weight": 395, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, @@ -12759,13 +12945,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 403, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -12838,13 +13024,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 400, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -12965,13 +13151,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 401, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -13034,13 +13220,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 402, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -13108,13 +13294,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "tables", "weight": 375, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", "rate-limit": 0, @@ -13186,13 +13372,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRows", "group": "rows", "weight": 412, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, @@ -13267,13 +13453,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRow", "group": "rows", "weight": 404, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, @@ -13429,13 +13615,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRows", "group": "rows", "weight": 409, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, @@ -13536,13 +13722,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRows", "group": "rows", "weight": 407, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, @@ -13628,13 +13814,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteRows", "group": "rows", "weight": 411, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, @@ -13714,13 +13900,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRow", "group": "rows", "weight": 405, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, @@ -13803,13 +13989,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRow", "group": "rows", "weight": 408, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, @@ -13923,13 +14109,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRow", "group": "rows", "weight": 406, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, @@ -14019,13 +14205,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRow", "group": "rows", "weight": 410, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, @@ -14096,13 +14282,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRowLogs", "group": "logs", "weight": 413, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-row-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", "rate-limit": 0, @@ -14184,13 +14370,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "decrementRowColumn", "group": "rows", "weight": 415, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, @@ -14290,13 +14476,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "incrementRowColumn", "group": "rows", "weight": 414, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, @@ -14394,13 +14580,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 376, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", "rate-limit": 0, @@ -14480,13 +14666,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDatabaseUsage", "group": null, "weight": 322, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-database-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-database-usage.md", "rate-limit": 0, @@ -14558,13 +14744,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "functions", "weight": 424, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's functions. You can use the query params to filter your results.", "rate-limit": 0, @@ -14630,13 +14816,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "functions", "weight": 421, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", "rate-limit": 0, @@ -14881,13 +15067,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRuntimes", "group": "runtimes", "weight": 426, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-runtimes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all runtimes that are currently active on your instance.", "rate-limit": 0, @@ -14930,13 +15116,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "runtimes", "weight": 427, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed function specifications for this instance.", "rate-limit": 0, @@ -14980,13 +15166,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTemplates", "group": "templates", "weight": 450, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-templates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList available function templates. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", "rate-limit": 0, @@ -15074,13 +15260,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTemplate", "group": "templates", "weight": 449, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function template using ID. You can use template details in [createFunction](\/docs\/references\/cloud\/server-nodejs\/functions#create) method.", "rate-limit": 0, @@ -15132,13 +15318,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listUsage", "group": null, "weight": 443, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for all functions in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -15202,13 +15388,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "functions", "weight": 422, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function by its unique ID.", "rate-limit": 0, @@ -15261,13 +15447,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "functions", "weight": 423, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate function by its unique ID.", "rate-limit": 0, @@ -15508,13 +15694,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "functions", "weight": 425, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function by its unique ID.", "rate-limit": 0, @@ -15569,13 +15755,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", "weight": 430, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-function-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", "rate-limit": 0, @@ -15646,13 +15832,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 431, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the function's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -15726,13 +15912,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 428, "cookies": false, "type": "upload", - "deprecated": false, "demo": "functions\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "rate-limit": 0, @@ -15818,13 +16004,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 436, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -15903,13 +16089,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 433, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/functions#listTemplates) to find the template details.", "rate-limit": 0, @@ -16009,13 +16195,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 434, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -16105,13 +16291,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 429, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment by its unique ID.", "rate-limit": 0, @@ -16167,13 +16353,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 432, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a code deployment by its unique ID.", "rate-limit": 0, @@ -16234,13 +16420,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 435, "cookies": false, "type": "location", - "deprecated": false, "demo": "functions\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -16319,13 +16505,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 437, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -16386,13 +16572,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listExecutions", "group": "executions", "weight": 440, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-executions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -16459,13 +16645,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createExecution", "group": "executions", "weight": 438, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", "rate-limit": 0, @@ -16575,13 +16761,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getExecution", "group": "executions", "weight": 439, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.", "rate-limit": 0, @@ -16639,13 +16825,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteExecution", "group": "executions", "weight": 441, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function execution by its unique ID.", "rate-limit": 0, @@ -16706,13 +16892,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 442, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -16784,13 +16970,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 446, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific function.", "rate-limit": 0, @@ -16843,13 +17029,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 444, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", "rate-limit": 0, @@ -16933,13 +17119,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 445, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -17000,13 +17186,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 447, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -17092,13 +17278,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 448, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -17161,13 +17347,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "query", "group": "graphql", "weight": 254, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/query.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -17234,13 +17420,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "mutation", "group": "graphql", "weight": 253, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/mutation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -17305,13 +17491,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "health", "weight": 78, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", "rate-limit": 0, @@ -17354,13 +17540,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getAntivirus", "group": "health", "weight": 99, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-antivirus.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", "rate-limit": 0, @@ -17403,13 +17589,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCache", "group": "health", "weight": 81, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-cache.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", "rate-limit": 0, @@ -17452,13 +17638,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCertificate", "group": "health", "weight": 86, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-certificate.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", "rate-limit": 0, @@ -17510,13 +17696,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDB", "group": "health", "weight": 80, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-d-b.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, @@ -17559,13 +17745,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPubSub", "group": "health", "weight": 82, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-pub-sub.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", "rate-limit": 0, @@ -17608,13 +17794,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueBuilds", "group": "queue", "weight": 88, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-builds.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", "rate-limit": 0, @@ -17668,13 +17854,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueCertificates", "group": "queue", "weight": 87, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-certificates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", "rate-limit": 0, @@ -17728,13 +17914,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDatabases", "group": "queue", "weight": 89, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-databases.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", "rate-limit": 0, @@ -17797,13 +17983,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDeletes", "group": "queue", "weight": 90, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-deletes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", "rate-limit": 0, @@ -17857,13 +18043,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFailedJobs", "group": "queue", "weight": 100, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-failed-jobs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", "rate-limit": 0, @@ -17941,13 +18127,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueFunctions", "group": "queue", "weight": 94, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-functions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", "rate-limit": 0, @@ -18001,13 +18187,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueLogs", "group": "queue", "weight": 85, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", "rate-limit": 0, @@ -18061,13 +18247,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMails", "group": "queue", "weight": 91, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-mails.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", "rate-limit": 0, @@ -18121,13 +18307,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMessaging", "group": "queue", "weight": 92, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-messaging.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", "rate-limit": 0, @@ -18181,13 +18367,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMigrations", "group": "queue", "weight": 93, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-migrations.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", "rate-limit": 0, @@ -18241,13 +18427,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", "weight": 95, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-stats-resources.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", "rate-limit": 0, @@ -18301,13 +18487,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueUsage", "group": "queue", "weight": 96, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", "rate-limit": 0, @@ -18361,13 +18547,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", "weight": 84, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-webhooks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", "rate-limit": 0, @@ -18421,13 +18607,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorage", "group": "storage", "weight": 98, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", "rate-limit": 0, @@ -18470,13 +18656,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorageLocal", "group": "storage", "weight": 97, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage-local.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", "rate-limit": 0, @@ -18519,13 +18705,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTime", "group": "health", "weight": 83, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-time.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", "rate-limit": 0, @@ -18568,13 +18754,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 70, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "rate-limit": 0, @@ -18619,13 +18805,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCodes", "group": null, "weight": 71, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "rate-limit": 0, @@ -18670,13 +18856,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listContinents", "group": null, "weight": 75, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-continents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "rate-limit": 0, @@ -18721,13 +18907,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountries", "group": null, "weight": 72, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "rate-limit": 0, @@ -18772,13 +18958,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesEU", "group": null, "weight": 73, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-e-u.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, @@ -18823,13 +19009,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesPhones", "group": null, "weight": 74, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-phones.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "rate-limit": 0, @@ -18874,13 +19060,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCurrencies", "group": null, "weight": 76, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-currencies.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "rate-limit": 0, @@ -18925,13 +19111,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLanguages", "group": null, "weight": 77, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-languages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "rate-limit": 0, @@ -18976,13 +19162,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessages", "group": "messages", "weight": 308, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-messages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", "rate-limit": 0, @@ -19051,13 +19237,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmail", "group": "messages", "weight": 305, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", "rate-limit": 0, @@ -19209,13 +19395,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "messages", "weight": 312, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", "rate-limit": 0, @@ -19364,13 +19550,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPush", "group": "messages", "weight": 307, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", "rate-limit": 0, @@ -19559,13 +19745,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePush", "group": "messages", "weight": 314, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", "rate-limit": 0, @@ -19753,13 +19939,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSms", "group": "messages", "weight": 306, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", "rate-limit": 0, @@ -19871,13 +20057,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSms", "group": "messages", "weight": 313, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, @@ -19985,13 +20171,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMessage", "group": "messages", "weight": 311, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-message.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", "rate-limit": 0, @@ -20040,13 +20226,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "messages", "weight": 315, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", "rate-limit": 0, @@ -20100,13 +20286,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessageLogs", "group": "logs", "weight": 309, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-message-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", "rate-limit": 0, @@ -20172,13 +20358,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "messages", "weight": 310, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", "rate-limit": 0, @@ -20244,13 +20430,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviders", "group": "providers", "weight": 280, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-providers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", "rate-limit": 0, @@ -20319,13 +20505,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createApnsProvider", "group": "providers", "weight": 279, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", "rate-limit": 0, @@ -20434,13 +20620,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", "weight": 292, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", "rate-limit": 0, @@ -20547,13 +20733,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFcmProvider", "group": "providers", "weight": 278, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", "rate-limit": 0, @@ -20638,13 +20824,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", "weight": 291, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", "rate-limit": 0, @@ -20727,13 +20913,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMailgunProvider", "group": "providers", "weight": 270, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", "rate-limit": 0, @@ -20854,13 +21040,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", "weight": 283, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", "rate-limit": 0, @@ -20979,13 +21165,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMsg91Provider", "group": "providers", "weight": 273, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, @@ -21082,13 +21268,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", "weight": 286, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, @@ -21183,13 +21369,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSendgridProvider", "group": "providers", "weight": 271, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "rate-limit": 0, @@ -21298,13 +21484,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", "weight": 284, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "rate-limit": 0, @@ -21411,13 +21597,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", "weight": 272, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", "rate-limit": 0, @@ -21570,13 +21756,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", "weight": 285, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", "rate-limit": 0, @@ -21726,13 +21912,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTelesignProvider", "group": "providers", "weight": 274, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", "rate-limit": 0, @@ -21829,13 +22015,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", "weight": 287, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", "rate-limit": 0, @@ -21930,13 +22116,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", "weight": 275, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", "rate-limit": 0, @@ -22033,13 +22219,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", "weight": 288, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", "rate-limit": 0, @@ -22134,13 +22320,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTwilioProvider", "group": "providers", "weight": 276, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", "rate-limit": 0, @@ -22237,13 +22423,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", "weight": 289, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", "rate-limit": 0, @@ -22338,13 +22524,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVonageProvider", "group": "providers", "weight": 277, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", "rate-limit": 0, @@ -22441,13 +22627,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVonageProvider", "group": "providers", "weight": 290, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", "rate-limit": 0, @@ -22540,13 +22726,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getProvider", "group": "providers", "weight": 282, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", "rate-limit": 0, @@ -22595,13 +22781,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteProvider", "group": "providers", "weight": 293, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", "rate-limit": 0, @@ -22655,13 +22841,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviderLogs", "group": "providers", "weight": 281, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-provider-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", "rate-limit": 0, @@ -22727,13 +22913,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", "weight": 302, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscriber-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", "rate-limit": 0, @@ -22799,13 +22985,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopics", "group": "topics", "weight": 295, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topics.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", "rate-limit": 0, @@ -22872,13 +23058,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTopic", "group": "topics", "weight": 294, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", "rate-limit": 0, @@ -22960,13 +23146,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTopic", "group": "topics", "weight": 297, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", "rate-limit": 0, @@ -23020,13 +23206,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTopic", "group": "topics", "weight": 298, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", "rate-limit": 0, @@ -23099,13 +23285,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTopic", "group": "topics", "weight": 299, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", "rate-limit": 0, @@ -23159,13 +23345,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopicLogs", "group": "topics", "weight": 296, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topic-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", "rate-limit": 0, @@ -23231,13 +23417,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscribers", "group": "subscribers", "weight": 301, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscribers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "rate-limit": 0, @@ -23312,13 +23498,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSubscriber", "group": "subscribers", "weight": 300, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "rate-limit": 0, @@ -23399,13 +23585,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSubscriber", "group": "subscribers", "weight": 303, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "rate-limit": 0, @@ -23462,13 +23648,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", "weight": 304, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "rate-limit": 0, @@ -23532,13 +23718,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": null, "weight": 262, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/list-migrations.md", "rate-limit": 0, @@ -23605,13 +23791,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAppwriteMigration", "group": null, "weight": 257, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-appwrite-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite.md", "rate-limit": 0, @@ -23697,13 +23883,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getAppwriteReport", "group": null, "weight": 264, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-appwrite-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-appwrite-report.md", "rate-limit": 0, @@ -23785,13 +23971,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createCsvMigration", "group": null, "weight": 261, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-csv-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-csv.md", "rate-limit": 0, @@ -23869,13 +24055,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFirebaseMigration", "group": null, "weight": 258, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-firebase-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase.md", "rate-limit": 0, @@ -23947,13 +24133,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFirebaseReport", "group": null, "weight": 265, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-firebase-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-firebase-report.md", "rate-limit": 0, @@ -24018,13 +24204,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createNHostMigration", "group": null, "weight": 260, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-n-host-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost.md", "rate-limit": 0, @@ -24137,13 +24323,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getNHostReport", "group": null, "weight": 267, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-n-host-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-nhost-report.md", "rate-limit": 0, @@ -24257,13 +24443,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSupabaseMigration", "group": null, "weight": 259, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/create-supabase-migration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase.md", "rate-limit": 0, @@ -24369,13 +24555,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSupabaseReport", "group": null, "weight": 266, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get-supabase-report.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/migration-supabase-report.md", "rate-limit": 0, @@ -24480,13 +24666,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 263, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/get-migration.md", "rate-limit": 0, @@ -24538,13 +24724,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "retry", "group": null, "weight": 268, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/retry.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/retry-migration.md", "rate-limit": 0, @@ -24591,13 +24777,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": null, "weight": 269, "cookies": false, "type": "", - "deprecated": false, "demo": "migrations\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/migrations\/delete-migration.md", "rate-limit": 0, @@ -24649,13 +24835,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 149, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-usage.md", "rate-limit": 0, @@ -24731,13 +24917,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": null, "weight": 151, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/list-variables.md", "rate-limit": 0, @@ -24779,13 +24965,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": null, "weight": 150, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/create-variable.md", "rate-limit": 0, @@ -24860,13 +25046,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": null, "weight": 152, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/get-variable.md", "rate-limit": 0, @@ -24918,13 +25104,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": null, "weight": 153, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/update-variable.md", "rate-limit": 0, @@ -25001,13 +25187,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": null, "weight": 154, "cookies": false, "type": "", - "deprecated": false, "demo": "project\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/project\/delete-variable.md", "rate-limit": 0, @@ -25059,13 +25245,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "projects", "weight": 103, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list.md", "rate-limit": 0, @@ -25130,13 +25316,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "projects", "weight": 102, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create.md", "rate-limit": 0, @@ -25277,13 +25463,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "projects", "weight": 104, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get.md", "rate-limit": 0, @@ -25335,13 +25521,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "projects", "weight": 105, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update.md", "rate-limit": 0, @@ -25460,13 +25646,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "projects", "weight": 122, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete.md", "rate-limit": 0, @@ -25520,13 +25706,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApiStatus", "group": "projects", "weight": 109, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-api-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status.md", "rate-limit": 0, @@ -25612,13 +25798,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", "weight": 110, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-api-status-all.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-api-status-all.md", "rate-limit": 0, @@ -25690,13 +25876,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthDuration", "group": "auth", "weight": 115, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-duration.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-duration.md", "rate-limit": 0, @@ -25768,13 +25954,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthLimit", "group": "auth", "weight": 114, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-limit.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-limit.md", "rate-limit": 0, @@ -25846,13 +26032,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", "weight": 120, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-sessions-limit.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-sessions-limit.md", "rate-limit": 0, @@ -25924,13 +26110,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", "weight": 113, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-memberships-privacy.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-memberships-privacy.md", "rate-limit": 0, @@ -26016,13 +26202,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMockNumbers", "group": "auth", "weight": 121, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-mock-numbers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-mock-numbers.md", "rate-limit": 0, @@ -26097,13 +26283,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", "weight": 118, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-password-dictionary.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-dictionary.md", "rate-limit": 0, @@ -26175,13 +26361,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", "weight": 117, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-password-history.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-password-history.md", "rate-limit": 0, @@ -26253,13 +26439,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", "weight": 119, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-personal-data-check.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-personal-data-check.md", "rate-limit": 0, @@ -26331,13 +26517,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", "weight": 112, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-session-alerts.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-alerts.md", "rate-limit": 0, @@ -26409,13 +26595,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", "weight": 148, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-session-invalidation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-session-invalidation.md", "rate-limit": 0, @@ -26487,13 +26673,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateAuthStatus", "group": "auth", "weight": 116, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-auth-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-status.md", "rate-limit": 0, @@ -26582,13 +26768,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDevKeys", "group": "devKeys", "weight": 419, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-dev-keys.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the project\\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'", "rate-limit": 0, @@ -26652,13 +26838,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDevKey", "group": "devKeys", "weight": 416, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", "rate-limit": 0, @@ -26735,13 +26921,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDevKey", "group": "devKeys", "weight": 418, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a project\\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.", "rate-limit": 0, @@ -26801,13 +26987,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDevKey", "group": "devKeys", "weight": 417, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a project\\'s dev key by its unique ID. Use this endpoint to update a project\\'s dev key name or expiration time.'", "rate-limit": 0, @@ -26887,13 +27073,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", "weight": 420, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-dev-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a project\\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.", "rate-limit": 0, @@ -26955,13 +27141,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "auth", "weight": 134, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-jwt.md", "rate-limit": 0, @@ -27040,13 +27226,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listKeys", "group": "keys", "weight": 130, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-keys.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-keys.md", "rate-limit": 0, @@ -27098,13 +27284,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createKey", "group": "keys", "weight": 129, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-key.md", "rate-limit": 0, @@ -27190,13 +27376,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getKey", "group": "keys", "weight": 131, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-key.md", "rate-limit": 0, @@ -27256,13 +27442,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateKey", "group": "keys", "weight": 132, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-key.md", "rate-limit": 0, @@ -27351,13 +27537,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteKey", "group": "keys", "weight": 133, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-key.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-key.md", "rate-limit": 0, @@ -27419,13 +27605,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateOAuth2", "group": "auth", "weight": 111, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-o-auth2.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-oauth2.md", "rate-limit": 0, @@ -27557,13 +27743,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listPlatforms", "group": "platforms", "weight": 136, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-platforms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-platforms.md", "rate-limit": 0, @@ -27615,13 +27801,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPlatform", "group": "platforms", "weight": 135, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-platform.md", "rate-limit": 0, @@ -27735,13 +27921,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPlatform", "group": "platforms", "weight": 137, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-platform.md", "rate-limit": 0, @@ -27801,13 +27987,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePlatform", "group": "platforms", "weight": 138, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-platform.md", "rate-limit": 0, @@ -27898,13 +28084,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deletePlatform", "group": "platforms", "weight": 139, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-platform.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-platform.md", "rate-limit": 0, @@ -27966,13 +28152,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateServiceStatus", "group": "projects", "weight": 107, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-service-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status.md", "rate-limit": 0, @@ -28068,13 +28254,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", "weight": 108, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-service-status-all.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-service-status-all.md", "rate-limit": 0, @@ -28146,13 +28332,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmtp", "group": "templates", "weight": 140, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-smtp.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-smtp.md", "rate-limit": 0, @@ -28275,13 +28461,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createSmtpTest", "group": "templates", "weight": 141, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-smtp-test.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-smtp-test.md", "rate-limit": 0, @@ -28413,13 +28599,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTeam", "group": "projects", "weight": 106, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-team.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-team.md", "rate-limit": 0, @@ -28489,13 +28675,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getEmailTemplate", "group": "templates", "weight": 143, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-email-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-email-template.md", "rate-limit": 0, @@ -28709,13 +28895,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", "weight": 145, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-email-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-email-template.md", "rate-limit": 0, @@ -28972,13 +29158,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", "weight": 147, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-email-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-email-template.md", "rate-limit": 0, @@ -29192,13 +29378,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSmsTemplate", "group": "templates", "weight": 142, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-sms-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-sms-template.md", "rate-limit": 0, @@ -29409,13 +29595,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", "weight": 144, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-sms-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-sms-template.md", "rate-limit": 0, @@ -29644,13 +29830,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", "weight": 146, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-sms-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-sms-template.md", "rate-limit": 0, @@ -29861,13 +30047,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listWebhooks", "group": "webhooks", "weight": 124, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/list-webhooks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-webhooks.md", "rate-limit": 0, @@ -29919,13 +30105,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createWebhook", "group": "webhooks", "weight": 123, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/create-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-webhook.md", "rate-limit": 0, @@ -30037,13 +30223,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getWebhook", "group": "webhooks", "weight": 125, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/get-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-webhook.md", "rate-limit": 0, @@ -30103,13 +30289,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateWebhook", "group": "webhooks", "weight": 126, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook.md", "rate-limit": 0, @@ -30224,13 +30410,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", "weight": 128, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/delete-webhook.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-webhook.md", "rate-limit": 0, @@ -30292,13 +30478,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", "weight": 127, "cookies": false, "type": "", - "deprecated": false, "demo": "projects\/update-webhook-signature.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-webhook-signature.md", "rate-limit": 0, @@ -30358,13 +30544,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRules", "group": null, "weight": 241, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/list-rules.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/list-rules.md", "rate-limit": 0, @@ -30431,13 +30617,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAPIRule", "group": null, "weight": 481, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-a-p-i-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for serving Appwrite's API on custom domain.", "rate-limit": 10, @@ -30501,13 +30687,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFunctionRule", "group": null, "weight": 483, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-function-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for executing Appwrite Function on custom domain.", "rate-limit": 10, @@ -30584,13 +30770,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRedirectRule", "group": null, "weight": 484, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-redirect-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for to redirect from custom domain to another domain.", "rate-limit": 10, @@ -30704,13 +30890,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSiteRule", "group": null, "weight": 482, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/create-site-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new proxy rule for serving Appwrite Site on custom domain.", "rate-limit": 10, @@ -30785,13 +30971,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRule", "group": null, "weight": 242, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/get-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/get-rule.md", "rate-limit": 0, @@ -30838,13 +31024,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRule", "group": null, "weight": 243, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/delete-rule.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/delete-rule.md", "rate-limit": 0, @@ -30898,13 +31084,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRuleVerification", "group": null, "weight": 244, "cookies": false, "type": "", - "deprecated": false, "demo": "proxy\/update-rule-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/proxy\/update-rule-verification.md", "rate-limit": 0, @@ -30956,13 +31142,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "sites", "weight": 453, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's sites. You can use the query params to filter your results.", "rate-limit": 0, @@ -31028,13 +31214,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "sites", "weight": 451, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site.", "rate-limit": 0, @@ -31295,13 +31481,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFrameworks", "group": "frameworks", "weight": 456, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-frameworks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all frameworks that are currently available on the server instance.", "rate-limit": 0, @@ -31344,13 +31530,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "frameworks", "weight": 479, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed site specifications for this instance.", "rate-limit": 0, @@ -31394,13 +31580,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTemplates", "group": "templates", "weight": 475, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-templates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList available site templates. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", "rate-limit": 0, @@ -31488,13 +31674,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTemplate", "group": "templates", "weight": 476, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-template.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site template using ID. You can use template details in [createSite](\/docs\/references\/cloud\/server-nodejs\/sites#create) method.", "rate-limit": 0, @@ -31546,13 +31732,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listUsage", "group": null, "weight": 477, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -31616,13 +31802,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "sites", "weight": 452, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site by its unique ID.", "rate-limit": 0, @@ -31675,13 +31861,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "sites", "weight": 454, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate site by its unique ID.", "rate-limit": 0, @@ -31937,13 +32123,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "sites", "weight": 455, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site by its unique ID.", "rate-limit": 0, @@ -31998,13 +32184,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", "weight": 462, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-site-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", "rate-limit": 0, @@ -32075,13 +32261,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 461, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the site's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -32155,13 +32341,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 457, "cookies": false, "type": "upload", - "deprecated": false, "demo": "sites\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID.", "rate-limit": 0, @@ -32255,13 +32441,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 465, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -32334,13 +32520,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 458, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/sites#listTemplates) to find the template details.", "rate-limit": 0, @@ -32440,13 +32626,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 459, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -32537,13 +32723,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 460, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment by its unique ID.", "rate-limit": 0, @@ -32599,13 +32785,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 463, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site deployment by its unique ID.", "rate-limit": 0, @@ -32666,13 +32852,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 464, "cookies": false, "type": "location", - "deprecated": false, "demo": "sites\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -32751,13 +32937,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 466, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -32818,13 +33004,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 468, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all site logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -32889,13 +33075,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getLog", "group": "logs", "weight": 467, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site request log by its unique ID.", "rate-limit": 0, @@ -32953,13 +33139,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteLog", "group": "logs", "weight": 469, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site log by its unique ID.", "rate-limit": 0, @@ -33020,13 +33206,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 478, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.", "rate-limit": 0, @@ -33098,13 +33284,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 472, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific site.", "rate-limit": 0, @@ -33157,13 +33343,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 470, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", "rate-limit": 0, @@ -33247,13 +33433,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 471, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -33314,13 +33500,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 473, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -33406,13 +33592,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 474, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -33473,13 +33659,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listBuckets", "group": "buckets", "weight": 156, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-buckets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", "rate-limit": 0, @@ -33545,13 +33731,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBucket", "group": "buckets", "weight": 155, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/create-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", "rate-limit": 0, @@ -33682,13 +33868,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBucket", "group": "buckets", "weight": 157, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", "rate-limit": 0, @@ -33741,13 +33927,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBucket", "group": "buckets", "weight": 158, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", "rate-limit": 0, @@ -33874,13 +34060,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteBucket", "group": "buckets", "weight": 159, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", "rate-limit": 0, @@ -33933,13 +34119,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFiles", "group": "files", "weight": 161, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-files.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "rate-limit": 0, @@ -34015,13 +34201,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFile", "group": "files", "weight": 160, "cookies": false, "type": "upload", - "deprecated": false, "demo": "storage\/create-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "rate-limit": 60, @@ -34104,13 +34290,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFile", "group": "files", "weight": 162, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "rate-limit": 0, @@ -34173,13 +34359,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFile", "group": "files", "weight": 167, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "rate-limit": 60, @@ -34261,13 +34447,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteFile", "group": "files", "weight": 168, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", "rate-limit": 60, @@ -34330,13 +34516,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFileDownload", "group": "files", "weight": 164, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "rate-limit": 0, @@ -34408,13 +34594,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFilePreview", "group": "files", "weight": 163, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-preview.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "rate-limit": 0, @@ -34614,13 +34800,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFileView", "group": "files", "weight": 165, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-view.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "rate-limit": 0, @@ -34692,13 +34878,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 169, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-usage.md", "rate-limit": 0, @@ -34762,13 +34948,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBucketUsage", "group": null, "weight": 170, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-bucket-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket-usage.md", "rate-limit": 0, @@ -34840,13 +35026,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "teams", "weight": 172, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "rate-limit": 0, @@ -34914,13 +35100,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "teams", "weight": 171, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "rate-limit": 0, @@ -35003,13 +35189,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "teams", "weight": 173, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "rate-limit": 0, @@ -35064,13 +35250,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "teams", "weight": 175, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "rate-limit": 0, @@ -35138,13 +35324,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "teams", "weight": 177, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "rate-limit": 0, @@ -35199,13 +35385,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 184, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md", "rate-limit": 0, @@ -35269,13 +35455,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 179, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "rate-limit": 0, @@ -35351,13 +35537,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMembership", "group": "memberships", "weight": 178, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "rate-limit": 10, @@ -35463,13 +35649,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMembership", "group": "memberships", "weight": 180, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "rate-limit": 0, @@ -35532,13 +35718,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembership", "group": "memberships", "weight": 181, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "rate-limit": 0, @@ -35617,13 +35803,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMembership", "group": "memberships", "weight": 183, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "rate-limit": 0, @@ -35688,13 +35874,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", "weight": 182, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "rate-limit": 0, @@ -35781,13 +35967,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "teams", "weight": 174, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "rate-limit": 0, @@ -35841,13 +36027,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "teams", "weight": 176, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "rate-limit": 0, @@ -35919,13 +36105,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "files", "weight": 487, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the tokens created for a specific file or bucket. You can use the query params to filter your results.", "rate-limit": 0, @@ -35999,13 +36185,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFileToken", "group": "files", "weight": 485, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/create-file-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, @@ -36083,13 +36269,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "tokens", "weight": 486, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a token by its unique ID.", "rate-limit": 0, @@ -36143,13 +36329,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "tokens", "weight": 488, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date.", "rate-limit": 60, @@ -36214,13 +36400,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "tokens", "weight": 489, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a token by its unique ID.", "rate-limit": 60, @@ -36274,13 +36460,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "users", "weight": 194, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", "rate-limit": 0, @@ -36346,13 +36532,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "users", "weight": 185, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", "rate-limit": 0, @@ -36441,13 +36627,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createArgon2User", "group": "users", "weight": 188, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-argon2user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, @@ -36532,13 +36718,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBcryptUser", "group": "users", "weight": 186, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-bcrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", "rate-limit": 0, @@ -36621,13 +36807,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 202, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", "rate-limit": 0, @@ -36690,13 +36876,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 225, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", "rate-limit": 0, @@ -36751,13 +36937,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMD5User", "group": "users", "weight": 187, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-m-d5user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, @@ -36842,13 +37028,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPHPassUser", "group": "users", "weight": 190, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-p-h-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, @@ -36933,13 +37119,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptUser", "group": "users", "weight": 191, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", "rate-limit": 0, @@ -37059,13 +37245,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", "weight": 192, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-modified-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", "rate-limit": 0, @@ -37171,13 +37357,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSHAUser", "group": "users", "weight": 189, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-s-h-a-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, @@ -37281,13 +37467,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getUsage", "group": null, "weight": 227, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-usage.md", "rate-limit": 0, @@ -37351,13 +37537,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "users", "weight": 195, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", "rate-limit": 0, @@ -37405,13 +37591,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "users", "weight": 223, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", "rate-limit": 0, @@ -37466,13 +37652,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "users", "weight": 208, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", "rate-limit": 0, @@ -37545,13 +37731,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "sessions", "weight": 226, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, @@ -37627,13 +37813,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateLabels", "group": "users", "weight": 204, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-labels.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", "rate-limit": 0, @@ -37707,13 +37893,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 200, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", "rate-limit": 0, @@ -37778,13 +37964,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 199, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", "rate-limit": 0, @@ -37860,13 +38046,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfa", "group": "users", "weight": 213, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", "rate-limit": 0, @@ -37934,13 +38120,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 218, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -38006,13 +38192,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 214, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", "rate-limit": 0, @@ -38065,13 +38251,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 215, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -38124,13 +38310,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 217, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -38183,13 +38369,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 216, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -38244,13 +38430,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "users", "weight": 206, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", "rate-limit": 0, @@ -38323,13 +38509,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "users", "weight": 207, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", "rate-limit": 0, @@ -38402,13 +38588,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "users", "weight": 209, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", "rate-limit": 0, @@ -38479,13 +38665,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "users", "weight": 196, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", "rate-limit": 0, @@ -38538,13 +38724,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "users", "weight": 211, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", "rate-limit": 0, @@ -38615,13 +38801,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 198, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", "rate-limit": 0, @@ -38674,13 +38860,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 219, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", "rate-limit": 0, @@ -38728,13 +38914,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 222, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", "rate-limit": 0, @@ -38784,13 +38970,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 221, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", "rate-limit": 0, @@ -38853,13 +39039,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "users", "weight": 203, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", "rate-limit": 0, @@ -38930,13 +39116,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "targets", "weight": 201, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", "rate-limit": 0, @@ -39002,13 +39188,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTarget", "group": "targets", "weight": 193, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", "rate-limit": 0, @@ -39113,13 +39299,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTarget", "group": "targets", "weight": 197, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", "rate-limit": 0, @@ -39181,13 +39367,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTarget", "group": "targets", "weight": 212, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", "rate-limit": 0, @@ -39271,13 +39457,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTarget", "group": "targets", "weight": 224, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", "rate-limit": 0, @@ -39341,13 +39527,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createToken", "group": "sessions", "weight": 220, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", "rate-limit": 0, @@ -39423,13 +39609,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailVerification", "group": "users", "weight": 210, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", "rate-limit": 0, @@ -39502,13 +39688,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "users", "weight": 205, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", "rate-limit": 0, @@ -39581,13 +39767,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", "weight": 231, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/create-repository-detection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository-detection.md", "rate-limit": 0, @@ -39676,13 +39862,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRepositories", "group": "repositories", "weight": 232, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/list-repositories.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repositories.md", "rate-limit": 0, @@ -39757,13 +39943,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRepository", "group": "repositories", "weight": 233, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/create-repository.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/create-repository.md", "rate-limit": 0, @@ -39840,13 +40026,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRepository", "group": "repositories", "weight": 234, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/get-repository.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository.md", "rate-limit": 0, @@ -39906,13 +40092,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", "weight": 235, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/list-repository-branches.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-repository-branches.md", "rate-limit": 0, @@ -39972,13 +40158,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", "weight": 230, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/get-repository-contents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-repository-contents.md", "rate-limit": 0, @@ -40055,13 +40241,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", "weight": 240, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/update-external-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/update-external-deployments.md", "rate-limit": 0, @@ -40139,13 +40325,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listInstallations", "group": "installations", "weight": 237, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/list-installations.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/list-installations.md", "rate-limit": 0, @@ -40210,13 +40396,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getInstallation", "group": "installations", "weight": 238, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/get-installation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/get-installation.md", "rate-limit": 0, @@ -40263,13 +40449,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteInstallation", "group": "installations", "weight": 239, "cookies": false, "type": "", - "deprecated": false, "demo": "vcs\/delete-installation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vcs\/delete-installation.md", "rate-limit": 0, diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index d55457e34b..cb96855956 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -99,13 +99,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "account", "weight": 10, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md", "rate-limit": 0, @@ -151,13 +151,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "account", "weight": 9, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md", "rate-limit": 10, @@ -242,13 +242,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "account", "weight": 35, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md", "rate-limit": 0, @@ -321,13 +321,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 58, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-identities.md", "rate-limit": 0, @@ -384,13 +384,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 59, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-identity.md", "rate-limit": 0, @@ -448,13 +448,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "tokens", "weight": 30, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md", "rate-limit": 100, @@ -497,13 +497,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 32, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-logs.md", "rate-limit": 0, @@ -565,13 +565,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMFA", "group": "mfa", "weight": 45, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-m-f-a.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa.md", "rate-limit": 0, @@ -639,13 +639,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaAuthenticator", "group": "mfa", "weight": 47, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-authenticator.md", "rate-limit": 0, @@ -706,13 +706,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaAuthenticator", "group": "mfa", "weight": 48, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-authenticator.md", "rate-limit": 0, @@ -786,13 +786,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 52, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -855,13 +855,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaChallenge", "group": "mfa", "weight": 53, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-challenge.md", "rate-limit": 10, @@ -932,13 +932,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaChallenge", "group": "mfa", "weight": 54, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-challenge.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-challenge.md", "rate-limit": 10, @@ -1011,13 +1011,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 46, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-mfa-factors.md", "rate-limit": 0, @@ -1063,13 +1063,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 51, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -1115,13 +1115,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 49, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -1167,13 +1167,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 50, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -1221,13 +1221,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "account", "weight": 33, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md", "rate-limit": 0, @@ -1295,13 +1295,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "account", "weight": 34, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md", "rate-limit": 10, @@ -1375,13 +1375,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "account", "weight": 36, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md", "rate-limit": 0, @@ -1454,13 +1454,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "account", "weight": 31, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md", "rate-limit": 0, @@ -1506,13 +1506,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "account", "weight": 37, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md", "rate-limit": 0, @@ -1580,13 +1580,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRecovery", "group": "recovery", "weight": 39, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md", "rate-limit": 10, @@ -1662,13 +1662,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRecovery", "group": "recovery", "weight": 40, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-recovery.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md", "rate-limit": 10, @@ -1748,13 +1748,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 12, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/list-sessions.md", "rate-limit": 0, @@ -1795,13 +1795,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 13, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md", "rate-limit": 100, @@ -1849,13 +1849,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createAnonymousSession", "group": "sessions", "weight": 18, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-anonymous-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md", "rate-limit": 50, @@ -1900,13 +1900,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailPasswordSession", "group": "sessions", "weight": 17, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-password-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email-password.md", "rate-limit": 10, @@ -1978,13 +1978,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateMagicURLSession", "group": "sessions", "weight": 27, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-magic-u-r-l-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -1996,6 +1996,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2056,13 +2057,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updatePhoneSession", "group": "sessions", "weight": 28, "cookies": false, "type": "", - "deprecated": true, "demo": "account\/update-phone-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2074,6 +2075,7 @@ "client" ], "packaging": false, + "deprecated": true, "auth": { "Project": [] } @@ -2134,13 +2136,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 19, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md", "rate-limit": 10, @@ -2210,13 +2212,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSession", "group": "sessions", "weight": 14, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/get-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md", "rate-limit": 0, @@ -2272,13 +2274,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSession", "group": "sessions", "weight": 16, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md", "rate-limit": 10, @@ -2329,13 +2331,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 15, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md", "rate-limit": 100, @@ -2393,13 +2395,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "account", "weight": 38, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md", "rate-limit": 0, @@ -2447,13 +2449,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailToken", "group": "tokens", "weight": 26, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-email-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md", "rate-limit": 10, @@ -2534,13 +2536,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMagicURLToken", "group": "tokens", "weight": 25, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-magic-u-r-l-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-magic-url.md", "rate-limit": 60, @@ -2622,13 +2624,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "createOAuth2Token", "group": "tokens", "weight": 24, "cookies": false, "type": "webAuth", - "deprecated": false, "demo": "account\/create-o-auth2token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-oauth2.md", "rate-limit": 50, @@ -2759,13 +2761,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneToken", "group": "tokens", "weight": 29, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-phone.md", "rate-limit": 10, @@ -2840,13 +2842,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVerification", "group": "verification", "weight": 41, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md", "rate-limit": 10, @@ -2912,13 +2914,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVerification", "group": "verification", "weight": 42, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md", "rate-limit": 10, @@ -2993,13 +2995,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPhoneVerification", "group": "verification", "weight": 43, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/create-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md", "rate-limit": 10, @@ -3048,13 +3050,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "verification", "weight": 44, "cookies": false, "type": "", - "deprecated": false, "demo": "account\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md", "rate-limit": 10, @@ -3127,13 +3129,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBrowser", "group": null, "weight": 61, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-browser.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "rate-limit": 0, @@ -3253,13 +3255,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCreditCard", "group": null, "weight": 60, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-credit-card.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md", "rate-limit": 0, @@ -3385,13 +3387,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFavicon", "group": null, "weight": 64, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-favicon.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md", "rate-limit": 0, @@ -3449,13 +3451,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFlag", "group": null, "weight": 62, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-flag.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md", "rate-limit": 0, @@ -3937,13 +3939,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getImage", "group": null, "weight": 63, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-image.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md", "rate-limit": 0, @@ -4021,13 +4023,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getInitials", "group": null, "weight": 66, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-initials.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md", "rate-limit": 0, @@ -4113,13 +4115,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQR", "group": null, "weight": 65, "cookies": false, "type": "location", - "deprecated": false, "demo": "avatars\/get-q-r.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md", "rate-limit": 0, @@ -4205,13 +4207,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "databases", "weight": 320, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md", "rate-limit": 0, @@ -4278,13 +4280,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "databases", "weight": 316, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create.md", "rate-limit": 0, @@ -4361,13 +4363,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "databases", "weight": 317, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md", "rate-limit": 0, @@ -4421,13 +4423,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "databases", "weight": 318, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md", "rate-limit": 0, @@ -4500,13 +4502,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "databases", "weight": 319, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md", "rate-limit": 0, @@ -4560,13 +4562,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listCollections", "group": "collections", "weight": 328, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-collections.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md", "rate-limit": 0, @@ -4577,6 +4579,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.list" + }, "auth": { "Project": [], "Key": [] @@ -4641,13 +4647,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createCollection", "group": "collections", "weight": 324, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md", "rate-limit": 0, @@ -4658,6 +4664,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.create" + }, "auth": { "Project": [], "Key": [] @@ -4747,13 +4757,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getCollection", "group": "collections", "weight": 325, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md", "rate-limit": 0, @@ -4764,6 +4774,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.get" + }, "auth": { "Project": [], "Key": [] @@ -4815,13 +4829,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateCollection", "group": "collections", "weight": 326, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md", "rate-limit": 0, @@ -4832,6 +4846,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.update" + }, "auth": { "Project": [], "Key": [] @@ -4917,13 +4935,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteCollection", "group": "collections", "weight": 327, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-collection.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md", "rate-limit": 0, @@ -4934,6 +4952,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.delete" + }, "auth": { "Project": [], "Key": [] @@ -4985,13 +5007,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listAttributes", "group": "attributes", "weight": 345, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-attributes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -5002,6 +5024,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listColumns" + }, "auth": { "Project": [], "Key": [] @@ -5067,13 +5093,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", "weight": 346, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md", "rate-limit": 0, @@ -5084,6 +5110,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createBooleanColumn" + }, "auth": { "Project": [], "Key": [] @@ -5174,13 +5204,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", "weight": 347, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-boolean-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-attribute.md", "rate-limit": 0, @@ -5191,6 +5221,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateBooleanColumn" + }, "auth": { "Project": [], "Key": [] @@ -5283,13 +5317,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", "weight": 348, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-attribute.md", "rate-limit": 0, @@ -5300,6 +5334,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createDatetimeColumn" + }, "auth": { "Project": [], "Key": [] @@ -5390,13 +5428,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", "weight": 349, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-datetime-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-attribute.md", "rate-limit": 0, @@ -5407,6 +5445,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateDatetimeColumn" + }, "auth": { "Project": [], "Key": [] @@ -5499,13 +5541,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", "weight": 350, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md", "rate-limit": 0, @@ -5516,6 +5558,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEmailColumn" + }, "auth": { "Project": [], "Key": [] @@ -5606,13 +5652,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", "weight": 351, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-email-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-attribute.md", "rate-limit": 0, @@ -5623,6 +5669,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEmailColumn" + }, "auth": { "Project": [], "Key": [] @@ -5715,13 +5765,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", "weight": 352, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-attribute.md", "rate-limit": 0, @@ -5732,6 +5782,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createEnumColumn" + }, "auth": { "Project": [], "Key": [] @@ -5832,13 +5886,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", "weight": 353, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-enum-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-attribute.md", "rate-limit": 0, @@ -5849,6 +5903,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateEnumColumn" + }, "auth": { "Project": [], "Key": [] @@ -5951,13 +6009,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", "weight": 354, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md", "rate-limit": 0, @@ -5968,6 +6026,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createFloatColumn" + }, "auth": { "Project": [], "Key": [] @@ -6070,13 +6132,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", "weight": 355, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-float-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-attribute.md", "rate-limit": 0, @@ -6087,6 +6149,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateFloatColumn" + }, "auth": { "Project": [], "Key": [] @@ -6191,13 +6257,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", "weight": 356, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md", "rate-limit": 0, @@ -6208,6 +6274,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIntegerColumn" + }, "auth": { "Project": [], "Key": [] @@ -6310,13 +6380,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", "weight": 357, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-integer-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-attribute.md", "rate-limit": 0, @@ -6327,6 +6397,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIntegerColumn" + }, "auth": { "Project": [], "Key": [] @@ -6431,13 +6505,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIpAttribute", "group": "attributes", "weight": 358, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md", "rate-limit": 0, @@ -6448,6 +6522,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIpColumn" + }, "auth": { "Project": [], "Key": [] @@ -6538,13 +6616,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", "weight": 359, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-ip-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-attribute.md", "rate-limit": 0, @@ -6555,6 +6633,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateIpColumn" + }, "auth": { "Project": [], "Key": [] @@ -6647,13 +6729,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", "weight": 360, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-attribute.md", "rate-limit": 0, @@ -6664,6 +6746,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRelationshipColumn" + }, "auth": { "Project": [], "Key": [] @@ -6781,13 +6867,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createStringAttribute", "group": "attributes", "weight": 362, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md", "rate-limit": 0, @@ -6798,6 +6884,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createStringColumn" + }, "auth": { "Project": [], "Key": [] @@ -6901,13 +6991,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", "weight": 363, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-string-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-attribute.md", "rate-limit": 0, @@ -6918,6 +7008,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateStringColumn" + }, "auth": { "Project": [], "Key": [] @@ -7016,13 +7110,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", "weight": 364, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md", "rate-limit": 0, @@ -7033,6 +7127,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createUrlColumn" + }, "auth": { "Project": [], "Key": [] @@ -7123,13 +7221,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", "weight": 365, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-url-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-attribute.md", "rate-limit": 0, @@ -7140,6 +7238,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateUrlColumn" + }, "auth": { "Project": [], "Key": [] @@ -7261,13 +7363,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getAttribute", "group": "attributes", "weight": 343, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md", "rate-limit": 0, @@ -7278,6 +7380,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getColumn" + }, "auth": { "Project": [], "Key": [] @@ -7331,13 +7437,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteAttribute", "group": "attributes", "weight": 344, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md", "rate-limit": 0, @@ -7348,6 +7454,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteColumn" + }, "auth": { "Project": [], "Key": [] @@ -7408,13 +7518,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", "weight": 361, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-relationship-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-attribute.md", "rate-limit": 0, @@ -7425,6 +7535,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRelationshipColumn" + }, "auth": { "Project": [], "Key": [] @@ -7511,13 +7625,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listDocuments", "group": "documents", "weight": 339, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md", "rate-limit": 0, @@ -7529,6 +7643,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listRows" + }, "auth": { "Project": [], "Session": [] @@ -7594,13 +7712,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createDocument", "group": "documents", "weight": 331, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md", "rate-limit": 120, @@ -7612,6 +7730,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createRow" + }, "methods": [ { "name": "createDocument", @@ -7758,13 +7880,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocuments", "group": "documents", "weight": 336, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/upsert-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-documents.md", "rate-limit": 120, @@ -7776,6 +7898,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRows" + }, "methods": [ { "name": "upsertDocuments", @@ -7866,13 +7992,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocuments", "group": "documents", "weight": 334, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", "rate-limit": 120, @@ -7884,6 +8010,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRows" + }, "auth": { "Project": [], "Key": [] @@ -7959,13 +8089,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocuments", "group": "documents", "weight": 338, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-documents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", "rate-limit": 60, @@ -7977,6 +8107,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRows" + }, "auth": { "Project": [], "Key": [] @@ -8046,13 +8180,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getDocument", "group": "documents", "weight": 332, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md", "rate-limit": 0, @@ -8064,6 +8198,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getRow" + }, "auth": { "Project": [], "Session": [] @@ -8137,13 +8275,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "upsertDocument", "group": "documents", "weight": 335, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/upsert-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-document.md", "rate-limit": 120, @@ -8155,6 +8293,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.upsertRow" + }, "methods": [ { "name": "upsertDocument", @@ -8262,13 +8404,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "updateDocument", "group": "documents", "weight": 333, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/update-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md", "rate-limit": 120, @@ -8280,6 +8422,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.updateRow" + }, "auth": { "Project": [], "Session": [] @@ -8360,13 +8506,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteDocument", "group": "documents", "weight": 337, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-document.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md", "rate-limit": 60, @@ -8378,6 +8524,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteRow" + }, "auth": { "Project": [], "Session": [] @@ -8441,13 +8591,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", "weight": 342, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/decrement-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-document-attribute.md", "rate-limit": 120, @@ -8459,6 +8609,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.decrementRowColumn" + }, "auth": { "Project": [], "Key": [] @@ -8548,13 +8702,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", "weight": 341, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/increment-document-attribute.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-document-attribute.md", "rate-limit": 120, @@ -8566,6 +8720,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.incrementRowColumn" + }, "auth": { "Project": [], "Key": [] @@ -8653,13 +8811,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 369, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -8670,6 +8828,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.listIndexes" + }, "auth": { "Project": [], "Key": [] @@ -8733,13 +8895,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 366, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -8750,6 +8912,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.createIndex" + }, "auth": { "Project": [], "Key": [] @@ -8861,13 +9027,13 @@ } } }, + "deprecated": true, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 367, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -8878,6 +9044,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.getIndex" + }, "auth": { "Project": [], "Key": [] @@ -8931,13 +9101,13 @@ "description": "No content" } }, + "deprecated": true, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 368, "cookies": false, "type": "", - "deprecated": false, "demo": "databases\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -8948,6 +9118,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "tables.deleteIndex" + }, "auth": { "Project": [], "Key": [] @@ -9006,13 +9180,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": null, "weight": 374, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, @@ -9087,13 +9261,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": null, "weight": 370, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, @@ -9193,13 +9367,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 371, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, @@ -9261,13 +9435,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": null, "weight": 372, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, @@ -9363,13 +9537,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": null, "weight": 373, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, @@ -9431,13 +9605,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listColumns", "group": "columns", "weight": 379, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, @@ -9513,13 +9687,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBooleanColumn", "group": "columns", "weight": 380, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, @@ -9620,13 +9794,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", "weight": 381, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, @@ -9729,13 +9903,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", "weight": 382, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, @@ -9836,13 +10010,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", "weight": 383, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, @@ -9945,13 +10119,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmailColumn", "group": "columns", "weight": 384, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, @@ -10052,13 +10226,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailColumn", "group": "columns", "weight": 385, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, @@ -10161,13 +10335,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEnumColumn", "group": "columns", "weight": 386, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, @@ -10278,13 +10452,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEnumColumn", "group": "columns", "weight": 387, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, @@ -10397,13 +10571,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFloatColumn", "group": "columns", "weight": 388, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, @@ -10516,13 +10690,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFloatColumn", "group": "columns", "weight": 389, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, @@ -10637,13 +10811,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIntegerColumn", "group": "columns", "weight": 390, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, @@ -10756,13 +10930,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", "weight": 391, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, @@ -10877,13 +11051,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIpColumn", "group": "columns", "weight": 392, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, @@ -10984,13 +11158,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateIpColumn", "group": "columns", "weight": 393, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, @@ -11093,13 +11267,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", "weight": 394, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, @@ -11227,13 +11401,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createStringColumn", "group": "columns", "weight": 396, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, @@ -11347,13 +11521,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStringColumn", "group": "columns", "weight": 397, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, @@ -11462,13 +11636,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createUrlColumn", "group": "columns", "weight": 398, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, @@ -11569,13 +11743,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateUrlColumn", "group": "columns", "weight": 399, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, @@ -11707,13 +11881,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getColumn", "group": "columns", "weight": 377, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, @@ -11777,13 +11951,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteColumn", "group": "columns", "weight": 378, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, @@ -11854,13 +12028,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", "weight": 395, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, @@ -11957,13 +12131,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIndexes", "group": "indexes", "weight": 403, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, @@ -12037,13 +12211,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createIndex", "group": "indexes", "weight": 400, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, @@ -12165,13 +12339,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getIndex", "group": "indexes", "weight": 401, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, @@ -12235,13 +12409,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIndex", "group": "indexes", "weight": 402, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, @@ -12310,13 +12484,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRows", "group": "rows", "weight": 412, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, @@ -12393,13 +12567,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createRow", "group": "rows", "weight": 404, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, @@ -12557,13 +12731,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRows", "group": "rows", "weight": 409, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, @@ -12665,13 +12839,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRows", "group": "rows", "weight": 407, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, @@ -12758,13 +12932,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "deleteRows", "group": "rows", "weight": 411, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, @@ -12845,13 +13019,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getRow", "group": "rows", "weight": 405, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, @@ -12936,13 +13110,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "upsertRow", "group": "rows", "weight": 408, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, @@ -13058,13 +13232,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateRow", "group": "rows", "weight": 406, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, @@ -13156,13 +13330,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteRow", "group": "rows", "weight": 410, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, @@ -13237,13 +13411,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "decrementRowColumn", "group": "rows", "weight": 415, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, @@ -13344,13 +13518,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "incrementRowColumn", "group": "rows", "weight": 414, "cookies": false, "type": "", - "deprecated": false, "demo": "tables\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, @@ -13449,13 +13623,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "functions", "weight": 424, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's functions. You can use the query params to filter your results.", "rate-limit": 0, @@ -13522,13 +13696,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "functions", "weight": 421, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function. You can pass a list of [permissions](https:\/\/appwrite.io\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.", "rate-limit": 0, @@ -13774,13 +13948,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listRuntimes", "group": "runtimes", "weight": 426, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-runtimes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all runtimes that are currently active on your instance.", "rate-limit": 0, @@ -13824,13 +13998,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "runtimes", "weight": 427, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed function specifications for this instance.", "rate-limit": 0, @@ -13875,13 +14049,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "functions", "weight": 422, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function by its unique ID.", "rate-limit": 0, @@ -13935,13 +14109,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "functions", "weight": 423, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate function by its unique ID.", "rate-limit": 0, @@ -14183,13 +14357,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "functions", "weight": 425, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function by its unique ID.", "rate-limit": 0, @@ -14245,13 +14419,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", "weight": 430, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-function-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.", "rate-limit": 0, @@ -14323,13 +14497,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 431, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the function's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -14404,13 +14578,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 428, "cookies": false, "type": "upload", - "deprecated": false, "demo": "functions\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https:\/\/appwrite.io\/docs\/functions).\n\nUse the \"command\" param to set the entrypoint used to execute your code.", "rate-limit": 0, @@ -14497,13 +14671,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 436, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -14583,13 +14757,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 433, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/functions#listTemplates) to find the template details.", "rate-limit": 0, @@ -14690,13 +14864,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 434, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a function is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -14787,13 +14961,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 429, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment by its unique ID.", "rate-limit": 0, @@ -14850,13 +15024,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 432, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a code deployment by its unique ID.", "rate-limit": 0, @@ -14918,13 +15092,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 435, "cookies": false, "type": "location", - "deprecated": false, "demo": "functions\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -15004,13 +15178,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 437, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -15072,13 +15246,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listExecutions", "group": "executions", "weight": 440, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-executions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the current user function execution logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -15147,13 +15321,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createExecution", "group": "executions", "weight": 438, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterTrigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", "rate-limit": 0, @@ -15265,13 +15439,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getExecution", "group": "executions", "weight": 439, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a function execution log by its unique ID.", "rate-limit": 0, @@ -15331,13 +15505,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteExecution", "group": "executions", "weight": 441, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-execution.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a function execution by its unique ID.", "rate-limit": 0, @@ -15399,13 +15573,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 446, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific function.", "rate-limit": 0, @@ -15459,13 +15633,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 444, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new function environment variable. These variables can be accessed in the function at runtime as environment variables.", "rate-limit": 0, @@ -15550,13 +15724,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 445, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -15618,13 +15792,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 447, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -15711,13 +15885,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 448, "cookies": false, "type": "", - "deprecated": false, "demo": "functions\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -15781,13 +15955,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "query", "group": "graphql", "weight": 254, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/query.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -15856,13 +16030,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "mutation", "group": "graphql", "weight": 253, "cookies": false, "type": "graphql", - "deprecated": false, "demo": "graphql\/mutation.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/graphql\/post.md", "rate-limit": 60, @@ -15929,13 +16103,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "health", "weight": 78, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md", "rate-limit": 0, @@ -15979,13 +16153,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getAntivirus", "group": "health", "weight": 99, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-antivirus.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md", "rate-limit": 0, @@ -16029,13 +16203,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCache", "group": "health", "weight": 81, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-cache.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md", "rate-limit": 0, @@ -16079,13 +16253,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getCertificate", "group": "health", "weight": 86, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-certificate.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-certificate.md", "rate-limit": 0, @@ -16138,13 +16312,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDB", "group": "health", "weight": 80, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-d-b.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md", "rate-limit": 0, @@ -16188,13 +16362,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPubSub", "group": "health", "weight": 82, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-pub-sub.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-pubsub.md", "rate-limit": 0, @@ -16238,13 +16412,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueBuilds", "group": "queue", "weight": 88, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-builds.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-builds.md", "rate-limit": 0, @@ -16299,13 +16473,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueCertificates", "group": "queue", "weight": 87, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-certificates.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md", "rate-limit": 0, @@ -16360,13 +16534,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDatabases", "group": "queue", "weight": 89, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-databases.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-databases.md", "rate-limit": 0, @@ -16430,13 +16604,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueDeletes", "group": "queue", "weight": 90, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-deletes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-deletes.md", "rate-limit": 0, @@ -16491,13 +16665,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFailedJobs", "group": "queue", "weight": 100, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-failed-jobs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-failed-queue-jobs.md", "rate-limit": 0, @@ -16576,13 +16750,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueFunctions", "group": "queue", "weight": 94, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-functions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md", "rate-limit": 0, @@ -16637,13 +16811,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueLogs", "group": "queue", "weight": 85, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md", "rate-limit": 0, @@ -16698,13 +16872,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMails", "group": "queue", "weight": 91, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-mails.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-mails.md", "rate-limit": 0, @@ -16759,13 +16933,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMessaging", "group": "queue", "weight": 92, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-messaging.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-messaging.md", "rate-limit": 0, @@ -16820,13 +16994,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueMigrations", "group": "queue", "weight": 93, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-migrations.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-migrations.md", "rate-limit": 0, @@ -16881,13 +17055,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", "weight": 95, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-stats-resources.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-resources.md", "rate-limit": 0, @@ -16942,13 +17116,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueUsage", "group": "queue", "weight": 96, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-stats-usage.md", "rate-limit": 0, @@ -17003,13 +17177,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", "weight": 84, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-queue-webhooks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md", "rate-limit": 0, @@ -17064,13 +17238,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorage", "group": "storage", "weight": 98, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage.md", "rate-limit": 0, @@ -17114,13 +17288,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getStorageLocal", "group": "storage", "weight": 97, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-storage-local.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md", "rate-limit": 0, @@ -17164,13 +17338,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTime", "group": "health", "weight": 83, "cookies": false, "type": "", - "deprecated": false, "demo": "health\/get-time.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md", "rate-limit": 0, @@ -17214,13 +17388,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": null, "weight": 70, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md", "rate-limit": 0, @@ -17267,13 +17441,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCodes", "group": null, "weight": 71, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-locale-codes.md", "rate-limit": 0, @@ -17320,13 +17494,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listContinents", "group": null, "weight": 75, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-continents.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-continents.md", "rate-limit": 0, @@ -17373,13 +17547,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountries", "group": null, "weight": 72, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries.md", "rate-limit": 0, @@ -17426,13 +17600,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesEU", "group": null, "weight": 73, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-e-u.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-eu.md", "rate-limit": 0, @@ -17479,13 +17653,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCountriesPhones", "group": null, "weight": 74, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-countries-phones.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-countries-phones.md", "rate-limit": 0, @@ -17532,13 +17706,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listCurrencies", "group": null, "weight": 76, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-currencies.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-currencies.md", "rate-limit": 0, @@ -17585,13 +17759,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLanguages", "group": null, "weight": 77, "cookies": false, "type": "", - "deprecated": false, "demo": "locale\/list-languages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/list-languages.md", "rate-limit": 0, @@ -17638,13 +17812,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessages", "group": "messages", "weight": 308, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-messages.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-messages.md", "rate-limit": 0, @@ -17714,13 +17888,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createEmail", "group": "messages", "weight": 305, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-email.md", "rate-limit": 0, @@ -17873,13 +18047,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "messages", "weight": 312, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-email.md", "rate-limit": 0, @@ -18029,13 +18203,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPush", "group": "messages", "weight": 307, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-push.md", "rate-limit": 0, @@ -18225,13 +18399,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePush", "group": "messages", "weight": 314, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-push.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-push.md", "rate-limit": 0, @@ -18420,13 +18594,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSms", "group": "messages", "weight": 306, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sms.md", "rate-limit": 0, @@ -18539,13 +18713,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSms", "group": "messages", "weight": 313, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sms.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sms.md", "rate-limit": 0, @@ -18654,13 +18828,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMessage", "group": "messages", "weight": 311, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-message.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-message.md", "rate-limit": 0, @@ -18710,13 +18884,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "messages", "weight": 315, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-message.md", "rate-limit": 0, @@ -18771,13 +18945,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMessageLogs", "group": "logs", "weight": 309, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-message-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-logs.md", "rate-limit": 0, @@ -18844,13 +19018,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "messages", "weight": 310, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-message-targets.md", "rate-limit": 0, @@ -18917,13 +19091,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviders", "group": "providers", "weight": 280, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-providers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-providers.md", "rate-limit": 0, @@ -18993,13 +19167,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createApnsProvider", "group": "providers", "weight": 279, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-apns-provider.md", "rate-limit": 0, @@ -19109,13 +19283,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateApnsProvider", "group": "providers", "weight": 292, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-apns-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-apns-provider.md", "rate-limit": 0, @@ -19223,13 +19397,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFcmProvider", "group": "providers", "weight": 278, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-fcm-provider.md", "rate-limit": 0, @@ -19315,13 +19489,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFcmProvider", "group": "providers", "weight": 291, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-fcm-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-fcm-provider.md", "rate-limit": 0, @@ -19405,13 +19579,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMailgunProvider", "group": "providers", "weight": 270, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-mailgun-provider.md", "rate-limit": 0, @@ -19533,13 +19707,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", "weight": 283, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-mailgun-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-mailgun-provider.md", "rate-limit": 0, @@ -19659,13 +19833,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMsg91Provider", "group": "providers", "weight": 273, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-msg91-provider.md", "rate-limit": 0, @@ -19763,13 +19937,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", "weight": 286, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-msg91provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-msg91-provider.md", "rate-limit": 0, @@ -19865,13 +20039,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSendgridProvider", "group": "providers", "weight": 271, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-sendgrid-provider.md", "rate-limit": 0, @@ -19981,13 +20155,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", "weight": 284, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-sendgrid-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-sendgrid-provider.md", "rate-limit": 0, @@ -20095,13 +20269,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSmtpProvider", "group": "providers", "weight": 272, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-smtp-provider.md", "rate-limit": 0, @@ -20255,13 +20429,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", "weight": 285, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-smtp-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-smtp-provider.md", "rate-limit": 0, @@ -20412,13 +20586,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTelesignProvider", "group": "providers", "weight": 274, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-telesign-provider.md", "rate-limit": 0, @@ -20516,13 +20690,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", "weight": 287, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-telesign-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-telesign-provider.md", "rate-limit": 0, @@ -20618,13 +20792,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", "weight": 275, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-textmagic-provider.md", "rate-limit": 0, @@ -20722,13 +20896,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", "weight": 288, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-textmagic-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-textmagic-provider.md", "rate-limit": 0, @@ -20824,13 +20998,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTwilioProvider", "group": "providers", "weight": 276, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-twilio-provider.md", "rate-limit": 0, @@ -20928,13 +21102,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", "weight": 289, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-twilio-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-twilio-provider.md", "rate-limit": 0, @@ -21030,13 +21204,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVonageProvider", "group": "providers", "weight": 277, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-vonage-provider.md", "rate-limit": 0, @@ -21134,13 +21308,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVonageProvider", "group": "providers", "weight": 290, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-vonage-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-vonage-provider.md", "rate-limit": 0, @@ -21234,13 +21408,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getProvider", "group": "providers", "weight": 282, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-provider.md", "rate-limit": 0, @@ -21290,13 +21464,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteProvider", "group": "providers", "weight": 293, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-provider.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-provider.md", "rate-limit": 0, @@ -21351,13 +21525,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listProviderLogs", "group": "providers", "weight": 281, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-provider-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-provider-logs.md", "rate-limit": 0, @@ -21424,13 +21598,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", "weight": 302, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscriber-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscriber-logs.md", "rate-limit": 0, @@ -21497,13 +21671,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopics", "group": "topics", "weight": 295, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topics.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topics.md", "rate-limit": 0, @@ -21571,13 +21745,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTopic", "group": "topics", "weight": 294, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-topic.md", "rate-limit": 0, @@ -21660,13 +21834,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTopic", "group": "topics", "weight": 297, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-topic.md", "rate-limit": 0, @@ -21721,13 +21895,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTopic", "group": "topics", "weight": 298, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/update-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/update-topic.md", "rate-limit": 0, @@ -21801,13 +21975,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTopic", "group": "topics", "weight": 299, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-topic.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-topic.md", "rate-limit": 0, @@ -21862,13 +22036,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTopicLogs", "group": "topics", "weight": 296, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-topic-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-topic-logs.md", "rate-limit": 0, @@ -21935,13 +22109,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSubscribers", "group": "subscribers", "weight": 301, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/list-subscribers.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/list-subscribers.md", "rate-limit": 0, @@ -22017,13 +22191,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSubscriber", "group": "subscribers", "weight": 300, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/create-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/create-subscriber.md", "rate-limit": 0, @@ -22106,13 +22280,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getSubscriber", "group": "subscribers", "weight": 303, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/get-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/get-subscriber.md", "rate-limit": 0, @@ -22170,13 +22344,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", "weight": 304, "cookies": false, "type": "", - "deprecated": false, "demo": "messaging\/delete-subscriber.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/messaging\/delete-subscriber.md", "rate-limit": 0, @@ -22242,13 +22416,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "sites", "weight": 453, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the project's sites. You can use the query params to filter your results.", "rate-limit": 0, @@ -22315,13 +22489,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "sites", "weight": 451, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site.", "rate-limit": 0, @@ -22583,13 +22757,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFrameworks", "group": "frameworks", "weight": 456, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-frameworks.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all frameworks that are currently available on the server instance.", "rate-limit": 0, @@ -22633,13 +22807,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSpecifications", "group": "frameworks", "weight": 479, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-specifications.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList allowed site specifications for this instance.", "rate-limit": 0, @@ -22684,13 +22858,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "sites", "weight": 452, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site by its unique ID.", "rate-limit": 0, @@ -22744,13 +22918,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "sites", "weight": 454, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate site by its unique ID.", "rate-limit": 0, @@ -23007,13 +23181,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "sites", "weight": 455, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site by its unique ID.", "rate-limit": 0, @@ -23069,13 +23243,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", "weight": 462, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-site-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.", "rate-limit": 0, @@ -23147,13 +23321,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listDeployments", "group": "deployments", "weight": 461, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-deployments.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all the site's code deployments. You can use the query params to filter your results.", "rate-limit": 0, @@ -23228,13 +23402,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDeployment", "group": "deployments", "weight": 457, "cookies": false, "type": "upload", - "deprecated": false, "demo": "sites\/create-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID.", "rate-limit": 0, @@ -23329,13 +23503,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", "weight": 465, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-duplicate-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.", "rate-limit": 0, @@ -23409,13 +23583,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", "weight": 458, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-template-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment based on a template.\n\nUse this endpoint with combination of [listTemplates](https:\/\/appwrite.io\/docs\/server\/sites#listTemplates) to find the template details.", "rate-limit": 0, @@ -23516,13 +23690,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", "weight": 459, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-vcs-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a deployment when a site is connected to VCS.\n\nThis endpoint lets you create deployment from a branch, commit, or a tag.", "rate-limit": 0, @@ -23614,13 +23788,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeployment", "group": "deployments", "weight": 460, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment by its unique ID.", "rate-limit": 0, @@ -23677,13 +23851,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteDeployment", "group": "deployments", "weight": 463, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-deployment.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site deployment by its unique ID.", "rate-limit": 0, @@ -23745,13 +23919,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", "weight": 464, "cookies": false, "type": "location", - "deprecated": false, "demo": "sites\/get-deployment-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", "rate-limit": 0, @@ -23831,13 +24005,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", "weight": 466, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-deployment-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.", "rate-limit": 0, @@ -23899,13 +24073,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 468, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all site logs. You can use the query params to filter your results.", "rate-limit": 0, @@ -23971,13 +24145,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getLog", "group": "logs", "weight": 467, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a site request log by its unique ID.", "rate-limit": 0, @@ -24036,13 +24210,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteLog", "group": "logs", "weight": 469, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-log.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a site log by its unique ID.", "rate-limit": 0, @@ -24104,13 +24278,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listVariables", "group": "variables", "weight": 472, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/list-variables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a list of all variables of a specific site.", "rate-limit": 0, @@ -24164,13 +24338,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createVariable", "group": "variables", "weight": 470, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/create-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.", "rate-limit": 0, @@ -24255,13 +24429,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getVariable", "group": "variables", "weight": 471, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/get-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a variable by its unique ID.", "rate-limit": 0, @@ -24323,13 +24497,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateVariable", "group": "variables", "weight": 473, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/update-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate variable by its unique ID.", "rate-limit": 0, @@ -24416,13 +24590,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteVariable", "group": "variables", "weight": 474, "cookies": false, "type": "", - "deprecated": false, "demo": "sites\/delete-variable.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a variable by its unique ID.", "rate-limit": 0, @@ -24484,13 +24658,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listBuckets", "group": "buckets", "weight": 156, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-buckets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md", "rate-limit": 0, @@ -24557,13 +24731,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBucket", "group": "buckets", "weight": 155, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/create-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md", "rate-limit": 0, @@ -24695,13 +24869,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getBucket", "group": "buckets", "weight": 157, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md", "rate-limit": 0, @@ -24755,13 +24929,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateBucket", "group": "buckets", "weight": 158, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md", "rate-limit": 0, @@ -24889,13 +25063,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteBucket", "group": "buckets", "weight": 159, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-bucket.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md", "rate-limit": 0, @@ -24949,13 +25123,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listFiles", "group": "files", "weight": 161, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/list-files.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md", "rate-limit": 0, @@ -25033,13 +25207,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFile", "group": "files", "weight": 160, "cookies": false, "type": "upload", - "deprecated": false, "demo": "storage\/create-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md", "rate-limit": 60, @@ -25124,13 +25298,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFile", "group": "files", "weight": 162, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/get-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md", "rate-limit": 0, @@ -25195,13 +25369,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateFile", "group": "files", "weight": 167, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/update-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md", "rate-limit": 60, @@ -25285,13 +25459,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteFile", "group": "files", "weight": 168, "cookies": false, "type": "", - "deprecated": false, "demo": "storage\/delete-file.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md", "rate-limit": 60, @@ -25356,13 +25530,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFileDownload", "group": "files", "weight": 164, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-download.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md", "rate-limit": 0, @@ -25436,13 +25610,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFilePreview", "group": "files", "weight": 163, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-preview.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md", "rate-limit": 0, @@ -25644,13 +25818,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getFileView", "group": "files", "weight": 165, "cookies": false, "type": "location", - "deprecated": false, "demo": "storage\/get-file-view.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md", "rate-limit": 0, @@ -25724,13 +25898,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "teams", "weight": 172, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "rate-limit": 0, @@ -25800,13 +25974,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "teams", "weight": 171, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "rate-limit": 0, @@ -25891,13 +26065,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "teams", "weight": 173, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "rate-limit": 0, @@ -25954,13 +26128,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "teams", "weight": 175, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "rate-limit": 0, @@ -26030,13 +26204,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "teams", "weight": 177, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "rate-limit": 0, @@ -26093,13 +26267,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 179, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-team-members.md", "rate-limit": 0, @@ -26177,13 +26351,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMembership", "group": "memberships", "weight": 178, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/create-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md", "rate-limit": 10, @@ -26291,13 +26465,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMembership", "group": "memberships", "weight": 180, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md", "rate-limit": 0, @@ -26362,13 +26536,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembership", "group": "memberships", "weight": 181, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership.md", "rate-limit": 0, @@ -26449,13 +26623,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMembership", "group": "memberships", "weight": 183, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/delete-membership.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md", "rate-limit": 0, @@ -26522,13 +26696,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", "weight": 182, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-membership-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md", "rate-limit": 0, @@ -26617,13 +26791,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "teams", "weight": 174, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-prefs.md", "rate-limit": 0, @@ -26679,13 +26853,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "teams", "weight": 176, "cookies": false, "type": "", - "deprecated": false, "demo": "teams\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-prefs.md", "rate-limit": 0, @@ -26759,13 +26933,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "files", "weight": 487, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the tokens created for a specific file or bucket. You can use the query params to filter your results.", "rate-limit": 0, @@ -26840,13 +27014,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createFileToken", "group": "files", "weight": 485, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/create-file-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a request URL search parameter.", "rate-limit": 60, @@ -26925,13 +27099,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "tokens", "weight": 486, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a token by its unique ID.", "rate-limit": 0, @@ -26986,13 +27160,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "update", "group": "tokens", "weight": 488, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/update.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date.", "rate-limit": 60, @@ -27058,13 +27232,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "tokens", "weight": 489, "cookies": false, "type": "", - "deprecated": false, "demo": "tokens\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a token by its unique ID.", "rate-limit": 60, @@ -27119,13 +27293,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "list", "group": "users", "weight": 194, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md", "rate-limit": 0, @@ -27192,13 +27366,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "create", "group": "users", "weight": 185, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md", "rate-limit": 0, @@ -27288,13 +27462,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createArgon2User", "group": "users", "weight": 188, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-argon2user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-argon2-user.md", "rate-limit": 0, @@ -27380,13 +27554,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createBcryptUser", "group": "users", "weight": 186, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-bcrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-bcrypt-user.md", "rate-limit": 0, @@ -27470,13 +27644,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listIdentities", "group": "identities", "weight": 202, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-identities.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-identities.md", "rate-limit": 0, @@ -27540,13 +27714,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteIdentity", "group": "identities", "weight": 225, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-identity.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-identity.md", "rate-limit": 0, @@ -27602,13 +27776,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMD5User", "group": "users", "weight": 187, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-m-d5user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-md5-user.md", "rate-limit": 0, @@ -27694,13 +27868,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createPHPassUser", "group": "users", "weight": 190, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-p-h-pass-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-phpass-user.md", "rate-limit": 0, @@ -27786,13 +27960,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptUser", "group": "users", "weight": 191, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-user.md", "rate-limit": 0, @@ -27913,13 +28087,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", "weight": 192, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-scrypt-modified-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-scrypt-modified-user.md", "rate-limit": 0, @@ -28026,13 +28200,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSHAUser", "group": "users", "weight": 189, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-s-h-a-user.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-sha-user.md", "rate-limit": 0, @@ -28137,13 +28311,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "get", "group": "users", "weight": 195, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md", "rate-limit": 0, @@ -28192,13 +28366,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "delete", "group": "users", "weight": 223, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md", "rate-limit": 0, @@ -28254,13 +28428,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmail", "group": "users", "weight": 208, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md", "rate-limit": 0, @@ -28334,13 +28508,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createJWT", "group": "sessions", "weight": 226, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-j-w-t.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user-jwt.md", "rate-limit": 0, @@ -28417,13 +28591,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateLabels", "group": "users", "weight": 204, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-labels.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-labels.md", "rate-limit": 0, @@ -28498,13 +28672,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listLogs", "group": "logs", "weight": 200, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-logs.md", "rate-limit": 0, @@ -28570,13 +28744,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMemberships", "group": "memberships", "weight": 199, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-memberships.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-memberships.md", "rate-limit": 0, @@ -28653,13 +28827,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfa", "group": "users", "weight": 213, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-mfa.md", "rate-limit": 0, @@ -28728,13 +28902,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", "weight": 218, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-mfa-authenticator.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-mfa-authenticator.md", "rate-limit": 0, @@ -28801,13 +28975,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listMfaFactors", "group": "mfa", "weight": 214, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-mfa-factors.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-mfa-factors.md", "rate-limit": 0, @@ -28861,13 +29035,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", "weight": 215, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-mfa-recovery-codes.md", "rate-limit": 0, @@ -28921,13 +29095,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", "weight": 217, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-mfa-recovery-codes.md", "rate-limit": 0, @@ -28981,13 +29155,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", "weight": 216, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-mfa-recovery-codes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-mfa-recovery-codes.md", "rate-limit": 0, @@ -29043,13 +29217,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateName", "group": "users", "weight": 206, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-name.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md", "rate-limit": 0, @@ -29123,13 +29297,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePassword", "group": "users", "weight": 207, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-password.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md", "rate-limit": 0, @@ -29203,13 +29377,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhone", "group": "users", "weight": 209, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md", "rate-limit": 0, @@ -29281,13 +29455,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getPrefs", "group": "users", "weight": 196, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md", "rate-limit": 0, @@ -29341,13 +29515,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePrefs", "group": "users", "weight": 211, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-prefs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md", "rate-limit": 0, @@ -29419,13 +29593,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listSessions", "group": "sessions", "weight": 198, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-sessions.md", "rate-limit": 0, @@ -29479,13 +29653,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createSession", "group": "sessions", "weight": 219, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-session.md", "rate-limit": 0, @@ -29534,13 +29708,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSessions", "group": "sessions", "weight": 222, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-sessions.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md", "rate-limit": 0, @@ -29591,13 +29765,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteSession", "group": "sessions", "weight": 221, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-session.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md", "rate-limit": 0, @@ -29661,13 +29835,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateStatus", "group": "users", "weight": 203, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-status.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md", "rate-limit": 0, @@ -29739,13 +29913,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "listTargets", "group": "targets", "weight": 201, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/list-targets.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-user-targets.md", "rate-limit": 0, @@ -29812,13 +29986,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createTarget", "group": "targets", "weight": 193, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-target.md", "rate-limit": 0, @@ -29924,13 +30098,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "getTarget", "group": "targets", "weight": 197, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/get-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-target.md", "rate-limit": 0, @@ -29993,13 +30167,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateTarget", "group": "targets", "weight": 212, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-target.md", "rate-limit": 0, @@ -30084,13 +30258,13 @@ "description": "No content" } }, + "deprecated": false, "x-appwrite": { "method": "deleteTarget", "group": "targets", "weight": 224, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/delete-target.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-target.md", "rate-limit": 0, @@ -30155,13 +30329,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "createToken", "group": "sessions", "weight": 220, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/create-token.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-token.md", "rate-limit": 0, @@ -30238,13 +30412,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updateEmailVerification", "group": "users", "weight": 210, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-email-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md", "rate-limit": 0, @@ -30318,13 +30492,13 @@ } } }, + "deprecated": false, "x-appwrite": { "method": "updatePhoneVerification", "group": "users", "weight": 205, "cookies": false, "type": "", - "deprecated": false, "demo": "users\/update-phone-verification.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md", "rate-limit": 0, From 8018e7dd8021747cda5f13b9d72c80c6063490e3 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 22 Jul 2025 15:54:24 +0530 Subject: [PATCH 270/362] chore: review comments --- app/config/specs/open-api3-1.8.x-client.json | 24 ---------- app/config/specs/open-api3-latest-client.json | 24 ---------- app/config/specs/swagger2-1.8.x-client.json | 24 ---------- app/config/specs/swagger2-latest-client.json | 24 ---------- app/controllers/general.php | 4 +- .../Collections/Documents/Create.php | 45 ++++++++++--------- 6 files changed, 25 insertions(+), 120 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 2754476939..c077cbc94f 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4500,30 +4500,6 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." - }, - { - "name": "createDocuments", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 2754476939..c077cbc94f 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4500,30 +4500,6 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." - }, - { - "name": "createDocuments", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/documentList" - } - ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index d866d2c097..f2b814e9b6 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -4637,30 +4637,6 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." - }, - { - "name": "createDocuments", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index d866d2c097..f2b814e9b6 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4637,30 +4637,6 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." - }, - { - "name": "createDocuments", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "collectionId", - "documents" - ], - "required": [ - "databaseId", - "collectionId", - "documents" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/documentList" - } - ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { diff --git a/app/controllers/general.php b/app/controllers/general.php index 5712579507..40011c3e24 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1038,11 +1038,11 @@ App::init() /** * Deprecation Warning */ - $sdk = $route->getLabel("sdk", false); + $sdk = $route->getLabel('sdk', false); if (!empty($sdk)) { /** @var \Appwrite\SDK\Method $sdk */ if ($sdk->isDeprecated()) { - $warnings[] = 'This API is deprecated and uses outdated terminologies. See the updated documentation for improved compatibility and migration details.'; + $warnings[] = 'This route is deprecated. See the updated documentation for improved compatibility and migration details.'; } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 91ed6113aa..68fabdb9e3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -86,28 +86,29 @@ class Create extends Action 'replaceWith' => 'tables.createRow', ], ), - new Method( - namespace: $this->getSdkNamespace(), - group: $this->getSdkGroup(), - name: $this->getBulkActionName(self::getName()), - description: '/docs/references/databases/create-documents.md', - auth: [AuthType::ADMIN, AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_CREATED, - model: $this->getBulkResponseModel(), - ) - ], - contentType: ContentType::JSON, - parameters: [ - new Parameter('databaseId', optional: false), - new Parameter('collectionId', optional: false), - new Parameter('documents', optional: false), - ], - deprecated: [ - 'replaceWith' => 'tables.createRows', - ], - ) + // new Method( + // namespace: $this->getSdkNamespace(), + // group: $this->getSdkGroup(), + // name: $this->getBulkActionName(self::getName()), + // description: '/docs/references/databases/create-documents.md', + // auth: [AuthType::ADMIN, AuthType::KEY], + // responses: [ + // new SDKResponse( + // code: SwooleResponse::STATUS_CODE_CREATED, + // model: $this->getBulkResponseModel(), + // ) + // ], + // contentType: ContentType::JSON, + // parameters: [ + // new Parameter('databaseId', optional: false), + // new Parameter('collectionId', optional: false), + // new Parameter('documents', optional: false), + // ], + // deprecated: [ + // 'since' => '1.8.0', + // 'replaceWith' => 'tables.createRows', + // ], + // ) ]) ->param('databaseId', '', new UID(), 'Database ID.') ->param('documentId', '', new CustomId(), 'Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.', true) From 51614105df40022cf343a1b7bfe0bdcf51abc14d Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 22 Jul 2025 15:54:42 +0530 Subject: [PATCH 271/362] chore: uncomment --- .../Collections/Documents/Create.php | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 68fabdb9e3..405deeb420 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -86,29 +86,29 @@ class Create extends Action 'replaceWith' => 'tables.createRow', ], ), - // new Method( - // namespace: $this->getSdkNamespace(), - // group: $this->getSdkGroup(), - // name: $this->getBulkActionName(self::getName()), - // description: '/docs/references/databases/create-documents.md', - // auth: [AuthType::ADMIN, AuthType::KEY], - // responses: [ - // new SDKResponse( - // code: SwooleResponse::STATUS_CODE_CREATED, - // model: $this->getBulkResponseModel(), - // ) - // ], - // contentType: ContentType::JSON, - // parameters: [ - // new Parameter('databaseId', optional: false), - // new Parameter('collectionId', optional: false), - // new Parameter('documents', optional: false), - // ], - // deprecated: [ - // 'since' => '1.8.0', - // 'replaceWith' => 'tables.createRows', - // ], - // ) + new Method( + namespace: $this->getSdkNamespace(), + group: $this->getSdkGroup(), + name: $this->getBulkActionName(self::getName()), + description: '/docs/references/databases/create-documents.md', + auth: [AuthType::ADMIN, AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: $this->getBulkResponseModel(), + ) + ], + contentType: ContentType::JSON, + parameters: [ + new Parameter('databaseId', optional: false), + new Parameter('collectionId', optional: false), + new Parameter('documents', optional: false), + ], + deprecated: [ + 'since' => '1.8.0', + 'replaceWith' => 'tables.createRows', + ], + ) ]) ->param('databaseId', '', new UID(), 'Database ID.') ->param('documentId', '', new CustomId(), 'Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.', true) From 2a810758300e275739bf5c9a1e2eb322da89a6a7 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 22 Jul 2025 16:43:02 +0530 Subject: [PATCH 272/362] chore: use class --- .../Collections/Attributes/Boolean/Create.php | 9 +++--- .../Collections/Attributes/Boolean/Update.php | 9 +++--- .../Attributes/Datetime/Create.php | 9 +++--- .../Attributes/Datetime/Update.php | 9 +++--- .../Collections/Attributes/Delete.php | 9 +++--- .../Collections/Attributes/Email/Create.php | 9 +++--- .../Collections/Attributes/Email/Update.php | 9 +++--- .../Collections/Attributes/Enum/Create.php | 9 +++--- .../Collections/Attributes/Enum/Update.php | 9 +++--- .../Collections/Attributes/Float/Create.php | 9 +++--- .../Collections/Attributes/Float/Update.php | 9 +++--- .../Databases/Collections/Attributes/Get.php | 9 +++--- .../Collections/Attributes/IP/Create.php | 9 +++--- .../Collections/Attributes/IP/Update.php | 9 +++--- .../Collections/Attributes/Integer/Create.php | 9 +++--- .../Collections/Attributes/Integer/Update.php | 9 +++--- .../Attributes/Relationship/Create.php | 9 +++--- .../Attributes/Relationship/Update.php | 9 +++--- .../Collections/Attributes/String/Create.php | 9 +++--- .../Collections/Attributes/String/Update.php | 9 +++--- .../Collections/Attributes/URL/Create.php | 9 +++--- .../Collections/Attributes/URL/Update.php | 9 +++--- .../Collections/Attributes/XList.php | 9 +++--- .../Http/Databases/Collections/Create.php | 9 +++--- .../Http/Databases/Collections/Delete.php | 9 +++--- .../Documents/Attribute/Decrement.php | 9 +++--- .../Documents/Attribute/Increment.php | 9 +++--- .../Collections/Documents/Bulk/Delete.php | 9 +++--- .../Collections/Documents/Bulk/Update.php | 9 +++--- .../Collections/Documents/Bulk/Upsert.php | 9 +++--- .../Collections/Documents/Create.php | 17 +++++----- .../Collections/Documents/Delete.php | 9 +++--- .../Databases/Collections/Documents/Get.php | 9 +++--- .../Collections/Documents/Logs/XList.php | 9 +++--- .../Collections/Documents/Update.php | 9 +++--- .../Collections/Documents/Upsert.php | 9 +++--- .../Databases/Collections/Documents/XList.php | 9 +++--- .../Http/Databases/Collections/Get.php | 9 +++--- .../Databases/Collections/Indexes/Create.php | 9 +++--- .../Databases/Collections/Indexes/Delete.php | 9 +++--- .../Databases/Collections/Indexes/Get.php | 9 +++--- .../Databases/Collections/Indexes/XList.php | 9 +++--- .../Http/Databases/Collections/Logs/XList.php | 9 +++--- .../Http/Databases/Collections/Update.php | 9 +++--- .../Http/Databases/Collections/Usage/Get.php | 9 +++--- .../Http/Databases/Collections/XList.php | 9 +++--- src/Appwrite/SDK/Deprecated.php | 32 +++++++++++++++++++ src/Appwrite/SDK/Method.php | 10 +++--- .../SDK/Specification/Format/Swagger2.php | 1 + 49 files changed, 272 insertions(+), 193 deletions(-) create mode 100644 src/Appwrite/SDK/Deprecated.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php index f35ac34f9b..04fc96456e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php @@ -6,6 +6,7 @@ use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -52,10 +53,10 @@ class Create extends Action model: $this->getResponseModel(), ) ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createBooleanColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createBooleanColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php index b2f5664632..487eca769f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -53,10 +54,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.updateBooleanColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.updateBooleanColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php index 7c118e05c0..a750a53d75 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php @@ -6,6 +6,7 @@ use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -53,10 +54,10 @@ class Create extends Action model: $this->getResponseModel() ) ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createDatetimeColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createDatetimeColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php index 4ff64bcbcb..8d7a383cf1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -54,10 +55,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.updateDatetimeColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.updateDatetimeColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index f708464800..67ee8d814d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -7,6 +7,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -54,10 +55,10 @@ class Delete extends Action ) ], contentType: ContentType::NONE, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.deleteColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.deleteColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php index cfd528ad6b..9037ce1dcb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php @@ -7,6 +7,7 @@ use Appwrite\Event\Event; use Appwrite\Network\Validator\Email; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -53,10 +54,10 @@ class Create extends Action model: $this->getResponseModel(), ) ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createEmailColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createEmailColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php index 75d9759af2..bfe9733449 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php @@ -7,6 +7,7 @@ use Appwrite\Network\Validator\Email; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -54,10 +55,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.updateEmailColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.updateEmailColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index 646858d0bc..b54dd1c0ad 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -7,6 +7,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -55,10 +56,10 @@ class Create extends Action model: $this->getResponseModel(), ) ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createEnumColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createEnumColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php index f144fb038e..2fde9eaecc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -55,10 +56,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.updateEnumColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.updateEnumColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php index a5f794797d..bc1eb2d4c9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php @@ -7,6 +7,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -55,10 +56,10 @@ class Create extends Action model: $this->getResponseModel(), ) ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createFloatColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createFloatColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php index 9935da15a0..cb770067ff 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -54,10 +55,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.updateFloatColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.updateFloatColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index 6760689c23..a9d4d36758 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -4,6 +4,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attribu use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -57,10 +58,10 @@ class Get extends Action model: $this->getResponseModel() ) ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.getColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.getColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php index 78907a063d..e49b775a54 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php @@ -6,6 +6,7 @@ use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -53,10 +54,10 @@ class Create extends Action model: $this->getResponseModel(), ) ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createIpColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createIpColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php index 5af8b7aa01..44b8347807 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -54,10 +55,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.updateIpColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.updateIpColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php index 75f886f4df..ea8a38e6c1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php @@ -7,6 +7,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -55,10 +56,10 @@ class Create extends Action model: $this->getResponseModel(), ) ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createIntegerColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createIntegerColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php index 412a1a7bc3..39e8bad1f9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -54,10 +55,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.updateIntegerColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.updateIntegerColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php index a753194e2e..a062b96a36 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php @@ -7,6 +7,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -55,10 +56,10 @@ class Create extends Action model: $this->getResponseModel() ) ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createRelationshipColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createRelationshipColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php index 48e82fc6d7..08a6475bb0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -52,10 +53,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.updateRelationshipColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.updateRelationshipColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index 459273c007..c1692c77d6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -7,6 +7,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -57,10 +58,10 @@ class Create extends Action model: $this->getResponseModel() ) ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createStringColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createStringColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php index 2e43532e90..770854f0f9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -56,10 +57,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.updateStringColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.updateStringColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php index cda120a75e..d471cf24f1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php @@ -6,6 +6,7 @@ use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -53,10 +54,10 @@ class Create extends Action model: $this->getResponseModel(), ) ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createUrlColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createUrlColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php index ee8b2496e3..dc475194c8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -54,10 +55,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.updateUrlColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.updateUrlColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index d0982f3143..f4ff635759 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -4,6 +4,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attribu use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Attributes; @@ -51,10 +52,10 @@ class XList extends Action model: $this->getResponseModel() ) ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.listColumns', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.listColumns', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') 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 7d72425645..a88652b9e1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; @@ -62,10 +63,10 @@ class Create extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.create', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.create', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php index e78d03e9c8..642d0d0978 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php @@ -7,6 +7,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -52,10 +53,10 @@ class Delete extends Action ) ], contentType: ContentType::NONE, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.delete', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.delete', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php index 07a0342c80..cb38f8f75e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php @@ -8,6 +8,7 @@ use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -62,10 +63,10 @@ class Decrement extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.decrementRowColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.decrementRowColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php index eed2399b53..82b688caae 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php @@ -8,6 +8,7 @@ use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -62,10 +63,10 @@ class Increment extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.incrementRowColumn', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.incrementRowColumn', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index e6f295f1b0..e6ce45f2f9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -7,6 +7,7 @@ use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -60,10 +61,10 @@ class Delete extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.deleteRows', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.deleteRows', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index 4f084b75c1..e153d0af20 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -7,6 +7,7 @@ use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -63,10 +64,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.updateRows', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.updateRows', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index 31a0ebf272..687a426a3a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -7,6 +7,7 @@ use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -61,10 +62,10 @@ class Upsert extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.upsertRows', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.upsertRows', + ), ) ]) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 405deeb420..64b1280eff 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -8,6 +8,7 @@ use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Parameter; use Appwrite\SDK\Response as SDKResponse; @@ -81,10 +82,10 @@ class Create extends Action new Parameter('data', optional: false), new Parameter('permissions', optional: true), ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createRow', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createRow', + ), ), new Method( namespace: $this->getSdkNamespace(), @@ -104,10 +105,10 @@ class Create extends Action new Parameter('collectionId', optional: false), new Parameter('documents', optional: false), ], - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createRows', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createRows', + ), ) ]) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index 71dfab76b6..8b0b43c05e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -8,6 +8,7 @@ use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -62,10 +63,10 @@ class Delete extends Action ) ], contentType: ContentType::NONE, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.deleteRow', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.deleteRow', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index 8d7d04e6ca..35463d2d40 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -7,6 +7,7 @@ use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -53,10 +54,10 @@ class Get extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.getRow', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.getRow', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index aa5ded79f1..482b0fb05c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -7,6 +7,7 @@ use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -59,10 +60,10 @@ class XList extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.listLogs', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.listLogs', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 360af37098..450f555dd2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -8,6 +8,7 @@ use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -66,10 +67,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.updateRow', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.updateRow', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index c587ebc3a4..f514237fdf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -8,6 +8,7 @@ use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; @@ -68,10 +69,10 @@ class Upsert extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.upsertRow', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.upsertRow', + ), ), ]) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 852c33c505..9c00f9548c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -7,6 +7,7 @@ use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -56,10 +57,10 @@ class XList extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.listRows', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.listRows', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php index 9faeefa949..67c6cea5f3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php @@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -47,10 +48,10 @@ class Get extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.get', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.get', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') 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 335f3f30fa..a826ade364 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 @@ -7,6 +7,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -62,10 +63,10 @@ class Create extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.createIndex', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.createIndex', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index 2ba8922c35..1b62e2bec8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -7,6 +7,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -57,10 +58,10 @@ class Delete extends Action ) ], contentType: ContentType::NONE, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.deleteIndex', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.deleteIndex', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index f7b163b47c..957ca98f61 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -48,10 +49,10 @@ class Get extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.getIndex', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.getIndex', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index 8b6e4ef8d0..ed570d8abd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Indexes; @@ -53,10 +54,10 @@ class XList extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.listIndexes', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.listIndexes', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 12c1b19340..9527859efa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -6,6 +6,7 @@ use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -59,10 +60,10 @@ class XList extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.listLogs', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.listLogs', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index e4c8b38c70..cc29b6ea66 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -6,6 +6,7 @@ use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -55,10 +56,10 @@ class Update extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.update', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.update', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php index ec24f1bab4..d829d18714 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php @@ -6,6 +6,7 @@ use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Action; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; @@ -52,10 +53,10 @@ class Get extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.getUsage', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.getUsage', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index 4891fe9783..13269834a2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -5,6 +5,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections; use Appwrite\Extend\Exception; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Collections; @@ -54,10 +55,10 @@ class XList extends Action ) ], contentType: ContentType::JSON, - deprecated: [ - 'since' => '1.8.0', - 'replaceWith' => 'tables.list', - ], + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'tables.list', + ), )) ->param('databaseId', '', new UID(), 'Database ID.') ->param('queries', [], new Collections(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Collections::ALLOWED_ATTRIBUTES), true) diff --git a/src/Appwrite/SDK/Deprecated.php b/src/Appwrite/SDK/Deprecated.php new file mode 100644 index 0000000000..1d74c108c9 --- /dev/null +++ b/src/Appwrite/SDK/Deprecated.php @@ -0,0 +1,32 @@ +<?php + +namespace Appwrite\SDK; + +class Deprecated +{ + /** + * @param string $since + * @param string|null $replaceWith + */ + public function __construct( + private string $since, + private ?string $replaceWith = null, + ) { + } + + /** + * @return string + */ + public function getSince(): string + { + return $this->since; + } + + /** + * @return string|null + */ + public function getReplaceWith(): ?string + { + return $this->replaceWith; + } +} diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index b6298e1840..945c9e8fae 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -23,7 +23,7 @@ class Method * @param array<SDKResponse> $responses * @param ContentType $contentType * @param MethodType|null $type - * @param bool|array $deprecated + * @param bool|Deprecated $deprecated * @param array|bool $hide * @param bool $packaging * @param ContentType $requestType @@ -39,7 +39,7 @@ class Method protected array $responses, protected ContentType $contentType = ContentType::JSON, protected ?MethodType $type = null, - protected bool|array $deprecated = false, + protected bool|Deprecated $deprecated = false, protected array|bool $hide = false, protected bool $packaging = false, protected ContentType $requestType = ContentType::JSON, @@ -180,7 +180,7 @@ class Method return $this->deprecated !== false; } - public function getDeprecated(): bool|array + public function getDeprecated(): bool|Deprecated { return $this->deprecated; } @@ -263,13 +263,13 @@ class Method return $this; } - public function setDeprecated(bool|array $deprecated): self + public function setDeprecated(bool|Deprecated $deprecated): self { $this->deprecated = $deprecated; return $this; } - public function setHide(bool|array $hide): self + public function setHide(bool|Deprecated $hide): self { $this->hide = $hide; return $this; diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 3eacb2008d..812a6eb9ff 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -102,6 +102,7 @@ class Swagger2 extends Format $additionalMethods = null; if (\is_array($sdk)) { $additionalMethods = $sdk; + /** @var Method $sdk */ $sdk = $sdk[0]; } From fde03fc61bcf165659984e3c523b8befb193123c Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 22 Jul 2025 16:50:19 +0530 Subject: [PATCH 273/362] chore: regen specs --- app/config/specs/open-api3-latest-console.json | 2 -- app/config/specs/open-api3-latest-server.json | 2 -- app/config/specs/swagger2-latest-console.json | 2 -- app/config/specs/swagger2-latest-server.json | 2 -- src/Appwrite/SDK/Method.php | 11 +++++++++-- src/Appwrite/SDK/Specification/Format/OpenAPI3.php | 2 +- src/Appwrite/SDK/Specification/Format/Swagger2.php | 2 +- 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 22357e7b0b..b1c864453b 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -1872,7 +1872,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2082,7 +2081,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 09572fe6b5..93336cf5ff 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -1879,7 +1879,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -1954,7 +1953,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 94fff6695c..ba212cba1a 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1990,7 +1990,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2201,7 +2200,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index cb96855956..9bd6c58fcc 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -1996,7 +1996,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2075,7 +2074,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index 945c9e8fae..316b0d6314 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -180,9 +180,16 @@ class Method return $this->deprecated !== false; } - public function getDeprecated(): bool|Deprecated + public function getDeprecated(): array|null { - return $this->deprecated; + if ($this->deprecated instanceof Deprecated) { + return [ + 'since' => $this->deprecated->getSince(), + 'replaceWith' => $this->deprecated->getReplaceWith(), + ]; + } + + return null; } public function isHidden(): bool|array diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 9ef101da30..ccddbddccd 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -170,7 +170,7 @@ class OpenAPI3 extends Format ], ]; - if ($sdk->isDeprecated()) { + if ($sdk->getDeprecated() !== null) { $temp['x-appwrite']['deprecated'] = $sdk->getDeprecated(); } diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 812a6eb9ff..b17a139ea9 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -174,7 +174,7 @@ class Swagger2 extends Format ], ]; - if ($sdk->isDeprecated()) { + if ($sdk->getDeprecated() !== null) { $temp['x-appwrite']['deprecated'] = $sdk->getDeprecated(); } From 2aaaf900443462f870a87e4b7bc185e796fbf12f Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 22 Jul 2025 16:51:29 +0530 Subject: [PATCH 274/362] chore: client spec changes --- app/config/specs/open-api3-latest-client.json | 2 -- app/config/specs/swagger2-latest-client.json | 2 -- 2 files changed, 4 deletions(-) diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index c077cbc94f..e8efee6516 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -1856,7 +1856,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2066,7 +2065,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index f2b814e9b6..b28e544566 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -1964,7 +1964,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2175,7 +2174,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } From 3128a7b8379809fd20716f0898bb52fe00fd8e0a Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 22 Jul 2025 16:59:05 +0530 Subject: [PATCH 275/362] chore: update to return object --- src/Appwrite/SDK/Method.php | 11 ++--------- src/Appwrite/SDK/Specification/Format/OpenAPI3.php | 8 ++++++-- src/Appwrite/SDK/Specification/Format/Swagger2.php | 8 ++++++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index 316b0d6314..945c9e8fae 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -180,16 +180,9 @@ class Method return $this->deprecated !== false; } - public function getDeprecated(): array|null + public function getDeprecated(): bool|Deprecated { - if ($this->deprecated instanceof Deprecated) { - return [ - 'since' => $this->deprecated->getSince(), - 'replaceWith' => $this->deprecated->getReplaceWith(), - ]; - } - - return null; + return $this->deprecated; } public function isHidden(): bool|array diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index ccddbddccd..ea543ef899 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -3,6 +3,7 @@ namespace Appwrite\SDK\Specification\Format; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\MethodType; use Appwrite\SDK\Response; @@ -170,8 +171,11 @@ class OpenAPI3 extends Format ], ]; - if ($sdk->getDeprecated() !== null) { - $temp['x-appwrite']['deprecated'] = $sdk->getDeprecated(); + if ($sdk->getDeprecated() instanceof Deprecated) { + $temp['x-appwrite']['deprecated'] = [ + 'since' => $sdk->getDeprecated()->getSince(), + 'replaceWith' => $sdk->getDeprecated()->getReplaceWith(), + ]; } if (!empty($additionalMethods)) { diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index b17a139ea9..bcf14ee9a2 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -3,6 +3,7 @@ namespace Appwrite\SDK\Specification\Format; use Appwrite\SDK\AuthType; +use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\MethodType; use Appwrite\SDK\Response; @@ -174,8 +175,11 @@ class Swagger2 extends Format ], ]; - if ($sdk->getDeprecated() !== null) { - $temp['x-appwrite']['deprecated'] = $sdk->getDeprecated(); + if ($sdk->getDeprecated() instanceof Deprecated) { + $temp['x-appwrite']['deprecated'] = [ + 'since' => $sdk->getDeprecated()->getSince(), + 'replaceWith' => $sdk->getDeprecated()->getReplaceWith(), + ]; } if ($produces) { From e10f1eb10fc4ea1f92ae85a5f590b1dd5e066692 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal <chiragaggarwal5k@gmail.com> Date: Tue, 22 Jul 2025 17:27:09 +0530 Subject: [PATCH 276/362] handle case when there are multiple sdk methods --- app/controllers/general.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 40011c3e24..787ce2dbfb 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1039,10 +1039,11 @@ App::init() * Deprecation Warning */ $sdk = $route->getLabel('sdk', false); - if (!empty($sdk)) { - /** @var \Appwrite\SDK\Method $sdk */ - if ($sdk->isDeprecated()) { - $warnings[] = 'This route is deprecated. See the updated documentation for improved compatibility and migration details.'; + $deprecationWarning = 'This route is deprecated. See the updated documentation for improved compatibility and migration details.'; + $sdkItems = is_array($sdk) ? $sdk : (!empty($sdk) ? [$sdk] : []); + foreach ($sdkItems as $sdkItem) { + if ($sdkItem->isDeprecated()) { + $warnings[] = $deprecationWarning; } } From 1f60bb1aa6b636ad9a3444a53ace562f58dd9411 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Wed, 23 Jul 2025 19:48:29 +1200 Subject: [PATCH 277/362] Fix index models --- .../Utopia/Response/Model/ColumnIndex.php | 31 ++++++++++-------- src/Appwrite/Utopia/Response/Model/Index.php | 32 +++++++++++-------- 2 files changed, 37 insertions(+), 26 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Model/ColumnIndex.php b/src/Appwrite/Utopia/Response/Model/ColumnIndex.php index bebc640fb2..547312d677 100644 --- a/src/Appwrite/Utopia/Response/Model/ColumnIndex.php +++ b/src/Appwrite/Utopia/Response/Model/ColumnIndex.php @@ -11,6 +11,24 @@ class ColumnIndex extends Model public function __construct() { $this + ->addRule('$id', [ + 'type' => self::TYPE_STRING, + 'description' => 'Index ID.', + 'default' => '', + 'example' => '5e5ea5c16897e', + ]) + ->addRule('$createdAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Index creation date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$updatedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Index update date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) ->addRule('key', [ 'type' => self::TYPE_STRING, 'description' => 'Index Key.', @@ -56,18 +74,6 @@ class ColumnIndex extends Model 'example' => [], 'array' => true, 'required' => false, - ]) - ->addRule('$createdAt', [ - 'type' => self::TYPE_DATETIME, - 'description' => 'Index creation date in ISO 8601 format.', - 'default' => '', - 'example' => self::TYPE_DATETIME_EXAMPLE, - ]) - ->addRule('$updatedAt', [ - 'type' => self::TYPE_DATETIME, - 'description' => 'Index update date in ISO 8601 format.', - 'default' => '', - 'example' => self::TYPE_DATETIME_EXAMPLE, ]); } @@ -89,7 +95,6 @@ class ColumnIndex extends Model public function filter(Document $document): Document { - $columns = $document->getAttribute('attributes', []); $document ->removeAttribute('attributes') diff --git a/src/Appwrite/Utopia/Response/Model/Index.php b/src/Appwrite/Utopia/Response/Model/Index.php index fcd978b5be..62661738c2 100644 --- a/src/Appwrite/Utopia/Response/Model/Index.php +++ b/src/Appwrite/Utopia/Response/Model/Index.php @@ -10,9 +10,27 @@ class Index extends Model public function __construct() { $this + ->addRule('$id', [ + 'type' => self::TYPE_STRING, + 'description' => 'Index ID.', + 'default' => '', + 'example' => '5e5ea5c16897e', + ]) + ->addRule('$createdAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Index creation date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) + ->addRule('$updatedAt', [ + 'type' => self::TYPE_DATETIME, + 'description' => 'Index update date in ISO 8601 format.', + 'default' => '', + 'example' => self::TYPE_DATETIME_EXAMPLE, + ]) ->addRule('key', [ 'type' => self::TYPE_STRING, - 'description' => 'Index Key.', + 'description' => 'Index key.', 'default' => '', 'example' => 'index1', ]) @@ -55,18 +73,6 @@ class Index extends Model 'example' => [], 'array' => true, 'required' => false, - ]) - ->addRule('$createdAt', [ - 'type' => self::TYPE_DATETIME, - 'description' => 'Index creation date in ISO 8601 format.', - 'default' => '', - 'example' => self::TYPE_DATETIME_EXAMPLE, - ]) - ->addRule('$updatedAt', [ - 'type' => self::TYPE_DATETIME, - 'description' => 'Index update date in ISO 8601 format.', - 'default' => '', - 'example' => self::TYPE_DATETIME_EXAMPLE, ]); } From 201c18051f670dfa9b36f23b9cdef49f860ef3c9 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Wed, 23 Jul 2025 20:09:14 +1200 Subject: [PATCH 278/362] Update lock --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 6f7f568916..618c8c704e 100644 --- a/composer.lock +++ b/composer.lock @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.13.1", + "version": "0.13.3", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "b3c51e39f35efeb15431c6bc8f5bc6cf78fac9cc" + "reference": "cf6b192f78dacfa06b659646c228b203212b3c6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/b3c51e39f35efeb15431c6bc8f5bc6cf78fac9cc", - "reference": "b3c51e39f35efeb15431c6bc8f5bc6cf78fac9cc", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/cf6b192f78dacfa06b659646c228b203212b3c6b", + "reference": "cf6b192f78dacfa06b659646c228b203212b3c6b", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.13.1" + "source": "https://github.com/utopia-php/migration/tree/0.13.3" }, - "time": "2025-07-21T23:22:05+00:00" + "time": "2025-07-23T08:02:04+00:00" }, { "name": "utopia-php/orchestration", @@ -4810,16 +4810,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.17", + "version": "0.41.19", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "ef5e9d952032deecffee7f825a941c40ed4c84b8" + "reference": "ae6d44b373ae09f28d8b2dbb781ea3e2491b842d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ef5e9d952032deecffee7f825a941c40ed4c84b8", - "reference": "ef5e9d952032deecffee7f825a941c40ed4c84b8", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ae6d44b373ae09f28d8b2dbb781ea3e2491b842d", + "reference": "ae6d44b373ae09f28d8b2dbb781ea3e2491b842d", "shasum": "" }, "require": { @@ -4855,9 +4855,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.17" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.19" }, - "time": "2025-07-18T08:18:48+00:00" + "time": "2025-07-23T06:33:44+00:00" }, { "name": "doctrine/annotations", From 8ac0486e730b3c658305eea96064222817ce683d Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 23 Jul 2025 15:10:27 +0530 Subject: [PATCH 279/362] fix: route didn't include the params needed. --- app/controllers/general.php | 2 +- src/Appwrite/Utopia/Request/Filter.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 787ce2dbfb..1e1350b9b8 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -854,7 +854,7 @@ App::init() } if (version_compare($requestFormat, '1.8.0', '<')) { $dbForProject = $getProjectDB($project); - $request->addFilter(new RequestV20($dbForProject, $route)); + $request->addFilter(new RequestV20($dbForProject, $request->getParams())); } } diff --git a/src/Appwrite/Utopia/Request/Filter.php b/src/Appwrite/Utopia/Request/Filter.php index 2a5fe4d394..56fed746d9 100644 --- a/src/Appwrite/Utopia/Request/Filter.php +++ b/src/Appwrite/Utopia/Request/Filter.php @@ -7,12 +7,12 @@ use Utopia\Route; abstract class Filter { - private ?Route $route; + private array $params; private ?Database $dbForProject; - public function __construct(Database $dbForProject = null, Route $route = null) + public function __construct(Database $dbForProject = null, array $params = []) { - $this->route = $route; + $this->params = $params; $this->dbForProject = $dbForProject; } @@ -47,7 +47,7 @@ abstract class Filter public function getParamValue(string $key, mixed $default = ''): mixed { try { - $value = $this->route?->getParamValue($key) ?? $default; + $value = $this->params[$key] ?? $default; } catch (\Exception $e) { $value = $default; } From 73da590d659c7e5da4e7396c66f4c915390483d5 Mon Sep 17 00:00:00 2001 From: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> Date: Wed, 23 Jul 2025 12:31:28 -0700 Subject: [PATCH 280/362] docs: update CONTRIBUTING.md to clarify how to start --- CONTRIBUTING.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 277a509447..c6837673d5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,31 @@ You can [find issues using this query](https://github.com/search?q=org%3Aappwrit ## How to Start? -If you are worried or don’t know where to start, check out the next section that explains what kind of help we could use and where you can get involved. You can send your questions to [@appwrite on Twitter](https://twitter.com/appwrite) or to anyone from the [Appwrite team on Discord](https://appwrite.io/discord). You can also submit an issue, and a maintainer can guide you! +Welcome! We're excited that you're interested in contributing to Appwrite. To make sure your time is valued and your contributions are successful, please follow these steps before writing any code: + +### 🔍 Step 1: Find an Issue + +Browse open issues and look for ones labeled [good first issue](https://github.com/search?q=org%3Aappwrite+is%3Aopen+type%3Aissue+label%3A%22good+first+issue%22&type=issues) or [help wanted](https://github.com/search?q=org%3Aappwrite+is%3Aopen+type%3Aissue+label%3A%22help+wanted%22&type=issues). + +If you're not sure which issue to pick, ask in our ⁠[maintainers channel](https://discord.com/channels/564160730845151244/636852860709240842) on Discord. + +### 📝 Step 2: Ask to Be Assigned + +Before working on an issue, comment on the GitHub issue asking to be assigned. This prevents multiple people working on the same task. + +Then, create a thread in the ⁠[maintainers channel](https://discord.com/channels/564160730845151244/636852860709240842) on Discord with a link to the issue. + +Our team is small and may not see your GitHub comment right away - posting in the ⁠[maintainers channel](https://discord.com/channels/564160730845151244/636852860709240842) ensures it gets seen. + +### 💬 Step 3: Don’t Submit Random PRs + +If you're not working on an assigned issue, create a GitHub issue first. + +PRs submitted without context or discussion may not align with our roadmap and may be closed without review. + +### ⚠️ Please Note + +We’re a very small team managing a large project. Many PRs are submitted, and while we appreciate every effort, we can only review contributions that follow the process above. This helps us keep things fair and organized. ## Code of Conduct From 07d5d71fba0b88b16f8bb8a959affe8ef650234b Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Sun, 27 Jul 2025 16:13:41 +1200 Subject: [PATCH 281/362] Update database --- composer.json | 2 +- composer.lock | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index aca7b9cda5..4814411e0f 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.72.*", + "utopia-php/database": "0.73.*", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index a5207b2590..c092b802e4 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": "040a8234ecf1038a7e6dc16aa2dda084", + "content-hash": "497a684d3c93c08d4741f5bb886a5474", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.72.3", + "version": "0.73.0", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "fd24f3637bbf31ecb84793512b6f01f5f2863a90" + "reference": "f9b6c587e54069dc64c2d29174ce8a42b7ba6491" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/fd24f3637bbf31ecb84793512b6f01f5f2863a90", - "reference": "fd24f3637bbf31ecb84793512b6f01f5f2863a90", + "url": "https://api.github.com/repos/utopia-php/database/zipball/f9b6c587e54069dc64c2d29174ce8a42b7ba6491", + "reference": "f9b6c587e54069dc64c2d29174ce8a42b7ba6491", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.72.3" + "source": "https://github.com/utopia-php/database/tree/0.73.0" }, - "time": "2025-07-22T07:20:59+00:00" + "time": "2025-07-27T04:10:06+00:00" }, { "name": "utopia-php/detector", @@ -4810,16 +4810,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.19", + "version": "0.41.23", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "ae6d44b373ae09f28d8b2dbb781ea3e2491b842d" + "reference": "188dff738ff7b9f1f9209b34ac2092b5456b1001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ae6d44b373ae09f28d8b2dbb781ea3e2491b842d", - "reference": "ae6d44b373ae09f28d8b2dbb781ea3e2491b842d", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/188dff738ff7b9f1f9209b34ac2092b5456b1001", + "reference": "188dff738ff7b9f1f9209b34ac2092b5456b1001", "shasum": "" }, "require": { @@ -4855,9 +4855,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.19" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.23" }, - "time": "2025-07-23T06:33:44+00:00" + "time": "2025-07-25T06:47:04+00:00" }, { "name": "doctrine/annotations", From 6637cc0ed79dbf000a0b06fe6df8be86a25918b4 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Sun, 27 Jul 2025 17:09:50 +1200 Subject: [PATCH 282/362] Fix merge --- composer.json | 4 +- phpstan.neon | 3 +- .../Databases/Legacy/DatabasesBase.php | 60 +++++++++---------- 3 files changed, 31 insertions(+), 36 deletions(-) diff --git a/composer.json b/composer.json index 4814411e0f..e0c3caf63c 100644 --- a/composer.json +++ b/composer.json @@ -12,8 +12,8 @@ ], "scripts": { "test": "vendor/bin/phpunit", - "lint": "vendor/bin/pint --test", - "format": "vendor/bin/pint", + "lint": "vendor/bin/pint --test --config pint.json", + "format": "vendor/bin/pint --config pint.json", "bench": "vendor/bin/phpbench run --report=benchmark", "check": "./vendor/bin/phpstan analyse -c phpstan.neon" }, diff --git a/phpstan.neon b/phpstan.neon index b18f3d6d58..153b3be21c 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -5,4 +5,5 @@ parameters: scanDirectories: - vendor/swoole/ide-helper excludePaths: - - tests/resources \ No newline at end of file + - tests/resources + - app/sdks \ No newline at end of file diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 554b47f4a5..6aab125478 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -1437,8 +1437,8 @@ trait DatabasesBase } /** - * @depends testCreateAttributes - */ + * @depends testCreateAttributes + */ public function testGetIndexByKeyWithLengths(array $data): void { $databaseId = $data['databaseId']; @@ -1508,8 +1508,8 @@ trait DatabasesBase $this->assertEquals(400, $create['headers']['status-code']); } /** - * @depends testCreateIndexes - */ + * @depends testCreateIndexes + */ public function testListIndexes(array $data): void { $databaseId = $data['databaseId']; @@ -1979,39 +1979,33 @@ trait DatabasesBase ]); $this->assertEquals(2, $documents['body']['total']); - if ($this->getSide() === 'client') { - // Skipped on server side: Creating a document with no permissions results in an empty permissions array, whereas on client side it assigns permissions to the current user + // test without passing permissions + $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Thor: Ragnarok', + 'releaseYear' => 2000 + ] + ]); - // test without passing permissions - $document = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'data' => [ - 'title' => 'Thor: Ragnarok', - 'releaseYear' => 2000 - ] - ]); + $this->assertEquals(200, $document['headers']['status-code']); + $this->assertEquals('Thor: Ragnarok', $document['body']['title']); - $this->assertEquals(200, $document['headers']['status-code']); - $this->assertEquals('Thor: Ragnarok', $document['body']['title']); - $this->assertCount(3, $document['body']['$permissions']); - $permissionsCreated = $document['body']['$permissions']; - // checking the default created permission - $defaultPermission = [ - Permission::read(Role::user($this->getUser()['$id'])), - Permission::update(Role::user($this->getUser()['$id'])), - Permission::delete(Role::user($this->getUser()['$id'])) - ]; - // ignoring the order of the permission and checking the permissions - $this->assertEqualsCanonicalizing($defaultPermission, $permissionsCreated); + $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); - $document = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'] - ], $this->getHeaders())); + $this->assertEquals(200, $document['headers']['status-code']); - $this->assertEquals(200, $document['headers']['status-code']); + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); $this->assertEquals(204, $deleteResponse['headers']['status-code']); From d491a6db2d6119d51bb1346724bf81127877e468 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Sun, 27 Jul 2025 17:12:33 +1200 Subject: [PATCH 283/362] Fix consumers --- app/init/resources.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/init/resources.php b/app/init/resources.php index 0193da60b1..946a977aa4 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -97,10 +97,10 @@ App::setResource('consumerDatabases', function (BrokerPool $consumer) { }, ['consumer']); App::setResource('consumerMigrations', function (BrokerPool $consumer) { return $consumer; -}, ['publisher']); +}, ['consumer']); App::setResource('consumerStatsUsage', function (BrokerPool $consumer) { return $consumer; -}, ['publisher']); +}, ['consumer']); App::setResource('queueForMessaging', function (Publisher $publisher) { return new Messaging($publisher); }, ['publisher']); From 557493d09116543045be6d7d9b7d0b6ceabadca9 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 12:05:40 +0530 Subject: [PATCH 284/362] update: move to grids api. --- .../Http/Databases/Collections/Action.php | 6 +- .../Collections/Attributes/Action.php | 4 +- .../Collections/Documents/Action.php | 4 +- .../Databases/Collections/Indexes/Action.php | 4 +- .../Databases/Http/Databases/Create.php | 4 +- .../Databases/Http/Databases/Delete.php | 4 +- .../Modules/Databases/Http/Databases/Get.php | 4 +- .../Databases/Http/Databases/Logs/XList.php | 4 +- .../Databases/Http/Databases/Update.php | 4 +- .../Databases/Http/Databases/Usage/Get.php | 4 +- .../Databases/Http/Databases/Usage/XList.php | 4 +- .../Databases/Http/Databases/XList.php | 4 +- .../Tables/Columns/Boolean/Create.php | 4 +- .../Tables/Columns/Boolean/Update.php | 4 +- .../Tables/Columns/Datetime/Create.php | 4 +- .../Tables/Columns/Datetime/Update.php | 4 +- .../Tables/Columns/Delete.php | 4 +- .../Tables/Columns/Email/Create.php | 4 +- .../Tables/Columns/Email/Update.php | 4 +- .../Tables/Columns/Enum/Create.php | 4 +- .../Tables/Columns/Enum/Update.php | 4 +- .../Tables/Columns/Float/Create.php | 4 +- .../Tables/Columns/Float/Update.php | 4 +- .../Tables/Columns/Get.php | 4 +- .../Tables/Columns/IP/Create.php | 4 +- .../Tables/Columns/IP/Update.php | 4 +- .../Tables/Columns/Integer/Create.php | 4 +- .../Tables/Columns/Integer/Update.php | 4 +- .../Tables/Columns/Relationship/Create.php | 4 +- .../Tables/Columns/Relationship/Update.php | 4 +- .../Tables/Columns/String/Create.php | 4 +- .../Tables/Columns/String/Update.php | 4 +- .../Tables/Columns/URL/Create.php | 4 +- .../Tables/Columns/URL/Update.php | 4 +- .../Tables/Columns/XList.php | 4 +- .../{Databases => Grids}/Tables/Create.php | 6 +- .../{Databases => Grids}/Tables/Delete.php | 6 +- .../Http/{Databases => Grids}/Tables/Get.php | 6 +- .../Tables/Indexes/Create.php | 4 +- .../Tables/Indexes/Delete.php | 4 +- .../Tables/Indexes/Get.php | 4 +- .../Tables/Indexes/XList.php | 4 +- .../Tables/Logs/XList.php | 6 +- .../Tables/Rows/Bulk/Delete.php | 4 +- .../Tables/Rows/Bulk/Update.php | 4 +- .../Tables/Rows/Bulk/Upsert.php | 4 +- .../Tables/Rows/Column/Decrement.php | 4 +- .../Tables/Rows/Column/Increment.php | 4 +- .../Tables/Rows/Create.php | 4 +- .../Tables/Rows/Delete.php | 4 +- .../{Databases => Grids}/Tables/Rows/Get.php | 4 +- .../Tables/Rows/Logs/XList.php | 4 +- .../Tables/Rows/Update.php | 4 +- .../Tables/Rows/Upsert.php | 4 +- .../Tables/Rows/XList.php | 4 +- .../{Databases => Grids}/Tables/Update.php | 6 +- .../{Databases => Grids}/Tables/Usage/Get.php | 6 +- .../{Databases => Grids}/Tables/XList.php | 6 +- .../Platform/Modules/Databases/SDKMethod.php | 62 +++++++++++++ .../Databases/Services/Registry/Tables.php | 92 +++++++++---------- src/Appwrite/SDK/Specification/Format.php | 16 ++-- .../SDK/Specification/Format/OpenAPI3.php | 37 ++++---- .../SDK/Specification/Format/Swagger2.php | 36 ++++---- 63 files changed, 274 insertions(+), 217 deletions(-) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Boolean/Create.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Boolean/Update.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Datetime/Create.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Datetime/Update.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Delete.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Email/Create.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Email/Update.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Enum/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Enum/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Float/Create.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Float/Update.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Get.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/IP/Create.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/IP/Update.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Integer/Create.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Integer/Update.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Relationship/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/Relationship/Update.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/String/Create.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/String/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/URL/Create.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/URL/Update.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Columns/XList.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Create.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Delete.php (92%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Get.php (90%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Indexes/Create.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Indexes/Delete.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Indexes/Get.php (92%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Indexes/XList.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Logs/XList.php (88%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Rows/Bulk/Delete.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Rows/Bulk/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Rows/Bulk/Upsert.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Rows/Column/Decrement.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Rows/Column/Increment.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Rows/Create.php (97%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Rows/Delete.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Rows/Get.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Rows/Logs/XList.php (92%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Rows/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Rows/Upsert.php (95%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Rows/XList.php (93%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Update.php (94%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/Usage/Get.php (87%) rename src/Appwrite/Platform/Modules/Databases/Http/{Databases => Grids}/Tables/XList.php (93%) create mode 100644 src/Appwrite/Platform/Modules/Databases/SDKMethod.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 9329300ffa..351810fcc6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php @@ -20,7 +20,7 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/tables')) { + if (str_contains($path, '/:databaseId/grids/tables')) { $this->context = TABLES; } @@ -56,7 +56,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkGroup(): string { - return $this->isCollectionsAPI() ? 'collections' : 'tables'; + return $this->isCollectionsAPI() ? 'collections' : 'grids'; } /** @@ -64,7 +64,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'tables'; + return $this->isCollectionsAPI() ? 'databases' : 'grids'; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 3f331edc9a..765741ef41 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -37,7 +37,7 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/tables')) { + if (str_contains($path, '/:databaseId/grids/tables')) { $this->context = COLUMNS; } @@ -77,7 +77,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'tables'; + return $this->isCollectionsAPI() ? 'databases' : 'grids'; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index bfebca4cf7..9a1c5f3dad 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -22,7 +22,7 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/tables')) { + if (str_contains($path, '/:databaseId/grids/tables')) { $this->context = ROWS; } @@ -72,7 +72,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'tables'; + return $this->isCollectionsAPI() ? 'databases' : 'grids'; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php index 33c2977be5..bafa9d0b91 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php @@ -19,7 +19,7 @@ abstract class Action extends UtopiaAction public function setHttpPath(string $path): UtopiaAction { - if (str_contains($path, '/:databaseId/tables')) { + if (str_contains($path, '/:databaseId/grids/tables')) { $this->context = COLUMN_INDEX; } @@ -63,7 +63,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkNamespace(): string { - return $this->isCollectionsAPI() ? 'databases' : 'tables'; + return $this->isCollectionsAPI() ? 'databases' : 'grids'; } /** diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index 38374402fb..0dbe3eebbd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -4,9 +4,9 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases; use Appwrite\Event\Event; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; -use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Response as UtopiaResponse; @@ -42,7 +42,7 @@ class Create extends Action ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'database.create') ->label('audits.resource', 'database/{response.$id}') - ->label('sdk', new Method( + ->label('sdk', SDKMethod::withGridsAPI( namespace: 'databases', group: 'databases', name: 'create', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php index 56cf1a4296..fb5594abb8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php @@ -5,9 +5,9 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; -use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; @@ -34,7 +34,7 @@ class Delete extends Action ->label('event', 'databases.[databaseId].delete') ->label('audits.event', 'database.delete') ->label('audits.resource', 'database/{request.databaseId}') - ->label('sdk', new Method( + ->label('sdk', SDKMethod::withGridsAPI( namespace: 'databases', group: 'databases', name: 'delete', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php index f478dc7917..ff4a9af0a4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php @@ -3,9 +3,9 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; -use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; @@ -29,7 +29,7 @@ class Get extends Action ->groups(['api', 'database']) ->label('scope', 'databases.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( + ->label('sdk', SDKMethod::withGridsAPI( namespace: 'databases', group: 'databases', name: 'get', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php index 52f2ad93b6..6d3e30f52a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php @@ -3,9 +3,9 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Logs; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; -use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use DeviceDetector\DeviceDetector as Detector; @@ -41,7 +41,7 @@ class XList extends Action ->groups(['api', 'database']) ->label('scope', 'databases.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( + ->label('sdk', SDKMethod::withGridsAPI( namespace: 'databases', group: 'logs', name: 'listLogs', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php index a746f4ce4c..d164325469 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php @@ -4,9 +4,9 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases; use Appwrite\Event\Event; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; -use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; @@ -35,7 +35,7 @@ class Update extends Action ->label('event', 'databases.[databaseId].update') ->label('audits.event', 'database.update') ->label('audits.resource', 'database/{response.$id}') - ->label('sdk', new Method( + ->label('sdk', SDKMethod::withGridsAPI( namespace: 'databases', group: 'databases', name: 'update', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index 56fcc29688..fcdb4c615d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -3,9 +3,9 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Usage; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; -use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Config\Config; @@ -34,7 +34,7 @@ class Get extends Action ->groups(['api', 'database', 'usage']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( + ->label('sdk', SDKMethod::withGridsAPI( namespace: 'databases', group: null, name: self::getName(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php index b5c898fd1b..b3ff8a6fac 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -2,9 +2,9 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Usage; +use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; -use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Config\Config; @@ -32,7 +32,7 @@ class XList extends Action ->groups(['api', 'database', 'usage']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( + ->label('sdk', SDKMethod::withGridsAPI( namespace: 'databases', group: null, name: self::getName(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php index 52f3fd2b55..1806cdc3fb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -3,9 +3,9 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases; use Appwrite\Extend\Exception; +use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; -use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Databases; use Appwrite\Utopia\Response as UtopiaResponse; @@ -35,7 +35,7 @@ class XList extends Action ->groups(['api', 'database']) ->label('scope', 'databases.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', new Method( + ->label('sdk', SDKMethod::withGridsAPI( namespace: 'databases', group: 'databases', name: 'list', diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php index e0f1992ccb..214afbe546 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Boolean; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Create as BooleanCreate; use Appwrite\SDK\AuthType; @@ -28,7 +28,7 @@ class Create extends BooleanCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/boolean') ->desc('Create boolean column') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php index 888f31d9bd..3353005c59 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Boolean; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Boolean\Update as BooleanUpdate; use Appwrite\SDK\AuthType; @@ -30,7 +30,7 @@ class Update extends BooleanUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/boolean/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/boolean/:key') ->desc('Update boolean column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php index 63110c9c6a..bcc5967586 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Datetime; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Create as DatetimeCreate; use Appwrite\SDK\AuthType; @@ -30,7 +30,7 @@ class Create extends DatetimeCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/datetime') ->desc('Create datetime column') ->groups(['api', 'database']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php index 33c8ff9f94..bd92a0f14d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Datetime; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Datetime\Update as DatetimeUpdate; use Appwrite\SDK\AuthType; @@ -32,7 +32,7 @@ class Update extends DatetimeUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/datetime/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/datetime/:key') ->desc('Update dateTime column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php index 923ae3ee24..be764d58a8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Delete as AttributesDelete; use Appwrite\SDK\AuthType; @@ -29,7 +29,7 @@ class Delete extends AttributesDelete { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key') ->desc('Delete column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php index fe4170c74e..a5baa6fc89 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Email; use Appwrite\Network\Validator\Email; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Create as EmailCreate; @@ -29,7 +29,7 @@ class Create extends EmailCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/email') ->desc('Create email column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php index 8f4fd5ca8f..2e7dec9e63 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Email; use Appwrite\Network\Validator\Email; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Email\Update as EmailUpdate; @@ -31,7 +31,7 @@ class Update extends EmailUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/email/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/email/:key') ->desc('Update email column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php similarity index 94% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php index f64ededb8f..e420b340d2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Enum; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Create as EnumCreate; use Appwrite\SDK\AuthType; @@ -31,7 +31,7 @@ class Create extends EnumCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/enum') ->desc('Create enum column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php similarity index 94% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php index 77bd07bdcd..b9337eb2b0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Enum; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Enum\Update as EnumUpdate; use Appwrite\SDK\AuthType; @@ -33,7 +33,7 @@ class Update extends EnumUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/enum/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/enum/:key') ->desc('Update enum column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php index ce7d55c880..e0d9a41930 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Float; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Create as FloatCreate; use Appwrite\SDK\AuthType; @@ -29,7 +29,7 @@ class Create extends FloatCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/float') ->desc('Create float column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php index 31f4bd61ec..4cdc2ff319 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Float; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Float\Update as FloatUpdate; use Appwrite\SDK\AuthType; @@ -31,7 +31,7 @@ class Update extends FloatUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/float/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/float/:key') ->desc('Update float column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php index 24071db6b1..5151c69d42 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Get as AttributesGet; use Appwrite\SDK\AuthType; @@ -38,7 +38,7 @@ class Get extends AttributesGet { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key') ->desc('Get column') ->groups(['api', 'database']) ->label('scope', 'tables.read') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php index fcaf3f0a8b..cfba713edc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\IP; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Create as IPCreate; use Appwrite\SDK\AuthType; @@ -29,7 +29,7 @@ class Create extends IPCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/ip') ->desc('Create IP address column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php index 38759e4654..f9f31c8336 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\IP; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\IP\Update as IPUpdate; use Appwrite\SDK\AuthType; @@ -31,7 +31,7 @@ class Update extends IPUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/ip/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/ip/:key') ->desc('Update IP address column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php index 67848f7ef9..22ea591e82 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Integer; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Create as IntegerCreate; use Appwrite\SDK\AuthType; @@ -29,7 +29,7 @@ class Create extends IntegerCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/integer') ->desc('Create integer column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php index 27779abe3b..e5224b070a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Integer; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Integer\Update as IntegerUpdate; use Appwrite\SDK\AuthType; @@ -31,7 +31,7 @@ class Update extends IntegerUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/integer/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/integer/:key') ->desc('Update integer column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php similarity index 94% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php index f1a0fd9601..c89fcc4650 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Relationship; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Create as RelationshipCreate; use Appwrite\SDK\AuthType; @@ -30,7 +30,7 @@ class Create extends RelationshipCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/relationship') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/relationship') ->desc('Create relationship column') ->groups(['api', 'database']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php index 1385e157de..6b147c1db1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Relationship; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\Relationship\Update as RelationshipUpdate; use Appwrite\SDK\AuthType; @@ -30,7 +30,7 @@ class Update extends RelationshipUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/:key/relationship') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/:key/relationship') ->desc('Update relationship column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php similarity index 94% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php index 2dc1466a67..89565e3425 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\String; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Create as StringCreate; use Appwrite\SDK\AuthType; @@ -31,7 +31,7 @@ class Create extends StringCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/string') ->desc('Create string column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php similarity index 94% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php index 9e1034dbcc..b4e457cb89 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\String; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\String\Update as StringUpdate; use Appwrite\SDK\AuthType; @@ -33,7 +33,7 @@ class Update extends StringUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/string/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/string/:key') ->desc('Update string column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php index 65b1387a11..1bff31b06f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\URL; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Create as URLCreate; use Appwrite\SDK\AuthType; @@ -29,7 +29,7 @@ class Create extends URLCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/url') ->desc('Create URL column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php index 34fc77ac42..30810446da 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\URL; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\URL\Update as URLUpdate; use Appwrite\SDK\AuthType; @@ -31,7 +31,7 @@ class Update extends URLUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns/url/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns/url/:key') ->desc('Update URL column') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php index b6578777b0..719418cc49 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Attributes\XList as AttributesXList; use Appwrite\SDK\AuthType; @@ -27,7 +27,7 @@ class XList extends AttributesXList { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/columns') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/columns') ->desc('List columns') ->groups(['api', 'database']) ->label('scope', 'tables.read') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php similarity index 95% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php index 1fee8fc840..ac10781653 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Create as CollectionCreate; use Appwrite\SDK\AuthType; @@ -19,7 +19,7 @@ class Create extends CollectionCreate { public static function getName(): string { - return 'create'; + return 'createTable'; } protected function getResponseModel(): string @@ -31,7 +31,7 @@ class Create extends CollectionCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables') + ->setHttpPath('/v1/databases/:databaseId/grids/tables') ->desc('Create table') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php index ef0478c042..1da68e63bc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Delete as CollectionDelete; use Appwrite\SDK\AuthType; @@ -15,7 +15,7 @@ class Delete extends CollectionDelete { public static function getName(): string { - return 'delete'; + return 'deleteTable'; } protected function getResponseModel(): string @@ -27,7 +27,7 @@ class Delete extends CollectionDelete { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId') ->desc('Delete table') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php similarity index 90% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php index 1cc147f04d..a161a544db 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Get as CollectionGet; use Appwrite\SDK\AuthType; @@ -15,7 +15,7 @@ class Get extends CollectionGet { public static function getName(): string { - return 'get'; + return 'getTable'; } protected function getResponseModel(): string @@ -27,7 +27,7 @@ class Get extends CollectionGet { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId') ->desc('Get table') ->groups(['api', 'database']) ->label('scope', 'tables.read') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php similarity index 95% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php index a83bb3dc44..e280cba295 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Create as IndexCreate; use Appwrite\SDK\AuthType; @@ -33,7 +33,7 @@ class Create extends IndexCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes') ->desc('Create index') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php index a1d2fd5fce..21185a21b6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Delete as IndexDelete; use Appwrite\SDK\AuthType; @@ -32,7 +32,7 @@ class Delete extends IndexDelete { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes/:key') ->desc('Delete index') ->groups(['api', 'database']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php index cb8ef92a80..66d57cc839 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\Get as IndexGet; use Appwrite\SDK\AuthType; @@ -28,7 +28,7 @@ class Get extends IndexGet { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes/:key') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes/:key') ->desc('Get index') ->groups(['api', 'database']) ->label('scope', 'tables.read') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php index 78b2c8874f..85b913c331 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Indexes\XList as IndexXList; use Appwrite\SDK\AuthType; @@ -28,7 +28,7 @@ class XList extends IndexXList { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/indexes') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/indexes') ->desc('List indexes') ->groups(['api', 'database']) ->label('scope', 'tables.read') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php similarity index 88% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php index 63c53cf2bd..acac561c80 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Logs; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Logs; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Logs\XList as CollectionLogXList; use Appwrite\SDK\AuthType; @@ -24,7 +24,7 @@ class XList extends CollectionLogXList { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/logs') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/logs') ->desc('List table logs') ->groups(['api', 'database']) ->label('scope', 'tables.read') @@ -32,7 +32,7 @@ class XList extends CollectionLogXList ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), - name: 'listLogs', // getName needs to be different from parent action to avoid conflict in path name + name: self::getName(), description: '/docs/references/databases/get-table-logs.md', auth: [AuthType::ADMIN], responses: [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php similarity index 94% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php index 30aad96db8..87de8e0e49 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Bulk; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Delete as DocumentsDelete; use Appwrite\SDK\AuthType; @@ -29,7 +29,7 @@ class Delete extends DocumentsDelete { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') ->desc('Delete rows') ->groups(['api', 'database']) ->label('scope', 'rows.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php similarity index 94% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php index 4a862b1807..c28d49f934 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Bulk; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Update as DocumentsUpdate; use Appwrite\SDK\AuthType; @@ -30,7 +30,7 @@ class Update extends DocumentsUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') ->desc('Update rows') ->groups(['api', 'database']) ->label('scope', 'rows.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php similarity index 94% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php index db87daed89..db6c7b4140 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Bulk; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk\Upsert as DocumentsUpsert; use Appwrite\SDK\AuthType; @@ -29,7 +29,7 @@ class Upsert extends DocumentsUpsert { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') ->desc('Create or update rows') ->groups(['api', 'database']) ->label('scope', 'rows.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php index e9eb81aab8..f265cc663b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Column; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Column; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Attribute\Decrement as DecrementDocumentAttribute; use Appwrite\SDK\AuthType; @@ -29,7 +29,7 @@ class Decrement extends DecrementDocumentAttribute { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/:column/decrement') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId/:column/decrement') ->desc('Decrement row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].decrement') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php index a30618ea62..c343260871 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Column/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Column; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Column; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Attribute\Increment as IncrementDocumentAttribute; use Appwrite\SDK\AuthType; @@ -29,7 +29,7 @@ class Increment extends IncrementDocumentAttribute { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/:column/increment') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId/:column/increment') ->desc('Increment row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].increment') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php similarity index 97% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php index 3fc8a30bfd..bd616e40f1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Create as DocumentCreate; use Appwrite\SDK\AuthType; @@ -38,7 +38,7 @@ class Create extends DocumentCreate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_POST) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') ->desc('Create row') ->groups(['api', 'database']) ->label('scope', 'rows.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php similarity index 94% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php index 36c8aefbc6..a2ce5fcecd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Delete as DocumentDelete; use Appwrite\SDK\AuthType; @@ -33,7 +33,7 @@ class Delete extends DocumentDelete { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_DELETE) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') ->desc('Delete row') ->groups(['api', 'database']) ->label('scope', 'rows.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php index b821d01ebe..b628f0e54f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Get as DocumentGet; use Appwrite\SDK\AuthType; @@ -29,7 +29,7 @@ class Get extends DocumentGet { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') ->desc('Get row') ->groups(['api', 'database']) ->label('scope', 'rows.read') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php similarity index 92% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php index b279e96381..c6fa34637e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Logs; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Logs; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Logs\XList as DocumentLogXList; use Appwrite\SDK\AuthType; @@ -24,7 +24,7 @@ class XList extends DocumentLogXList { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId/logs') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId/logs') ->desc('List row logs') ->groups(['api', 'database']) ->label('scope', 'rows.read') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php similarity index 94% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php index 77cf531a4f..e7b18cfd20 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Update as DocumentUpdate; use Appwrite\SDK\AuthType; @@ -30,7 +30,7 @@ class Update extends DocumentUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PATCH) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') ->desc('Update row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php similarity index 95% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php index d6207a5c1f..5e5683e84d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Upsert as DocumentUpsert; use Appwrite\SDK\AuthType; @@ -30,7 +30,7 @@ class Upsert extends DocumentUpsert { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows/:rowId') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows/:rowId') ->desc('Create or update a row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].upsert') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php index 244a4afdb9..16a0c139da 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\XList as DocumentXList; use Appwrite\SDK\AuthType; @@ -29,7 +29,7 @@ class XList extends DocumentXList { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/rows') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/rows') ->desc('List rows') ->groups(['api', 'database']) ->label('scope', 'rows.read') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php similarity index 94% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php index f5400366fd..ba5f2ad3ee 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Update as CollectionUpdate; use Appwrite\SDK\AuthType; @@ -18,7 +18,7 @@ class Update extends CollectionUpdate { public static function getName(): string { - return 'update'; + return 'updateTable'; } protected function getResponseModel(): string @@ -30,7 +30,7 @@ class Update extends CollectionUpdate { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_PUT) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId') ->desc('Update table') ->groups(['api', 'database', 'schema']) ->label('scope', 'tables.write') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php similarity index 87% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php index 9f51a82734..7246070e1e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Usage; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Usage; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Usage\Get as CollectionUsageGet; use Appwrite\SDK\AuthType; @@ -28,7 +28,7 @@ class Get extends CollectionUsageGet { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables/:tableId/usage') + ->setHttpPath('/v1/databases/:databaseId/grids/tables/:tableId/usage') ->desc('Get table usage stats') ->groups(['api', 'database', 'usage']) ->label('scope', 'tables.read') @@ -36,7 +36,7 @@ class Get extends CollectionUsageGet ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: null, - name: 'getUsage', // getName needs to be different from parent action to avoid conflict in path name + name: self::getName(), description: '/docs/references/databases/get-table-usage.md', auth: [AuthType::ADMIN], responses: [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php similarity index 93% rename from src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php rename to src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php index 361ab2020f..b6dd9f7fb5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php @@ -1,6 +1,6 @@ <?php -namespace Appwrite\Platform\Modules\Databases\Http\Databases\Tables; +namespace Appwrite\Platform\Modules\Databases\Http\Grids\Tables; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\XList as CollectionXList; use Appwrite\SDK\AuthType; @@ -17,7 +17,7 @@ class XList extends CollectionXList { public static function getName(): string { - return 'list'; + return 'listTables'; } protected function getResponseModel(): string @@ -29,7 +29,7 @@ class XList extends CollectionXList { $this ->setHttpMethod(self::HTTP_REQUEST_METHOD_GET) - ->setHttpPath('/v1/databases/:databaseId/tables') + ->setHttpPath('/v1/databases/:databaseId/grids/tables') ->desc('List tables') ->groups(['api', 'database']) ->label('scope', 'tables.read') diff --git a/src/Appwrite/Platform/Modules/Databases/SDKMethod.php b/src/Appwrite/Platform/Modules/Databases/SDKMethod.php new file mode 100644 index 0000000000..62825a0b08 --- /dev/null +++ b/src/Appwrite/Platform/Modules/Databases/SDKMethod.php @@ -0,0 +1,62 @@ +<?php + +namespace Appwrite\Platform\Modules\Databases; + +use Appwrite\SDK\ContentType; +use Appwrite\SDK\Method; + +class SDKMethod +{ + /** + * @return Method[] + */ + public static function withGridsAPI( + string $namespace, + ?string $group, + string $name, + string $description, + array $auth, + array $responses, + ContentType $contentType, + ): array { + return [ + new Method( + namespace: $namespace, + group: $group, + name: $name, + description: $description, + auth: $auth, + responses: $responses, + contentType: $contentType, + ), + new Method( + namespace: 'grids', + group: $group === null ? null : 'grids', + name: self::transformNameForGrids($name), + description: self::transformDocsPathForGrids($description), + auth: $auth, + responses: $responses, + contentType: $contentType, + ) + ]; + } + + private static function transformNameForGrids(string $original): string + { + return match ($original) { + 'create' => 'createDatabase', + 'list' => 'listDatabases', + 'get' => 'getDatabase', + 'update' => 'updateDatabase', + 'delete' => 'deleteDatabase', + 'listLogs' => 'listDatabaseLogs', + 'listUsage' => 'listDatabaseUsage', + default => $original /* `getDatabaseUsage` is already correct! */ + }; + } + + private static function transformDocsPathForGrids(string $original): string + { + return str_replace('/databases/', '/grids/', $original); + } +} diff --git a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php index 4ddadeece6..aad8571553 100644 --- a/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php +++ b/src/Appwrite/Platform/Modules/Databases/Services/Registry/Tables.php @@ -2,52 +2,52 @@ namespace Appwrite\Platform\Modules\Databases\Services\Registry; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean\Create as CreateBoolean; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Boolean\Update as UpdateBoolean; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime\Create as CreateDatetime; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Datetime\Update as UpdateDatetime; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Delete as DeleteColumn; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email\Create as CreateEmail; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Email\Update as UpdateEmail; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum\Create as CreateEnum; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Enum\Update as UpdateEnum; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float\Create as CreateFloat; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Float\Update as UpdateFloat; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Get as GetColumn; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer\Create as CreateInteger; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Integer\Update as UpdateInteger; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP\Create as CreateIP; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\IP\Update as UpdateIP; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship\Create as CreateRelationship; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\Relationship\Update as UpdateRelationship; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String\Create as CreateString; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\String\Update as UpdateString; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL\Create as CreateURL; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\URL\Update as UpdateURL; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Columns\XList as ListColumns; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Create as CreateTable; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Delete as DeleteTable; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Get as GetTable; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\Create as CreateColumnIndex; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\Delete as DeleteColumnIndex; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\Get as GetColumnIndex; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Indexes\XList as ListColumnIndexes; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Logs\XList as ListTableLogs; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Delete as DeleteRows; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Update as UpdateRows; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Bulk\Upsert as UpsertRows; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Column\Decrement as DecrementRowColumn; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Column\Increment as IncrementRowColumn; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Create as CreateRow; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Delete as DeleteRow; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Get as GetRow; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Logs\XList as ListRowLogs; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Update as UpdateRow; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\Upsert as UpsertRow; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Rows\XList as ListRows; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Update as UpdateTable; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\Usage\Get as GetTableUsage; -use Appwrite\Platform\Modules\Databases\Http\Databases\Tables\XList as ListTables; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Boolean\Create as CreateBoolean; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Boolean\Update as UpdateBoolean; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Datetime\Create as CreateDatetime; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Datetime\Update as UpdateDatetime; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Delete as DeleteColumn; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Email\Create as CreateEmail; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Email\Update as UpdateEmail; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Enum\Create as CreateEnum; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Enum\Update as UpdateEnum; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Float\Create as CreateFloat; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Float\Update as UpdateFloat; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Get as GetColumn; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Integer\Create as CreateInteger; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Integer\Update as UpdateInteger; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\IP\Create as CreateIP; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\IP\Update as UpdateIP; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Relationship\Create as CreateRelationship; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\Relationship\Update as UpdateRelationship; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\String\Create as CreateString; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\String\Update as UpdateString; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\URL\Create as CreateURL; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\URL\Update as UpdateURL; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Columns\XList as ListColumns; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Create as CreateTable; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Delete as DeleteTable; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Get as GetTable; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes\Create as CreateColumnIndex; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes\Delete as DeleteColumnIndex; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes\Get as GetColumnIndex; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Indexes\XList as ListColumnIndexes; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Logs\XList as ListTableLogs; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Bulk\Delete as DeleteRows; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Bulk\Update as UpdateRows; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Bulk\Upsert as UpsertRows; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Column\Decrement as DecrementRowColumn; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Column\Increment as IncrementRowColumn; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Create as CreateRow; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Delete as DeleteRow; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Get as GetRow; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Logs\XList as ListRowLogs; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Update as UpdateRow; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\Upsert as UpsertRow; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Rows\XList as ListRows; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Update as UpdateTable; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\Usage\Get as GetTableUsage; +use Appwrite\Platform\Modules\Databases\Http\Grids\Tables\XList as ListTables; use Utopia\Platform\Service; /** diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index 4a5ebd4566..6ab0310e14 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -114,6 +114,7 @@ abstract class Format protected function getEnumName(string $service, string $method, string $param): ?string { + /* `$service` is `$namespace` */ switch ($service) { case 'proxy': switch ($method) { @@ -206,12 +207,14 @@ abstract class Format } } break; - case 'tables': + case 'grids': switch ($method) { - case 'getUsage': + case 'getDatabaseUsage': + case 'listDatabaseUsage': + case 'getTableUsage': switch ($param) { case 'range': - return 'DatabaseUsageRange'; + return 'GridUsageRange'; } break; case 'createRelationshipColumn': @@ -478,16 +481,17 @@ abstract class Format switch ($method) { /*case 'getUsage':*/ case 'listUsage': - case 'getTableUsage': case 'getCollectionUsage': case 'getDatabaseUsage': // Range Enum Keys return ['Twenty Four Hours', 'Thirty Days', 'Ninety Days']; } break; - case 'tables': + case 'grids': switch ($method) { - case 'getUsage': + case 'getDatabaseUsage': + case 'listDatabaseUsage': + case 'getTableUsage': // Range Enum Keys return ['Twenty Four Hours', 'Thirty Days', 'Ninety Days']; } diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 96c8317c8f..a58f0b3068 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -111,11 +111,7 @@ class OpenAPI3 extends Format */ $consumes = [$sdk->getRequestType()->value]; - $method = $sdk->getMethodName() ?? \uniqid(); - - if (!empty($method) && \is_array($method)) { - $method = \array_keys($method)[0]; - } + $methodName = $sdk->getMethodName() ?? \uniqid(); $desc = $sdk->getDescriptionFilePath() ?: $sdk->getDescription(); $produces = ($sdk->getContentType())->value; @@ -149,18 +145,18 @@ class OpenAPI3 extends Format $temp = [ 'summary' => $route->getDesc(), - 'operationId' => $namespace . ucfirst($method), + 'operationId' => $namespace . ucfirst($methodName), 'tags' => [$namespace], 'description' => $descContents, 'responses' => [], 'deprecated' => $sdk->isDeprecated(), 'x-appwrite' => [ // Appwrite related metadata - 'method' => $method, + 'method' => $methodName, 'group' => $sdk->getGroup(), 'weight' => $route->getOrder(), 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', - 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', + 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($methodName) . '.md', 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '', 'rate-limit' => $route->getLabel('abuse-limit', 0), 'rate-time' => $route->getLabel('abuse-time', 3600), @@ -180,11 +176,11 @@ class OpenAPI3 extends Format if (!empty($additionalMethods)) { $temp['x-appwrite']['methods'] = []; - foreach ($additionalMethods as $method) { - /** @var Method $method */ - $desc = $method->getDescriptionFilePath(); + foreach ($additionalMethods as $methodObj) { + /** @var Method $methodObj */ + $desc = $methodObj->getDescriptionFilePath(); - $methodSecurities = $method->getAuth(); + $methodSecurities = $methodObj->getAuth(); $methodSdkPlatforms = []; foreach ($methodSecurities as $value) { switch ($value) { @@ -211,15 +207,14 @@ class OpenAPI3 extends Format } $methodSecurities = ['Project' => []]; - foreach ($method->getAuth() as $security) { - /** @var AuthType $security */ + foreach ($methodObj->getAuth() as $security) { if (\array_key_exists($security->value, $this->keys)) { $methodSecurities[$security->value] = []; } } $additionalMethod = [ - 'name' => $method->getMethodName(), + 'name' => $methodObj->getMethodName(), 'auth' => \array_slice($methodSecurities, 0, $this->authCount), 'parameters' => [], 'required' => [], @@ -227,7 +222,7 @@ class OpenAPI3 extends Format 'description' => ($desc) ? \file_get_contents($desc) : '', ]; - foreach ($method->getParameters() as $parameter) { + foreach ($methodObj->getParameters() as $parameter) { $additionalMethod['parameters'][] = $parameter->getName(); if (!$parameter->getOptional()) { @@ -235,7 +230,7 @@ class OpenAPI3 extends Format } } - foreach ($method->getResponses() as $response) { + foreach ($methodObj->getResponses() as $response) { if (\is_array($response->getModel())) { $additionalMethod['responses'][] = [ 'code' => $response->getCode(), @@ -506,13 +501,13 @@ class OpenAPI3 extends Format $node['schema']['type'] = $validator->getType(); $node['schema']['x-example'] = $validator->getList()[0]; - //Iterate from the blackList. If it matches with the current one, then it is a blackList + // Iterate from the blackList. If it matches with the current one, then it is a blackList // Do not add the enum $allowed = true; foreach ($this->enumBlacklist as $blacklist) { if ( $blacklist['namespace'] == $sdk->getNamespace() - && $blacklist['method'] == $method + && $blacklist['method'] == $methodName && $blacklist['parameter'] == $name ) { $allowed = false; @@ -522,8 +517,8 @@ class OpenAPI3 extends Format if ($allowed) { $node['schema']['enum'] = $validator->getList(); - $node['schema']['x-enum-name'] = $this->getEnumName($sdk->getNamespace() ?? '', $method, $name); - $node['schema']['x-enum-keys'] = $this->getEnumKeys($sdk->getNamespace() ?? '', $method, $name); + $node['schema']['x-enum-name'] = $this->getEnumName($sdk->getNamespace() ?? '', $methodName, $name); + $node['schema']['x-enum-keys'] = $this->getEnumKeys($sdk->getNamespace() ?? '', $methodName, $name); } if ($validator->getType() === 'integer') { $node['format'] = 'int32'; diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 9b104637b4..4420cc6736 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -112,11 +112,7 @@ class Swagger2 extends Format $consumes = [$sdk->getRequestType()->value]; } - $method = $sdk->getMethodName() ?? \uniqid(); - - if (!empty($method) && is_array($method)) { - $method = array_keys($method)[0]; - } + $methodName = $sdk->getMethodName() ?? \uniqid(); $desc = $sdk->getDescriptionFilePath() ?: $sdk->getDescription(); $produces = ($sdk->getContentType())->value; @@ -151,7 +147,7 @@ class Swagger2 extends Format $temp = [ 'summary' => $route->getDesc(), - 'operationId' => $namespace . ucfirst($method), + 'operationId' => $namespace . ucfirst($methodName), 'consumes' => [], 'produces' => [], 'tags' => [$namespace], @@ -159,12 +155,12 @@ class Swagger2 extends Format 'responses' => [], 'deprecated' => $sdk->isDeprecated(), 'x-appwrite' => [ // Appwrite related metadata - 'method' => $method, + 'method' => $methodName, 'group' => $sdk->getGroup(), 'weight' => $route->getOrder(), 'cookies' => $route->getLabel('sdk.cookies', false), 'type' => $sdk->getType()->value ?? '', - 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($method) . '.md', + 'demo' => Template::fromCamelCaseToDash($namespace) . '/' . Template::fromCamelCaseToDash($methodName) . '.md', 'edit' => 'https://github.com/appwrite/appwrite/edit/master' . $sdk->getDescription() ?? '', 'rate-limit' => $route->getLabel('abuse-limit', 0), 'rate-time' => $route->getLabel('abuse-time', 3600), @@ -188,11 +184,11 @@ class Swagger2 extends Format if (!empty($additionalMethods)) { $temp['x-appwrite']['methods'] = []; - foreach ($additionalMethods as $method) { - /** @var Method $method */ - $desc = $method->getDescriptionFilePath(); + foreach ($additionalMethods as $methodObj) { + /** @var Method $methodObj */ + $desc = $methodObj->getDescriptionFilePath(); - $methodSecurities = $method->getAuth(); + $methodSecurities = $methodObj->getAuth(); $methodSdkPlatforms = []; foreach ($methodSecurities as $value) { switch ($value) { @@ -219,7 +215,7 @@ class Swagger2 extends Format } $methodSecurities = ['Project' => []]; - foreach ($method->getAuth() as $security) { + foreach ($methodObj->getAuth() as $security) { /** @var AuthType $security */ if (\array_key_exists($security->value, $this->keys)) { $methodSecurities[$security->value] = []; @@ -227,7 +223,7 @@ class Swagger2 extends Format } $additionalMethod = [ - 'name' => $method->getMethodName(), + 'name' => $methodObj->getMethodName(), 'auth' => \array_slice($methodSecurities, 0, $this->authCount), 'parameters' => [], 'required' => [], @@ -235,7 +231,7 @@ class Swagger2 extends Format 'description' => ($desc) ? \file_get_contents($desc) : '', ]; - foreach ($method->getParameters() as $parameter) { + foreach ($methodObj->getParameters() as $parameter) { $additionalMethod['parameters'][] = $parameter->getName(); if (!$parameter->getOptional()) { @@ -243,7 +239,7 @@ class Swagger2 extends Format } } - foreach ($method->getResponses() as $response) { + foreach ($methodObj->getResponses() as $response) { /** @var Response $response */ if (\is_array($response->getModel())) { $additionalMethod['responses'][] = [ @@ -517,10 +513,10 @@ class Swagger2 extends Format $node['type'] = $validator->getType(); $node['x-example'] = $validator->getList()[0]; - //Iterate the blackList. If it matches with the current one, then it is blackListed + // Iterate the blackList. If it matches with the current one, then it is blackListed $allowed = true; foreach ($this->enumBlacklist as $blacklist) { - if ($blacklist['namespace'] == $namespace && $blacklist['method'] == $method && $blacklist['parameter'] == $name) { + if ($blacklist['namespace'] == $namespace && $blacklist['method'] == $methodName && $blacklist['parameter'] == $name) { $allowed = false; break; } @@ -528,8 +524,8 @@ class Swagger2 extends Format if ($allowed && $validator->getType() === 'string') { $node['enum'] = $validator->getList(); - $node['x-enum-name'] = $this->getEnumName($namespace, $method, $name); - $node['x-enum-keys'] = $this->getEnumKeys($namespace, $method, $name); + $node['x-enum-name'] = $this->getEnumName($namespace, $methodName, $name); + $node['x-enum-keys'] = $this->getEnumKeys($namespace, $methodName, $name); } if ($validator->getType() === 'integer') { From f19ef05a986b4571ce6d7fd8d130049267e650fe Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 13:47:44 +0530 Subject: [PATCH 285/362] fix: response modals and sdk-gen for multiple namespaces. --- Dockerfile | 4 +- app/config/specs/open-api3-1.8.x-client.json | 84 +- app/config/specs/open-api3-1.8.x-console.json | 886 +++++++++++------ app/config/specs/open-api3-1.8.x-server.json | 604 +++++++----- app/config/specs/open-api3-latest-client.json | 86 +- .../specs/open-api3-latest-console.json | 906 ++++++++++++------ app/config/specs/open-api3-latest-server.json | 618 ++++++++---- app/config/specs/swagger2-1.8.x-client.json | 84 +- app/config/specs/swagger2-1.8.x-console.json | 880 +++++++++++------ app/config/specs/swagger2-1.8.x-server.json | 604 +++++++----- app/config/specs/swagger2-latest-client.json | 86 +- app/config/specs/swagger2-latest-console.json | 900 +++++++++++------ app/config/specs/swagger2-latest-server.json | 618 ++++++++---- composer.json | 2 +- composer.lock | 18 +- .../SDK/Specification/Format/OpenAPI3.php | 11 +- .../SDK/Specification/Format/Swagger2.php | 11 +- 17 files changed, 4086 insertions(+), 2316 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30b017b573..76ca3e7ae2 100755 --- a/Dockerfile +++ b/Dockerfile @@ -38,10 +38,12 @@ COPY --from=composer /usr/local/src/vendor /usr/src/code/vendor COPY ./app /usr/src/code/app COPY ./public /usr/src/code/public COPY ./bin /usr/local/bin -COPY ./docs /usr/src/code/docs +#COPY ./docs /usr/src/code/docs COPY ./src /usr/src/code/src COPY ./dev /usr/src/code/dev +COPY ./vendor/appwrite/sdk-generator /usr/src/code/vendor/appwrite/sdk-generator + # Set Volumes RUN mkdir -p /storage/uploads && \ mkdir -p /storage/imports && \ 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 c077cbc94f..c07936d6e0 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -1856,7 +1856,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2066,7 +2065,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -4476,9 +4474,7 @@ { "name": "createDocument", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -4720,9 +4716,7 @@ { "name": "upsertDocument", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -4996,12 +4990,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "tags": [ - "tables" + "grids" ], "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { @@ -5023,7 +5017,7 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", + "demo": "grids\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, "rate-time": 3600, @@ -5084,9 +5078,9 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "tags": [ - "tables" + "grids" ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -5108,7 +5102,7 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", + "demo": "grids\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, "rate-time": 60, @@ -5124,9 +5118,7 @@ { "name": "createRow", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -5148,30 +5140,6 @@ } ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." } ], "auth": { @@ -5246,12 +5214,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -5273,7 +5241,7 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", + "demo": "grids\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, "rate-time": 3600, @@ -5344,9 +5312,9 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "tags": [ - "tables" + "grids" ], "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -5368,7 +5336,7 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", + "demo": "grids\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, "rate-time": 60, @@ -5384,9 +5352,7 @@ { "name": "upsertRow", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -5469,9 +5435,9 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -5493,7 +5459,7 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", + "demo": "grids\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, "rate-time": 60, @@ -5575,9 +5541,9 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -5592,7 +5558,7 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", + "demo": "grids\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, "rate-time": 60, @@ -5830,7 +5796,7 @@ "scheduledAt": { "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null + "x-example": "<SCHEDULED_AT>" } } } 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 22357e7b0b..7e398d78d6 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -1872,7 +1872,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2082,7 +2081,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -4558,6 +4556,38 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "list", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/databaseList" + } + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + }, + { + "name": "listDatabases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/databaseList" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4631,6 +4661,38 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "create", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n" + }, + { + "name": "createDatabase", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4710,6 +4772,38 @@ "console" ], "packaging": false, + "methods": [ + { + "name": "listUsage", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + }, + { + "name": "listDatabaseUsage", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabases" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4782,6 +4876,38 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "get", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + }, + { + "name": "getDatabase", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4841,6 +4967,38 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "update", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Update a database by its unique ID." + }, + { + "name": "updateDatabase", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4917,6 +5075,38 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "delete", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204, + "model": "#\/components\/schemas\/none" + } + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + }, + { + "name": "deleteDatabase", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204, + "model": "#\/components\/schemas\/none" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -8147,9 +8337,7 @@ { "name": "createDocument", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8175,8 +8363,7 @@ { "name": "createDocuments", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8313,8 +8500,7 @@ { "name": "upsertDocuments", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [], "required": [], @@ -8720,9 +8906,7 @@ { "name": "upsertDocument", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -9885,85 +10069,12 @@ ] } }, - "\/databases\/{databaseId}\/logs": { - "get": { - "summary": "List database logs", - "operationId": "databasesListLogs", - "tags": [ - "databases" - ], - "description": "Get the database activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 321, - "cookies": false, - "type": "", - "demo": "databases\/list-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "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" - } - ] - } - }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "tags": [ - "tables" + "grids" ], "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", "responses": { @@ -9980,12 +10091,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", + "demo": "grids\/list-tables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, "rate-time": 3600, @@ -10044,9 +10155,9 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "tags": [ - "tables" + "grids" ], "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -10063,12 +10174,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", + "demo": "grids\/create-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10145,12 +10256,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -10167,12 +10278,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", + "demo": "grids\/get-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10217,9 +10328,9 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -10236,12 +10347,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", + "demo": "grids\/update-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10323,9 +10434,9 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -10335,12 +10446,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", + "demo": "grids\/delete-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10384,12 +10495,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "tags": [ - "tables" + "grids" ], "description": "List attributes in the collection.", "responses": { @@ -10411,7 +10522,7 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", + "demo": "grids\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, "rate-time": 3600, @@ -10468,12 +10579,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -10495,7 +10606,7 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", + "demo": "grids\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10574,12 +10685,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10601,7 +10712,7 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", + "demo": "grids\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10685,12 +10796,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -10712,7 +10823,7 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", + "demo": "grids\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10791,12 +10902,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10818,7 +10929,7 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", + "demo": "grids\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10902,12 +11013,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10929,7 +11040,7 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", + "demo": "grids\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11008,12 +11119,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11035,7 +11146,7 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", + "demo": "grids\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11119,12 +11230,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -11146,7 +11257,7 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", + "demo": "grids\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11234,12 +11345,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11261,7 +11372,7 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", + "demo": "grids\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11354,12 +11465,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11381,7 +11492,7 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", + "demo": "grids\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11470,12 +11581,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11497,7 +11608,7 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", + "demo": "grids\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11591,12 +11702,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11618,7 +11729,7 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", + "demo": "grids\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11707,12 +11818,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11734,7 +11845,7 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", + "demo": "grids\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11828,12 +11939,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11855,7 +11966,7 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", + "demo": "grids\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11934,12 +12045,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11961,7 +12072,7 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", + "demo": "grids\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12045,12 +12156,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12072,7 +12183,7 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", + "demo": "grids\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12176,12 +12287,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -12203,7 +12314,7 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", + "demo": "grids\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12293,12 +12404,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12320,7 +12431,7 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", + "demo": "grids\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12409,12 +12520,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -12436,7 +12547,7 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", + "demo": "grids\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12515,12 +12626,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12542,7 +12653,7 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", + "demo": "grids\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12626,12 +12737,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -12684,7 +12795,7 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", + "demo": "grids\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12738,9 +12849,9 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -12755,7 +12866,7 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", + "demo": "grids\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12808,12 +12919,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12835,7 +12946,7 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", + "demo": "grids\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12916,12 +13027,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "tags": [ - "tables" + "grids" ], "description": "List indexes in the collection.", "responses": { @@ -12943,7 +13054,7 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", + "demo": "grids\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, @@ -13001,9 +13112,9 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "tags": [ - "tables" + "grids" ], "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { @@ -13025,7 +13136,7 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", + "demo": "grids\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, "rate-time": 3600, @@ -13126,12 +13237,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -13153,7 +13264,7 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", + "demo": "grids\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, "rate-time": 3600, @@ -13207,9 +13318,9 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -13224,7 +13335,7 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", + "demo": "grids\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, "rate-time": 3600, @@ -13277,12 +13388,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "tablesListLogs", + "operationId": "gridsListTableLogs", "tags": [ - "tables" + "grids" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13299,12 +13410,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLogs", - "group": "tables", + "method": "listTableLogs", + "group": "grids", "weight": 375, "cookies": false, "type": "", - "demo": "tables\/list-logs.md", + "demo": "grids\/list-table-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", "rate-limit": 0, "rate-time": 3600, @@ -13360,12 +13471,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "tags": [ - "tables" + "grids" ], "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { @@ -13387,7 +13498,7 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", + "demo": "grids\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, "rate-time": 3600, @@ -13448,9 +13559,9 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "tags": [ - "tables" + "grids" ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -13472,7 +13583,7 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", + "demo": "grids\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, "rate-time": 60, @@ -13488,9 +13599,7 @@ { "name": "createRow", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13516,8 +13625,7 @@ { "name": "createRows", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13611,9 +13719,9 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "tags": [ - "tables" + "grids" ], "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", "responses": { @@ -13635,7 +13743,7 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", + "demo": "grids\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, @@ -13650,8 +13758,7 @@ { "name": "upsertRows", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [], "required": [], @@ -13721,9 +13828,9 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "tags": [ - "tables" + "grids" ], "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", "responses": { @@ -13745,7 +13852,7 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", + "demo": "grids\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, "rate-time": 60, @@ -13815,9 +13922,9 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -13839,7 +13946,7 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", + "demo": "grids\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, "rate-time": 60, @@ -13903,12 +14010,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13930,7 +14037,7 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", + "demo": "grids\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, "rate-time": 3600, @@ -14001,9 +14108,9 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "tags": [ - "tables" + "grids" ], "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -14025,7 +14132,7 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", + "demo": "grids\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, "rate-time": 60, @@ -14041,9 +14148,7 @@ { "name": "upsertRow", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -14126,9 +14231,9 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -14150,7 +14255,7 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", + "demo": "grids\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, "rate-time": 60, @@ -14232,9 +14337,9 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -14249,7 +14354,7 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", + "demo": "grids\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, "rate-time": 60, @@ -14306,12 +14411,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { "get": { "summary": "List row logs", - "operationId": "tablesListRowLogs", + "operationId": "gridsListRowLogs", "tags": [ - "tables" + "grids" ], "description": "Get the row activity logs list by its unique ID.", "responses": { @@ -14333,7 +14438,7 @@ "weight": 413, "cookies": false, "type": "", - "demo": "tables\/list-row-logs.md", + "demo": "grids\/list-row-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", "rate-limit": 0, "rate-time": 3600, @@ -14399,12 +14504,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -14426,7 +14531,7 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", + "demo": "grids\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -14511,12 +14616,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -14538,7 +14643,7 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", + "demo": "grids\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -14623,12 +14728,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetUsage", + "operationId": "gridsGetTableUsage", "tags": [ - "tables" + "grids" ], "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { @@ -14645,12 +14750,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "getUsage", + "method": "getTableUsage", "group": null, "weight": 376, "cookies": false, "type": "", - "demo": "tables\/get-usage.md", + "demo": "grids\/get-table-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -14692,7 +14797,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "GridUsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -14715,6 +14820,111 @@ ] } }, + "\/databases\/{databaseId}\/logs": { + "get": { + "summary": "List database logs", + "operationId": "databasesListLogs", + "tags": [ + "databases" + ], + "description": "Get the database activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 321, + "cookies": false, + "type": "", + "demo": "databases\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "listLogs", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/logList" + } + ], + "description": "Get the database activity logs list by its unique ID." + }, + { + "name": "listDatabaseLogs", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/logList" + } + ], + "description": "" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "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" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", @@ -14752,6 +14962,38 @@ "console" ], "packaging": false, + "methods": [ + { + "name": "getDatabaseUsage", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabase" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + }, + { + "name": "getDatabaseUsage", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabase" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -16796,7 +17038,7 @@ "scheduledAt": { "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null + "x-example": "<SCHEDULED_AT>" } } } @@ -43572,9 +43814,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -43617,6 +43874,28 @@ }, "x-example": [], "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -43627,23 +43906,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -43689,27 +43952,18 @@ }, "x-example": [], "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { @@ -45856,6 +46110,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45868,6 +46127,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt" ] }, @@ -45900,6 +46160,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45917,6 +46182,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "framework" ] @@ -45950,6 +46216,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45967,6 +46238,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "runtime" ] 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 09572fe6b5..0fde42be4e 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -1879,7 +1879,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -1954,7 +1953,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -4076,6 +4074,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "list", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/databaseList" + } + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + }, + { + "name": "listDatabases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/databaseList" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4150,6 +4182,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "create", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n" + }, + { + "name": "createDatabase", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4230,6 +4296,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "get", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + }, + { + "name": "getDatabase", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4290,6 +4390,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "update", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Update a database by its unique ID." + }, + { + "name": "updateDatabase", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4367,6 +4501,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "delete", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204, + "model": "#\/components\/schemas\/none" + } + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + }, + { + "name": "deleteDatabase", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204, + "model": "#\/components\/schemas\/none" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -7628,9 +7796,8 @@ { "name": "createDocument", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -7656,7 +7823,7 @@ { "name": "createDocuments", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -7796,7 +7963,7 @@ { "name": "upsertDocuments", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [], @@ -8208,9 +8375,8 @@ { "name": "upsertDocument", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [], "required": [], @@ -9105,12 +9271,12 @@ ] } }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "tags": [ - "tables" + "grids" ], "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", "responses": { @@ -9127,12 +9293,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", + "demo": "grids\/list-tables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, "rate-time": 3600, @@ -9192,9 +9358,9 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "tags": [ - "tables" + "grids" ], "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -9211,12 +9377,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", + "demo": "grids\/create-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9294,12 +9460,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -9316,12 +9482,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", + "demo": "grids\/get-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9367,9 +9533,9 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -9386,12 +9552,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", + "demo": "grids\/update-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9474,9 +9640,9 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -9486,12 +9652,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", + "demo": "grids\/delete-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9536,12 +9702,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "tags": [ - "tables" + "grids" ], "description": "List attributes in the collection.", "responses": { @@ -9563,7 +9729,7 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", + "demo": "grids\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, "rate-time": 3600, @@ -9621,12 +9787,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -9648,7 +9814,7 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", + "demo": "grids\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -9728,12 +9894,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -9755,7 +9921,7 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", + "demo": "grids\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -9840,12 +10006,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -9867,7 +10033,7 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", + "demo": "grids\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -9947,12 +10113,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -9974,7 +10140,7 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", + "demo": "grids\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10059,12 +10225,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10086,7 +10252,7 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", + "demo": "grids\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10166,12 +10332,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10193,7 +10359,7 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", + "demo": "grids\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10278,12 +10444,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -10305,7 +10471,7 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", + "demo": "grids\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10394,12 +10560,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10421,7 +10587,7 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", + "demo": "grids\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10515,12 +10681,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10542,7 +10708,7 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", + "demo": "grids\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10632,12 +10798,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10659,7 +10825,7 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", + "demo": "grids\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10754,12 +10920,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10781,7 +10947,7 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", + "demo": "grids\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10871,12 +11037,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10898,7 +11064,7 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", + "demo": "grids\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10993,12 +11159,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11020,7 +11186,7 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", + "demo": "grids\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11100,12 +11266,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11127,7 +11293,7 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", + "demo": "grids\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11212,12 +11378,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -11239,7 +11405,7 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", + "demo": "grids\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11344,12 +11510,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -11371,7 +11537,7 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", + "demo": "grids\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11462,12 +11628,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11489,7 +11655,7 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", + "demo": "grids\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11579,12 +11745,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -11606,7 +11772,7 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", + "demo": "grids\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11686,12 +11852,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11713,7 +11879,7 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", + "demo": "grids\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11798,12 +11964,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -11856,7 +12022,7 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", + "demo": "grids\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11911,9 +12077,9 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -11928,7 +12094,7 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", + "demo": "grids\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11982,12 +12148,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12009,7 +12175,7 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", + "demo": "grids\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12091,12 +12257,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "tags": [ - "tables" + "grids" ], "description": "List indexes in the collection.", "responses": { @@ -12118,7 +12284,7 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", + "demo": "grids\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, @@ -12177,9 +12343,9 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "tags": [ - "tables" + "grids" ], "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { @@ -12201,7 +12367,7 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", + "demo": "grids\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, "rate-time": 3600, @@ -12303,12 +12469,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -12330,7 +12496,7 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", + "demo": "grids\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, "rate-time": 3600, @@ -12385,9 +12551,9 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -12402,7 +12568,7 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", + "demo": "grids\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, "rate-time": 3600, @@ -12456,12 +12622,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "tags": [ - "tables" + "grids" ], "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { @@ -12483,7 +12649,7 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", + "demo": "grids\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, "rate-time": 3600, @@ -12546,9 +12712,9 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "tags": [ - "tables" + "grids" ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -12570,7 +12736,7 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", + "demo": "grids\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, "rate-time": 60, @@ -12586,9 +12752,8 @@ { "name": "createRow", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -12614,7 +12779,7 @@ { "name": "createRows", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -12711,9 +12876,9 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "tags": [ - "tables" + "grids" ], "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", "responses": { @@ -12735,7 +12900,7 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", + "demo": "grids\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, @@ -12750,7 +12915,7 @@ { "name": "upsertRows", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [], @@ -12822,9 +12987,9 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "tags": [ - "tables" + "grids" ], "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", "responses": { @@ -12846,7 +13011,7 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", + "demo": "grids\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, "rate-time": 60, @@ -12917,9 +13082,9 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -12941,7 +13106,7 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", + "demo": "grids\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, "rate-time": 60, @@ -13006,12 +13171,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13033,7 +13198,7 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", + "demo": "grids\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, "rate-time": 3600, @@ -13106,9 +13271,9 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "tags": [ - "tables" + "grids" ], "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -13130,7 +13295,7 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", + "demo": "grids\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, "rate-time": 60, @@ -13146,9 +13311,8 @@ { "name": "upsertRow", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [], "required": [], @@ -13233,9 +13397,9 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -13257,7 +13421,7 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", + "demo": "grids\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, "rate-time": 60, @@ -13341,9 +13505,9 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -13358,7 +13522,7 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", + "demo": "grids\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, "rate-time": 60, @@ -13417,12 +13581,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -13444,7 +13608,7 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", + "demo": "grids\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -13530,12 +13694,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -13557,7 +13721,7 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", + "demo": "grids\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -15431,7 +15595,7 @@ "scheduledAt": { "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null + "x-example": "<SCHEDULED_AT>" } } } @@ -33199,9 +33363,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -33244,6 +33423,28 @@ }, "x-example": [], "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -33254,23 +33455,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -33316,27 +33501,18 @@ }, "x-example": [], "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index e8efee6516..556775e236 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4473,10 +4473,9 @@ "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -4717,10 +4716,9 @@ "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -4994,12 +4992,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "tags": [ - "tables" + "grids" ], "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { @@ -5021,7 +5019,7 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", + "demo": "grids\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, "rate-time": 3600, @@ -5082,9 +5080,9 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "tags": [ - "tables" + "grids" ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -5106,7 +5104,7 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", + "demo": "grids\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, "rate-time": 60, @@ -5121,10 +5119,9 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -5146,30 +5143,6 @@ } ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." } ], "auth": { @@ -5244,12 +5217,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -5271,7 +5244,7 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", + "demo": "grids\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, "rate-time": 3600, @@ -5342,9 +5315,9 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "tags": [ - "tables" + "grids" ], "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -5366,7 +5339,7 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", + "demo": "grids\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, "rate-time": 60, @@ -5381,10 +5354,9 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -5467,9 +5439,9 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -5491,7 +5463,7 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", + "demo": "grids\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, "rate-time": 60, @@ -5573,9 +5545,9 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -5590,7 +5562,7 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", + "demo": "grids\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, "rate-time": 60, @@ -5828,7 +5800,7 @@ "scheduledAt": { "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null + "x-example": "<SCHEDULED_AT>" } } } diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index b1c864453b..85fa04f2cb 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4556,6 +4556,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "list", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/databaseList" + } + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + }, + { + "name": "listDatabases", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/databaseList" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4629,6 +4663,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "create", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n" + }, + { + "name": "createDatabase", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4708,6 +4776,40 @@ "console" ], "packaging": false, + "methods": [ + { + "name": "listUsage", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + }, + { + "name": "listDatabaseUsage", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabases" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4780,6 +4882,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "get", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + }, + { + "name": "getDatabase", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4839,6 +4975,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "update", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Update a database by its unique ID." + }, + { + "name": "updateDatabase", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4915,6 +5085,38 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + }, + { + "name": "deleteDatabase", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204 + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -8144,10 +8346,9 @@ "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8172,9 +8373,9 @@ }, { "name": "createDocuments", + "namespace": "databases", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8310,9 +8511,9 @@ "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [], "required": [], @@ -8717,10 +8918,9 @@ "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -9883,85 +10083,12 @@ ] } }, - "\/databases\/{databaseId}\/logs": { - "get": { - "summary": "List database logs", - "operationId": "databasesListLogs", - "tags": [ - "databases" - ], - "description": "Get the database activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/logList" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 321, - "cookies": false, - "type": "", - "demo": "databases\/list-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "<DATABASE_ID>" - }, - "in": "path" - }, - { - "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" - } - ] - } - }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "tags": [ - "tables" + "grids" ], "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", "responses": { @@ -9978,12 +10105,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", + "demo": "grids\/list-tables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, "rate-time": 3600, @@ -10042,9 +10169,9 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "tags": [ - "tables" + "grids" ], "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -10061,12 +10188,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", + "demo": "grids\/create-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10143,12 +10270,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -10165,12 +10292,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", + "demo": "grids\/get-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10215,9 +10342,9 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -10234,12 +10361,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", + "demo": "grids\/update-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10321,9 +10448,9 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -10333,12 +10460,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", + "demo": "grids\/delete-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10382,12 +10509,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "tags": [ - "tables" + "grids" ], "description": "List attributes in the collection.", "responses": { @@ -10409,7 +10536,7 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", + "demo": "grids\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, "rate-time": 3600, @@ -10466,12 +10593,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -10493,7 +10620,7 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", + "demo": "grids\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10572,12 +10699,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10599,7 +10726,7 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", + "demo": "grids\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10683,12 +10810,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -10710,7 +10837,7 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", + "demo": "grids\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10789,12 +10916,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10816,7 +10943,7 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", + "demo": "grids\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10900,12 +11027,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10927,7 +11054,7 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", + "demo": "grids\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11006,12 +11133,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11033,7 +11160,7 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", + "demo": "grids\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11117,12 +11244,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -11144,7 +11271,7 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", + "demo": "grids\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11232,12 +11359,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11259,7 +11386,7 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", + "demo": "grids\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11352,12 +11479,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11379,7 +11506,7 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", + "demo": "grids\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11468,12 +11595,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11495,7 +11622,7 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", + "demo": "grids\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11589,12 +11716,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11616,7 +11743,7 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", + "demo": "grids\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11705,12 +11832,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11732,7 +11859,7 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", + "demo": "grids\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11826,12 +11953,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11853,7 +11980,7 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", + "demo": "grids\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11932,12 +12059,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11959,7 +12086,7 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", + "demo": "grids\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12043,12 +12170,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12070,7 +12197,7 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", + "demo": "grids\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12174,12 +12301,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -12201,7 +12328,7 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", + "demo": "grids\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12291,12 +12418,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12318,7 +12445,7 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", + "demo": "grids\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12407,12 +12534,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -12434,7 +12561,7 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", + "demo": "grids\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12513,12 +12640,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12540,7 +12667,7 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", + "demo": "grids\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12624,12 +12751,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -12682,7 +12809,7 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", + "demo": "grids\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12736,9 +12863,9 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -12753,7 +12880,7 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", + "demo": "grids\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12806,12 +12933,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12833,7 +12960,7 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", + "demo": "grids\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12914,12 +13041,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "tags": [ - "tables" + "grids" ], "description": "List indexes in the collection.", "responses": { @@ -12941,7 +13068,7 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", + "demo": "grids\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, @@ -12999,9 +13126,9 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "tags": [ - "tables" + "grids" ], "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { @@ -13023,7 +13150,7 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", + "demo": "grids\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, "rate-time": 3600, @@ -13124,12 +13251,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -13151,7 +13278,7 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", + "demo": "grids\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, "rate-time": 3600, @@ -13205,9 +13332,9 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -13222,7 +13349,7 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", + "demo": "grids\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, "rate-time": 3600, @@ -13275,12 +13402,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "tablesListLogs", + "operationId": "gridsListTableLogs", "tags": [ - "tables" + "grids" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13297,12 +13424,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLogs", - "group": "tables", + "method": "listTableLogs", + "group": "grids", "weight": 375, "cookies": false, "type": "", - "demo": "tables\/list-logs.md", + "demo": "grids\/list-table-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", "rate-limit": 0, "rate-time": 3600, @@ -13358,12 +13485,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "tags": [ - "tables" + "grids" ], "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { @@ -13385,7 +13512,7 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", + "demo": "grids\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, "rate-time": 3600, @@ -13446,9 +13573,9 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "tags": [ - "tables" + "grids" ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -13470,7 +13597,7 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", + "demo": "grids\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, "rate-time": 60, @@ -13485,10 +13612,9 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13513,9 +13639,9 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13609,9 +13735,9 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "tags": [ - "tables" + "grids" ], "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", "responses": { @@ -13633,7 +13759,7 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", + "demo": "grids\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, @@ -13647,9 +13773,9 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [], "required": [], @@ -13719,9 +13845,9 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "tags": [ - "tables" + "grids" ], "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", "responses": { @@ -13743,7 +13869,7 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", + "demo": "grids\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, "rate-time": 60, @@ -13813,9 +13939,9 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -13837,7 +13963,7 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", + "demo": "grids\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, "rate-time": 60, @@ -13901,12 +14027,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13928,7 +14054,7 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", + "demo": "grids\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, "rate-time": 3600, @@ -13999,9 +14125,9 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "tags": [ - "tables" + "grids" ], "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -14023,7 +14149,7 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", + "demo": "grids\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, "rate-time": 60, @@ -14038,10 +14164,9 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -14124,9 +14249,9 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -14148,7 +14273,7 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", + "demo": "grids\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, "rate-time": 60, @@ -14230,9 +14355,9 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -14247,7 +14372,7 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", + "demo": "grids\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, "rate-time": 60, @@ -14304,12 +14429,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { "get": { "summary": "List row logs", - "operationId": "tablesListRowLogs", + "operationId": "gridsListRowLogs", "tags": [ - "tables" + "grids" ], "description": "Get the row activity logs list by its unique ID.", "responses": { @@ -14331,7 +14456,7 @@ "weight": 413, "cookies": false, "type": "", - "demo": "tables\/list-row-logs.md", + "demo": "grids\/list-row-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", "rate-limit": 0, "rate-time": 3600, @@ -14397,12 +14522,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -14424,7 +14549,7 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", + "demo": "grids\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -14509,12 +14634,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -14536,7 +14661,7 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", + "demo": "grids\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -14621,12 +14746,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetUsage", + "operationId": "gridsGetTableUsage", "tags": [ - "tables" + "grids" ], "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { @@ -14643,12 +14768,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "getUsage", + "method": "getTableUsage", "group": null, "weight": 376, "cookies": false, "type": "", - "demo": "tables\/get-usage.md", + "demo": "grids\/get-table-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -14690,7 +14815,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "GridUsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -14713,6 +14838,113 @@ ] } }, + "\/databases\/{databaseId}\/logs": { + "get": { + "summary": "List database logs", + "operationId": "databasesListLogs", + "tags": [ + "databases" + ], + "description": "Get the database activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/logList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 321, + "cookies": false, + "type": "", + "demo": "databases\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "listLogs", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/logList" + } + ], + "description": "Get the database activity logs list by its unique ID." + }, + { + "name": "listDatabaseLogs", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/logList" + } + ], + "description": "" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "<DATABASE_ID>" + }, + "in": "path" + }, + { + "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" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", @@ -14750,6 +14982,40 @@ "console" ], "packaging": false, + "methods": [ + { + "name": "getDatabaseUsage", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabase" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + }, + { + "name": "getDatabaseUsage", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/usageDatabase" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -16794,7 +17060,7 @@ "scheduledAt": { "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null + "x-example": "<SCHEDULED_AT>" } } } @@ -43570,9 +43836,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -43615,6 +43896,28 @@ }, "x-example": [], "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -43625,23 +43928,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -43687,27 +43974,18 @@ }, "x-example": [], "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { @@ -45854,6 +46132,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45866,6 +46149,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt" ] }, @@ -45898,6 +46182,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45915,6 +46204,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "framework" ] @@ -45948,6 +46238,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45965,6 +46260,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "runtime" ] diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 93336cf5ff..551c765683 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -4074,6 +4074,42 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "list", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/databaseList" + } + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + }, + { + "name": "listDatabases", + "namespace": "grids", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/databaseList" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4148,6 +4184,42 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "create", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Create a new Database.\n" + }, + { + "name": "createDatabase", + "namespace": "grids", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4228,6 +4300,42 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "get", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + }, + { + "name": "getDatabase", + "namespace": "grids", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4288,6 +4396,42 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "update", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "Update a database by its unique ID." + }, + { + "name": "updateDatabase", + "namespace": "grids", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/components\/schemas\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4365,6 +4509,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + }, + { + "name": "deleteDatabase", + "namespace": "grids", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204 + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -7625,10 +7803,10 @@ "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -7653,8 +7831,9 @@ }, { "name": "createDocuments", + "namespace": "databases", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -7793,8 +7972,9 @@ "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [], @@ -8205,10 +8385,10 @@ "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [], "required": [], @@ -9103,12 +9283,12 @@ ] } }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "tags": [ - "tables" + "grids" ], "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", "responses": { @@ -9125,12 +9305,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", + "demo": "grids\/list-tables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, "rate-time": 3600, @@ -9190,9 +9370,9 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "tags": [ - "tables" + "grids" ], "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -9209,12 +9389,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", + "demo": "grids\/create-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9292,12 +9472,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -9314,12 +9494,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", + "demo": "grids\/get-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9365,9 +9545,9 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -9384,12 +9564,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", + "demo": "grids\/update-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9472,9 +9652,9 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -9484,12 +9664,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", + "demo": "grids\/delete-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9534,12 +9714,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "tags": [ - "tables" + "grids" ], "description": "List attributes in the collection.", "responses": { @@ -9561,7 +9741,7 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", + "demo": "grids\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, "rate-time": 3600, @@ -9619,12 +9799,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -9646,7 +9826,7 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", + "demo": "grids\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -9726,12 +9906,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -9753,7 +9933,7 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", + "demo": "grids\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -9838,12 +10018,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -9865,7 +10045,7 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", + "demo": "grids\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -9945,12 +10125,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -9972,7 +10152,7 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", + "demo": "grids\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10057,12 +10237,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10084,7 +10264,7 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", + "demo": "grids\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10164,12 +10344,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10191,7 +10371,7 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", + "demo": "grids\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10276,12 +10456,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -10303,7 +10483,7 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", + "demo": "grids\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10392,12 +10572,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10419,7 +10599,7 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", + "demo": "grids\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10513,12 +10693,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10540,7 +10720,7 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", + "demo": "grids\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10630,12 +10810,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10657,7 +10837,7 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", + "demo": "grids\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10752,12 +10932,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10779,7 +10959,7 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", + "demo": "grids\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10869,12 +11049,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10896,7 +11076,7 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", + "demo": "grids\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10991,12 +11171,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11018,7 +11198,7 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", + "demo": "grids\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11098,12 +11278,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11125,7 +11305,7 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", + "demo": "grids\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11210,12 +11390,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -11237,7 +11417,7 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", + "demo": "grids\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11342,12 +11522,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -11369,7 +11549,7 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", + "demo": "grids\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11460,12 +11640,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11487,7 +11667,7 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", + "demo": "grids\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11577,12 +11757,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -11604,7 +11784,7 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", + "demo": "grids\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11684,12 +11864,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11711,7 +11891,7 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", + "demo": "grids\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11796,12 +11976,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -11854,7 +12034,7 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", + "demo": "grids\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11909,9 +12089,9 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -11926,7 +12106,7 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", + "demo": "grids\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11980,12 +12160,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12007,7 +12187,7 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", + "demo": "grids\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12089,12 +12269,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "tags": [ - "tables" + "grids" ], "description": "List indexes in the collection.", "responses": { @@ -12116,7 +12296,7 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", + "demo": "grids\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, @@ -12175,9 +12355,9 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "tags": [ - "tables" + "grids" ], "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { @@ -12199,7 +12379,7 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", + "demo": "grids\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, "rate-time": 3600, @@ -12301,12 +12481,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -12328,7 +12508,7 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", + "demo": "grids\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, "rate-time": 3600, @@ -12383,9 +12563,9 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -12400,7 +12580,7 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", + "demo": "grids\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, "rate-time": 3600, @@ -12454,12 +12634,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "tags": [ - "tables" + "grids" ], "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { @@ -12481,7 +12661,7 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", + "demo": "grids\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, "rate-time": 3600, @@ -12544,9 +12724,9 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "tags": [ - "tables" + "grids" ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -12568,7 +12748,7 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", + "demo": "grids\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, "rate-time": 60, @@ -12583,10 +12763,10 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -12611,8 +12791,9 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -12709,9 +12890,9 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "tags": [ - "tables" + "grids" ], "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", "responses": { @@ -12733,7 +12914,7 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", + "demo": "grids\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, @@ -12747,8 +12928,9 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [], @@ -12820,9 +13002,9 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "tags": [ - "tables" + "grids" ], "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", "responses": { @@ -12844,7 +13026,7 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", + "demo": "grids\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, "rate-time": 60, @@ -12915,9 +13097,9 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -12939,7 +13121,7 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", + "demo": "grids\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, "rate-time": 60, @@ -13004,12 +13186,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13031,7 +13213,7 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", + "demo": "grids\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, "rate-time": 3600, @@ -13104,9 +13286,9 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "tags": [ - "tables" + "grids" ], "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -13128,7 +13310,7 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", + "demo": "grids\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, "rate-time": 60, @@ -13143,10 +13325,10 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [], "required": [], @@ -13231,9 +13413,9 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -13255,7 +13437,7 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", + "demo": "grids\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, "rate-time": 60, @@ -13339,9 +13521,9 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -13356,7 +13538,7 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", + "demo": "grids\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, "rate-time": 60, @@ -13415,12 +13597,12 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -13442,7 +13624,7 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", + "demo": "grids\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -13528,12 +13710,12 @@ } } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -13555,7 +13737,7 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", + "demo": "grids\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -15429,7 +15611,7 @@ "scheduledAt": { "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", - "x-example": null + "x-example": "<SCHEDULED_AT>" } } } @@ -33197,9 +33379,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -33242,6 +33439,28 @@ }, "x-example": [], "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -33252,23 +33471,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -33314,27 +33517,18 @@ }, "x-example": [], "nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index f2b814e9b6..8572eaaa7f 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -1964,7 +1964,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2175,7 +2174,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -4613,9 +4611,7 @@ { "name": "createDocument", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -4848,9 +4844,7 @@ { "name": "upsertDocument", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -5110,16 +5104,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { @@ -5137,7 +5131,7 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", + "demo": "grids\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, "rate-time": 3600, @@ -5192,7 +5186,7 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "consumes": [ "application\/json" ], @@ -5200,7 +5194,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -5218,7 +5212,7 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", + "demo": "grids\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, "rate-time": 60, @@ -5233,9 +5227,7 @@ { "name": "createRow", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -5257,30 +5249,6 @@ } ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." } ], "auth": { @@ -5353,16 +5321,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -5380,7 +5348,7 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", + "demo": "grids\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, "rate-time": 3600, @@ -5443,7 +5411,7 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "consumes": [ "application\/json" ], @@ -5451,7 +5419,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -5469,7 +5437,7 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", + "demo": "grids\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, "rate-time": 60, @@ -5484,9 +5452,7 @@ { "name": "upsertRow", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -5563,7 +5529,7 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "consumes": [ "application\/json" ], @@ -5571,7 +5537,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -5589,7 +5555,7 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", + "demo": "grids\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, "rate-time": 60, @@ -5664,13 +5630,13 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -5685,7 +5651,7 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", + "demo": "grids\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, "rate-time": 60, @@ -5916,7 +5882,7 @@ "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", "default": null, - "x-example": null + "x-example": "<SCHEDULED_AT>" } } } diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 94fff6695c..ecf5fcc4a1 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -1990,7 +1990,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2201,7 +2200,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -4718,6 +4716,38 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "list", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/databaseList" + } + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + }, + { + "name": "listDatabases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/databaseList" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4790,6 +4820,38 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "create", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "Create a new Database.\n" + }, + { + "name": "createDatabase", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4872,6 +4934,38 @@ "console" ], "packaging": false, + "methods": [ + { + "name": "listUsage", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + }, + { + "name": "listDatabaseUsage", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabases" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4942,6 +5036,38 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "get", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + }, + { + "name": "getDatabase", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -5001,6 +5127,38 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "update", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Update a database by its unique ID." + }, + { + "name": "updateDatabase", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -5079,6 +5237,38 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "delete", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204, + "model": "#\/definitions\/none" + } + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + }, + { + "name": "deleteDatabase", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204, + "model": "#\/definitions\/none" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -8267,9 +8457,7 @@ { "name": "createDocument", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8295,8 +8483,7 @@ { "name": "createDocuments", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8433,8 +8620,7 @@ { "name": "upsertDocuments", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [], "required": [], @@ -8823,9 +9009,7 @@ { "name": "upsertDocument", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -9932,86 +10116,16 @@ ] } }, - "\/databases\/{databaseId}\/logs": { - "get": { - "summary": "List database logs", - "operationId": "databasesListLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get the database activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 321, - "cookies": false, - "type": "", - "demo": "databases\/list-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "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" - } - ] - } - }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", "responses": { @@ -10024,12 +10138,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", + "demo": "grids\/list-tables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, "rate-time": 3600, @@ -10083,7 +10197,7 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "consumes": [ "application\/json" ], @@ -10091,7 +10205,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -10104,12 +10218,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", + "demo": "grids\/create-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10187,16 +10301,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -10209,12 +10323,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", + "demo": "grids\/get-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10255,7 +10369,7 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "consumes": [ "application\/json" ], @@ -10263,7 +10377,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -10276,12 +10390,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", + "demo": "grids\/update-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10361,13 +10475,13 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -10377,12 +10491,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", + "demo": "grids\/delete-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10422,16 +10536,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "List attributes in the collection.", "responses": { @@ -10449,7 +10563,7 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", + "demo": "grids\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, "rate-time": 3600, @@ -10501,10 +10615,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "consumes": [ "application\/json" ], @@ -10512,7 +10626,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -10530,7 +10644,7 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", + "demo": "grids\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10607,10 +10721,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "consumes": [ "application\/json" ], @@ -10618,7 +10732,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10636,7 +10750,7 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", + "demo": "grids\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10715,10 +10829,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "consumes": [ "application\/json" ], @@ -10726,7 +10840,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -10744,7 +10858,7 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", + "demo": "grids\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10821,10 +10935,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "consumes": [ "application\/json" ], @@ -10832,7 +10946,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10850,7 +10964,7 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", + "demo": "grids\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10929,10 +11043,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "consumes": [ "application\/json" ], @@ -10940,7 +11054,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10958,7 +11072,7 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", + "demo": "grids\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11035,10 +11149,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "consumes": [ "application\/json" ], @@ -11046,7 +11160,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11064,7 +11178,7 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", + "demo": "grids\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11143,10 +11257,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "consumes": [ "application\/json" ], @@ -11154,7 +11268,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -11172,7 +11286,7 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", + "demo": "grids\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11259,10 +11373,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "consumes": [ "application\/json" ], @@ -11270,7 +11384,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11288,7 +11402,7 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", + "demo": "grids\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11377,10 +11491,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "consumes": [ "application\/json" ], @@ -11388,7 +11502,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11406,7 +11520,7 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", + "demo": "grids\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11495,10 +11609,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "consumes": [ "application\/json" ], @@ -11506,7 +11620,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11524,7 +11638,7 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", + "demo": "grids\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11615,10 +11729,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "consumes": [ "application\/json" ], @@ -11626,7 +11740,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11644,7 +11758,7 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", + "demo": "grids\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11733,10 +11847,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "consumes": [ "application\/json" ], @@ -11744,7 +11858,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11762,7 +11876,7 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", + "demo": "grids\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11853,10 +11967,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "consumes": [ "application\/json" ], @@ -11864,7 +11978,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11882,7 +11996,7 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", + "demo": "grids\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11959,10 +12073,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "consumes": [ "application\/json" ], @@ -11970,7 +12084,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11988,7 +12102,7 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", + "demo": "grids\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12067,10 +12181,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "consumes": [ "application\/json" ], @@ -12078,7 +12192,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12096,7 +12210,7 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", + "demo": "grids\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12200,10 +12314,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "consumes": [ "application\/json" ], @@ -12211,7 +12325,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -12229,7 +12343,7 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", + "demo": "grids\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12319,10 +12433,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "consumes": [ "application\/json" ], @@ -12330,7 +12444,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12348,7 +12462,7 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", + "demo": "grids\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12433,10 +12547,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "consumes": [ "application\/json" ], @@ -12444,7 +12558,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -12462,7 +12576,7 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", + "demo": "grids\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12539,10 +12653,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "consumes": [ "application\/json" ], @@ -12550,7 +12664,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12568,7 +12682,7 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", + "demo": "grids\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12647,16 +12761,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -12705,7 +12819,7 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", + "demo": "grids\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12753,13 +12867,13 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -12774,7 +12888,7 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", + "demo": "grids\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12821,10 +12935,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "consumes": [ "application\/json" ], @@ -12832,7 +12946,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12850,7 +12964,7 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", + "demo": "grids\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12925,16 +13039,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "List indexes in the collection.", "responses": { @@ -12952,7 +13066,7 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", + "demo": "grids\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, @@ -13005,7 +13119,7 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "consumes": [ "application\/json" ], @@ -13013,7 +13127,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { @@ -13031,7 +13145,7 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", + "demo": "grids\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, "rate-time": 3600, @@ -13131,16 +13245,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -13158,7 +13272,7 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", + "demo": "grids\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, "rate-time": 3600, @@ -13206,13 +13320,13 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -13227,7 +13341,7 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", + "demo": "grids\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, "rate-time": 3600, @@ -13274,16 +13388,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "tablesListLogs", + "operationId": "gridsListTableLogs", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13296,12 +13410,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLogs", - "group": "tables", + "method": "listTableLogs", + "group": "grids", "weight": 375, "cookies": false, "type": "", - "demo": "tables\/list-logs.md", + "demo": "grids\/list-table-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", "rate-limit": 0, "rate-time": 3600, @@ -13352,16 +13466,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { @@ -13379,7 +13493,7 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", + "demo": "grids\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, "rate-time": 3600, @@ -13434,7 +13548,7 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "consumes": [ "application\/json" ], @@ -13442,7 +13556,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -13460,7 +13574,7 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", + "demo": "grids\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, "rate-time": 60, @@ -13475,9 +13589,7 @@ { "name": "createRow", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13503,8 +13615,7 @@ { "name": "createRows", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13596,7 +13707,7 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "consumes": [ "application\/json" ], @@ -13604,7 +13715,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", "responses": { @@ -13622,7 +13733,7 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", + "demo": "grids\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, @@ -13637,8 +13748,7 @@ { "name": "upsertRows", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [], "required": [], @@ -13703,7 +13813,7 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "consumes": [ "application\/json" ], @@ -13711,7 +13821,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", "responses": { @@ -13729,7 +13839,7 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", + "demo": "grids\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, "rate-time": 60, @@ -13795,7 +13905,7 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "consumes": [ "application\/json" ], @@ -13803,7 +13913,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -13821,7 +13931,7 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", + "demo": "grids\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, "rate-time": 60, @@ -13880,16 +13990,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13907,7 +14017,7 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", + "demo": "grids\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, "rate-time": 3600, @@ -13970,7 +14080,7 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "consumes": [ "application\/json" ], @@ -13978,7 +14088,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -13996,7 +14106,7 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", + "demo": "grids\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, "rate-time": 60, @@ -14011,9 +14121,7 @@ { "name": "upsertRow", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -14090,7 +14198,7 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "consumes": [ "application\/json" ], @@ -14098,7 +14206,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -14116,7 +14224,7 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", + "demo": "grids\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, "rate-time": 60, @@ -14191,13 +14299,13 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -14212,7 +14320,7 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", + "demo": "grids\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, "rate-time": 60, @@ -14262,16 +14370,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { "get": { "summary": "List row logs", - "operationId": "tablesListRowLogs", + "operationId": "gridsListRowLogs", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get the row activity logs list by its unique ID.", "responses": { @@ -14289,7 +14397,7 @@ "weight": 413, "cookies": false, "type": "", - "demo": "tables\/list-row-logs.md", + "demo": "grids\/list-row-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", "rate-limit": 0, "rate-time": 3600, @@ -14348,10 +14456,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "consumes": [ "application\/json" ], @@ -14359,7 +14467,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -14377,7 +14485,7 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", + "demo": "grids\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -14454,10 +14562,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "consumes": [ "application\/json" ], @@ -14465,7 +14573,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -14483,7 +14591,7 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", + "demo": "grids\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -14560,16 +14668,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetUsage", + "operationId": "gridsGetTableUsage", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { @@ -14582,12 +14690,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "getUsage", + "method": "getTableUsage", "group": null, "weight": 376, "cookies": false, "type": "", - "demo": "tables\/get-usage.md", + "demo": "grids\/get-table-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -14626,7 +14734,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "GridUsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -14646,6 +14754,108 @@ ] } }, + "\/databases\/{databaseId}\/logs": { + "get": { + "summary": "List database logs", + "operationId": "databasesListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get the database activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 321, + "cookies": false, + "type": "", + "demo": "databases\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "listLogs", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/logList" + } + ], + "description": "Get the database activity logs list by its unique ID." + }, + { + "name": "listDatabaseLogs", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/logList" + } + ], + "description": "" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "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" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", @@ -14683,6 +14893,38 @@ "console" ], "packaging": false, + "methods": [ + { + "name": "getDatabaseUsage", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabase" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + }, + { + "name": "getDatabaseUsage", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabase" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -16733,7 +16975,7 @@ "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", "default": null, - "x-example": null + "x-example": "<SCHEDULED_AT>" } } } @@ -43631,9 +43873,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -43676,6 +43933,28 @@ }, "x-example": [], "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -43686,23 +43965,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -43748,27 +44011,18 @@ }, "x-example": [], "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { @@ -45924,6 +46178,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45936,6 +46195,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt" ] }, @@ -45968,6 +46228,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45985,6 +46250,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "framework" ] @@ -46018,6 +46284,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -46035,6 +46306,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "runtime" ] diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index cb96855956..7912caab25 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -1996,7 +1996,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -2075,7 +2074,6 @@ "client" ], "packaging": false, - "deprecated": true, "auth": { "Project": [] } @@ -4224,6 +4222,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "list", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/databaseList" + } + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + }, + { + "name": "listDatabases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/databaseList" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4297,6 +4329,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "create", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "Create a new Database.\n" + }, + { + "name": "createDatabase", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4380,6 +4446,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "get", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + }, + { + "name": "getDatabase", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4440,6 +4540,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "update", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Update a database by its unique ID." + }, + { + "name": "updateDatabase", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4519,6 +4653,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "delete", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204, + "model": "#\/definitions\/none" + } + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + }, + { + "name": "deleteDatabase", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204, + "model": "#\/definitions\/none" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -7738,9 +7906,8 @@ { "name": "createDocument", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -7766,7 +7933,7 @@ { "name": "createDocuments", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -7906,7 +8073,7 @@ { "name": "upsertDocuments", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [], @@ -8301,9 +8468,8 @@ { "name": "upsertDocument", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [], "required": [], @@ -9160,16 +9326,16 @@ ] } }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", "responses": { @@ -9182,12 +9348,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", + "demo": "grids\/list-tables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, "rate-time": 3600, @@ -9242,7 +9408,7 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "consumes": [ "application\/json" ], @@ -9250,7 +9416,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -9263,12 +9429,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", + "demo": "grids\/create-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9347,16 +9513,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -9369,12 +9535,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", + "demo": "grids\/get-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9416,7 +9582,7 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "consumes": [ "application\/json" ], @@ -9424,7 +9590,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -9437,12 +9603,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", + "demo": "grids\/update-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9523,13 +9689,13 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -9539,12 +9705,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", + "demo": "grids\/delete-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9585,16 +9751,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "List attributes in the collection.", "responses": { @@ -9612,7 +9778,7 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", + "demo": "grids\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, "rate-time": 3600, @@ -9665,10 +9831,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "consumes": [ "application\/json" ], @@ -9676,7 +9842,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -9694,7 +9860,7 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", + "demo": "grids\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -9772,10 +9938,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "consumes": [ "application\/json" ], @@ -9783,7 +9949,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -9801,7 +9967,7 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", + "demo": "grids\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -9881,10 +10047,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "consumes": [ "application\/json" ], @@ -9892,7 +10058,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -9910,7 +10076,7 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", + "demo": "grids\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -9988,10 +10154,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "consumes": [ "application\/json" ], @@ -9999,7 +10165,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10017,7 +10183,7 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", + "demo": "grids\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10097,10 +10263,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "consumes": [ "application\/json" ], @@ -10108,7 +10274,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10126,7 +10292,7 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", + "demo": "grids\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10204,10 +10370,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "consumes": [ "application\/json" ], @@ -10215,7 +10381,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10233,7 +10399,7 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", + "demo": "grids\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10313,10 +10479,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "consumes": [ "application\/json" ], @@ -10324,7 +10490,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -10342,7 +10508,7 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", + "demo": "grids\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10430,10 +10596,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "consumes": [ "application\/json" ], @@ -10441,7 +10607,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10459,7 +10625,7 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", + "demo": "grids\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10549,10 +10715,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "consumes": [ "application\/json" ], @@ -10560,7 +10726,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10578,7 +10744,7 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", + "demo": "grids\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10668,10 +10834,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "consumes": [ "application\/json" ], @@ -10679,7 +10845,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10697,7 +10863,7 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", + "demo": "grids\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10789,10 +10955,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "consumes": [ "application\/json" ], @@ -10800,7 +10966,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10818,7 +10984,7 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", + "demo": "grids\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10908,10 +11074,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "consumes": [ "application\/json" ], @@ -10919,7 +11085,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10937,7 +11103,7 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", + "demo": "grids\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11029,10 +11195,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "consumes": [ "application\/json" ], @@ -11040,7 +11206,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11058,7 +11224,7 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", + "demo": "grids\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11136,10 +11302,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "consumes": [ "application\/json" ], @@ -11147,7 +11313,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11165,7 +11331,7 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", + "demo": "grids\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11245,10 +11411,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "consumes": [ "application\/json" ], @@ -11256,7 +11422,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -11274,7 +11440,7 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", + "demo": "grids\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11379,10 +11545,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "consumes": [ "application\/json" ], @@ -11390,7 +11556,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -11408,7 +11574,7 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", + "demo": "grids\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11499,10 +11665,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "consumes": [ "application\/json" ], @@ -11510,7 +11676,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11528,7 +11694,7 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", + "demo": "grids\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11614,10 +11780,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "consumes": [ "application\/json" ], @@ -11625,7 +11791,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -11643,7 +11809,7 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", + "demo": "grids\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11721,10 +11887,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "consumes": [ "application\/json" ], @@ -11732,7 +11898,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11750,7 +11916,7 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", + "demo": "grids\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11830,16 +11996,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -11888,7 +12054,7 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", + "demo": "grids\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11937,13 +12103,13 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -11958,7 +12124,7 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", + "demo": "grids\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12006,10 +12172,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "consumes": [ "application\/json" ], @@ -12017,7 +12183,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12035,7 +12201,7 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", + "demo": "grids\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12111,16 +12277,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "List indexes in the collection.", "responses": { @@ -12138,7 +12304,7 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", + "demo": "grids\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, @@ -12192,7 +12358,7 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "consumes": [ "application\/json" ], @@ -12200,7 +12366,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { @@ -12218,7 +12384,7 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", + "demo": "grids\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, "rate-time": 3600, @@ -12319,16 +12485,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -12346,7 +12512,7 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", + "demo": "grids\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, "rate-time": 3600, @@ -12395,13 +12561,13 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -12416,7 +12582,7 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", + "demo": "grids\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, "rate-time": 3600, @@ -12464,16 +12630,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { @@ -12491,7 +12657,7 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", + "demo": "grids\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, "rate-time": 3600, @@ -12548,7 +12714,7 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "consumes": [ "application\/json" ], @@ -12556,7 +12722,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -12574,7 +12740,7 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", + "demo": "grids\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, "rate-time": 60, @@ -12589,9 +12755,8 @@ { "name": "createRow", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -12617,7 +12782,7 @@ { "name": "createRows", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -12712,7 +12877,7 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "consumes": [ "application\/json" ], @@ -12720,7 +12885,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", "responses": { @@ -12738,7 +12903,7 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", + "demo": "grids\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, @@ -12753,7 +12918,7 @@ { "name": "upsertRows", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [], @@ -12820,7 +12985,7 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "consumes": [ "application\/json" ], @@ -12828,7 +12993,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", "responses": { @@ -12846,7 +13011,7 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", + "demo": "grids\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, "rate-time": 60, @@ -12913,7 +13078,7 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "consumes": [ "application\/json" ], @@ -12921,7 +13086,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -12939,7 +13104,7 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", + "demo": "grids\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, "rate-time": 60, @@ -12999,16 +13164,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13026,7 +13191,7 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", + "demo": "grids\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, "rate-time": 3600, @@ -13091,7 +13256,7 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "consumes": [ "application\/json" ], @@ -13099,7 +13264,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -13117,7 +13282,7 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", + "demo": "grids\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, "rate-time": 60, @@ -13132,9 +13297,8 @@ { "name": "upsertRow", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [], "required": [], @@ -13213,7 +13377,7 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "consumes": [ "application\/json" ], @@ -13221,7 +13385,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -13239,7 +13403,7 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", + "demo": "grids\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, "rate-time": 60, @@ -13316,13 +13480,13 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -13337,7 +13501,7 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", + "demo": "grids\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, "rate-time": 60, @@ -13389,10 +13553,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "consumes": [ "application\/json" ], @@ -13400,7 +13564,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -13418,7 +13582,7 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", + "demo": "grids\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -13496,10 +13660,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "consumes": [ "application\/json" ], @@ -13507,7 +13671,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -13525,7 +13689,7 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", + "demo": "grids\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -15411,7 +15575,7 @@ "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", "default": null, - "x-example": null + "x-example": "<SCHEDULED_AT>" } } } @@ -33344,9 +33508,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -33389,6 +33568,28 @@ }, "x-example": [], "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -33399,23 +33600,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -33461,27 +33646,18 @@ }, "x-example": [], "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index b28e544566..44f691f055 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4610,10 +4610,9 @@ "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -4845,10 +4844,9 @@ "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -5108,16 +5106,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { @@ -5135,7 +5133,7 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", + "demo": "grids\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, "rate-time": 3600, @@ -5190,7 +5188,7 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "consumes": [ "application\/json" ], @@ -5198,7 +5196,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -5216,7 +5214,7 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", + "demo": "grids\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, "rate-time": 60, @@ -5230,10 +5228,9 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -5255,30 +5252,6 @@ } ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." - }, - { - "name": "createRows", - "auth": { - "Admin": [], - "Key": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rows" - ], - "required": [ - "databaseId", - "tableId", - "rows" - ], - "responses": [ - { - "code": 201, - "model": "#\/definitions\/rowList" - } - ], - "description": "Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console." } ], "auth": { @@ -5351,16 +5324,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -5378,7 +5351,7 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", + "demo": "grids\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, "rate-time": 3600, @@ -5441,7 +5414,7 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "consumes": [ "application\/json" ], @@ -5449,7 +5422,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -5467,7 +5440,7 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", + "demo": "grids\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, "rate-time": 60, @@ -5481,10 +5454,9 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -5561,7 +5533,7 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "consumes": [ "application\/json" ], @@ -5569,7 +5541,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -5587,7 +5559,7 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", + "demo": "grids\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, "rate-time": 60, @@ -5662,13 +5634,13 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -5683,7 +5655,7 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", + "demo": "grids\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, "rate-time": 60, @@ -5914,7 +5886,7 @@ "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", "default": null, - "x-example": null + "x-example": "<SCHEDULED_AT>" } } } diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index ba212cba1a..d80f7421ed 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4716,6 +4716,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "list", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/databaseList" + } + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + }, + { + "name": "listDatabases", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/databaseList" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4788,6 +4822,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "create", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "Create a new Database.\n" + }, + { + "name": "createDatabase", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4870,6 +4938,40 @@ "console" ], "packaging": false, + "methods": [ + { + "name": "listUsage", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabases" + } + ], + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + }, + { + "name": "listDatabaseUsage", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabases" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4940,6 +5042,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "get", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + }, + { + "name": "getDatabase", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -4999,6 +5135,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "update", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Update a database by its unique ID." + }, + { + "name": "updateDatabase", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -5077,6 +5247,38 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + }, + { + "name": "deleteDatabase", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204 + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -8264,10 +8466,9 @@ "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8292,9 +8493,9 @@ }, { "name": "createDocuments", + "namespace": "databases", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -8430,9 +8631,9 @@ "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [], "required": [], @@ -8820,10 +9021,9 @@ "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -9930,86 +10130,16 @@ ] } }, - "\/databases\/{databaseId}\/logs": { - "get": { - "summary": "List database logs", - "operationId": "databasesListLogs", - "consumes": [], - "produces": [ - "application\/json" - ], - "tags": [ - "databases" - ], - "description": "Get the database activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { - "$ref": "#\/definitions\/logList" - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "listLogs", - "group": "logs", - "weight": 321, - "cookies": false, - "type": "", - "demo": "databases\/list-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "databases.read", - "platforms": [ - "console" - ], - "packaging": false, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "type": "string", - "x-example": "<DATABASE_ID>", - "in": "path" - }, - { - "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" - } - ] - } - }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", "responses": { @@ -10022,12 +10152,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", + "demo": "grids\/list-tables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, "rate-time": 3600, @@ -10081,7 +10211,7 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "consumes": [ "application\/json" ], @@ -10089,7 +10219,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -10102,12 +10232,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", + "demo": "grids\/create-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10185,16 +10315,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -10207,12 +10337,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", + "demo": "grids\/get-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10253,7 +10383,7 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "consumes": [ "application\/json" ], @@ -10261,7 +10391,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -10274,12 +10404,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", + "demo": "grids\/update-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10359,13 +10489,13 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -10375,12 +10505,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", + "demo": "grids\/delete-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, "rate-time": 3600, @@ -10420,16 +10550,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "List attributes in the collection.", "responses": { @@ -10447,7 +10577,7 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", + "demo": "grids\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, "rate-time": 3600, @@ -10499,10 +10629,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "consumes": [ "application\/json" ], @@ -10510,7 +10640,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -10528,7 +10658,7 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", + "demo": "grids\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10605,10 +10735,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "consumes": [ "application\/json" ], @@ -10616,7 +10746,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10634,7 +10764,7 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", + "demo": "grids\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10713,10 +10843,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "consumes": [ "application\/json" ], @@ -10724,7 +10854,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -10742,7 +10872,7 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", + "demo": "grids\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10819,10 +10949,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "consumes": [ "application\/json" ], @@ -10830,7 +10960,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10848,7 +10978,7 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", + "demo": "grids\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10927,10 +11057,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "consumes": [ "application\/json" ], @@ -10938,7 +11068,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10956,7 +11086,7 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", + "demo": "grids\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11033,10 +11163,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "consumes": [ "application\/json" ], @@ -11044,7 +11174,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11062,7 +11192,7 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", + "demo": "grids\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11141,10 +11271,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "consumes": [ "application\/json" ], @@ -11152,7 +11282,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -11170,7 +11300,7 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", + "demo": "grids\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11257,10 +11387,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "consumes": [ "application\/json" ], @@ -11268,7 +11398,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11286,7 +11416,7 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", + "demo": "grids\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11375,10 +11505,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "consumes": [ "application\/json" ], @@ -11386,7 +11516,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11404,7 +11534,7 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", + "demo": "grids\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11493,10 +11623,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "consumes": [ "application\/json" ], @@ -11504,7 +11634,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11522,7 +11652,7 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", + "demo": "grids\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11613,10 +11743,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "consumes": [ "application\/json" ], @@ -11624,7 +11754,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -11642,7 +11772,7 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", + "demo": "grids\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11731,10 +11861,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "consumes": [ "application\/json" ], @@ -11742,7 +11872,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11760,7 +11890,7 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", + "demo": "grids\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11851,10 +11981,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "consumes": [ "application\/json" ], @@ -11862,7 +11992,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11880,7 +12010,7 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", + "demo": "grids\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11957,10 +12087,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "consumes": [ "application\/json" ], @@ -11968,7 +12098,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11986,7 +12116,7 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", + "demo": "grids\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12065,10 +12195,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "consumes": [ "application\/json" ], @@ -12076,7 +12206,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12094,7 +12224,7 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", + "demo": "grids\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12198,10 +12328,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "consumes": [ "application\/json" ], @@ -12209,7 +12339,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -12227,7 +12357,7 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", + "demo": "grids\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12317,10 +12447,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "consumes": [ "application\/json" ], @@ -12328,7 +12458,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12346,7 +12476,7 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", + "demo": "grids\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12431,10 +12561,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "consumes": [ "application\/json" ], @@ -12442,7 +12572,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -12460,7 +12590,7 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", + "demo": "grids\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12537,10 +12667,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "consumes": [ "application\/json" ], @@ -12548,7 +12678,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -12566,7 +12696,7 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", + "demo": "grids\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12645,16 +12775,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -12703,7 +12833,7 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", + "demo": "grids\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12751,13 +12881,13 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -12772,7 +12902,7 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", + "demo": "grids\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12819,10 +12949,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "consumes": [ "application\/json" ], @@ -12830,7 +12960,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12848,7 +12978,7 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", + "demo": "grids\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12923,16 +13053,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "List indexes in the collection.", "responses": { @@ -12950,7 +13080,7 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", + "demo": "grids\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, @@ -13003,7 +13133,7 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "consumes": [ "application\/json" ], @@ -13011,7 +13141,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { @@ -13029,7 +13159,7 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", + "demo": "grids\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, "rate-time": 3600, @@ -13129,16 +13259,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -13156,7 +13286,7 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", + "demo": "grids\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, "rate-time": 3600, @@ -13204,13 +13334,13 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -13225,7 +13355,7 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", + "demo": "grids\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, "rate-time": 3600, @@ -13272,16 +13402,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/logs": { "get": { "summary": "List table logs", - "operationId": "tablesListLogs", + "operationId": "gridsListTableLogs", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get the table activity logs list by its unique ID.", "responses": { @@ -13294,12 +13424,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "listLogs", - "group": "tables", + "method": "listTableLogs", + "group": "grids", "weight": 375, "cookies": false, "type": "", - "demo": "tables\/list-logs.md", + "demo": "grids\/list-table-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", "rate-limit": 0, "rate-time": 3600, @@ -13350,16 +13480,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { @@ -13377,7 +13507,7 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", + "demo": "grids\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, "rate-time": 3600, @@ -13432,7 +13562,7 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "consumes": [ "application\/json" ], @@ -13440,7 +13570,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -13458,7 +13588,7 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", + "demo": "grids\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, "rate-time": 60, @@ -13472,10 +13602,9 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13500,9 +13629,9 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [ "databaseId", @@ -13594,7 +13723,7 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "consumes": [ "application\/json" ], @@ -13602,7 +13731,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", "responses": { @@ -13620,7 +13749,7 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", + "demo": "grids\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, @@ -13634,9 +13763,9 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { - "Admin": [], - "Key": [] + "Project": [] }, "parameters": [], "required": [], @@ -13701,7 +13830,7 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "consumes": [ "application\/json" ], @@ -13709,7 +13838,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", "responses": { @@ -13727,7 +13856,7 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", + "demo": "grids\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, "rate-time": 60, @@ -13793,7 +13922,7 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "consumes": [ "application\/json" ], @@ -13801,7 +13930,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -13819,7 +13948,7 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", + "demo": "grids\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, "rate-time": 60, @@ -13878,16 +14007,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13905,7 +14034,7 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", + "demo": "grids\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, "rate-time": 3600, @@ -13968,7 +14097,7 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "consumes": [ "application\/json" ], @@ -13976,7 +14105,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -13994,7 +14123,7 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", + "demo": "grids\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, "rate-time": 60, @@ -14008,10 +14137,9 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [] }, "parameters": [], "required": [], @@ -14088,7 +14216,7 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "consumes": [ "application\/json" ], @@ -14096,7 +14224,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -14114,7 +14242,7 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", + "demo": "grids\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, "rate-time": 60, @@ -14189,13 +14317,13 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -14210,7 +14338,7 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", + "demo": "grids\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, "rate-time": 60, @@ -14260,16 +14388,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/logs": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/logs": { "get": { "summary": "List row logs", - "operationId": "tablesListRowLogs", + "operationId": "gridsListRowLogs", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get the row activity logs list by its unique ID.", "responses": { @@ -14287,7 +14415,7 @@ "weight": 413, "cookies": false, "type": "", - "demo": "tables\/list-row-logs.md", + "demo": "grids\/list-row-logs.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", "rate-limit": 0, "rate-time": 3600, @@ -14346,10 +14474,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "consumes": [ "application\/json" ], @@ -14357,7 +14485,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -14375,7 +14503,7 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", + "demo": "grids\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -14452,10 +14580,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "consumes": [ "application\/json" ], @@ -14463,7 +14591,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -14481,7 +14609,7 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", + "demo": "grids\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -14558,16 +14686,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/usage": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/usage": { "get": { "summary": "Get table usage stats", - "operationId": "tablesGetUsage", + "operationId": "gridsGetTableUsage", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", "responses": { @@ -14580,12 +14708,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "getUsage", + "method": "getTableUsage", "group": null, "weight": 376, "cookies": false, "type": "", - "demo": "tables\/get-usage.md", + "demo": "grids\/get-table-usage.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", "rate-limit": 0, "rate-time": 3600, @@ -14624,7 +14752,7 @@ "30d", "90d" ], - "x-enum-name": "DatabaseUsageRange", + "x-enum-name": "GridUsageRange", "x-enum-keys": [ "Twenty Four Hours", "Thirty Days", @@ -14644,6 +14772,110 @@ ] } }, + "\/databases\/{databaseId}\/logs": { + "get": { + "summary": "List database logs", + "operationId": "databasesListLogs", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Get the database activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { + "$ref": "#\/definitions\/logList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listLogs", + "group": "logs", + "weight": 321, + "cookies": false, + "type": "", + "demo": "databases\/list-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "databases.read", + "platforms": [ + "console" + ], + "packaging": false, + "methods": [ + { + "name": "listLogs", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/logList" + } + ], + "description": "Get the database activity logs list by its unique ID." + }, + { + "name": "listDatabaseLogs", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/logList" + } + ], + "description": "" + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "<DATABASE_ID>", + "in": "path" + }, + { + "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" + } + ] + } + }, "\/databases\/{databaseId}\/usage": { "get": { "summary": "Get database usage stats", @@ -14681,6 +14913,40 @@ "console" ], "packaging": false, + "methods": [ + { + "name": "getDatabaseUsage", + "namespace": "databases", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabase" + } + ], + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + }, + { + "name": "getDatabaseUsage", + "namespace": "grids", + "auth": { + "Project": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/usageDatabase" + } + ], + "description": "" + } + ], "auth": { "Project": [] } @@ -16731,7 +16997,7 @@ "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", "default": null, - "x-example": null + "x-example": "<SCHEDULED_AT>" } } } @@ -43629,9 +43895,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -43674,6 +43955,28 @@ }, "x-example": [], "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -43684,23 +43987,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -43746,27 +44033,18 @@ }, "x-example": [], "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { @@ -45922,6 +46200,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45934,6 +46217,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt" ] }, @@ -45966,6 +46250,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -45983,6 +46272,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "framework" ] @@ -46016,6 +46306,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -46033,6 +46328,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "runtime" ] diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 9bd6c58fcc..3ac203ee2c 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -4222,6 +4222,42 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "list", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/databaseList" + } + ], + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + }, + { + "name": "listDatabases", + "namespace": "grids", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/databaseList" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4295,6 +4331,42 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "create", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "Create a new Database.\n" + }, + { + "name": "createDatabase", + "namespace": "grids", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4378,6 +4450,42 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "get", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + }, + { + "name": "getDatabase", + "namespace": "grids", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4438,6 +4546,42 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "update", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "Update a database by its unique ID." + }, + { + "name": "updateDatabase", + "namespace": "grids", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 200, + "model": "#\/definitions\/database" + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -4517,6 +4661,40 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "delete", + "namespace": "databases", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204 + } + ], + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + }, + { + "name": "deleteDatabase", + "namespace": "grids", + "auth": { + "Project": [], + "Key": [] + }, + "parameters": [], + "required": [], + "responses": [ + { + "code": 204 + } + ], + "description": "" + } + ], "auth": { "Project": [], "Key": [] @@ -7735,10 +7913,10 @@ "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -7763,8 +7941,9 @@ }, { "name": "createDocuments", + "namespace": "databases", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -7903,8 +8082,9 @@ "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [], @@ -8298,10 +8478,10 @@ "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [], "required": [], @@ -9158,16 +9338,16 @@ ] } }, - "\/databases\/{databaseId}\/tables": { + "\/databases\/{databaseId}\/grids\/tables": { "get": { "summary": "List tables", - "operationId": "tablesList", + "operationId": "gridsListTables", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.", "responses": { @@ -9180,12 +9360,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", + "method": "listTables", "group": null, "weight": 374, "cookies": false, "type": "", - "demo": "tables\/list.md", + "demo": "grids\/list-tables.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", "rate-limit": 0, "rate-time": 3600, @@ -9240,7 +9420,7 @@ }, "post": { "summary": "Create table", - "operationId": "tablesCreate", + "operationId": "gridsCreateTable", "consumes": [ "application\/json" ], @@ -9248,7 +9428,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -9261,12 +9441,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", + "method": "createTable", "group": null, "weight": 370, "cookies": false, "type": "", - "demo": "tables\/create.md", + "demo": "grids\/create-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9345,16 +9525,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}": { "get": { "summary": "Get table", - "operationId": "tablesGet", + "operationId": "gridsGetTable", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata.", "responses": { @@ -9367,12 +9547,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", + "method": "getTable", "group": null, "weight": 371, "cookies": false, "type": "", - "demo": "tables\/get.md", + "demo": "grids\/get-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9414,7 +9594,7 @@ }, "put": { "summary": "Update table", - "operationId": "tablesUpdate", + "operationId": "gridsUpdateTable", "consumes": [ "application\/json" ], @@ -9422,7 +9602,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a table by its unique ID.", "responses": { @@ -9435,12 +9615,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "update", + "method": "updateTable", "group": null, "weight": 372, "cookies": false, "type": "", - "demo": "tables\/update.md", + "demo": "grids\/update-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9521,13 +9701,13 @@ }, "delete": { "summary": "Delete table", - "operationId": "tablesDelete", + "operationId": "gridsDeleteTable", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a table by its unique ID. Only users with write permissions have access to delete this resource.", "responses": { @@ -9537,12 +9717,12 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", + "method": "deleteTable", "group": null, "weight": 373, "cookies": false, "type": "", - "demo": "tables\/delete.md", + "demo": "grids\/delete-table.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", "rate-limit": 0, "rate-time": 3600, @@ -9583,16 +9763,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns": { "get": { "summary": "List columns", - "operationId": "tablesListColumns", + "operationId": "gridsListColumns", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "List attributes in the collection.", "responses": { @@ -9610,7 +9790,7 @@ "weight": 379, "cookies": false, "type": "", - "demo": "tables\/list-columns.md", + "demo": "grids\/list-columns.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", "rate-limit": 0, "rate-time": 3600, @@ -9663,10 +9843,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean": { "post": { "summary": "Create boolean column", - "operationId": "tablesCreateBooleanColumn", + "operationId": "gridsCreateBooleanColumn", "consumes": [ "application\/json" ], @@ -9674,7 +9854,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a boolean column.\n", "responses": { @@ -9692,7 +9872,7 @@ "weight": 380, "cookies": false, "type": "", - "demo": "tables\/create-boolean-column.md", + "demo": "grids\/create-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -9770,10 +9950,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/boolean\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/boolean\/{key}": { "patch": { "summary": "Update boolean column", - "operationId": "tablesUpdateBooleanColumn", + "operationId": "gridsUpdateBooleanColumn", "consumes": [ "application\/json" ], @@ -9781,7 +9961,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a boolean column. Changing the `default` value will not update already existing rows.", "responses": { @@ -9799,7 +9979,7 @@ "weight": 381, "cookies": false, "type": "", - "demo": "tables\/update-boolean-column.md", + "demo": "grids\/update-boolean-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, @@ -9879,10 +10059,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime": { "post": { "summary": "Create datetime column", - "operationId": "tablesCreateDatetimeColumn", + "operationId": "gridsCreateDatetimeColumn", "consumes": [ "application\/json" ], @@ -9890,7 +10070,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a date time column according to the ISO 8601 standard.", "responses": { @@ -9908,7 +10088,7 @@ "weight": 382, "cookies": false, "type": "", - "demo": "tables\/create-datetime-column.md", + "demo": "grids\/create-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -9986,10 +10166,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/datetime\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/datetime\/{key}": { "patch": { "summary": "Update dateTime column", - "operationId": "tablesUpdateDatetimeColumn", + "operationId": "gridsUpdateDatetimeColumn", "consumes": [ "application\/json" ], @@ -9997,7 +10177,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a date time column. Changing the `default` value will not update already existing rows.", "responses": { @@ -10015,7 +10195,7 @@ "weight": 383, "cookies": false, "type": "", - "demo": "tables\/update-datetime-column.md", + "demo": "grids\/update-datetime-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10095,10 +10275,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email": { "post": { "summary": "Create email column", - "operationId": "tablesCreateEmailColumn", + "operationId": "gridsCreateEmailColumn", "consumes": [ "application\/json" ], @@ -10106,7 +10286,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an email column.\n", "responses": { @@ -10124,7 +10304,7 @@ "weight": 384, "cookies": false, "type": "", - "demo": "tables\/create-email-column.md", + "demo": "grids\/create-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10202,10 +10382,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/email\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/email\/{key}": { "patch": { "summary": "Update email column", - "operationId": "tablesUpdateEmailColumn", + "operationId": "gridsUpdateEmailColumn", "consumes": [ "application\/json" ], @@ -10213,7 +10393,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an email column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10231,7 +10411,7 @@ "weight": 385, "cookies": false, "type": "", - "demo": "tables\/update-email-column.md", + "demo": "grids\/update-email-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10311,10 +10491,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum": { "post": { "summary": "Create enum column", - "operationId": "tablesCreateEnumColumn", + "operationId": "gridsCreateEnumColumn", "consumes": [ "application\/json" ], @@ -10322,7 +10502,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column.", "responses": { @@ -10340,7 +10520,7 @@ "weight": 386, "cookies": false, "type": "", - "demo": "tables\/create-enum-column.md", + "demo": "grids\/create-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10428,10 +10608,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/enum\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/enum\/{key}": { "patch": { "summary": "Update enum column", - "operationId": "tablesUpdateEnumColumn", + "operationId": "gridsUpdateEnumColumn", "consumes": [ "application\/json" ], @@ -10439,7 +10619,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an enum column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10457,7 +10637,7 @@ "weight": 387, "cookies": false, "type": "", - "demo": "tables\/update-enum-column.md", + "demo": "grids\/update-enum-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10547,10 +10727,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float": { "post": { "summary": "Create float column", - "operationId": "tablesCreateFloatColumn", + "operationId": "gridsCreateFloatColumn", "consumes": [ "application\/json" ], @@ -10558,7 +10738,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a float column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10576,7 +10756,7 @@ "weight": 388, "cookies": false, "type": "", - "demo": "tables\/create-float-column.md", + "demo": "grids\/create-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10666,10 +10846,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/float\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/float\/{key}": { "patch": { "summary": "Update float column", - "operationId": "tablesUpdateFloatColumn", + "operationId": "gridsUpdateFloatColumn", "consumes": [ "application\/json" ], @@ -10677,7 +10857,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a float column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10695,7 +10875,7 @@ "weight": 389, "cookies": false, "type": "", - "demo": "tables\/update-float-column.md", + "demo": "grids\/update-float-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10787,10 +10967,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer": { "post": { "summary": "Create integer column", - "operationId": "tablesCreateIntegerColumn", + "operationId": "gridsCreateIntegerColumn", "consumes": [ "application\/json" ], @@ -10798,7 +10978,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create an integer column. Optionally, minimum and maximum values can be provided.\n", "responses": { @@ -10816,7 +10996,7 @@ "weight": 390, "cookies": false, "type": "", - "demo": "tables\/create-integer-column.md", + "demo": "grids\/create-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -10906,10 +11086,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/integer\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/integer\/{key}": { "patch": { "summary": "Update integer column", - "operationId": "tablesUpdateIntegerColumn", + "operationId": "gridsUpdateIntegerColumn", "consumes": [ "application\/json" ], @@ -10917,7 +11097,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an integer column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -10935,7 +11115,7 @@ "weight": 391, "cookies": false, "type": "", - "demo": "tables\/update-integer-column.md", + "demo": "grids\/update-integer-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11027,10 +11207,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip": { "post": { "summary": "Create IP address column", - "operationId": "tablesCreateIpColumn", + "operationId": "gridsCreateIpColumn", "consumes": [ "application\/json" ], @@ -11038,7 +11218,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create IP address column.\n", "responses": { @@ -11056,7 +11236,7 @@ "weight": 392, "cookies": false, "type": "", - "demo": "tables\/create-ip-column.md", + "demo": "grids\/create-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11134,10 +11314,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/ip\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/ip\/{key}": { "patch": { "summary": "Update IP address column", - "operationId": "tablesUpdateIpColumn", + "operationId": "gridsUpdateIpColumn", "consumes": [ "application\/json" ], @@ -11145,7 +11325,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an ip column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11163,7 +11343,7 @@ "weight": 393, "cookies": false, "type": "", - "demo": "tables\/update-ip-column.md", + "demo": "grids\/update-ip-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11243,10 +11423,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/relationship": { "post": { "summary": "Create relationship column", - "operationId": "tablesCreateRelationshipColumn", + "operationId": "gridsCreateRelationshipColumn", "consumes": [ "application\/json" ], @@ -11254,7 +11434,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -11272,7 +11452,7 @@ "weight": 394, "cookies": false, "type": "", - "demo": "tables\/create-relationship-column.md", + "demo": "grids\/create-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11377,10 +11557,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string": { "post": { "summary": "Create string column", - "operationId": "tablesCreateStringColumn", + "operationId": "gridsCreateStringColumn", "consumes": [ "application\/json" ], @@ -11388,7 +11568,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a string column.\n", "responses": { @@ -11406,7 +11586,7 @@ "weight": 396, "cookies": false, "type": "", - "demo": "tables\/create-string-column.md", + "demo": "grids\/create-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11497,10 +11677,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/string\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/string\/{key}": { "patch": { "summary": "Update string column", - "operationId": "tablesUpdateStringColumn", + "operationId": "gridsUpdateStringColumn", "consumes": [ "application\/json" ], @@ -11508,7 +11688,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a string column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11526,7 +11706,7 @@ "weight": 397, "cookies": false, "type": "", - "demo": "tables\/update-string-column.md", + "demo": "grids\/update-string-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11612,10 +11792,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url": { "post": { "summary": "Create URL column", - "operationId": "tablesCreateUrlColumn", + "operationId": "gridsCreateUrlColumn", "consumes": [ "application\/json" ], @@ -11623,7 +11803,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a URL column.\n", "responses": { @@ -11641,7 +11821,7 @@ "weight": 398, "cookies": false, "type": "", - "demo": "tables\/create-url-column.md", + "demo": "grids\/create-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11719,10 +11899,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/url\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/url\/{key}": { "patch": { "summary": "Update URL column", - "operationId": "tablesUpdateUrlColumn", + "operationId": "gridsUpdateUrlColumn", "consumes": [ "application\/json" ], @@ -11730,7 +11910,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update an url column. Changing the `default` value will not update already existing rows.\n", "responses": { @@ -11748,7 +11928,7 @@ "weight": 399, "cookies": false, "type": "", - "demo": "tables\/update-url-column.md", + "demo": "grids\/update-url-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11828,16 +12008,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}": { "get": { "summary": "Get column", - "operationId": "tablesGetColumn", + "operationId": "gridsGetColumn", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get column by ID.", "responses": { @@ -11886,7 +12066,7 @@ "weight": 377, "cookies": false, "type": "", - "demo": "tables\/get-column.md", + "demo": "grids\/get-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", "rate-limit": 0, "rate-time": 3600, @@ -11935,13 +12115,13 @@ }, "delete": { "summary": "Delete column", - "operationId": "tablesDeleteColumn", + "operationId": "gridsDeleteColumn", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Deletes a column.", "responses": { @@ -11956,7 +12136,7 @@ "weight": 378, "cookies": false, "type": "", - "demo": "tables\/delete-column.md", + "demo": "grids\/delete-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12004,10 +12184,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/columns\/{key}\/relationship": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/columns\/{key}\/relationship": { "patch": { "summary": "Update relationship column", - "operationId": "tablesUpdateRelationshipColumn", + "operationId": "gridsUpdateRelationshipColumn", "consumes": [ "application\/json" ], @@ -12015,7 +12195,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update relationship column. [Learn more about relationship columns](https:\/\/appwrite.io\/docs\/databases-relationships#relationship-columns).\n", "responses": { @@ -12033,7 +12213,7 @@ "weight": 395, "cookies": false, "type": "", - "demo": "tables\/update-relationship-column.md", + "demo": "grids\/update-relationship-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, @@ -12109,16 +12289,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes": { "get": { "summary": "List indexes", - "operationId": "tablesListIndexes", + "operationId": "gridsListIndexes", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "List indexes in the collection.", "responses": { @@ -12136,7 +12316,7 @@ "weight": 403, "cookies": false, "type": "", - "demo": "tables\/list-indexes.md", + "demo": "grids\/list-indexes.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, @@ -12190,7 +12370,7 @@ }, "post": { "summary": "Create index", - "operationId": "tablesCreateIndex", + "operationId": "gridsCreateIndex", "consumes": [ "application\/json" ], @@ -12198,7 +12378,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", "responses": { @@ -12216,7 +12396,7 @@ "weight": 400, "cookies": false, "type": "", - "demo": "tables\/create-index.md", + "demo": "grids\/create-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", "rate-limit": 0, "rate-time": 3600, @@ -12317,16 +12497,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/indexes\/{key}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/indexes\/{key}": { "get": { "summary": "Get index", - "operationId": "tablesGetIndex", + "operationId": "gridsGetIndex", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get index by ID.", "responses": { @@ -12344,7 +12524,7 @@ "weight": 401, "cookies": false, "type": "", - "demo": "tables\/get-index.md", + "demo": "grids\/get-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", "rate-limit": 0, "rate-time": 3600, @@ -12393,13 +12573,13 @@ }, "delete": { "summary": "Delete index", - "operationId": "tablesDeleteIndex", + "operationId": "gridsDeleteIndex", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete an index.", "responses": { @@ -12414,7 +12594,7 @@ "weight": 402, "cookies": false, "type": "", - "demo": "tables\/delete-index.md", + "demo": "grids\/delete-index.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", "rate-limit": 0, "rate-time": 3600, @@ -12462,16 +12642,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows": { "get": { "summary": "List rows", - "operationId": "tablesListRows", + "operationId": "gridsListRows", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", "responses": { @@ -12489,7 +12669,7 @@ "weight": 412, "cookies": false, "type": "", - "demo": "tables\/list-rows.md", + "demo": "grids\/list-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", "rate-limit": 0, "rate-time": 3600, @@ -12546,7 +12726,7 @@ }, "post": { "summary": "Create row", - "operationId": "tablesCreateRow", + "operationId": "gridsCreateRow", "consumes": [ "application\/json" ], @@ -12554,7 +12734,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -12572,7 +12752,7 @@ "weight": 404, "cookies": false, "type": "", - "demo": "tables\/create-row.md", + "demo": "grids\/create-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", "rate-limit": 120, "rate-time": 60, @@ -12586,10 +12766,10 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [ "databaseId", @@ -12614,8 +12794,9 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [ @@ -12710,7 +12891,7 @@ }, "put": { "summary": "Create or update rows", - "operationId": "tablesUpsertRows", + "operationId": "gridsUpsertRows", "consumes": [ "application\/json" ], @@ -12718,7 +12899,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.\n", "responses": { @@ -12736,7 +12917,7 @@ "weight": 409, "cookies": false, "type": "", - "demo": "tables\/upsert-rows.md", + "demo": "grids\/upsert-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, @@ -12750,8 +12931,9 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { - "Admin": [], + "Project": [], "Key": [] }, "parameters": [], @@ -12818,7 +13000,7 @@ }, "patch": { "summary": "Update rows", - "operationId": "tablesUpdateRows", + "operationId": "gridsUpdateRows", "consumes": [ "application\/json" ], @@ -12826,7 +13008,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated.", "responses": { @@ -12844,7 +13026,7 @@ "weight": 407, "cookies": false, "type": "", - "demo": "tables\/update-rows.md", + "demo": "grids\/update-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", "rate-limit": 120, "rate-time": 60, @@ -12911,7 +13093,7 @@ }, "delete": { "summary": "Delete rows", - "operationId": "tablesDeleteRows", + "operationId": "gridsDeleteRows", "consumes": [ "application\/json" ], @@ -12919,7 +13101,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Bulk delete rows using queries, if no queries are passed then all rows are deleted.", "responses": { @@ -12937,7 +13119,7 @@ "weight": 411, "cookies": false, "type": "", - "demo": "tables\/delete-rows.md", + "demo": "grids\/delete-rows.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", "rate-limit": 60, "rate-time": 60, @@ -12997,16 +13179,16 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}": { "get": { "summary": "Get row", - "operationId": "tablesGetRow", + "operationId": "gridsGetRow", "consumes": [], "produces": [ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { @@ -13024,7 +13206,7 @@ "weight": 405, "cookies": false, "type": "", - "demo": "tables\/get-row.md", + "demo": "grids\/get-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", "rate-limit": 0, "rate-time": 3600, @@ -13089,7 +13271,7 @@ }, "put": { "summary": "Create or update a row", - "operationId": "tablesUpsertRow", + "operationId": "gridsUpsertRow", "consumes": [ "application\/json" ], @@ -13097,7 +13279,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateTable) API or directly from your database console.", "responses": { @@ -13115,7 +13297,7 @@ "weight": 408, "cookies": false, "type": "", - "demo": "tables\/upsert-row.md", + "demo": "grids\/upsert-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", "rate-limit": 120, "rate-time": 60, @@ -13129,10 +13311,10 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { - "Session": [], - "Key": [], - "JWT": [] + "Project": [], + "Session": [] }, "parameters": [], "required": [], @@ -13211,7 +13393,7 @@ }, "patch": { "summary": "Update row", - "operationId": "tablesUpdateRow", + "operationId": "gridsUpdateRow", "consumes": [ "application\/json" ], @@ -13219,7 +13401,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { @@ -13237,7 +13419,7 @@ "weight": 406, "cookies": false, "type": "", - "demo": "tables\/update-row.md", + "demo": "grids\/update-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", "rate-limit": 120, "rate-time": 60, @@ -13314,13 +13496,13 @@ }, "delete": { "summary": "Delete row", - "operationId": "tablesDeleteRow", + "operationId": "gridsDeleteRow", "consumes": [ "application\/json" ], "produces": [], "tags": [ - "tables" + "grids" ], "description": "Delete a row by its unique ID.", "responses": { @@ -13335,7 +13517,7 @@ "weight": 410, "cookies": false, "type": "", - "demo": "tables\/delete-row.md", + "demo": "grids\/delete-row.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", "rate-limit": 60, "rate-time": 60, @@ -13387,10 +13569,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { "patch": { "summary": "Decrement row column", - "operationId": "tablesDecrementRowColumn", + "operationId": "gridsDecrementRowColumn", "consumes": [ "application\/json" ], @@ -13398,7 +13580,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Decrement a specific column of a row by a given value.", "responses": { @@ -13416,7 +13598,7 @@ "weight": 415, "cookies": false, "type": "", - "demo": "tables\/decrement-row-column.md", + "demo": "grids\/decrement-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -13494,10 +13676,10 @@ ] } }, - "\/databases\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { + "\/databases\/{databaseId}\/grids\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { "summary": "Increment row column", - "operationId": "tablesIncrementRowColumn", + "operationId": "gridsIncrementRowColumn", "consumes": [ "application\/json" ], @@ -13505,7 +13687,7 @@ "application\/json" ], "tags": [ - "tables" + "grids" ], "description": "Increment a specific column of a row by a given value.", "responses": { @@ -13523,7 +13705,7 @@ "weight": 414, "cookies": false, "type": "", - "demo": "tables\/increment-row-column.md", + "demo": "grids\/increment-row-column.md", "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, @@ -15409,7 +15591,7 @@ "type": "string", "description": "Scheduled execution time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.", "default": null, - "x-example": null + "x-example": "<SCHEDULED_AT>" } } } @@ -33342,9 +33524,24 @@ "description": "Index", "type": "object", "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Index creation date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Index update date in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, "key": { "type": "string", - "description": "Index Key.", + "description": "Index key.", "x-example": "index1" }, "type": { @@ -33387,6 +33584,28 @@ }, "x-example": [], "x-nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "key", + "type", + "status", + "error", + "attributes", + "lengths" + ] + }, + "columnIndex": { + "description": "Index", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Index ID.", + "x-example": "5e5ea5c16897e" }, "$createdAt": { "type": "string", @@ -33397,23 +33616,7 @@ "type": "string", "description": "Index update date in ISO 8601 format.", "x-example": "2020-10-15T06:38:00.000+00:00" - } - }, - "required": [ - "key", - "type", - "status", - "error", - "attributes", - "lengths", - "$createdAt", - "$updatedAt" - ] - }, - "columnIndex": { - "description": "Index", - "type": "object", - "properties": { + }, "key": { "type": "string", "description": "Index Key.", @@ -33459,27 +33662,18 @@ }, "x-example": [], "x-nullable": true - }, - "$createdAt": { - "type": "string", - "description": "Index creation date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" - }, - "$updatedAt": { - "type": "string", - "description": "Index update date in ISO 8601 format.", - "x-example": "2020-10-15T06:38:00.000+00:00" } }, "required": [ + "$id", + "$createdAt", + "$updatedAt", "key", "type", "status", "error", "columns", - "lengths", - "$createdAt", - "$updatedAt" + "lengths" ] }, "row": { diff --git a/composer.json b/composer.json index e0c3caf63c..dc13967e21 100644 --- a/composer.json +++ b/composer.json @@ -86,7 +86,7 @@ }, "require-dev": { "ext-fileinfo": "*", - "appwrite/sdk-generator": "0.41.*", + "appwrite/sdk-generator": "dev-feat-multiple-namespaces", "phpunit/phpunit": "9.*", "swoole/ide-helper": "5.1.2", "phpstan/phpstan": "1.8.*", diff --git a/composer.lock b/composer.lock index c092b802e4..d389212bb6 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": "497a684d3c93c08d4741f5bb886a5474", + "content-hash": "7f1ef097cd83efca1018c4eb84b7bb05", "packages": [ { "name": "adhocore/jwt", @@ -4810,16 +4810,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.23", + "version": "dev-feat-multiple-namespaces", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "188dff738ff7b9f1f9209b34ac2092b5456b1001" + "reference": "3130f9a952166f86f680b8385ca4441dcc1b7f0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/188dff738ff7b9f1f9209b34ac2092b5456b1001", - "reference": "188dff738ff7b9f1f9209b34ac2092b5456b1001", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/3130f9a952166f86f680b8385ca4441dcc1b7f0b", + "reference": "3130f9a952166f86f680b8385ca4441dcc1b7f0b", "shasum": "" }, "require": { @@ -4855,9 +4855,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.23" + "source": "https://github.com/appwrite/sdk-generator/tree/feat-multiple-namespaces" }, - "time": "2025-07-25T06:47:04+00:00" + "time": "2025-07-27T07:52:16+00:00" }, { "name": "doctrine/annotations", @@ -8239,7 +8239,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "appwrite/sdk-generator": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index a58f0b3068..3550157309 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -215,6 +215,7 @@ class OpenAPI3 extends Format $additionalMethod = [ 'name' => $methodObj->getMethodName(), + 'namespace' => $methodObj->getNamespace(), 'auth' => \array_slice($methodSecurities, 0, $this->authCount), 'parameters' => [], 'required' => [], @@ -237,10 +238,16 @@ class OpenAPI3 extends Format 'model' => \array_map(fn ($m) => '#/components/schemas/' . $m, $response->getModel()) ]; } else { - $additionalMethod['responses'][] = [ + $responseData = [ 'code' => $response->getCode(), - 'model' => '#/components/schemas/' . $response->getModel() ]; + + // lets not assume stuff here! + if ($response->getCode() !== 204) { + $responseData['model'] = '#/components/schemas/' . $response->getModel(); + } + + $additionalMethod['responses'][] = $responseData; } } diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 4420cc6736..3a98b4e2c0 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -224,6 +224,7 @@ class Swagger2 extends Format $additionalMethod = [ 'name' => $methodObj->getMethodName(), + 'namespace' => $methodObj->getNamespace(), 'auth' => \array_slice($methodSecurities, 0, $this->authCount), 'parameters' => [], 'required' => [], @@ -247,10 +248,16 @@ class Swagger2 extends Format 'model' => \array_map(fn ($m) => '#/definitions/' . $m, $response->getModel()) ]; } else { - $additionalMethod['responses'][] = [ + $responseData = [ 'code' => $response->getCode(), - 'model' => '#/definitions/' . $response->getModel() ]; + + // lets not assume stuff here! + if ($response->getCode() !== 204) { + $responseData['model'] = '#/definitions/' . $response->getModel(); + } + + $additionalMethod['responses'][] = $responseData; } } From d7136e77ea6056d2458a58fa21e52d663cb4d743 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 13:50:34 +0530 Subject: [PATCH 286/362] fix: tests. --- .../{Tables => Grids}/DatabasesBase.php | 598 ++++++++-------- .../DatabasesConsoleClientTest.php | 30 +- .../DatabasesCustomClientTest.php | 100 +-- .../DatabasesCustomServerTest.php | 658 +++++++++--------- .../DatabasesPermissionsGuestTest.php | 38 +- .../DatabasesPermissionsMemberTest.php | 26 +- .../DatabasesPermissionsScope.php | 2 +- .../DatabasesPermissionsTeamTest.php | 18 +- 8 files changed, 735 insertions(+), 735 deletions(-) rename tests/e2e/Services/Databases/{Tables => Grids}/DatabasesBase.php (90%) rename tests/e2e/Services/Databases/{Tables => Grids}/DatabasesConsoleClientTest.php (91%) rename tests/e2e/Services/Databases/{Tables => Grids}/DatabasesCustomClientTest.php (89%) rename tests/e2e/Services/Databases/{Tables => Grids}/DatabasesCustomServerTest.php (87%) rename tests/e2e/Services/Databases/{Tables => Grids}/DatabasesPermissionsGuestTest.php (85%) rename tests/e2e/Services/Databases/{Tables => Grids}/DatabasesPermissionsMemberTest.php (89%) rename tests/e2e/Services/Databases/{Tables => Grids}/DatabasesPermissionsScope.php (98%) rename tests/e2e/Services/Databases/{Tables => Grids}/DatabasesPermissionsTeamTest.php (88%) diff --git a/tests/e2e/Services/Databases/Tables/DatabasesBase.php b/tests/e2e/Services/Databases/Grids/DatabasesBase.php similarity index 90% rename from tests/e2e/Services/Databases/Tables/DatabasesBase.php rename to tests/e2e/Services/Databases/Grids/DatabasesBase.php index 58de6754ef..882d73f63f 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesBase.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Tables; +namespace Tests\E2E\Services\Databases\Grids; use Appwrite\Extend\Exception; use Tests\E2E\Client; @@ -45,7 +45,7 @@ trait DatabasesBase /** * Test for SUCCESS */ - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -61,7 +61,7 @@ trait DatabasesBase $this->assertEquals(201, $movies['headers']['status-code']); $this->assertEquals($movies['body']['name'], 'Movies'); - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -97,7 +97,7 @@ trait DatabasesBase $response = $this->client->call( Client::METHOD_GET, - '/databases/console/tables/' . $data['moviesId'] . '/rows', + '/databases/console/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => 'console', @@ -110,7 +110,7 @@ trait DatabasesBase $response = $this->client->call( Client::METHOD_GET, - '/databases/console/tables/' . $data['moviesId'] . '/rows', + '/databases/console/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', // 'x-appwrite-project' => '', empty header @@ -129,7 +129,7 @@ trait DatabasesBase /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -143,7 +143,7 @@ trait DatabasesBase $this->assertFalse($response['body']['enabled']); if ($this->getSide() === 'client') { - $responseCreateDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $responseCreateDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -160,14 +160,14 @@ trait DatabasesBase $this->assertEquals(404, $responseCreateDocument['headers']['status-code']); - $responseListDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $responseListDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(404, $responseListDocument['headers']['status-code']); - $responseGetDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/someID', array_merge([ + $responseGetDocument = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/someID', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -175,7 +175,7 @@ trait DatabasesBase $this->assertEquals(404, $responseGetDocument['headers']['status-code']); } - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -196,7 +196,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -206,7 +206,7 @@ trait DatabasesBase 'required' => true, ]); - $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $description = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -217,7 +217,7 @@ trait DatabasesBase 'default' => '', ]); - $tagline = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $tagline = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -228,7 +228,7 @@ trait DatabasesBase 'default' => '', ]); - $releaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + $releaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -239,7 +239,7 @@ trait DatabasesBase 'max' => 2200, ]); - $duration = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + $duration = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -249,7 +249,7 @@ trait DatabasesBase 'min' => 60, ]); - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -260,7 +260,7 @@ trait DatabasesBase 'array' => true, ]); - $datetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/datetime', array_merge([ + $datetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -269,7 +269,7 @@ trait DatabasesBase 'required' => false, ]); - $relationship = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/relationship', array_merge([ + $relationship = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -281,7 +281,7 @@ trait DatabasesBase 'twoWayKey' => 'movie' ]); - $integers = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ + $integers = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -353,7 +353,7 @@ trait DatabasesBase // wait for database worker to create attributes sleep(2); - $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ + $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -380,7 +380,7 @@ trait DatabasesBase public function testListColumns(array $data): void { $databaseId = $data['databaseId']; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -393,7 +393,7 @@ trait DatabasesBase ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(2, \count($response['body']['columns'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -411,7 +411,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -427,7 +427,7 @@ trait DatabasesBase $this->assertEquals(201, $table['headers']['status-code']); $this->assertEquals($table['body']['name'], 'patch'); - $attribute = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/tables/'.$table['body']['$id'].'/columns/string', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/grids/tables/'.$table['body']['$id'].'/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -441,7 +441,7 @@ trait DatabasesBase sleep(1); - $index = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/tables/'.$table['body']['$id'].'/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/'.$databaseId.'/grids/tables/'.$table['body']['$id'].'/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -457,7 +457,7 @@ trait DatabasesBase /** * Update attribute size to exceed Index maximum length */ - $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/'.$databaseId.'/tables/'.$table['body']['$id'].'/columns/string/'.$attribute['body']['key'], array_merge([ + $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/'.$databaseId.'/grids/tables/'.$table['body']['$id'].'/columns/string/'.$attribute['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -482,7 +482,7 @@ trait DatabasesBase 'name' => 'Test Database 2' ]); - $players = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/tables', array_merge([ + $players = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -496,7 +496,7 @@ trait DatabasesBase ]); // Create enum attribute - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/tables/' . $players['body']['$id'] . '/columns/enum', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $database['body']['$id'] . '/grids/tables/' . $players['body']['$id'] . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -514,7 +514,7 @@ trait DatabasesBase \sleep(2); // Update enum attribute - $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $database['body']['$id'] . '/tables/' . $players['body']['$id'] . '/columns/enum/' . $attribute['body']['key'], array_merge([ + $attribute = $this->client->call(Client::METHOD_PATCH, '/databases/' . $database['body']['$id'] . '/grids/tables/' . $players['body']['$id'] . '/columns/enum/' . $attribute['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -534,7 +534,7 @@ trait DatabasesBase public function testColumnResponseModels(array $data): array { $databaseId = $data['databaseId']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -550,7 +550,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $columnsPath = "/databases/" . $databaseId . "/tables/{$tableId}/columns"; + $columnsPath = "/databases/" . $databaseId . "/grids/tables/{$tableId}/columns"; $string = $this->client->call(Client::METHOD_POST, $columnsPath . '/string', array_merge([ 'content-type' => 'application/json', @@ -951,7 +951,7 @@ trait DatabasesBase $this->assertEquals($relationship['body']['twoWay'], $relationshipResponse['body']['twoWay']); $this->assertEquals($relationship['body']['twoWayKey'], $relationshipResponse['body']['twoWayKey']); - $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1063,7 +1063,7 @@ trait DatabasesBase $this->assertEquals($integersResponse['body']['min'], $columns[11]['min']); $this->assertEquals($integersResponse['body']['max'], $columns[11]['max']); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1178,7 +1178,7 @@ trait DatabasesBase /** * Test for FAILURE */ - $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1202,7 +1202,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $titleIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $titleIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1218,7 +1218,7 @@ trait DatabasesBase $this->assertCount(1, $titleIndex['body']['columns']); $this->assertEquals('title', $titleIndex['body']['columns'][0]); - $releaseYearIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $releaseYearIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1234,7 +1234,7 @@ trait DatabasesBase $this->assertCount(1, $releaseYearIndex['body']['columns']); $this->assertEquals('releaseYear', $releaseYearIndex['body']['columns'][0]); - $releaseWithDate1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $releaseWithDate1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1252,7 +1252,7 @@ trait DatabasesBase $this->assertEquals('$createdAt', $releaseWithDate1['body']['columns'][1]); $this->assertEquals('$updatedAt', $releaseWithDate1['body']['columns'][2]); - $releaseWithDate2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $releaseWithDate2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1269,7 +1269,7 @@ trait DatabasesBase $this->assertEquals('birthDay', $releaseWithDate2['body']['columns'][0]); // Test for failure - $fulltextReleaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $fulltextReleaseYear = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1282,7 +1282,7 @@ trait DatabasesBase $this->assertEquals(400, $fulltextReleaseYear['headers']['status-code']); $this->assertEquals($fulltextReleaseYear['body']['message'], 'Attribute "releaseYear" cannot be part of a FULLTEXT index, must be of type string'); - $noAttributes = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $noAttributes = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1295,7 +1295,7 @@ trait DatabasesBase $this->assertEquals(400, $noAttributes['headers']['status-code']); $this->assertEquals($noAttributes['body']['message'], 'No attributes provided for index'); - $duplicates = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $duplicates = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1308,7 +1308,7 @@ trait DatabasesBase $this->assertEquals(400, $duplicates['headers']['status-code']); $this->assertEquals($duplicates['body']['message'], 'Duplicate attributes provided'); - $tooLong = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $tooLong = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1321,7 +1321,7 @@ trait DatabasesBase $this->assertEquals(400, $tooLong['headers']['status-code']); $this->assertStringContainsString('Index length is longer than the maximum', $tooLong['body']['message']); - $fulltextArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $fulltextArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -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']); - $actorsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $actorsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1347,7 +1347,7 @@ trait DatabasesBase // Indexes on array attributes are disabled due to MySQL bug $this->assertEquals(400, $actorsArray['headers']['status-code']); - $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $twoLevelsArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1361,7 +1361,7 @@ trait DatabasesBase // Indexes on array attributes are disabled due to MySQL bug $this->assertEquals(400, $twoLevelsArray['headers']['status-code']); - $unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $unknown = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1374,7 +1374,7 @@ trait DatabasesBase $this->assertEquals(400, $unknown['headers']['status-code']); $this->assertEquals('Unknown column: Unknown. Verify the column name or create the column.', $unknown['body']['message']); - $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1388,7 +1388,7 @@ trait DatabasesBase // Indexes on array attributes are disabled due to MySQL bug $this->assertEquals(400, $index1['headers']['status-code']); - $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1406,7 +1406,7 @@ trait DatabasesBase */ sleep(2); - $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'], array_merge([ + $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1434,7 +1434,7 @@ trait DatabasesBase $tableId = $data['moviesId']; // Test case for valid lengths - $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1447,7 +1447,7 @@ trait DatabasesBase $this->assertEquals(202, $create['headers']['status-code']); // Fetch index and check correct lengths - $index = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$tableId}/indexes/lengthTestIndex", [ + $index = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes/lengthTestIndex", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1457,7 +1457,7 @@ trait DatabasesBase $this->assertEquals([128, 200], $index['body']['lengths']); // Test case for count of lengths greater than attributes (should throw 400) - $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1470,7 +1470,7 @@ trait DatabasesBase $this->assertEquals(400, $create['headers']['status-code']); // Test case for lengths exceeding total of 768 - $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1484,7 +1484,7 @@ trait DatabasesBase $this->assertEquals(400, $create['headers']['status-code']); // Test case for negative length values - $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$tableId}/indexes", [ + $create = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$tableId}/indexes", [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1503,7 +1503,7 @@ trait DatabasesBase public function testListIndexes(array $data): void { $databaseId = $data['databaseId']; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1515,7 +1515,7 @@ trait DatabasesBase ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(2, \count($response['body']['indexes'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1534,7 +1534,7 @@ trait DatabasesBase public function testCreateRow(array $data): array { $databaseId = $data['databaseId']; - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1555,7 +1555,7 @@ trait DatabasesBase ] ]); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1578,7 +1578,7 @@ trait DatabasesBase ] ]); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1601,7 +1601,7 @@ trait DatabasesBase ] ]); - $row4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1672,7 +1672,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; $rowId = ID::unique(); - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1689,14 +1689,14 @@ trait DatabasesBase $this->assertEquals(200, $row['headers']['status-code']); $this->assertCount(3, $row['body']['$permissions']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals('Thor: Ragnarok', $row['body']['title']); - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1714,7 +1714,7 @@ trait DatabasesBase $this->assertEquals(200, $row['headers']['status-code']); $this->assertEquals('Thor: Love and Thunder', $row['body']['title']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -1722,7 +1722,7 @@ trait DatabasesBase $this->assertEquals('Thor: Love and Thunder', $row['body']['title']); // removing permission to read and delete - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1735,7 +1735,7 @@ trait DatabasesBase ], ]); // shouldn't be able to read as no read permission - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -1748,7 +1748,7 @@ trait DatabasesBase break; } // shouldn't be able to delete as no delete permission - $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -1758,7 +1758,7 @@ trait DatabasesBase $this->assertEquals(401, $row['headers']['status-code']); } // giving the delete permission - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1773,14 +1773,14 @@ trait DatabasesBase ], ]); - $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(204, $row['headers']['status-code']); // relationship behaviour - $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1798,7 +1798,7 @@ trait DatabasesBase $this->assertEquals(201, $person['headers']['status-code']); - $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1816,7 +1816,7 @@ trait DatabasesBase $this->assertEquals(201, $library['headers']['status-code']); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1828,7 +1828,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1842,7 +1842,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ + $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1858,7 +1858,7 @@ trait DatabasesBase // upserting values $rowId = ID::unique(); - $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ + $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1881,7 +1881,7 @@ trait DatabasesBase ]); $this->assertEquals('Library 1', $person1['body']['library']['libraryName']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1895,7 +1895,7 @@ trait DatabasesBase $this->assertEquals('Library 1', $rows['body']['rows'][0]['library']['libraryName']); - $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ + $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/'.$rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1919,7 +1919,7 @@ trait DatabasesBase // data should get updated $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1933,7 +1933,7 @@ trait DatabasesBase $this->assertEquals('Library 2', $rows['body']['rows'][0]['library']['libraryName']); // data should get added - $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/'.ID::unique(), array_merge([ + $person1 = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/'.ID::unique(), array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1957,7 +1957,7 @@ trait DatabasesBase $this->assertEquals('Library 2', $person1['body']['library']['libraryName']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1969,7 +1969,7 @@ trait DatabasesBase $this->assertEquals(2, $rows['body']['total']); // test without passing permissions - $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1982,7 +1982,7 @@ trait DatabasesBase $this->assertEquals(200, $row['headers']['status-code']); $this->assertEquals('Thor: Ragnarok', $row['body']['title']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1990,7 +1990,7 @@ trait DatabasesBase $this->assertEquals(200, $row['headers']['status-code']); - $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ + $deleteResponse = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2159,7 +2159,7 @@ trait DatabasesBase public function testListRows(array $data): array { $databaseId = $data['databaseId']; - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2183,7 +2183,7 @@ trait DatabasesBase $this->assertEquals($data['moviesId'], $row['$tableId']); } - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2199,7 +2199,7 @@ trait DatabasesBase $this->assertCount(3, $rows['body']['rows']); // changing description attribute to be null by default instead of empty string - $patchNull = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/columns/string/description', array_merge([ + $patchNull = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/columns/string/description', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2209,7 +2209,7 @@ trait DatabasesBase ]); // creating a dummy doc with null description - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2226,7 +2226,7 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); // fetching docs with cursor after the dummy doc with order attr description which is null - $rowsPaginated = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rowsPaginated = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2239,7 +2239,7 @@ trait DatabasesBase $this->assertEquals(400, $rowsPaginated['headers']['status-code']); // deleting the dummy doc created - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $row1['body']['$id'], array_merge([ + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $row1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2253,7 +2253,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; foreach ($data['rows'] as $row) { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2280,7 +2280,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; $row = $data['rows'][0]; - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $row['$tableId'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2304,7 +2304,7 @@ trait DatabasesBase /** * Test after without order. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2315,7 +2315,7 @@ trait DatabasesBase $this->assertEquals('Spider-Man: Homecoming', $base['body']['rows'][2]['title']); $this->assertCount(3, $base['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2329,7 +2329,7 @@ trait DatabasesBase $this->assertEquals($base['body']['rows'][2]['$id'], $rows['body']['rows'][1]['$id']); $this->assertCount(2, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2344,7 +2344,7 @@ trait DatabasesBase /** * Test with ASC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2359,7 +2359,7 @@ trait DatabasesBase $this->assertEquals(2019, $base['body']['rows'][2]['releaseYear']); $this->assertCount(3, $base['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2376,7 +2376,7 @@ trait DatabasesBase /** * Test with DESC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2391,7 +2391,7 @@ trait DatabasesBase $this->assertEquals(2019, $base['body']['rows'][0]['releaseYear']); $this->assertCount(3, $base['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2408,7 +2408,7 @@ trait DatabasesBase /** * Test after with unknown row. */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2423,7 +2423,7 @@ trait DatabasesBase * Test null value for cursor */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2446,7 +2446,7 @@ trait DatabasesBase /** * Test before without order. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2457,7 +2457,7 @@ trait DatabasesBase $this->assertEquals('Spider-Man: Homecoming', $base['body']['rows'][2]['title']); $this->assertCount(3, $base['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2471,7 +2471,7 @@ trait DatabasesBase $this->assertEquals($base['body']['rows'][1]['$id'], $rows['body']['rows'][1]['$id']); $this->assertCount(2, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2486,7 +2486,7 @@ trait DatabasesBase /** * Test with ASC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2501,7 +2501,7 @@ trait DatabasesBase $this->assertEquals(2019, $base['body']['rows'][2]['releaseYear']); $this->assertCount(3, $base['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2518,7 +2518,7 @@ trait DatabasesBase /** * Test with DESC order and after. */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2533,7 +2533,7 @@ trait DatabasesBase $this->assertEquals(2019, $base['body']['rows'][0]['releaseYear']); $this->assertCount(3, $base['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2556,7 +2556,7 @@ trait DatabasesBase public function testListRowsLimitAndOffset(array $data): array { $databaseId = $data['databaseId']; - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2570,7 +2570,7 @@ trait DatabasesBase $this->assertEquals(1944, $rows['body']['rows'][0]['releaseYear']); $this->assertCount(1, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2595,7 +2595,7 @@ trait DatabasesBase public function testRowsListQueries(array $data): array { $databaseId = $data['databaseId']; - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2608,7 +2608,7 @@ trait DatabasesBase $this->assertEquals(1944, $rows['body']['rows'][0]['releaseYear']); $this->assertCount(1, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2621,7 +2621,7 @@ trait DatabasesBase $this->assertEquals(1944, $rows['body']['rows'][0]['releaseYear']); $this->assertCount(1, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2634,7 +2634,7 @@ trait DatabasesBase $this->assertEquals(2017, $rows['body']['rows'][0]['releaseYear']); $this->assertCount(1, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2648,7 +2648,7 @@ trait DatabasesBase $this->assertEquals(2017, $rows['body']['rows'][1]['releaseYear']); $this->assertCount(2, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2660,7 +2660,7 @@ trait DatabasesBase $this->assertEquals(400, $rows['headers']['status-code']); $this->assertEquals('Invalid query: Syntax error', $rows['body']['message']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2672,7 +2672,7 @@ trait DatabasesBase $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(2, $rows['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2684,7 +2684,7 @@ trait DatabasesBase $this->assertCount(1, $rows['body']['rows']); $this->assertEquals('Captain America', $rows['body']['rows'][0]['title']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2697,7 +2697,7 @@ trait DatabasesBase $this->assertEquals('Spider-Man: Far From Home', $rows['body']['rows'][0]['title']); $this->assertEquals('Spider-Man: Homecoming', $rows['body']['rows'][1]['title']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2708,7 +2708,7 @@ trait DatabasesBase $this->assertCount(3, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2719,7 +2719,7 @@ trait DatabasesBase $this->assertCount(0, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2731,7 +2731,7 @@ trait DatabasesBase $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(3, $rows['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2743,7 +2743,7 @@ trait DatabasesBase $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(0, $rows['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2755,7 +2755,7 @@ trait DatabasesBase $this->assertEquals(400, $rows['headers']['status-code']); $this->assertEquals('Invalid query: Query value is invalid for attribute "birthDay"', $rows['body']['message']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2769,7 +2769,7 @@ trait DatabasesBase $this->assertEquals('1975-06-12T18:12:55.000+00:00', $rows['body']['rows'][1]['birthDay']); $this->assertCount(2, $rows['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2790,7 +2790,7 @@ trait DatabasesBase $conditions[] = $i; } - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2807,7 +2807,7 @@ trait DatabasesBase $value .= "[" . $i . "] Too long title to cross 2k chars query limit "; } - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2820,7 +2820,7 @@ trait DatabasesBase //$this->assertEquals(400, $rows['headers']['status-code']); // Todo: Disabled for CL - Uncomment after ProxyDatabase cleanup for find method - // $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + // $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ // 'content-type' => 'application/json', // 'x-appwrite-project' => $this->getProject()['$id'], // ], $this->getHeaders()), [ @@ -2840,7 +2840,7 @@ trait DatabasesBase public function testUpdateRow(array $data): array { $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2874,7 +2874,7 @@ trait DatabasesBase $this->assertContains(Permission::update(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); $this->assertContains(Permission::delete(Role::user($this->getUser()['$id'])), $row['body']['$permissions']); - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2899,7 +2899,7 @@ trait DatabasesBase $this->assertContains(Permission::update(Role::users()), $row['body']['$permissions']); $this->assertContains(Permission::delete(Role::users()), $row['body']['$permissions']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -2913,7 +2913,7 @@ trait DatabasesBase $this->assertEquals($row['body']['title'], 'Thor: Ragnarok'); $this->assertEquals($row['body']['releaseYear'], 2017); - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timestamp' => DateTime::formatTz(DateTime::now()), @@ -2929,7 +2929,7 @@ trait DatabasesBase * Test for failure */ - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timestamp' => 'invalid', @@ -2943,7 +2943,7 @@ trait DatabasesBase $this->assertEquals('Invalid X-Appwrite-Timestamp header value', $response['body']['message']); $this->assertEquals(Exception::GENERAL_ARGUMENT_INVALID, $response['body']['type']); - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timestamp' => DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -1000)), @@ -2966,7 +2966,7 @@ trait DatabasesBase public function testDeleteRow(array $data): array { $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -2988,21 +2988,21 @@ trait DatabasesBase $this->assertEquals(201, $row['headers']['status-code']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(200, $row['headers']['status-code']); - $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(204, $row['headers']['status-code']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3026,7 +3026,7 @@ trait DatabasesBase $this->assertEquals('InvalidDocumentDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3045,7 +3045,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $email = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email', array_merge([ + $email = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3054,7 +3054,7 @@ trait DatabasesBase 'required' => false, ]); - $enum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + $enum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3064,7 +3064,7 @@ trait DatabasesBase 'required' => false, ]); - $ip = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip', array_merge([ + $ip = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3073,7 +3073,7 @@ trait DatabasesBase 'required' => false, ]); - $url = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url', array_merge([ + $url = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3083,7 +3083,7 @@ trait DatabasesBase 'required' => false, ]); - $range = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $range = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3095,7 +3095,7 @@ trait DatabasesBase ]); // TODO@kodumbeats min and max are rounded in error message - $floatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ + $floatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3106,7 +3106,7 @@ trait DatabasesBase 'max' => 1.4, ]); - $probability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ + $probability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3118,7 +3118,7 @@ trait DatabasesBase 'max' => 1, ]); - $upperBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $upperBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3128,7 +3128,7 @@ trait DatabasesBase 'max' => 10, ]); - $lowerBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $lowerBound = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3142,7 +3142,7 @@ trait DatabasesBase * Test for failure */ - $invalidRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $invalidRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ @@ -3152,7 +3152,7 @@ trait DatabasesBase 'max' => 3, ]); - $defaultArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $defaultArray = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ @@ -3162,7 +3162,7 @@ trait DatabasesBase 'array' => true, ]); - $defaultRequired = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $defaultRequired = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3172,7 +3172,7 @@ trait DatabasesBase 'default' => 12 ]); - $enumDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + $enumDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3182,7 +3182,7 @@ trait DatabasesBase 'default' => 'south' ]); - $enumDefaultStrict = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + $enumDefaultStrict = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3192,7 +3192,7 @@ trait DatabasesBase 'default' => 'NORTH' ]); - $goodDatetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ + $goodDatetime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3202,7 +3202,7 @@ trait DatabasesBase 'default' => null ]); - $datetimeDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ + $datetimeDefault = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3234,7 +3234,7 @@ trait DatabasesBase // wait for worker to add attributes sleep(3); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -3246,7 +3246,7 @@ trait DatabasesBase * Test for successful validation */ - $goodEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3261,7 +3261,7 @@ trait DatabasesBase ] ]); - $goodEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3276,7 +3276,7 @@ trait DatabasesBase ] ]); - $goodIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3291,7 +3291,7 @@ trait DatabasesBase ] ]); - $goodUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3306,7 +3306,7 @@ trait DatabasesBase ] ]); - $goodRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3321,7 +3321,7 @@ trait DatabasesBase ] ]); - $goodFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3336,7 +3336,7 @@ trait DatabasesBase ] ]); - $goodProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $goodProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3351,7 +3351,7 @@ trait DatabasesBase ] ]); - $notTooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $notTooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3366,7 +3366,7 @@ trait DatabasesBase ] ]); - $notTooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $notTooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3395,7 +3395,7 @@ trait DatabasesBase * Test that custom validators reject documents */ - $badEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badEmail = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3410,7 +3410,7 @@ trait DatabasesBase ] ]); - $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badEnum = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3425,7 +3425,7 @@ trait DatabasesBase ] ]); - $badIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badIp = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3440,7 +3440,7 @@ trait DatabasesBase ] ]); - $badUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badUrl = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3455,7 +3455,7 @@ trait DatabasesBase ] ]); - $badRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3470,7 +3470,7 @@ trait DatabasesBase ] ]); - $badFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badFloatRange = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3485,7 +3485,7 @@ trait DatabasesBase ] ]); - $badProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badProbability = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3500,7 +3500,7 @@ trait DatabasesBase ] ]); - $tooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $tooHigh = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3515,7 +3515,7 @@ trait DatabasesBase ] ]); - $tooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $tooLow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3530,7 +3530,7 @@ trait DatabasesBase ] ]); - $badTime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $badTime = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3571,7 +3571,7 @@ trait DatabasesBase public function testDefaultPermissions(array $data): array { $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3604,7 +3604,7 @@ trait DatabasesBase // Updated Permissions - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3632,7 +3632,7 @@ trait DatabasesBase Permission::update(Role::user($this->getUser()['$id'])), ], $row['body']['$permissions']); - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3649,7 +3649,7 @@ trait DatabasesBase // Reset Permissions - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3668,7 +3668,7 @@ trait DatabasesBase $this->assertEquals([], $row['body']['$permissions']); // Check client side can no longer read the row. - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3700,7 +3700,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; $user = $this->getUser()['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3724,7 +3724,7 @@ trait DatabasesBase sleep(2); - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3740,7 +3740,7 @@ trait DatabasesBase // wait for db to add attribute sleep(2); - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3756,7 +3756,7 @@ trait DatabasesBase // wait for db to add attribute sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3773,7 +3773,7 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3789,7 +3789,7 @@ trait DatabasesBase $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3806,7 +3806,7 @@ trait DatabasesBase $this->assertEquals(201, $row3['headers']['status-code']); - $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3815,7 +3815,7 @@ trait DatabasesBase $this->assertEquals(3, $rowsUser1['body']['total']); $this->assertCount(3, $rowsUser1['body']['rows']); - $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ + $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -3846,7 +3846,7 @@ trait DatabasesBase ]); $session2 = $session2['cookies']['a_session_' . $this->getProject()['$id']]; - $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ + $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3856,7 +3856,7 @@ trait DatabasesBase // Current user has no table permissions but has read permission for this row $this->assertEquals(200, $row3GetWithDocumentRead['headers']['status-code']); - $row2GetFailure = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row2['body']['$id'], [ + $row2GetFailure = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row2['body']['$id'], [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3866,7 +3866,7 @@ trait DatabasesBase // Current user has no table or row permissions for this row $this->assertEquals(404, $row2GetFailure['headers']['status-code']); - $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3893,7 +3893,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; $user = $this->getUser()['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3914,7 +3914,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $attribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3929,7 +3929,7 @@ trait DatabasesBase \sleep(2); - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3944,7 +3944,7 @@ trait DatabasesBase \sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3961,7 +3961,7 @@ trait DatabasesBase $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -3977,7 +3977,7 @@ trait DatabasesBase $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3994,7 +3994,7 @@ trait DatabasesBase $this->assertEquals(201, $row3['headers']['status-code']); - $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $rowsUser1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4003,7 +4003,7 @@ trait DatabasesBase $this->assertEquals(3, $rowsUser1['body']['total']); $this->assertCount(3, $rowsUser1['body']['rows']); - $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ + $row3GetWithCollectionRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4034,7 +4034,7 @@ trait DatabasesBase ]); $session2 = $session2['cookies']['a_session_' . $this->getProject()['$id']]; - $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ + $row3GetWithDocumentRead = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row3['body']['$id'], [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4044,7 +4044,7 @@ trait DatabasesBase // other2 has no table permissions and row permissions are disabled $this->assertEquals(404, $row3GetWithDocumentRead['headers']['status-code']); - $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4055,7 +4055,7 @@ trait DatabasesBase $this->assertEquals(401, $rowsUser2['headers']['status-code']); // Enable row permissions - $this->client->call(CLient::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $tableId, [ + $this->client->call(CLient::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $tableId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4064,7 +4064,7 @@ trait DatabasesBase 'rowSecurity' => true, ]); - $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', [ + $rowsUser2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -4082,7 +4082,7 @@ trait DatabasesBase public function testUniqueIndexDuplicate(array $data): array { $databaseId = $data['databaseId']; - $uniqueIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/indexes', array_merge([ + $uniqueIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4097,7 +4097,7 @@ trait DatabasesBase sleep(2); // test for failure - $duplicate = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $duplicate = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4120,7 +4120,7 @@ trait DatabasesBase $this->assertEquals(409, $duplicate['headers']['status-code']); // Test for exception when updating row to conflict - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4143,7 +4143,7 @@ trait DatabasesBase $this->assertEquals(201, $row['headers']['status-code']); // Test for exception when updating row to conflict - $duplicate = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/rows/' . $row['body']['$id'], array_merge([ + $duplicate = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4182,7 +4182,7 @@ trait DatabasesBase 'x-appwrite-key' => $this->getProject()['apiKey'] ]; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows', $headers, [ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows', $headers, [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Creation Date Test', @@ -4198,7 +4198,7 @@ trait DatabasesBase \sleep(1); - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ 'data' => [ 'title' => 'Updated Date Test', ] @@ -4212,7 +4212,7 @@ trait DatabasesBase \sleep(1); - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ 'data' => [ 'title' => 'Again Updated Date Test', '$createdAt' => '2022-08-01 13:09:23.040', // $createdAt is not updatable @@ -4246,7 +4246,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create table - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4268,7 +4268,7 @@ trait DatabasesBase $moviesId = $movies['body']['$id']; // create attribute - $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/columns/string', array_merge([ + $title = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4284,7 +4284,7 @@ trait DatabasesBase sleep(2); // add row - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4308,7 +4308,7 @@ trait DatabasesBase $this->assertContains(Permission::delete(Role::any()), $row['body']['$permissions']); // Send only read permission - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4321,7 +4321,7 @@ trait DatabasesBase $this->assertCount(1, $row['body']['$permissions']); // Send only mutation permissions - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows/' . $id, array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4339,7 +4339,7 @@ trait DatabasesBase } // remove table - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $moviesId, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $moviesId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4357,7 +4357,7 @@ trait DatabasesBase /** * Test for SUCCESS */ - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4370,7 +4370,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; - $true = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ + $true = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4382,7 +4382,7 @@ trait DatabasesBase $this->assertEquals(202, $true['headers']['status-code']); - $false = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ + $false = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4402,7 +4402,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $person = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4420,7 +4420,7 @@ trait DatabasesBase $this->assertEquals(201, $person['headers']['status-code']); - $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $library = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4437,7 +4437,7 @@ trait DatabasesBase $this->assertEquals(201, $library['headers']['status-code']); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4449,7 +4449,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4463,7 +4463,7 @@ trait DatabasesBase sleep(1); // Wait for worker - $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ + $libraryName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $library['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4481,7 +4481,7 @@ trait DatabasesBase $this->assertEquals('relationship', $relation['body']['type']); $this->assertEquals('processing', $relation['body']['status']); - $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4496,7 +4496,7 @@ trait DatabasesBase $this->assertEquals('person', $columns[1]['twoWayKey']); $this->assertEquals(Database::RELATION_MUTATE_CASCADE, $columns[1]['onDelete']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$person['body']['$id']}/columns/library", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$person['body']['$id']}/columns/library", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4513,7 +4513,7 @@ trait DatabasesBase $this->assertEquals('person', $attribute['body']['twoWayKey']); $this->assertEquals(Database::RELATION_MUTATE_CASCADE, $attribute['body']['onDelete']); - $person1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $person1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4537,7 +4537,7 @@ trait DatabasesBase $this->assertEquals('Library 1', $person1['body']['library']['libraryName']); // Create without nested ID - $person2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $person2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4568,7 +4568,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('$internalId', $person1['body']); $this->assertArrayNotHasKey('$internalId', $person1['body']['library']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4582,7 +4582,7 @@ trait DatabasesBase $this->assertEquals('Library 1', $rows['body']['rows'][0]['library']['libraryName']); $this->assertArrayHasKey('fullName', $rows['body']['rows'][0]); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4594,7 +4594,7 @@ trait DatabasesBase $this->assertEquals(400, $rows['headers']['status-code']); $this->assertEquals('Invalid query: Cannot query nested attribute on: library', $rows['body']['message']); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/columns/library', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/columns/library', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4604,7 +4604,7 @@ trait DatabasesBase $this->assertEquals(204, $response['headers']['status-code']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$person['body']['$id']}/columns/library", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$person['body']['$id']}/columns/library", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4612,7 +4612,7 @@ trait DatabasesBase $this->assertEquals(404, $attribute['headers']['status-code']); - $person1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $person['body']['$id'] . '/rows/' . $person1['body']['$id'], array_merge([ + $person1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $person['body']['$id'] . '/rows/' . $person1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4620,7 +4620,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('library', $person1['body']); //Test Deletion of related twoKey - $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $library['body']['$id'] . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $library['body']['$id'] . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4647,7 +4647,7 @@ trait DatabasesBase $libraryCollection = $data['libraryCollection']; // One person can own several libraries - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $personCollection . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4661,7 +4661,7 @@ trait DatabasesBase sleep(1); - $libraryAttributesResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $libraryCollection . '/columns', array_merge([ + $libraryAttributesResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $libraryCollection . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4671,7 +4671,7 @@ trait DatabasesBase $this->assertEquals(2, $libraryAttributesResponse['body']['total']); $this->assertEquals('person_one_to_many', $libraryAttributesResponse['body']['columns'][1]['key']); - $libraryCollectionResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $libraryCollection, array_merge([ + $libraryCollectionResponse = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $libraryCollection, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4680,7 +4680,7 @@ trait DatabasesBase $this->assertIsArray($libraryCollectionResponse['body']['columns']); $this->assertCount(2, $libraryCollectionResponse['body']['columns']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$personCollection}/columns/libraries", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$personCollection}/columns/libraries", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4697,7 +4697,7 @@ trait DatabasesBase $this->assertEquals('person_one_to_many', $attribute['body']['twoWayKey']); $this->assertEquals('restrict', $attribute['body']['onDelete']); - $person2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $personCollection . '/rows', array_merge([ + $person2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4736,7 +4736,7 @@ trait DatabasesBase $this->assertArrayHasKey('libraries', $person2['body']); $this->assertEquals(2, count($person2['body']['libraries'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $personCollection . '/rows/' . $person2['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/rows/' . $person2['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4750,7 +4750,7 @@ trait DatabasesBase $this->assertArrayHasKey('libraries', $response['body']); $this->assertEquals(2, count($response['body']['libraries'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $libraryCollection . '/rows/library11', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $libraryCollection . '/rows/library11', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4763,7 +4763,7 @@ trait DatabasesBase $this->assertArrayHasKey('person_one_to_many', $response['body']); $this->assertEquals('person10', $response['body']['person_one_to_many']['$id']); - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $personCollection . '/columns/libraries/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $personCollection . '/columns/libraries/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4773,7 +4773,7 @@ trait DatabasesBase $this->assertEquals(200, $response['headers']['status-code']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$personCollection}/columns/libraries", array_merge([ + $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$personCollection}/columns/libraries", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4800,7 +4800,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; // Create album table - $albums = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $albums = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4815,7 +4815,7 @@ trait DatabasesBase ]); // Create album name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4826,7 +4826,7 @@ trait DatabasesBase ]); // Create artist table - $artists = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $artists = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4841,7 +4841,7 @@ trait DatabasesBase ]); // Create artist name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $artists['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $artists['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4852,7 +4852,7 @@ trait DatabasesBase ]); // Create relationship - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4882,7 +4882,7 @@ trait DatabasesBase ]; // Create album - $album = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/rows', array_merge([ + $album = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4904,7 +4904,7 @@ trait DatabasesBase $this->assertEquals($permissions, $album['body']['$permissions']); $this->assertEquals($permissions, $album['body']['artist']['$permissions']); - $album = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $albums['body']['$id'] . '/rows/album1', array_merge([ + $album = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $albums['body']['$id'] . '/rows/album1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4920,7 +4920,7 @@ trait DatabasesBase $this->assertEquals($permissions, $album['body']['$permissions']); $this->assertEquals($permissions, $album['body']['artist']['$permissions']); - $artist = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $artists['body']['$id'] . '/rows/' . $album['body']['artist']['$id'], array_merge([ + $artist = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $artists['body']['$id'] . '/rows/' . $album['body']['artist']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4952,7 +4952,7 @@ trait DatabasesBase $databaseId = $data['databaseId']; // Create sports table - $sports = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $sports = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4967,7 +4967,7 @@ trait DatabasesBase ]); // Create sport name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4978,7 +4978,7 @@ trait DatabasesBase ]); // Create player table - $players = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $players = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4993,7 +4993,7 @@ trait DatabasesBase ]); // Create player name attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $players['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $players['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5004,7 +5004,7 @@ trait DatabasesBase ]); // Create relationship - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5035,7 +5035,7 @@ trait DatabasesBase ]; // Create sport - $sport = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/rows', array_merge([ + $sport = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5065,7 +5065,7 @@ trait DatabasesBase $this->assertEquals($permissions, $sport['body']['players'][0]['$permissions']); $this->assertEquals($permissions, $sport['body']['players'][1]['$permissions']); - $sport = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $sports['body']['$id'] . '/rows/sport1', array_merge([ + $sport = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $sports['body']['$id'] . '/rows/sport1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5083,7 +5083,7 @@ trait DatabasesBase $this->assertEquals($permissions, $sport['body']['players'][0]['$permissions']); $this->assertEquals($permissions, $sport['body']['players'][1]['$permissions']); - $player = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $players['body']['$id'] . '/rows/' . $sport['body']['players'][0]['$id'], array_merge([ + $player = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $players['body']['$id'] . '/rows/' . $sport['body']['players'][0]['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5112,7 +5112,7 @@ trait DatabasesBase */ public function testValidateOperators(array $data): void { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5131,7 +5131,7 @@ trait DatabasesBase $this->assertEquals('Stevie Wonder', $response['body']['rows'][0]['fullName']); $this->assertEquals(2, count($response['body']['rows'][0]['libraries'])); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5155,7 +5155,7 @@ trait DatabasesBase */ public function testSelectQueries(array $data): void { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5170,7 +5170,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('$databaseId', $response['body']['rows'][0]); $this->assertArrayNotHasKey('$tableId', $response['body']['rows'][0]); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5184,7 +5184,7 @@ trait DatabasesBase $this->assertArrayNotHasKey('$databaseId', $row); $this->assertArrayNotHasKey('$tableId', $row); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['personCollection'] . '/rows/' . $row['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['personCollection'] . '/rows/' . $row['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5221,7 +5221,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; // Create Collection - $presidents = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $presidents = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5238,7 +5238,7 @@ trait DatabasesBase $this->assertEquals($presidents['body']['name'], 'USA Presidents'); // Create Attributes - $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ + $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5249,7 +5249,7 @@ trait DatabasesBase ]); $this->assertEquals(202, $firstName['headers']['status-code']); - $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5264,7 +5264,7 @@ trait DatabasesBase // Wait for worker sleep(2); - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5279,7 +5279,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row1['headers']['status-code']); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5294,7 +5294,7 @@ trait DatabasesBase ]); $this->assertEquals(201, $row2['headers']['status-code']); - $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5312,7 +5312,7 @@ trait DatabasesBase $rows = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/tables/' . $presidents['body']['$id'] . '/rows', + '/databases/' . $databaseId . '/grids/tables/' . $presidents['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -5344,7 +5344,7 @@ trait DatabasesBase { $databaseId = $data['databaseId']; - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5358,7 +5358,7 @@ trait DatabasesBase ], ]); - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5375,7 +5375,7 @@ trait DatabasesBase $table1 = $table1['body']['$id']; $table2 = $table2['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1 . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5385,7 +5385,7 @@ trait DatabasesBase 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table2 . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table2 . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5395,7 +5395,7 @@ trait DatabasesBase 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1 . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5408,7 +5408,7 @@ trait DatabasesBase sleep(1); - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1 . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -5423,7 +5423,7 @@ trait DatabasesBase ], ]); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1 . '/rows/' . $row['body']['$id'], array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -5440,7 +5440,7 @@ trait DatabasesBase */ public function testTimeout(array $data): void { - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5460,7 +5460,7 @@ trait DatabasesBase 'databaseId' => $table['body']['databaseId'] ]; - $longtext = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/columns/string', array_merge([ + $longtext = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5474,7 +5474,7 @@ trait DatabasesBase $this->assertEquals($longtext['headers']['status-code'], 202); for ($i = 0; $i < 10; $i++) { - $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5490,7 +5490,7 @@ trait DatabasesBase ]); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-timeout' => 1, @@ -5518,7 +5518,7 @@ trait DatabasesBase ]); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5534,7 +5534,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; // Add integer attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5546,7 +5546,7 @@ trait DatabasesBase \sleep(3); // Create row with initial count = 5 - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5564,7 +5564,7 @@ trait DatabasesBase $docId = $doc['body']['$id']; // Increment by default 1 - $inc = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/tables/$tableId/rows/$docId/count/increment", array_merge([ + $inc = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$docId/count/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); @@ -5572,14 +5572,14 @@ trait DatabasesBase $this->assertEquals(6, $inc['body']['count']); // Verify count = 6 - $get = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/tables/$tableId/rows/$docId", array_merge([ + $get = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/grids/tables/$tableId/rows/$docId", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(6, $get['body']['count']); // Increment by custom value 4 - $inc2 = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/tables/$tableId/rows/$docId/count/increment", array_merge([ + $inc2 = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$docId/count/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), [ @@ -5588,21 +5588,21 @@ trait DatabasesBase $this->assertEquals(200, $inc2['headers']['status-code']); $this->assertEquals(10, $inc2['body']['count']); - $get2 = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/tables/$tableId/rows/$docId", array_merge([ + $get2 = $this->client->call(Client::METHOD_GET, "/databases/$databaseId/grids/tables/$tableId/rows/$docId", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(10, $get2['body']['count']); // Test max limit exceeded - $err = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/tables/$tableId/rows/$docId/count/increment", array_merge([ + $err = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$docId/count/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), ['max' => 8]); $this->assertEquals(400, $err['headers']['status-code']); // Test attribute not found - $notFound = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/tables/$tableId/rows/$docId/unknown/increment", array_merge([ + $notFound = $this->client->call(Client::METHOD_PATCH, "/databases/$databaseId/grids/tables/$tableId/rows/$docId/unknown/increment", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); @@ -5622,7 +5622,7 @@ trait DatabasesBase $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5639,7 +5639,7 @@ trait DatabasesBase $tableId = $table['body']['$id']; // Add integer attribute - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5651,7 +5651,7 @@ trait DatabasesBase \sleep(2); // Create row with initial count = 10 - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5666,21 +5666,21 @@ trait DatabasesBase $rowId = $doc['body']['$id']; // Decrement by default 1 (count = 10 -> 9) - $dec = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $dec = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); $this->assertEquals(200, $dec['headers']['status-code']); $this->assertEquals(9, $dec['body']['count']); - $get = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + $get = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(9, $get['body']['count']); // Decrement by custom value 3 (count 9 -> 6) - $dec2 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $dec2 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), [ @@ -5689,21 +5689,21 @@ trait DatabasesBase $this->assertEquals(200, $dec2['headers']['status-code']); $this->assertEquals(6, $dec2['body']['count']); - $get2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + $get2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); $this->assertEquals(6, $get2['body']['count']); // Test min limit exceeded - $err = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $err = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), ['min' => 7]); $this->assertEquals(400, $err['headers']['status-code']); // Test type error on non-numeric attribute - $typeErr = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ + $typeErr = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId . '/count/decrement', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]), ['value' => 'not-a-number']); diff --git a/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php b/tests/e2e/Services/Databases/Grids/DatabasesConsoleClientTest.php similarity index 91% rename from tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php rename to tests/e2e/Services/Databases/Grids/DatabasesConsoleClientTest.php index 8a8d8de170..32fe49b6fa 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesConsoleClientTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesConsoleClientTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Tables; +namespace Tests\E2E\Services\Databases\Grids; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -34,7 +34,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test for SUCCESS */ - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -65,7 +65,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertFalse($database['body']['enabled']); - $tvShows = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $tvShows = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -83,7 +83,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test when table is disabled but can still modify tables */ - $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $movies['body']['$id'], array_merge([ + $database = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $movies['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -109,7 +109,7 @@ class DatabasesConsoleClientTest extends Scope */ $databaseId = $data['databaseId']; - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders())); @@ -131,7 +131,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test when database and table are disabled but can still call get table */ - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $moviesCollectionId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $moviesCollectionId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -156,7 +156,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test When database and table are disabled but can still call update table */ - $table = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $moviesCollectionId, array_merge([ + $table = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $moviesCollectionId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -184,7 +184,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test when database and table are disabled but can still call delete table */ - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tvShowsId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tvShowsId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -245,7 +245,7 @@ class DatabasesConsoleClientTest extends Scope * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/usage', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -254,7 +254,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/randomCollectionId/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/randomCollectionId/usage', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -266,7 +266,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test for SUCCESS */ - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/usage', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/usage', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), [ @@ -289,7 +289,7 @@ class DatabasesConsoleClientTest extends Scope /** * Test for SUCCESS */ - $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/logs', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -298,7 +298,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertIsArray($logs['body']['logs']); $this->assertIsNumeric($logs['body']['total']); - $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/logs', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -310,7 +310,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertLessThanOrEqual(1, count($logs['body']['logs'])); $this->assertIsNumeric($logs['body']['total']); - $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/logs', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -321,7 +321,7 @@ class DatabasesConsoleClientTest extends Scope $this->assertIsArray($logs['body']['logs']); $this->assertIsNumeric($logs['body']['total']); - $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['moviesId'] . '/logs', array_merge([ + $logs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['moviesId'] . '/logs', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ diff --git a/tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php similarity index 89% rename from tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php rename to tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php index 6893588934..e75039b22e 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Tables; +namespace Tests\E2E\Services\Databases\Grids; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -35,7 +35,7 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; // Collection aliases write to create, update, delete - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -54,7 +54,7 @@ class DatabasesCustomClientTest extends Scope $this->assertContains(Permission::update(Role::user($this->getUser()['$id'])), $movies['body']['$permissions']); $this->assertContains(Permission::delete(Role::user($this->getUser()['$id'])), $movies['body']['$permissions']); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/columns/string', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -69,7 +69,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(202, $response['headers']['status-code']); // Document aliases write to update, delete - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -91,7 +91,7 @@ class DatabasesCustomClientTest extends Scope */ // Document does not allow create permission - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -133,7 +133,7 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; // Create collection - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -146,7 +146,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); // Add attribute to collection - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/permissionCheck/columns/string', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/permissionCheck/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -161,7 +161,7 @@ class DatabasesCustomClientTest extends Scope sleep(2); // Creating document by server, give read permission to our user + some other user - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/permissionCheck/rows', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/permissionCheck/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -182,7 +182,7 @@ class DatabasesCustomClientTest extends Scope // Update document // This is the point of this test. We should be allowed to do this action, and it should not fail on permission check - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -194,7 +194,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); // Get name of the document, should be the new one - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/permissionCheck/rows/permissionCheckDocument', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -203,7 +203,7 @@ class DatabasesCustomClientTest extends Scope // Cleanup to prevent collision with other tests // Delete collection - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/permissionCheck', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/permissionCheck', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -216,7 +216,7 @@ class DatabasesCustomClientTest extends Scope sleep(2); // Make sure collection has been deleted - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/permissionCheck', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/permissionCheck', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -242,7 +242,7 @@ class DatabasesCustomClientTest extends Scope // Creating collection 1 - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -259,7 +259,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating collection 2 - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -278,7 +278,7 @@ class DatabasesCustomClientTest extends Scope \sleep(2); // Creating two way relationship between collection 1 and collection 2 from collection 1 - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -294,7 +294,7 @@ class DatabasesCustomClientTest extends Scope \sleep(3); // Update relation from collection 2 to on delete restrict - $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/columns/' . $table1['body']['$id'] . '/relationship', array_merge([ + $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/columns/' . $table1['body']['$id'] . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -303,7 +303,7 @@ class DatabasesCustomClientTest extends Scope ]); // Fetching attributes after updating relation to compare - $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'], [ + $table1Attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'], [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -330,7 +330,7 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -346,7 +346,7 @@ class DatabasesCustomClientTest extends Scope ] ]); - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -364,7 +364,7 @@ class DatabasesCustomClientTest extends Scope \sleep(2); - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -382,7 +382,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(202, $relation['headers']['status-code']); $this->assertEquals('same_key', $relation['body']['twoWayKey']); - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -401,7 +401,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals('Attribute with the requested key already exists. Attribute keys must be unique, try again with a different key.', $relation['body']['message']); // twoWayKey is null TwoWayKey is default - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -419,7 +419,7 @@ class DatabasesCustomClientTest extends Scope $this->assertArrayHasKey('twoWayKey', $relation['body']); // twoWayKey is null, TwoWayKey is default, second POST - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -437,7 +437,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(409, $relation['body']['code']); // RelationshipManyToMany - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -456,7 +456,7 @@ class DatabasesCustomClientTest extends Scope $this->assertArrayHasKey('twoWayKey', $relation['body']); // Second RelationshipManyToMany on Same collections - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -490,7 +490,7 @@ class DatabasesCustomClientTest extends Scope $databaseId = $database['body']['$id']; // Creating collection 1 - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -506,7 +506,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating collection 2 - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -519,7 +519,7 @@ class DatabasesCustomClientTest extends Scope ] ]); - $table3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -534,7 +534,7 @@ class DatabasesCustomClientTest extends Scope ] ]); - $table4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -547,7 +547,7 @@ class DatabasesCustomClientTest extends Scope ] ]); - $table5 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table5 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -563,7 +563,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating one to one relationship from collection 1 to colletion 2 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -576,7 +576,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating one to one relationship from collection 2 to colletion 3 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -589,7 +589,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating one to one relationship from collection 3 to colletion 4 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table3['body']['$id'] . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table3['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -602,7 +602,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating one to one relationship from collection 4 to colletion 5 - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table4['body']['$id'] . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table4['body']['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -614,7 +614,7 @@ class DatabasesCustomClientTest extends Scope 'key' => $table5['body']['$id'] ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -626,7 +626,7 @@ class DatabasesCustomClientTest extends Scope 'default' => null, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -638,7 +638,7 @@ class DatabasesCustomClientTest extends Scope 'default' => null, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table3['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table3['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -650,7 +650,7 @@ class DatabasesCustomClientTest extends Scope 'default' => null, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table4['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table4['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -662,7 +662,7 @@ class DatabasesCustomClientTest extends Scope 'default' => null, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table5['body']['$id'] . '/columns/string', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table5['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -676,7 +676,7 @@ class DatabasesCustomClientTest extends Scope \sleep(2); // Creating parent document with a child reference to test the permissions - $parentDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows', array_merge([ + $parentDocument = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -705,7 +705,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(201, $parentDocument['headers']['status-code']); // This is the point of the test. We should not need any authorization permission to update the document with same data. - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -734,7 +734,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals($parentDocument['body'], $response['body']); // Giving update permission of collection 3 to user. - $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/collection3', array_merge([ + $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/collection3', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -751,7 +751,7 @@ class DatabasesCustomClientTest extends Scope ]); // This is the point of this test. We should be allowed to do this action, and it should not fail on permission check - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -780,7 +780,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(11, $response['body'][$table2['body']['$id']]['collection3']['Rating']); // We should not be allowed to update the document as we do not have permission for collection 2. - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -797,7 +797,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(401, $response['headers']['status-code']); // We should not be allowed to update the document as we do not have permission for collection 2. - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table2['body']['$id'] . '/rows/' . $table2['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table2['body']['$id'] . '/rows/' . $table2['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -809,7 +809,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(401, $response['headers']['status-code']); // Removing update permission from collection 3. - $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/collection3', array_merge([ + $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/collection3', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -825,7 +825,7 @@ class DatabasesCustomClientTest extends Scope ]); // Giving update permission to collection 2. - $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/collection2', array_merge([ + $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/collection2', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -842,7 +842,7 @@ class DatabasesCustomClientTest extends Scope ]); // Creating collection 3 new document - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table3['body']['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table3['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -856,7 +856,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); // We should be allowed to link a new document from collection 3 to collection 2. - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -873,7 +873,7 @@ class DatabasesCustomClientTest extends Scope // We should be allowed to link and create a new document from collection 3 to collection 2. - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1['body']['$id'] . '/rows/' . $table1['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ diff --git a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php similarity index 87% rename from tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php rename to tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php index 99f1b58c01..ba137a0b74 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Tables; +namespace Tests\E2E\Services\Databases\Grids; use Appwrite\Extend\Exception as AppwriteException; use Tests\E2E\Client; @@ -352,7 +352,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for SUCCESS */ - $test1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $test1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -368,7 +368,7 @@ class DatabasesCustomServerTest extends Scope 'rowSecurity' => true, ]); - $test2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $test2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -384,7 +384,7 @@ class DatabasesCustomServerTest extends Scope 'rowSecurity' => true, ]); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -397,7 +397,7 @@ class DatabasesCustomServerTest extends Scope $base = array_reverse($tables['body']['tables']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -409,7 +409,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $tables['headers']['status-code']); $this->assertCount(1, $tables['body']['tables']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -421,7 +421,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $tables['headers']['status-code']); $this->assertCount(1, $tables['body']['tables']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -433,7 +433,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $tables['headers']['status-code']); $this->assertCount(2, $tables['body']['tables']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -448,7 +448,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for Order */ - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -464,12 +464,12 @@ class DatabasesCustomServerTest extends Scope /** * Test for After */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -481,7 +481,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(1, $tables['body']['tables']); $this->assertEquals($base['body']['tables'][1]['$id'], $tables['body']['tables'][0]['$id']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -496,12 +496,12 @@ class DatabasesCustomServerTest extends Scope /** * Test for Before */ - $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $base = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -513,7 +513,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(1, $tables['body']['tables']); $this->assertEquals($base['body']['tables'][0]['$id'], $tables['body']['tables'][0]['$id']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -528,7 +528,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for Search */ - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -538,7 +538,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(1, $tables['body']['total']); $this->assertEquals('first', $tables['body']['tables'][0]['$id']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -549,7 +549,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('Test 1', $tables['body']['tables'][0]['name']); $this->assertEquals('Test 2', $tables['body']['tables'][1]['name']); - $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $tables = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -561,7 +561,7 @@ class DatabasesCustomServerTest extends Scope /** * Test for FAILURE */ - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables', array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -573,7 +573,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // This table already exists - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -604,7 +604,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -624,7 +624,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $table = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -652,7 +652,7 @@ class DatabasesCustomServerTest extends Scope */ // Create table - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -675,7 +675,7 @@ class DatabasesCustomServerTest extends Scope * Test for creating encrypted columns */ - $columnsPath = '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns'; + $columnsPath = '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/columns'; $firstName = $this->client->call(Client::METHOD_POST, $columnsPath . '/string', array_merge([ 'content-type' => 'application/json', @@ -714,7 +714,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Creating row to ensure cache is purged on schema change - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -732,7 +732,7 @@ class DatabasesCustomServerTest extends Scope ]); // Check row to ensure cache is purged on schema change - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -762,7 +762,7 @@ class DatabasesCustomServerTest extends Scope */ // Create table - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -781,7 +781,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $actors['headers']['status-code']); $this->assertEquals($actors['body']['name'], 'Actors'); - $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -791,7 +791,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -801,7 +801,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $unneeded = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ + $unneeded = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -815,7 +815,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Creating row to ensure cache is purged on schema change - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -833,7 +833,7 @@ class DatabasesCustomServerTest extends Scope ], ]); - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -848,7 +848,7 @@ class DatabasesCustomServerTest extends Scope // Wait for database worker to finish creating index sleep(2); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -866,7 +866,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($table['body']['indexes'][0]['key'], $index['body']['key']); // Delete column - $column = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/columns/' . $unneededId, array_merge([ + $column = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/columns/' . $unneededId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -877,7 +877,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Check row to ensure cache is purged on schema change - $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'] . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -885,7 +885,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotContains($unneededId, $row['body']); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -910,7 +910,7 @@ class DatabasesCustomServerTest extends Scope public function testDeleteIndex($data): array { $databaseId = $data['databaseId']; - $index = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/indexes/' . $data['key'], array_merge([ + $index = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/indexes/' . $data['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -921,7 +921,7 @@ class DatabasesCustomServerTest extends Scope // Wait for database worker to finish deleting index sleep(2); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['tableId'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -938,7 +938,7 @@ class DatabasesCustomServerTest extends Scope public function testDeleteIndexOnDeleteColumn($data) { $databaseId = $data['databaseId']; - $column1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ + $column1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -948,7 +948,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $column2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/string', array_merge([ + $column2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -965,7 +965,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); - $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -976,7 +976,7 @@ class DatabasesCustomServerTest extends Scope 'orders' => ['ASC', 'ASC'], ]); - $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -994,7 +994,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Expected behavior: deleting column2 will cause index2 to be dropped, and index1 rebuilt with a single key - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/' . $column2['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/columns/' . $column2['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1005,7 +1005,7 @@ class DatabasesCustomServerTest extends Scope // wait for database worker to complete sleep(2); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $data['tableId'], array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1020,7 +1020,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($column1['body']['key'], $table['body']['indexes'][0]['columns'][0]); // Delete column - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['tableId'] . '/columns/' . $column1['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['tableId'] . '/columns/' . $column1['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1045,7 +1045,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('invalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1066,7 +1066,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $table['body']['$id']; - $column1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $column1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1076,7 +1076,7 @@ class DatabasesCustomServerTest extends Scope 'required' => true, ]); - $column2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $column2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1093,7 +1093,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); - $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + $index1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1104,7 +1104,7 @@ class DatabasesCustomServerTest extends Scope 'orders' => ['ASC', 'ASC'], ]); - $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + $index2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1122,7 +1122,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); // Expected behavior: deleting column1 would cause index1 to be a duplicate of index2 and automatically removed - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $column1['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $column1['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1133,7 +1133,7 @@ class DatabasesCustomServerTest extends Scope // wait for database worker to complete sleep(2); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1148,7 +1148,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($column2['body']['key'], $table['body']['indexes'][0]['columns'][0]); // Delete column - $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $column2['body']['key'], array_merge([ + $deleted = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $column2['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1166,7 +1166,7 @@ class DatabasesCustomServerTest extends Scope $tableId = $data['tableId']; // Add Rows to the table - $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $row1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1182,7 +1182,7 @@ class DatabasesCustomServerTest extends Scope ], ]); - $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', array_merge([ + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -1211,7 +1211,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('Jackson', $row2['body']['lastName']); // Delete the actors table - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1221,7 +1221,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($response['body'], ""); // Try to get the table and check if it has been deleted - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders())); @@ -1244,7 +1244,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1255,7 +1255,7 @@ class DatabasesCustomServerTest extends Scope 'permissions' => [], ]); - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1269,7 +1269,7 @@ class DatabasesCustomServerTest extends Scope $table1 = $table1['body']['$id']; $table2 = $table2['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1 . '/columns/relationship', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1282,7 +1282,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $table2, array_merge([ + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $table2, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1290,7 +1290,7 @@ class DatabasesCustomServerTest extends Scope sleep(2); - $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1 . '/columns', array_merge([ + $columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1 . '/columns', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -1313,7 +1313,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('invalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1336,7 +1336,7 @@ class DatabasesCustomServerTest extends Scope // Add wide string columns to approach row width limit for ($i = 0; $i < 15; $i++) { - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1351,7 +1351,7 @@ class DatabasesCustomServerTest extends Scope sleep(5); - $tooWide = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $tooWide = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1379,7 +1379,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('invalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1403,7 +1403,7 @@ class DatabasesCustomServerTest extends Scope // add unique columns for indexing for ($i = 0; $i < 64; $i++) { // $this->assertEquals(true, static::getDatabase()->createColumn('indexLimit', "test{$i}", Database::VAR_STRING, 16, true)); - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1418,7 +1418,7 @@ class DatabasesCustomServerTest extends Scope sleep(10); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1439,7 +1439,7 @@ class DatabasesCustomServerTest extends Scope // MariaDB, MySQL, and MongoDB create 6 indexes per new table // Add up to the limit, then check if the next index throws IndexLimitException for ($i = 0; $i < 58; $i++) { - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1455,7 +1455,7 @@ class DatabasesCustomServerTest extends Scope sleep(5); - $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1468,7 +1468,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(64, $table['body']['columns']); $this->assertCount(58, $table['body']['indexes']); - $tooMany = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([ + $tooMany = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1481,7 +1481,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $tooMany['headers']['status-code']); $this->assertEquals('Index limit exceeded', $tooMany['body']['message']); - $table = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $table = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1503,7 +1503,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $database['headers']['status-code']); $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1519,7 +1519,7 @@ class DatabasesCustomServerTest extends Scope /** * Create String Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1534,7 +1534,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Email Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1548,7 +1548,7 @@ class DatabasesCustomServerTest extends Scope /** * Create IP Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1562,7 +1562,7 @@ class DatabasesCustomServerTest extends Scope /** * Create URL Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1576,7 +1576,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Integer Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1590,7 +1590,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Float Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1602,7 +1602,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Boolean Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1614,7 +1614,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Datetime Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1626,7 +1626,7 @@ class DatabasesCustomServerTest extends Scope /** * Create Enum Column */ - $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum', array_merge([ + $column = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1655,7 +1655,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1666,7 +1666,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1675,7 +1675,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertEquals('lorem', $new['body']['default']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1686,7 +1686,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($column['required']); $this->assertEquals('lorem', $column['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1697,7 +1697,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1706,7 +1706,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertNull($new['body']['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1717,7 +1717,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1729,7 +1729,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1741,7 +1741,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1753,7 +1753,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1764,7 +1764,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1775,7 +1775,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1797,7 +1797,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1808,7 +1808,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1817,7 +1817,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertEquals('torsten@appwrite.io', $new['body']['default']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1829,7 +1829,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('torsten@appwrite.io', $column['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1840,7 +1840,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1849,7 +1849,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertNull($new['body']['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1860,7 +1860,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1872,7 +1872,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1884,7 +1884,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1896,7 +1896,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1907,7 +1907,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1918,7 +1918,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/email/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/email/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1940,7 +1940,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1951,7 +1951,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1960,7 +1960,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertEquals('127.0.0.1', $new['body']['default']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1971,7 +1971,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($column['required']); $this->assertEquals('127.0.0.1', $column['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1982,7 +1982,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1991,7 +1991,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertNull($new['body']['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2002,7 +2002,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2014,7 +2014,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2026,7 +2026,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2038,7 +2038,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2049,7 +2049,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2060,7 +2060,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/ip/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2082,7 +2082,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2093,7 +2093,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2102,7 +2102,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertEquals('http://appwrite.io', $new['body']['default']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2113,7 +2113,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($column['required']); $this->assertEquals('http://appwrite.io', $column['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2124,7 +2124,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2133,7 +2133,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertNull($new['body']['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2144,7 +2144,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2156,7 +2156,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2168,7 +2168,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2180,7 +2180,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2191,7 +2191,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2202,7 +2202,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/url/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/url/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2224,7 +2224,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2237,7 +2237,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2248,7 +2248,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $new['body']['min']); $this->assertEquals(1000, $new['body']['max']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2261,7 +2261,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $column['min']); $this->assertEquals(1000, $column['max']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2274,7 +2274,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2285,7 +2285,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $new['body']['min']); $this->assertEquals(1000, $new['body']['max']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2298,7 +2298,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2309,7 +2309,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(100, $new['body']['min']); $this->assertEquals(2000, $new['body']['max']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2321,7 +2321,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2336,7 +2336,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2350,7 +2350,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2364,7 +2364,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2378,7 +2378,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2392,7 +2392,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2405,7 +2405,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2418,7 +2418,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2432,7 +2432,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2446,7 +2446,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2461,7 +2461,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2485,7 +2485,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2498,7 +2498,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2509,7 +2509,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $new['body']['min']); $this->assertEquals(1000, $new['body']['max']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2522,7 +2522,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $column['min']); $this->assertEquals(1000, $column['max']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2535,7 +2535,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2546,7 +2546,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $new['body']['min']); $this->assertEquals(1000, $new['body']['max']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2559,7 +2559,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2570,7 +2570,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(123.456, $new['body']['min']); $this->assertEquals(2000, $new['body']['max']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2582,7 +2582,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2597,7 +2597,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2611,7 +2611,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2625,7 +2625,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2639,7 +2639,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2653,7 +2653,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2666,7 +2666,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2679,7 +2679,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2693,7 +2693,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_DEFAULT_UNSUPPORTED, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2707,7 +2707,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2722,7 +2722,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/float/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/float/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2746,7 +2746,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2757,7 +2757,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2766,7 +2766,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertEquals(true, $new['body']['default']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2777,7 +2777,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($column['required']); $this->assertEquals(true, $column['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2788,7 +2788,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2797,7 +2797,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertNull($new['body']['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2808,7 +2808,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2820,7 +2820,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2832,7 +2832,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2844,7 +2844,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2855,7 +2855,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2866,7 +2866,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/boolean/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2888,7 +2888,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2899,7 +2899,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2908,7 +2908,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertEquals('1975-06-12 14:12:55+02:00', $new['body']['default']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2919,7 +2919,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($column['required']); $this->assertEquals('1975-06-12 14:12:55+02:00', $column['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2930,7 +2930,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2939,7 +2939,7 @@ class DatabasesCustomServerTest extends Scope $this->assertFalse($new['body']['required']); $this->assertNull($new['body']['default']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2950,7 +2950,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2962,7 +2962,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2974,7 +2974,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2986,7 +2986,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -2997,7 +2997,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3008,7 +3008,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3030,7 +3030,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $data['databaseId']; $tableId = $data['tableId']; - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3042,7 +3042,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3055,7 +3055,7 @@ class DatabasesCustomServerTest extends Scope $this->assertContains('ipsum', $new['body']['elements']); $this->assertContains('dolor', $new['body']['elements']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3070,7 +3070,7 @@ class DatabasesCustomServerTest extends Scope $this->assertContains('ipsum', $column['elements']); $this->assertContains('dolor', $column['elements']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3082,7 +3082,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3095,7 +3095,7 @@ class DatabasesCustomServerTest extends Scope $this->assertContains('ipsum', $new['body']['elements']); $this->assertContains('dolor', $new['body']['elements']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3107,7 +3107,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3122,7 +3122,7 @@ class DatabasesCustomServerTest extends Scope /** * Test against failure */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3135,7 +3135,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3148,7 +3148,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::COLUMN_VALUE_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3161,7 +3161,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3174,7 +3174,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3187,7 +3187,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3199,7 +3199,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3211,7 +3211,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3223,7 +3223,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $update['headers']['status-code']); $this->assertEquals(AppwriteException::GENERAL_ARGUMENT_INVALID, $update['body']['type']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/enum/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3248,7 +3248,7 @@ class DatabasesCustomServerTest extends Scope $row = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3264,7 +3264,7 @@ class DatabasesCustomServerTest extends Scope ); // Test Resize Up - $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3280,7 +3280,7 @@ class DatabasesCustomServerTest extends Scope // Test create new row with new size $newDoc = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3299,7 +3299,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(2048, strlen($newDoc['body']['string'])); // Test update row with new size - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3313,7 +3313,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(2048, strlen($row['body']['string'])); // Test Exception on resize down with data that is too large - $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3327,7 +3327,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(AppwriteException::COLUMN_INVALID_RESIZE, $column['body']['type']); // original rows to original size, remove new row - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3340,7 +3340,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $row['headers']['status-code']); $this->assertEquals('string', $row['body']['string']); - $deleteDoc = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $newDoc['body']['$id'], array_merge([ + $deleteDoc = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $newDoc['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3350,7 +3350,7 @@ class DatabasesCustomServerTest extends Scope // Test Resize Down - $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $column = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3366,7 +3366,7 @@ class DatabasesCustomServerTest extends Scope // Test create new row with new size $newDoc = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3385,7 +3385,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(10, strlen($newDoc['body']['string'])); // Test update row with new size - $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3401,7 +3401,7 @@ class DatabasesCustomServerTest extends Scope // Try create row with string that is too large $newDoc = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3472,7 +3472,7 @@ class DatabasesCustomServerTest extends Scope /** * Check if Database exists */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/i_dont_exist/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/i_dont_exist/grids/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3484,7 +3484,7 @@ class DatabasesCustomServerTest extends Scope /** * Check if Table exists */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/i_dont_exist/columns/' . $key . '/unknown_' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/i_dont_exist/columns/' . $key . '/unknown_' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3496,7 +3496,7 @@ class DatabasesCustomServerTest extends Scope /** * Check if Column exists */ - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key . '/unknown_' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3519,7 +3519,7 @@ class DatabasesCustomServerTest extends Scope // Create row to test against $row = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3536,7 +3536,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $row['headers']['status-code']); - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string/' . $key, array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3550,7 +3550,7 @@ class DatabasesCustomServerTest extends Scope $key = 'new_string'; - $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/' . $key, array_merge([ + $new = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/' . $key, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3558,7 +3558,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('new_string', $new['body']['key']); - $doc1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ + $doc1 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3571,7 +3571,7 @@ class DatabasesCustomServerTest extends Scope // Try and create a new row with the new column $doc2 = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3593,7 +3593,7 @@ class DatabasesCustomServerTest extends Scope // Expect fail, try and create a new row with the old column $doc3 = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -3625,7 +3625,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3641,7 +3641,7 @@ class DatabasesCustomServerTest extends Scope ] ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3679,7 +3679,7 @@ class DatabasesCustomServerTest extends Scope $this->createRelationshipTables(); - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3694,7 +3694,7 @@ class DatabasesCustomServerTest extends Scope \sleep(3); - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3707,7 +3707,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($relation['body']['relatedTable'], $table1RelationColumn['relatedTable']); // Create a row for checking later - $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3725,7 +3725,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $originalRow['headers']['status-code']); // Rename the column - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3736,7 +3736,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); // Check the row's key has been renamed - $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3751,7 +3751,7 @@ class DatabasesCustomServerTest extends Scope $this->assertArrayNotHasKey('level2', $newRow['body']); // Check level2 row has been renamed - $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2'][0]['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2'][0]['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3761,7 +3761,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEmpty($level2Row['body']['level1']); // Check if column was renamed on the parent's side - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3772,7 +3772,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('new_level_2', $table1Columns['body']['columns'][0]['key']); // Check if column was renamed on the child's side - $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3793,7 +3793,7 @@ class DatabasesCustomServerTest extends Scope $this->createRelationshipTables(); - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3808,7 +3808,7 @@ class DatabasesCustomServerTest extends Scope \sleep(3); - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3821,7 +3821,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($relation['body']['relatedTable'], $table1RelationColumn['relatedTable']); // Create a row for checking later - $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3839,7 +3839,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $originalRow['headers']['status-code']); // Rename the column - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3850,7 +3850,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); // Check the row's key has been renamed - $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3865,7 +3865,7 @@ class DatabasesCustomServerTest extends Scope $this->assertArrayNotHasKey('level2', $newRow['body']); // Check level2 row has been renamed - $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3875,7 +3875,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEmpty($level2Row['body']['level1']); // Check if column was renamed on the parent's side - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3886,7 +3886,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('new_level_2', $table1Columns['body']['columns'][0]['key']); // Check if column was renamed on the child's side - $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3907,7 +3907,7 @@ class DatabasesCustomServerTest extends Scope $this->createRelationshipTables(); - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3922,7 +3922,7 @@ class DatabasesCustomServerTest extends Scope \sleep(3); - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3935,7 +3935,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($relation['body']['relatedTable'], $table1RelationColumn['relatedTable']); // Create a row for checking later - $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3953,7 +3953,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $originalRow['headers']['status-code']); // Rename the column - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3964,7 +3964,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); // Check the row's key has been renamed - $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3979,7 +3979,7 @@ class DatabasesCustomServerTest extends Scope $this->assertArrayNotHasKey('level2', $newRow['body']); // Check level2 row has been renamed - $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -3993,7 +3993,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEmpty($level2Row['body']['level1']); // Check if column was renamed on the parent's side - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4004,7 +4004,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('new_level_2', $table1Columns['body']['columns'][0]['key']); // Check if column was renamed on the child's side - $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4025,7 +4025,7 @@ class DatabasesCustomServerTest extends Scope $this->createRelationshipTables(); - $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/relationship', array_merge([ + $relation = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4040,7 +4040,7 @@ class DatabasesCustomServerTest extends Scope \sleep(3); - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4053,7 +4053,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals($relation['body']['relatedTable'], $table1RelationColumn['relatedTable']); // Create a row for checking later - $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows', array_merge([ + $originalRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4071,7 +4071,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $originalRow['headers']['status-code']); // Rename the column - $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ + $update = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/columns/level2' . '/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4082,7 +4082,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $update['headers']['status-code']); // Check the row's key has been renamed - $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ + $newRow = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id . '/rows/' . $originalRow['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4097,7 +4097,7 @@ class DatabasesCustomServerTest extends Scope $this->assertArrayNotHasKey('level2', $newRow['body']); // Check level2 row has been renamed - $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ + $level2Row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id . '/rows/' . $newRow['body']['new_level_2']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4111,7 +4111,7 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEmpty($level2Row['body']['level1']); // Check if column was renamed on the parent's side - $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table1Id, [ + $table1Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table1Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4122,7 +4122,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals('new_level_2', $table1Columns['body']['columns'][0]['key']); // Check if column was renamed on the child's side - $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table2Id, [ + $table2Columns = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table2Id, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4151,7 +4151,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4175,7 +4175,7 @@ class DatabasesCustomServerTest extends Scope ]; // Await column - $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4188,7 +4188,7 @@ class DatabasesCustomServerTest extends Scope sleep(1); - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4211,7 +4211,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $this->assertCount(3, $response['body']['rows']); - $response = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4224,7 +4224,7 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(3, $response['body']['rows']); // TEST SUCCESS - $id is auto-assigned if not included in bulk rows - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4238,7 +4238,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); // TEST FAIL - Can't use data and row together - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4256,7 +4256,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // TEST FAIL - Can't use $rowId and create bulk rows - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4272,7 +4272,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // TEST FAIL - Can't include invalid ID in bulk rows - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4287,7 +4287,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // TEST FAIL - Can't miss number in bulk rows - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4305,7 +4305,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // TEST FAIL - Can't push more than APP_LIMIT_DATABASE_BATCH rows - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4318,7 +4318,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); // TEST FAIL - Can't include invalid permissions in nested rows - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4332,7 +4332,7 @@ class DatabasesCustomServerTest extends Scope ]); // TEST FAIL - Can't bulk create in a table with relationships - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4343,7 +4343,7 @@ class DatabasesCustomServerTest extends Scope 'permissions' => [], ]); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4360,7 +4360,7 @@ class DatabasesCustomServerTest extends Scope sleep(1); - $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/tables/{$data['$id']}/rows", array_merge([ + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/grids/tables/{$data['$id']}/rows", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4389,7 +4389,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4413,7 +4413,7 @@ class DatabasesCustomServerTest extends Scope ]; // Await column - $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4438,7 +4438,7 @@ class DatabasesCustomServerTest extends Scope ]; } - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4459,7 +4459,7 @@ class DatabasesCustomServerTest extends Scope sleep(5); // TEST: Update all rows - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4484,7 +4484,7 @@ class DatabasesCustomServerTest extends Scope */ sleep(5); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4511,7 +4511,7 @@ class DatabasesCustomServerTest extends Scope } // TEST: Check permissions persist - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4523,7 +4523,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(10, $response['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4542,7 +4542,7 @@ class DatabasesCustomServerTest extends Scope } // TEST: Update rows with limit - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4557,7 +4557,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(5, $response['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4568,7 +4568,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(5, $rows['body']['total']); // TEST: Update rows with offset - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4583,7 +4583,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(5, $response['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4594,7 +4594,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(10, $rows['body']['total']); // TEST: Update rows with equals filter - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4609,7 +4609,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(10, $response['body']['rows']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4620,7 +4620,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(10, $rows['body']['total']); // TEST: Fail - Can't bulk update in a table with relationships - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4631,7 +4631,7 @@ class DatabasesCustomServerTest extends Scope 'permissions' => [], ]); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4648,7 +4648,7 @@ class DatabasesCustomServerTest extends Scope sleep(1); - $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4679,7 +4679,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4703,7 +4703,7 @@ class DatabasesCustomServerTest extends Scope ]; // Await column - $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4728,7 +4728,7 @@ class DatabasesCustomServerTest extends Scope ]; } - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4749,7 +4749,7 @@ class DatabasesCustomServerTest extends Scope $rows[] = ['number' => 11]; // TEST: Upsert all rows - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4762,7 +4762,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(1000, $response['body']['rows'][0]['number']); $this->assertEquals(11, $response['body']['rows'][1]['number']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ])); @@ -4783,7 +4783,7 @@ class DatabasesCustomServerTest extends Scope } // TEST: Upsert permissions - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4813,7 +4813,7 @@ class DatabasesCustomServerTest extends Scope ], $response['body']['rows'][1]['$permissions']); // TEST: Fail - Can't bulk upsert in a table with relationships - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4824,7 +4824,7 @@ class DatabasesCustomServerTest extends Scope 'permissions' => [], ]); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4841,7 +4841,7 @@ class DatabasesCustomServerTest extends Scope sleep(1); - $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4872,7 +4872,7 @@ class DatabasesCustomServerTest extends Scope $databaseId = $database['body']['$id']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4895,7 +4895,7 @@ class DatabasesCustomServerTest extends Scope ]; // Await column - $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/integer', array_merge([ + $numberColumn = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -4920,7 +4920,7 @@ class DatabasesCustomServerTest extends Scope ]; } - $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4932,7 +4932,7 @@ class DatabasesCustomServerTest extends Scope $createBulkRows(); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4941,7 +4941,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(11, $rows['body']['total']); // TEST: Delete all rows - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4949,7 +4949,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(11, $response['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4960,7 +4960,7 @@ class DatabasesCustomServerTest extends Scope // TEST: Delete rows with query $createBulkRows(); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4968,7 +4968,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(11, $rows['body']['total']); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -4980,7 +4980,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(5, $response['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -4993,7 +4993,7 @@ class DatabasesCustomServerTest extends Scope } // Cleanup - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5004,7 +5004,7 @@ class DatabasesCustomServerTest extends Scope // SUCCESS: Delete rows with query $createBulkRows(); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5012,7 +5012,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(11, $rows['body']['total']); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5024,7 +5024,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(5, $response['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5033,7 +5033,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(6, $rows['body']['total']); // Cleanup - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5044,7 +5044,7 @@ class DatabasesCustomServerTest extends Scope // SUCCESS: Delete Rows with limit query $createBulkRows(); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5052,7 +5052,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(11, $rows['body']['total']); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5064,7 +5064,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(2, $response['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5073,7 +5073,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(9, $rows['body']['total']); // Cleanup - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5084,7 +5084,7 @@ class DatabasesCustomServerTest extends Scope // SUCCESS: Delete Rows with offset query $createBulkRows(); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5092,7 +5092,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(11, $rows['body']['total']); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -5104,7 +5104,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(6, $response['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5118,7 +5118,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(4, $lastDoc['number']); // Cleanup - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5129,7 +5129,7 @@ class DatabasesCustomServerTest extends Scope // SUCCESS: Delete 100 rows $createBulkRows(100); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5137,7 +5137,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $rows['headers']['status-code']); $this->assertEquals(100, $rows['body']['total']); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5145,7 +5145,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(100, $response['body']['total']); - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -5154,7 +5154,7 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(0, $rows['body']['total']); // TEST: Fail - Can't bulk delete in a table with relationships - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5165,7 +5165,7 @@ class DatabasesCustomServerTest extends Scope 'permissions' => [], ]); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['$id'] . '/columns/relationship', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['$id'] . '/columns/relationship', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -5182,7 +5182,7 @@ class DatabasesCustomServerTest extends Scope sleep(1); - $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/tables/' . $data['$id'] . '/rows', array_merge([ + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['$id'] . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsGuestTest.php similarity index 85% rename from tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php rename to tests/e2e/Services/Databases/Grids/DatabasesPermissionsGuestTest.php index f404cc1bd5..c0c3cdae0b 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsGuestTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsGuestTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Tables; +namespace Tests\E2E\Services\Databases\Grids; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -31,7 +31,7 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals('InvalidRowDatabase', $database['body']['name']); $databaseId = $database['body']['$id']; - $publicMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + $publicMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ @@ -41,7 +41,7 @@ class DatabasesPermissionsGuestTest extends Scope Permission::delete(Role::any()), ], ]); - $privateMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + $privateMovies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [], @@ -51,12 +51,12 @@ class DatabasesPermissionsGuestTest extends Scope $publicTable = ['id' => $publicMovies['body']['$id']]; $privateTable = ['id' => $privateMovies['body']['$id']]; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $publicTable['id'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $publicTable['id'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateTable['id'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $privateTable['id'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -93,14 +93,14 @@ class DatabasesPermissionsGuestTest extends Scope $privateTableId = $data['privateTableId']; $databaseId = $data['databaseId']; - $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $publicTableId . '/rows', $this->getServerHeader(), [ + $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $publicTableId . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', ], 'permissions' => $permissions, ]); - $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ + $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -114,11 +114,11 @@ class DatabasesPermissionsGuestTest extends Scope $roles = Authorization::getRoles(); Authorization::cleanRoles(); - $publicRows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $publicTableId . '/rows', [ + $publicRows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $publicTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); - $privateRows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows', [ + $privateRows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); @@ -148,7 +148,7 @@ class DatabasesPermissionsGuestTest extends Scope $roles = Authorization::getRoles(); Authorization::cleanRoles(); - $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $publicTableId . '/rows', [ + $publicResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $publicTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -161,7 +161,7 @@ class DatabasesPermissionsGuestTest extends Scope $publicRowId = $publicResponse['body']['$id']; $this->assertEquals(201, $publicResponse['headers']['status-code']); - $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows', [ + $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -174,7 +174,7 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals(401, $privateResponse['headers']['status-code']); // Create a row in private collection with API key so we can test that update and delete are also not allowed - $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ + $privateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -184,7 +184,7 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals(201, $privateResponse['headers']['status-code']); $privateRowId = $privateResponse['body']['$id']; - $publicRow = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $publicTableId . '/rows/' . $publicRowId, [ + $publicRow = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $publicTableId . '/rows/' . $publicRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -196,7 +196,7 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals(200, $publicRow['headers']['status-code']); $this->assertEquals('Thor: Ragnarok', $publicRow['body']['title']); - $privateRow = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows/' . $privateRowId, [ + $privateRow = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows/' . $privateRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ @@ -207,14 +207,14 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals(401, $privateRow['headers']['status-code']); - $publicRow = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $publicTableId . '/rows/' . $publicRowId, [ + $publicRow = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $publicTableId . '/rows/' . $publicRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); $this->assertEquals(204, $publicRow['headers']['status-code']); - $privateRow = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $privateTableId . '/rows/' . $privateRowId, [ + $privateRow = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $privateTableId . '/rows/' . $privateRowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ]); @@ -240,7 +240,7 @@ class DatabasesPermissionsGuestTest extends Scope $this->assertEquals('GuestPermissionsWrite', $database['body']['name']); $databaseId = $database['body']['$id']; - $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + $movies = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ @@ -251,7 +251,7 @@ class DatabasesPermissionsGuestTest extends Scope $moviesId = $movies['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -259,7 +259,7 @@ class DatabasesPermissionsGuestTest extends Scope sleep(1); - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $moviesId . '/rows', [ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $moviesId . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], [ diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsMemberTest.php similarity index 89% rename from tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php rename to tests/e2e/Services/Databases/Grids/DatabasesPermissionsMemberTest.php index f1e5c35482..397f82db41 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsMemberTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsMemberTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Tables; +namespace Tests\E2E\Services\Databases\Grids; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -124,7 +124,7 @@ class DatabasesPermissionsMemberTest extends Scope $databaseId = $db['body']['$id']; - $public = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + $public = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), 'name' => 'Movies', 'permissions' => [ @@ -138,14 +138,14 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(201, $public['headers']['status-code']); $this->tables = ['public' => $public['body']['$id']]; - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $this->tables['public'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $this->tables['public'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); $this->assertEquals(202, $response['headers']['status-code']); - $private = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + $private = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), 'name' => 'Private Movies', 'permissions' => [ @@ -159,14 +159,14 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(201, $private['headers']['status-code']); $this->tables['private'] = $private['body']['$id']; - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $this->tables['private'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $this->tables['private'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); $this->assertEquals(202, $response['headers']['status-code']); - $doconly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', $this->getServerHeader(), [ + $doconly = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', $this->getServerHeader(), [ 'tableId' => ID::unique(), 'name' => 'Row Only Movies', 'permissions' => [], @@ -175,7 +175,7 @@ class DatabasesPermissionsMemberTest extends Scope $this->assertEquals(201, $private['headers']['status-code']); $this->tables['doconly'] = $doconly['body']['$id']; - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $this->tables['doconly'] . '/columns/string', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $this->tables['doconly'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -202,7 +202,7 @@ class DatabasesPermissionsMemberTest extends Scope $tables = $data['tables']; $databaseId = $data['databaseId']; - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tables['public'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tables['public'] . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -211,7 +211,7 @@ class DatabasesPermissionsMemberTest extends Scope ]); $this->assertEquals(201, $response['headers']['status-code']); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tables['private'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tables['private'] . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -220,7 +220,7 @@ class DatabasesPermissionsMemberTest extends Scope ]); $this->assertEquals(201, $response['headers']['status-code']); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tables['doconly'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tables['doconly'] . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -232,7 +232,7 @@ class DatabasesPermissionsMemberTest extends Scope /** * Check "any" permission table */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tables['public'] . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tables['public'] . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -245,7 +245,7 @@ class DatabasesPermissionsMemberTest extends Scope /** * Check "users" permission table */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tables['private'] . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tables['private'] . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -258,7 +258,7 @@ class DatabasesPermissionsMemberTest extends Scope /** * Check "user:user1" row only permission table */ - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tables['doconly'] . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tables['doconly'] . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsScope.php b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsScope.php similarity index 98% rename from tests/e2e/Services/Databases/Tables/DatabasesPermissionsScope.php rename to tests/e2e/Services/Databases/Grids/DatabasesPermissionsScope.php index a2bc227c8f..0ab3f83ef1 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsScope.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsScope.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Tables; +namespace Tests\E2E\Services\Databases\Grids; use Tests\E2E\Client; diff --git a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsTeamTest.php b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsTeamTest.php similarity index 88% rename from tests/e2e/Services/Databases/Tables/DatabasesPermissionsTeamTest.php rename to tests/e2e/Services/Databases/Grids/DatabasesPermissionsTeamTest.php index 406ca79371..95abfbc4fe 100644 --- a/tests/e2e/Services/Databases/Tables/DatabasesPermissionsTeamTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesPermissionsTeamTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\Databases\Tables; +namespace Tests\E2E\Services\Databases\Grids; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; @@ -44,7 +44,7 @@ class DatabasesPermissionsTeamTest extends Scope ]); $this->assertEquals(201, $db['headers']['status-code']); - $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables', $this->getServerHeader(), [ + $table1 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables', $this->getServerHeader(), [ 'tableId' => ID::custom('table1'), 'name' => 'Table 1', 'permissions' => [ @@ -57,13 +57,13 @@ class DatabasesPermissionsTeamTest extends Scope $this->tables['table1'] = $table1['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->tables['table1'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables/' . $this->tables['table1'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, ]); - $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables', $this->getServerHeader(), [ + $table2 = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables', $this->getServerHeader(), [ 'tableId' => ID::custom('table2'), 'name' => 'Table 2', 'permissions' => [ @@ -76,7 +76,7 @@ class DatabasesPermissionsTeamTest extends Scope $this->tables['table2'] = $table2['body']['$id']; - $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->tables['table2'] . '/columns/string', $this->getServerHeader(), [ + $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables/' . $this->tables['table2'] . '/columns/string', $this->getServerHeader(), [ 'key' => 'title', 'size' => 256, 'required' => true, @@ -140,7 +140,7 @@ class DatabasesPermissionsTeamTest extends Scope $this->createTables($this->teams); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->tables['table1'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables/' . $this->tables['table1'] . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Lorem', @@ -148,7 +148,7 @@ class DatabasesPermissionsTeamTest extends Scope ]); $this->assertEquals(201, $response['headers']['status-code']); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $this->tables['table2'] . '/rows', $this->getServerHeader(), [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables/' . $this->tables['table2'] . '/rows', $this->getServerHeader(), [ 'rowId' => ID::unique(), 'data' => [ 'title' => 'Ipsum', @@ -166,7 +166,7 @@ class DatabasesPermissionsTeamTest extends Scope */ public function testReadRows($user, $table, $success, $users) { - $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $this->databaseId . '/tables/' . $table . '/rows', [ + $rows = $this->client->call(Client::METHOD_GET, '/databases/' . $this->databaseId . '/grids/tables/' . $table . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -186,7 +186,7 @@ class DatabasesPermissionsTeamTest extends Scope */ public function testWriteRows($user, $table, $success, $users) { - $rows = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/tables/' . $table . '/rows', [ + $rows = $this->client->call(Client::METHOD_POST, '/databases/' . $this->databaseId . '/grids/tables/' . $table . '/rows', [ 'origin' => 'http://localhost', 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], From 1f31b755823c7ffe516c23aaea2087c1c70457e4 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 14:48:19 +0530 Subject: [PATCH 287/362] fix: tests. --- .github/workflows/tests.yml | 4 ++-- .../Modules/Databases/Http/Databases/Collections/Action.php | 2 +- tests/e2e/Services/GraphQL/{Tables => Grids}/AbuseTest.php | 2 +- tests/e2e/Services/GraphQL/{Tables => Grids}/AuthTest.php | 2 +- .../Services/GraphQL/{Tables => Grids}/DatabaseClientTest.php | 2 +- .../Services/GraphQL/{Tables => Grids}/DatabaseServerTest.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename tests/e2e/Services/GraphQL/{Tables => Grids}/AbuseTest.php (99%) rename tests/e2e/Services/GraphQL/{Tables => Grids}/AuthTest.php (99%) rename tests/e2e/Services/GraphQL/{Tables => Grids}/DatabaseClientTest.php (99%) rename tests/e2e/Services/GraphQL/{Tables => Grids}/DatabaseServerTest.php (99%) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cc20d1f6fb..3403973b0d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -146,7 +146,7 @@ jobs: Avatars, Console, Databases/Legacy, - Databases/Tables, + Databases/Grids, Functions, FunctionsSchedule, GraphQL, @@ -216,7 +216,7 @@ jobs: Avatars, Console, Databases/Legacy, - Databases/Tables, + Databases/Grids, Functions, FunctionsSchedule, GraphQL, 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 351810fcc6..e7c9814655 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Action.php @@ -56,7 +56,7 @@ abstract class Action extends UtopiaAction */ final protected function getSdkGroup(): string { - return $this->isCollectionsAPI() ? 'collections' : 'grids'; + return $this->isCollectionsAPI() ? 'collections' : 'tables'; } /** diff --git a/tests/e2e/Services/GraphQL/Tables/AbuseTest.php b/tests/e2e/Services/GraphQL/Grids/AbuseTest.php similarity index 99% rename from tests/e2e/Services/GraphQL/Tables/AbuseTest.php rename to tests/e2e/Services/GraphQL/Grids/AbuseTest.php index 88c216dd5a..e89a3e5c29 100644 --- a/tests/e2e/Services/GraphQL/Tables/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/Grids/AbuseTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\GraphQL\Tables; +namespace Tests\E2E\Services\GraphQL\Grids; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; diff --git a/tests/e2e/Services/GraphQL/Tables/AuthTest.php b/tests/e2e/Services/GraphQL/Grids/AuthTest.php similarity index 99% rename from tests/e2e/Services/GraphQL/Tables/AuthTest.php rename to tests/e2e/Services/GraphQL/Grids/AuthTest.php index 21d581d207..e992616b18 100644 --- a/tests/e2e/Services/GraphQL/Tables/AuthTest.php +++ b/tests/e2e/Services/GraphQL/Grids/AuthTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\GraphQL\Tables; +namespace Tests\E2E\Services\GraphQL\Grids; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; diff --git a/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php similarity index 99% rename from tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php rename to tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php index 5ff8e65922..302d35724c 100644 --- a/tests/e2e/Services/GraphQL/Tables/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\GraphQL\Tables; +namespace Tests\E2E\Services\GraphQL\Grids; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; diff --git a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php similarity index 99% rename from tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php rename to tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php index e4e9b34f35..c59e0a4c6f 100644 --- a/tests/e2e/Services/GraphQL/Tables/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php @@ -1,6 +1,6 @@ <?php -namespace Tests\E2E\Services\GraphQL\Tables; +namespace Tests\E2E\Services\GraphQL\Grids; use Exception; use Tests\E2E\Client; From 1ed45def9dba818ad4d9363188e660f9917566ac Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 15:23:07 +0530 Subject: [PATCH 288/362] update: graphql tests. --- tests/e2e/Services/GraphQL/Base.php | 158 ++++++++++------- .../e2e/Services/GraphQL/Grids/AbuseTest.php | 2 +- tests/e2e/Services/GraphQL/Grids/AuthTest.php | 16 +- .../GraphQL/Grids/DatabaseClientTest.php | 40 ++--- .../GraphQL/Grids/DatabaseServerTest.php | 160 +++++++++--------- 5 files changed, 211 insertions(+), 165 deletions(-) diff --git a/tests/e2e/Services/GraphQL/Base.php b/tests/e2e/Services/GraphQL/Base.php index 554f84e616..8b6f85a1b1 100644 --- a/tests/e2e/Services/GraphQL/Base.php +++ b/tests/e2e/Services/GraphQL/Base.php @@ -21,7 +21,14 @@ trait Base public static string $UPDATE_COLLECTION = 'update_collection'; public static string $DELETE_COLLECTION = 'delete_collection'; - // Tables + // Grid databases + public static string $GRIDS_CREATE_DATABASE = 'grids_create_database'; + public static string $GRIDS_GET_DATABASES = 'grids_get_databases'; + public static string $GRIDS_GET_DATABASE = 'grids_get_database'; + public static string $GRIDS_UPDATE_DATABASE = 'grids_update_database'; + public static string $GRIDS_DELETE_DATABASE = 'grids_delete_database'; + + // Grid tables public static string $CREATE_TABLE = 'create_table'; public static string $GET_TABLE = 'get_table'; public static string $GET_TABLES = 'list_tables'; @@ -55,7 +62,7 @@ trait Base public static string $GET_ATTRIBUTE = 'get_attribute'; public static string $DELETE_ATTRIBUTE = 'delete_attribute'; - // Columns + // Grids columns public static string $CREATE_STRING_COLUMN = 'create_string_column'; public static string $CREATE_INTEGER_COLUMN = 'create_integer_column'; public static string $CREATE_FLOAT_COLUMN = 'create_float_column'; @@ -88,7 +95,7 @@ trait Base public static string $GET_INDEX = 'get_attribute_index'; public static string $DELETE_INDEX = 'delete_attribute_index'; - // Column Indexes + // Grid column indexes public static string $CREATE_COLUMN_INDEX = 'create_column_index'; public static string $GET_COLUMN_INDEXES = 'get_column_indexes'; public static string $GET_COLUMN_INDEX = 'get_column_index'; @@ -102,13 +109,13 @@ trait Base public static string $UPSERT_DOCUMENT = 'upsert_document'; public static string $DELETE_DOCUMENT = 'delete_document'; - // Documents Bulk APIs + // Documents - Bulk APIs public static string $CREATE_DOCUMENTS = 'create_documents_rest'; public static string $UPDATE_DOCUMENTS = 'update_documents'; public static string $UPSERT_DOCUMENTS = 'upsert_documents'; public static string $DELETE_DOCUMENTS = 'delete_documents'; - // Rows + // Grid rows public static string $CREATE_ROW = 'create_row_rest'; public static string $GET_ROWS = 'list_rows'; public static string $GET_ROW = 'get_row'; @@ -116,7 +123,7 @@ trait Base public static string $UPSERT_ROW = 'upsert_row'; public static string $DELETE_ROW = 'delete_row'; - // Rows Bulk APIs + // Grid rows - Bulk APIs public static string $CREATE_ROWS = 'create_rows_rest'; public static string $UPDATE_ROWS = 'update_rows'; public static string $UPSERT_ROWS = 'upsert_rows'; @@ -534,6 +541,43 @@ trait Base status } }'; + case self::$GRIDS_CREATE_DATABASE: + return 'mutation gridsCreateDatabase($databaseId: String!, $name: String!) { + gridsCreateDatabase(databaseId: $databaseId, name: $name) { + _id + name + } + }'; + case self::$GRIDS_GET_DATABASES: + return 'query gridsListDatabases { + gridsListDatabases { + total + databases { + _id + name + } + } + }'; + case self::$GRIDS_GET_DATABASE: + return 'query gridsGetDatabase($databaseId: String!) { + gridsGetDatabase(databaseId: $databaseId) { + _id + name + } + }'; + case self::$GRIDS_UPDATE_DATABASE: + return 'mutation gridsUpdateDatabase($databaseId: String!, $name: String!) { + gridsUpdateDatabase(databaseId: $databaseId, name: $name) { + _id + name + } + }'; + case self::$GRIDS_DELETE_DATABASE: + return 'mutation gridsDeleteDatabase($databaseId: String!) { + gridsDeleteDatabase(databaseId: $databaseId) { + status + } + }'; case self::$GET_COLLECTION: return 'query getCollection($databaseId: String!, $collectionId: String!) { databasesGetCollection(databaseId: $databaseId, collectionId: $collectionId) { @@ -580,8 +624,8 @@ trait Base } }'; case self::$GET_TABLE: - return 'query tablesGet($databaseId: String!, $tableId: String!) { - tablesGet(databaseId: $databaseId, tableId: $tableId) { + return 'query gridsGetTable($databaseId: String!, $tableId: String!) { + gridsGetTable(databaseId: $databaseId, tableId: $tableId) { _id _permissions rowSecurity @@ -589,8 +633,8 @@ trait Base } }'; case self::$GET_TABLES: - return 'query tablesList($databaseId: String!) { - tablesList(databaseId: $databaseId) { + return 'query gridsListTables($databaseId: String!) { + gridsListTables(databaseId: $databaseId) { total tables { _id @@ -601,8 +645,8 @@ trait Base } }'; case self::$CREATE_TABLE: - return 'mutation tablesCreate($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!]!) { - tablesCreate(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions) { + return 'mutation gridsCreateTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!]!) { + gridsCreateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions) { _id _permissions rowSecurity @@ -610,8 +654,8 @@ trait Base } }'; case self::$UPDATE_TABLE: - return 'mutation tablesUpdate($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!], $enabled: Boolean) { - tablesUpdate(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions, enabled: $enabled) { + return 'mutation gridsUpdateTable($databaseId: String!, $tableId: String!, $name: String!, $rowSecurity: Boolean!, $permissions: [String!], $enabled: Boolean) { + gridsUpdateTable(databaseId: $databaseId, tableId: $tableId, name: $name, rowSecurity: $rowSecurity, permissions: $permissions, enabled: $enabled) { _id _permissions rowSecurity @@ -619,8 +663,8 @@ trait Base } }'; case self::$DELETE_TABLE: - return 'mutation tablesDelete($databaseId: String!, $tableId: String!) { - tablesDelete(databaseId: $databaseId, tableId: $tableId) { + return 'mutation gridsDeleteTable($databaseId: String!, $tableId: String!) { + gridsDeleteTable(databaseId: $databaseId, tableId: $tableId) { status } }'; @@ -802,7 +846,7 @@ trait Base }'; case self::$CREATE_STRING_COLUMN: return 'mutation createStringColumn($databaseId: String!, $tableId: String!, $key: String!, $size: Int!, $required: Boolean!, $default: String, $array: Boolean){ - tablesCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, size: $size, required: $required, default: $default, array: $array) { + gridsCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, size: $size, required: $required, default: $default, array: $array) { key required default @@ -811,7 +855,7 @@ trait Base }'; case self::$CREATE_INTEGER_COLUMN: return 'mutation createIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int, $max: Int, $default: Int, $array: Boolean){ - tablesCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + gridsCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -822,7 +866,7 @@ trait Base }'; case self::$CREATE_FLOAT_COLUMN: return 'mutation createFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float, $max: Float, $default: Float, $array: Boolean){ - tablesCreateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { + gridsCreateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default, array: $array) { key required min @@ -833,7 +877,7 @@ trait Base }'; case self::$CREATE_BOOLEAN_COLUMN: return 'mutation createBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean, $array: Boolean){ - tablesCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + gridsCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -842,7 +886,7 @@ trait Base }'; case self::$CREATE_URL_COLUMN: return 'mutation createUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - tablesCreateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + gridsCreateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -851,7 +895,7 @@ trait Base }'; case self::$CREATE_EMAIL_COLUMN: return 'mutation createEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - tablesCreateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + gridsCreateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -860,7 +904,7 @@ trait Base }'; case self::$CREATE_IP_COLUMN: return 'mutation createIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - tablesCreateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + gridsCreateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -869,7 +913,7 @@ trait Base }'; case self::$CREATE_ENUM_COLUMN: return 'mutation createEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String, $array: Boolean){ - tablesCreateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { + gridsCreateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default, array: $array) { key elements required @@ -879,7 +923,7 @@ trait Base }'; case self::$CREATE_DATETIME_COLUMN: return 'mutation createDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String, $array: Boolean){ - tablesCreateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { + gridsCreateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default, array: $array) { key required default @@ -888,7 +932,7 @@ trait Base }'; case self::$CREATE_RELATIONSHIP_COLUMN: return 'mutation createRelationshipColumn($databaseId: String!, $tableId: String!, $relatedTableId: String!, $type: String!, $twoWay: Boolean, $key: String, $twoWayKey: String, $onDelete: String){ - tablesCreateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, relatedTableId: $relatedTableId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { + gridsCreateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, relatedTableId: $relatedTableId, type: $type, twoWay: $twoWay, key: $key, twoWayKey: $twoWayKey, onDelete: $onDelete) { relatedTable relationType twoWay @@ -899,14 +943,14 @@ trait Base }'; case self::$UPDATE_STRING_COLUMN: return 'mutation updateStringColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - tablesUpdateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + gridsUpdateStringColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_INTEGER_COLUMN: return 'mutation updateIntegerColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Int!, $max: Int!, $default: Int){ - tablesUpdateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, min: $min, max: $max, default: $default) { + gridsUpdateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, min: $min, max: $max, default: $default) { required min max @@ -915,7 +959,7 @@ trait Base }'; case self::$UPDATE_FLOAT_COLUMN: return 'mutation updateFloatColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $min: Float!, $max: Float!, $default: Float){ - tablesUpdateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default) { + gridsUpdateFloatColumn(databaseId: $databaseId, tableId: $tableId, key: $key, min: $min, max: $max, required: $required, default: $default) { required min max @@ -924,35 +968,35 @@ trait Base }'; case self::$UPDATE_BOOLEAN_COLUMN: return 'mutation updateBooleanColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: Boolean){ - tablesUpdateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + gridsUpdateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_URL_COLUMN: return 'mutation updateUrlColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - tablesUpdateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + gridsUpdateUrlColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_EMAIL_COLUMN: return 'mutation updateEmailColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - tablesUpdateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + gridsUpdateEmailColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_IP_COLUMN: return 'mutation updateIpColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - tablesUpdateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + gridsUpdateIpColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_ENUM_COLUMN: return 'mutation updateEnumColumn($databaseId: String!, $tableId: String!, $key: String!, $elements: [String!]!, $required: Boolean!, $default: String){ - tablesUpdateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default) { + gridsUpdateEnumColumn(databaseId: $databaseId, tableId: $tableId, key: $key, elements: $elements, required: $required, default: $default) { elements required default @@ -960,14 +1004,14 @@ trait Base }'; case self::$UPDATE_DATETIME_COLUMN: return 'mutation updateDatetimeColumn($databaseId: String!, $tableId: String!, $key: String!, $required: Boolean!, $default: String){ - tablesUpdateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { + gridsUpdateDatetimeColumn(databaseId: $databaseId, tableId: $tableId, key: $key, required: $required, default: $default) { required default } }'; case self::$UPDATE_RELATIONSHIP_COLUMN: return 'mutation updateRelationshipColumn($databaseId: String!, $tableId: String!, $key: String!, $onDelete: String){ - tablesUpdateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, key: $key, onDelete: $onDelete) { + gridsUpdateRelationshipColumn(databaseId: $databaseId, tableId: $tableId, key: $key, onDelete: $onDelete) { relatedTable relationType twoWay @@ -1011,7 +1055,7 @@ trait Base }'; case self::$CREATE_COLUMN_INDEX: return 'mutation createIndex($databaseId: String!, $tableId: String!, $key: String!, $type: String!, $columns: [String!]!, $orders: [String!]){ - tablesCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, columns: $columns, orders: $orders) { + gridsCreateIndex(databaseId: $databaseId, tableId: $tableId, key: $key, type: $type, columns: $columns, orders: $orders) { key type status @@ -1019,7 +1063,7 @@ trait Base }'; case self::$GET_COLUMN_INDEXES: return 'query listIndexes($databaseId: String!, $tableId: String!) { - tablesListIndexes(databaseId: $databaseId, tableId: $tableId) { + gridsListIndexes(databaseId: $databaseId, tableId: $tableId) { total indexes { key @@ -1030,7 +1074,7 @@ trait Base }'; case self::$GET_COLUMN_INDEX: return 'query getIndex($databaseId: String!, $tableId: String!, $key: String!) { - tablesGetIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { + gridsGetIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { key type status @@ -1038,7 +1082,7 @@ trait Base }'; case self::$DELETE_COLUMN_INDEX: return 'mutation deleteIndex($databaseId: String!, $tableId: String!, $key: String!) { - tablesDeleteIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { + gridsDeleteIndex(databaseId: $databaseId, tableId: $tableId, key: $key) { status } }'; @@ -1065,7 +1109,7 @@ trait Base }'; case self::$GET_COLUMNS: return 'query listColumns($databaseId: String!, $tableId: String!) { - tablesListColumns(databaseId: $databaseId, tableId: $tableId) { + gridsListColumns(databaseId: $databaseId, tableId: $tableId) { total columns { ...columnProperties @@ -1074,13 +1118,13 @@ trait Base }' . PHP_EOL . self::$FRAGMENT_COLUMNS; case self::$GET_COLUMN: return 'query getColumn($databaseId: String!, $tableId: String!, $key: String!) { - tablesGetColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { + gridsGetColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { ...columnProperties } }' . PHP_EOL . self::$FRAGMENT_COLUMNS; case self::$DELETE_COLUMN: return 'mutation deleteColumn($databaseId: String!, $tableId: String!, $key: String!) { - tablesDeleteColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { + gridsDeleteColumn(databaseId: $databaseId, tableId: $tableId, key: $key) { status } }'; @@ -1127,7 +1171,7 @@ trait Base }'; case self::$CREATE_ROWS: return 'mutation createRows($databaseId: String!, $tableId: String!, $rows: [Json!]!) { - tablesCreateRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { + gridsCreateRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { rows { _id _tableId @@ -1138,7 +1182,7 @@ trait Base }'; case self::$GET_ROW: return 'query getRow($databaseId: String!, $tableId: String!, $rowId: String!) { - tablesGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { + gridsGetRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { _id _tableId _permissions @@ -1147,7 +1191,7 @@ trait Base }'; case self::$GET_ROWS: return 'query listRows($databaseId: String!, $tableId: String!, $queries: [String!] = []) { - tablesListRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { + gridsListRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { total rows { _id @@ -1160,7 +1204,7 @@ trait Base }'; case self::$CREATE_ROW: return 'mutation createRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]) { - tablesCreateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + gridsCreateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _tableId _permissions @@ -1288,7 +1332,7 @@ trait Base }'; case self::$UPDATE_ROW: return 'mutation updateRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!]) { - tablesUpdateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + gridsUpdateRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _tableId data @@ -1296,7 +1340,7 @@ trait Base }'; case self::$UPSERT_ROW: return 'mutation upsertRow($databaseId: String!, $tableId: String!, $rowId: String!, $data: Json!, $permissions: [String!] = []) { - tablesUpsertRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { + gridsUpsertRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId, data: $data, permissions: $permissions) { _id _databaseId _tableId @@ -1305,13 +1349,13 @@ trait Base }'; case self::$DELETE_ROW: return 'mutation deleteRow($databaseId: String!, $tableId: String!, $rowId: String!) { - tablesDeleteRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { + gridsDeleteRow(databaseId: $databaseId, tableId: $tableId, rowId: $rowId) { status } }'; case self::$UPDATE_ROWS: return 'mutation updateRows($databaseId: String!, $tableId: String!, $data: Json!, $queries: [String!]) { - tablesUpdateRows(databaseId: $databaseId, tableId: $tableId, data: $data, queries: $queries) { + gridsUpdateRows(databaseId: $databaseId, tableId: $tableId, data: $data, queries: $queries) { total rows { _id @@ -1324,7 +1368,7 @@ trait Base }'; case self::$UPSERT_ROWS: return 'mutation upsertRows($databaseId: String!, $tableId: String!, $rows: [Json!]!) { - tablesUpsertRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { + gridsUpsertRows(databaseId: $databaseId, tableId: $tableId, rows: $rows) { total rows { _id @@ -1337,7 +1381,7 @@ trait Base }'; case self::$DELETE_ROWS: return 'mutation deleteRows($databaseId: String!, $tableId: String!, $queries: [String!] = []) { - tablesDeleteRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { + gridsDeleteRows(databaseId: $databaseId, tableId: $tableId, queries: $queries) { total rows { _id @@ -3070,7 +3114,7 @@ trait Base _id name } - tablesCreate(databaseId: $databaseId, tableId: $tableId, name: $tableName, rowSecurity: $rowSecurity, permissions: $tablePermissions) { + gridsCreate(databaseId: $databaseId, tableId: $tableId, name: $tableName, rowSecurity: $rowSecurity, permissions: $tablePermissions) { _id _createdAt _updatedAt @@ -3087,7 +3131,7 @@ trait Base status } } - tablesCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: "name", size: 255, required: true) { + gridsCreateStringColumn(databaseId: $databaseId, tableId: $tableId, key: "name", size: 255, required: true) { key type status @@ -3096,7 +3140,7 @@ trait Base default array } - tablesCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: "age", min: 0, max: 150, required: true) { + gridsCreateIntegerColumn(databaseId: $databaseId, tableId: $tableId, key: "age", min: 0, max: 150, required: true) { key type status @@ -3106,7 +3150,7 @@ trait Base default array } - tablesCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: "alive", required: false, default: true) { + gridsCreateBooleanColumn(databaseId: $databaseId, tableId: $tableId, key: "alive", required: false, default: true) { key type status diff --git a/tests/e2e/Services/GraphQL/Grids/AbuseTest.php b/tests/e2e/Services/GraphQL/Grids/AbuseTest.php index e89a3e5c29..1a388871bf 100644 --- a/tests/e2e/Services/GraphQL/Grids/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/Grids/AbuseTest.php @@ -155,7 +155,7 @@ class AbuseTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'], ], $gqlPayload); - $tableId = $response['body']['data']['tablesCreate']['_id']; + $tableId = $response['body']['data']['gridsCreateTable']['_id']; $query = $this->getQuery(self::$CREATE_STRING_COLUMN); $gqlPayload = [ diff --git a/tests/e2e/Services/GraphQL/Grids/AuthTest.php b/tests/e2e/Services/GraphQL/Grids/AuthTest.php index e992616b18..fc6b76818c 100644 --- a/tests/e2e/Services/GraphQL/Grids/AuthTest.php +++ b/tests/e2e/Services/GraphQL/Grids/AuthTest.php @@ -128,7 +128,7 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], + 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], 'key' => 'name', 'size' => 256, 'required' => true, @@ -154,7 +154,7 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], + 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', @@ -178,8 +178,8 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], - 'rowId' => $row['body']['data']['tablesCreateRow']['_id'], + 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], + 'rowId' => $row['body']['data']['gridsCreateRow']['_id'], ] ]; $row = $this->client->call(Client::METHOD_POST, '/graphql', [ @@ -188,7 +188,7 @@ class AuthTest extends Scope 'cookie' => 'a_session_' . $projectId . '=' . $this->token1, ], $gqlPayload); - $this->assertIsArray($row['body']['data']['tablesGetRow']); + $this->assertIsArray($row['body']['data']['gridsGetRow']); $this->assertArrayNotHasKey('errors', $row['body']); // Try to read as account 2 @@ -213,7 +213,7 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], + 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], 'rowId' => ID::unique(), 'data' => [ 'name' => 'John Doe', @@ -237,8 +237,8 @@ class AuthTest extends Scope 'query' => $query, 'variables' => [ 'databaseId' => $this->database['body']['data']['databasesCreate']['_id'], - 'tableId' => $this->table['body']['data']['tablesCreate']['_id'], - 'rowId' => $row['body']['data']['tablesCreateRow']['_id'], + 'tableId' => $this->table['body']['data']['gridsCreateTable']['_id'], + 'rowId' => $row['body']['data']['gridsCreateRow']['_id'], ] ]; $row = $this->client->call(Client::METHOD_POST, '/graphql', [ diff --git a/tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php b/tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php index 302d35724c..8095692b92 100644 --- a/tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php +++ b/tests/e2e/Services/GraphQL/Grids/DatabaseClientTest.php @@ -21,7 +21,7 @@ class DatabaseClientTest extends Scope public function testCreateDatabase(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -38,7 +38,7 @@ class DatabaseClientTest extends Scope $this->assertIsArray($database['body']['data']); $this->assertArrayNotHasKey('errors', $database['body']); - $database = $database['body']['data']['databasesCreate']; + $database = $database['body']['data']['gridsCreateDatabase']; $this->assertEquals('Actors', $database['name']); return $database; @@ -75,7 +75,7 @@ class DatabaseClientTest extends Scope $this->assertIsArray($table['body']['data']); $this->assertArrayNotHasKey('errors', $table['body']); - $table = $table['body']['data']['tablesCreate']; + $table = $table['body']['data']['gridsCreateTable']; $this->assertEquals('Actors', $table['name']); return [ @@ -110,7 +110,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateStringColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateStringColumn']); return $data; } @@ -142,7 +142,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateIntegerColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateIntegerColumn']); return $data; } @@ -183,7 +183,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['tablesCreateRow']; + $row = $row['body']['data']['gridsCreateRow']; $this->assertIsArray($row); return [ @@ -216,7 +216,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $rows['body']); $this->assertIsArray($rows['body']['data']); - $this->assertIsArray($rows['body']['data']['tablesListRows']); + $this->assertIsArray($rows['body']['data']['gridsListRows']); } /** @@ -243,7 +243,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $this->assertIsArray($row['body']['data']['tablesGetRow']); + $this->assertIsArray($row['body']['data']['gridsGetRow']); } /** @@ -273,7 +273,7 @@ class DatabaseClientTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['tablesUpdateRow']; + $row = $row['body']['data']['gridsUpdateRow']; $this->assertIsArray($row); $this->assertStringContainsString('New Row Name', $row['data']); @@ -319,7 +319,7 @@ class DatabaseClientTest extends Scope ]; // Step 1: Create database - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); $payload = [ 'query' => $query, 'variables' => [ @@ -330,7 +330,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $databaseId = $res['body']['data']['databasesCreate']['_id']; + $databaseId = $res['body']['data']['gridsCreateDatabase']['_id']; // Step 2: Create table $query = $this->getQuery(self::$CREATE_TABLE); @@ -349,7 +349,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $tableId = $res['body']['data']['tablesCreate']['_id']; + $tableId = $res['body']['data']['gridsCreateTable']['_id']; // Step 3: Create column $query = $this->getQuery(self::$CREATE_STRING_COLUMN); @@ -382,7 +382,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(10, $res['body']['data']['tablesCreateRows']['rows']); + $this->assertCount(10, $res['body']['data']['gridsCreateRows']['rows']); return compact('databaseId', 'tableId', 'projectId'); } @@ -421,7 +421,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(10, $res['body']['data']['tablesUpdateRows']['rows']); + $this->assertCount(10, $res['body']['data']['gridsUpdateRows']['rows']); // Step 2: Fetch and validate updated rows $query = $this->getQuery(self::$GET_ROWS); @@ -437,7 +437,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertEquals(200, $res['headers']['status-code']); - $fetched = $res['body']['data']['tablesListRows']; + $fetched = $res['body']['data']['gridsListRows']; $this->assertEquals(10, $fetched['total']); foreach ($fetched['rows'] as $row) { @@ -490,7 +490,7 @@ class DatabaseClientTest extends Scope $response = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $upsertPayload); $this->assertArrayNotHasKey('errors', $response['body']); - $rows = $response['body']['data']['tablesUpsertRows']['rows']; + $rows = $response['body']['data']['gridsUpsertRows']['rows']; $this->assertCount(2, $rows); $rowMap = []; @@ -515,7 +515,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $fetchPayload); $this->assertEquals(200, $res['headers']['status-code']); - $fetched = $res['body']['data']['tablesListRows']; + $fetched = $res['body']['data']['gridsListRows']; $this->assertEquals(11, $fetched['total']); // Step 3: Upsert row with new permissions using `tablesUpsertRow` @@ -534,7 +534,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $updated = $res['body']['data']['tablesUpsertRow']; + $updated = $res['body']['data']['gridsUpsertRow']; $this->assertEquals('Row #10 Patched', json_decode($updated['data'], true)['name']); $this->assertEquals($data['databaseId'], $updated['_databaseId']); $this->assertEquals($data['tableId'], $updated['_tableId']); @@ -566,7 +566,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $deleted = $res['body']['data']['tablesDeleteRows']['rows']; + $deleted = $res['body']['data']['gridsDeleteRows']['rows']; $this->assertIsArray($deleted); $this->assertCount(11, $deleted); @@ -582,7 +582,7 @@ class DatabaseClientTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertEquals(200, $res['headers']['status-code']); - $this->assertEquals(0, $res['body']['data']['tablesListRows']['total']); + $this->assertEquals(0, $res['body']['data']['gridsListRows']['total']); return $data; } diff --git a/tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php b/tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php index c59e0a4c6f..aadee9749c 100644 --- a/tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php +++ b/tests/e2e/Services/GraphQL/Grids/DatabaseServerTest.php @@ -23,7 +23,7 @@ class DatabaseServerTest extends Scope public function testCreateDatabase(): array { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -39,7 +39,7 @@ class DatabaseServerTest extends Scope $this->assertIsArray($database['body']['data']); $this->assertArrayNotHasKey('errors', $database['body']); - $database = $database['body']['data']['databasesCreate']; + $database = $database['body']['data']['gridsCreateDatabase']; $this->assertEquals('Actors', $database['name']); return $database; @@ -75,7 +75,7 @@ class DatabaseServerTest extends Scope $this->assertIsArray($table['body']['data']); $this->assertArrayNotHasKey('errors', $table['body']); - $table = $table['body']['data']['tablesCreate']; + $table = $table['body']['data']['gridsCreateTable']; $this->assertEquals('Actors', $table['name']); $gqlPayload = [ @@ -101,7 +101,7 @@ class DatabaseServerTest extends Scope $this->assertIsArray($table2['body']['data']); $this->assertArrayNotHasKey('errors', $table2['body']); - $table2 = $table2['body']['data']['tablesCreate']; + $table2 = $table2['body']['data']['gridsCreateTable']; $this->assertEquals('Movies', $table2['name']); return [ @@ -138,7 +138,7 @@ class DatabaseServerTest extends Scope // TODO: @itznotabug - check for `encrypt` attribute in string column's response body as well! $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateStringColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateStringColumn']); return $data; } @@ -171,9 +171,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateStringColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateStringColumn']['required']); - $this->assertEquals('Default Value', $column['body']['data']['tablesUpdateStringColumn']['default']); + $this->assertIsArray($column['body']['data']['gridsUpdateStringColumn']); + $this->assertFalse($column['body']['data']['gridsUpdateStringColumn']['required']); + $this->assertEquals('Default Value', $column['body']['data']['gridsUpdateStringColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -206,7 +206,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateIntegerColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateIntegerColumn']); return $data; } @@ -241,11 +241,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateIntegerColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateIntegerColumn']['required']); - $this->assertEquals(12, $column['body']['data']['tablesUpdateIntegerColumn']['min']); - $this->assertEquals(160, $column['body']['data']['tablesUpdateIntegerColumn']['max']); - $this->assertEquals(50, $column['body']['data']['tablesUpdateIntegerColumn']['default']); + $this->assertIsArray($column['body']['data']['gridsUpdateIntegerColumn']); + $this->assertFalse($column['body']['data']['gridsUpdateIntegerColumn']['required']); + $this->assertEquals(12, $column['body']['data']['gridsUpdateIntegerColumn']['min']); + $this->assertEquals(160, $column['body']['data']['gridsUpdateIntegerColumn']['max']); + $this->assertEquals(50, $column['body']['data']['gridsUpdateIntegerColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -276,7 +276,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateBooleanColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateBooleanColumn']); return $data; } @@ -309,9 +309,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateBooleanColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateBooleanColumn']['required']); - $this->assertTrue($column['body']['data']['tablesUpdateBooleanColumn']['default']); + $this->assertIsArray($column['body']['data']['gridsUpdateBooleanColumn']); + $this->assertFalse($column['body']['data']['gridsUpdateBooleanColumn']['required']); + $this->assertTrue($column['body']['data']['gridsUpdateBooleanColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -345,7 +345,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateFloatColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateFloatColumn']); return $data; } @@ -380,11 +380,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateFloatColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateFloatColumn']['required']); - $this->assertEquals(100.0, $column['body']['data']['tablesUpdateFloatColumn']['min']); - $this->assertEquals(1000000.0, $column['body']['data']['tablesUpdateFloatColumn']['max']); - $this->assertEquals(2500.0, $column['body']['data']['tablesUpdateFloatColumn']['default']); + $this->assertIsArray($column['body']['data']['gridsUpdateFloatColumn']); + $this->assertFalse($column['body']['data']['gridsUpdateFloatColumn']['required']); + $this->assertEquals(100.0, $column['body']['data']['gridsUpdateFloatColumn']['min']); + $this->assertEquals(1000000.0, $column['body']['data']['gridsUpdateFloatColumn']['max']); + $this->assertEquals(2500.0, $column['body']['data']['gridsUpdateFloatColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -415,7 +415,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateEmailColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateEmailColumn']); return $data; } @@ -448,9 +448,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateEmailColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateEmailColumn']['required']); - $this->assertEquals('torsten@appwrite.io', $column['body']['data']['tablesUpdateEmailColumn']['default']); + $this->assertIsArray($column['body']['data']['gridsUpdateEmailColumn']); + $this->assertFalse($column['body']['data']['gridsUpdateEmailColumn']['required']); + $this->assertEquals('torsten@appwrite.io', $column['body']['data']['gridsUpdateEmailColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -486,7 +486,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateEnumColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateEnumColumn']); return $data; } @@ -525,11 +525,11 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateEnumColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateEnumColumn']['required']); - $this->assertEquals('tech', $column['body']['data']['tablesUpdateEnumColumn']['default']); - $this->assertContains('tech', $column['body']['data']['tablesUpdateEnumColumn']['elements']); - $this->assertNotContains('guest', $column['body']['data']['tablesUpdateEnumColumn']['elements']); + $this->assertIsArray($column['body']['data']['gridsUpdateEnumColumn']); + $this->assertFalse($column['body']['data']['gridsUpdateEnumColumn']['required']); + $this->assertEquals('tech', $column['body']['data']['gridsUpdateEnumColumn']['default']); + $this->assertContains('tech', $column['body']['data']['gridsUpdateEnumColumn']['elements']); + $this->assertNotContains('guest', $column['body']['data']['gridsUpdateEnumColumn']['elements']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -560,7 +560,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateDatetimeColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateDatetimeColumn']); return $data; } @@ -593,9 +593,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateDatetimeColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateDatetimeColumn']['required']); - $this->assertEquals('2000-01-01T00:00:00Z', $column['body']['data']['tablesUpdateDatetimeColumn']['default']); + $this->assertIsArray($column['body']['data']['gridsUpdateDatetimeColumn']); + $this->assertFalse($column['body']['data']['gridsUpdateDatetimeColumn']['required']); + $this->assertEquals('2000-01-01T00:00:00Z', $column['body']['data']['gridsUpdateDatetimeColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -628,7 +628,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateRelationshipColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateRelationshipColumn']); return $data; } @@ -659,7 +659,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateRelationshipColumn']); + $this->assertIsArray($column['body']['data']['gridsUpdateRelationshipColumn']); return $data; } @@ -690,7 +690,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateIpColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateIpColumn']); return $data; } @@ -723,9 +723,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateIpColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateIpColumn']['required']); - $this->assertEquals('127.0.0.1', $column['body']['data']['tablesUpdateIpColumn']['default']); + $this->assertIsArray($column['body']['data']['gridsUpdateIpColumn']); + $this->assertFalse($column['body']['data']['gridsUpdateIpColumn']['required']); + $this->assertEquals('127.0.0.1', $column['body']['data']['gridsUpdateIpColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); return $data; @@ -757,7 +757,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesCreateUrlColumn']); + $this->assertIsArray($column['body']['data']['gridsCreateUrlColumn']); return $data; } @@ -790,9 +790,9 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()), $gqlPayload); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesUpdateUrlColumn']); - $this->assertFalse($column['body']['data']['tablesUpdateUrlColumn']['required']); - $this->assertEquals('https://cloud.appwrite.io', $column['body']['data']['tablesUpdateUrlColumn']['default']); + $this->assertIsArray($column['body']['data']['gridsUpdateUrlColumn']); + $this->assertFalse($column['body']['data']['gridsUpdateUrlColumn']['required']); + $this->assertEquals('https://cloud.appwrite.io', $column['body']['data']['gridsUpdateUrlColumn']['default']); $this->assertEquals(200, $column['headers']['status-code']); } @@ -826,12 +826,12 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['tablesCreateIndex']); + $this->assertIsArray($index['body']['data']['gridsCreateIndex']); return [ 'database' => $data['database'], 'table' => $data['table'], - 'index' => $index['body']['data']['tablesCreateIndex'], + 'index' => $index['body']['data']['gridsCreateIndex'], ]; } @@ -877,7 +877,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['tablesCreateRow']; + $row = $row['body']['data']['gridsCreateRow']; $this->assertIsArray($row); return [ @@ -930,7 +930,7 @@ class DatabaseServerTest extends Scope public function testGetDatabases(): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DATABASES); + $query = $this->getQuery(self::$GRIDS_GET_DATABASES); $gqlPayload = [ 'query' => $query, ]; @@ -942,7 +942,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $databases['body']); $this->assertIsArray($databases['body']['data']); - $this->assertIsArray($databases['body']['data']['databasesList']); + $this->assertIsArray($databases['body']['data']['gridsListDatabases']); } /** @@ -952,7 +952,7 @@ class DatabaseServerTest extends Scope public function testGetDatabase($database): void { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$GET_DATABASE); + $query = $this->getQuery(self::$GRIDS_GET_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -967,7 +967,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $database['body']); $this->assertIsArray($database['body']['data']); - $this->assertIsArray($database['body']['data']['databasesGet']); + $this->assertIsArray($database['body']['data']['gridsGetDatabase']); } /** @@ -990,9 +990,11 @@ class DatabaseServerTest extends Scope 'x-appwrite-project' => $projectId, ], $this->getHeaders()), $gqlPayload); + + $this->assertArrayNotHasKey('errors', $tables['body']); $this->assertIsArray($tables['body']['data']); - $this->assertIsArray($tables['body']['data']['tablesList']); + $this->assertIsArray($tables['body']['data']['gridsListTables']); } /** @@ -1018,7 +1020,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $table['body']); $this->assertIsArray($table['body']['data']); - $this->assertIsArray($table['body']['data']['tablesGet']); + $this->assertIsArray($table['body']['data']['gridsGetTable']); } /** @@ -1045,7 +1047,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $columns['body']); $this->assertIsArray($columns['body']['data']); - $this->assertIsArray($columns['body']['data']['tablesListColumns']); + $this->assertIsArray($columns['body']['data']['gridsListColumns']); } /** @@ -1072,7 +1074,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $column['body']); $this->assertIsArray($column['body']['data']); - $this->assertIsArray($column['body']['data']['tablesGetColumn']); + $this->assertIsArray($column['body']['data']['gridsGetColumn']); } /** @@ -1098,7 +1100,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $indices['body']); $this->assertIsArray($indices['body']['data']); - $this->assertIsArray($indices['body']['data']['tablesListIndexes']); + $this->assertIsArray($indices['body']['data']['gridsListIndexes']); } /** @@ -1125,7 +1127,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $index['body']); $this->assertIsArray($index['body']['data']); - $this->assertIsArray($index['body']['data']['tablesGetIndex']); + $this->assertIsArray($index['body']['data']['gridsGetIndex']); } /** @@ -1151,7 +1153,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $rows['body']); $this->assertIsArray($rows['body']['data']); - $this->assertIsArray($rows['body']['data']['tablesListRows']); + $this->assertIsArray($rows['body']['data']['gridsListRows']); } /** @@ -1178,7 +1180,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $this->assertIsArray($row['body']['data']['tablesGetRow']); + $this->assertIsArray($row['body']['data']['gridsGetRow']); } // /** @@ -1235,7 +1237,7 @@ class DatabaseServerTest extends Scope public function testUpdateDatabase($database) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$UPDATE_DATABASE); + $query = $this->getQuery(self::$GRIDS_UPDATE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1251,7 +1253,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $database['body']); $this->assertIsArray($database['body']['data']); - $this->assertIsArray($database['body']['data']['databasesUpdate']); + $this->assertIsArray($database['body']['data']['gridsUpdateDatabase']); } /** @@ -1279,7 +1281,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $table['body']); $this->assertIsArray($table['body']['data']); - $this->assertIsArray($table['body']['data']['tablesUpdate']); + $this->assertIsArray($table['body']['data']['gridsUpdateTable']); } /** @@ -1309,7 +1311,7 @@ class DatabaseServerTest extends Scope $this->assertArrayNotHasKey('errors', $row['body']); $this->assertIsArray($row['body']['data']); - $row = $row['body']['data']['tablesUpdateRow']; + $row = $row['body']['data']['gridsUpdateRow']; $this->assertIsArray($row); $this->assertStringContainsString('New Row Name', $row['data']); } @@ -1450,7 +1452,7 @@ class DatabaseServerTest extends Scope public function testDeleteDatabase($database) { $projectId = $this->getProject()['$id']; - $query = $this->getQuery(self::$DELETE_DATABASE); + $query = $this->getQuery(self::$GRIDS_DELETE_DATABASE); $gqlPayload = [ 'query' => $query, 'variables' => [ @@ -1480,7 +1482,7 @@ class DatabaseServerTest extends Scope ], $this->getHeaders()); // Step 1: Create database - $query = $this->getQuery(self::$CREATE_DATABASE); + $query = $this->getQuery(self::$GRIDS_CREATE_DATABASE); $payload = [ 'query' => $query, 'variables' => [ @@ -1491,7 +1493,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $databaseId = $res['body']['data']['databasesCreate']['_id']; + $databaseId = $res['body']['data']['gridsCreateDatabase']['_id']; // Step 2: Create table $query = $this->getQuery(self::$CREATE_TABLE); @@ -1510,7 +1512,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $tableId = $res['body']['data']['tablesCreate']['_id']; + $tableId = $res['body']['data']['gridsCreateTable']['_id']; // Step 3: Create column $query = $this->getQuery(self::$CREATE_STRING_COLUMN); @@ -1543,7 +1545,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(10, $res['body']['data']['tablesCreateRows']['rows']); + $this->assertCount(10, $res['body']['data']['gridsCreateRows']['rows']); return compact('databaseId', 'tableId', 'projectId'); } @@ -1581,7 +1583,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $this->assertCount(10, $res['body']['data']['tablesUpdateRows']['rows']); + $this->assertCount(10, $res['body']['data']['gridsUpdateRows']['rows']); // Step 2: Fetch and validate updated rows $query = $this->getQuery(self::$GET_ROWS); @@ -1597,7 +1599,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertEquals(200, $res['headers']['status-code']); - $fetched = $res['body']['data']['tablesListRows']; + $fetched = $res['body']['data']['gridsListRows']; $this->assertEquals(10, $fetched['total']); foreach ($fetched['rows'] as $row) { @@ -1649,7 +1651,7 @@ class DatabaseServerTest extends Scope $response = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $upsertPayload); $this->assertArrayNotHasKey('errors', $response['body']); - $rows = $response['body']['data']['tablesUpsertRows']['rows']; + $rows = $response['body']['data']['gridsUpsertRows']['rows']; $this->assertCount(2, $rows); $rowMap = []; @@ -1674,7 +1676,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $fetchPayload); $this->assertEquals(200, $res['headers']['status-code']); - $fetched = $res['body']['data']['tablesListRows']; + $fetched = $res['body']['data']['gridsListRows']; $this->assertEquals(11, $fetched['total']); // Step 3: Upsert row with new permissions using `tablesUpsertRow` @@ -1693,7 +1695,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $updated = $res['body']['data']['tablesUpsertRow']; + $updated = $res['body']['data']['gridsUpsertRow']; $this->assertEquals('Row #10 Patched', json_decode($updated['data'], true)['name']); $this->assertEquals($data['databaseId'], $updated['_databaseId']); $this->assertEquals($data['tableId'], $updated['_tableId']); @@ -1724,7 +1726,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertArrayNotHasKey('errors', $res['body']); - $deleted = $res['body']['data']['tablesDeleteRows']['rows']; + $deleted = $res['body']['data']['gridsDeleteRows']['rows']; $this->assertIsArray($deleted); $this->assertCount(11, $deleted); @@ -1740,7 +1742,7 @@ class DatabaseServerTest extends Scope $res = $this->client->call(Client::METHOD_POST, '/graphql', $headers, $payload); $this->assertEquals(200, $res['headers']['status-code']); - $this->assertEquals(0, $res['body']['data']['tablesListRows']['total']); + $this->assertEquals(0, $res['body']['data']['gridsListRows']['total']); return $data; } From ba79c5d9df3099d0b3275a4c7e22bf03877bf92e Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 16:31:10 +0530 Subject: [PATCH 289/362] update: docs. --- .../references/grids/create-boolean-column.md | 1 + docs/references/grids/create-database.md | 1 + .../grids/create-datetime-column.md | 1 + docs/references/grids/create-email-column.md | 1 + docs/references/grids/create-enum-column.md | 1 + docs/references/grids/create-float-column.md | 1 + docs/references/grids/create-index.md | 2 ++ .../references/grids/create-integer-column.md | 1 + docs/references/grids/create-ip-column.md | 1 + .../grids/create-relationship-column.md | 1 + docs/references/grids/create-row.md | 1 + docs/references/grids/create-rows.md | 1 + docs/references/grids/create-string-column.md | 1 + docs/references/grids/create-table.md | 1 + docs/references/grids/create-url-column.md | 1 + docs/references/grids/decrement-row-column.md | 1 + docs/references/grids/delete-column.md | 1 + docs/references/grids/delete-database.md | 1 + docs/references/grids/delete-index.md | 1 + docs/references/grids/delete-row.md | 1 + docs/references/grids/delete-rows.md | 1 + docs/references/grids/delete-table.md | 1 + docs/references/grids/get-column.md | 1 + docs/references/grids/get-database-usage.md | 1 + docs/references/grids/get-database.md | 1 + docs/references/grids/get-index.md | 1 + docs/references/grids/get-logs.md | 1 + docs/references/grids/get-row-logs.md | 1 + docs/references/grids/get-row.md | 1 + docs/references/grids/get-table-logs.md | 1 + docs/references/grids/get-table-usage.md | 1 + docs/references/grids/get-table.md | 1 + docs/references/grids/increment-row-column.md | 1 + docs/references/grids/list-columns.md | 1 + docs/references/grids/list-database-usage.md | 1 + docs/references/grids/list-databases.md | 1 + docs/references/grids/list-indexes.md | 1 + docs/references/grids/list-rows.md | 1 + docs/references/grids/list-tables.md | 1 + .../references/grids/update-boolean-column.md | 1 + docs/references/grids/update-database.md | 1 + .../grids/update-datetime-column.md | 1 + docs/references/grids/update-email-column.md | 1 + docs/references/grids/update-enum-column.md | 1 + docs/references/grids/update-float-column.md | 1 + .../references/grids/update-integer-column.md | 1 + docs/references/grids/update-ip-column.md | 1 + .../grids/update-relationship-column.md | 1 + docs/references/grids/update-row.md | 1 + docs/references/grids/update-rows.md | 1 + docs/references/grids/update-string-column.md | 1 + docs/references/grids/update-table.md | 1 + docs/references/grids/update-url-column.md | 1 + docs/references/grids/upsert-row.md | 1 + docs/references/grids/upsert-rows.md | 1 + .../Grids/Tables/Columns/Boolean/Create.php | 2 +- .../Grids/Tables/Columns/Boolean/Update.php | 2 +- .../Grids/Tables/Columns/Datetime/Create.php | 2 +- .../Grids/Tables/Columns/Datetime/Update.php | 2 +- .../Http/Grids/Tables/Columns/Delete.php | 2 +- .../Grids/Tables/Columns/Email/Create.php | 2 +- .../Grids/Tables/Columns/Email/Update.php | 2 +- .../Http/Grids/Tables/Columns/Enum/Create.php | 2 +- .../Http/Grids/Tables/Columns/Enum/Update.php | 2 +- .../Grids/Tables/Columns/Float/Create.php | 2 +- .../Grids/Tables/Columns/Float/Update.php | 2 +- .../Http/Grids/Tables/Columns/Get.php | 2 +- .../Http/Grids/Tables/Columns/IP/Create.php | 2 +- .../Http/Grids/Tables/Columns/IP/Update.php | 2 +- .../Grids/Tables/Columns/Integer/Create.php | 2 +- .../Grids/Tables/Columns/Integer/Update.php | 2 +- .../Tables/Columns/Relationship/Create.php | 2 +- .../Tables/Columns/Relationship/Update.php | 2 +- .../Grids/Tables/Columns/String/Create.php | 2 +- .../Grids/Tables/Columns/String/Update.php | 2 +- .../Http/Grids/Tables/Columns/URL/Create.php | 2 +- .../Http/Grids/Tables/Columns/URL/Update.php | 2 +- .../Http/Grids/Tables/Columns/XList.php | 2 +- .../Databases/Http/Grids/Tables/Create.php | 2 +- .../Databases/Http/Grids/Tables/Delete.php | 2 +- .../Databases/Http/Grids/Tables/Get.php | 2 +- .../Http/Grids/Tables/Indexes/Create.php | 2 +- .../Http/Grids/Tables/Indexes/Delete.php | 2 +- .../Http/Grids/Tables/Indexes/Get.php | 2 +- .../Http/Grids/Tables/Indexes/XList.php | 2 +- .../Http/Grids/Tables/Logs/XList.php | 2 +- .../Http/Grids/Tables/Rows/Bulk/Delete.php | 2 +- .../Http/Grids/Tables/Rows/Bulk/Update.php | 2 +- .../Http/Grids/Tables/Rows/Bulk/Upsert.php | 2 +- .../Grids/Tables/Rows/Column/Decrement.php | 2 +- .../Grids/Tables/Rows/Column/Increment.php | 2 +- .../Http/Grids/Tables/Rows/Create.php | 4 +-- .../Http/Grids/Tables/Rows/Delete.php | 2 +- .../Databases/Http/Grids/Tables/Rows/Get.php | 2 +- .../Http/Grids/Tables/Rows/Logs/XList.php | 2 +- .../Http/Grids/Tables/Rows/Update.php | 2 +- .../Http/Grids/Tables/Rows/Upsert.php | 2 +- .../Http/Grids/Tables/Rows/XList.php | 2 +- .../Databases/Http/Grids/Tables/Update.php | 2 +- .../Databases/Http/Grids/Tables/Usage/Get.php | 2 +- .../Databases/Http/Grids/Tables/XList.php | 2 +- .../Platform/Modules/Databases/SDKMethod.php | 32 ++++++++++++------- 102 files changed, 124 insertions(+), 58 deletions(-) create mode 100644 docs/references/grids/create-boolean-column.md create mode 100644 docs/references/grids/create-database.md create mode 100644 docs/references/grids/create-datetime-column.md create mode 100644 docs/references/grids/create-email-column.md create mode 100644 docs/references/grids/create-enum-column.md create mode 100644 docs/references/grids/create-float-column.md create mode 100644 docs/references/grids/create-index.md create mode 100644 docs/references/grids/create-integer-column.md create mode 100644 docs/references/grids/create-ip-column.md create mode 100644 docs/references/grids/create-relationship-column.md create mode 100644 docs/references/grids/create-row.md create mode 100644 docs/references/grids/create-rows.md create mode 100644 docs/references/grids/create-string-column.md create mode 100644 docs/references/grids/create-table.md create mode 100644 docs/references/grids/create-url-column.md create mode 100644 docs/references/grids/decrement-row-column.md create mode 100644 docs/references/grids/delete-column.md create mode 100644 docs/references/grids/delete-database.md create mode 100644 docs/references/grids/delete-index.md create mode 100644 docs/references/grids/delete-row.md create mode 100644 docs/references/grids/delete-rows.md create mode 100644 docs/references/grids/delete-table.md create mode 100644 docs/references/grids/get-column.md create mode 100644 docs/references/grids/get-database-usage.md create mode 100644 docs/references/grids/get-database.md create mode 100644 docs/references/grids/get-index.md create mode 100644 docs/references/grids/get-logs.md create mode 100644 docs/references/grids/get-row-logs.md create mode 100644 docs/references/grids/get-row.md create mode 100644 docs/references/grids/get-table-logs.md create mode 100644 docs/references/grids/get-table-usage.md create mode 100644 docs/references/grids/get-table.md create mode 100644 docs/references/grids/increment-row-column.md create mode 100644 docs/references/grids/list-columns.md create mode 100644 docs/references/grids/list-database-usage.md create mode 100644 docs/references/grids/list-databases.md create mode 100644 docs/references/grids/list-indexes.md create mode 100644 docs/references/grids/list-rows.md create mode 100644 docs/references/grids/list-tables.md create mode 100644 docs/references/grids/update-boolean-column.md create mode 100644 docs/references/grids/update-database.md create mode 100644 docs/references/grids/update-datetime-column.md create mode 100644 docs/references/grids/update-email-column.md create mode 100644 docs/references/grids/update-enum-column.md create mode 100644 docs/references/grids/update-float-column.md create mode 100644 docs/references/grids/update-integer-column.md create mode 100644 docs/references/grids/update-ip-column.md create mode 100644 docs/references/grids/update-relationship-column.md create mode 100644 docs/references/grids/update-row.md create mode 100644 docs/references/grids/update-rows.md create mode 100644 docs/references/grids/update-string-column.md create mode 100644 docs/references/grids/update-table.md create mode 100644 docs/references/grids/update-url-column.md create mode 100644 docs/references/grids/upsert-row.md create mode 100644 docs/references/grids/upsert-rows.md diff --git a/docs/references/grids/create-boolean-column.md b/docs/references/grids/create-boolean-column.md new file mode 100644 index 0000000000..c528ede1a2 --- /dev/null +++ b/docs/references/grids/create-boolean-column.md @@ -0,0 +1 @@ +Create a boolean column. diff --git a/docs/references/grids/create-database.md b/docs/references/grids/create-database.md new file mode 100644 index 0000000000..b608485341 --- /dev/null +++ b/docs/references/grids/create-database.md @@ -0,0 +1 @@ +Create a new Database. diff --git a/docs/references/grids/create-datetime-column.md b/docs/references/grids/create-datetime-column.md new file mode 100644 index 0000000000..ad92750639 --- /dev/null +++ b/docs/references/grids/create-datetime-column.md @@ -0,0 +1 @@ +Create a date time column according to the ISO 8601 standard. \ No newline at end of file diff --git a/docs/references/grids/create-email-column.md b/docs/references/grids/create-email-column.md new file mode 100644 index 0000000000..91aa5c9326 --- /dev/null +++ b/docs/references/grids/create-email-column.md @@ -0,0 +1 @@ +Create an email column. diff --git a/docs/references/grids/create-enum-column.md b/docs/references/grids/create-enum-column.md new file mode 100644 index 0000000000..b9e5a3ebe4 --- /dev/null +++ b/docs/references/grids/create-enum-column.md @@ -0,0 +1 @@ +Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. \ No newline at end of file diff --git a/docs/references/grids/create-float-column.md b/docs/references/grids/create-float-column.md new file mode 100644 index 0000000000..0b133eef28 --- /dev/null +++ b/docs/references/grids/create-float-column.md @@ -0,0 +1 @@ +Create a float column. Optionally, minimum and maximum values can be provided. diff --git a/docs/references/grids/create-index.md b/docs/references/grids/create-index.md new file mode 100644 index 0000000000..6ce853a217 --- /dev/null +++ b/docs/references/grids/create-index.md @@ -0,0 +1,2 @@ +Creates an index on the columns listed. Your index should include all the columns you will query in a single request. +Columns can be `key`, `fulltext`, and `unique`. \ No newline at end of file diff --git a/docs/references/grids/create-integer-column.md b/docs/references/grids/create-integer-column.md new file mode 100644 index 0000000000..5f51b3965a --- /dev/null +++ b/docs/references/grids/create-integer-column.md @@ -0,0 +1 @@ +Create an integer column. Optionally, minimum and maximum values can be provided. diff --git a/docs/references/grids/create-ip-column.md b/docs/references/grids/create-ip-column.md new file mode 100644 index 0000000000..012431dbae --- /dev/null +++ b/docs/references/grids/create-ip-column.md @@ -0,0 +1 @@ +Create IP address column. diff --git a/docs/references/grids/create-relationship-column.md b/docs/references/grids/create-relationship-column.md new file mode 100644 index 0000000000..d87d8bccf8 --- /dev/null +++ b/docs/references/grids/create-relationship-column.md @@ -0,0 +1 @@ +Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). diff --git a/docs/references/grids/create-row.md b/docs/references/grids/create-row.md new file mode 100644 index 0000000000..a07abfa04d --- /dev/null +++ b/docs/references/grids/create-row.md @@ -0,0 +1 @@ +Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/grids/create-rows.md b/docs/references/grids/create-rows.md new file mode 100644 index 0000000000..cea67913b4 --- /dev/null +++ b/docs/references/grids/create-rows.md @@ -0,0 +1 @@ +Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/grids/create-string-column.md b/docs/references/grids/create-string-column.md new file mode 100644 index 0000000000..7395e26a11 --- /dev/null +++ b/docs/references/grids/create-string-column.md @@ -0,0 +1 @@ +Create a string column. diff --git a/docs/references/grids/create-table.md b/docs/references/grids/create-table.md new file mode 100644 index 0000000000..263638ea00 --- /dev/null +++ b/docs/references/grids/create-table.md @@ -0,0 +1 @@ +Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/grids/create-url-column.md b/docs/references/grids/create-url-column.md new file mode 100644 index 0000000000..e731d758ce --- /dev/null +++ b/docs/references/grids/create-url-column.md @@ -0,0 +1 @@ +Create a URL column. diff --git a/docs/references/grids/decrement-row-column.md b/docs/references/grids/decrement-row-column.md new file mode 100644 index 0000000000..b7b32d6148 --- /dev/null +++ b/docs/references/grids/decrement-row-column.md @@ -0,0 +1 @@ +Decrement a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/grids/delete-column.md b/docs/references/grids/delete-column.md new file mode 100644 index 0000000000..efba8b1d77 --- /dev/null +++ b/docs/references/grids/delete-column.md @@ -0,0 +1 @@ +Deletes a column. \ No newline at end of file diff --git a/docs/references/grids/delete-database.md b/docs/references/grids/delete-database.md new file mode 100644 index 0000000000..605fa290d3 --- /dev/null +++ b/docs/references/grids/delete-database.md @@ -0,0 +1 @@ +Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database. \ No newline at end of file diff --git a/docs/references/grids/delete-index.md b/docs/references/grids/delete-index.md new file mode 100644 index 0000000000..c5b8f49e5f --- /dev/null +++ b/docs/references/grids/delete-index.md @@ -0,0 +1 @@ +Delete an index. \ No newline at end of file diff --git a/docs/references/grids/delete-row.md b/docs/references/grids/delete-row.md new file mode 100644 index 0000000000..c0b9dfbdaf --- /dev/null +++ b/docs/references/grids/delete-row.md @@ -0,0 +1 @@ +Delete a row by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/delete-rows.md b/docs/references/grids/delete-rows.md new file mode 100644 index 0000000000..9d5189ce76 --- /dev/null +++ b/docs/references/grids/delete-rows.md @@ -0,0 +1 @@ +Bulk delete rows using queries, if no queries are passed then all rows are deleted. \ No newline at end of file diff --git a/docs/references/grids/delete-table.md b/docs/references/grids/delete-table.md new file mode 100644 index 0000000000..ad74ca3233 --- /dev/null +++ b/docs/references/grids/delete-table.md @@ -0,0 +1 @@ +Delete a table by its unique ID. Only users with write permissions have access to delete this resource. \ No newline at end of file diff --git a/docs/references/grids/get-column.md b/docs/references/grids/get-column.md new file mode 100644 index 0000000000..cd8b8797a9 --- /dev/null +++ b/docs/references/grids/get-column.md @@ -0,0 +1 @@ +Get column by ID. \ No newline at end of file diff --git a/docs/references/grids/get-database-usage.md b/docs/references/grids/get-database-usage.md new file mode 100644 index 0000000000..d9298f4814 --- /dev/null +++ b/docs/references/grids/get-database-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/grids/get-database.md b/docs/references/grids/get-database.md new file mode 100644 index 0000000000..24183f6f6b --- /dev/null +++ b/docs/references/grids/get-database.md @@ -0,0 +1 @@ +Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata. \ No newline at end of file diff --git a/docs/references/grids/get-index.md b/docs/references/grids/get-index.md new file mode 100644 index 0000000000..cdea5b4f27 --- /dev/null +++ b/docs/references/grids/get-index.md @@ -0,0 +1 @@ +Get index by ID. \ No newline at end of file diff --git a/docs/references/grids/get-logs.md b/docs/references/grids/get-logs.md new file mode 100644 index 0000000000..8e49da4603 --- /dev/null +++ b/docs/references/grids/get-logs.md @@ -0,0 +1 @@ +Get the database activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/get-row-logs.md b/docs/references/grids/get-row-logs.md new file mode 100644 index 0000000000..1d494ed53e --- /dev/null +++ b/docs/references/grids/get-row-logs.md @@ -0,0 +1 @@ +Get the row activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/get-row.md b/docs/references/grids/get-row.md new file mode 100644 index 0000000000..6a30fa472c --- /dev/null +++ b/docs/references/grids/get-row.md @@ -0,0 +1 @@ +Get a row by its unique ID. This endpoint response returns a JSON object with the row data. \ No newline at end of file diff --git a/docs/references/grids/get-table-logs.md b/docs/references/grids/get-table-logs.md new file mode 100644 index 0000000000..8b00c7f317 --- /dev/null +++ b/docs/references/grids/get-table-logs.md @@ -0,0 +1 @@ +Get the table activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/get-table-usage.md b/docs/references/grids/get-table-usage.md new file mode 100644 index 0000000000..08e28af0a6 --- /dev/null +++ b/docs/references/grids/get-table-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/grids/get-table.md b/docs/references/grids/get-table.md new file mode 100644 index 0000000000..67b8428431 --- /dev/null +++ b/docs/references/grids/get-table.md @@ -0,0 +1 @@ +Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata. \ No newline at end of file diff --git a/docs/references/grids/increment-row-column.md b/docs/references/grids/increment-row-column.md new file mode 100644 index 0000000000..7a19b3fbc7 --- /dev/null +++ b/docs/references/grids/increment-row-column.md @@ -0,0 +1 @@ +Increment a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/grids/list-columns.md b/docs/references/grids/list-columns.md new file mode 100644 index 0000000000..aacf373082 --- /dev/null +++ b/docs/references/grids/list-columns.md @@ -0,0 +1 @@ +List columns in the table. \ No newline at end of file diff --git a/docs/references/grids/list-database-usage.md b/docs/references/grids/list-database-usage.md new file mode 100644 index 0000000000..2bf5ed81e1 --- /dev/null +++ b/docs/references/grids/list-database-usage.md @@ -0,0 +1 @@ +List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/grids/list-databases.md b/docs/references/grids/list-databases.md new file mode 100644 index 0000000000..d93fb9d7a8 --- /dev/null +++ b/docs/references/grids/list-databases.md @@ -0,0 +1 @@ +Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. \ No newline at end of file diff --git a/docs/references/grids/list-indexes.md b/docs/references/grids/list-indexes.md new file mode 100644 index 0000000000..a0c7b2f861 --- /dev/null +++ b/docs/references/grids/list-indexes.md @@ -0,0 +1 @@ +List indexes in the table. \ No newline at end of file diff --git a/docs/references/grids/list-rows.md b/docs/references/grids/list-rows.md new file mode 100644 index 0000000000..68185fc192 --- /dev/null +++ b/docs/references/grids/list-rows.md @@ -0,0 +1 @@ +Get a list of all the user's rows in a given table. You can use the query params to filter your results. \ No newline at end of file diff --git a/docs/references/grids/list-tables.md b/docs/references/grids/list-tables.md new file mode 100644 index 0000000000..e14795eeac --- /dev/null +++ b/docs/references/grids/list-tables.md @@ -0,0 +1 @@ +Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results. \ No newline at end of file diff --git a/docs/references/grids/update-boolean-column.md b/docs/references/grids/update-boolean-column.md new file mode 100644 index 0000000000..f5167d97b6 --- /dev/null +++ b/docs/references/grids/update-boolean-column.md @@ -0,0 +1 @@ +Update a boolean column. Changing the `default` value will not update already existing rows. \ No newline at end of file diff --git a/docs/references/grids/update-database.md b/docs/references/grids/update-database.md new file mode 100644 index 0000000000..4e99bf2e07 --- /dev/null +++ b/docs/references/grids/update-database.md @@ -0,0 +1 @@ +Update a database by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/update-datetime-column.md b/docs/references/grids/update-datetime-column.md new file mode 100644 index 0000000000..e793b41921 --- /dev/null +++ b/docs/references/grids/update-datetime-column.md @@ -0,0 +1 @@ +Update a date time column. Changing the `default` value will not update already existing rows. \ No newline at end of file diff --git a/docs/references/grids/update-email-column.md b/docs/references/grids/update-email-column.md new file mode 100644 index 0000000000..0db17e29bd --- /dev/null +++ b/docs/references/grids/update-email-column.md @@ -0,0 +1 @@ +Update an email column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-enum-column.md b/docs/references/grids/update-enum-column.md new file mode 100644 index 0000000000..df172cbc38 --- /dev/null +++ b/docs/references/grids/update-enum-column.md @@ -0,0 +1 @@ +Update an enum column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-float-column.md b/docs/references/grids/update-float-column.md new file mode 100644 index 0000000000..4e0eb9ddb2 --- /dev/null +++ b/docs/references/grids/update-float-column.md @@ -0,0 +1 @@ +Update a float column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-integer-column.md b/docs/references/grids/update-integer-column.md new file mode 100644 index 0000000000..0f2a07ea6e --- /dev/null +++ b/docs/references/grids/update-integer-column.md @@ -0,0 +1 @@ +Update an integer column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-ip-column.md b/docs/references/grids/update-ip-column.md new file mode 100644 index 0000000000..115c87a7e1 --- /dev/null +++ b/docs/references/grids/update-ip-column.md @@ -0,0 +1 @@ +Update an ip column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-relationship-column.md b/docs/references/grids/update-relationship-column.md new file mode 100644 index 0000000000..dfdcd8ae5a --- /dev/null +++ b/docs/references/grids/update-relationship-column.md @@ -0,0 +1 @@ +Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). diff --git a/docs/references/grids/update-row.md b/docs/references/grids/update-row.md new file mode 100644 index 0000000000..b532ea411d --- /dev/null +++ b/docs/references/grids/update-row.md @@ -0,0 +1 @@ +Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. \ No newline at end of file diff --git a/docs/references/grids/update-rows.md b/docs/references/grids/update-rows.md new file mode 100644 index 0000000000..334b91aec1 --- /dev/null +++ b/docs/references/grids/update-rows.md @@ -0,0 +1 @@ +Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated. \ No newline at end of file diff --git a/docs/references/grids/update-string-column.md b/docs/references/grids/update-string-column.md new file mode 100644 index 0000000000..617214b4c9 --- /dev/null +++ b/docs/references/grids/update-string-column.md @@ -0,0 +1 @@ +Update a string column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-table.md b/docs/references/grids/update-table.md new file mode 100644 index 0000000000..bbd676d3b8 --- /dev/null +++ b/docs/references/grids/update-table.md @@ -0,0 +1 @@ +Update a table by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/update-url-column.md b/docs/references/grids/update-url-column.md new file mode 100644 index 0000000000..6080d71509 --- /dev/null +++ b/docs/references/grids/update-url-column.md @@ -0,0 +1 @@ +Update an url column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/upsert-row.md b/docs/references/grids/upsert-row.md new file mode 100644 index 0000000000..1132afd53c --- /dev/null +++ b/docs/references/grids/upsert-row.md @@ -0,0 +1 @@ +Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/grids/upsert-rows.md b/docs/references/grids/upsert-rows.md new file mode 100644 index 0000000000..21aa3da1ef --- /dev/null +++ b/docs/references/grids/upsert-rows.md @@ -0,0 +1 @@ +Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php index 214afbe546..baa4eaa146 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php @@ -40,7 +40,7 @@ class Create extends BooleanCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-boolean-column.md', + description: '/docs/references/grids/create-boolean-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php index 3353005c59..2ea5314163 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php @@ -42,7 +42,7 @@ class Update extends BooleanUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-boolean-column.md', + description: '/docs/references/grids/update-boolean-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php index bcc5967586..501cc044d4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php @@ -42,7 +42,7 @@ class Create extends DatetimeCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-datetime-column.md', + description: '/docs/references/grids/create-datetime-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php index bd92a0f14d..34384e4d35 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php @@ -44,7 +44,7 @@ class Update extends DatetimeUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-datetime-column.md', + description: '/docs/references/grids/update-datetime-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php index be764d58a8..d0934b799f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php @@ -41,7 +41,7 @@ class Delete extends AttributesDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-column.md', + description: '/docs/references/grids/delete-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php index a5baa6fc89..841d18016f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php @@ -41,7 +41,7 @@ class Create extends EmailCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-email-column.md', + description: '/docs/references/grids/create-email-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php index 2e7dec9e63..f162a18494 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php @@ -43,7 +43,7 @@ class Update extends EmailUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-email-column.md', + description: '/docs/references/grids/update-email-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php index e420b340d2..430d3f0220 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php @@ -43,7 +43,7 @@ class Create extends EnumCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-enum-column.md', + description: '/docs/references/grids/create-enum-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php index b9337eb2b0..6562742937 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php @@ -45,7 +45,7 @@ class Update extends EnumUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-enum-column.md', + description: '/docs/references/grids/update-enum-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php index e0d9a41930..4dd9c53950 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php @@ -41,7 +41,7 @@ class Create extends FloatCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-float-column.md', + description: '/docs/references/grids/create-float-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php index 4cdc2ff319..3130e8ba2e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php @@ -43,7 +43,7 @@ class Update extends FloatUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-float-column.md', + description: '/docs/references/grids/update-float-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php index 5151c69d42..295a4ff530 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Get.php @@ -47,7 +47,7 @@ class Get extends AttributesGet namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/get-column.md', + description: '/docs/references/grids/get-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php index cfba713edc..beae222ceb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php @@ -41,7 +41,7 @@ class Create extends IPCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-ip-column.md', + description: '/docs/references/grids/create-ip-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php index f9f31c8336..c187c06801 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php @@ -43,7 +43,7 @@ class Update extends IPUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-ip-column.md', + description: '/docs/references/grids/update-ip-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php index 22ea591e82..f97f4079ee 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php @@ -41,7 +41,7 @@ class Create extends IntegerCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-integer-column.md', + description: '/docs/references/grids/create-integer-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php index e5224b070a..ad4832ed10 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php @@ -43,7 +43,7 @@ class Update extends IntegerUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-integer-column.md', + description: '/docs/references/grids/update-integer-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php index c89fcc4650..c340d1c574 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php @@ -42,7 +42,7 @@ class Create extends RelationshipCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-relationship-column.md', + description: '/docs/references/grids/create-relationship-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php index 6b147c1db1..0811025ae3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php @@ -42,7 +42,7 @@ class Update extends RelationshipUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-relationship-column.md', + description: '/docs/references/grids/update-relationship-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php index 89565e3425..4ae844fd84 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php @@ -43,7 +43,7 @@ class Create extends StringCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-string-column.md', + description: '/docs/references/grids/create-string-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php index b4e457cb89..ed54ae9139 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php @@ -45,7 +45,7 @@ class Update extends StringUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-string-column.md', + description: '/docs/references/grids/update-string-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php index 1bff31b06f..7ae3214cb9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php @@ -41,7 +41,7 @@ class Create extends URLCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-url-column.md', + description: '/docs/references/grids/create-url-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php index 30810446da..17570a9842 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php @@ -43,7 +43,7 @@ class Update extends URLUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-url-column.md', + description: '/docs/references/grids/update-url-column.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php index 719418cc49..0aec9998bd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php @@ -36,7 +36,7 @@ class XList extends AttributesXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/list-attributes.md', + description: '/docs/references/grids/list-attributes.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php index ac10781653..15aec531e7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php @@ -43,7 +43,7 @@ class Create extends CollectionCreate namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/create-table.md', + description: '/docs/references/grids/create-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php index 1da68e63bc..cb2923f572 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php @@ -39,7 +39,7 @@ class Delete extends CollectionDelete namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/delete-table.md', + description: '/docs/references/grids/delete-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php index a161a544db..3ac36d27ca 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Get.php @@ -36,7 +36,7 @@ class Get extends CollectionGet namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/get-table.md', + description: '/docs/references/grids/get-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php index e280cba295..3d9c8709a6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php @@ -45,7 +45,7 @@ class Create extends IndexCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: 'createIndex', // getName needs to be different from parent action to avoid conflict in path name - description: '/docs/references/databases/create-index.md', + description: '/docs/references/grids/create-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php index 21185a21b6..a2c23ea60b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php @@ -44,7 +44,7 @@ class Delete extends IndexDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: 'deleteIndex', // getName needs to be different from parent action to avoid conflict in path name - description: '/docs/references/databases/delete-index.md', + description: '/docs/references/grids/delete-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php index 66d57cc839..f2c7cbcb94 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Get.php @@ -37,7 +37,7 @@ class Get extends IndexGet namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: 'getIndex', // getName needs to be different from parent action to avoid conflict in path name - description: '/docs/references/databases/get-index.md', + description: '/docs/references/grids/get-index.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php index 85b913c331..4ec7da0a41 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/XList.php @@ -37,7 +37,7 @@ class XList extends IndexXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: 'listIndexes', // getName needs to be different from parent action to avoid conflict in path name - description: '/docs/references/databases/list-indexes.md', + description: '/docs/references/grids/list-indexes.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php index acac561c80..1c24a23175 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Logs/XList.php @@ -33,7 +33,7 @@ class XList extends CollectionLogXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/get-table-logs.md', + description: '/docs/references/grids/get-table-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php index 87de8e0e49..4837d30e46 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php @@ -43,7 +43,7 @@ class Delete extends DocumentsDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-rows.md', + description: '/docs/references/grids/delete-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php index c28d49f934..c72d82d65d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php @@ -44,7 +44,7 @@ class Update extends DocumentsUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-rows.md', + description: '/docs/references/grids/update-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php index db6c7b4140..b85ee87782 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php @@ -44,7 +44,7 @@ class Upsert extends DocumentsUpsert namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/upsert-rows.md', + description: '/docs/references/grids/upsert-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php index f265cc663b..fd642de09e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php @@ -44,7 +44,7 @@ class Decrement extends DecrementDocumentAttribute namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/decrement-row-column.md', + description: '/docs/references/grids/decrement-row-column.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php index c343260871..b3af9bb1b9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php @@ -44,7 +44,7 @@ class Increment extends IncrementDocumentAttribute namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/increment-row-column.md', + description: '/docs/references/grids/increment-row-column.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php index bd616e40f1..56933b882c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php @@ -53,7 +53,7 @@ class Create extends DocumentCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/create-row.md', + description: '/docs/references/grids/create-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( @@ -74,7 +74,7 @@ class Create extends DocumentCreate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: $this->getBulkActionName(self::getName()), - description: '/docs/references/databases/create-rows.md', + description: '/docs/references/grids/create-rows.md', auth: [AuthType::ADMIN, AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php index a2ce5fcecd..b1f93164df 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php @@ -48,7 +48,7 @@ class Delete extends DocumentDelete namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/delete-row.md', + description: '/docs/references/grids/delete-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php index b628f0e54f..1015e01819 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Get.php @@ -38,7 +38,7 @@ class Get extends DocumentGet namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/get-row.md', + description: '/docs/references/grids/get-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php index c6fa34637e..4522b3005f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Logs/XList.php @@ -33,7 +33,7 @@ class XList extends DocumentLogXList namespace: $this->getSdkNamespace(), group: 'logs', name: self::getName(), - description: '/docs/references/databases/get-row-logs.md', + description: '/docs/references/grids/get-row-logs.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php index e7b18cfd20..f9b1ce693e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php @@ -45,7 +45,7 @@ class Update extends DocumentUpdate namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/update-row.md', + description: '/docs/references/grids/update-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php index 5e5683e84d..145217e03b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php @@ -46,7 +46,7 @@ class Upsert extends DocumentUpsert namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/upsert-row.md', + description: '/docs/references/grids/upsert-row.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php index 16a0c139da..d2589e4b63 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/XList.php @@ -38,7 +38,7 @@ class XList extends DocumentXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/databases/list-rows.md', + description: '/docs/references/grids/list-rows.md', auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php index ba5f2ad3ee..bbc82aa52d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php @@ -42,7 +42,7 @@ class Update extends CollectionUpdate namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/update-table.md', + description: '/docs/references/grids/update-table.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php index 7246070e1e..015c2c2592 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Usage/Get.php @@ -37,7 +37,7 @@ class Get extends CollectionUsageGet namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/get-table-usage.md', + description: '/docs/references/grids/get-table-usage.md', auth: [AuthType::ADMIN], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php index b6dd9f7fb5..fd329ea6aa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/XList.php @@ -38,7 +38,7 @@ class XList extends CollectionXList namespace: $this->getSdkNamespace(), group: null, name: self::getName(), - description: '/docs/references/databases/list-tables.md', + description: '/docs/references/grids/list-tables.md', auth: [AuthType::KEY], responses: [ new SDKResponse( diff --git a/src/Appwrite/Platform/Modules/Databases/SDKMethod.php b/src/Appwrite/Platform/Modules/Databases/SDKMethod.php index 62825a0b08..e3f12776c2 100644 --- a/src/Appwrite/Platform/Modules/Databases/SDKMethod.php +++ b/src/Appwrite/Platform/Modules/Databases/SDKMethod.php @@ -7,6 +7,17 @@ use Appwrite\SDK\Method; class SDKMethod { + private const array SDK_INFO_MAP = [ + 'create' => ['name' => 'createDatabase', 'docs' => 'create-database'], + 'list' => ['name' => 'listDatabases', 'docs' => 'list-databases'], + 'get' => ['name' => 'getDatabase', 'docs' => 'get-database'], + 'update' => ['name' => 'updateDatabase', 'docs' => 'update-database'], + 'delete' => ['name' => 'deleteDatabase', 'docs' => 'delete-database'], + 'listLogs' => ['name' => 'listDatabaseLogs', 'docs' => 'list-database-logs'], + 'listUsage' => ['name' => 'listDatabaseUsage', 'docs' => 'list-database-usage'], + 'getDatabaseUsage' => ['name' => 'getDatabaseUsage', 'docs' => 'get-database-usage'], + ]; + /** * @return Method[] */ @@ -43,20 +54,19 @@ class SDKMethod private static function transformNameForGrids(string $original): string { - return match ($original) { - 'create' => 'createDatabase', - 'list' => 'listDatabases', - 'get' => 'getDatabase', - 'update' => 'updateDatabase', - 'delete' => 'deleteDatabase', - 'listLogs' => 'listDatabaseLogs', - 'listUsage' => 'listDatabaseUsage', - default => $original /* `getDatabaseUsage` is already correct! */ - }; + return self::SDK_INFO_MAP[$original]['name'] ?? $original; } private static function transformDocsPathForGrids(string $original): string { - return str_replace('/databases/', '/grids/', $original); + $path = str_replace('/databases/', '/grids/', $original); + + foreach (self::SDK_INFO_MAP as $from => $mapped) { + if (str_ends_with($path, "/$from.md")) { + return substr($path, 0, -strlen("$from.md")) . $mapped['docs'] . '.md'; + } + } + + return $path; } } From 5b1a750dd102909f39d393a9b2c8ff4d32811828 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 16:40:36 +0530 Subject: [PATCH 290/362] regen: specs and fix file name. --- app/config/specs/open-api3-1.8.x-client.json | 16 +- app/config/specs/open-api3-1.8.x-console.json | 144 ++++++++++-------- app/config/specs/open-api3-1.8.x-server.json | 126 ++++++++------- app/config/specs/open-api3-latest-client.json | 12 +- .../specs/open-api3-latest-console.json | 114 +++++++------- app/config/specs/open-api3-latest-server.json | 102 ++++++------- app/config/specs/swagger2-1.8.x-client.json | 16 +- app/config/specs/swagger2-1.8.x-console.json | 144 ++++++++++-------- app/config/specs/swagger2-1.8.x-server.json | 126 ++++++++------- app/config/specs/swagger2-latest-client.json | 12 +- app/config/specs/swagger2-latest-console.json | 114 +++++++------- app/config/specs/swagger2-latest-server.json | 102 ++++++------- .../Http/Grids/Tables/Columns/XList.php | 2 +- 13 files changed, 557 insertions(+), 473 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 c07936d6e0..75f4d5713b 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4473,6 +4473,7 @@ "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { "Project": [] }, @@ -4715,6 +4716,7 @@ "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { "Project": [] }, @@ -5018,7 +5020,7 @@ "cookies": false, "type": "", "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5103,7 +5105,7 @@ "cookies": false, "type": "", "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -5117,6 +5119,7 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { "Project": [] }, @@ -5242,7 +5245,7 @@ "cookies": false, "type": "", "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5337,7 +5340,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -5351,6 +5354,7 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { "Project": [] }, @@ -5460,7 +5464,7 @@ "cookies": false, "type": "", "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -5559,7 +5563,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", 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 7e398d78d6..dca688f77a 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4559,6 +4559,7 @@ "methods": [ { "name": "list", + "namespace": "databases", "auth": { "Project": [] }, @@ -4574,6 +4575,7 @@ }, { "name": "listDatabases", + "namespace": "grids", "auth": { "Project": [] }, @@ -4585,7 +4587,7 @@ "model": "#\/components\/schemas\/databaseList" } ], - "description": "" + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4664,6 +4666,7 @@ "methods": [ { "name": "create", + "namespace": "databases", "auth": { "Project": [] }, @@ -4679,6 +4682,7 @@ }, { "name": "createDatabase", + "namespace": "grids", "auth": { "Project": [] }, @@ -4690,7 +4694,7 @@ "model": "#\/components\/schemas\/database" } ], - "description": "" + "description": "Create a new Database.\n" } ], "auth": { @@ -4775,6 +4779,7 @@ "methods": [ { "name": "listUsage", + "namespace": "databases", "auth": { "Project": [] }, @@ -4790,6 +4795,7 @@ }, { "name": "listDatabaseUsage", + "namespace": "grids", "auth": { "Project": [] }, @@ -4879,6 +4885,7 @@ "methods": [ { "name": "get", + "namespace": "databases", "auth": { "Project": [] }, @@ -4894,6 +4901,7 @@ }, { "name": "getDatabase", + "namespace": "grids", "auth": { "Project": [] }, @@ -4905,7 +4913,7 @@ "model": "#\/components\/schemas\/database" } ], - "description": "" + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -4970,6 +4978,7 @@ "methods": [ { "name": "update", + "namespace": "databases", "auth": { "Project": [] }, @@ -4985,6 +4994,7 @@ }, { "name": "updateDatabase", + "namespace": "grids", "auth": { "Project": [] }, @@ -4996,7 +5006,7 @@ "model": "#\/components\/schemas\/database" } ], - "description": "" + "description": "Update a database by its unique ID." } ], "auth": { @@ -5078,6 +5088,7 @@ "methods": [ { "name": "delete", + "namespace": "databases", "auth": { "Project": [] }, @@ -5085,14 +5096,14 @@ "required": [], "responses": [ { - "code": 204, - "model": "#\/components\/schemas\/none" + "code": 204 } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." }, { "name": "deleteDatabase", + "namespace": "grids", "auth": { "Project": [] }, @@ -5100,11 +5111,10 @@ "required": [], "responses": [ { - "code": 204, - "model": "#\/components\/schemas\/none" + "code": 204 } ], - "description": "" + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -8336,6 +8346,7 @@ "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { "Project": [] }, @@ -8362,6 +8373,7 @@ }, { "name": "createDocuments", + "namespace": "databases", "auth": { "Project": [] }, @@ -8499,6 +8511,7 @@ "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { "Project": [] }, @@ -8905,6 +8918,7 @@ "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { "Project": [] }, @@ -10097,7 +10111,7 @@ "cookies": false, "type": "", "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10180,7 +10194,7 @@ "cookies": false, "type": "", "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10284,7 +10298,7 @@ "cookies": false, "type": "", "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10353,7 +10367,7 @@ "cookies": false, "type": "", "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10452,7 +10466,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10502,7 +10516,7 @@ "tags": [ "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -10523,7 +10537,7 @@ "cookies": false, "type": "", "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10607,7 +10621,7 @@ "cookies": false, "type": "", "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10713,7 +10727,7 @@ "cookies": false, "type": "", "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10824,7 +10838,7 @@ "cookies": false, "type": "", "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10930,7 +10944,7 @@ "cookies": false, "type": "", "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11041,7 +11055,7 @@ "cookies": false, "type": "", "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11147,7 +11161,7 @@ "cookies": false, "type": "", "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11258,7 +11272,7 @@ "cookies": false, "type": "", "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11373,7 +11387,7 @@ "cookies": false, "type": "", "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11493,7 +11507,7 @@ "cookies": false, "type": "", "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11609,7 +11623,7 @@ "cookies": false, "type": "", "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11730,7 +11744,7 @@ "cookies": false, "type": "", "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11846,7 +11860,7 @@ "cookies": false, "type": "", "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11967,7 +11981,7 @@ "cookies": false, "type": "", "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12073,7 +12087,7 @@ "cookies": false, "type": "", "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12184,7 +12198,7 @@ "cookies": false, "type": "", "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12315,7 +12329,7 @@ "cookies": false, "type": "", "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12432,7 +12446,7 @@ "cookies": false, "type": "", "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12548,7 +12562,7 @@ "cookies": false, "type": "", "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12654,7 +12668,7 @@ "cookies": false, "type": "", "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12796,7 +12810,7 @@ "cookies": false, "type": "", "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12867,7 +12881,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12947,7 +12961,7 @@ "cookies": false, "type": "", "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13034,7 +13048,7 @@ "tags": [ "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -13055,7 +13069,7 @@ "cookies": false, "type": "", "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13116,7 +13130,7 @@ "tags": [ "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", "responses": { "202": { "description": "Index", @@ -13137,7 +13151,7 @@ "cookies": false, "type": "", "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13265,7 +13279,7 @@ "cookies": false, "type": "", "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13336,7 +13350,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13411,12 +13425,12 @@ "deprecated": false, "x-appwrite": { "method": "listTableLogs", - "group": "grids", + "group": "tables", "weight": 375, "cookies": false, "type": "", "demo": "grids\/list-table-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-logs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13499,7 +13513,7 @@ "cookies": false, "type": "", "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13584,7 +13598,7 @@ "cookies": false, "type": "", "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13598,6 +13612,7 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { "Project": [] }, @@ -13624,6 +13639,7 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { "Project": [] }, @@ -13744,7 +13760,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13757,6 +13773,7 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { "Project": [] }, @@ -13853,7 +13870,7 @@ "cookies": false, "type": "", "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13947,7 +13964,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14038,7 +14055,7 @@ "cookies": false, "type": "", "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14133,7 +14150,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14147,6 +14164,7 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { "Project": [] }, @@ -14256,7 +14274,7 @@ "cookies": false, "type": "", "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14355,7 +14373,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14439,7 +14457,7 @@ "cookies": false, "type": "", "demo": "grids\/list-row-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row-logs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14532,7 +14550,7 @@ "cookies": false, "type": "", "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14644,7 +14662,7 @@ "cookies": false, "type": "", "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14756,7 +14774,7 @@ "cookies": false, "type": "", "demo": "grids\/get-table-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14860,6 +14878,7 @@ "methods": [ { "name": "listLogs", + "namespace": "databases", "auth": { "Project": [] }, @@ -14875,6 +14894,7 @@ }, { "name": "listDatabaseLogs", + "namespace": "grids", "auth": { "Project": [] }, @@ -14886,7 +14906,7 @@ "model": "#\/components\/schemas\/logList" } ], - "description": "" + "description": "Get the database activity logs list by its unique ID." } ], "auth": { @@ -14965,6 +14985,7 @@ "methods": [ { "name": "getDatabaseUsage", + "namespace": "databases", "auth": { "Project": [] }, @@ -14980,6 +15001,7 @@ }, { "name": "getDatabaseUsage", + "namespace": "grids", "auth": { "Project": [] }, @@ -14991,7 +15013,7 @@ "model": "#\/components\/schemas\/usageDatabase" } ], - "description": "" + "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { 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 0fde42be4e..c824247c5b 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4077,6 +4077,7 @@ "methods": [ { "name": "list", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -4093,6 +4094,7 @@ }, { "name": "listDatabases", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -4105,7 +4107,7 @@ "model": "#\/components\/schemas\/databaseList" } ], - "description": "" + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4185,6 +4187,7 @@ "methods": [ { "name": "create", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -4201,6 +4204,7 @@ }, { "name": "createDatabase", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -4213,7 +4217,7 @@ "model": "#\/components\/schemas\/database" } ], - "description": "" + "description": "Create a new Database.\n" } ], "auth": { @@ -4299,6 +4303,7 @@ "methods": [ { "name": "get", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -4315,6 +4320,7 @@ }, { "name": "getDatabase", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -4327,7 +4333,7 @@ "model": "#\/components\/schemas\/database" } ], - "description": "" + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -4393,6 +4399,7 @@ "methods": [ { "name": "update", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -4409,6 +4416,7 @@ }, { "name": "updateDatabase", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -4421,7 +4429,7 @@ "model": "#\/components\/schemas\/database" } ], - "description": "" + "description": "Update a database by its unique ID." } ], "auth": { @@ -4504,6 +4512,7 @@ "methods": [ { "name": "delete", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -4512,14 +4521,14 @@ "required": [], "responses": [ { - "code": 204, - "model": "#\/components\/schemas\/none" + "code": 204 } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." }, { "name": "deleteDatabase", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -4528,11 +4537,10 @@ "required": [], "responses": [ { - "code": 204, - "model": "#\/components\/schemas\/none" + "code": 204 } ], - "description": "" + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -7795,6 +7803,7 @@ "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { "Project": [], "Session": [] @@ -7822,6 +7831,7 @@ }, { "name": "createDocuments", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -7962,6 +7972,7 @@ "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -8374,6 +8385,7 @@ "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { "Project": [], "Session": [] @@ -9299,7 +9311,7 @@ "cookies": false, "type": "", "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9383,7 +9395,7 @@ "cookies": false, "type": "", "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9488,7 +9500,7 @@ "cookies": false, "type": "", "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9558,7 +9570,7 @@ "cookies": false, "type": "", "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9658,7 +9670,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9709,7 +9721,7 @@ "tags": [ "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -9730,7 +9742,7 @@ "cookies": false, "type": "", "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9815,7 +9827,7 @@ "cookies": false, "type": "", "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9922,7 +9934,7 @@ "cookies": false, "type": "", "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10034,7 +10046,7 @@ "cookies": false, "type": "", "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10141,7 +10153,7 @@ "cookies": false, "type": "", "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10253,7 +10265,7 @@ "cookies": false, "type": "", "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10360,7 +10372,7 @@ "cookies": false, "type": "", "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10472,7 +10484,7 @@ "cookies": false, "type": "", "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10588,7 +10600,7 @@ "cookies": false, "type": "", "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10709,7 +10721,7 @@ "cookies": false, "type": "", "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10826,7 +10838,7 @@ "cookies": false, "type": "", "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10948,7 +10960,7 @@ "cookies": false, "type": "", "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11065,7 +11077,7 @@ "cookies": false, "type": "", "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11187,7 +11199,7 @@ "cookies": false, "type": "", "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11294,7 +11306,7 @@ "cookies": false, "type": "", "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11406,7 +11418,7 @@ "cookies": false, "type": "", "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11538,7 +11550,7 @@ "cookies": false, "type": "", "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11656,7 +11668,7 @@ "cookies": false, "type": "", "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11773,7 +11785,7 @@ "cookies": false, "type": "", "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11880,7 +11892,7 @@ "cookies": false, "type": "", "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12023,7 +12035,7 @@ "cookies": false, "type": "", "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12095,7 +12107,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12176,7 +12188,7 @@ "cookies": false, "type": "", "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12264,7 +12276,7 @@ "tags": [ "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -12285,7 +12297,7 @@ "cookies": false, "type": "", "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12347,7 +12359,7 @@ "tags": [ "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", "responses": { "202": { "description": "Index", @@ -12368,7 +12380,7 @@ "cookies": false, "type": "", "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12497,7 +12509,7 @@ "cookies": false, "type": "", "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12569,7 +12581,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12650,7 +12662,7 @@ "cookies": false, "type": "", "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12737,7 +12749,7 @@ "cookies": false, "type": "", "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -12751,6 +12763,7 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { "Project": [], "Session": [] @@ -12778,6 +12791,7 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -12901,7 +12915,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -12914,6 +12928,7 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -13012,7 +13027,7 @@ "cookies": false, "type": "", "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13107,7 +13122,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13199,7 +13214,7 @@ "cookies": false, "type": "", "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13296,7 +13311,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13310,6 +13325,7 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { "Project": [], "Session": [] @@ -13422,7 +13438,7 @@ "cookies": false, "type": "", "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13523,7 +13539,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13609,7 +13625,7 @@ "cookies": false, "type": "", "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13722,7 +13738,7 @@ "cookies": false, "type": "", "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 556775e236..75f4d5713b 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -5020,7 +5020,7 @@ "cookies": false, "type": "", "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5105,7 +5105,7 @@ "cookies": false, "type": "", "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -5245,7 +5245,7 @@ "cookies": false, "type": "", "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5340,7 +5340,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -5464,7 +5464,7 @@ "cookies": false, "type": "", "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -5563,7 +5563,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 85fa04f2cb..dca688f77a 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4587,7 +4587,7 @@ "model": "#\/components\/schemas\/databaseList" } ], - "description": "" + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4694,7 +4694,7 @@ "model": "#\/components\/schemas\/database" } ], - "description": "" + "description": "Create a new Database.\n" } ], "auth": { @@ -4913,7 +4913,7 @@ "model": "#\/components\/schemas\/database" } ], - "description": "" + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -5006,7 +5006,7 @@ "model": "#\/components\/schemas\/database" } ], - "description": "" + "description": "Update a database by its unique ID." } ], "auth": { @@ -5114,7 +5114,7 @@ "code": 204 } ], - "description": "" + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -10111,7 +10111,7 @@ "cookies": false, "type": "", "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10194,7 +10194,7 @@ "cookies": false, "type": "", "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10298,7 +10298,7 @@ "cookies": false, "type": "", "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10367,7 +10367,7 @@ "cookies": false, "type": "", "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10466,7 +10466,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10516,7 +10516,7 @@ "tags": [ "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -10537,7 +10537,7 @@ "cookies": false, "type": "", "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10621,7 +10621,7 @@ "cookies": false, "type": "", "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10727,7 +10727,7 @@ "cookies": false, "type": "", "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10838,7 +10838,7 @@ "cookies": false, "type": "", "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10944,7 +10944,7 @@ "cookies": false, "type": "", "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11055,7 +11055,7 @@ "cookies": false, "type": "", "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11161,7 +11161,7 @@ "cookies": false, "type": "", "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11272,7 +11272,7 @@ "cookies": false, "type": "", "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11387,7 +11387,7 @@ "cookies": false, "type": "", "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11507,7 +11507,7 @@ "cookies": false, "type": "", "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11623,7 +11623,7 @@ "cookies": false, "type": "", "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11744,7 +11744,7 @@ "cookies": false, "type": "", "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11860,7 +11860,7 @@ "cookies": false, "type": "", "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11981,7 +11981,7 @@ "cookies": false, "type": "", "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12087,7 +12087,7 @@ "cookies": false, "type": "", "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12198,7 +12198,7 @@ "cookies": false, "type": "", "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12329,7 +12329,7 @@ "cookies": false, "type": "", "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12446,7 +12446,7 @@ "cookies": false, "type": "", "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12562,7 +12562,7 @@ "cookies": false, "type": "", "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12668,7 +12668,7 @@ "cookies": false, "type": "", "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12810,7 +12810,7 @@ "cookies": false, "type": "", "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12881,7 +12881,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12961,7 +12961,7 @@ "cookies": false, "type": "", "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13048,7 +13048,7 @@ "tags": [ "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -13069,7 +13069,7 @@ "cookies": false, "type": "", "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13130,7 +13130,7 @@ "tags": [ "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", "responses": { "202": { "description": "Index", @@ -13151,7 +13151,7 @@ "cookies": false, "type": "", "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13279,7 +13279,7 @@ "cookies": false, "type": "", "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13350,7 +13350,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13425,12 +13425,12 @@ "deprecated": false, "x-appwrite": { "method": "listTableLogs", - "group": "grids", + "group": "tables", "weight": 375, "cookies": false, "type": "", "demo": "grids\/list-table-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-logs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13513,7 +13513,7 @@ "cookies": false, "type": "", "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13598,7 +13598,7 @@ "cookies": false, "type": "", "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13760,7 +13760,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13870,7 +13870,7 @@ "cookies": false, "type": "", "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13964,7 +13964,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14055,7 +14055,7 @@ "cookies": false, "type": "", "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14150,7 +14150,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14274,7 +14274,7 @@ "cookies": false, "type": "", "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14373,7 +14373,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14457,7 +14457,7 @@ "cookies": false, "type": "", "demo": "grids\/list-row-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row-logs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14550,7 +14550,7 @@ "cookies": false, "type": "", "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14662,7 +14662,7 @@ "cookies": false, "type": "", "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14774,7 +14774,7 @@ "cookies": false, "type": "", "demo": "grids\/get-table-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14906,7 +14906,7 @@ "model": "#\/components\/schemas\/logList" } ], - "description": "" + "description": "Get the database activity logs list by its unique ID." } ], "auth": { @@ -15013,7 +15013,7 @@ "model": "#\/components\/schemas\/usageDatabase" } ], - "description": "" + "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 551c765683..c824247c5b 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -4107,7 +4107,7 @@ "model": "#\/components\/schemas\/databaseList" } ], - "description": "" + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4217,7 +4217,7 @@ "model": "#\/components\/schemas\/database" } ], - "description": "" + "description": "Create a new Database.\n" } ], "auth": { @@ -4333,7 +4333,7 @@ "model": "#\/components\/schemas\/database" } ], - "description": "" + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -4429,7 +4429,7 @@ "model": "#\/components\/schemas\/database" } ], - "description": "" + "description": "Update a database by its unique ID." } ], "auth": { @@ -4540,7 +4540,7 @@ "code": 204 } ], - "description": "" + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -9311,7 +9311,7 @@ "cookies": false, "type": "", "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9395,7 +9395,7 @@ "cookies": false, "type": "", "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9500,7 +9500,7 @@ "cookies": false, "type": "", "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9570,7 +9570,7 @@ "cookies": false, "type": "", "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9670,7 +9670,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9721,7 +9721,7 @@ "tags": [ "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -9742,7 +9742,7 @@ "cookies": false, "type": "", "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9827,7 +9827,7 @@ "cookies": false, "type": "", "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9934,7 +9934,7 @@ "cookies": false, "type": "", "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10046,7 +10046,7 @@ "cookies": false, "type": "", "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10153,7 +10153,7 @@ "cookies": false, "type": "", "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10265,7 +10265,7 @@ "cookies": false, "type": "", "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10372,7 +10372,7 @@ "cookies": false, "type": "", "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10484,7 +10484,7 @@ "cookies": false, "type": "", "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10600,7 +10600,7 @@ "cookies": false, "type": "", "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10721,7 +10721,7 @@ "cookies": false, "type": "", "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10838,7 +10838,7 @@ "cookies": false, "type": "", "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10960,7 +10960,7 @@ "cookies": false, "type": "", "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11077,7 +11077,7 @@ "cookies": false, "type": "", "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11199,7 +11199,7 @@ "cookies": false, "type": "", "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11306,7 +11306,7 @@ "cookies": false, "type": "", "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11418,7 +11418,7 @@ "cookies": false, "type": "", "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11550,7 +11550,7 @@ "cookies": false, "type": "", "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11668,7 +11668,7 @@ "cookies": false, "type": "", "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11785,7 +11785,7 @@ "cookies": false, "type": "", "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11892,7 +11892,7 @@ "cookies": false, "type": "", "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12035,7 +12035,7 @@ "cookies": false, "type": "", "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12107,7 +12107,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12188,7 +12188,7 @@ "cookies": false, "type": "", "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12276,7 +12276,7 @@ "tags": [ "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -12297,7 +12297,7 @@ "cookies": false, "type": "", "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12359,7 +12359,7 @@ "tags": [ "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", "responses": { "202": { "description": "Index", @@ -12380,7 +12380,7 @@ "cookies": false, "type": "", "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12509,7 +12509,7 @@ "cookies": false, "type": "", "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12581,7 +12581,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12662,7 +12662,7 @@ "cookies": false, "type": "", "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12749,7 +12749,7 @@ "cookies": false, "type": "", "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -12915,7 +12915,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13027,7 +13027,7 @@ "cookies": false, "type": "", "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13122,7 +13122,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13214,7 +13214,7 @@ "cookies": false, "type": "", "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13311,7 +13311,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13438,7 +13438,7 @@ "cookies": false, "type": "", "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13539,7 +13539,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13625,7 +13625,7 @@ "cookies": false, "type": "", "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13738,7 +13738,7 @@ "cookies": false, "type": "", "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 8572eaaa7f..938ba76f53 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -4610,6 +4610,7 @@ "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { "Project": [] }, @@ -4843,6 +4844,7 @@ "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { "Project": [] }, @@ -5132,7 +5134,7 @@ "cookies": false, "type": "", "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5213,7 +5215,7 @@ "cookies": false, "type": "", "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -5226,6 +5228,7 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { "Project": [] }, @@ -5349,7 +5352,7 @@ "cookies": false, "type": "", "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5438,7 +5441,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -5451,6 +5454,7 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { "Project": [] }, @@ -5556,7 +5560,7 @@ "cookies": false, "type": "", "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -5652,7 +5656,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index ecf5fcc4a1..b4a61db855 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -4719,6 +4719,7 @@ "methods": [ { "name": "list", + "namespace": "databases", "auth": { "Project": [] }, @@ -4734,6 +4735,7 @@ }, { "name": "listDatabases", + "namespace": "grids", "auth": { "Project": [] }, @@ -4745,7 +4747,7 @@ "model": "#\/definitions\/databaseList" } ], - "description": "" + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4823,6 +4825,7 @@ "methods": [ { "name": "create", + "namespace": "databases", "auth": { "Project": [] }, @@ -4838,6 +4841,7 @@ }, { "name": "createDatabase", + "namespace": "grids", "auth": { "Project": [] }, @@ -4849,7 +4853,7 @@ "model": "#\/definitions\/database" } ], - "description": "" + "description": "Create a new Database.\n" } ], "auth": { @@ -4937,6 +4941,7 @@ "methods": [ { "name": "listUsage", + "namespace": "databases", "auth": { "Project": [] }, @@ -4952,6 +4957,7 @@ }, { "name": "listDatabaseUsage", + "namespace": "grids", "auth": { "Project": [] }, @@ -5039,6 +5045,7 @@ "methods": [ { "name": "get", + "namespace": "databases", "auth": { "Project": [] }, @@ -5054,6 +5061,7 @@ }, { "name": "getDatabase", + "namespace": "grids", "auth": { "Project": [] }, @@ -5065,7 +5073,7 @@ "model": "#\/definitions\/database" } ], - "description": "" + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -5130,6 +5138,7 @@ "methods": [ { "name": "update", + "namespace": "databases", "auth": { "Project": [] }, @@ -5145,6 +5154,7 @@ }, { "name": "updateDatabase", + "namespace": "grids", "auth": { "Project": [] }, @@ -5156,7 +5166,7 @@ "model": "#\/definitions\/database" } ], - "description": "" + "description": "Update a database by its unique ID." } ], "auth": { @@ -5240,6 +5250,7 @@ "methods": [ { "name": "delete", + "namespace": "databases", "auth": { "Project": [] }, @@ -5247,14 +5258,14 @@ "required": [], "responses": [ { - "code": 204, - "model": "#\/definitions\/none" + "code": 204 } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." }, { "name": "deleteDatabase", + "namespace": "grids", "auth": { "Project": [] }, @@ -5262,11 +5273,10 @@ "required": [], "responses": [ { - "code": 204, - "model": "#\/definitions\/none" + "code": 204 } ], - "description": "" + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -8456,6 +8466,7 @@ "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { "Project": [] }, @@ -8482,6 +8493,7 @@ }, { "name": "createDocuments", + "namespace": "databases", "auth": { "Project": [] }, @@ -8619,6 +8631,7 @@ "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { "Project": [] }, @@ -9008,6 +9021,7 @@ "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { "Project": [] }, @@ -10144,7 +10158,7 @@ "cookies": false, "type": "", "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10224,7 +10238,7 @@ "cookies": false, "type": "", "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10329,7 +10343,7 @@ "cookies": false, "type": "", "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10396,7 +10410,7 @@ "cookies": false, "type": "", "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10497,7 +10511,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10547,7 +10561,7 @@ "tags": [ "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -10564,7 +10578,7 @@ "cookies": false, "type": "", "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10645,7 +10659,7 @@ "cookies": false, "type": "", "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10751,7 +10765,7 @@ "cookies": false, "type": "", "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10859,7 +10873,7 @@ "cookies": false, "type": "", "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10965,7 +10979,7 @@ "cookies": false, "type": "", "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11073,7 +11087,7 @@ "cookies": false, "type": "", "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11179,7 +11193,7 @@ "cookies": false, "type": "", "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11287,7 +11301,7 @@ "cookies": false, "type": "", "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11403,7 +11417,7 @@ "cookies": false, "type": "", "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11521,7 +11535,7 @@ "cookies": false, "type": "", "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11639,7 +11653,7 @@ "cookies": false, "type": "", "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11759,7 +11773,7 @@ "cookies": false, "type": "", "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11877,7 +11891,7 @@ "cookies": false, "type": "", "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11997,7 +12011,7 @@ "cookies": false, "type": "", "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12103,7 +12117,7 @@ "cookies": false, "type": "", "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12211,7 +12225,7 @@ "cookies": false, "type": "", "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12344,7 +12358,7 @@ "cookies": false, "type": "", "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12463,7 +12477,7 @@ "cookies": false, "type": "", "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12577,7 +12591,7 @@ "cookies": false, "type": "", "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12683,7 +12697,7 @@ "cookies": false, "type": "", "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12820,7 +12834,7 @@ "cookies": false, "type": "", "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12889,7 +12903,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12965,7 +12979,7 @@ "cookies": false, "type": "", "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13050,7 +13064,7 @@ "tags": [ "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -13067,7 +13081,7 @@ "cookies": false, "type": "", "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13129,7 +13143,7 @@ "tags": [ "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", "responses": { "202": { "description": "Index", @@ -13146,7 +13160,7 @@ "cookies": false, "type": "", "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13273,7 +13287,7 @@ "cookies": false, "type": "", "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13342,7 +13356,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13411,12 +13425,12 @@ "deprecated": false, "x-appwrite": { "method": "listTableLogs", - "group": "grids", + "group": "tables", "weight": 375, "cookies": false, "type": "", "demo": "grids\/list-table-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-logs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13494,7 +13508,7 @@ "cookies": false, "type": "", "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13575,7 +13589,7 @@ "cookies": false, "type": "", "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13588,6 +13602,7 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { "Project": [] }, @@ -13614,6 +13629,7 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { "Project": [] }, @@ -13734,7 +13750,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13747,6 +13763,7 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { "Project": [] }, @@ -13840,7 +13857,7 @@ "cookies": false, "type": "", "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13932,7 +13949,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14018,7 +14035,7 @@ "cookies": false, "type": "", "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14107,7 +14124,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14120,6 +14137,7 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { "Project": [] }, @@ -14225,7 +14243,7 @@ "cookies": false, "type": "", "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14321,7 +14339,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14398,7 +14416,7 @@ "cookies": false, "type": "", "demo": "grids\/list-row-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row-logs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14486,7 +14504,7 @@ "cookies": false, "type": "", "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14592,7 +14610,7 @@ "cookies": false, "type": "", "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14696,7 +14714,7 @@ "cookies": false, "type": "", "demo": "grids\/get-table-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14794,6 +14812,7 @@ "methods": [ { "name": "listLogs", + "namespace": "databases", "auth": { "Project": [] }, @@ -14809,6 +14828,7 @@ }, { "name": "listDatabaseLogs", + "namespace": "grids", "auth": { "Project": [] }, @@ -14820,7 +14840,7 @@ "model": "#\/definitions\/logList" } ], - "description": "" + "description": "Get the database activity logs list by its unique ID." } ], "auth": { @@ -14896,6 +14916,7 @@ "methods": [ { "name": "getDatabaseUsage", + "namespace": "databases", "auth": { "Project": [] }, @@ -14911,6 +14932,7 @@ }, { "name": "getDatabaseUsage", + "namespace": "grids", "auth": { "Project": [] }, @@ -14922,7 +14944,7 @@ "model": "#\/definitions\/usageDatabase" } ], - "description": "" + "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 7912caab25..709c263b96 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -4225,6 +4225,7 @@ "methods": [ { "name": "list", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -4241,6 +4242,7 @@ }, { "name": "listDatabases", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -4253,7 +4255,7 @@ "model": "#\/definitions\/databaseList" } ], - "description": "" + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4332,6 +4334,7 @@ "methods": [ { "name": "create", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -4348,6 +4351,7 @@ }, { "name": "createDatabase", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -4360,7 +4364,7 @@ "model": "#\/definitions\/database" } ], - "description": "" + "description": "Create a new Database.\n" } ], "auth": { @@ -4449,6 +4453,7 @@ "methods": [ { "name": "get", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -4465,6 +4470,7 @@ }, { "name": "getDatabase", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -4477,7 +4483,7 @@ "model": "#\/definitions\/database" } ], - "description": "" + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -4543,6 +4549,7 @@ "methods": [ { "name": "update", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -4559,6 +4566,7 @@ }, { "name": "updateDatabase", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -4571,7 +4579,7 @@ "model": "#\/definitions\/database" } ], - "description": "" + "description": "Update a database by its unique ID." } ], "auth": { @@ -4656,6 +4664,7 @@ "methods": [ { "name": "delete", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -4664,14 +4673,14 @@ "required": [], "responses": [ { - "code": 204, - "model": "#\/definitions\/none" + "code": 204 } ], "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." }, { "name": "deleteDatabase", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -4680,11 +4689,10 @@ "required": [], "responses": [ { - "code": 204, - "model": "#\/definitions\/none" + "code": 204 } ], - "description": "" + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -7905,6 +7913,7 @@ "methods": [ { "name": "createDocument", + "namespace": "databases", "auth": { "Project": [], "Session": [] @@ -7932,6 +7941,7 @@ }, { "name": "createDocuments", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -8072,6 +8082,7 @@ "methods": [ { "name": "upsertDocuments", + "namespace": "databases", "auth": { "Project": [], "Key": [] @@ -8467,6 +8478,7 @@ "methods": [ { "name": "upsertDocument", + "namespace": "databases", "auth": { "Project": [], "Session": [] @@ -9354,7 +9366,7 @@ "cookies": false, "type": "", "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9435,7 +9447,7 @@ "cookies": false, "type": "", "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9541,7 +9553,7 @@ "cookies": false, "type": "", "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9609,7 +9621,7 @@ "cookies": false, "type": "", "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9711,7 +9723,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9762,7 +9774,7 @@ "tags": [ "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -9779,7 +9791,7 @@ "cookies": false, "type": "", "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9861,7 +9873,7 @@ "cookies": false, "type": "", "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9968,7 +9980,7 @@ "cookies": false, "type": "", "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10077,7 +10089,7 @@ "cookies": false, "type": "", "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10184,7 +10196,7 @@ "cookies": false, "type": "", "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10293,7 +10305,7 @@ "cookies": false, "type": "", "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10400,7 +10412,7 @@ "cookies": false, "type": "", "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10509,7 +10521,7 @@ "cookies": false, "type": "", "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10626,7 +10638,7 @@ "cookies": false, "type": "", "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10745,7 +10757,7 @@ "cookies": false, "type": "", "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10864,7 +10876,7 @@ "cookies": false, "type": "", "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10985,7 +10997,7 @@ "cookies": false, "type": "", "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11104,7 +11116,7 @@ "cookies": false, "type": "", "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11225,7 +11237,7 @@ "cookies": false, "type": "", "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11332,7 +11344,7 @@ "cookies": false, "type": "", "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11441,7 +11453,7 @@ "cookies": false, "type": "", "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11575,7 +11587,7 @@ "cookies": false, "type": "", "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11695,7 +11707,7 @@ "cookies": false, "type": "", "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11810,7 +11822,7 @@ "cookies": false, "type": "", "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11917,7 +11929,7 @@ "cookies": false, "type": "", "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12055,7 +12067,7 @@ "cookies": false, "type": "", "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12125,7 +12137,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12202,7 +12214,7 @@ "cookies": false, "type": "", "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12288,7 +12300,7 @@ "tags": [ "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -12305,7 +12317,7 @@ "cookies": false, "type": "", "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12368,7 +12380,7 @@ "tags": [ "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", "responses": { "202": { "description": "Index", @@ -12385,7 +12397,7 @@ "cookies": false, "type": "", "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12513,7 +12525,7 @@ "cookies": false, "type": "", "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12583,7 +12595,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12658,7 +12670,7 @@ "cookies": false, "type": "", "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12741,7 +12753,7 @@ "cookies": false, "type": "", "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -12754,6 +12766,7 @@ "methods": [ { "name": "createRow", + "namespace": "grids", "auth": { "Project": [], "Session": [] @@ -12781,6 +12794,7 @@ }, { "name": "createRows", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -12904,7 +12918,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -12917,6 +12931,7 @@ "methods": [ { "name": "upsertRows", + "namespace": "grids", "auth": { "Project": [], "Key": [] @@ -13012,7 +13027,7 @@ "cookies": false, "type": "", "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13105,7 +13120,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13192,7 +13207,7 @@ "cookies": false, "type": "", "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13283,7 +13298,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13296,6 +13311,7 @@ "methods": [ { "name": "upsertRow", + "namespace": "grids", "auth": { "Project": [], "Session": [] @@ -13404,7 +13420,7 @@ "cookies": false, "type": "", "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13502,7 +13518,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13583,7 +13599,7 @@ "cookies": false, "type": "", "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13690,7 +13706,7 @@ "cookies": false, "type": "", "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 44f691f055..938ba76f53 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -5134,7 +5134,7 @@ "cookies": false, "type": "", "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5215,7 +5215,7 @@ "cookies": false, "type": "", "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -5352,7 +5352,7 @@ "cookies": false, "type": "", "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -5441,7 +5441,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -5560,7 +5560,7 @@ "cookies": false, "type": "", "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -5656,7 +5656,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index d80f7421ed..b4a61db855 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4747,7 +4747,7 @@ "model": "#\/definitions\/databaseList" } ], - "description": "" + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4853,7 +4853,7 @@ "model": "#\/definitions\/database" } ], - "description": "" + "description": "Create a new Database.\n" } ], "auth": { @@ -5073,7 +5073,7 @@ "model": "#\/definitions\/database" } ], - "description": "" + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -5166,7 +5166,7 @@ "model": "#\/definitions\/database" } ], - "description": "" + "description": "Update a database by its unique ID." } ], "auth": { @@ -5276,7 +5276,7 @@ "code": 204 } ], - "description": "" + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -10158,7 +10158,7 @@ "cookies": false, "type": "", "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10238,7 +10238,7 @@ "cookies": false, "type": "", "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10343,7 +10343,7 @@ "cookies": false, "type": "", "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10410,7 +10410,7 @@ "cookies": false, "type": "", "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10511,7 +10511,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10561,7 +10561,7 @@ "tags": [ "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -10578,7 +10578,7 @@ "cookies": false, "type": "", "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10659,7 +10659,7 @@ "cookies": false, "type": "", "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10765,7 +10765,7 @@ "cookies": false, "type": "", "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10873,7 +10873,7 @@ "cookies": false, "type": "", "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10979,7 +10979,7 @@ "cookies": false, "type": "", "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11087,7 +11087,7 @@ "cookies": false, "type": "", "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11193,7 +11193,7 @@ "cookies": false, "type": "", "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11301,7 +11301,7 @@ "cookies": false, "type": "", "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11417,7 +11417,7 @@ "cookies": false, "type": "", "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11535,7 +11535,7 @@ "cookies": false, "type": "", "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11653,7 +11653,7 @@ "cookies": false, "type": "", "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11773,7 +11773,7 @@ "cookies": false, "type": "", "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11891,7 +11891,7 @@ "cookies": false, "type": "", "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12011,7 +12011,7 @@ "cookies": false, "type": "", "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12117,7 +12117,7 @@ "cookies": false, "type": "", "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12225,7 +12225,7 @@ "cookies": false, "type": "", "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12358,7 +12358,7 @@ "cookies": false, "type": "", "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12477,7 +12477,7 @@ "cookies": false, "type": "", "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12591,7 +12591,7 @@ "cookies": false, "type": "", "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12697,7 +12697,7 @@ "cookies": false, "type": "", "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12834,7 +12834,7 @@ "cookies": false, "type": "", "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12903,7 +12903,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12979,7 +12979,7 @@ "cookies": false, "type": "", "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13064,7 +13064,7 @@ "tags": [ "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -13081,7 +13081,7 @@ "cookies": false, "type": "", "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13143,7 +13143,7 @@ "tags": [ "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", "responses": { "202": { "description": "Index", @@ -13160,7 +13160,7 @@ "cookies": false, "type": "", "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13287,7 +13287,7 @@ "cookies": false, "type": "", "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13356,7 +13356,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13425,12 +13425,12 @@ "deprecated": false, "x-appwrite": { "method": "listTableLogs", - "group": "grids", + "group": "tables", "weight": 375, "cookies": false, "type": "", "demo": "grids\/list-table-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-logs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13508,7 +13508,7 @@ "cookies": false, "type": "", "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13589,7 +13589,7 @@ "cookies": false, "type": "", "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13750,7 +13750,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13857,7 +13857,7 @@ "cookies": false, "type": "", "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13949,7 +13949,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14035,7 +14035,7 @@ "cookies": false, "type": "", "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14124,7 +14124,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14243,7 +14243,7 @@ "cookies": false, "type": "", "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14339,7 +14339,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14416,7 +14416,7 @@ "cookies": false, "type": "", "demo": "grids\/list-row-logs.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row-logs.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row-logs.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14504,7 +14504,7 @@ "cookies": false, "type": "", "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14610,7 +14610,7 @@ "cookies": false, "type": "", "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -14714,7 +14714,7 @@ "cookies": false, "type": "", "demo": "grids\/get-table-usage.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table-usage.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table-usage.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -14840,7 +14840,7 @@ "model": "#\/definitions\/logList" } ], - "description": "" + "description": "Get the database activity logs list by its unique ID." } ], "auth": { @@ -14944,7 +14944,7 @@ "model": "#\/definitions\/usageDatabase" } ], - "description": "" + "description": "Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 3ac203ee2c..709c263b96 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -4255,7 +4255,7 @@ "model": "#\/definitions\/databaseList" } ], - "description": "" + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." } ], "auth": { @@ -4364,7 +4364,7 @@ "model": "#\/definitions\/database" } ], - "description": "" + "description": "Create a new Database.\n" } ], "auth": { @@ -4483,7 +4483,7 @@ "model": "#\/definitions\/database" } ], - "description": "" + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." } ], "auth": { @@ -4579,7 +4579,7 @@ "model": "#\/definitions\/database" } ], - "description": "" + "description": "Update a database by its unique ID." } ], "auth": { @@ -4692,7 +4692,7 @@ "code": 204 } ], - "description": "" + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." } ], "auth": { @@ -9366,7 +9366,7 @@ "cookies": false, "type": "", "demo": "grids\/list-tables.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-tables.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-tables.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9447,7 +9447,7 @@ "cookies": false, "type": "", "demo": "grids\/create-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9553,7 +9553,7 @@ "cookies": false, "type": "", "demo": "grids\/get-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9621,7 +9621,7 @@ "cookies": false, "type": "", "demo": "grids\/update-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9723,7 +9723,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-table.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-table.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-table.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9774,7 +9774,7 @@ "tags": [ "grids" ], - "description": "List attributes in the collection.", + "description": "List columns in the table.", "responses": { "200": { "description": "Columns List", @@ -9791,7 +9791,7 @@ "cookies": false, "type": "", "demo": "grids\/list-columns.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-columns.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9873,7 +9873,7 @@ "cookies": false, "type": "", "demo": "grids\/create-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -9980,7 +9980,7 @@ "cookies": false, "type": "", "demo": "grids\/update-boolean-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-boolean-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-boolean-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10089,7 +10089,7 @@ "cookies": false, "type": "", "demo": "grids\/create-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10196,7 +10196,7 @@ "cookies": false, "type": "", "demo": "grids\/update-datetime-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-datetime-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-datetime-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10305,7 +10305,7 @@ "cookies": false, "type": "", "demo": "grids\/create-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10412,7 +10412,7 @@ "cookies": false, "type": "", "demo": "grids\/update-email-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-email-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-email-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10521,7 +10521,7 @@ "cookies": false, "type": "", "demo": "grids\/create-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10638,7 +10638,7 @@ "cookies": false, "type": "", "demo": "grids\/update-enum-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-enum-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-enum-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10757,7 +10757,7 @@ "cookies": false, "type": "", "demo": "grids\/create-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10876,7 +10876,7 @@ "cookies": false, "type": "", "demo": "grids\/update-float-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-float-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-float-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -10997,7 +10997,7 @@ "cookies": false, "type": "", "demo": "grids\/create-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11116,7 +11116,7 @@ "cookies": false, "type": "", "demo": "grids\/update-integer-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-integer-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-integer-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11237,7 +11237,7 @@ "cookies": false, "type": "", "demo": "grids\/create-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11344,7 +11344,7 @@ "cookies": false, "type": "", "demo": "grids\/update-ip-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-ip-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-ip-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11453,7 +11453,7 @@ "cookies": false, "type": "", "demo": "grids\/create-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11587,7 +11587,7 @@ "cookies": false, "type": "", "demo": "grids\/create-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11707,7 +11707,7 @@ "cookies": false, "type": "", "demo": "grids\/update-string-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-string-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-string-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11822,7 +11822,7 @@ "cookies": false, "type": "", "demo": "grids\/create-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -11929,7 +11929,7 @@ "cookies": false, "type": "", "demo": "grids\/update-url-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-url-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-url-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12067,7 +12067,7 @@ "cookies": false, "type": "", "demo": "grids\/get-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12137,7 +12137,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12214,7 +12214,7 @@ "cookies": false, "type": "", "demo": "grids\/update-relationship-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-relationship-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-relationship-column.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12300,7 +12300,7 @@ "tags": [ "grids" ], - "description": "List indexes in the collection.", + "description": "List indexes in the table.", "responses": { "200": { "description": "Column Indexes List", @@ -12317,7 +12317,7 @@ "cookies": false, "type": "", "demo": "grids\/list-indexes.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-indexes.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12380,7 +12380,7 @@ "tags": [ "grids" ], - "description": "Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.\nAttributes can be `key`, `fulltext`, and `unique`.", + "description": "Creates an index on the columns listed. Your index should include all the columns you will query in a single request.\nColumns can be `key`, `fulltext`, and `unique`.", "responses": { "202": { "description": "Index", @@ -12397,7 +12397,7 @@ "cookies": false, "type": "", "demo": "grids\/create-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12525,7 +12525,7 @@ "cookies": false, "type": "", "demo": "grids\/get-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12595,7 +12595,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-index.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-index.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12670,7 +12670,7 @@ "cookies": false, "type": "", "demo": "grids\/list-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/list-rows.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -12753,7 +12753,7 @@ "cookies": false, "type": "", "demo": "grids\/create-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/create-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -12918,7 +12918,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13027,7 +13027,7 @@ "cookies": false, "type": "", "demo": "grids\/update-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-rows.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13120,7 +13120,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-rows.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-rows.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13207,7 +13207,7 @@ "cookies": false, "type": "", "demo": "grids\/get-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -13298,7 +13298,7 @@ "cookies": false, "type": "", "demo": "grids\/upsert-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/upsert-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/upsert-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13420,7 +13420,7 @@ "cookies": false, "type": "", "demo": "grids\/update-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13518,7 +13518,7 @@ "cookies": false, "type": "", "demo": "grids\/delete-row.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/delete-row.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13599,7 +13599,7 @@ "cookies": false, "type": "", "demo": "grids\/decrement-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -13706,7 +13706,7 @@ "cookies": false, "type": "", "demo": "grids\/increment-row-column.md", - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/grids\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php index 0aec9998bd..d8b6e39ac6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/XList.php @@ -36,7 +36,7 @@ class XList extends AttributesXList namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), name: self::getName(), - description: '/docs/references/grids/list-attributes.md', + description: '/docs/references/grids/list-columns.md', auth: [AuthType::KEY], responses: [ new SDKResponse( From e4a02b0d74031a41026e5cc99261ea14275cbfc8 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 16:40:55 +0530 Subject: [PATCH 291/362] delete: tables examples. --- .../client-android/java/tables/create-row.md | 28 ---------------- .../client-android/java/tables/create-rows.md | 25 -------------- .../client-android/java/tables/delete-row.md | 24 -------------- .../client-android/java/tables/get-row.md | 25 -------------- .../client-android/java/tables/list-rows.md | 24 -------------- .../client-android/java/tables/update-row.md | 26 --------------- .../client-android/java/tables/upsert-row.md | 26 --------------- .../kotlin/tables/create-row.md | 19 ----------- .../kotlin/tables/create-rows.md | 16 --------- .../kotlin/tables/delete-row.md | 15 --------- .../client-android/kotlin/tables/get-row.md | 16 --------- .../client-android/kotlin/tables/list-rows.md | 15 --------- .../kotlin/tables/update-row.md | 17 ---------- .../kotlin/tables/upsert-row.md | 17 ---------- .../examples/tables/create-row.md | 18 ---------- .../examples/tables/create-rows.md | 15 --------- .../examples/tables/delete-row.md | 14 -------- .../client-apple/examples/tables/get-row.md | 15 --------- .../client-apple/examples/tables/list-rows.md | 14 -------- .../examples/tables/update-row.md | 16 --------- .../examples/tables/upsert-row.md | 16 --------- .../examples/tables/create-row.md | 17 ---------- .../examples/tables/create-rows.md | 14 -------- .../examples/tables/delete-row.md | 13 -------- .../client-flutter/examples/tables/get-row.md | 14 -------- .../examples/tables/list-rows.md | 13 -------- .../examples/tables/update-row.md | 15 --------- .../examples/tables/upsert-row.md | 15 --------- .../examples/tables/create-row.md | 18 ---------- .../examples/tables/create-rows.md | 19 ----------- .../examples/tables/delete-row.md | 9 ----- .../client-graphql/examples/tables/get-row.md | 0 .../examples/tables/list-rows.md | 0 .../examples/tables/update-row.md | 18 ---------- .../examples/tables/upsert-row.md | 16 --------- .../examples/tables/create-row.md | 19 ----------- .../examples/tables/create-rows.md | 16 --------- .../examples/tables/delete-row.md | 15 --------- .../examples/tables/get-row.md | 16 --------- .../examples/tables/list-rows.md | 15 --------- .../examples/tables/update-row.md | 17 ---------- .../examples/tables/upsert-row.md | 17 ---------- .../client-rest/examples/tables/create-row.md | 13 -------- .../examples/tables/create-rows.md | 11 ------- .../client-rest/examples/tables/delete-row.md | 8 ----- .../client-rest/examples/tables/get-row.md | 6 ---- .../client-rest/examples/tables/list-rows.md | 6 ---- .../client-rest/examples/tables/update-row.md | 12 ------- .../client-rest/examples/tables/upsert-row.md | 8 ----- .../client-web/examples/tables/create-row.md | 19 ----------- .../client-web/examples/tables/create-rows.md | 16 --------- .../client-web/examples/tables/delete-row.md | 15 --------- .../client-web/examples/tables/get-row.md | 16 --------- .../client-web/examples/tables/list-rows.md | 15 --------- .../client-web/examples/tables/update-row.md | 17 ---------- .../client-web/examples/tables/upsert-row.md | 17 ---------- .../examples/tables/create-boolean-column.md | 7 ---- .../examples/tables/create-datetime-column.md | 7 ---- .../examples/tables/create-email-column.md | 7 ---- .../examples/tables/create-enum-column.md | 8 ----- .../examples/tables/create-float-column.md | 9 ----- .../examples/tables/create-index.md | 8 ----- .../examples/tables/create-integer-column.md | 9 ----- .../examples/tables/create-ip-column.md | 7 ---- .../tables/create-relationship-column.md | 9 ----- .../console-cli/examples/tables/create-row.md | 6 ---- .../examples/tables/create-rows.md | 4 --- .../examples/tables/create-string-column.md | 9 ----- .../examples/tables/create-url-column.md | 7 ---- .../console-cli/examples/tables/create.md | 7 ---- .../examples/tables/decrement-row-column.md | 7 ---- .../examples/tables/delete-column.md | 4 --- .../examples/tables/delete-index.md | 4 --- .../console-cli/examples/tables/delete-row.md | 4 --- .../examples/tables/delete-rows.md | 4 --- .../console-cli/examples/tables/delete.md | 3 -- .../console-cli/examples/tables/get-column.md | 4 --- .../console-cli/examples/tables/get-index.md | 4 --- .../console-cli/examples/tables/get-row.md | 5 --- .../examples/tables/get-table-usage.md | 4 --- .../console-cli/examples/tables/get-usage.md | 4 --- .../1.8.x/console-cli/examples/tables/get.md | 3 -- .../examples/tables/increment-row-column.md | 7 ---- .../examples/tables/list-columns.md | 4 --- .../examples/tables/list-indexes.md | 4 --- .../console-cli/examples/tables/list-logs.md | 4 --- .../examples/tables/list-row-logs.md | 5 --- .../console-cli/examples/tables/list-rows.md | 4 --- .../1.8.x/console-cli/examples/tables/list.md | 4 --- .../examples/tables/update-boolean-column.md | 7 ---- .../examples/tables/update-datetime-column.md | 7 ---- .../examples/tables/update-email-column.md | 7 ---- .../examples/tables/update-enum-column.md | 8 ----- .../examples/tables/update-float-column.md | 9 ----- .../examples/tables/update-integer-column.md | 9 ----- .../examples/tables/update-ip-column.md | 7 ---- .../tables/update-relationship-column.md | 6 ---- .../console-cli/examples/tables/update-row.md | 6 ---- .../examples/tables/update-rows.md | 5 --- .../examples/tables/update-string-column.md | 8 ----- .../examples/tables/update-url-column.md | 7 ---- .../console-cli/examples/tables/update.md | 7 ---- .../console-cli/examples/tables/upsert-row.md | 4 --- .../examples/tables/upsert-rows.md | 3 -- .../examples/tables/create-boolean-column.md | 18 ---------- .../examples/tables/create-datetime-column.md | 18 ---------- .../examples/tables/create-email-column.md | 18 ---------- .../examples/tables/create-enum-column.md | 19 ----------- .../examples/tables/create-float-column.md | 20 ----------- .../examples/tables/create-index.md | 19 ----------- .../examples/tables/create-integer-column.md | 20 ----------- .../examples/tables/create-ip-column.md | 18 ---------- .../tables/create-relationship-column.md | 20 ----------- .../console-web/examples/tables/create-row.md | 19 ----------- .../examples/tables/create-rows.md | 16 --------- .../examples/tables/create-string-column.md | 20 ----------- .../examples/tables/create-url-column.md | 18 ---------- .../console-web/examples/tables/create.md | 18 ---------- .../examples/tables/decrement-row-column.md | 18 ---------- .../examples/tables/delete-column.md | 15 --------- .../examples/tables/delete-index.md | 15 --------- .../console-web/examples/tables/delete-row.md | 15 --------- .../examples/tables/delete-rows.md | 15 --------- .../console-web/examples/tables/delete.md | 14 -------- .../console-web/examples/tables/get-column.md | 15 --------- .../console-web/examples/tables/get-index.md | 15 --------- .../console-web/examples/tables/get-row.md | 16 --------- .../examples/tables/get-table-usage.md | 15 --------- .../console-web/examples/tables/get-usage.md | 15 --------- .../1.8.x/console-web/examples/tables/get.md | 14 -------- .../examples/tables/increment-row-column.md | 18 ---------- .../examples/tables/list-columns.md | 15 --------- .../examples/tables/list-indexes.md | 15 --------- .../console-web/examples/tables/list-logs.md | 15 --------- .../examples/tables/list-row-logs.md | 16 --------- .../console-web/examples/tables/list-rows.md | 15 --------- .../1.8.x/console-web/examples/tables/list.md | 15 --------- .../examples/tables/update-boolean-column.md | 18 ---------- .../examples/tables/update-datetime-column.md | 18 ---------- .../examples/tables/update-email-column.md | 18 ---------- .../examples/tables/update-enum-column.md | 19 ----------- .../examples/tables/update-float-column.md | 20 ----------- .../examples/tables/update-integer-column.md | 20 ----------- .../examples/tables/update-ip-column.md | 18 ---------- .../tables/update-relationship-column.md | 17 ---------- .../console-web/examples/tables/update-row.md | 17 ---------- .../examples/tables/update-rows.md | 16 --------- .../examples/tables/update-string-column.md | 19 ----------- .../examples/tables/update-url-column.md | 18 ---------- .../console-web/examples/tables/update.md | 18 ---------- .../console-web/examples/tables/upsert-row.md | 17 ---------- .../examples/tables/upsert-rows.md | 15 --------- .../examples/tables/create-boolean-column.md | 17 ---------- .../examples/tables/create-datetime-column.md | 17 ---------- .../examples/tables/create-email-column.md | 17 ---------- .../examples/tables/create-enum-column.md | 18 ---------- .../examples/tables/create-float-column.md | 19 ----------- .../examples/tables/create-index.md | 18 ---------- .../examples/tables/create-integer-column.md | 19 ----------- .../examples/tables/create-ip-column.md | 17 ---------- .../tables/create-relationship-column.md | 19 ----------- .../server-dart/examples/tables/create-row.md | 17 ---------- .../examples/tables/create-rows.md | 14 -------- .../examples/tables/create-string-column.md | 19 ----------- .../examples/tables/create-url-column.md | 17 ---------- .../server-dart/examples/tables/create.md | 17 ---------- .../examples/tables/decrement-row-column.md | 17 ---------- .../examples/tables/delete-column.md | 14 -------- .../examples/tables/delete-index.md | 14 -------- .../server-dart/examples/tables/delete-row.md | 14 -------- .../examples/tables/delete-rows.md | 14 -------- .../server-dart/examples/tables/delete.md | 13 -------- .../server-dart/examples/tables/get-column.md | 14 -------- .../server-dart/examples/tables/get-index.md | 14 -------- .../server-dart/examples/tables/get-row.md | 15 --------- .../1.8.x/server-dart/examples/tables/get.md | 13 -------- .../examples/tables/increment-row-column.md | 17 ---------- .../examples/tables/list-columns.md | 14 -------- .../examples/tables/list-indexes.md | 14 -------- .../server-dart/examples/tables/list-rows.md | 14 -------- .../1.8.x/server-dart/examples/tables/list.md | 14 -------- .../examples/tables/update-boolean-column.md | 17 ---------- .../examples/tables/update-datetime-column.md | 17 ---------- .../examples/tables/update-email-column.md | 17 ---------- .../examples/tables/update-enum-column.md | 18 ---------- .../examples/tables/update-float-column.md | 19 ----------- .../examples/tables/update-integer-column.md | 19 ----------- .../examples/tables/update-ip-column.md | 17 ---------- .../tables/update-relationship-column.md | 16 --------- .../server-dart/examples/tables/update-row.md | 16 --------- .../examples/tables/update-rows.md | 15 --------- .../examples/tables/update-string-column.md | 18 ---------- .../examples/tables/update-url-column.md | 17 ---------- .../server-dart/examples/tables/update.md | 17 ---------- .../server-dart/examples/tables/upsert-row.md | 15 --------- .../examples/tables/upsert-rows.md | 13 -------- .../examples/tables/create-boolean-column.md | 17 ---------- .../examples/tables/create-datetime-column.md | 17 ---------- .../examples/tables/create-email-column.md | 17 ---------- .../examples/tables/create-enum-column.md | 18 ---------- .../examples/tables/create-float-column.md | 19 ----------- .../examples/tables/create-index.md | 18 ---------- .../examples/tables/create-integer-column.md | 19 ----------- .../examples/tables/create-ip-column.md | 17 ---------- .../tables/create-relationship-column.md | 19 ----------- .../server-deno/examples/tables/create-row.md | 17 ---------- .../examples/tables/create-rows.md | 14 -------- .../examples/tables/create-string-column.md | 19 ----------- .../examples/tables/create-url-column.md | 17 ---------- .../server-deno/examples/tables/create.md | 17 ---------- .../examples/tables/decrement-row-column.md | 17 ---------- .../examples/tables/delete-column.md | 14 -------- .../examples/tables/delete-index.md | 14 -------- .../server-deno/examples/tables/delete-row.md | 14 -------- .../examples/tables/delete-rows.md | 14 -------- .../server-deno/examples/tables/delete.md | 13 -------- .../server-deno/examples/tables/get-column.md | 14 -------- .../server-deno/examples/tables/get-index.md | 14 -------- .../server-deno/examples/tables/get-row.md | 15 --------- .../1.8.x/server-deno/examples/tables/get.md | 13 -------- .../examples/tables/increment-row-column.md | 17 ---------- .../examples/tables/list-columns.md | 14 -------- .../examples/tables/list-indexes.md | 14 -------- .../server-deno/examples/tables/list-rows.md | 14 -------- .../1.8.x/server-deno/examples/tables/list.md | 14 -------- .../examples/tables/update-boolean-column.md | 17 ---------- .../examples/tables/update-datetime-column.md | 17 ---------- .../examples/tables/update-email-column.md | 17 ---------- .../examples/tables/update-enum-column.md | 18 ---------- .../examples/tables/update-float-column.md | 19 ----------- .../examples/tables/update-integer-column.md | 19 ----------- .../examples/tables/update-ip-column.md | 17 ---------- .../tables/update-relationship-column.md | 16 --------- .../server-deno/examples/tables/update-row.md | 16 --------- .../examples/tables/update-rows.md | 15 --------- .../examples/tables/update-string-column.md | 18 ---------- .../examples/tables/update-url-column.md | 17 ---------- .../server-deno/examples/tables/update.md | 17 ---------- .../server-deno/examples/tables/upsert-row.md | 15 --------- .../examples/tables/upsert-rows.md | 13 -------- .../examples/tables/create-boolean-column.md | 19 ----------- .../examples/tables/create-datetime-column.md | 19 ----------- .../examples/tables/create-email-column.md | 19 ----------- .../examples/tables/create-enum-column.md | 20 ----------- .../examples/tables/create-float-column.md | 21 ------------ .../examples/tables/create-index.md | 21 ------------ .../examples/tables/create-integer-column.md | 21 ------------ .../examples/tables/create-ip-column.md | 19 ----------- .../tables/create-relationship-column.md | 22 ------------- .../examples/tables/create-row.md | 19 ----------- .../examples/tables/create-rows.md | 16 --------- .../examples/tables/create-string-column.md | 21 ------------ .../examples/tables/create-url-column.md | 19 ----------- .../server-dotnet/examples/tables/create.md | 19 ----------- .../examples/tables/decrement-row-column.md | 19 ----------- .../examples/tables/delete-column.md | 16 --------- .../examples/tables/delete-index.md | 16 --------- .../examples/tables/delete-row.md | 16 --------- .../examples/tables/delete-rows.md | 16 --------- .../server-dotnet/examples/tables/delete.md | 15 --------- .../examples/tables/get-column.md | 16 --------- .../examples/tables/get-index.md | 16 --------- .../server-dotnet/examples/tables/get-row.md | 17 ---------- .../server-dotnet/examples/tables/get.md | 15 --------- .../examples/tables/increment-row-column.md | 19 ----------- .../examples/tables/list-columns.md | 16 --------- .../examples/tables/list-indexes.md | 16 --------- .../examples/tables/list-rows.md | 16 --------- .../server-dotnet/examples/tables/list.md | 16 --------- .../examples/tables/update-boolean-column.md | 19 ----------- .../examples/tables/update-datetime-column.md | 19 ----------- .../examples/tables/update-email-column.md | 19 ----------- .../examples/tables/update-enum-column.md | 20 ----------- .../examples/tables/update-float-column.md | 21 ------------ .../examples/tables/update-integer-column.md | 21 ------------ .../examples/tables/update-ip-column.md | 19 ----------- .../tables/update-relationship-column.md | 19 ----------- .../examples/tables/update-row.md | 18 ---------- .../examples/tables/update-rows.md | 17 ---------- .../examples/tables/update-string-column.md | 20 ----------- .../examples/tables/update-url-column.md | 19 ----------- .../server-dotnet/examples/tables/update.md | 19 ----------- .../examples/tables/upsert-row.md | 17 ---------- .../examples/tables/upsert-rows.md | 15 --------- .../examples/tables/create-boolean-column.md | 31 ----------------- .../examples/tables/create-datetime-column.md | 31 ----------------- .../examples/tables/create-email-column.md | 31 ----------------- .../examples/tables/create-enum-column.md | 32 ------------------ .../examples/tables/create-float-column.md | 33 ------------------- .../server-go/examples/tables/create-index.md | 32 ------------------ .../examples/tables/create-integer-column.md | 33 ------------------- .../examples/tables/create-ip-column.md | 31 ----------------- .../tables/create-relationship-column.md | 33 ------------------- .../server-go/examples/tables/create-row.md | 31 ----------------- .../server-go/examples/tables/create-rows.md | 28 ---------------- .../examples/tables/create-string-column.md | 33 ------------------- .../examples/tables/create-url-column.md | 31 ----------------- .../1.8.x/server-go/examples/tables/create.md | 31 ----------------- .../examples/tables/decrement-row-column.md | 31 ----------------- .../examples/tables/delete-column.md | 28 ---------------- .../server-go/examples/tables/delete-index.md | 28 ---------------- .../server-go/examples/tables/delete-row.md | 28 ---------------- .../server-go/examples/tables/delete-rows.md | 28 ---------------- .../1.8.x/server-go/examples/tables/delete.md | 27 --------------- .../server-go/examples/tables/get-column.md | 28 ---------------- .../server-go/examples/tables/get-index.md | 28 ---------------- .../server-go/examples/tables/get-row.md | 29 ---------------- .../1.8.x/server-go/examples/tables/get.md | 27 --------------- .../examples/tables/increment-row-column.md | 31 ----------------- .../server-go/examples/tables/list-columns.md | 28 ---------------- .../server-go/examples/tables/list-indexes.md | 28 ---------------- .../server-go/examples/tables/list-rows.md | 28 ---------------- .../1.8.x/server-go/examples/tables/list.md | 28 ---------------- .../examples/tables/update-boolean-column.md | 31 ----------------- .../examples/tables/update-datetime-column.md | 31 ----------------- .../examples/tables/update-email-column.md | 31 ----------------- .../examples/tables/update-enum-column.md | 32 ------------------ .../examples/tables/update-float-column.md | 33 ------------------- .../examples/tables/update-integer-column.md | 33 ------------------- .../examples/tables/update-ip-column.md | 31 ----------------- .../tables/update-relationship-column.md | 30 ----------------- .../server-go/examples/tables/update-row.md | 30 ----------------- .../server-go/examples/tables/update-rows.md | 29 ---------------- .../examples/tables/update-string-column.md | 32 ------------------ .../examples/tables/update-url-column.md | 31 ----------------- .../1.8.x/server-go/examples/tables/update.md | 31 ----------------- .../server-go/examples/tables/upsert-row.md | 29 ---------------- .../server-go/examples/tables/upsert-rows.md | 27 --------------- .../examples/tables/create-boolean-column.md | 20 ----------- .../examples/tables/create-datetime-column.md | 21 ------------ .../examples/tables/create-email-column.md | 21 ------------ .../examples/tables/create-enum-column.md | 23 ------------- .../examples/tables/create-float-column.md | 24 -------------- .../examples/tables/create-index.md | 21 ------------ .../examples/tables/create-integer-column.md | 24 -------------- .../examples/tables/create-ip-column.md | 21 ------------ .../tables/create-relationship-column.md | 27 --------------- .../examples/tables/create-row.md | 18 ---------- .../examples/tables/create-rows.md | 19 ----------- .../examples/tables/create-string-column.md | 24 -------------- .../examples/tables/create-url-column.md | 21 ------------ .../server-graphql/examples/tables/create.md | 31 ----------------- .../examples/tables/decrement-row-column.md | 19 ----------- .../examples/tables/delete-column.md | 9 ----- .../examples/tables/delete-index.md | 9 ----- .../examples/tables/delete-row.md | 9 ----- .../examples/tables/delete-rows.md | 19 ----------- .../server-graphql/examples/tables/delete.md | 8 ----- .../examples/tables/get-column.md | 0 .../examples/tables/get-index.md | 0 .../server-graphql/examples/tables/get-row.md | 0 .../server-graphql/examples/tables/get.md | 0 .../examples/tables/increment-row-column.md | 19 ----------- .../examples/tables/list-columns.md | 0 .../examples/tables/list-indexes.md | 0 .../examples/tables/list-rows.md | 0 .../server-graphql/examples/tables/list.md | 0 .../examples/tables/update-boolean-column.md | 20 ----------- .../examples/tables/update-datetime-column.md | 21 ------------ .../examples/tables/update-email-column.md | 21 ------------ .../examples/tables/update-enum-column.md | 23 ------------- .../examples/tables/update-float-column.md | 24 -------------- .../examples/tables/update-integer-column.md | 24 -------------- .../examples/tables/update-ip-column.md | 21 ------------ .../tables/update-relationship-column.md | 24 -------------- .../examples/tables/update-row.md | 18 ---------- .../examples/tables/update-rows.md | 20 ----------- .../examples/tables/update-string-column.md | 23 ------------- .../examples/tables/update-url-column.md | 21 ------------ .../server-graphql/examples/tables/update.md | 31 ----------------- .../examples/tables/upsert-row.md | 16 --------- .../examples/tables/upsert-rows.md | 18 ---------- .../java/tables/create-boolean-column.md | 28 ---------------- .../java/tables/create-datetime-column.md | 28 ---------------- .../java/tables/create-email-column.md | 28 ---------------- .../java/tables/create-enum-column.md | 29 ---------------- .../java/tables/create-float-column.md | 30 ----------------- .../server-kotlin/java/tables/create-index.md | 30 ----------------- .../java/tables/create-integer-column.md | 30 ----------------- .../java/tables/create-ip-column.md | 28 ---------------- .../java/tables/create-relationship-column.md | 31 ----------------- .../server-kotlin/java/tables/create-row.md | 28 ---------------- .../server-kotlin/java/tables/create-rows.md | 25 -------------- .../java/tables/create-string-column.md | 30 ----------------- .../java/tables/create-url-column.md | 28 ---------------- .../1.8.x/server-kotlin/java/tables/create.md | 28 ---------------- .../java/tables/decrement-row-column.md | 28 ---------------- .../java/tables/delete-column.md | 25 -------------- .../server-kotlin/java/tables/delete-index.md | 25 -------------- .../server-kotlin/java/tables/delete-row.md | 25 -------------- .../server-kotlin/java/tables/delete-rows.md | 25 -------------- .../1.8.x/server-kotlin/java/tables/delete.md | 24 -------------- .../server-kotlin/java/tables/get-column.md | 25 -------------- .../server-kotlin/java/tables/get-index.md | 25 -------------- .../server-kotlin/java/tables/get-row.md | 26 --------------- .../1.8.x/server-kotlin/java/tables/get.md | 24 -------------- .../java/tables/increment-row-column.md | 28 ---------------- .../server-kotlin/java/tables/list-columns.md | 25 -------------- .../server-kotlin/java/tables/list-indexes.md | 25 -------------- .../server-kotlin/java/tables/list-rows.md | 25 -------------- .../1.8.x/server-kotlin/java/tables/list.md | 25 -------------- .../java/tables/update-boolean-column.md | 28 ---------------- .../java/tables/update-datetime-column.md | 28 ---------------- .../java/tables/update-email-column.md | 28 ---------------- .../java/tables/update-enum-column.md | 29 ---------------- .../java/tables/update-float-column.md | 30 ----------------- .../java/tables/update-integer-column.md | 30 ----------------- .../java/tables/update-ip-column.md | 28 ---------------- .../java/tables/update-relationship-column.md | 27 --------------- .../server-kotlin/java/tables/update-row.md | 27 --------------- .../server-kotlin/java/tables/update-rows.md | 26 --------------- .../java/tables/update-string-column.md | 29 ---------------- .../java/tables/update-url-column.md | 28 ---------------- .../1.8.x/server-kotlin/java/tables/update.md | 28 ---------------- .../server-kotlin/java/tables/upsert-row.md | 26 --------------- .../server-kotlin/java/tables/upsert-rows.md | 24 -------------- .../kotlin/tables/create-boolean-column.md | 19 ----------- .../kotlin/tables/create-datetime-column.md | 19 ----------- .../kotlin/tables/create-email-column.md | 19 ----------- .../kotlin/tables/create-enum-column.md | 20 ----------- .../kotlin/tables/create-float-column.md | 21 ------------ .../kotlin/tables/create-index.md | 21 ------------ .../kotlin/tables/create-integer-column.md | 21 ------------ .../kotlin/tables/create-ip-column.md | 19 ----------- .../tables/create-relationship-column.md | 22 ------------- .../server-kotlin/kotlin/tables/create-row.md | 19 ----------- .../kotlin/tables/create-rows.md | 16 --------- .../kotlin/tables/create-string-column.md | 21 ------------ .../kotlin/tables/create-url-column.md | 19 ----------- .../server-kotlin/kotlin/tables/create.md | 19 ----------- .../kotlin/tables/decrement-row-column.md | 19 ----------- .../kotlin/tables/delete-column.md | 16 --------- .../kotlin/tables/delete-index.md | 16 --------- .../server-kotlin/kotlin/tables/delete-row.md | 16 --------- .../kotlin/tables/delete-rows.md | 16 --------- .../server-kotlin/kotlin/tables/delete.md | 15 --------- .../server-kotlin/kotlin/tables/get-column.md | 16 --------- .../server-kotlin/kotlin/tables/get-index.md | 16 --------- .../server-kotlin/kotlin/tables/get-row.md | 17 ---------- .../1.8.x/server-kotlin/kotlin/tables/get.md | 15 --------- .../kotlin/tables/increment-row-column.md | 19 ----------- .../kotlin/tables/list-columns.md | 16 --------- .../kotlin/tables/list-indexes.md | 16 --------- .../server-kotlin/kotlin/tables/list-rows.md | 16 --------- .../1.8.x/server-kotlin/kotlin/tables/list.md | 16 --------- .../kotlin/tables/update-boolean-column.md | 19 ----------- .../kotlin/tables/update-datetime-column.md | 19 ----------- .../kotlin/tables/update-email-column.md | 19 ----------- .../kotlin/tables/update-enum-column.md | 20 ----------- .../kotlin/tables/update-float-column.md | 21 ------------ .../kotlin/tables/update-integer-column.md | 21 ------------ .../kotlin/tables/update-ip-column.md | 19 ----------- .../tables/update-relationship-column.md | 18 ---------- .../server-kotlin/kotlin/tables/update-row.md | 18 ---------- .../kotlin/tables/update-rows.md | 17 ---------- .../kotlin/tables/update-string-column.md | 20 ----------- .../kotlin/tables/update-url-column.md | 19 ----------- .../server-kotlin/kotlin/tables/update.md | 19 ----------- .../server-kotlin/kotlin/tables/upsert-row.md | 17 ---------- .../kotlin/tables/upsert-rows.md | 15 --------- .../examples/tables/create-boolean-column.md | 17 ---------- .../examples/tables/create-datetime-column.md | 17 ---------- .../examples/tables/create-email-column.md | 17 ---------- .../examples/tables/create-enum-column.md | 18 ---------- .../examples/tables/create-float-column.md | 19 ----------- .../examples/tables/create-index.md | 18 ---------- .../examples/tables/create-integer-column.md | 19 ----------- .../examples/tables/create-ip-column.md | 17 ---------- .../tables/create-relationship-column.md | 19 ----------- .../examples/tables/create-row.md | 17 ---------- .../examples/tables/create-rows.md | 14 -------- .../examples/tables/create-string-column.md | 19 ----------- .../examples/tables/create-url-column.md | 17 ---------- .../server-nodejs/examples/tables/create.md | 17 ---------- .../examples/tables/decrement-row-column.md | 17 ---------- .../examples/tables/delete-column.md | 14 -------- .../examples/tables/delete-index.md | 14 -------- .../examples/tables/delete-row.md | 14 -------- .../examples/tables/delete-rows.md | 14 -------- .../server-nodejs/examples/tables/delete.md | 13 -------- .../examples/tables/get-column.md | 14 -------- .../examples/tables/get-index.md | 14 -------- .../server-nodejs/examples/tables/get-row.md | 15 --------- .../server-nodejs/examples/tables/get.md | 13 -------- .../examples/tables/increment-row-column.md | 17 ---------- .../examples/tables/list-columns.md | 14 -------- .../examples/tables/list-indexes.md | 14 -------- .../examples/tables/list-rows.md | 14 -------- .../server-nodejs/examples/tables/list.md | 14 -------- .../examples/tables/update-boolean-column.md | 17 ---------- .../examples/tables/update-datetime-column.md | 17 ---------- .../examples/tables/update-email-column.md | 17 ---------- .../examples/tables/update-enum-column.md | 18 ---------- .../examples/tables/update-float-column.md | 19 ----------- .../examples/tables/update-integer-column.md | 19 ----------- .../examples/tables/update-ip-column.md | 17 ---------- .../tables/update-relationship-column.md | 16 --------- .../examples/tables/update-row.md | 16 --------- .../examples/tables/update-rows.md | 15 --------- .../examples/tables/update-string-column.md | 18 ---------- .../examples/tables/update-url-column.md | 17 ---------- .../server-nodejs/examples/tables/update.md | 17 ---------- .../examples/tables/upsert-row.md | 15 --------- .../examples/tables/upsert-rows.md | 13 -------- .../examples/tables/create-boolean-column.md | 20 ----------- .../examples/tables/create-datetime-column.md | 20 ----------- .../examples/tables/create-email-column.md | 20 ----------- .../examples/tables/create-enum-column.md | 21 ------------ .../examples/tables/create-float-column.md | 22 ------------- .../examples/tables/create-index.md | 22 ------------- .../examples/tables/create-integer-column.md | 22 ------------- .../examples/tables/create-ip-column.md | 20 ----------- .../tables/create-relationship-column.md | 23 ------------- .../server-php/examples/tables/create-row.md | 20 ----------- .../server-php/examples/tables/create-rows.md | 17 ---------- .../examples/tables/create-string-column.md | 22 ------------- .../examples/tables/create-url-column.md | 20 ----------- .../server-php/examples/tables/create.md | 20 ----------- .../examples/tables/decrement-row-column.md | 20 ----------- .../examples/tables/delete-column.md | 17 ---------- .../examples/tables/delete-index.md | 17 ---------- .../server-php/examples/tables/delete-row.md | 17 ---------- .../server-php/examples/tables/delete-rows.md | 17 ---------- .../server-php/examples/tables/delete.md | 16 --------- .../server-php/examples/tables/get-column.md | 17 ---------- .../server-php/examples/tables/get-index.md | 17 ---------- .../server-php/examples/tables/get-row.md | 18 ---------- .../1.8.x/server-php/examples/tables/get.md | 16 --------- .../examples/tables/increment-row-column.md | 20 ----------- .../examples/tables/list-columns.md | 17 ---------- .../examples/tables/list-indexes.md | 17 ---------- .../server-php/examples/tables/list-rows.md | 17 ---------- .../1.8.x/server-php/examples/tables/list.md | 17 ---------- .../examples/tables/update-boolean-column.md | 20 ----------- .../examples/tables/update-datetime-column.md | 20 ----------- .../examples/tables/update-email-column.md | 20 ----------- .../examples/tables/update-enum-column.md | 21 ------------ .../examples/tables/update-float-column.md | 22 ------------- .../examples/tables/update-integer-column.md | 22 ------------- .../examples/tables/update-ip-column.md | 20 ----------- .../tables/update-relationship-column.md | 19 ----------- .../server-php/examples/tables/update-row.md | 19 ----------- .../server-php/examples/tables/update-rows.md | 18 ---------- .../examples/tables/update-string-column.md | 21 ------------ .../examples/tables/update-url-column.md | 20 ----------- .../server-php/examples/tables/update.md | 20 ----------- .../server-php/examples/tables/upsert-row.md | 18 ---------- .../server-php/examples/tables/upsert-rows.md | 16 --------- .../examples/tables/create-boolean-column.md | 18 ---------- .../examples/tables/create-datetime-column.md | 18 ---------- .../examples/tables/create-email-column.md | 18 ---------- .../examples/tables/create-enum-column.md | 19 ----------- .../examples/tables/create-float-column.md | 20 ----------- .../examples/tables/create-index.md | 20 ----------- .../examples/tables/create-integer-column.md | 20 ----------- .../examples/tables/create-ip-column.md | 18 ---------- .../tables/create-relationship-column.md | 21 ------------ .../examples/tables/create-row.md | 18 ---------- .../examples/tables/create-rows.md | 15 --------- .../examples/tables/create-string-column.md | 20 ----------- .../examples/tables/create-url-column.md | 18 ---------- .../server-python/examples/tables/create.md | 18 ---------- .../examples/tables/decrement-row-column.md | 18 ---------- .../examples/tables/delete-column.md | 15 --------- .../examples/tables/delete-index.md | 15 --------- .../examples/tables/delete-row.md | 15 --------- .../examples/tables/delete-rows.md | 15 --------- .../server-python/examples/tables/delete.md | 14 -------- .../examples/tables/get-column.md | 15 --------- .../examples/tables/get-index.md | 15 --------- .../server-python/examples/tables/get-row.md | 16 --------- .../server-python/examples/tables/get.md | 14 -------- .../examples/tables/increment-row-column.md | 18 ---------- .../examples/tables/list-columns.md | 15 --------- .../examples/tables/list-indexes.md | 15 --------- .../examples/tables/list-rows.md | 15 --------- .../server-python/examples/tables/list.md | 15 --------- .../examples/tables/update-boolean-column.md | 18 ---------- .../examples/tables/update-datetime-column.md | 18 ---------- .../examples/tables/update-email-column.md | 18 ---------- .../examples/tables/update-enum-column.md | 19 ----------- .../examples/tables/update-float-column.md | 20 ----------- .../examples/tables/update-integer-column.md | 20 ----------- .../examples/tables/update-ip-column.md | 18 ---------- .../tables/update-relationship-column.md | 17 ---------- .../examples/tables/update-row.md | 17 ---------- .../examples/tables/update-rows.md | 16 --------- .../examples/tables/update-string-column.md | 19 ----------- .../examples/tables/update-url-column.md | 18 ---------- .../server-python/examples/tables/update.md | 18 ---------- .../examples/tables/upsert-row.md | 16 --------- .../examples/tables/upsert-rows.md | 14 -------- .../examples/tables/create-boolean-column.md | 13 -------- .../examples/tables/create-datetime-column.md | 13 -------- .../examples/tables/create-email-column.md | 13 -------- .../examples/tables/create-enum-column.md | 14 -------- .../examples/tables/create-float-column.md | 15 --------- .../examples/tables/create-index.md | 14 -------- .../examples/tables/create-integer-column.md | 15 --------- .../examples/tables/create-ip-column.md | 13 -------- .../tables/create-relationship-column.md | 15 --------- .../server-rest/examples/tables/create-row.md | 14 -------- .../examples/tables/create-rows.md | 12 ------- .../examples/tables/create-string-column.md | 15 --------- .../examples/tables/create-url-column.md | 13 -------- .../server-rest/examples/tables/create.md | 14 -------- .../examples/tables/decrement-row-column.md | 11 ------- .../examples/tables/delete-column.md | 7 ---- .../examples/tables/delete-index.md | 7 ---- .../server-rest/examples/tables/delete-row.md | 9 ----- .../examples/tables/delete-rows.md | 10 ------ .../server-rest/examples/tables/delete.md | 7 ---- .../server-rest/examples/tables/get-column.md | 5 --- .../server-rest/examples/tables/get-index.md | 5 --- .../server-rest/examples/tables/get-row.md | 7 ---- .../1.8.x/server-rest/examples/tables/get.md | 5 --- .../examples/tables/increment-row-column.md | 11 ------- .../examples/tables/list-columns.md | 5 --- .../examples/tables/list-indexes.md | 5 --- .../server-rest/examples/tables/list-rows.md | 7 ---- .../1.8.x/server-rest/examples/tables/list.md | 5 --- .../examples/tables/update-boolean-column.md | 12 ------- .../examples/tables/update-datetime-column.md | 12 ------- .../examples/tables/update-email-column.md | 12 ------- .../examples/tables/update-enum-column.md | 13 -------- .../examples/tables/update-float-column.md | 14 -------- .../examples/tables/update-integer-column.md | 14 -------- .../examples/tables/update-ip-column.md | 12 ------- .../tables/update-relationship-column.md | 11 ------- .../server-rest/examples/tables/update-row.md | 13 -------- .../examples/tables/update-rows.md | 11 ------- .../examples/tables/update-string-column.md | 13 -------- .../examples/tables/update-url-column.md | 12 ------- .../server-rest/examples/tables/update.md | 13 -------- .../server-rest/examples/tables/upsert-row.md | 9 ----- .../examples/tables/upsert-rows.md | 7 ---- .../examples/tables/create-boolean-column.md | 19 ----------- .../examples/tables/create-datetime-column.md | 19 ----------- .../examples/tables/create-email-column.md | 19 ----------- .../examples/tables/create-enum-column.md | 20 ----------- .../examples/tables/create-float-column.md | 21 ------------ .../examples/tables/create-index.md | 21 ------------ .../examples/tables/create-integer-column.md | 21 ------------ .../examples/tables/create-ip-column.md | 19 ----------- .../tables/create-relationship-column.md | 22 ------------- .../server-ruby/examples/tables/create-row.md | 19 ----------- .../examples/tables/create-rows.md | 16 --------- .../examples/tables/create-string-column.md | 21 ------------ .../examples/tables/create-url-column.md | 19 ----------- .../server-ruby/examples/tables/create.md | 19 ----------- .../examples/tables/decrement-row-column.md | 19 ----------- .../examples/tables/delete-column.md | 16 --------- .../examples/tables/delete-index.md | 16 --------- .../server-ruby/examples/tables/delete-row.md | 16 --------- .../examples/tables/delete-rows.md | 16 --------- .../server-ruby/examples/tables/delete.md | 15 --------- .../server-ruby/examples/tables/get-column.md | 16 --------- .../server-ruby/examples/tables/get-index.md | 16 --------- .../server-ruby/examples/tables/get-row.md | 17 ---------- .../1.8.x/server-ruby/examples/tables/get.md | 15 --------- .../examples/tables/increment-row-column.md | 19 ----------- .../examples/tables/list-columns.md | 16 --------- .../examples/tables/list-indexes.md | 16 --------- .../server-ruby/examples/tables/list-rows.md | 16 --------- .../1.8.x/server-ruby/examples/tables/list.md | 16 --------- .../examples/tables/update-boolean-column.md | 19 ----------- .../examples/tables/update-datetime-column.md | 19 ----------- .../examples/tables/update-email-column.md | 19 ----------- .../examples/tables/update-enum-column.md | 20 ----------- .../examples/tables/update-float-column.md | 21 ------------ .../examples/tables/update-integer-column.md | 21 ------------ .../examples/tables/update-ip-column.md | 19 ----------- .../tables/update-relationship-column.md | 18 ---------- .../server-ruby/examples/tables/update-row.md | 18 ---------- .../examples/tables/update-rows.md | 17 ---------- .../examples/tables/update-string-column.md | 20 ----------- .../examples/tables/update-url-column.md | 19 ----------- .../server-ruby/examples/tables/update.md | 19 ----------- .../server-ruby/examples/tables/upsert-row.md | 17 ---------- .../examples/tables/upsert-rows.md | 15 --------- .../examples/tables/create-boolean-column.md | 18 ---------- .../examples/tables/create-datetime-column.md | 18 ---------- .../examples/tables/create-email-column.md | 18 ---------- .../examples/tables/create-enum-column.md | 19 ----------- .../examples/tables/create-float-column.md | 20 ----------- .../examples/tables/create-index.md | 20 ----------- .../examples/tables/create-integer-column.md | 20 ----------- .../examples/tables/create-ip-column.md | 18 ---------- .../tables/create-relationship-column.md | 21 ------------ .../examples/tables/create-row.md | 18 ---------- .../examples/tables/create-rows.md | 15 --------- .../examples/tables/create-string-column.md | 20 ----------- .../examples/tables/create-url-column.md | 18 ---------- .../server-swift/examples/tables/create.md | 18 ---------- .../examples/tables/decrement-row-column.md | 18 ---------- .../examples/tables/delete-column.md | 15 --------- .../examples/tables/delete-index.md | 15 --------- .../examples/tables/delete-row.md | 15 --------- .../examples/tables/delete-rows.md | 15 --------- .../server-swift/examples/tables/delete.md | 14 -------- .../examples/tables/get-column.md | 15 --------- .../server-swift/examples/tables/get-index.md | 15 --------- .../server-swift/examples/tables/get-row.md | 16 --------- .../1.8.x/server-swift/examples/tables/get.md | 14 -------- .../examples/tables/increment-row-column.md | 18 ---------- .../examples/tables/list-columns.md | 15 --------- .../examples/tables/list-indexes.md | 15 --------- .../server-swift/examples/tables/list-rows.md | 15 --------- .../server-swift/examples/tables/list.md | 15 --------- .../examples/tables/update-boolean-column.md | 18 ---------- .../examples/tables/update-datetime-column.md | 18 ---------- .../examples/tables/update-email-column.md | 18 ---------- .../examples/tables/update-enum-column.md | 19 ----------- .../examples/tables/update-float-column.md | 20 ----------- .../examples/tables/update-integer-column.md | 20 ----------- .../examples/tables/update-ip-column.md | 18 ---------- .../tables/update-relationship-column.md | 18 ---------- .../examples/tables/update-row.md | 17 ---------- .../examples/tables/update-rows.md | 16 --------- .../examples/tables/update-string-column.md | 19 ----------- .../examples/tables/update-url-column.md | 18 ---------- .../server-swift/examples/tables/update.md | 18 ---------- .../examples/tables/upsert-row.md | 16 --------- .../examples/tables/upsert-rows.md | 14 -------- .../databases/create-boolean-column.md | 1 - .../databases/create-datetime-column.md | 1 - .../databases/create-email-column.md | 1 - .../databases/create-enum-column.md | 1 - .../databases/create-float-column.md | 1 - .../databases/create-integer-column.md | 1 - docs/references/databases/create-ip-column.md | 1 - .../databases/create-relationship-column.md | 1 - docs/references/databases/create-row.md | 1 - docs/references/databases/create-rows.md | 1 - .../databases/create-string-column.md | 1 - docs/references/databases/create-table.md | 1 - .../references/databases/create-url-column.md | 1 - .../databases/decrement-row-column.md | 1 - docs/references/databases/delete-column.md | 1 - docs/references/databases/delete-row.md | 1 - docs/references/databases/delete-rows.md | 1 - docs/references/databases/delete-table.md | 1 - docs/references/databases/get-column.md | 1 - docs/references/databases/get-row-logs.md | 1 - docs/references/databases/get-row.md | 1 - docs/references/databases/get-table-logs.md | 1 - docs/references/databases/get-table-usage.md | 1 - docs/references/databases/get-table.md | 1 - .../databases/increment-row-column.md | 1 - docs/references/databases/list-columns.md | 1 - docs/references/databases/list-rows.md | 1 - docs/references/databases/list-tables.md | 1 - .../databases/update-boolean-column.md | 1 - .../databases/update-datetime-column.md | 1 - .../databases/update-email-column.md | 1 - .../databases/update-enum-column.md | 1 - .../databases/update-float-column.md | 1 - .../databases/update-integer-column.md | 1 - docs/references/databases/update-ip-column.md | 1 - .../databases/update-relationship-column.md | 1 - docs/references/databases/update-row.md | 1 - docs/references/databases/update-rows.md | 1 - .../databases/update-string-column.md | 1 - docs/references/databases/update-table.md | 1 - .../references/databases/update-url-column.md | 1 - docs/references/databases/upsert-row.md | 1 - docs/references/databases/upsert-rows.md | 1 - 767 files changed, 12655 deletions(-) delete mode 100644 docs/examples/1.8.x/client-android/java/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-android/java/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-android/java/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-android/java/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-android/java/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-android/java/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-android/java/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-usage.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-logs.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-usage.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-logs.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md delete mode 100644 docs/references/databases/create-boolean-column.md delete mode 100644 docs/references/databases/create-datetime-column.md delete mode 100644 docs/references/databases/create-email-column.md delete mode 100644 docs/references/databases/create-enum-column.md delete mode 100644 docs/references/databases/create-float-column.md delete mode 100644 docs/references/databases/create-integer-column.md delete mode 100644 docs/references/databases/create-ip-column.md delete mode 100644 docs/references/databases/create-relationship-column.md delete mode 100644 docs/references/databases/create-row.md delete mode 100644 docs/references/databases/create-rows.md delete mode 100644 docs/references/databases/create-string-column.md delete mode 100644 docs/references/databases/create-table.md delete mode 100644 docs/references/databases/create-url-column.md delete mode 100644 docs/references/databases/decrement-row-column.md delete mode 100644 docs/references/databases/delete-column.md delete mode 100644 docs/references/databases/delete-row.md delete mode 100644 docs/references/databases/delete-rows.md delete mode 100644 docs/references/databases/delete-table.md delete mode 100644 docs/references/databases/get-column.md delete mode 100644 docs/references/databases/get-row-logs.md delete mode 100644 docs/references/databases/get-row.md delete mode 100644 docs/references/databases/get-table-logs.md delete mode 100644 docs/references/databases/get-table-usage.md delete mode 100644 docs/references/databases/get-table.md delete mode 100644 docs/references/databases/increment-row-column.md delete mode 100644 docs/references/databases/list-columns.md delete mode 100644 docs/references/databases/list-rows.md delete mode 100644 docs/references/databases/list-tables.md delete mode 100644 docs/references/databases/update-boolean-column.md delete mode 100644 docs/references/databases/update-datetime-column.md delete mode 100644 docs/references/databases/update-email-column.md delete mode 100644 docs/references/databases/update-enum-column.md delete mode 100644 docs/references/databases/update-float-column.md delete mode 100644 docs/references/databases/update-integer-column.md delete mode 100644 docs/references/databases/update-ip-column.md delete mode 100644 docs/references/databases/update-relationship-column.md delete mode 100644 docs/references/databases/update-row.md delete mode 100644 docs/references/databases/update-rows.md delete mode 100644 docs/references/databases/update-string-column.md delete mode 100644 docs/references/databases/update-table.md delete mode 100644 docs/references/databases/update-url-column.md delete mode 100644 docs/references/databases/upsert-row.md delete mode 100644 docs/references/databases/upsert-rows.md diff --git a/docs/examples/1.8.x/client-android/java/tables/create-row.md b/docs/examples/1.8.x/client-android/java/tables/create-row.md deleted file mode 100644 index 8102b82c75..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/create-row.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -tables.createRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/tables/create-rows.md b/docs/examples/1.8.x/client-android/java/tables/create-rows.md deleted file mode 100644 index 26f5d67789..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/create-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey(""); // - -Tables tables = new Tables(client); - -tables.createRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // rows - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/tables/delete-row.md b/docs/examples/1.8.x/client-android/java/tables/delete-row.md deleted file mode 100644 index 596a8b7aca..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/delete-row.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Tables tables = new Tables(client); - -tables.deleteRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/tables/get-row.md b/docs/examples/1.8.x/client-android/java/tables/get-row.md deleted file mode 100644 index 882a195376..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/get-row.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Tables tables = new Tables(client); - -tables.getRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/tables/list-rows.md b/docs/examples/1.8.x/client-android/java/tables/list-rows.md deleted file mode 100644 index 4d37570246..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/list-rows.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Tables tables = new Tables(client); - -tables.listRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/tables/update-row.md b/docs/examples/1.8.x/client-android/java/tables/update-row.md deleted file mode 100644 index 0421c9cffb..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/update-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Tables tables = new Tables(client); - -tables.updateRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/tables/upsert-row.md b/docs/examples/1.8.x/client-android/java/tables/upsert-row.md deleted file mode 100644 index a8be0cfc6c..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/upsert-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -tables.upsertRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md deleted file mode 100644 index 8c581bf1d5..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -val tables = Tables(client) - -val result = tables.createRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), - permissions = listOf("read("any")"), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md b/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md deleted file mode 100644 index 1fde9c50cf..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("") // - -val tables = Tables(client) - -val result = tables.createRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rows = listOf(), -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md deleted file mode 100644 index ffa3229f30..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val tables = Tables(client) - -val result = tables.deleteRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md deleted file mode 100644 index 15dabff397..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val tables = Tables(client) - -val result = tables.getRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - queries = listOf(), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md b/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md deleted file mode 100644 index ff36543938..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val tables = Tables(client) - -val result = tables.listRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf(), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md deleted file mode 100644 index e9b515cef4..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val tables = Tables(client) - -val result = tables.updateRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), // (optional) - permissions = listOf("read("any")"), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md deleted file mode 100644 index 6b7cb6666b..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -val tables = Tables(client) - -val result = tables.upsertRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-apple/examples/tables/create-row.md b/docs/examples/1.8.x/client-apple/examples/tables/create-row.md deleted file mode 100644 index 533cf2d555..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -let tables = Tables(client) - -let row = try await tables.createRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md b/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md deleted file mode 100644 index effd748aa0..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("") // - -let tables = Tables(client) - -let rowList = try await tables.createRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: [] -) - diff --git a/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md b/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md deleted file mode 100644 index 7d12ec4f4c..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let tables = Tables(client) - -let result = try await tables.deleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -) - diff --git a/docs/examples/1.8.x/client-apple/examples/tables/get-row.md b/docs/examples/1.8.x/client-apple/examples/tables/get-row.md deleted file mode 100644 index 93fbef9e7c..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/get-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let tables = Tables(client) - -let row = try await tables.getRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md b/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md deleted file mode 100644 index 31545cce4d..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let tables = Tables(client) - -let rowList = try await tables.listRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/client-apple/examples/tables/update-row.md b/docs/examples/1.8.x/client-apple/examples/tables/update-row.md deleted file mode 100644 index 601c4f0a77..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/update-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let tables = Tables(client) - -let row = try await tables.updateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], // optional - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md deleted file mode 100644 index eabcb181c3..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -let tables = Tables(client) - -let row = try await tables.upsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -) - diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md deleted file mode 100644 index ac9923d813..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -Tables tables = Tables(client); - -Row result = await tables.createRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, - permissions: ["read("any")"], // optional -); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md b/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md deleted file mode 100644 index 38c4c7503d..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey(''); // - -Tables tables = Tables(client); - -RowList result = await tables.createRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rows: [], -); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md deleted file mode 100644 index 4187c4766d..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Tables tables = Tables(client); - -await tables.deleteRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', -); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md deleted file mode 100644 index 8d8c52caa6..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Tables tables = Tables(client); - -Row result = await tables.getRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - queries: [], // optional -); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md b/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md deleted file mode 100644 index f770bbbd92..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Tables tables = Tables(client); - -RowList result = await tables.listRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // optional -); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md deleted file mode 100644 index f43ba5e689..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Tables tables = Tables(client); - -Row result = await tables.updateRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, // optional - permissions: ["read("any")"], // optional -); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md deleted file mode 100644 index 26a872b692..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -Tables tables = Tables(client); - -Row result = await tables.upsertRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', -); diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md deleted file mode 100644 index c88a7f36cf..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - tablesCreateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md b/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md deleted file mode 100644 index a4ae62cfae..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - tablesCreateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: [] - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md deleted file mode 100644 index f3a35c1df1..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md +++ /dev/null @@ -1,9 +0,0 @@ -mutation { - tablesDeleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" - ) { - status - } -} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/get-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/get-row.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md b/docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md deleted file mode 100644 index 8449d8499b..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - tablesUpdateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md deleted file mode 100644 index 480d7651bd..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -mutation { - tablesUpsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md deleted file mode 100644 index 75de1c2a39..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const result = await tables.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md b/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md deleted file mode 100644 index 165aa4cb71..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey(''); // - -const tables = new Tables(client); - -const result = await tables.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md deleted file mode 100644 index 9746f85ea0..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md deleted file mode 100644 index b9434e3957..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md b/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md deleted file mode 100644 index 75f81a1435..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md deleted file mode 100644 index 7bb36dd254..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md deleted file mode 100644 index f176425abb..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const result = await tables.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-rest/examples/tables/create-row.md b/docs/examples/1.8.x/client-rest/examples/tables/create-row.md deleted file mode 100644 index c4166b8b80..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/create-row.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - -{ - "rowId": "<ROW_ID>", - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md b/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md deleted file mode 100644 index 0935afd11e..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md +++ /dev/null @@ -1,11 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - -{ - "rows": [] -} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md b/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md deleted file mode 100644 index 954303d17a..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md +++ /dev/null @@ -1,8 +0,0 @@ -DELETE /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - diff --git a/docs/examples/1.8.x/client-rest/examples/tables/get-row.md b/docs/examples/1.8.x/client-rest/examples/tables/get-row.md deleted file mode 100644 index fc09601df7..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/get-row.md +++ /dev/null @@ -1,6 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md b/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md deleted file mode 100644 index de214e7cea..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md +++ /dev/null @@ -1,6 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/tables/update-row.md b/docs/examples/1.8.x/client-rest/examples/tables/update-row.md deleted file mode 100644 index f09f639e60..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/update-row.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - -{ - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md deleted file mode 100644 index 60528077ef..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md +++ /dev/null @@ -1,8 +0,0 @@ -PUT /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - diff --git a/docs/examples/1.8.x/client-web/examples/tables/create-row.md b/docs/examples/1.8.x/client-web/examples/tables/create-row.md deleted file mode 100644 index f7b54d1894..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const result = await tables.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/create-rows.md b/docs/examples/1.8.x/client-web/examples/tables/create-rows.md deleted file mode 100644 index 79d7d3f311..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey(''); // - -const tables = new Tables(client); - -const result = await tables.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/delete-row.md b/docs/examples/1.8.x/client-web/examples/tables/delete-row.md deleted file mode 100644 index 5c6c4b96d9..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/get-row.md b/docs/examples/1.8.x/client-web/examples/tables/get-row.md deleted file mode 100644 index 708b3d96cc..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/list-rows.md b/docs/examples/1.8.x/client-web/examples/tables/list-rows.md deleted file mode 100644 index f82d358f0d..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/update-row.md b/docs/examples/1.8.x/client-web/examples/tables/update-row.md deleted file mode 100644 index 0e0c5a012e..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md deleted file mode 100644 index f111fefd71..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const result = await tables.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md deleted file mode 100644 index 88e6bf8853..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables createBooleanColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md deleted file mode 100644 index de28b7537c..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables createDatetimeColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md deleted file mode 100644 index 23b672e62d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables createEmailColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md deleted file mode 100644 index 4cd3e1d241..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite tables createEnumColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --elements one two three \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md deleted file mode 100644 index 9c69e29e91..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite tables createFloatColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-index.md b/docs/examples/1.8.x/console-cli/examples/tables/create-index.md deleted file mode 100644 index 4c6d641727..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-index.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite tables createIndex \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --type key \ - --columns one two three \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md deleted file mode 100644 index afab48e803..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite tables createIntegerColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md deleted file mode 100644 index 000b54b918..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables createIpColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md deleted file mode 100644 index 4ce3342768..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite tables createRelationshipColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --relatedTableId <RELATED_TABLE_ID> \ - --type oneToOne \ - - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-row.md b/docs/examples/1.8.x/console-cli/examples/tables/create-row.md deleted file mode 100644 index e446de157b..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-row.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite tables createRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - --data '{ "key": "value" }' \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md deleted file mode 100644 index cb7c68dd7b..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables createRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rows one two three diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md deleted file mode 100644 index 4df1792a34..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite tables createStringColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --size 1 \ - --required false \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md deleted file mode 100644 index fcb81491bd..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables createUrlColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create.md b/docs/examples/1.8.x/console-cli/examples/tables/create.md deleted file mode 100644 index 09f52f16a1..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables create \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --name <NAME> \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md deleted file mode 100644 index 73743c21ce..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables decrementRowColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - --column '' \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md deleted file mode 100644 index e659af54d0..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables deleteColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md deleted file mode 100644 index 0de1e417d3..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables deleteIndex \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md deleted file mode 100644 index d6918be89e..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables deleteRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md deleted file mode 100644 index 579586b561..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables deleteRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete.md b/docs/examples/1.8.x/console-cli/examples/tables/delete.md deleted file mode 100644 index 0f189e09f1..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/delete.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite tables delete \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-column.md b/docs/examples/1.8.x/console-cli/examples/tables/get-column.md deleted file mode 100644 index 33a94b5ebc..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/get-column.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables getColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-index.md b/docs/examples/1.8.x/console-cli/examples/tables/get-index.md deleted file mode 100644 index e956175e09..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/get-index.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables getIndex \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-row.md b/docs/examples/1.8.x/console-cli/examples/tables/get-row.md deleted file mode 100644 index 5b3b64bfbc..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/get-row.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite tables getRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md b/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md deleted file mode 100644 index f766a418a0..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables getTableUsage \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md b/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md deleted file mode 100644 index ca955ce6df..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables getUsage \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get.md b/docs/examples/1.8.x/console-cli/examples/tables/get.md deleted file mode 100644 index a41e6c10ed..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/get.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite tables get \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md b/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md deleted file mode 100644 index da73950231..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables incrementRowColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - --column '' \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md b/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md deleted file mode 100644 index 0439d58127..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables listColumns \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md b/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md deleted file mode 100644 index b5fd85b911..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables listIndexes \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md b/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md deleted file mode 100644 index 08c4ff0f8d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables listLogs \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md b/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md deleted file mode 100644 index e7a8c5b8ce..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite tables listRowLogs \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md deleted file mode 100644 index 2a6d69d574..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables listRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list.md b/docs/examples/1.8.x/console-cli/examples/tables/list.md deleted file mode 100644 index 1c58d9ed03..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/list.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables list \ - --databaseId <DATABASE_ID> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md deleted file mode 100644 index 7d736f35e5..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables updateBooleanColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default false \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md deleted file mode 100644 index 3da3e4a919..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables updateDatetimeColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default '' \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md deleted file mode 100644 index df718b8d9a..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables updateEmailColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default email@example.com \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md deleted file mode 100644 index 55c55fc2bd..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite tables updateEnumColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --elements one two three \ - --required false \ - --default <DEFAULT> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md deleted file mode 100644 index 99667a8447..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite tables updateFloatColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default null \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md deleted file mode 100644 index 098efa0e3e..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite tables updateIntegerColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default null \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md deleted file mode 100644 index 50eadc3fff..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables updateIpColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default '' \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md deleted file mode 100644 index 43e0c0ae6e..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite tables updateRelationshipColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-row.md b/docs/examples/1.8.x/console-cli/examples/tables/update-row.md deleted file mode 100644 index d5cd0fe4ee..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-row.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite tables updateRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md deleted file mode 100644 index 173d608d5a..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite tables updateRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md deleted file mode 100644 index 3feaa734ec..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite tables updateStringColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default <DEFAULT> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md deleted file mode 100644 index 2df1ab14d7..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables updateUrlColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default https://example.com \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update.md b/docs/examples/1.8.x/console-cli/examples/tables/update.md deleted file mode 100644 index a1550287c8..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables update \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --name <NAME> \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md b/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md deleted file mode 100644 index 0281a89b20..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables upsertRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md deleted file mode 100644 index 828caf8f10..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite tables upsertRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md deleted file mode 100644 index bf0cca08c1..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md deleted file mode 100644 index c9eb3af82c..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md deleted file mode 100644 index 3952161779..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md deleted file mode 100644 index 7b16da6c14..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md deleted file mode 100644 index 6608864efe..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-index.md b/docs/examples/1.8.x/console-web/examples/tables/create-index.md deleted file mode 100644 index c303dd289d..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-index.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables, IndexType } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - IndexType.Key, // type - [], // columns - [], // orders (optional) - [] // lengths (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md deleted file mode 100644 index 0490b71189..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md deleted file mode 100644 index 644f520032..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md deleted file mode 100644 index 5658eec690..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Tables, RelationshipType, RelationMutate } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<RELATED_TABLE_ID>', // relatedTableId - RelationshipType.OneToOne, // type - false, // twoWay (optional) - '', // key (optional) - '', // twoWayKey (optional) - RelationMutate.Cascade // onDelete (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-row.md b/docs/examples/1.8.x/console-web/examples/tables/create-row.md deleted file mode 100644 index ba18cb6fba..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const result = await tables.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-rows.md b/docs/examples/1.8.x/console-web/examples/tables/create-rows.md deleted file mode 100644 index bd7f984ee3..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const result = await tables.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md deleted file mode 100644 index 6c1fbd7c99..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - 1, // size - false, // required - '<DEFAULT>', // default (optional) - false, // array (optional) - false // encrypt (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md deleted file mode 100644 index 88e1fc584d..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create.md b/docs/examples/1.8.x/console-web/examples/tables/create.md deleted file mode 100644 index a7bda74508..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.create( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md deleted file mode 100644 index 35cb78686c..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.decrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // min (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-column.md b/docs/examples/1.8.x/console-web/examples/tables/delete-column.md deleted file mode 100644 index 642856448a..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/delete-column.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.deleteColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-index.md b/docs/examples/1.8.x/console-web/examples/tables/delete-index.md deleted file mode 100644 index f517513909..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/delete-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.deleteIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-row.md b/docs/examples/1.8.x/console-web/examples/tables/delete-row.md deleted file mode 100644 index accbb3092a..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md b/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md deleted file mode 100644 index adbb613a35..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.deleteRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete.md b/docs/examples/1.8.x/console-web/examples/tables/delete.md deleted file mode 100644 index f235d8dda0..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.delete( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-column.md b/docs/examples/1.8.x/console-web/examples/tables/get-column.md deleted file mode 100644 index 7bd7f2db30..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/get-column.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-index.md b/docs/examples/1.8.x/console-web/examples/tables/get-index.md deleted file mode 100644 index dc8c3362cf..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/get-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-row.md b/docs/examples/1.8.x/console-web/examples/tables/get-row.md deleted file mode 100644 index f37558d4ff..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md b/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md deleted file mode 100644 index 4e6ca3270d..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables, } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getTableUsage( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - .24h // range (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-usage.md b/docs/examples/1.8.x/console-web/examples/tables/get-usage.md deleted file mode 100644 index 0f9d31c92d..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/get-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables, DatabaseUsageRange } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getUsage( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - DatabaseUsageRange.TwentyFourHours // range (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get.md b/docs/examples/1.8.x/console-web/examples/tables/get.md deleted file mode 100644 index 2b8951582a..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/get.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.get( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md b/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md deleted file mode 100644 index ed9710a0e3..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.incrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // max (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-columns.md b/docs/examples/1.8.x/console-web/examples/tables/list-columns.md deleted file mode 100644 index 91348c4e61..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/list-columns.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listColumns( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md b/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md deleted file mode 100644 index 0ae874663d..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listIndexes( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-logs.md b/docs/examples/1.8.x/console-web/examples/tables/list-logs.md deleted file mode 100644 index 04d6c2300c..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/list-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listLogs( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md b/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md deleted file mode 100644 index 691e589a77..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listRowLogs( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-rows.md b/docs/examples/1.8.x/console-web/examples/tables/list-rows.md deleted file mode 100644 index 79f5e242a5..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list.md b/docs/examples/1.8.x/console-web/examples/tables/list.md deleted file mode 100644 index e8eb3c3dd6..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/list.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.list( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md deleted file mode 100644 index e4bb9012e6..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md deleted file mode 100644 index d24683aafb..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md deleted file mode 100644 index b9e2483191..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md deleted file mode 100644 index bfe084212c..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md deleted file mode 100644 index 9075e31e69..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md deleted file mode 100644 index c45e4735a9..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md deleted file mode 100644 index f7cdb490dc..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md deleted file mode 100644 index 192eac7175..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables, RelationMutate } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-row.md b/docs/examples/1.8.x/console-web/examples/tables/update-row.md deleted file mode 100644 index 0db00657c2..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-rows.md b/docs/examples/1.8.x/console-web/examples/tables/update-rows.md deleted file mode 100644 index 72b2244f75..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - {}, // data (optional) - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md deleted file mode 100644 index 8f6b3b5dad..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '<DEFAULT>', // default - 1, // size (optional) - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md deleted file mode 100644 index a2cb65d700..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update.md b/docs/examples/1.8.x/console-web/examples/tables/update.md deleted file mode 100644 index f0552604af..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.update( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md b/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md deleted file mode 100644 index f1cb65e675..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const result = await tables.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md b/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md deleted file mode 100644 index 2d818cdbca..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const result = await tables.upsertRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); - -console.log(result); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md deleted file mode 100644 index 5b3e987b9b..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnBoolean result = await tables.createBooleanColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: false, // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md deleted file mode 100644 index 1ad3fa250d..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnDatetime result = await tables.createDatetimeColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md deleted file mode 100644 index fa7ec71410..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnEmail result = await tables.createEmailColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 'email@example.com', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md deleted file mode 100644 index 5ab6bcc774..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnEnum result = await tables.createEnumColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - elements: [], - xrequired: false, - xdefault: '<DEFAULT>', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md deleted file mode 100644 index 43331187ea..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnFloat result = await tables.createFloatColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - min: 0, // (optional) - max: 0, // (optional) - xdefault: 0, // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-index.md b/docs/examples/1.8.x/server-dart/examples/tables/create-index.md deleted file mode 100644 index d76c46959f..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-index.md +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnIndex result = await tables.createIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - type: IndexType.key, - columns: [], - orders: [], // (optional) - lengths: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md deleted file mode 100644 index 3304325af7..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnInteger result = await tables.createIntegerColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - min: 0, // (optional) - max: 0, // (optional) - xdefault: 0, // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md deleted file mode 100644 index 68c7abf754..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnIp result = await tables.createIpColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md deleted file mode 100644 index a059740bf8..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnRelationship result = await tables.createRelationshipColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - relatedTableId: '<RELATED_TABLE_ID>', - type: RelationshipType.oneToOne, - twoWay: false, // (optional) - key: '', // (optional) - twoWayKey: '', // (optional) - onDelete: RelationMutate.cascade, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-row.md b/docs/examples/1.8.x/server-dart/examples/tables/create-row.md deleted file mode 100644 index 1ce1e1db7a..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -Tables tables = Tables(client); - -Row result = await tables.createRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, - permissions: ["read("any")"], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md deleted file mode 100644 index 219f2d2d33..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -RowList result = await tables.createRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rows: [], -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md deleted file mode 100644 index 17e192b27e..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnString result = await tables.createStringColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - size: 1, - xrequired: false, - xdefault: '<DEFAULT>', // (optional) - array: false, // (optional) - encrypt: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md deleted file mode 100644 index d3692fc7ac..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnUrl result = await tables.createUrlColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 'https://example.com', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create.md b/docs/examples/1.8.x/server-dart/examples/tables/create.md deleted file mode 100644 index c3a4b2a989..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -Table result = await tables.create( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], // (optional) - rowSecurity: false, // (optional) - enabled: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md deleted file mode 100644 index 33d296110c..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -Row result = await tables.decrementRowColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - column: '', - value: 0, // (optional) - min: 0, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md deleted file mode 100644 index 466564f618..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -await tables.deleteColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md deleted file mode 100644 index f2dfdbe74b..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -await tables.deleteIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md deleted file mode 100644 index b84c1b7a9f..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Tables tables = Tables(client); - -await tables.deleteRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md deleted file mode 100644 index 41dc3a9520..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -await tables.deleteRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete.md b/docs/examples/1.8.x/server-dart/examples/tables/delete.md deleted file mode 100644 index 07c9815422..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/delete.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -await tables.delete( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-column.md b/docs/examples/1.8.x/server-dart/examples/tables/get-column.md deleted file mode 100644 index 087139c87d..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/get-column.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - - result = await tables.getColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-index.md b/docs/examples/1.8.x/server-dart/examples/tables/get-index.md deleted file mode 100644 index 3f79deef2f..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/get-index.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnIndex result = await tables.getIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-row.md b/docs/examples/1.8.x/server-dart/examples/tables/get-row.md deleted file mode 100644 index 7efd04a69d..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/get-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Tables tables = Tables(client); - -Row result = await tables.getRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get.md b/docs/examples/1.8.x/server-dart/examples/tables/get.md deleted file mode 100644 index d02f9ff9d2..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/get.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -Table result = await tables.get( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md deleted file mode 100644 index 188ab5d1ad..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -Row result = await tables.incrementRowColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - column: '', - value: 0, // (optional) - max: 0, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md b/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md deleted file mode 100644 index 7b2d479ea3..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnList result = await tables.listColumns( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md deleted file mode 100644 index e7418de3bc..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnIndexList result = await tables.listIndexes( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md deleted file mode 100644 index 05f9567ac2..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Tables tables = Tables(client); - -RowList result = await tables.listRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list.md b/docs/examples/1.8.x/server-dart/examples/tables/list.md deleted file mode 100644 index 51a19c099d..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/list.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -TableList result = await tables.list( - databaseId: '<DATABASE_ID>', - queries: [], // (optional) - search: '<SEARCH>', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md deleted file mode 100644 index c452238d7c..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnBoolean result = await tables.updateBooleanColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: false, - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md deleted file mode 100644 index 5b41d7e532..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnDatetime result = await tables.updateDatetimeColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md deleted file mode 100644 index 444649a4fd..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnEmail result = await tables.updateEmailColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 'email@example.com', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md deleted file mode 100644 index 2e0566418a..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnEnum result = await tables.updateEnumColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - elements: [], - xrequired: false, - xdefault: '<DEFAULT>', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md deleted file mode 100644 index 199d3840d6..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnFloat result = await tables.updateFloatColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 0, - min: 0, // (optional) - max: 0, // (optional) - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md deleted file mode 100644 index 479e63d870..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnInteger result = await tables.updateIntegerColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 0, - min: 0, // (optional) - max: 0, // (optional) - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md deleted file mode 100644 index 837ae4e606..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnIp result = await tables.updateIpColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md deleted file mode 100644 index 45745627ef..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnRelationship result = await tables.updateRelationshipColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - onDelete: RelationMutate.cascade, // (optional) - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-row.md b/docs/examples/1.8.x/server-dart/examples/tables/update-row.md deleted file mode 100644 index 436329235a..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Tables tables = Tables(client); - -Row result = await tables.updateRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, // (optional) - permissions: ["read("any")"], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md deleted file mode 100644 index 3d2aaf3e28..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -RowList result = await tables.updateRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - data: {}, // (optional) - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md deleted file mode 100644 index dbd569feac..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnString result = await tables.updateStringColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '<DEFAULT>', - size: 1, // (optional) - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md deleted file mode 100644 index 8630c718b5..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnUrl result = await tables.updateUrlColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 'https://example.com', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update.md b/docs/examples/1.8.x/server-dart/examples/tables/update.md deleted file mode 100644 index 28ce03cd6c..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -Table result = await tables.update( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], // (optional) - rowSecurity: false, // (optional) - enabled: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md deleted file mode 100644 index 47f93f2434..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -Tables tables = Tables(client); - -Row result = await tables.upsertRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md deleted file mode 100644 index 73ceffa917..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -RowList result = await tables.upsertRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md deleted file mode 100644 index 3f9abc8c05..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md deleted file mode 100644 index 898b67a787..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md deleted file mode 100644 index 82872e4087..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md deleted file mode 100644 index afbb8d00aa..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md deleted file mode 100644 index 44658bbaa9..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-index.md b/docs/examples/1.8.x/server-deno/examples/tables/create-index.md deleted file mode 100644 index c255189881..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-index.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables, IndexType } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - IndexType.Key, // type - [], // columns - [], // orders (optional) - [] // lengths (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md deleted file mode 100644 index 0f1721b24a..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md deleted file mode 100644 index ca96de6293..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md deleted file mode 100644 index 8c7e26e62c..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<RELATED_TABLE_ID>', // relatedTableId - RelationshipType.OneToOne, // type - false, // twoWay (optional) - '', // key (optional) - '', // twoWayKey (optional) - RelationMutate.Cascade // onDelete (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-row.md b/docs/examples/1.8.x/server-deno/examples/tables/create-row.md deleted file mode 100644 index 12cec49af0..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const response = await tables.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md deleted file mode 100644 index 6c4f7d5627..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md deleted file mode 100644 index db7ac8a760..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - 1, // size - false, // required - '<DEFAULT>', // default (optional) - false, // array (optional) - false // encrypt (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md deleted file mode 100644 index 8d6f127c00..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create.md b/docs/examples/1.8.x/server-deno/examples/tables/create.md deleted file mode 100644 index 9c75c22c3d..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.create( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md deleted file mode 100644 index e561acc529..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.decrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // min (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md deleted file mode 100644 index 89900bfbf0..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.deleteColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md deleted file mode 100644 index a17791cef2..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.deleteIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md deleted file mode 100644 index 8f30eae2d2..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new Tables(client); - -const response = await tables.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md deleted file mode 100644 index c5aa88f9a2..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.deleteRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete.md b/docs/examples/1.8.x/server-deno/examples/tables/delete.md deleted file mode 100644 index 36df1373dc..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/delete.md +++ /dev/null @@ -1,13 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.delete( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-column.md b/docs/examples/1.8.x/server-deno/examples/tables/get-column.md deleted file mode 100644 index 8a56af67e7..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/get-column.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.getColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-index.md b/docs/examples/1.8.x/server-deno/examples/tables/get-index.md deleted file mode 100644 index 61105dc661..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/get-index.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.getIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-row.md b/docs/examples/1.8.x/server-deno/examples/tables/get-row.md deleted file mode 100644 index 674ea3e648..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/get-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new Tables(client); - -const response = await tables.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get.md b/docs/examples/1.8.x/server-deno/examples/tables/get.md deleted file mode 100644 index cc1dcb8c51..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/get.md +++ /dev/null @@ -1,13 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.get( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md deleted file mode 100644 index 9779d8776e..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.incrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // max (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md b/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md deleted file mode 100644 index 63ec0777bb..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.listColumns( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md deleted file mode 100644 index 587d19f362..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.listIndexes( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md deleted file mode 100644 index 6db6bea439..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new Tables(client); - -const response = await tables.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list.md b/docs/examples/1.8.x/server-deno/examples/tables/list.md deleted file mode 100644 index d4da8409c9..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/list.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.list( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md deleted file mode 100644 index 8710c27ede..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md deleted file mode 100644 index e1ca760e31..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md deleted file mode 100644 index b0e25348d4..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md deleted file mode 100644 index 8771213a79..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md deleted file mode 100644 index a2e6f55c1f..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md deleted file mode 100644 index 51ea17f943..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md deleted file mode 100644 index 4a5a1d0f81..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md deleted file mode 100644 index c83b82037a..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-row.md b/docs/examples/1.8.x/server-deno/examples/tables/update-row.md deleted file mode 100644 index 13da5615e7..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new Tables(client); - -const response = await tables.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md deleted file mode 100644 index 1bc0a18b98..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - {}, // data (optional) - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md deleted file mode 100644 index 00dd310b1e..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '<DEFAULT>', // default - 1, // size (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md deleted file mode 100644 index 2ebf80a356..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update.md b/docs/examples/1.8.x/server-deno/examples/tables/update.md deleted file mode 100644 index 43b51bd284..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.update( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md deleted file mode 100644 index 45e932c7f6..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const response = await tables.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md deleted file mode 100644 index 9e3f542051..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md +++ /dev/null @@ -1,13 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.upsertRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md deleted file mode 100644 index 1492487721..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnBoolean result = await tables.CreateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md deleted file mode 100644 index 6a1e07b907..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnDatetime result = await tables.CreateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md deleted file mode 100644 index a4740484f5..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnEmail result = await tables.CreateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md deleted file mode 100644 index 9529ad1331..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnEnum result = await tables.CreateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: new List<string>(), - required: false, - default: "<DEFAULT>", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md deleted file mode 100644 index f8146ce272..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnFloat result = await tables.CreateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, // optional - max: 0, // optional - default: 0, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md deleted file mode 100644 index 4ea3817da2..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Enums; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnIndex result = await tables.CreateIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - type: IndexType.Key, - columns: new List<string>(), - orders: new List<string>(), // optional - lengths: new List<long>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md deleted file mode 100644 index 6090426792..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnInteger result = await tables.CreateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, // optional - max: 0, // optional - default: 0, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md deleted file mode 100644 index b5e5067e6f..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnIp result = await tables.CreateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md deleted file mode 100644 index 7c4cba49dd..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,22 +0,0 @@ -using Appwrite; -using Appwrite.Enums; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnRelationship result = await tables.CreateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - relatedTableId: "<RELATED_TABLE_ID>", - type: RelationshipType.OneToOne, - twoWay: false, // optional - key: "", // optional - twoWayKey: "", // optional - onDelete: RelationMutate.Cascade // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md deleted file mode 100644 index 642bfe457c..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetSession("") // The user session to authenticate with - .SetKey("<YOUR_API_KEY>") // Your secret API key - .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -Row result = await tables.CreateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [object], - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md deleted file mode 100644 index 1d44dc51ed..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetAdmin("") // - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -RowList result = await tables.CreateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: new List<object>() -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md deleted file mode 100644 index e623ac0789..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnString result = await tables.CreateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - size: 1, - required: false, - default: "<DEFAULT>", // optional - array: false, // optional - encrypt: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md deleted file mode 100644 index 7a0fbd0a83..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnUrl result = await tables.CreateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create.md deleted file mode 100644 index 694f4101a7..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -Table result = await tables.Create( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md deleted file mode 100644 index 220fb2b18a..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -Row result = await tables.DecrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, // optional - min: 0 // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md deleted file mode 100644 index ca8987eec9..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -await tables.DeleteColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md deleted file mode 100644 index ba7a024167..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -await tables.DeleteIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md deleted file mode 100644 index 95bae6ad6b..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -await tables.DeleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md deleted file mode 100644 index 46a6e0ba94..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -await tables.DeleteRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md deleted file mode 100644 index bcff3ea05a..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -await tables.Delete( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md deleted file mode 100644 index 71ebb81aef..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - - result = await tables.GetColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md deleted file mode 100644 index f5b886e3e9..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnIndex result = await tables.GetIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md deleted file mode 100644 index 474b3342c9..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md +++ /dev/null @@ -1,17 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -Row result = await tables.GetRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get.md deleted file mode 100644 index 1e86d228a6..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/get.md +++ /dev/null @@ -1,15 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -Table result = await tables.Get( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md deleted file mode 100644 index e8ccd8ca78..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -Row result = await tables.IncrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, // optional - max: 0 // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md deleted file mode 100644 index fe8c739cf9..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnList result = await tables.ListColumns( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md deleted file mode 100644 index 907a21048f..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnIndexList result = await tables.ListIndexes( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md deleted file mode 100644 index 474c597a1c..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -RowList result = await tables.ListRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list.md deleted file mode 100644 index 2871a927c4..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/list.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -TableList result = await tables.List( - databaseId: "<DATABASE_ID>", - queries: new List<string>(), // optional - search: "<SEARCH>" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md deleted file mode 100644 index 5c610fbe7a..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnBoolean result = await tables.UpdateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md deleted file mode 100644 index 754d0f1ae6..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnDatetime result = await tables.UpdateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md deleted file mode 100644 index 6000c54e8f..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnEmail result = await tables.UpdateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md deleted file mode 100644 index 2eaa1a51a1..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnEnum result = await tables.UpdateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: new List<string>(), - required: false, - default: "<DEFAULT>", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md deleted file mode 100644 index 7d18d8e624..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnFloat result = await tables.UpdateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, // optional - max: 0, // optional - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md deleted file mode 100644 index 0b3b85652c..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnInteger result = await tables.UpdateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, // optional - max: 0, // optional - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md deleted file mode 100644 index ccdd0d5235..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnIp result = await tables.UpdateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md deleted file mode 100644 index be6aa31f73..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Enums; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnRelationship result = await tables.UpdateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - onDelete: RelationMutate.Cascade, // optional - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md deleted file mode 100644 index d049ccf805..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -Row result = await tables.UpdateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [object], // optional - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md deleted file mode 100644 index 9d2c51c4b3..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -RowList result = await tables.UpdateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - data: [object], // optional - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md deleted file mode 100644 index da280e7d8c..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnString result = await tables.UpdateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "<DEFAULT>", - size: 1, // optional - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md deleted file mode 100644 index 1ce961da2b..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnUrl result = await tables.UpdateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update.md deleted file mode 100644 index 584c61c6bb..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -Table result = await tables.Update( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md deleted file mode 100644 index a73c4e2402..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetSession("") // The user session to authenticate with - .SetKey("<YOUR_API_KEY>") // Your secret API key - .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -Row result = await tables.UpsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md deleted file mode 100644 index 07e5e927c6..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetAdmin("") // - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -RowList result = await tables.UpsertRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md deleted file mode 100644 index 70a666257f..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateBooleanColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateBooleanColumnDefault(false), - tables.WithCreateBooleanColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md deleted file mode 100644 index beb8bd09e6..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateDatetimeColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateDatetimeColumnDefault(""), - tables.WithCreateDatetimeColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md deleted file mode 100644 index 449cc0e88a..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateEmailColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateEmailColumnDefault("email@example.com"), - tables.WithCreateEmailColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md deleted file mode 100644 index 8f3bb84bb7..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateEnumColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - []interface{}{}, - false, - tables.WithCreateEnumColumnDefault("<DEFAULT>"), - tables.WithCreateEnumColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md deleted file mode 100644 index eeabd851b9..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateFloatColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateFloatColumnMin(0), - tables.WithCreateFloatColumnMax(0), - tables.WithCreateFloatColumnDefault(0), - tables.WithCreateFloatColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-index.md b/docs/examples/1.8.x/server-go/examples/tables/create-index.md deleted file mode 100644 index 1737b29f6f..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-index.md +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateIndex( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - "key", - []interface{}{}, - tables.WithCreateIndexOrders([]interface{}{}), - tables.WithCreateIndexLengths([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md deleted file mode 100644 index 45a81f6415..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateIntegerColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateIntegerColumnMin(0), - tables.WithCreateIntegerColumnMax(0), - tables.WithCreateIntegerColumnDefault(0), - tables.WithCreateIntegerColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md deleted file mode 100644 index f6d203d65e..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateIpColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateIpColumnDefault(""), - tables.WithCreateIpColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md deleted file mode 100644 index e2e6de59de..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateRelationshipColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "<RELATED_TABLE_ID>", - "oneToOne", - tables.WithCreateRelationshipColumnTwoWay(false), - tables.WithCreateRelationshipColumnKey(""), - tables.WithCreateRelationshipColumnTwoWayKey(""), - tables.WithCreateRelationshipColumnOnDelete("cascade"), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-row.md b/docs/examples/1.8.x/server-go/examples/tables/create-row.md deleted file mode 100644 index 329f2a1c9c..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-row.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithSession("") // The user session to authenticate with - client.WithKey("<YOUR_API_KEY>") // Your secret API key - client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token - ) - - service := tables.New(client) - response, error := service.CreateRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - map[string]interface{}{}, - tables.WithCreateRowPermissions(interface{}{"read("any")"}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-rows.md b/docs/examples/1.8.x/server-go/examples/tables/create-rows.md deleted file mode 100644 index 7d32206bea..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-rows.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithAdmin("") // - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateRows( - "<DATABASE_ID>", - "<TABLE_ID>", - []interface{}{}, - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md deleted file mode 100644 index afb41e2728..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateStringColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - 1, - false, - tables.WithCreateStringColumnDefault("<DEFAULT>"), - tables.WithCreateStringColumnArray(false), - tables.WithCreateStringColumnEncrypt(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md deleted file mode 100644 index c4e30e30cd..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateUrlColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateUrlColumnDefault("https://example.com"), - tables.WithCreateUrlColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create.md b/docs/examples/1.8.x/server-go/examples/tables/create.md deleted file mode 100644 index 672824daa6..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.Create( - "<DATABASE_ID>", - "<TABLE_ID>", - "<NAME>", - tables.WithCreatePermissions(interface{}{"read("any")"}), - tables.WithCreateRowSecurity(false), - tables.WithCreateEnabled(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md deleted file mode 100644 index 8ef1d26a59..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.DecrementRowColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - "", - tables.WithDecrementRowColumnValue(0), - tables.WithDecrementRowColumnMin(0), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-column.md b/docs/examples/1.8.x/server-go/examples/tables/delete-column.md deleted file mode 100644 index f66fc199c3..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/delete-column.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.DeleteColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-index.md b/docs/examples/1.8.x/server-go/examples/tables/delete-index.md deleted file mode 100644 index 1dddeef4e8..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/delete-index.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.DeleteIndex( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-row.md b/docs/examples/1.8.x/server-go/examples/tables/delete-row.md deleted file mode 100644 index 9f55934e41..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/delete-row.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := tables.New(client) - response, error := service.DeleteRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md deleted file mode 100644 index 3ad38f8067..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.DeleteRows( - "<DATABASE_ID>", - "<TABLE_ID>", - tables.WithDeleteRowsQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete.md b/docs/examples/1.8.x/server-go/examples/tables/delete.md deleted file mode 100644 index 9637acc51d..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/delete.md +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.Delete( - "<DATABASE_ID>", - "<TABLE_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-column.md b/docs/examples/1.8.x/server-go/examples/tables/get-column.md deleted file mode 100644 index 292d22800e..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/get-column.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.GetColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-index.md b/docs/examples/1.8.x/server-go/examples/tables/get-index.md deleted file mode 100644 index 077e823195..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/get-index.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.GetIndex( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-row.md b/docs/examples/1.8.x/server-go/examples/tables/get-row.md deleted file mode 100644 index a224c60d98..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/get-row.md +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := tables.New(client) - response, error := service.GetRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - tables.WithGetRowQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get.md b/docs/examples/1.8.x/server-go/examples/tables/get.md deleted file mode 100644 index 60304a8fd0..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/get.md +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.Get( - "<DATABASE_ID>", - "<TABLE_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md deleted file mode 100644 index 5d8b2f5578..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.IncrementRowColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - "", - tables.WithIncrementRowColumnValue(0), - tables.WithIncrementRowColumnMax(0), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-columns.md b/docs/examples/1.8.x/server-go/examples/tables/list-columns.md deleted file mode 100644 index 25712ef2a7..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/list-columns.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.ListColumns( - "<DATABASE_ID>", - "<TABLE_ID>", - tables.WithListColumnsQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md deleted file mode 100644 index 0be8e81164..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.ListIndexes( - "<DATABASE_ID>", - "<TABLE_ID>", - tables.WithListIndexesQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-rows.md b/docs/examples/1.8.x/server-go/examples/tables/list-rows.md deleted file mode 100644 index aadbcf1dad..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/list-rows.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := tables.New(client) - response, error := service.ListRows( - "<DATABASE_ID>", - "<TABLE_ID>", - tables.WithListRowsQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list.md b/docs/examples/1.8.x/server-go/examples/tables/list.md deleted file mode 100644 index 1942b7a2d2..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/list.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.List( - "<DATABASE_ID>", - tables.WithListQueries([]interface{}{}), - tables.WithListSearch("<SEARCH>"), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md deleted file mode 100644 index c76c3bb1cc..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateBooleanColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - false, - tables.WithUpdateBooleanColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md deleted file mode 100644 index e093904ad5..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateDatetimeColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "", - tables.WithUpdateDatetimeColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md deleted file mode 100644 index 08845b5149..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateEmailColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "email@example.com", - tables.WithUpdateEmailColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md deleted file mode 100644 index e639f850ba..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateEnumColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - []interface{}{}, - false, - "<DEFAULT>", - tables.WithUpdateEnumColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md deleted file mode 100644 index 83fa3777c2..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateFloatColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - 0, - tables.WithUpdateFloatColumnMin(0), - tables.WithUpdateFloatColumnMax(0), - tables.WithUpdateFloatColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md deleted file mode 100644 index 5bbea02709..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateIntegerColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - 0, - tables.WithUpdateIntegerColumnMin(0), - tables.WithUpdateIntegerColumnMax(0), - tables.WithUpdateIntegerColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md deleted file mode 100644 index f67711aaed..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateIpColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "", - tables.WithUpdateIpColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md deleted file mode 100644 index 1ec20edbb6..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateRelationshipColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - tables.WithUpdateRelationshipColumnOnDelete("cascade"), - tables.WithUpdateRelationshipColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-row.md b/docs/examples/1.8.x/server-go/examples/tables/update-row.md deleted file mode 100644 index 8ef1189769..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-row.md +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := tables.New(client) - response, error := service.UpdateRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - tables.WithUpdateRowData(map[string]interface{}{}), - tables.WithUpdateRowPermissions(interface{}{"read("any")"}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-rows.md b/docs/examples/1.8.x/server-go/examples/tables/update-rows.md deleted file mode 100644 index 7579e32851..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-rows.md +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateRows( - "<DATABASE_ID>", - "<TABLE_ID>", - tables.WithUpdateRowsData(map[string]interface{}{}), - tables.WithUpdateRowsQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md deleted file mode 100644 index 0a21b05e19..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateStringColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "<DEFAULT>", - tables.WithUpdateStringColumnSize(1), - tables.WithUpdateStringColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md deleted file mode 100644 index aeb0541648..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateUrlColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "https://example.com", - tables.WithUpdateUrlColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update.md b/docs/examples/1.8.x/server-go/examples/tables/update.md deleted file mode 100644 index 7a75c10713..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.Update( - "<DATABASE_ID>", - "<TABLE_ID>", - "<NAME>", - tables.WithUpdatePermissions(interface{}{"read("any")"}), - tables.WithUpdateRowSecurity(false), - tables.WithUpdateEnabled(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md deleted file mode 100644 index 9bc9f00f8b..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithSession("") // The user session to authenticate with - client.WithKey("<YOUR_API_KEY>") // Your secret API key - client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token - ) - - service := tables.New(client) - response, error := service.UpsertRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md deleted file mode 100644 index bc5a4db007..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithAdmin("") // - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpsertRows( - "<DATABASE_ID>", - "<TABLE_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md deleted file mode 100644 index 564b1a964c..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,20 +0,0 @@ -mutation { - tablesCreateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md deleted file mode 100644 index 34055c27fa..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesCreateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md deleted file mode 100644 index a45001d0be..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesCreateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md deleted file mode 100644 index 5d1c516e3a..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md +++ /dev/null @@ -1,23 +0,0 @@ -mutation { - tablesCreateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: [], - required: false, - default: "<DEFAULT>", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - elements - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md deleted file mode 100644 index 09bf481a33..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - tablesCreateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, - max: 0, - default: 0, - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - min - max - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md deleted file mode 100644 index bc47403c64..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesCreateIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - type: "key", - columns: [], - orders: [], - lengths: [] - ) { - key - type - status - error - columns - lengths - orders - _createdAt - _updatedAt - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md deleted file mode 100644 index 04273b18b5..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - tablesCreateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, - max: 0, - default: 0, - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - min - max - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md deleted file mode 100644 index c2f07c760b..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesCreateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md deleted file mode 100644 index 8e56bd3867..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,27 +0,0 @@ -mutation { - tablesCreateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - relatedTableId: "<RELATED_TABLE_ID>", - type: "oneToOne", - twoWay: false, - key: "", - twoWayKey: "", - onDelete: "cascade" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - relatedTable - relationType - twoWay - twoWayKey - onDelete - side - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md deleted file mode 100644 index c88a7f36cf..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - tablesCreateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md deleted file mode 100644 index a4ae62cfae..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - tablesCreateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: [] - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md deleted file mode 100644 index b0b11c2610..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - tablesCreateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - size: 1, - required: false, - default: "<DEFAULT>", - array: false, - encrypt: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - size - default - encrypt - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md deleted file mode 100644 index 134208b432..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesCreateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create.md b/docs/examples/1.8.x/server-graphql/examples/tables/create.md deleted file mode 100644 index 73af2c4a8c..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create.md +++ /dev/null @@ -1,31 +0,0 @@ -mutation { - tablesCreate( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], - rowSecurity: false, - enabled: false - ) { - _id - _createdAt - _updatedAt - _permissions - databaseId - name - enabled - rowSecurity - columns - indexes { - key - type - status - error - columns - lengths - orders - _createdAt - _updatedAt - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md deleted file mode 100644 index 4ee58849ff..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - tablesDecrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, - min: 0 - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md deleted file mode 100644 index 2c2ab098d6..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md +++ /dev/null @@ -1,9 +0,0 @@ -mutation { - tablesDeleteColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md deleted file mode 100644 index c95db41fd6..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md +++ /dev/null @@ -1,9 +0,0 @@ -mutation { - tablesDeleteIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md deleted file mode 100644 index f3a35c1df1..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md +++ /dev/null @@ -1,9 +0,0 @@ -mutation { - tablesDeleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md deleted file mode 100644 index 1ee227b7e5..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - tablesDeleteRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete.md deleted file mode 100644 index 1749422f6a..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/delete.md +++ /dev/null @@ -1,8 +0,0 @@ -mutation { - tablesDelete( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-column.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-index.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-row.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get.md b/docs/examples/1.8.x/server-graphql/examples/tables/get.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md deleted file mode 100644 index f84f149672..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - tablesIncrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, - max: 0 - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list.md b/docs/examples/1.8.x/server-graphql/examples/tables/list.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md deleted file mode 100644 index 541abd97cc..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,20 +0,0 @@ -mutation { - tablesUpdateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md deleted file mode 100644 index 01714377a4..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesUpdateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md deleted file mode 100644 index ffb3a21e66..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesUpdateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md deleted file mode 100644 index 45ddb00d6f..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md +++ /dev/null @@ -1,23 +0,0 @@ -mutation { - tablesUpdateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: [], - required: false, - default: "<DEFAULT>", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - elements - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md deleted file mode 100644 index f592a53858..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - tablesUpdateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, - max: 0, - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - min - max - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md deleted file mode 100644 index a51f02d4d7..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - tablesUpdateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, - max: 0, - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - min - max - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md deleted file mode 100644 index c353c79105..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesUpdateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md deleted file mode 100644 index e94800345b..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - tablesUpdateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - onDelete: "cascade", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - relatedTable - relationType - twoWay - twoWayKey - onDelete - side - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md deleted file mode 100644 index 8449d8499b..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - tablesUpdateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md deleted file mode 100644 index 510648f6e1..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md +++ /dev/null @@ -1,20 +0,0 @@ -mutation { - tablesUpdateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - data: "{}", - queries: [] - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md deleted file mode 100644 index 0771d9a6af..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md +++ /dev/null @@ -1,23 +0,0 @@ -mutation { - tablesUpdateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "<DEFAULT>", - size: 1, - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - size - default - encrypt - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md deleted file mode 100644 index a5c4a4432d..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesUpdateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update.md b/docs/examples/1.8.x/server-graphql/examples/tables/update.md deleted file mode 100644 index 4aa434c3ed..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update.md +++ /dev/null @@ -1,31 +0,0 @@ -mutation { - tablesUpdate( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], - rowSecurity: false, - enabled: false - ) { - _id - _createdAt - _updatedAt - _permissions - databaseId - name - enabled - rowSecurity - columns - indexes { - key - type - status - error - columns - lengths - orders - _createdAt - _updatedAt - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md deleted file mode 100644 index 480d7651bd..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -mutation { - tablesUpsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md deleted file mode 100644 index 6015470c16..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - tablesUpsertRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md deleted file mode 100644 index 2336ee90e0..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createBooleanColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - false, // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md deleted file mode 100644 index dd3df83dbf..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createDatetimeColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md deleted file mode 100644 index 3b130d1ecd..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createEmailColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "email@example.com", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md deleted file mode 100644 index 73c6e1c7de..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createEnumColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - listOf(), // elements - false, // required - "<DEFAULT>", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md deleted file mode 100644 index dd6f207ff4..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createFloatColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // min (optional) - 0, // max (optional) - 0, // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md deleted file mode 100644 index 2a4df003c0..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; -import io.appwrite.enums.IndexType; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createIndex( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - IndexType.KEY, // type - listOf(), // columns - listOf(), // orders (optional) - listOf(), // lengths (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md deleted file mode 100644 index 3546ac8174..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createIntegerColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // min (optional) - 0, // max (optional) - 0, // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md deleted file mode 100644 index 825d8b0c5c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createIpColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md deleted file mode 100644 index 7a0b50a541..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md +++ /dev/null @@ -1,31 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; -import io.appwrite.enums.RelationshipType; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createRelationshipColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<RELATED_TABLE_ID>", // relatedTableId - RelationshipType.ONETOONE, // type - false, // twoWay (optional) - "", // key (optional) - "", // twoWayKey (optional) - RelationMutate.CASCADE, // onDelete (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md deleted file mode 100644 index 7ba3678aad..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -tables.createRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md deleted file mode 100644 index c20aa2c11f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // rows - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md deleted file mode 100644 index b8cb626601..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createStringColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - 1, // size - false, // required - "<DEFAULT>", // default (optional) - false, // array (optional) - false, // encrypt (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md deleted file mode 100644 index 91e90c8bc4..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createUrlColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "https://example.com", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create.md b/docs/examples/1.8.x/server-kotlin/java/tables/create.md deleted file mode 100644 index 6a9faf06dd..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.create( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<NAME>", // name - listOf("read("any")"), // permissions (optional) - false, // rowSecurity (optional) - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md deleted file mode 100644 index 9e79f36e14..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.decrementRowColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - "", // column - 0, // value (optional) - 0, // min (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md deleted file mode 100644 index f14390c905..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.deleteColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md deleted file mode 100644 index 1b22eb00d8..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.deleteIndex( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md deleted file mode 100644 index a48745a225..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -tables.deleteRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md deleted file mode 100644 index 6a86321fad..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.deleteRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete.md deleted file mode 100644 index e777c7292e..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/delete.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.delete( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md deleted file mode 100644 index b4f7e1298f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.getColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md deleted file mode 100644 index 5bcd59d4cd..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.getIndex( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md deleted file mode 100644 index 7f72c25cd8..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -tables.getRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get.md b/docs/examples/1.8.x/server-kotlin/java/tables/get.md deleted file mode 100644 index 6f3c639450..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/get.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.get( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md deleted file mode 100644 index f9c828398a..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.incrementRowColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - "", // column - 0, // value (optional) - 0, // max (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md deleted file mode 100644 index 05e1960021..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.listColumns( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md deleted file mode 100644 index c9bd445fe8..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.listIndexes( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md deleted file mode 100644 index 8cbc356556..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -tables.listRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list.md b/docs/examples/1.8.x/server-kotlin/java/tables/list.md deleted file mode 100644 index c3e0c559aa..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/list.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.list( - "<DATABASE_ID>", // databaseId - listOf(), // queries (optional) - "<SEARCH>", // search (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md deleted file mode 100644 index 647190e7bc..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateBooleanColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - false, // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md deleted file mode 100644 index 38e0e60da5..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateDatetimeColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md deleted file mode 100644 index 918884e0b3..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateEmailColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "email@example.com", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md deleted file mode 100644 index b1bbc83520..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateEnumColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - listOf(), // elements - false, // required - "<DEFAULT>", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md deleted file mode 100644 index 977c23727c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateFloatColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // default - 0, // min (optional) - 0, // max (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md deleted file mode 100644 index d2ad81d0eb..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateIntegerColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // default - 0, // min (optional) - 0, // max (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md deleted file mode 100644 index cd6e67bc2c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateIpColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md deleted file mode 100644 index e0dc185e0e..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md +++ /dev/null @@ -1,27 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateRelationshipColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - RelationMutate.CASCADE, // onDelete (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md deleted file mode 100644 index 8270c3fa9b..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md +++ /dev/null @@ -1,27 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -tables.updateRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md deleted file mode 100644 index a51878508f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - mapOf( "a" to "b" ), // data (optional) - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md deleted file mode 100644 index 31e279d068..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateStringColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "<DEFAULT>", // default - 1, // size (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md deleted file mode 100644 index 201e578ac6..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateUrlColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "https://example.com", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update.md b/docs/examples/1.8.x/server-kotlin/java/tables/update.md deleted file mode 100644 index cf560cb461..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.update( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<NAME>", // name - listOf("read("any")"), // permissions (optional) - false, // rowSecurity (optional) - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md deleted file mode 100644 index 11127c5bfa..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -tables.upsertRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md deleted file mode 100644 index 14b382263b..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.upsertRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md deleted file mode 100644 index 68b8dc51bd..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createBooleanColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = false, // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md deleted file mode 100644 index 8740a71d3c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createDatetimeColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md deleted file mode 100644 index 34a6cb669f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createEmailColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "email@example.com", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md deleted file mode 100644 index d3d2fc9286..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createEnumColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - elements = listOf(), - required = false, - default = "<DEFAULT>", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md deleted file mode 100644 index 8540430cea..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createFloatColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - min = 0, // optional - max = 0, // optional - default = 0, // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md deleted file mode 100644 index 053c88a93a..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables -import io.appwrite.enums.IndexType - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createIndex( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - type = IndexType.KEY, - columns = listOf(), - orders = listOf(), // optional - lengths = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md deleted file mode 100644 index 1222746259..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createIntegerColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - min = 0, // optional - max = 0, // optional - default = 0, // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md deleted file mode 100644 index 277c756d24..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createIpColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md deleted file mode 100644 index aa07fac6a8..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md +++ /dev/null @@ -1,22 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables -import io.appwrite.enums.RelationshipType - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createRelationshipColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - relatedTableId = "<RELATED_TABLE_ID>", - type = RelationshipType.ONETOONE, - twoWay = false, // optional - key = "", // optional - twoWayKey = "", // optional - onDelete = "cascade" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md deleted file mode 100644 index 5df0890f99..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -val tables = Tables(client) - -val response = tables.createRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), - permissions = listOf("read("any")") // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md deleted file mode 100644 index f549d6fb8c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rows = listOf() -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md deleted file mode 100644 index d82026c31d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createStringColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - size = 1, - required = false, - default = "<DEFAULT>", // optional - array = false, // optional - encrypt = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md deleted file mode 100644 index 42f50e9ec9..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createUrlColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "https://example.com", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md deleted file mode 100644 index 3dc1d1a37d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.create( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - name = "<NAME>", - permissions = listOf("read("any")"), // optional - rowSecurity = false, // optional - enabled = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md deleted file mode 100644 index f78f7bbed7..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.decrementRowColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - column = "", - value = 0, // optional - min = 0 // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md deleted file mode 100644 index d41f2ceabf..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.deleteColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md deleted file mode 100644 index 7af6648f2f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.deleteIndex( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md deleted file mode 100644 index d182ccff95..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val tables = Tables(client) - -val response = tables.deleteRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md deleted file mode 100644 index 54ff6b690c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.deleteRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md deleted file mode 100644 index 5cbd03226a..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.delete( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md deleted file mode 100644 index 6f4d65b4dc..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.getColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md deleted file mode 100644 index 660502f228..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.getIndex( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md deleted file mode 100644 index cbaaa6c3e9..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val tables = Tables(client) - -val response = tables.getRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md deleted file mode 100644 index ff6d354c15..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.get( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md deleted file mode 100644 index 7917b7f939..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.incrementRowColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - column = "", - value = 0, // optional - max = 0 // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md deleted file mode 100644 index 4c1765193d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.listColumns( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md deleted file mode 100644 index bcd1fe75ab..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.listIndexes( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md deleted file mode 100644 index 38b776acb8..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val tables = Tables(client) - -val response = tables.listRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md deleted file mode 100644 index 37b03445da..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.list( - databaseId = "<DATABASE_ID>", - queries = listOf(), // optional - search = "<SEARCH>" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md deleted file mode 100644 index 10a0422d2d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateBooleanColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = false, - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md deleted file mode 100644 index 69ccf0354e..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateDatetimeColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md deleted file mode 100644 index 593a89b4ce..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateEmailColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "email@example.com", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md deleted file mode 100644 index b672e3e155..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateEnumColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - elements = listOf(), - required = false, - default = "<DEFAULT>", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md deleted file mode 100644 index 005c4e64a5..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateFloatColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = 0, - min = 0, // optional - max = 0, // optional - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md deleted file mode 100644 index 39da19d562..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateIntegerColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = 0, - min = 0, // optional - max = 0, // optional - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md deleted file mode 100644 index 40e54bcdfd..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateIpColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md deleted file mode 100644 index d4c36e8802..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateRelationshipColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - onDelete = "cascade", // optional - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md deleted file mode 100644 index 6d3d9a47f7..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val tables = Tables(client) - -val response = tables.updateRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), // optional - permissions = listOf("read("any")") // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md deleted file mode 100644 index aac87c19b0..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - data = mapOf( "a" to "b" ), // optional - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md deleted file mode 100644 index bb5b1f4bcf..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateStringColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "<DEFAULT>", - size = 1, // optional - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md deleted file mode 100644 index 07f43e3907..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateUrlColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "https://example.com", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md deleted file mode 100644 index 381532316d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.update( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - name = "<NAME>", - permissions = listOf("read("any")"), // optional - rowSecurity = false, // optional - enabled = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md deleted file mode 100644 index 6e02b3abe9..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -val tables = Tables(client) - -val response = tables.upsertRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md deleted file mode 100644 index d639e3d30b..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.upsertRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>" -) diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md deleted file mode 100644 index 64893d77a8..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md deleted file mode 100644 index 0d63244727..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md deleted file mode 100644 index 2257fdd7d6..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md deleted file mode 100644 index dbc75feea5..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md deleted file mode 100644 index 690b5849eb..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md deleted file mode 100644 index aef047ba5f..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md +++ /dev/null @@ -1,18 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - sdk.IndexType.Key, // type - [], // columns - [], // orders (optional) - [] // lengths (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md deleted file mode 100644 index 05e66b548c..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md deleted file mode 100644 index 69b5c635d2..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md deleted file mode 100644 index b6e7fa517f..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<RELATED_TABLE_ID>', // relatedTableId - sdk.RelationshipType.OneToOne, // type - false, // twoWay (optional) - '', // key (optional) - '', // twoWayKey (optional) - sdk.RelationMutate.Cascade // onDelete (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md deleted file mode 100644 index 84da608d41..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new sdk.Tables(client); - -const result = await tables.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md deleted file mode 100644 index 6a6918b8df..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md deleted file mode 100644 index 8e14cb45c9..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - 1, // size - false, // required - '<DEFAULT>', // default (optional) - false, // array (optional) - false // encrypt (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md deleted file mode 100644 index 73cdfa3710..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create.md deleted file mode 100644 index 54d6bc61bd..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.create( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md deleted file mode 100644 index 2e7df6aa92..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.decrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // min (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md deleted file mode 100644 index a892c61baa..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.deleteColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md deleted file mode 100644 index f6bc7919db..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.deleteIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md deleted file mode 100644 index 5bc60cd6cb..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new sdk.Tables(client); - -const result = await tables.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md deleted file mode 100644 index 11b16b71ae..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.deleteRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md deleted file mode 100644 index fed3eee5a4..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md +++ /dev/null @@ -1,13 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.delete( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md deleted file mode 100644 index daa20e17e2..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.getColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md deleted file mode 100644 index 56ba871d67..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.getIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md deleted file mode 100644 index df952d9595..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md +++ /dev/null @@ -1,15 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new sdk.Tables(client); - -const result = await tables.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get.md deleted file mode 100644 index b078574b5c..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/get.md +++ /dev/null @@ -1,13 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.get( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md deleted file mode 100644 index bb5856c74a..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.incrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // max (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md deleted file mode 100644 index f9af43bea5..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.listColumns( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md deleted file mode 100644 index 7eaf4b8710..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.listIndexes( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md deleted file mode 100644 index aa5b341649..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new sdk.Tables(client); - -const result = await tables.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list.md deleted file mode 100644 index 872a98df08..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/list.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.list( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md deleted file mode 100644 index 84ff5d2bef..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md deleted file mode 100644 index c02559a171..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md deleted file mode 100644 index 9560b60e29..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md deleted file mode 100644 index 861fce6add..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md deleted file mode 100644 index 01845ca3cc..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md deleted file mode 100644 index 0b7432247f..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md deleted file mode 100644 index 6ba5eccf3e..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md deleted file mode 100644 index 3409b8caad..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,16 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - sdk.RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md deleted file mode 100644 index ff8e98eb38..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md +++ /dev/null @@ -1,16 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new sdk.Tables(client); - -const result = await tables.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md deleted file mode 100644 index 72cef07202..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - {}, // data (optional) - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md deleted file mode 100644 index f9445a50c1..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md +++ /dev/null @@ -1,18 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '<DEFAULT>', // default - 1, // size (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md deleted file mode 100644 index c6ffdf3044..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update.md deleted file mode 100644 index 4fd981ffbf..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.update( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md deleted file mode 100644 index 2b08d56785..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md +++ /dev/null @@ -1,15 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new sdk.Tables(client); - -const result = await tables.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md deleted file mode 100644 index 75d681dbf0..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md +++ /dev/null @@ -1,13 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.upsertRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md deleted file mode 100644 index 28339753ac..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createBooleanColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: false, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md deleted file mode 100644 index d7f18f2ede..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createDatetimeColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md deleted file mode 100644 index 15ec2cf2e5..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createEmailColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: 'email@example.com', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md deleted file mode 100644 index aa2b6138f7..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createEnumColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - elements: [], - required: false, - default: '<DEFAULT>', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md deleted file mode 100644 index 1f620dc887..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createFloatColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - min: null, // optional - max: null, // optional - default: null, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-index.md b/docs/examples/1.8.x/server-php/examples/tables/create-index.md deleted file mode 100644 index 9844e041d4..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-index.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; -use Appwrite\Enums\IndexType; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - type: IndexType::KEY(), - columns: [], - orders: [], // optional - lengths: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md deleted file mode 100644 index 185f12c5cb..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createIntegerColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - min: null, // optional - max: null, // optional - default: null, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md deleted file mode 100644 index 1f74e4dd72..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createIpColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md deleted file mode 100644 index c86b4c558a..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; -use Appwrite\Enums\RelationshipType; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createRelationshipColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - relatedTableId: '<RELATED_TABLE_ID>', - type: RelationshipType::ONETOONE(), - twoWay: false, // optional - key: '', // optional - twoWayKey: '', // optional - onDelete: RelationMutate::CASCADE() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-row.md b/docs/examples/1.8.x/server-php/examples/tables/create-row.md deleted file mode 100644 index 6b64a7e058..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-row.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setSession('') // The user session to authenticate with - ->setKey('<YOUR_API_KEY>') // Your secret API key - ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -$tables = new Tables($client); - -$result = $tables->createRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: [], - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-rows.md b/docs/examples/1.8.x/server-php/examples/tables/create-rows.md deleted file mode 100644 index a1bf72ad13..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setAdmin('') // - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rows: [] -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md deleted file mode 100644 index 085aff25c8..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createStringColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - size: 1, - required: false, - default: '<DEFAULT>', // optional - array: false, // optional - encrypt: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md deleted file mode 100644 index d0bdb55dd4..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createUrlColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: 'https://example.com', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create.md b/docs/examples/1.8.x/server-php/examples/tables/create.md deleted file mode 100644 index 773d7a24eb..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->create( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md deleted file mode 100644 index b0c44b6d0a..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->decrementRowColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - column: '', - value: null, // optional - min: null // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-column.md b/docs/examples/1.8.x/server-php/examples/tables/delete-column.md deleted file mode 100644 index 9bd6738cb7..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/delete-column.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->deleteColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-index.md b/docs/examples/1.8.x/server-php/examples/tables/delete-index.md deleted file mode 100644 index bbd748433a..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/delete-index.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->deleteIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-row.md b/docs/examples/1.8.x/server-php/examples/tables/delete-row.md deleted file mode 100644 index 0c4ab6ef40..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/delete-row.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$tables = new Tables($client); - -$result = $tables->deleteRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md deleted file mode 100644 index b0c984cc17..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->deleteRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete.md b/docs/examples/1.8.x/server-php/examples/tables/delete.md deleted file mode 100644 index f145eedc91..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/delete.md +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->delete( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-column.md b/docs/examples/1.8.x/server-php/examples/tables/get-column.md deleted file mode 100644 index b8b676564e..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/get-column.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->getColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-index.md b/docs/examples/1.8.x/server-php/examples/tables/get-index.md deleted file mode 100644 index 5d1139d596..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/get-index.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->getIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-row.md b/docs/examples/1.8.x/server-php/examples/tables/get-row.md deleted file mode 100644 index ccde387b89..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/get-row.md +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$tables = new Tables($client); - -$result = $tables->getRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get.md b/docs/examples/1.8.x/server-php/examples/tables/get.md deleted file mode 100644 index d07ef7338a..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/get.md +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->get( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md deleted file mode 100644 index aa5a3c0d53..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->incrementRowColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - column: '', - value: null, // optional - max: null // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-columns.md b/docs/examples/1.8.x/server-php/examples/tables/list-columns.md deleted file mode 100644 index 0338567240..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/list-columns.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->listColumns( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md deleted file mode 100644 index df1f8c6aca..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->listIndexes( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-rows.md b/docs/examples/1.8.x/server-php/examples/tables/list-rows.md deleted file mode 100644 index 2041d72b05..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/list-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$tables = new Tables($client); - -$result = $tables->listRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list.md b/docs/examples/1.8.x/server-php/examples/tables/list.md deleted file mode 100644 index 37df0a4baa..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/list.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->list( - databaseId: '<DATABASE_ID>', - queries: [], // optional - search: '<SEARCH>' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md deleted file mode 100644 index 8ad80506d8..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateBooleanColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: false, - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md deleted file mode 100644 index 5185357f17..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateDatetimeColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md deleted file mode 100644 index 7acbb811eb..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateEmailColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: 'email@example.com', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md deleted file mode 100644 index 478905af67..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateEnumColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - elements: [], - required: false, - default: '<DEFAULT>', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md deleted file mode 100644 index 1d9c5fd997..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateFloatColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: null, - min: null, // optional - max: null, // optional - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md deleted file mode 100644 index f6998db0a2..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateIntegerColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: null, - min: null, // optional - max: null, // optional - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md deleted file mode 100644 index e7906fbd0f..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateIpColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md deleted file mode 100644 index d6505c77f1..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateRelationshipColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - onDelete: RelationMutate::CASCADE(), // optional - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-row.md b/docs/examples/1.8.x/server-php/examples/tables/update-row.md deleted file mode 100644 index 921c43d935..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-row.md +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$tables = new Tables($client); - -$result = $tables->updateRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: [], // optional - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-rows.md b/docs/examples/1.8.x/server-php/examples/tables/update-rows.md deleted file mode 100644 index f61fa2b17d..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-rows.md +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - data: [], // optional - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md deleted file mode 100644 index 8856ec19c1..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateStringColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '<DEFAULT>', - size: 1, // optional - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md deleted file mode 100644 index faa46d1806..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateUrlColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: 'https://example.com', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update.md b/docs/examples/1.8.x/server-php/examples/tables/update.md deleted file mode 100644 index 39f076b8f8..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->update( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md deleted file mode 100644 index 2bddd9b5b3..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setSession('') // The user session to authenticate with - ->setKey('<YOUR_API_KEY>') // Your secret API key - ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -$tables = new Tables($client); - -$result = $tables->upsertRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md deleted file mode 100644 index 5ed5f028a9..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setAdmin('') // - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->upsertRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md deleted file mode 100644 index cfbaa3b0ee..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_boolean_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = False, # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md deleted file mode 100644 index a9f76b5e5f..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_datetime_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md deleted file mode 100644 index 73ac0faad6..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_email_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = 'email@example.com', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md deleted file mode 100644 index 2013c39fa0..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_enum_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - elements = [], - required = False, - default = '<DEFAULT>', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md deleted file mode 100644 index a56a196093..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_float_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - min = None, # optional - max = None, # optional - default = None, # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-index.md b/docs/examples/1.8.x/server-python/examples/tables/create-index.md deleted file mode 100644 index 69086af0b0..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-index.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables -from appwrite.enums import IndexType - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_index( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - type = IndexType.KEY, - columns = [], - orders = [], # optional - lengths = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md deleted file mode 100644 index d52b14bc5c..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_integer_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - min = None, # optional - max = None, # optional - default = None, # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md deleted file mode 100644 index b5c7ef56db..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_ip_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md deleted file mode 100644 index 187271f887..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,21 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables -from appwrite.enums import RelationshipType - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_relationship_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - related_table_id = '<RELATED_TABLE_ID>', - type = RelationshipType.ONETOONE, - two_way = False, # optional - key = '', # optional - two_way_key = '', # optional - on_delete = RelationMutate.CASCADE # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-row.md b/docs/examples/1.8.x/server-python/examples/tables/create-row.md deleted file mode 100644 index 8850a974b8..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_session('') # The user session to authenticate with -client.set_key('<YOUR_API_KEY>') # Your secret API key -client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token - -tables = Tables(client) - -result = tables.create_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - data = {}, - permissions = ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-rows.md b/docs/examples/1.8.x/server-python/examples/tables/create-rows.md deleted file mode 100644 index 3fae165081..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_admin('') # -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - rows = [] -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md deleted file mode 100644 index 1308fea2ad..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_string_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - size = 1, - required = False, - default = '<DEFAULT>', # optional - array = False, # optional - encrypt = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md deleted file mode 100644 index f15c3e0574..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_url_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = 'https://example.com', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create.md b/docs/examples/1.8.x/server-python/examples/tables/create.md deleted file mode 100644 index 3a02843c4d..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - name = '<NAME>', - permissions = ["read("any")"], # optional - row_security = False, # optional - enabled = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md deleted file mode 100644 index bf027d6e76..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.decrement_row_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - column = '', - value = None, # optional - min = None # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-column.md b/docs/examples/1.8.x/server-python/examples/tables/delete-column.md deleted file mode 100644 index cf2dd6d5e5..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/delete-column.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.delete_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-index.md b/docs/examples/1.8.x/server-python/examples/tables/delete-index.md deleted file mode 100644 index 5f78d1ce1d..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/delete-index.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.delete_index( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-row.md b/docs/examples/1.8.x/server-python/examples/tables/delete-row.md deleted file mode 100644 index 40a8b09fcf..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -tables = Tables(client) - -result = tables.delete_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md deleted file mode 100644 index 236aea1c9b..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.delete_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete.md b/docs/examples/1.8.x/server-python/examples/tables/delete.md deleted file mode 100644 index de48bfc2b5..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.delete( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-column.md b/docs/examples/1.8.x/server-python/examples/tables/get-column.md deleted file mode 100644 index 4bd4617142..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/get-column.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.get_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-index.md b/docs/examples/1.8.x/server-python/examples/tables/get-index.md deleted file mode 100644 index cf88017fbe..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/get-index.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.get_index( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-row.md b/docs/examples/1.8.x/server-python/examples/tables/get-row.md deleted file mode 100644 index 25fefb23fd..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -tables = Tables(client) - -result = tables.get_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get.md b/docs/examples/1.8.x/server-python/examples/tables/get.md deleted file mode 100644 index 789410cfb7..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/get.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.get( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md deleted file mode 100644 index cfb923029e..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.increment_row_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - column = '', - value = None, # optional - max = None # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-columns.md b/docs/examples/1.8.x/server-python/examples/tables/list-columns.md deleted file mode 100644 index d9c5b16468..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/list-columns.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.list_columns( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md deleted file mode 100644 index 0b0bb585e7..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.list_indexes( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-rows.md b/docs/examples/1.8.x/server-python/examples/tables/list-rows.md deleted file mode 100644 index 2ece6f6cf7..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -tables = Tables(client) - -result = tables.list_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list.md b/docs/examples/1.8.x/server-python/examples/tables/list.md deleted file mode 100644 index 55a99e996d..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/list.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.list( - database_id = '<DATABASE_ID>', - queries = [], # optional - search = '<SEARCH>' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md deleted file mode 100644 index 1bc7a4afac..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_boolean_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = False, - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md deleted file mode 100644 index 157ff44a7b..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_datetime_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md deleted file mode 100644 index 8b9e4cad36..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_email_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = 'email@example.com', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md deleted file mode 100644 index b46971beac..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_enum_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - elements = [], - required = False, - default = '<DEFAULT>', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md deleted file mode 100644 index 243a26f0aa..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_float_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = None, - min = None, # optional - max = None, # optional - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md deleted file mode 100644 index 99b55c17a7..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_integer_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = None, - min = None, # optional - max = None, # optional - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md deleted file mode 100644 index 2fb470ae6e..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_ip_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md deleted file mode 100644 index 35a307c7e2..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,17 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_relationship_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - on_delete = RelationMutate.CASCADE, # optional - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-row.md b/docs/examples/1.8.x/server-python/examples/tables/update-row.md deleted file mode 100644 index 4a71fc97f2..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -tables = Tables(client) - -result = tables.update_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - data = {}, # optional - permissions = ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-rows.md b/docs/examples/1.8.x/server-python/examples/tables/update-rows.md deleted file mode 100644 index a834346678..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - data = {}, # optional - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md deleted file mode 100644 index 252c26433e..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_string_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '<DEFAULT>', - size = 1, # optional - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md deleted file mode 100644 index 235e2f3bc4..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_url_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = 'https://example.com', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update.md b/docs/examples/1.8.x/server-python/examples/tables/update.md deleted file mode 100644 index c567bd5500..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - name = '<NAME>', - permissions = ["read("any")"], # optional - row_security = False, # optional - enabled = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md deleted file mode 100644 index e418708bc3..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_session('') # The user session to authenticate with -client.set_key('<YOUR_API_KEY>') # Your secret API key -client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token - -tables = Tables(client) - -result = tables.upsert_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md deleted file mode 100644 index 85c2e94d69..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_admin('') # -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.upsert_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md deleted file mode 100644 index 4152d8538f..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/boolean HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": false, - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md deleted file mode 100644 index d5318d96db..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/datetime HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": , - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md deleted file mode 100644 index b213fa6ceb..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/email HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": "email@example.com", - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md deleted file mode 100644 index 125f617f1f..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md +++ /dev/null @@ -1,14 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/enum HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "elements": [], - "required": false, - "default": "<DEFAULT>", - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md deleted file mode 100644 index 2e010318ff..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md +++ /dev/null @@ -1,15 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/float HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "min": 0, - "max": 0, - "default": 0, - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-index.md b/docs/examples/1.8.x/server-rest/examples/tables/create-index.md deleted file mode 100644 index eaddec973a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-index.md +++ /dev/null @@ -1,14 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/indexes HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "type": "key", - "columns": [], - "orders": [], - "lengths": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md deleted file mode 100644 index f284dc03ef..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md +++ /dev/null @@ -1,15 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/integer HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "min": 0, - "max": 0, - "default": 0, - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md deleted file mode 100644 index 8def17fc27..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/ip HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": , - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md deleted file mode 100644 index d8feb21916..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,15 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/relationship HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "relatedTableId": "<RELATED_TABLE_ID>", - "type": "oneToOne", - "twoWay": false, - "key": , - "twoWayKey": , - "onDelete": "cascade" -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-row.md b/docs/examples/1.8.x/server-rest/examples/tables/create-row.md deleted file mode 100644 index 075be16fa4..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-row.md +++ /dev/null @@ -1,14 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - -{ - "rowId": "<ROW_ID>", - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md deleted file mode 100644 index ad3d6983cc..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md +++ /dev/null @@ -1,12 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - -{ - "rows": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md deleted file mode 100644 index e654a05e3a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md +++ /dev/null @@ -1,15 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/string HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "size": 1, - "required": false, - "default": "<DEFAULT>", - "array": false, - "encrypt": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md deleted file mode 100644 index d98d77c68d..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/url HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": "https://example.com", - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create.md b/docs/examples/1.8.x/server-rest/examples/tables/create.md deleted file mode 100644 index 14e1f6ec05..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create.md +++ /dev/null @@ -1,14 +0,0 @@ -POST /v1/databases/{databaseId}/tables HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "tableId": "<TABLE_ID>", - "name": "<NAME>", - "permissions": ["read(\"any\")"], - "rowSecurity": false, - "enabled": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md deleted file mode 100644 index a76efb3a69..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,11 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "value": 0, - "min": 0 -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md deleted file mode 100644 index 2bda57366c..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md +++ /dev/null @@ -1,7 +0,0 @@ -DELETE /v1/databases/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md deleted file mode 100644 index ffffc38c64..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md +++ /dev/null @@ -1,7 +0,0 @@ -DELETE /v1/databases/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md deleted file mode 100644 index f10adef821..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md +++ /dev/null @@ -1,9 +0,0 @@ -DELETE /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md deleted file mode 100644 index fcaf8fb472..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md +++ /dev/null @@ -1,10 +0,0 @@ -DELETE /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "queries": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete.md b/docs/examples/1.8.x/server-rest/examples/tables/delete.md deleted file mode 100644 index 379bead1ad..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/delete.md +++ /dev/null @@ -1,7 +0,0 @@ -DELETE /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-column.md b/docs/examples/1.8.x/server-rest/examples/tables/get-column.md deleted file mode 100644 index 31d1856539..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/get-column.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-index.md b/docs/examples/1.8.x/server-rest/examples/tables/get-index.md deleted file mode 100644 index 076058d7f3..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/get-index.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-row.md b/docs/examples/1.8.x/server-rest/examples/tables/get-row.md deleted file mode 100644 index 0b827f18a8..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/get-row.md +++ /dev/null @@ -1,7 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get.md b/docs/examples/1.8.x/server-rest/examples/tables/get.md deleted file mode 100644 index 74877ec0c0..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/get.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md deleted file mode 100644 index 480645c39c..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md +++ /dev/null @@ -1,11 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "value": 0, - "max": 0 -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md b/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md deleted file mode 100644 index 152b36ca26..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/columns HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md deleted file mode 100644 index ee10a85d5e..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/indexes HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md deleted file mode 100644 index 46e69ab609..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md +++ /dev/null @@ -1,7 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list.md b/docs/examples/1.8.x/server-rest/examples/tables/list.md deleted file mode 100644 index e856ef7241..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/list.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/tables HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md deleted file mode 100644 index e4a1c4602a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/boolean/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": false, - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md deleted file mode 100644 index 6b531dc604..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/datetime/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": , - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md deleted file mode 100644 index 531aa7a31a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/email/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": "email@example.com", - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md deleted file mode 100644 index b02936fc5a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md +++ /dev/null @@ -1,13 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/enum/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "elements": [], - "required": false, - "default": "<DEFAULT>", - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md deleted file mode 100644 index 313acb6c20..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md +++ /dev/null @@ -1,14 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/float/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "min": 0, - "max": 0, - "default": 0, - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md deleted file mode 100644 index a2552e93ff..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md +++ /dev/null @@ -1,14 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/integer/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "min": 0, - "max": 0, - "default": 0, - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md deleted file mode 100644 index b3cef978e2..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/ip/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": , - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md deleted file mode 100644 index 19fed27fdf..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,11 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/{key}/relationship HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "onDelete": "cascade", - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-row.md b/docs/examples/1.8.x/server-rest/examples/tables/update-row.md deleted file mode 100644 index 20c92d746b..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-row.md +++ /dev/null @@ -1,13 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - -{ - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md deleted file mode 100644 index 249653070c..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md +++ /dev/null @@ -1,11 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "data": {}, - "queries": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md deleted file mode 100644 index 7a25ee52e8..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md +++ /dev/null @@ -1,13 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/string/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": "<DEFAULT>", - "size": 1, - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md deleted file mode 100644 index 2097e91d85..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/url/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": "https://example.com", - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update.md b/docs/examples/1.8.x/server-rest/examples/tables/update.md deleted file mode 100644 index 786a36cf3c..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update.md +++ /dev/null @@ -1,13 +0,0 @@ -PUT /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "name": "<NAME>", - "permissions": ["read(\"any\")"], - "rowSecurity": false, - "enabled": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md deleted file mode 100644 index 7edca8018c..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md +++ /dev/null @@ -1,9 +0,0 @@ -PUT /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - diff --git a/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md deleted file mode 100644 index cfcb914866..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md +++ /dev/null @@ -1,7 +0,0 @@ -PUT /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md deleted file mode 100644 index 7df3908513..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_boolean_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: false, # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md deleted file mode 100644 index 2d65509184..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_datetime_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md deleted file mode 100644 index 01f7ad43b5..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_email_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: 'email@example.com', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md deleted file mode 100644 index 97fcb589e4..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_enum_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - elements: [], - required: false, - default: '<DEFAULT>', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md deleted file mode 100644 index 9df32a3f5b..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_float_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - min: null, # optional - max: null, # optional - default: null, # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md deleted file mode 100644 index 3c8dfdfb6b..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite -include Appwrite::Enums - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_index( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - type: IndexType::KEY, - columns: [], - orders: [], # optional - lengths: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md deleted file mode 100644 index d0c5c78108..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_integer_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - min: null, # optional - max: null, # optional - default: null, # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md deleted file mode 100644 index 0c97840a27..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_ip_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md deleted file mode 100644 index 8f7fb841aa..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,22 +0,0 @@ -require 'appwrite' - -include Appwrite -include Appwrite::Enums - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_relationship_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - related_table_id: '<RELATED_TABLE_ID>', - type: RelationshipType::ONETOONE, - two_way: false, # optional - key: '', # optional - two_way_key: '', # optional - on_delete: RelationMutate::CASCADE # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md deleted file mode 100644 index a625249700..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_session('') # The user session to authenticate with - .set_key('<YOUR_API_KEY>') # Your secret API key - .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token - -tables = Tables.new(client) - -result = tables.create_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - data: {}, - permissions: ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md deleted file mode 100644 index 2e78b96cbc..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_admin('') # - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - rows: [] -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md deleted file mode 100644 index d47cf49e0c..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_string_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - size: 1, - required: false, - default: '<DEFAULT>', # optional - array: false, # optional - encrypt: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md deleted file mode 100644 index fcfebac7a8..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_url_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: 'https://example.com', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create.md b/docs/examples/1.8.x/server-ruby/examples/tables/create.md deleted file mode 100644 index 5a255fafac..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], # optional - row_security: false, # optional - enabled: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md deleted file mode 100644 index e22afcb0ad..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.decrement_row_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - column: '', - value: null, # optional - min: null # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md deleted file mode 100644 index 245864053f..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.delete_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md deleted file mode 100644 index 54bd5455aa..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.delete_index( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md deleted file mode 100644 index 9841fc2d2f..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -tables = Tables.new(client) - -result = tables.delete_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md deleted file mode 100644 index 7be1e4bc70..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.delete_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete.md deleted file mode 100644 index ca607f2b6b..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.delete( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md deleted file mode 100644 index 1a1469d005..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.get_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md deleted file mode 100644 index 7d762ce8ae..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.get_index( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md deleted file mode 100644 index 4526bb7316..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md +++ /dev/null @@ -1,17 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -tables = Tables.new(client) - -result = tables.get_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get.md b/docs/examples/1.8.x/server-ruby/examples/tables/get.md deleted file mode 100644 index 22ba02aebc..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/get.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.get( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md deleted file mode 100644 index c0a91d4b62..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.increment_row_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - column: '', - value: null, # optional - max: null # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md deleted file mode 100644 index 7e851564c2..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.list_columns( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md deleted file mode 100644 index 0789291071..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.list_indexes( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md deleted file mode 100644 index bc9a0a49f6..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -tables = Tables.new(client) - -result = tables.list_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list.md b/docs/examples/1.8.x/server-ruby/examples/tables/list.md deleted file mode 100644 index 7cf987ebb9..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/list.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.list( - database_id: '<DATABASE_ID>', - queries: [], # optional - search: '<SEARCH>' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md deleted file mode 100644 index a09b365cd1..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_boolean_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: false, - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md deleted file mode 100644 index 55e0484b4c..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_datetime_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md deleted file mode 100644 index 285cd6655a..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_email_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: 'email@example.com', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md deleted file mode 100644 index 90773ed9e4..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_enum_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - elements: [], - required: false, - default: '<DEFAULT>', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md deleted file mode 100644 index 0bb992bd3c..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_float_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: null, - min: null, # optional - max: null, # optional - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md deleted file mode 100644 index 35f8c471a8..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_integer_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: null, - min: null, # optional - max: null, # optional - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md deleted file mode 100644 index 2ad1840a9d..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_ip_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md deleted file mode 100644 index de86fd53d7..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,18 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_relationship_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - on_delete: RelationMutate::CASCADE, # optional - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md deleted file mode 100644 index 500927dcf0..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -tables = Tables.new(client) - -result = tables.update_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - data: {}, # optional - permissions: ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md deleted file mode 100644 index 8cee1810be..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - data: {}, # optional - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md deleted file mode 100644 index 2240f49555..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_string_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '<DEFAULT>', - size: 1, # optional - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md deleted file mode 100644 index 0947a78a9e..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_url_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: 'https://example.com', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update.md b/docs/examples/1.8.x/server-ruby/examples/tables/update.md deleted file mode 100644 index 003d3d041c..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], # optional - row_security: false, # optional - enabled: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md deleted file mode 100644 index d96172e1ec..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_session('') # The user session to authenticate with - .set_key('<YOUR_API_KEY>') # Your secret API key - .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token - -tables = Tables.new(client) - -result = tables.upsert_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md deleted file mode 100644 index 8987b1ee0e..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_admin('') # - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.upsert_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md deleted file mode 100644 index 1b9627afac..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnBoolean = try await tables.createBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md deleted file mode 100644 index e002fb8042..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnDatetime = try await tables.createDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md deleted file mode 100644 index 338493dbc5..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnEmail = try await tables.createEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md deleted file mode 100644 index a6a9fff2c4..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnEnum = try await tables.createEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: [], - required: false, - default: "<DEFAULT>", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md deleted file mode 100644 index 12e4062454..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnFloat = try await tables.createFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, // optional - max: 0, // optional - default: 0, // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-index.md b/docs/examples/1.8.x/server-swift/examples/tables/create-index.md deleted file mode 100644 index 03dea1ac48..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-index.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite -import AppwriteEnums - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnIndex = try await tables.createIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - type: .key, - columns: [], - orders: [], // optional - lengths: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md deleted file mode 100644 index 6c04294025..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnInteger = try await tables.createIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, // optional - max: 0, // optional - default: 0, // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md deleted file mode 100644 index 2cd0b2795f..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnIp = try await tables.createIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md deleted file mode 100644 index 66b993cf9a..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import Appwrite -import AppwriteEnums - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnRelationship = try await tables.createRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - relatedTableId: "<RELATED_TABLE_ID>", - type: .oneToOne, - twoWay: false, // optional - key: "", // optional - twoWayKey: "", // optional - onDelete: .cascade // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-row.md b/docs/examples/1.8.x/server-swift/examples/tables/create-row.md deleted file mode 100644 index a736355127..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -let tables = Tables(client) - -let row = try await tables.createRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md deleted file mode 100644 index ee2095f08f..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let rowList = try await tables.createRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: [] -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md deleted file mode 100644 index e83ffdf367..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnString = try await tables.createStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - size: 1, - required: false, - default: "<DEFAULT>", // optional - array: false, // optional - encrypt: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md deleted file mode 100644 index 150b51309d..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnUrl = try await tables.createUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create.md b/docs/examples/1.8.x/server-swift/examples/tables/create.md deleted file mode 100644 index 0843dfd242..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let table = try await tables.create( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md deleted file mode 100644 index ef24324780..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let row = try await tables.decrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, // optional - min: 0 // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md deleted file mode 100644 index 07f825ddbe..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let result = try await tables.deleteColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md deleted file mode 100644 index b6d2e5bfea..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let result = try await tables.deleteIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md deleted file mode 100644 index 92bc38777e..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let tables = Tables(client) - -let result = try await tables.deleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md deleted file mode 100644 index d27fbce85f..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let rowList = try await tables.deleteRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete.md b/docs/examples/1.8.x/server-swift/examples/tables/delete.md deleted file mode 100644 index aefa1d8cda..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let result = try await tables.delete( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-column.md b/docs/examples/1.8.x/server-swift/examples/tables/get-column.md deleted file mode 100644 index 653f79dce7..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/get-column.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let result = try await tables.getColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-index.md b/docs/examples/1.8.x/server-swift/examples/tables/get-index.md deleted file mode 100644 index 6835f56aa0..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/get-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnIndex = try await tables.getIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-row.md b/docs/examples/1.8.x/server-swift/examples/tables/get-row.md deleted file mode 100644 index e2ff10f09a..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let tables = Tables(client) - -let row = try await tables.getRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get.md b/docs/examples/1.8.x/server-swift/examples/tables/get.md deleted file mode 100644 index 610bf42529..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/get.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let table = try await tables.get( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md deleted file mode 100644 index 6ea883d612..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let row = try await tables.incrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, // optional - max: 0 // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md b/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md deleted file mode 100644 index 88c86137a4..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnList = try await tables.listColumns( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md deleted file mode 100644 index 2ea8e99eca..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnIndexList = try await tables.listIndexes( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md deleted file mode 100644 index ca2e5b0d4b..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let tables = Tables(client) - -let rowList = try await tables.listRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list.md b/docs/examples/1.8.x/server-swift/examples/tables/list.md deleted file mode 100644 index e135b50289..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/list.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let tableList = try await tables.list( - databaseId: "<DATABASE_ID>", - queries: [], // optional - search: "<SEARCH>" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md deleted file mode 100644 index e0d1ea2f9f..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnBoolean = try await tables.updateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md deleted file mode 100644 index f09e27920b..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnDatetime = try await tables.updateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md deleted file mode 100644 index f7b8cc4ede..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnEmail = try await tables.updateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md deleted file mode 100644 index 776da72e59..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnEnum = try await tables.updateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: [], - required: false, - default: "<DEFAULT>", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md deleted file mode 100644 index d6cd34c4b5..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnFloat = try await tables.updateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, // optional - max: 0, // optional - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md deleted file mode 100644 index e1265cedbf..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnInteger = try await tables.updateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, // optional - max: 0, // optional - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md deleted file mode 100644 index 4f3538bb7a..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnIp = try await tables.updateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md deleted file mode 100644 index 74bfd62750..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite -import AppwriteEnums - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnRelationship = try await tables.updateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - onDelete: .cascade, // optional - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-row.md b/docs/examples/1.8.x/server-swift/examples/tables/update-row.md deleted file mode 100644 index 7fa81f6b58..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let tables = Tables(client) - -let row = try await tables.updateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], // optional - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md deleted file mode 100644 index d7cd0697da..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let rowList = try await tables.updateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - data: [:], // optional - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md deleted file mode 100644 index ba14d9a96a..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnString = try await tables.updateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "<DEFAULT>", - size: 1, // optional - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md deleted file mode 100644 index 19015e4c88..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnUrl = try await tables.updateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update.md b/docs/examples/1.8.x/server-swift/examples/tables/update.md deleted file mode 100644 index c9840a0a51..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let table = try await tables.update( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md deleted file mode 100644 index c5c5b73afc..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -let tables = Tables(client) - -let row = try await tables.upsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md deleted file mode 100644 index 037d927dc9..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let rowList = try await tables.upsertRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -) - diff --git a/docs/references/databases/create-boolean-column.md b/docs/references/databases/create-boolean-column.md deleted file mode 100644 index c528ede1a2..0000000000 --- a/docs/references/databases/create-boolean-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a boolean column. diff --git a/docs/references/databases/create-datetime-column.md b/docs/references/databases/create-datetime-column.md deleted file mode 100644 index ad92750639..0000000000 --- a/docs/references/databases/create-datetime-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a date time column according to the ISO 8601 standard. \ No newline at end of file diff --git a/docs/references/databases/create-email-column.md b/docs/references/databases/create-email-column.md deleted file mode 100644 index 91aa5c9326..0000000000 --- a/docs/references/databases/create-email-column.md +++ /dev/null @@ -1 +0,0 @@ -Create an email column. diff --git a/docs/references/databases/create-enum-column.md b/docs/references/databases/create-enum-column.md deleted file mode 100644 index b9e5a3ebe4..0000000000 --- a/docs/references/databases/create-enum-column.md +++ /dev/null @@ -1 +0,0 @@ -Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. \ No newline at end of file diff --git a/docs/references/databases/create-float-column.md b/docs/references/databases/create-float-column.md deleted file mode 100644 index 0b133eef28..0000000000 --- a/docs/references/databases/create-float-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a float column. Optionally, minimum and maximum values can be provided. diff --git a/docs/references/databases/create-integer-column.md b/docs/references/databases/create-integer-column.md deleted file mode 100644 index 5f51b3965a..0000000000 --- a/docs/references/databases/create-integer-column.md +++ /dev/null @@ -1 +0,0 @@ -Create an integer column. Optionally, minimum and maximum values can be provided. diff --git a/docs/references/databases/create-ip-column.md b/docs/references/databases/create-ip-column.md deleted file mode 100644 index 012431dbae..0000000000 --- a/docs/references/databases/create-ip-column.md +++ /dev/null @@ -1 +0,0 @@ -Create IP address column. diff --git a/docs/references/databases/create-relationship-column.md b/docs/references/databases/create-relationship-column.md deleted file mode 100644 index d87d8bccf8..0000000000 --- a/docs/references/databases/create-relationship-column.md +++ /dev/null @@ -1 +0,0 @@ -Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). diff --git a/docs/references/databases/create-row.md b/docs/references/databases/create-row.md deleted file mode 100644 index a07abfa04d..0000000000 --- a/docs/references/databases/create-row.md +++ /dev/null @@ -1 +0,0 @@ -Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/create-rows.md b/docs/references/databases/create-rows.md deleted file mode 100644 index cea67913b4..0000000000 --- a/docs/references/databases/create-rows.md +++ /dev/null @@ -1 +0,0 @@ -Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/create-string-column.md b/docs/references/databases/create-string-column.md deleted file mode 100644 index 7395e26a11..0000000000 --- a/docs/references/databases/create-string-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a string column. diff --git a/docs/references/databases/create-table.md b/docs/references/databases/create-table.md deleted file mode 100644 index 263638ea00..0000000000 --- a/docs/references/databases/create-table.md +++ /dev/null @@ -1 +0,0 @@ -Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/create-url-column.md b/docs/references/databases/create-url-column.md deleted file mode 100644 index e731d758ce..0000000000 --- a/docs/references/databases/create-url-column.md +++ /dev/null @@ -1 +0,0 @@ -Create a URL column. diff --git a/docs/references/databases/decrement-row-column.md b/docs/references/databases/decrement-row-column.md deleted file mode 100644 index b7b32d6148..0000000000 --- a/docs/references/databases/decrement-row-column.md +++ /dev/null @@ -1 +0,0 @@ -Decrement a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/databases/delete-column.md b/docs/references/databases/delete-column.md deleted file mode 100644 index efba8b1d77..0000000000 --- a/docs/references/databases/delete-column.md +++ /dev/null @@ -1 +0,0 @@ -Deletes a column. \ No newline at end of file diff --git a/docs/references/databases/delete-row.md b/docs/references/databases/delete-row.md deleted file mode 100644 index c0b9dfbdaf..0000000000 --- a/docs/references/databases/delete-row.md +++ /dev/null @@ -1 +0,0 @@ -Delete a row by its unique ID. \ No newline at end of file diff --git a/docs/references/databases/delete-rows.md b/docs/references/databases/delete-rows.md deleted file mode 100644 index 9d5189ce76..0000000000 --- a/docs/references/databases/delete-rows.md +++ /dev/null @@ -1 +0,0 @@ -Bulk delete rows using queries, if no queries are passed then all rows are deleted. \ No newline at end of file diff --git a/docs/references/databases/delete-table.md b/docs/references/databases/delete-table.md deleted file mode 100644 index ad74ca3233..0000000000 --- a/docs/references/databases/delete-table.md +++ /dev/null @@ -1 +0,0 @@ -Delete a table by its unique ID. Only users with write permissions have access to delete this resource. \ No newline at end of file diff --git a/docs/references/databases/get-column.md b/docs/references/databases/get-column.md deleted file mode 100644 index cd8b8797a9..0000000000 --- a/docs/references/databases/get-column.md +++ /dev/null @@ -1 +0,0 @@ -Get column by ID. \ No newline at end of file diff --git a/docs/references/databases/get-row-logs.md b/docs/references/databases/get-row-logs.md deleted file mode 100644 index 1d494ed53e..0000000000 --- a/docs/references/databases/get-row-logs.md +++ /dev/null @@ -1 +0,0 @@ -Get the row activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/databases/get-row.md b/docs/references/databases/get-row.md deleted file mode 100644 index 6a30fa472c..0000000000 --- a/docs/references/databases/get-row.md +++ /dev/null @@ -1 +0,0 @@ -Get a row by its unique ID. This endpoint response returns a JSON object with the row data. \ No newline at end of file diff --git a/docs/references/databases/get-table-logs.md b/docs/references/databases/get-table-logs.md deleted file mode 100644 index 8b00c7f317..0000000000 --- a/docs/references/databases/get-table-logs.md +++ /dev/null @@ -1 +0,0 @@ -Get the table activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/databases/get-table-usage.md b/docs/references/databases/get-table-usage.md deleted file mode 100644 index 08e28af0a6..0000000000 --- a/docs/references/databases/get-table-usage.md +++ /dev/null @@ -1 +0,0 @@ -Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/databases/get-table.md b/docs/references/databases/get-table.md deleted file mode 100644 index 67b8428431..0000000000 --- a/docs/references/databases/get-table.md +++ /dev/null @@ -1 +0,0 @@ -Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata. \ No newline at end of file diff --git a/docs/references/databases/increment-row-column.md b/docs/references/databases/increment-row-column.md deleted file mode 100644 index 7a19b3fbc7..0000000000 --- a/docs/references/databases/increment-row-column.md +++ /dev/null @@ -1 +0,0 @@ -Increment a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/databases/list-columns.md b/docs/references/databases/list-columns.md deleted file mode 100644 index aacf373082..0000000000 --- a/docs/references/databases/list-columns.md +++ /dev/null @@ -1 +0,0 @@ -List columns in the table. \ No newline at end of file diff --git a/docs/references/databases/list-rows.md b/docs/references/databases/list-rows.md deleted file mode 100644 index 68185fc192..0000000000 --- a/docs/references/databases/list-rows.md +++ /dev/null @@ -1 +0,0 @@ -Get a list of all the user's rows in a given table. You can use the query params to filter your results. \ No newline at end of file diff --git a/docs/references/databases/list-tables.md b/docs/references/databases/list-tables.md deleted file mode 100644 index e14795eeac..0000000000 --- a/docs/references/databases/list-tables.md +++ /dev/null @@ -1 +0,0 @@ -Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results. \ No newline at end of file diff --git a/docs/references/databases/update-boolean-column.md b/docs/references/databases/update-boolean-column.md deleted file mode 100644 index f5167d97b6..0000000000 --- a/docs/references/databases/update-boolean-column.md +++ /dev/null @@ -1 +0,0 @@ -Update a boolean column. Changing the `default` value will not update already existing rows. \ No newline at end of file diff --git a/docs/references/databases/update-datetime-column.md b/docs/references/databases/update-datetime-column.md deleted file mode 100644 index e793b41921..0000000000 --- a/docs/references/databases/update-datetime-column.md +++ /dev/null @@ -1 +0,0 @@ -Update a date time column. Changing the `default` value will not update already existing rows. \ No newline at end of file diff --git a/docs/references/databases/update-email-column.md b/docs/references/databases/update-email-column.md deleted file mode 100644 index 0db17e29bd..0000000000 --- a/docs/references/databases/update-email-column.md +++ /dev/null @@ -1 +0,0 @@ -Update an email column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-enum-column.md b/docs/references/databases/update-enum-column.md deleted file mode 100644 index df172cbc38..0000000000 --- a/docs/references/databases/update-enum-column.md +++ /dev/null @@ -1 +0,0 @@ -Update an enum column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-float-column.md b/docs/references/databases/update-float-column.md deleted file mode 100644 index 4e0eb9ddb2..0000000000 --- a/docs/references/databases/update-float-column.md +++ /dev/null @@ -1 +0,0 @@ -Update a float column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-integer-column.md b/docs/references/databases/update-integer-column.md deleted file mode 100644 index 0f2a07ea6e..0000000000 --- a/docs/references/databases/update-integer-column.md +++ /dev/null @@ -1 +0,0 @@ -Update an integer column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-ip-column.md b/docs/references/databases/update-ip-column.md deleted file mode 100644 index 115c87a7e1..0000000000 --- a/docs/references/databases/update-ip-column.md +++ /dev/null @@ -1 +0,0 @@ -Update an ip column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-relationship-column.md b/docs/references/databases/update-relationship-column.md deleted file mode 100644 index dfdcd8ae5a..0000000000 --- a/docs/references/databases/update-relationship-column.md +++ /dev/null @@ -1 +0,0 @@ -Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). diff --git a/docs/references/databases/update-row.md b/docs/references/databases/update-row.md deleted file mode 100644 index b532ea411d..0000000000 --- a/docs/references/databases/update-row.md +++ /dev/null @@ -1 +0,0 @@ -Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. \ No newline at end of file diff --git a/docs/references/databases/update-rows.md b/docs/references/databases/update-rows.md deleted file mode 100644 index 334b91aec1..0000000000 --- a/docs/references/databases/update-rows.md +++ /dev/null @@ -1 +0,0 @@ -Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated. \ No newline at end of file diff --git a/docs/references/databases/update-string-column.md b/docs/references/databases/update-string-column.md deleted file mode 100644 index 617214b4c9..0000000000 --- a/docs/references/databases/update-string-column.md +++ /dev/null @@ -1 +0,0 @@ -Update a string column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/update-table.md b/docs/references/databases/update-table.md deleted file mode 100644 index bbd676d3b8..0000000000 --- a/docs/references/databases/update-table.md +++ /dev/null @@ -1 +0,0 @@ -Update a table by its unique ID. \ No newline at end of file diff --git a/docs/references/databases/update-url-column.md b/docs/references/databases/update-url-column.md deleted file mode 100644 index 6080d71509..0000000000 --- a/docs/references/databases/update-url-column.md +++ /dev/null @@ -1 +0,0 @@ -Update an url column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/databases/upsert-row.md b/docs/references/databases/upsert-row.md deleted file mode 100644 index 1132afd53c..0000000000 --- a/docs/references/databases/upsert-row.md +++ /dev/null @@ -1 +0,0 @@ -Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/databases/upsert-rows.md b/docs/references/databases/upsert-rows.md deleted file mode 100644 index 21aa3da1ef..0000000000 --- a/docs/references/databases/upsert-rows.md +++ /dev/null @@ -1 +0,0 @@ -Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. From 24614225a81c5f451920697363e856e3f2136d78 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 16:58:04 +0530 Subject: [PATCH 292/362] fix: no params on multiple methods. --- .../SDK/Specification/Format/OpenAPI3.php | 20 ++++++++++++++----- .../SDK/Specification/Format/Swagger2.php | 20 ++++++++++++++----- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 3550157309..a9991d7b03 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -223,11 +223,21 @@ class OpenAPI3 extends Format 'description' => ($desc) ? \file_get_contents($desc) : '', ]; - foreach ($methodObj->getParameters() as $parameter) { - $additionalMethod['parameters'][] = $parameter->getName(); - - if (!$parameter->getOptional()) { - $additionalMethod['required'][] = $parameter->getName(); + // If additional method has no parameters, inherit from route + if (empty($methodObj->getParameters())) { + foreach ($route->getParams() as $name => $param) { + $additionalMethod['parameters'][] = $name; + if (!$param['optional']) { + $additionalMethod['required'][] = $name; + } + } + } else { + // Use method's own parameters + foreach ($methodObj->getParameters() as $parameter) { + $additionalMethod['parameters'][] = $parameter->getName(); + if (!$parameter->getOptional()) { + $additionalMethod['required'][] = $parameter->getName(); + } } } diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 3a98b4e2c0..305a10b34b 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -232,11 +232,21 @@ class Swagger2 extends Format 'description' => ($desc) ? \file_get_contents($desc) : '', ]; - foreach ($methodObj->getParameters() as $parameter) { - $additionalMethod['parameters'][] = $parameter->getName(); - - if (!$parameter->getOptional()) { - $additionalMethod['required'][] = $parameter->getName(); + // If additional method has no parameters, inherit from route + if (empty($methodObj->getParameters())) { + foreach ($route->getParams() as $name => $param) { + $additionalMethod['parameters'][] = $name; + if (!$param['optional']) { + $additionalMethod['required'][] = $name; + } + } + } else { + // Use method's own parameters + foreach ($methodObj->getParameters() as $parameter) { + $additionalMethod['parameters'][] = $parameter->getName(); + if (!$parameter->getOptional()) { + $additionalMethod['required'][] = $parameter->getName(); + } } } From 0df9d51b0122b057f5e5b0e7ad965b6d30a4c201 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 17:09:44 +0530 Subject: [PATCH 293/362] update: regen specs. --- app/config/specs/open-api3-1.8.x-client.json | 29 ++- app/config/specs/open-api3-1.8.x-console.json | 183 ++++++++++++++---- app/config/specs/open-api3-1.8.x-server.json | 139 ++++++++++--- app/config/specs/open-api3-latest-client.json | 29 ++- .../specs/open-api3-latest-console.json | 183 ++++++++++++++---- app/config/specs/open-api3-latest-server.json | 139 ++++++++++--- app/config/specs/swagger2-1.8.x-client.json | 29 ++- app/config/specs/swagger2-1.8.x-console.json | 183 ++++++++++++++---- app/config/specs/swagger2-1.8.x-server.json | 139 ++++++++++--- app/config/specs/swagger2-latest-client.json | 29 ++- app/config/specs/swagger2-latest-console.json | 183 ++++++++++++++---- app/config/specs/swagger2-latest-server.json | 139 ++++++++++--- 12 files changed, 1140 insertions(+), 264 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 75f4d5713b..0853e74dd1 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4720,8 +4720,19 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, @@ -5358,8 +5369,18 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, 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 dca688f77a..4e026f0343 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4563,7 +4563,10 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4579,7 +4582,10 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4670,8 +4676,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4686,8 +4699,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4783,7 +4803,9 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "range" + ], "required": [], "responses": [ { @@ -4799,7 +4821,9 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "range" + ], "required": [], "responses": [ { @@ -4889,8 +4913,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -4905,8 +4933,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -4982,8 +5014,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -4998,8 +5037,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -5092,8 +5138,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -5107,8 +5157,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -8515,8 +8569,16 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, @@ -8922,8 +8984,19 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, @@ -13777,8 +13850,16 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -14168,8 +14249,18 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -14882,8 +14973,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -14898,8 +14994,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -14989,8 +15090,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -15005,8 +15111,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, 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 c824247c5b..2ad2b3c265 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4082,7 +4082,10 @@ "Project": [], "Key": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4099,7 +4102,10 @@ "Project": [], "Key": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4192,8 +4198,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4209,8 +4222,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4308,8 +4328,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -4325,8 +4349,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -4404,8 +4432,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -4421,8 +4456,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -4517,8 +4559,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -4533,8 +4579,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -7977,8 +8027,16 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, @@ -8390,8 +8448,19 @@ "Project": [], "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, @@ -12933,8 +13002,16 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -13330,8 +13407,18 @@ "Project": [], "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 75f4d5713b..0853e74dd1 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4720,8 +4720,19 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, @@ -5358,8 +5369,18 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index dca688f77a..4e026f0343 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4563,7 +4563,10 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4579,7 +4582,10 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4670,8 +4676,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4686,8 +4699,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4783,7 +4803,9 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "range" + ], "required": [], "responses": [ { @@ -4799,7 +4821,9 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "range" + ], "required": [], "responses": [ { @@ -4889,8 +4913,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -4905,8 +4933,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -4982,8 +5014,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -4998,8 +5037,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -5092,8 +5138,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -5107,8 +5157,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -8515,8 +8569,16 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, @@ -8922,8 +8984,19 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, @@ -13777,8 +13850,16 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -14168,8 +14249,18 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -14882,8 +14973,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -14898,8 +14994,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -14989,8 +15090,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -15005,8 +15111,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index c824247c5b..2ad2b3c265 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -4082,7 +4082,10 @@ "Project": [], "Key": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4099,7 +4102,10 @@ "Project": [], "Key": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4192,8 +4198,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4209,8 +4222,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4308,8 +4328,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -4325,8 +4349,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -4404,8 +4432,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -4421,8 +4456,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -4517,8 +4559,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -4533,8 +4579,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -7977,8 +8027,16 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, @@ -8390,8 +8448,19 @@ "Project": [], "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, @@ -12933,8 +13002,16 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -13330,8 +13407,18 @@ "Project": [], "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 938ba76f53..c25de95c78 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -4848,8 +4848,19 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, @@ -5458,8 +5469,18 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index b4a61db855..dadd2fac84 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -4723,7 +4723,10 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4739,7 +4742,10 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4829,8 +4835,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4845,8 +4858,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4945,7 +4965,9 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "range" + ], "required": [], "responses": [ { @@ -4961,7 +4983,9 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "range" + ], "required": [], "responses": [ { @@ -5049,8 +5073,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -5065,8 +5093,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -5142,8 +5174,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -5158,8 +5197,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -5254,8 +5300,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -5269,8 +5319,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -8635,8 +8689,16 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, @@ -9025,8 +9087,19 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, @@ -13767,8 +13840,16 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -14141,8 +14222,18 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -14816,8 +14907,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -14832,8 +14928,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -14920,8 +15021,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -14936,8 +15042,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 709c263b96..ed8068ad87 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -4230,7 +4230,10 @@ "Project": [], "Key": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4247,7 +4250,10 @@ "Project": [], "Key": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4339,8 +4345,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4356,8 +4369,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4458,8 +4478,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -4475,8 +4499,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -4554,8 +4582,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -4571,8 +4606,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -4669,8 +4711,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -4685,8 +4731,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -8087,8 +8137,16 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, @@ -8483,8 +8541,19 @@ "Project": [], "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, @@ -12936,8 +13005,16 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -13316,8 +13393,18 @@ "Project": [], "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 938ba76f53..c25de95c78 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4848,8 +4848,19 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, @@ -5458,8 +5469,18 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index b4a61db855..dadd2fac84 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4723,7 +4723,10 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4739,7 +4742,10 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4829,8 +4835,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4845,8 +4858,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4945,7 +4965,9 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "range" + ], "required": [], "responses": [ { @@ -4961,7 +4983,9 @@ "auth": { "Project": [] }, - "parameters": [], + "parameters": [ + "range" + ], "required": [], "responses": [ { @@ -5049,8 +5073,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -5065,8 +5093,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -5142,8 +5174,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -5158,8 +5197,15 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -5254,8 +5300,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -5269,8 +5319,12 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -8635,8 +8689,16 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, @@ -9025,8 +9087,19 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, @@ -13767,8 +13840,16 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -14141,8 +14222,18 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, @@ -14816,8 +14907,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -14832,8 +14928,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "queries" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -14920,8 +15021,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -14936,8 +15042,13 @@ "auth": { "Project": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "range" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 709c263b96..ed8068ad87 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -4230,7 +4230,10 @@ "Project": [], "Key": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4247,7 +4250,10 @@ "Project": [], "Key": [] }, - "parameters": [], + "parameters": [ + "queries", + "search" + ], "required": [], "responses": [ { @@ -4339,8 +4345,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4356,8 +4369,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 201, @@ -4458,8 +4478,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -4475,8 +4499,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 200, @@ -4554,8 +4582,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -4571,8 +4606,15 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "name", + "enabled" + ], + "required": [ + "databaseId", + "name" + ], "responses": [ { "code": 200, @@ -4669,8 +4711,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -4685,8 +4731,12 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId" + ], + "required": [ + "databaseId" + ], "responses": [ { "code": 204 @@ -8087,8 +8137,16 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], "responses": [ { "code": 201, @@ -8483,8 +8541,19 @@ "Project": [], "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], "responses": [ { "code": 201, @@ -12936,8 +13005,16 @@ "Project": [], "Key": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rows" + ], + "required": [ + "databaseId", + "tableId", + "rows" + ], "responses": [ { "code": 201, @@ -13316,8 +13393,18 @@ "Project": [], "Session": [] }, - "parameters": [], - "required": [], + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], "responses": [ { "code": 201, From 5ceaf66cc95ef053eb2722078805c0f51f30f396 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 17:14:23 +0530 Subject: [PATCH 294/362] update: regen examples. --- .../client-android/java/databases/create-document.md | 4 +--- .../client-android/java/databases/upsert-document.md | 6 +++--- .../client-android/java/functions/create-execution.md | 2 +- .../client-android/kotlin/databases/create-document.md | 4 +--- .../client-android/kotlin/databases/upsert-document.md | 6 +++--- .../client-android/kotlin/functions/create-execution.md | 2 +- .../client-apple/examples/databases/create-document.md | 4 +--- .../client-apple/examples/databases/upsert-document.md | 8 ++++---- .../client-apple/examples/functions/create-execution.md | 2 +- .../client-flutter/examples/databases/create-document.md | 4 +--- .../client-flutter/examples/databases/upsert-document.md | 6 +++--- .../examples/functions/create-execution.md | 2 +- .../client-graphql/examples/databases/upsert-document.md | 4 +++- .../examples/functions/create-execution.md | 2 +- .../1.8.x/client-graphql/examples/storage/create-file.md | 2 +- .../examples/databases/create-document.md | 4 +--- .../examples/databases/upsert-document.md | 8 ++++---- .../examples/functions/create-execution.md | 2 +- .../examples/account/create-anonymous-session.md | 2 +- .../examples/account/create-email-password-session.md | 2 +- .../client-rest/examples/account/create-email-token.md | 2 +- .../1.8.x/client-rest/examples/account/create-j-w-t.md | 2 +- .../examples/account/create-magic-u-r-l-token.md | 2 +- .../examples/account/create-mfa-authenticator.md | 2 +- .../client-rest/examples/account/create-mfa-challenge.md | 2 +- .../examples/account/create-mfa-recovery-codes.md | 2 +- .../examples/account/create-o-auth2session.md | 2 +- .../client-rest/examples/account/create-o-auth2token.md | 2 +- .../client-rest/examples/account/create-phone-token.md | 2 +- .../examples/account/create-phone-verification.md | 2 +- .../client-rest/examples/account/create-push-target.md | 2 +- .../client-rest/examples/account/create-recovery.md | 2 +- .../1.8.x/client-rest/examples/account/create-session.md | 2 +- .../client-rest/examples/account/create-verification.md | 2 +- .../1.8.x/client-rest/examples/account/create.md | 2 +- .../client-rest/examples/account/delete-identity.md | 2 +- .../examples/account/delete-mfa-authenticator.md | 2 +- .../client-rest/examples/account/delete-push-target.md | 2 +- .../1.8.x/client-rest/examples/account/delete-session.md | 2 +- .../client-rest/examples/account/delete-sessions.md | 2 +- .../examples/account/get-mfa-recovery-codes.md | 2 +- .../1.8.x/client-rest/examples/account/get-prefs.md | 2 +- .../1.8.x/client-rest/examples/account/get-session.md | 2 +- docs/examples/1.8.x/client-rest/examples/account/get.md | 2 +- .../client-rest/examples/account/list-identities.md | 2 +- .../1.8.x/client-rest/examples/account/list-logs.md | 2 +- .../client-rest/examples/account/list-mfa-factors.md | 2 +- .../1.8.x/client-rest/examples/account/list-sessions.md | 2 +- .../1.8.x/client-rest/examples/account/update-email.md | 2 +- .../1.8.x/client-rest/examples/account/update-m-f-a.md | 2 +- .../examples/account/update-magic-u-r-l-session.md | 2 +- .../examples/account/update-mfa-authenticator.md | 2 +- .../client-rest/examples/account/update-mfa-challenge.md | 2 +- .../examples/account/update-mfa-recovery-codes.md | 2 +- .../1.8.x/client-rest/examples/account/update-name.md | 2 +- .../client-rest/examples/account/update-password.md | 2 +- .../client-rest/examples/account/update-phone-session.md | 2 +- .../examples/account/update-phone-verification.md | 2 +- .../1.8.x/client-rest/examples/account/update-phone.md | 2 +- .../1.8.x/client-rest/examples/account/update-prefs.md | 2 +- .../client-rest/examples/account/update-push-target.md | 2 +- .../client-rest/examples/account/update-recovery.md | 2 +- .../1.8.x/client-rest/examples/account/update-session.md | 2 +- .../1.8.x/client-rest/examples/account/update-status.md | 2 +- .../client-rest/examples/account/update-verification.md | 2 +- .../1.8.x/client-rest/examples/avatars/get-browser.md | 2 +- .../client-rest/examples/avatars/get-credit-card.md | 2 +- .../1.8.x/client-rest/examples/avatars/get-favicon.md | 2 +- .../1.8.x/client-rest/examples/avatars/get-flag.md | 2 +- .../1.8.x/client-rest/examples/avatars/get-image.md | 2 +- .../1.8.x/client-rest/examples/avatars/get-initials.md | 2 +- .../1.8.x/client-rest/examples/avatars/get-q-r.md | 2 +- .../client-rest/examples/databases/create-document.md | 2 +- .../client-rest/examples/databases/delete-document.md | 2 +- .../1.8.x/client-rest/examples/databases/get-document.md | 2 +- .../client-rest/examples/databases/list-documents.md | 2 +- .../client-rest/examples/databases/update-document.md | 2 +- .../client-rest/examples/databases/upsert-document.md | 6 +++++- .../client-rest/examples/functions/create-execution.md | 4 ++-- .../client-rest/examples/functions/get-execution.md | 2 +- .../client-rest/examples/functions/list-executions.md | 2 +- .../1.8.x/client-rest/examples/graphql/mutation.md | 2 +- .../examples/1.8.x/client-rest/examples/graphql/query.md | 2 +- docs/examples/1.8.x/client-rest/examples/locale/get.md | 2 +- .../1.8.x/client-rest/examples/locale/list-codes.md | 2 +- .../1.8.x/client-rest/examples/locale/list-continents.md | 2 +- .../client-rest/examples/locale/list-countries-e-u.md | 2 +- .../client-rest/examples/locale/list-countries-phones.md | 2 +- .../1.8.x/client-rest/examples/locale/list-countries.md | 2 +- .../1.8.x/client-rest/examples/locale/list-currencies.md | 2 +- .../1.8.x/client-rest/examples/locale/list-languages.md | 2 +- .../client-rest/examples/messaging/create-subscriber.md | 2 +- .../client-rest/examples/messaging/delete-subscriber.md | 2 +- .../1.8.x/client-rest/examples/storage/create-file.md | 2 +- .../1.8.x/client-rest/examples/storage/delete-file.md | 2 +- .../client-rest/examples/storage/get-file-download.md | 2 +- .../client-rest/examples/storage/get-file-preview.md | 2 +- .../1.8.x/client-rest/examples/storage/get-file-view.md | 2 +- .../1.8.x/client-rest/examples/storage/get-file.md | 2 +- .../1.8.x/client-rest/examples/storage/list-files.md | 2 +- .../1.8.x/client-rest/examples/storage/update-file.md | 2 +- .../client-rest/examples/teams/create-membership.md | 2 +- docs/examples/1.8.x/client-rest/examples/teams/create.md | 2 +- .../client-rest/examples/teams/delete-membership.md | 2 +- docs/examples/1.8.x/client-rest/examples/teams/delete.md | 2 +- .../1.8.x/client-rest/examples/teams/get-membership.md | 2 +- .../1.8.x/client-rest/examples/teams/get-prefs.md | 2 +- docs/examples/1.8.x/client-rest/examples/teams/get.md | 2 +- .../1.8.x/client-rest/examples/teams/list-memberships.md | 2 +- docs/examples/1.8.x/client-rest/examples/teams/list.md | 2 +- .../examples/teams/update-membership-status.md | 2 +- .../client-rest/examples/teams/update-membership.md | 2 +- .../1.8.x/client-rest/examples/teams/update-name.md | 2 +- .../1.8.x/client-rest/examples/teams/update-prefs.md | 2 +- .../client-web/examples/databases/create-document.md | 4 +--- .../client-web/examples/databases/upsert-document.md | 8 ++++---- .../client-web/examples/functions/create-execution.md | 2 +- .../console-cli/examples/databases/upsert-document.md | 4 +++- .../console-cli/examples/databases/upsert-documents.md | 3 ++- .../console-web/examples/databases/create-document.md | 4 +--- .../console-web/examples/databases/create-documents.md | 3 +-- .../console-web/examples/databases/upsert-document.md | 8 ++++---- .../console-web/examples/databases/upsert-documents.md | 6 +++--- .../console-web/examples/functions/create-execution.md | 2 +- .../server-dart/examples/databases/create-document.md | 5 ++--- .../server-dart/examples/databases/create-documents.md | 2 +- .../server-dart/examples/databases/upsert-document.md | 7 ++++--- .../server-dart/examples/databases/upsert-documents.md | 3 ++- .../server-dart/examples/functions/create-execution.md | 2 +- .../server-deno/examples/databases/create-document.md | 5 ++--- .../server-deno/examples/databases/create-documents.md | 2 +- .../server-deno/examples/databases/upsert-document.md | 9 +++++---- .../server-deno/examples/databases/upsert-documents.md | 5 +++-- .../server-deno/examples/functions/create-execution.md | 2 +- .../server-dotnet/examples/databases/create-document.md | 5 ++--- .../server-dotnet/examples/databases/create-documents.md | 2 +- .../server-dotnet/examples/databases/upsert-document.md | 9 +++++---- .../server-dotnet/examples/databases/upsert-documents.md | 5 +++-- .../server-dotnet/examples/functions/create-execution.md | 2 +- .../server-go/examples/databases/create-document.md | 3 +-- .../server-go/examples/databases/create-documents.md | 2 +- .../server-go/examples/databases/upsert-document.md | 5 +++-- .../server-go/examples/databases/upsert-documents.md | 3 ++- .../server-go/examples/functions/create-execution.md | 2 +- .../examples/databases/create-collection.md | 5 +++-- .../server-graphql/examples/databases/create-index.md | 5 +++-- .../examples/databases/update-collection.md | 5 +++-- .../server-graphql/examples/databases/upsert-document.md | 4 +++- .../examples/databases/upsert-documents.md | 3 ++- .../examples/functions/create-deployment.md | 2 +- .../examples/functions/create-execution.md | 2 +- .../server-graphql/examples/sites/create-deployment.md | 2 +- .../1.8.x/server-graphql/examples/storage/create-file.md | 2 +- .../server-kotlin/java/databases/create-document.md | 5 ++--- .../server-kotlin/java/databases/create-documents.md | 2 +- .../server-kotlin/java/databases/upsert-document.md | 7 ++++--- .../server-kotlin/java/databases/upsert-documents.md | 3 ++- .../server-kotlin/java/functions/create-execution.md | 2 +- .../server-kotlin/kotlin/databases/create-document.md | 3 +-- .../server-kotlin/kotlin/databases/create-documents.md | 2 +- .../server-kotlin/kotlin/databases/upsert-document.md | 7 ++++--- .../server-kotlin/kotlin/databases/upsert-documents.md | 5 +++-- .../server-kotlin/kotlin/functions/create-execution.md | 2 +- .../server-nodejs/examples/databases/create-document.md | 5 ++--- .../server-nodejs/examples/databases/create-documents.md | 2 +- .../server-nodejs/examples/databases/upsert-document.md | 9 +++++---- .../server-nodejs/examples/databases/upsert-documents.md | 5 +++-- .../server-nodejs/examples/functions/create-execution.md | 2 +- .../server-php/examples/databases/create-document.md | 5 ++--- .../server-php/examples/databases/create-documents.md | 2 +- .../server-php/examples/databases/upsert-document.md | 9 +++++---- .../server-php/examples/databases/upsert-documents.md | 5 +++-- .../server-php/examples/functions/create-execution.md | 2 +- .../server-python/examples/databases/create-document.md | 3 +-- .../server-python/examples/databases/create-documents.md | 2 +- .../server-python/examples/databases/upsert-document.md | 7 ++++--- .../server-python/examples/databases/upsert-documents.md | 5 +++-- .../server-python/examples/functions/create-execution.md | 2 +- .../examples/account/create-anonymous-session.md | 2 +- .../examples/account/create-email-password-session.md | 2 +- .../server-rest/examples/account/create-email-token.md | 2 +- .../1.8.x/server-rest/examples/account/create-j-w-t.md | 2 +- .../examples/account/create-magic-u-r-l-token.md | 2 +- .../examples/account/create-mfa-authenticator.md | 2 +- .../server-rest/examples/account/create-mfa-challenge.md | 2 +- .../examples/account/create-mfa-recovery-codes.md | 2 +- .../server-rest/examples/account/create-o-auth2token.md | 2 +- .../server-rest/examples/account/create-phone-token.md | 2 +- .../examples/account/create-phone-verification.md | 2 +- .../server-rest/examples/account/create-recovery.md | 2 +- .../1.8.x/server-rest/examples/account/create-session.md | 2 +- .../server-rest/examples/account/create-verification.md | 2 +- .../1.8.x/server-rest/examples/account/create.md | 2 +- .../server-rest/examples/account/delete-identity.md | 2 +- .../examples/account/delete-mfa-authenticator.md | 2 +- .../1.8.x/server-rest/examples/account/delete-session.md | 2 +- .../server-rest/examples/account/delete-sessions.md | 2 +- .../examples/account/get-mfa-recovery-codes.md | 2 +- .../1.8.x/server-rest/examples/account/get-prefs.md | 2 +- .../1.8.x/server-rest/examples/account/get-session.md | 2 +- docs/examples/1.8.x/server-rest/examples/account/get.md | 2 +- .../server-rest/examples/account/list-identities.md | 2 +- .../1.8.x/server-rest/examples/account/list-logs.md | 2 +- .../server-rest/examples/account/list-mfa-factors.md | 2 +- .../1.8.x/server-rest/examples/account/list-sessions.md | 2 +- .../1.8.x/server-rest/examples/account/update-email.md | 2 +- .../1.8.x/server-rest/examples/account/update-m-f-a.md | 2 +- .../examples/account/update-magic-u-r-l-session.md | 2 +- .../examples/account/update-mfa-authenticator.md | 2 +- .../server-rest/examples/account/update-mfa-challenge.md | 2 +- .../examples/account/update-mfa-recovery-codes.md | 2 +- .../1.8.x/server-rest/examples/account/update-name.md | 2 +- .../server-rest/examples/account/update-password.md | 2 +- .../server-rest/examples/account/update-phone-session.md | 2 +- .../examples/account/update-phone-verification.md | 2 +- .../1.8.x/server-rest/examples/account/update-phone.md | 2 +- .../1.8.x/server-rest/examples/account/update-prefs.md | 2 +- .../server-rest/examples/account/update-recovery.md | 2 +- .../1.8.x/server-rest/examples/account/update-session.md | 2 +- .../1.8.x/server-rest/examples/account/update-status.md | 2 +- .../server-rest/examples/account/update-verification.md | 2 +- .../1.8.x/server-rest/examples/avatars/get-browser.md | 2 +- .../server-rest/examples/avatars/get-credit-card.md | 2 +- .../1.8.x/server-rest/examples/avatars/get-favicon.md | 2 +- .../1.8.x/server-rest/examples/avatars/get-flag.md | 2 +- .../1.8.x/server-rest/examples/avatars/get-image.md | 2 +- .../1.8.x/server-rest/examples/avatars/get-initials.md | 2 +- .../1.8.x/server-rest/examples/avatars/get-q-r.md | 2 +- .../examples/databases/create-boolean-attribute.md | 2 +- .../server-rest/examples/databases/create-collection.md | 2 +- .../examples/databases/create-datetime-attribute.md | 2 +- .../server-rest/examples/databases/create-document.md | 2 +- .../server-rest/examples/databases/create-documents.md | 2 +- .../examples/databases/create-email-attribute.md | 2 +- .../examples/databases/create-enum-attribute.md | 2 +- .../examples/databases/create-float-attribute.md | 2 +- .../1.8.x/server-rest/examples/databases/create-index.md | 2 +- .../examples/databases/create-integer-attribute.md | 2 +- .../examples/databases/create-ip-attribute.md | 2 +- .../examples/databases/create-relationship-attribute.md | 2 +- .../examples/databases/create-string-attribute.md | 2 +- .../examples/databases/create-url-attribute.md | 2 +- .../1.8.x/server-rest/examples/databases/create.md | 2 +- .../examples/databases/decrement-document-attribute.md | 2 +- .../server-rest/examples/databases/delete-attribute.md | 2 +- .../server-rest/examples/databases/delete-collection.md | 2 +- .../server-rest/examples/databases/delete-document.md | 2 +- .../server-rest/examples/databases/delete-documents.md | 2 +- .../1.8.x/server-rest/examples/databases/delete-index.md | 2 +- .../1.8.x/server-rest/examples/databases/delete.md | 2 +- .../server-rest/examples/databases/get-attribute.md | 2 +- .../server-rest/examples/databases/get-collection.md | 2 +- .../1.8.x/server-rest/examples/databases/get-document.md | 2 +- .../1.8.x/server-rest/examples/databases/get-index.md | 2 +- .../examples/1.8.x/server-rest/examples/databases/get.md | 2 +- .../examples/databases/increment-document-attribute.md | 2 +- .../server-rest/examples/databases/list-attributes.md | 2 +- .../server-rest/examples/databases/list-collections.md | 2 +- .../server-rest/examples/databases/list-documents.md | 2 +- .../1.8.x/server-rest/examples/databases/list-indexes.md | 2 +- .../1.8.x/server-rest/examples/databases/list.md | 2 +- .../examples/databases/update-boolean-attribute.md | 2 +- .../server-rest/examples/databases/update-collection.md | 2 +- .../examples/databases/update-datetime-attribute.md | 2 +- .../server-rest/examples/databases/update-document.md | 2 +- .../server-rest/examples/databases/update-documents.md | 2 +- .../examples/databases/update-email-attribute.md | 2 +- .../examples/databases/update-enum-attribute.md | 2 +- .../examples/databases/update-float-attribute.md | 2 +- .../examples/databases/update-integer-attribute.md | 2 +- .../examples/databases/update-ip-attribute.md | 2 +- .../examples/databases/update-relationship-attribute.md | 2 +- .../examples/databases/update-string-attribute.md | 2 +- .../examples/databases/update-url-attribute.md | 2 +- .../1.8.x/server-rest/examples/databases/update.md | 2 +- .../server-rest/examples/databases/upsert-document.md | 6 +++++- .../server-rest/examples/databases/upsert-documents.md | 5 ++++- .../server-rest/examples/functions/create-deployment.md | 2 +- .../examples/functions/create-duplicate-deployment.md | 2 +- .../server-rest/examples/functions/create-execution.md | 4 ++-- .../examples/functions/create-template-deployment.md | 2 +- .../server-rest/examples/functions/create-variable.md | 2 +- .../examples/functions/create-vcs-deployment.md | 2 +- .../1.8.x/server-rest/examples/functions/create.md | 2 +- .../server-rest/examples/functions/delete-deployment.md | 2 +- .../server-rest/examples/functions/delete-execution.md | 2 +- .../server-rest/examples/functions/delete-variable.md | 2 +- .../1.8.x/server-rest/examples/functions/delete.md | 2 +- .../examples/functions/get-deployment-download.md | 2 +- .../server-rest/examples/functions/get-deployment.md | 2 +- .../server-rest/examples/functions/get-execution.md | 2 +- .../1.8.x/server-rest/examples/functions/get-variable.md | 2 +- .../examples/1.8.x/server-rest/examples/functions/get.md | 2 +- .../server-rest/examples/functions/list-deployments.md | 2 +- .../server-rest/examples/functions/list-executions.md | 2 +- .../server-rest/examples/functions/list-runtimes.md | 2 +- .../examples/functions/list-specifications.md | 2 +- .../server-rest/examples/functions/list-variables.md | 2 +- .../1.8.x/server-rest/examples/functions/list.md | 2 +- .../examples/functions/update-deployment-status.md | 2 +- .../examples/functions/update-function-deployment.md | 2 +- .../server-rest/examples/functions/update-variable.md | 2 +- .../1.8.x/server-rest/examples/functions/update.md | 2 +- .../1.8.x/server-rest/examples/graphql/mutation.md | 2 +- .../examples/1.8.x/server-rest/examples/graphql/query.md | 2 +- .../1.8.x/server-rest/examples/health/get-antivirus.md | 2 +- .../1.8.x/server-rest/examples/health/get-cache.md | 2 +- .../1.8.x/server-rest/examples/health/get-certificate.md | 2 +- .../1.8.x/server-rest/examples/health/get-d-b.md | 2 +- .../1.8.x/server-rest/examples/health/get-failed-jobs.md | 2 +- .../1.8.x/server-rest/examples/health/get-pub-sub.md | 2 +- .../server-rest/examples/health/get-queue-builds.md | 2 +- .../examples/health/get-queue-certificates.md | 2 +- .../server-rest/examples/health/get-queue-databases.md | 2 +- .../server-rest/examples/health/get-queue-deletes.md | 2 +- .../server-rest/examples/health/get-queue-functions.md | 2 +- .../1.8.x/server-rest/examples/health/get-queue-logs.md | 2 +- .../1.8.x/server-rest/examples/health/get-queue-mails.md | 2 +- .../server-rest/examples/health/get-queue-messaging.md | 2 +- .../server-rest/examples/health/get-queue-migrations.md | 2 +- .../examples/health/get-queue-stats-resources.md | 2 +- .../1.8.x/server-rest/examples/health/get-queue-usage.md | 2 +- .../server-rest/examples/health/get-queue-webhooks.md | 2 +- .../server-rest/examples/health/get-storage-local.md | 2 +- .../1.8.x/server-rest/examples/health/get-storage.md | 2 +- .../1.8.x/server-rest/examples/health/get-time.md | 2 +- docs/examples/1.8.x/server-rest/examples/health/get.md | 2 +- docs/examples/1.8.x/server-rest/examples/locale/get.md | 2 +- .../1.8.x/server-rest/examples/locale/list-codes.md | 2 +- .../1.8.x/server-rest/examples/locale/list-continents.md | 2 +- .../server-rest/examples/locale/list-countries-e-u.md | 2 +- .../server-rest/examples/locale/list-countries-phones.md | 2 +- .../1.8.x/server-rest/examples/locale/list-countries.md | 2 +- .../1.8.x/server-rest/examples/locale/list-currencies.md | 2 +- .../1.8.x/server-rest/examples/locale/list-languages.md | 2 +- .../examples/messaging/create-apns-provider.md | 2 +- .../1.8.x/server-rest/examples/messaging/create-email.md | 2 +- .../examples/messaging/create-fcm-provider.md | 2 +- .../examples/messaging/create-mailgun-provider.md | 2 +- .../examples/messaging/create-msg91provider.md | 2 +- .../1.8.x/server-rest/examples/messaging/create-push.md | 2 +- .../examples/messaging/create-sendgrid-provider.md | 2 +- .../1.8.x/server-rest/examples/messaging/create-sms.md | 2 +- .../examples/messaging/create-smtp-provider.md | 2 +- .../server-rest/examples/messaging/create-subscriber.md | 2 +- .../examples/messaging/create-telesign-provider.md | 2 +- .../examples/messaging/create-textmagic-provider.md | 2 +- .../1.8.x/server-rest/examples/messaging/create-topic.md | 2 +- .../examples/messaging/create-twilio-provider.md | 2 +- .../examples/messaging/create-vonage-provider.md | 2 +- .../server-rest/examples/messaging/delete-provider.md | 2 +- .../server-rest/examples/messaging/delete-subscriber.md | 2 +- .../1.8.x/server-rest/examples/messaging/delete-topic.md | 2 +- .../1.8.x/server-rest/examples/messaging/delete.md | 2 +- .../1.8.x/server-rest/examples/messaging/get-message.md | 2 +- .../1.8.x/server-rest/examples/messaging/get-provider.md | 2 +- .../server-rest/examples/messaging/get-subscriber.md | 2 +- .../1.8.x/server-rest/examples/messaging/get-topic.md | 2 +- .../server-rest/examples/messaging/list-message-logs.md | 2 +- .../server-rest/examples/messaging/list-messages.md | 2 +- .../server-rest/examples/messaging/list-provider-logs.md | 2 +- .../server-rest/examples/messaging/list-providers.md | 2 +- .../examples/messaging/list-subscriber-logs.md | 2 +- .../server-rest/examples/messaging/list-subscribers.md | 2 +- .../1.8.x/server-rest/examples/messaging/list-targets.md | 2 +- .../server-rest/examples/messaging/list-topic-logs.md | 2 +- .../1.8.x/server-rest/examples/messaging/list-topics.md | 2 +- .../examples/messaging/update-apns-provider.md | 2 +- .../1.8.x/server-rest/examples/messaging/update-email.md | 2 +- .../examples/messaging/update-fcm-provider.md | 2 +- .../examples/messaging/update-mailgun-provider.md | 2 +- .../examples/messaging/update-msg91provider.md | 2 +- .../1.8.x/server-rest/examples/messaging/update-push.md | 2 +- .../examples/messaging/update-sendgrid-provider.md | 2 +- .../1.8.x/server-rest/examples/messaging/update-sms.md | 2 +- .../examples/messaging/update-smtp-provider.md | 2 +- .../examples/messaging/update-telesign-provider.md | 2 +- .../examples/messaging/update-textmagic-provider.md | 2 +- .../1.8.x/server-rest/examples/messaging/update-topic.md | 2 +- .../examples/messaging/update-twilio-provider.md | 2 +- .../examples/messaging/update-vonage-provider.md | 2 +- .../server-rest/examples/sites/create-deployment.md | 2 +- .../examples/sites/create-duplicate-deployment.md | 2 +- .../examples/sites/create-template-deployment.md | 2 +- .../1.8.x/server-rest/examples/sites/create-variable.md | 2 +- .../server-rest/examples/sites/create-vcs-deployment.md | 2 +- docs/examples/1.8.x/server-rest/examples/sites/create.md | 2 +- .../server-rest/examples/sites/delete-deployment.md | 2 +- .../1.8.x/server-rest/examples/sites/delete-log.md | 2 +- .../1.8.x/server-rest/examples/sites/delete-variable.md | 2 +- docs/examples/1.8.x/server-rest/examples/sites/delete.md | 2 +- .../examples/sites/get-deployment-download.md | 2 +- .../1.8.x/server-rest/examples/sites/get-deployment.md | 2 +- .../examples/1.8.x/server-rest/examples/sites/get-log.md | 2 +- .../1.8.x/server-rest/examples/sites/get-variable.md | 2 +- docs/examples/1.8.x/server-rest/examples/sites/get.md | 2 +- .../1.8.x/server-rest/examples/sites/list-deployments.md | 2 +- .../1.8.x/server-rest/examples/sites/list-frameworks.md | 2 +- .../1.8.x/server-rest/examples/sites/list-logs.md | 2 +- .../server-rest/examples/sites/list-specifications.md | 2 +- .../1.8.x/server-rest/examples/sites/list-variables.md | 2 +- docs/examples/1.8.x/server-rest/examples/sites/list.md | 2 +- .../examples/sites/update-deployment-status.md | 2 +- .../server-rest/examples/sites/update-site-deployment.md | 2 +- .../1.8.x/server-rest/examples/sites/update-variable.md | 2 +- docs/examples/1.8.x/server-rest/examples/sites/update.md | 2 +- .../1.8.x/server-rest/examples/storage/create-bucket.md | 2 +- .../1.8.x/server-rest/examples/storage/create-file.md | 2 +- .../1.8.x/server-rest/examples/storage/delete-bucket.md | 2 +- .../1.8.x/server-rest/examples/storage/delete-file.md | 2 +- .../1.8.x/server-rest/examples/storage/get-bucket.md | 2 +- .../server-rest/examples/storage/get-file-download.md | 2 +- .../server-rest/examples/storage/get-file-preview.md | 2 +- .../1.8.x/server-rest/examples/storage/get-file-view.md | 2 +- .../1.8.x/server-rest/examples/storage/get-file.md | 2 +- .../1.8.x/server-rest/examples/storage/list-buckets.md | 2 +- .../1.8.x/server-rest/examples/storage/list-files.md | 2 +- .../1.8.x/server-rest/examples/storage/update-bucket.md | 2 +- .../1.8.x/server-rest/examples/storage/update-file.md | 2 +- .../server-rest/examples/teams/create-membership.md | 2 +- docs/examples/1.8.x/server-rest/examples/teams/create.md | 2 +- .../server-rest/examples/teams/delete-membership.md | 2 +- docs/examples/1.8.x/server-rest/examples/teams/delete.md | 2 +- .../1.8.x/server-rest/examples/teams/get-membership.md | 2 +- .../1.8.x/server-rest/examples/teams/get-prefs.md | 2 +- docs/examples/1.8.x/server-rest/examples/teams/get.md | 2 +- .../1.8.x/server-rest/examples/teams/list-memberships.md | 2 +- docs/examples/1.8.x/server-rest/examples/teams/list.md | 2 +- .../examples/teams/update-membership-status.md | 2 +- .../server-rest/examples/teams/update-membership.md | 2 +- .../1.8.x/server-rest/examples/teams/update-name.md | 2 +- .../1.8.x/server-rest/examples/teams/update-prefs.md | 2 +- .../server-rest/examples/tokens/create-file-token.md | 2 +- .../examples/1.8.x/server-rest/examples/tokens/delete.md | 2 +- docs/examples/1.8.x/server-rest/examples/tokens/get.md | 2 +- docs/examples/1.8.x/server-rest/examples/tokens/list.md | 2 +- .../examples/1.8.x/server-rest/examples/tokens/update.md | 2 +- .../server-rest/examples/users/create-argon2user.md | 2 +- .../server-rest/examples/users/create-bcrypt-user.md | 2 +- .../1.8.x/server-rest/examples/users/create-j-w-t.md | 2 +- .../1.8.x/server-rest/examples/users/create-m-d5user.md | 2 +- .../examples/users/create-mfa-recovery-codes.md | 2 +- .../server-rest/examples/users/create-p-h-pass-user.md | 2 +- .../server-rest/examples/users/create-s-h-a-user.md | 2 +- .../examples/users/create-scrypt-modified-user.md | 2 +- .../server-rest/examples/users/create-scrypt-user.md | 2 +- .../1.8.x/server-rest/examples/users/create-session.md | 2 +- .../1.8.x/server-rest/examples/users/create-target.md | 2 +- .../1.8.x/server-rest/examples/users/create-token.md | 2 +- docs/examples/1.8.x/server-rest/examples/users/create.md | 2 +- .../1.8.x/server-rest/examples/users/delete-identity.md | 2 +- .../examples/users/delete-mfa-authenticator.md | 2 +- .../1.8.x/server-rest/examples/users/delete-session.md | 2 +- .../1.8.x/server-rest/examples/users/delete-sessions.md | 2 +- .../1.8.x/server-rest/examples/users/delete-target.md | 2 +- docs/examples/1.8.x/server-rest/examples/users/delete.md | 2 +- .../server-rest/examples/users/get-mfa-recovery-codes.md | 2 +- .../1.8.x/server-rest/examples/users/get-prefs.md | 2 +- .../1.8.x/server-rest/examples/users/get-target.md | 2 +- docs/examples/1.8.x/server-rest/examples/users/get.md | 2 +- .../1.8.x/server-rest/examples/users/list-identities.md | 2 +- .../1.8.x/server-rest/examples/users/list-logs.md | 2 +- .../1.8.x/server-rest/examples/users/list-memberships.md | 2 +- .../1.8.x/server-rest/examples/users/list-mfa-factors.md | 2 +- .../1.8.x/server-rest/examples/users/list-sessions.md | 2 +- .../1.8.x/server-rest/examples/users/list-targets.md | 2 +- docs/examples/1.8.x/server-rest/examples/users/list.md | 2 +- .../examples/users/update-email-verification.md | 2 +- .../1.8.x/server-rest/examples/users/update-email.md | 2 +- .../1.8.x/server-rest/examples/users/update-labels.md | 2 +- .../examples/users/update-mfa-recovery-codes.md | 2 +- .../1.8.x/server-rest/examples/users/update-mfa.md | 2 +- .../1.8.x/server-rest/examples/users/update-name.md | 2 +- .../1.8.x/server-rest/examples/users/update-password.md | 2 +- .../examples/users/update-phone-verification.md | 2 +- .../1.8.x/server-rest/examples/users/update-phone.md | 2 +- .../1.8.x/server-rest/examples/users/update-prefs.md | 2 +- .../1.8.x/server-rest/examples/users/update-status.md | 2 +- .../1.8.x/server-rest/examples/users/update-target.md | 2 +- .../server-ruby/examples/databases/create-document.md | 3 +-- .../server-ruby/examples/databases/create-documents.md | 2 +- .../server-ruby/examples/databases/upsert-document.md | 7 ++++--- .../server-ruby/examples/databases/upsert-documents.md | 5 +++-- .../server-ruby/examples/functions/create-execution.md | 2 +- .../server-swift/examples/databases/create-document.md | 3 +-- .../server-swift/examples/databases/create-documents.md | 2 +- .../server-swift/examples/databases/upsert-document.md | 7 ++++--- .../server-swift/examples/databases/upsert-documents.md | 5 +++-- .../server-swift/examples/functions/create-execution.md | 2 +- 489 files changed, 597 insertions(+), 579 deletions(-) diff --git a/docs/examples/1.8.x/client-android/java/databases/create-document.md b/docs/examples/1.8.x/client-android/java/databases/create-document.md index 7fb129bb0b..4804d751e3 100644 --- a/docs/examples/1.8.x/client-android/java/databases/create-document.md +++ b/docs/examples/1.8.x/client-android/java/databases/create-document.md @@ -4,9 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client(context) .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>"); // Your project ID Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/client-android/java/databases/upsert-document.md b/docs/examples/1.8.x/client-android/java/databases/upsert-document.md index ba7336f3f9..868576b982 100644 --- a/docs/examples/1.8.x/client-android/java/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-android/java/databases/upsert-document.md @@ -4,9 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client(context) .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>"); // Your project ID Databases databases = new Databases(client); @@ -14,6 +12,8 @@ databases.upsertDocument( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/client-android/java/functions/create-execution.md b/docs/examples/1.8.x/client-android/java/functions/create-execution.md index c138b0ef86..06c50278a5 100644 --- a/docs/examples/1.8.x/client-android/java/functions/create-execution.md +++ b/docs/examples/1.8.x/client-android/java/functions/create-execution.md @@ -15,7 +15,7 @@ functions.createExecution( "<PATH>", // path (optional) ExecutionMethod.GET, // method (optional) mapOf( "a" to "b" ), // headers (optional) - "", // scheduledAt (optional) + "<SCHEDULED_AT>", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md index 0bafb315e7..849a636afb 100644 --- a/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md +++ b/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md @@ -4,9 +4,7 @@ import io.appwrite.services.Databases val client = Client(context) .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID val databases = Databases(client) diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md index 7939fde2be..a31dfc8797 100644 --- a/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md @@ -4,9 +4,7 @@ import io.appwrite.services.Databases val client = Client(context) .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID val databases = Databases(client) @@ -14,4 +12,6 @@ val result = databases.upsertDocument( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")"), // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md b/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md index cb7c60bac1..5e1950b8d9 100644 --- a/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md +++ b/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md @@ -15,5 +15,5 @@ val result = functions.createExecution( path = "<PATH>", // (optional) method = ExecutionMethod.GET, // (optional) headers = mapOf( "a" to "b" ), // (optional) - scheduledAt = "", // (optional) + scheduledAt = "<SCHEDULED_AT>", // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-apple/examples/databases/create-document.md b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md index 6c2baee728..51adb64bb3 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md @@ -2,9 +2,7 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID let databases = Databases(client) diff --git a/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md index bb713146ec..3e1bf83a66 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md @@ -2,15 +2,15 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID let databases = Databases(client) let document = try await databases.upsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>" + documentId: "<DOCUMENT_ID>", + data: [:], + permissions: ["read("any")"] // optional ) diff --git a/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md b/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md index 7470e9ebf6..b7311df846 100644 --- a/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md @@ -14,6 +14,6 @@ let execution = try await functions.createExecution( path: "<PATH>", // optional method: .gET, // optional headers: [:], // optional - scheduledAt: "" // optional + scheduledAt: "<SCHEDULED_AT>" // optional ) diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md index 4f286fff95..27efc34580 100644 --- a/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md @@ -2,9 +2,7 @@ import 'package:appwrite/appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID Databases databases = Databases(client); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md index ec3af47c3a..398a99cb1d 100644 --- a/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md @@ -2,9 +2,7 @@ import 'package:appwrite/appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID Databases databases = Databases(client); @@ -12,4 +10,6 @@ Document result = await databases.upsertDocument( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"], // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md b/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md index d2a3d9e00a..bbd7cd37a6 100644 --- a/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md @@ -13,5 +13,5 @@ Execution result = await functions.createExecution( path: '<PATH>', // optional method: ExecutionMethod.gET, // optional headers: {}, // optional - scheduledAt: '', // optional + scheduledAt: '<SCHEDULED_AT>', // optional ); diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md index c381fe35a3..9d1e753081 100644 --- a/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md @@ -2,7 +2,9 @@ mutation { databasesUpsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>" + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read("any")"] ) { _id _sequence diff --git a/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md b/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md index 1479aa3bb6..8979880723 100644 --- a/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md @@ -6,7 +6,7 @@ mutation { path: "<PATH>", method: "GET", headers: "{}", - scheduledAt: "" + scheduledAt: "<SCHEDULED_AT>" ) { _id _createdAt diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md b/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md index 97e2150c39..50161e433f 100644 --- a/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md +++ b/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md index ec768fcfaf..1b28231ed3 100644 --- a/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md @@ -2,9 +2,7 @@ import { Client, Databases } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md index 56d3af23ae..ae423d12a7 100644 --- a/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md @@ -2,16 +2,16 @@ import { Client, Databases } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); const result = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md b/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md index 72c71f7767..7d850c8103 100644 --- a/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md @@ -13,7 +13,7 @@ const result = await functions.createExecution( '<PATH>', // path (optional) ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '' // scheduledAt (optional) + '<SCHEDULED_AT>' // scheduledAt (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md index 2079b045d1..b62c82a6a8 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md @@ -1,6 +1,6 @@ POST /v1/account/sessions/anonymous HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md index 8aee0e5b15..1103d2ebfb 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md @@ -1,7 +1,7 @@ POST /v1/account/sessions/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md index 98c5c9b454..552b724b9c 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md index a8da4695c3..62a7dee7e9 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md @@ -1,6 +1,6 @@ POST /v1/account/jwts HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md index a3db43516a..29d68bd0fa 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/magic-url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md index 8d6b52b877..62a068b6cf 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md index 9a84c0ef69..dd5ef4c731 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/challenge HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md index 797824d5d7..f09323df0b 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md index 293170b490..d136722ec8 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md @@ -1,4 +1,4 @@ GET /v1/account/sessions/oauth2/{provider} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md index dd1dd3ec5e..8a0cab614f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md @@ -1,4 +1,4 @@ GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md index eef1021d9e..5127c8377a 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md index d161e580ff..57b3b7d160 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md @@ -1,7 +1,7 @@ POST /v1/account/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md index 5844ccc19e..459a2a2ecc 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md @@ -1,7 +1,7 @@ POST /v1/account/targets/push HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md b/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md index c195b96a5e..ea0146228b 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md @@ -1,7 +1,7 @@ POST /v1/account/recovery HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-session.md index 18e3b1acdd..0acc50cda6 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-session.md @@ -1,7 +1,7 @@ POST /v1/account/sessions/token HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-verification.md b/docs/examples/1.8.x/client-rest/examples/account/create-verification.md index 1185d3a875..ed5479dbe5 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-verification.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-verification.md @@ -1,7 +1,7 @@ POST /v1/account/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create.md b/docs/examples/1.8.x/client-rest/examples/account/create.md index f546c07de5..15bb386f41 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create.md @@ -1,7 +1,7 @@ POST /v1/account HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md b/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md index edb036a593..bacca18870 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md @@ -1,7 +1,7 @@ DELETE /v1/account/identities/{identityId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md index de58948195..a0eb5a0869 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md @@ -1,7 +1,7 @@ DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md index fdfc75a41b..9ec6e20d27 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md @@ -1,7 +1,7 @@ DELETE /v1/account/targets/{targetId}/push HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-session.md b/docs/examples/1.8.x/client-rest/examples/account/delete-session.md index 9454a84913..c9b0f48d6f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-session.md @@ -1,7 +1,7 @@ DELETE /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md index 97931c12e5..0b3fcd1c45 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md @@ -1,7 +1,7 @@ DELETE /v1/account/sessions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md index 81edee5234..2ab10a2475 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md @@ -1,6 +1,6 @@ GET /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md b/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md index 13a0b74d8f..a038dacbfd 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md +++ b/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md @@ -1,6 +1,6 @@ GET /v1/account/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-session.md b/docs/examples/1.8.x/client-rest/examples/account/get-session.md index 9417755b04..3e372a05ef 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/get-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/get-session.md @@ -1,6 +1,6 @@ GET /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/get.md b/docs/examples/1.8.x/client-rest/examples/account/get.md index 023a6d116f..104b643074 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/get.md +++ b/docs/examples/1.8.x/client-rest/examples/account/get.md @@ -1,6 +1,6 @@ GET /v1/account HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-identities.md b/docs/examples/1.8.x/client-rest/examples/account/list-identities.md index 65edceb8d6..5acb221584 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/list-identities.md +++ b/docs/examples/1.8.x/client-rest/examples/account/list-identities.md @@ -1,6 +1,6 @@ GET /v1/account/identities HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-logs.md b/docs/examples/1.8.x/client-rest/examples/account/list-logs.md index 71e2e138ef..8314123c9e 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/list-logs.md +++ b/docs/examples/1.8.x/client-rest/examples/account/list-logs.md @@ -1,6 +1,6 @@ GET /v1/account/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md index 217ec6cb30..c591143d4e 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md +++ b/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md @@ -1,6 +1,6 @@ GET /v1/account/mfa/factors HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md b/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md index 7bff23f25b..89ef6962c9 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md +++ b/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md @@ -1,6 +1,6 @@ GET /v1/account/sessions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-email.md b/docs/examples/1.8.x/client-rest/examples/account/update-email.md index fc3baaf4a4..382327e31b 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-email.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-email.md @@ -1,7 +1,7 @@ PATCH /v1/account/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md index 803c47a857..a22b169751 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md @@ -1,7 +1,7 @@ PATCH /v1/account/mfa HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md index 3238322e0f..1a82afbfcc 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md @@ -1,7 +1,7 @@ PUT /v1/account/sessions/magic-url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md index 9d3e5dceea..780472291c 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md @@ -1,7 +1,7 @@ PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md index ddc27ae334..b6a7e92b28 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md @@ -1,7 +1,7 @@ PUT /v1/account/mfa/challenge HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md index e4ab8abb3b..74e9225f3e 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md @@ -1,7 +1,7 @@ PATCH /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-name.md b/docs/examples/1.8.x/client-rest/examples/account/update-name.md index f2f7caa204..4c9c0e302c 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-name.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-name.md @@ -1,7 +1,7 @@ PATCH /v1/account/name HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-password.md b/docs/examples/1.8.x/client-rest/examples/account/update-password.md index 4f69b9ab3f..e05a1c2b7f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-password.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-password.md @@ -1,7 +1,7 @@ PATCH /v1/account/password HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md index f1bc27d201..54872eecd2 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md @@ -1,7 +1,7 @@ PUT /v1/account/sessions/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md index ee6f5a68ff..1d4dc22520 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md @@ -1,7 +1,7 @@ PUT /v1/account/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone.md index bbe602a181..791caadb0d 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-phone.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone.md @@ -1,7 +1,7 @@ PATCH /v1/account/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md b/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md index aeabc2b68f..24f2d3bcb6 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md @@ -1,7 +1,7 @@ PATCH /v1/account/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md index 2e42a2d67f..95210b5a1c 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md @@ -1,7 +1,7 @@ PUT /v1/account/targets/{targetId}/push HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md b/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md index 054aacc8ed..7d40ee79fe 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md @@ -1,7 +1,7 @@ PUT /v1/account/recovery HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-session.md index 9b2ba0e4a7..8e2257aeed 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-session.md @@ -1,7 +1,7 @@ PATCH /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-status.md b/docs/examples/1.8.x/client-rest/examples/account/update-status.md index 8a3e01db0b..557697fe5f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-status.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-status.md @@ -1,7 +1,7 @@ PATCH /v1/account/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-verification.md b/docs/examples/1.8.x/client-rest/examples/account/update-verification.md index 0c5ed8b55d..a4dcbf76a3 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-verification.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-verification.md @@ -1,7 +1,7 @@ PUT /v1/account/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md index e5f6f22ab5..9de9d99173 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md @@ -1,6 +1,6 @@ GET /v1/avatars/browsers/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md index ab513115f8..ed30226d3b 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md @@ -1,6 +1,6 @@ GET /v1/avatars/credit-cards/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md index 837dba633c..8eaca9452e 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md @@ -1,6 +1,6 @@ GET /v1/avatars/favicon HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md index d0c92d7c02..07172e89d8 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md @@ -1,6 +1,6 @@ GET /v1/avatars/flags/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md index 2f80018f20..98d4898e6f 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md @@ -1,6 +1,6 @@ GET /v1/avatars/image HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md index f3879b5d52..93a70a80ab 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md @@ -1,6 +1,6 @@ GET /v1/avatars/initials HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md index 263c54742c..39e513c810 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md @@ -1,6 +1,6 @@ GET /v1/avatars/qr HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/create-document.md b/docs/examples/1.8.x/client-rest/examples/databases/create-document.md index 3126197555..e9b165e2ac 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/create-document.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md b/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md index 6b86aba853..2ee4f92ec4 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/get-document.md b/docs/examples/1.8.x/client-rest/examples/databases/get-document.md index a32db40087..dac5e48131 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/get-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/get-document.md @@ -1,6 +1,6 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md b/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md index 22ca529e89..e5c4936d6f 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md @@ -1,6 +1,6 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/update-document.md b/docs/examples/1.8.x/client-rest/examples/databases/update-document.md index 945b957c6e..ffc5d36011 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/update-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/update-document.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md index 7cfa380a40..d2baeac6a8 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md @@ -1,8 +1,12 @@ PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md b/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md index fec92ddab0..4ae83f3096 100644 --- a/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/executions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> @@ -12,5 +12,5 @@ X-Appwrite-JWT: <YOUR_JWT> "path": "<PATH>", "method": "GET", "headers": {}, - "scheduledAt": + "scheduledAt": "<SCHEDULED_AT>" } diff --git a/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md b/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md index 7df2f3acbe..e2f3e97d10 100644 --- a/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md +++ b/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md b/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md index b2ab0e05d1..445ed1fa83 100644 --- a/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md +++ b/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/executions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md b/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md index db3b1c0c78..4080765d58 100644 --- a/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md @@ -2,7 +2,7 @@ POST /v1/graphql/mutation HTTP/1.1 Host: cloud.appwrite.io X-Sdk-Graphql: true Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/graphql/query.md b/docs/examples/1.8.x/client-rest/examples/graphql/query.md index 8fc41efcfe..b05ce724c8 100644 --- a/docs/examples/1.8.x/client-rest/examples/graphql/query.md +++ b/docs/examples/1.8.x/client-rest/examples/graphql/query.md @@ -2,7 +2,7 @@ POST /v1/graphql HTTP/1.1 Host: cloud.appwrite.io X-Sdk-Graphql: true Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/get.md b/docs/examples/1.8.x/client-rest/examples/locale/get.md index 0d67644583..8f8a1741e6 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/get.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/get.md @@ -1,6 +1,6 @@ GET /v1/locale HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md b/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md index f362c5987e..61110f6527 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md @@ -1,6 +1,6 @@ GET /v1/locale/codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md b/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md index 93db4fb302..cb96cc4e16 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md @@ -1,6 +1,6 @@ GET /v1/locale/continents HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md index 09eba6168f..d4de74a879 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md @@ -1,6 +1,6 @@ GET /v1/locale/countries/eu HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md index 94ef0bb943..0e1ed67a7d 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md @@ -1,6 +1,6 @@ GET /v1/locale/countries/phones HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md index dc8289980a..58e487a875 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md @@ -1,6 +1,6 @@ GET /v1/locale/countries HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md index 9a3af20c94..a3a9b96c48 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md @@ -1,6 +1,6 @@ GET /v1/locale/currencies HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md b/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md index 7d90c8b40a..8c7cbabddf 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md @@ -1,6 +1,6 @@ GET /v1/locale/languages HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md index 94e98c4438..708ec0782a 100644 --- a/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md +++ b/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md @@ -1,7 +1,7 @@ POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md index e5ac0830a3..1cb9c3e516 100644 --- a/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/create-file.md b/docs/examples/1.8.x/client-rest/examples/storage/create-file.md index f044b577b2..0f83797b70 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/create-file.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/create-file.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md b/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md index 8d074341fe..e00392a525 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md @@ -1,7 +1,7 @@ DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md index 58c9c6d276..92991d0727 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md index ff24de4ec4..e84dd4dd85 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md index 9c95a2b48f..f482706f6f 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file.md index ffb3703fe1..4f929caadf 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/get-file.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/list-files.md b/docs/examples/1.8.x/client-rest/examples/storage/list-files.md index d1258b97de..977bb9e713 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/list-files.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/list-files.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/update-file.md b/docs/examples/1.8.x/client-rest/examples/storage/update-file.md index 210433622b..fed35bb860 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/update-file.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/update-file.md @@ -1,7 +1,7 @@ PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md index 83e4803502..f96f20c2b8 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md @@ -1,7 +1,7 @@ POST /v1/teams/{teamId}/memberships HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/create.md b/docs/examples/1.8.x/client-rest/examples/teams/create.md index c80b2bda8e..33cf95ba01 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/create.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/create.md @@ -1,7 +1,7 @@ POST /v1/teams HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md index 0fc17e11ee..8da481d5cf 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md @@ -1,7 +1,7 @@ DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/delete.md b/docs/examples/1.8.x/client-rest/examples/teams/delete.md index ad614b17d1..d1dc59c23a 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/delete.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/delete.md @@ -1,7 +1,7 @@ DELETE /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md index dbe034f34b..6e7379b0d7 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md index ddb863181d..e541fd3fd8 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get.md b/docs/examples/1.8.x/client-rest/examples/teams/get.md index 730d23a03b..32d9156267 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/get.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/get.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md index 82a9f82c33..4e364053b3 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/memberships HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/list.md b/docs/examples/1.8.x/client-rest/examples/teams/list.md index 00a419269a..e5f0439a13 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/list.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/list.md @@ -1,6 +1,6 @@ GET /v1/teams HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md index 9d828118f0..da2c9189cd 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md @@ -1,7 +1,7 @@ PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md index 3768499d16..b1010ea460 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md @@ -1,7 +1,7 @@ PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-name.md b/docs/examples/1.8.x/client-rest/examples/teams/update-name.md index ec381348e8..cd92d686ce 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/update-name.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-name.md @@ -1,7 +1,7 @@ PUT /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md index 1db6300350..e17dcdb260 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md @@ -1,7 +1,7 @@ PUT /v1/teams/{teamId}/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-web/examples/databases/create-document.md b/docs/examples/1.8.x/client-web/examples/databases/create-document.md index 401a67488c..916cc92689 100644 --- a/docs/examples/1.8.x/client-web/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-web/examples/databases/create-document.md @@ -2,9 +2,7 @@ import { Client, Databases } from "appwrite"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); diff --git a/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md index a581396da8..cfefe06242 100644 --- a/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md @@ -2,16 +2,16 @@ import { Client, Databases } from "appwrite"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); const result = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/functions/create-execution.md b/docs/examples/1.8.x/client-web/examples/functions/create-execution.md index 8f07523b2b..be9bb508c0 100644 --- a/docs/examples/1.8.x/client-web/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-web/examples/functions/create-execution.md @@ -13,7 +13,7 @@ const result = await functions.createExecution( '<PATH>', // path (optional) ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '' // scheduledAt (optional) + '<SCHEDULED_AT>' // scheduledAt (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md b/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md index 151e466d02..40932014ba 100644 --- a/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md @@ -1,4 +1,6 @@ appwrite databases upsertDocument \ --databaseId <DATABASE_ID> \ --collectionId <COLLECTION_ID> \ - --documentId <DOCUMENT_ID> + --documentId <DOCUMENT_ID> \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md index 30c7dc5b4b..cb1677b14c 100644 --- a/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md @@ -1,3 +1,4 @@ appwrite databases upsertDocuments \ --databaseId <DATABASE_ID> \ - --collectionId <COLLECTION_ID> + --collectionId <COLLECTION_ID> \ + --documents one two three diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-document.md b/docs/examples/1.8.x/console-web/examples/databases/create-document.md index 4524017dd5..1b96d07899 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-document.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-document.md @@ -2,9 +2,7 @@ import { Client, Databases } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-documents.md b/docs/examples/1.8.x/console-web/examples/databases/create-documents.md index f7ffbe809c..09f3007208 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-documents.md @@ -2,8 +2,7 @@ import { Client, Databases } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); diff --git a/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md b/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md index 6d92656543..3b89ed3aef 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md @@ -2,16 +2,16 @@ import { Client, Databases } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); const result = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md b/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md index 519b0ec160..2d12f7caec 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md @@ -2,14 +2,14 @@ import { Client, Databases } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); const result = await databases.upsertDocuments( '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId + '<COLLECTION_ID>', // collectionId + [] // documents ); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-execution.md b/docs/examples/1.8.x/console-web/examples/functions/create-execution.md index 813e1fd0a7..1886a831f2 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/console-web/examples/functions/create-execution.md @@ -13,7 +13,7 @@ const result = await functions.createExecution( '<PATH>', // path (optional) ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '' // scheduledAt (optional) + '<SCHEDULED_AT>' // scheduledAt (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-document.md b/docs/examples/1.8.x/server-dart/examples/databases/create-document.md index 1c9af5112c..1d58fc586c 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-document.md @@ -2,9 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with Databases databases = Databases(client); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md index f66ef9f1a9..ba0e34950b 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md @@ -2,7 +2,7 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // + .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key Databases databases = Databases(client); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md index f17f6cbbbd..93e306ebce 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md @@ -2,9 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with Databases databases = Databases(client); @@ -12,4 +11,6 @@ Document result = await databases.upsertDocument( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"], // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md index f60a37935a..cd35014f63 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md @@ -2,7 +2,7 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // + .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key Databases databases = Databases(client); @@ -10,4 +10,5 @@ Databases databases = Databases(client); DocumentList result = await databases.upsertDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', + documents: [], ); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md b/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md index 2ae64bce55..64b28d5f0c 100644 --- a/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md @@ -14,5 +14,5 @@ Execution result = await functions.createExecution( path: '<PATH>', // (optional) method: ExecutionMethod.gET, // (optional) headers: {}, // (optional) - scheduledAt: '', // (optional) + scheduledAt: '<SCHEDULED_AT>', // (optional) ); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-document.md b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md index f18b4f30dc..be8a1bdac9 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md @@ -2,9 +2,8 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with const databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md index fa3fe84731..26c9796cf0 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md @@ -2,7 +2,7 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // + .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md index a8a61ca43c..f05100e3df 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md @@ -2,14 +2,15 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with const databases = new Databases(client); const response = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) ); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md index bf9e7ded89..0cd804bfb6 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md @@ -2,12 +2,13 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // + .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new Databases(client); const response = await databases.upsertDocuments( '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId + '<COLLECTION_ID>', // collectionId + [] // documents ); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md b/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md index bec6a17db2..58c6c494b1 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md @@ -14,5 +14,5 @@ const response = await functions.createExecution( '<PATH>', // path (optional) ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '' // scheduledAt (optional) + '<SCHEDULED_AT>' // scheduledAt (optional) ); diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md index cb4bc62ced..52254e0c25 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md @@ -4,9 +4,8 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetSession("") // The user session to authenticate with - .SetKey("<YOUR_API_KEY>") // Your secret API key - .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md index c46715b25d..dad710f0df 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md @@ -4,7 +4,7 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetAdmin("") // + .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md index c809a497fe..c0876bfa73 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md @@ -4,14 +4,15 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetSession("") // The user session to authenticate with - .SetKey("<YOUR_API_KEY>") // Your secret API key - .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with Databases databases = new Databases(client); Document result = await databases.UpsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>" + documentId: "<DOCUMENT_ID>", + data: [object], + permissions: ["read("any")"] // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md index 48c0aa7044..6c124c16e5 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md @@ -4,12 +4,13 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetAdmin("") // + .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); DocumentList result = await databases.UpsertDocuments( databaseId: "<DATABASE_ID>", - collectionId: "<COLLECTION_ID>" + collectionId: "<COLLECTION_ID>", + documents: new List<object>() ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md index c8fd5595e9..98d1b2f3ff 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md @@ -17,5 +17,5 @@ Execution result = await functions.CreateExecution( path: "<PATH>", // optional method: ExecutionMethod.GET, // optional headers: [object], // optional - scheduledAt: "" // optional + scheduledAt: "<SCHEDULED_AT>" // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-document.md b/docs/examples/1.8.x/server-go/examples/databases/create-document.md index 8990beaa8d..fe96a0d601 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-document.md @@ -9,9 +9,8 @@ import ( func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID client.WithSession("") // The user session to authenticate with - client.WithKey("<YOUR_API_KEY>") // Your secret API key - client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token ) service := databases.New(client) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-documents.md b/docs/examples/1.8.x/server-go/examples/databases/create-documents.md index d85d0d5395..9e4da5dac7 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-documents.md @@ -9,7 +9,7 @@ import ( func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithAdmin("") // + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID client.WithKey("<YOUR_API_KEY>") // Your secret API key ) diff --git a/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md index c5304b1860..e6241b9198 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md @@ -9,9 +9,8 @@ import ( func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID client.WithSession("") // The user session to authenticate with - client.WithKey("<YOUR_API_KEY>") // Your secret API key - client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token ) service := databases.New(client) @@ -19,6 +18,8 @@ func main() { "<DATABASE_ID>", "<COLLECTION_ID>", "<DOCUMENT_ID>", + map[string]interface{}{}, + databases.WithUpsertDocumentPermissions(interface{}{"read("any")"}), ) if error != nil { diff --git a/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md index 5fe0fc5831..d2731cd128 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md @@ -9,7 +9,7 @@ import ( func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithAdmin("") // + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID client.WithKey("<YOUR_API_KEY>") // Your secret API key ) @@ -17,6 +17,7 @@ func main() { response, error := service.UpsertDocuments( "<DATABASE_ID>", "<COLLECTION_ID>", + []interface{}{}, ) if error != nil { diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-execution.md b/docs/examples/1.8.x/server-go/examples/functions/create-execution.md index 33657d2503..bc839e422e 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-go/examples/functions/create-execution.md @@ -21,7 +21,7 @@ func main() { functions.WithCreateExecutionPath("<PATH>"), functions.WithCreateExecutionMethod("GET"), functions.WithCreateExecutionHeaders(map[string]interface{}{}), - functions.WithCreateExecutionScheduledAt(""), + functions.WithCreateExecutionScheduledAt("<SCHEDULED_AT>"), ) if error != nil { diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md index 00dfba1e7b..7ee68b41c7 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md @@ -17,6 +17,9 @@ mutation { documentSecurity attributes indexes { + _id + _createdAt + _updatedAt key type status @@ -24,8 +27,6 @@ mutation { attributes lengths orders - _createdAt - _updatedAt } } } diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md index c647930943..38e64980b2 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md @@ -8,6 +8,9 @@ mutation { orders: [], lengths: [] ) { + _id + _createdAt + _updatedAt key type status @@ -15,7 +18,5 @@ mutation { attributes lengths orders - _createdAt - _updatedAt } } diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md index 040578ae9d..ad43b879d2 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md @@ -17,6 +17,9 @@ mutation { documentSecurity attributes indexes { + _id + _createdAt + _updatedAt key type status @@ -24,8 +27,6 @@ mutation { attributes lengths orders - _createdAt - _updatedAt } } } diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md index c381fe35a3..9d1e753081 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md @@ -2,7 +2,9 @@ mutation { databasesUpsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>" + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read("any")"] ) { _id _sequence diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md index b4bf914eca..2bfb765915 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md @@ -1,7 +1,8 @@ mutation { databasesUpsertDocuments( databaseId: "<DATABASE_ID>", - collectionId: "<COLLECTION_ID>" + collectionId: "<COLLECTION_ID>", + documents: [] ) { total documents { diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md index 0e7cc7d19a..3751448e57 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> Content-Length: *Length of your entity body in bytes* diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md index 1479aa3bb6..8979880723 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md @@ -6,7 +6,7 @@ mutation { path: "<PATH>", method: "GET", headers: "{}", - scheduledAt: "" + scheduledAt: "<SCHEDULED_AT>" ) { _id _createdAt diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md index 8f77dd60eb..26970a18a8 100644 --- a/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> Content-Length: *Length of your entity body in bytes* diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md b/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md index 5b4f9a0c22..70bf6cbb1f 100644 --- a/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md index 368b816219..5231be33d6 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md @@ -4,9 +4,8 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md index 77d79812a9..0de0c276ed 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md index b1b4de4db4..daa44141e2 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md @@ -4,9 +4,8 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with Databases databases = new Databases(client); @@ -14,6 +13,8 @@ databases.upsertDocument( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md index 0bf0c1778c..95e9a33ef2 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); @@ -12,6 +12,7 @@ Databases databases = new Databases(client); databases.upsertDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId + listOf(), // documents new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md index 82d48fa55b..93efa0adf8 100644 --- a/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md @@ -16,7 +16,7 @@ functions.createExecution( "<PATH>", // path (optional) ExecutionMethod.GET, // method (optional) mapOf( "a" to "b" ), // headers (optional) - "", // scheduledAt (optional) + "<SCHEDULED_AT>", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md index 93da01eefa..695fdbdfaa 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md @@ -4,9 +4,8 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token val databases = Databases(client) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md index ddce31c71c..41a98dc016 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key val databases = Databases(client) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md index df261dbcb6..d8be0e13db 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md @@ -4,14 +4,15 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token val databases = Databases(client) val response = databases.upsertDocument( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - documentId = "<DOCUMENT_ID>" + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md index 1cb376f107..ca861c61b2 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md @@ -4,12 +4,13 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key val databases = Databases(client) val response = databases.upsertDocuments( databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>" + collectionId = "<COLLECTION_ID>", + documents = listOf() ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md index 94bfa2310c..2734412232 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md @@ -16,5 +16,5 @@ val response = functions.createExecution( path = "<PATH>", // optional method = "GET", // optional headers = mapOf( "a" to "b" ), // optional - scheduledAt = "" // optional + scheduledAt = "<SCHEDULED_AT>" // optional ) diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md index 44cfc3c199..a2e77b9241 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md @@ -2,9 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with const databases = new sdk.Databases(client); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md index 7ecaa6bef4..d73df44cd1 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // + .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md index 7f2ffba3a3..fcc62d601c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md @@ -2,14 +2,15 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with const databases = new sdk.Databases(client); const result = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) ); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md index 52f7b55e11..425b7ba51f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md @@ -2,12 +2,13 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // + .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new sdk.Databases(client); const result = await databases.upsertDocuments( '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId + '<COLLECTION_ID>', // collectionId + [] // documents ); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md index 3c89030ca6..5671483191 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md @@ -14,5 +14,5 @@ const result = await functions.createExecution( '<PATH>', // path (optional) sdk.ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '' // scheduledAt (optional) + '<SCHEDULED_AT>' // scheduledAt (optional) ); diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-document.md b/docs/examples/1.8.x/server-php/examples/databases/create-document.md index 8726b37719..bf1ee3f62a 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-php/examples/databases/create-document.md @@ -5,9 +5,8 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setSession('') // The user session to authenticate with - ->setKey('<YOUR_API_KEY>') // Your secret API key - ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with $databases = new Databases($client); diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-documents.md b/docs/examples/1.8.x/server-php/examples/databases/create-documents.md index 9429b57aba..bc05f67260 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-php/examples/databases/create-documents.md @@ -5,7 +5,7 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setAdmin('') // + ->setProject('<YOUR_PROJECT_ID>') // Your project ID ->setKey('<YOUR_API_KEY>'); // Your secret API key $databases = new Databases($client); diff --git a/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md index 2f8464c995..6cff8296a3 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md @@ -5,14 +5,15 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setSession('') // The user session to authenticate with - ->setKey('<YOUR_API_KEY>') // Your secret API key - ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with $databases = new Databases($client); $result = $databases->upsertDocument( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documentId: '<DOCUMENT_ID>' + documentId: '<DOCUMENT_ID>', + data: [], + permissions: ["read("any")"] // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md index 11898dc33a..d9f9efda5c 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md @@ -5,12 +5,13 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setAdmin('') // + ->setProject('<YOUR_PROJECT_ID>') // Your project ID ->setKey('<YOUR_API_KEY>'); // Your secret API key $databases = new Databases($client); $result = $databases->upsertDocuments( databaseId: '<DATABASE_ID>', - collectionId: '<COLLECTION_ID>' + collectionId: '<COLLECTION_ID>', + documents: [] ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-execution.md b/docs/examples/1.8.x/server-php/examples/functions/create-execution.md index 9aeb976cf3..cd11b5ea6e 100644 --- a/docs/examples/1.8.x/server-php/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-php/examples/functions/create-execution.md @@ -17,5 +17,5 @@ $result = $functions->createExecution( path: '<PATH>', // optional method: ExecutionMethod::GET(), // optional headers: [], // optional - scheduledAt: '' // optional + scheduledAt: '<SCHEDULED_AT>' // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-document.md b/docs/examples/1.8.x/server-python/examples/databases/create-document.md index 1a8500b0f2..1eaf0246f3 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-python/examples/databases/create-document.md @@ -3,9 +3,8 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID client.set_session('') # The user session to authenticate with -client.set_key('<YOUR_API_KEY>') # Your secret API key -client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token databases = Databases(client) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-documents.md b/docs/examples/1.8.x/server-python/examples/databases/create-documents.md index 27ad6e8aa8..1b94e5165a 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-python/examples/databases/create-documents.md @@ -3,7 +3,7 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_admin('') # +client.set_project('<YOUR_PROJECT_ID>') # Your project ID client.set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases(client) diff --git a/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md index 8711e442c5..c491ea4f44 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md @@ -3,14 +3,15 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID client.set_session('') # The user session to authenticate with -client.set_key('<YOUR_API_KEY>') # Your secret API key -client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token databases = Databases(client) result = databases.upsert_document( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - document_id = '<DOCUMENT_ID>' + document_id = '<DOCUMENT_ID>', + data = {}, + permissions = ["read("any")"] # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md index 79888c8be3..5136d5fcb1 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md @@ -3,12 +3,13 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_admin('') # +client.set_project('<YOUR_PROJECT_ID>') # Your project ID client.set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases(client) result = databases.upsert_documents( database_id = '<DATABASE_ID>', - collection_id = '<COLLECTION_ID>' + collection_id = '<COLLECTION_ID>', + documents = [] ) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-execution.md b/docs/examples/1.8.x/server-python/examples/functions/create-execution.md index b41c7e376c..f80b8646c2 100644 --- a/docs/examples/1.8.x/server-python/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-python/examples/functions/create-execution.md @@ -15,5 +15,5 @@ result = functions.create_execution( path = '<PATH>', # optional method = ExecutionMethod.GET, # optional headers = {}, # optional - scheduled_at = '' # optional + scheduled_at = '<SCHEDULED_AT>' # optional ) diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md index 2079b045d1..b62c82a6a8 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md @@ -1,6 +1,6 @@ POST /v1/account/sessions/anonymous HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md index 8aee0e5b15..1103d2ebfb 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md @@ -1,7 +1,7 @@ POST /v1/account/sessions/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md index 98c5c9b454..552b724b9c 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md index a8da4695c3..62a7dee7e9 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md @@ -1,6 +1,6 @@ POST /v1/account/jwts HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md index a3db43516a..29d68bd0fa 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/magic-url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md index 8d6b52b877..62a068b6cf 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md index 9a84c0ef69..dd5ef4c731 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/challenge HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md index 797824d5d7..f09323df0b 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md index dd1dd3ec5e..8a0cab614f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md @@ -1,4 +1,4 @@ GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md index eef1021d9e..5127c8377a 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md index d161e580ff..57b3b7d160 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md @@ -1,7 +1,7 @@ POST /v1/account/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md b/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md index c195b96a5e..ea0146228b 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md @@ -1,7 +1,7 @@ POST /v1/account/recovery HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-session.md index 18e3b1acdd..0acc50cda6 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-session.md @@ -1,7 +1,7 @@ POST /v1/account/sessions/token HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-verification.md b/docs/examples/1.8.x/server-rest/examples/account/create-verification.md index 1185d3a875..ed5479dbe5 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-verification.md @@ -1,7 +1,7 @@ POST /v1/account/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create.md b/docs/examples/1.8.x/server-rest/examples/account/create.md index f546c07de5..15bb386f41 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create.md @@ -1,7 +1,7 @@ POST /v1/account HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md b/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md index edb036a593..bacca18870 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md @@ -1,7 +1,7 @@ DELETE /v1/account/identities/{identityId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md index de58948195..a0eb5a0869 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md @@ -1,7 +1,7 @@ DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-session.md b/docs/examples/1.8.x/server-rest/examples/account/delete-session.md index 9454a84913..c9b0f48d6f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/delete-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-session.md @@ -1,7 +1,7 @@ DELETE /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md index 97931c12e5..0b3fcd1c45 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md @@ -1,7 +1,7 @@ DELETE /v1/account/sessions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md index 81edee5234..2ab10a2475 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md @@ -1,6 +1,6 @@ GET /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md index 13a0b74d8f..a038dacbfd 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md @@ -1,6 +1,6 @@ GET /v1/account/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-session.md b/docs/examples/1.8.x/server-rest/examples/account/get-session.md index 9417755b04..3e372a05ef 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/get-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/get-session.md @@ -1,6 +1,6 @@ GET /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get.md b/docs/examples/1.8.x/server-rest/examples/account/get.md index 023a6d116f..104b643074 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/get.md +++ b/docs/examples/1.8.x/server-rest/examples/account/get.md @@ -1,6 +1,6 @@ GET /v1/account HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-identities.md b/docs/examples/1.8.x/server-rest/examples/account/list-identities.md index 65edceb8d6..5acb221584 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/list-identities.md +++ b/docs/examples/1.8.x/server-rest/examples/account/list-identities.md @@ -1,6 +1,6 @@ GET /v1/account/identities HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-logs.md b/docs/examples/1.8.x/server-rest/examples/account/list-logs.md index 71e2e138ef..8314123c9e 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/list-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/account/list-logs.md @@ -1,6 +1,6 @@ GET /v1/account/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md index 217ec6cb30..c591143d4e 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md +++ b/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md @@ -1,6 +1,6 @@ GET /v1/account/mfa/factors HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md b/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md index 7bff23f25b..89ef6962c9 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md +++ b/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md @@ -1,6 +1,6 @@ GET /v1/account/sessions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-email.md b/docs/examples/1.8.x/server-rest/examples/account/update-email.md index fc3baaf4a4..382327e31b 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-email.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-email.md @@ -1,7 +1,7 @@ PATCH /v1/account/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md index 803c47a857..a22b169751 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md @@ -1,7 +1,7 @@ PATCH /v1/account/mfa HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md index 3238322e0f..1a82afbfcc 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md @@ -1,7 +1,7 @@ PUT /v1/account/sessions/magic-url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md index 9d3e5dceea..780472291c 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md @@ -1,7 +1,7 @@ PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md index ddc27ae334..b6a7e92b28 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md @@ -1,7 +1,7 @@ PUT /v1/account/mfa/challenge HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md index e4ab8abb3b..74e9225f3e 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md @@ -1,7 +1,7 @@ PATCH /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-name.md b/docs/examples/1.8.x/server-rest/examples/account/update-name.md index f2f7caa204..4c9c0e302c 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-name.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-name.md @@ -1,7 +1,7 @@ PATCH /v1/account/name HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-password.md b/docs/examples/1.8.x/server-rest/examples/account/update-password.md index 4f69b9ab3f..e05a1c2b7f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-password.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-password.md @@ -1,7 +1,7 @@ PATCH /v1/account/password HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md index f1bc27d201..54872eecd2 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md @@ -1,7 +1,7 @@ PUT /v1/account/sessions/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md index ee6f5a68ff..1d4dc22520 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md @@ -1,7 +1,7 @@ PUT /v1/account/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone.md index bbe602a181..791caadb0d 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-phone.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone.md @@ -1,7 +1,7 @@ PATCH /v1/account/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md index aeabc2b68f..24f2d3bcb6 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md @@ -1,7 +1,7 @@ PATCH /v1/account/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md b/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md index 054aacc8ed..7d40ee79fe 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md @@ -1,7 +1,7 @@ PUT /v1/account/recovery HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-session.md index 9b2ba0e4a7..8e2257aeed 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-session.md @@ -1,7 +1,7 @@ PATCH /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-status.md b/docs/examples/1.8.x/server-rest/examples/account/update-status.md index 8a3e01db0b..557697fe5f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-status.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-status.md @@ -1,7 +1,7 @@ PATCH /v1/account/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-verification.md b/docs/examples/1.8.x/server-rest/examples/account/update-verification.md index 0c5ed8b55d..a4dcbf76a3 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-verification.md @@ -1,7 +1,7 @@ PUT /v1/account/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md index 3f18fa0d1e..36999839cc 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md @@ -1,6 +1,6 @@ GET /v1/avatars/browsers/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md index 59a38fe8f3..c9126af289 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md @@ -1,6 +1,6 @@ GET /v1/avatars/credit-cards/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md index 7a7c189da1..5a928fc9cc 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md @@ -1,6 +1,6 @@ GET /v1/avatars/favicon HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md index b4cd119359..c29ba10970 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md @@ -1,6 +1,6 @@ GET /v1/avatars/flags/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md index ca6b5105c3..dfc9fdcd92 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md @@ -1,6 +1,6 @@ GET /v1/avatars/image HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md index eb90447158..c784f1ca56 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md @@ -1,6 +1,6 @@ GET /v1/avatars/initials HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md index 77f7a3d382..bac1987d4e 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md @@ -1,6 +1,6 @@ GET /v1/avatars/qr HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md index 8ae6c2d9ff..fb11c03cbd 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md index ea298e3706..4f1e77728e 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md index 6ec4b332a5..3d0e718634 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-document.md b/docs/examples/1.8.x/server-rest/examples/databases/create-document.md index a5c25315c2..e4ba6ec1ff 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-document.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md index 63503ebaaa..cee5405fb2 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md index 0fb7aa2814..02b7095d64 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md index ba033a02ce..a921e10c5f 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md index ee8cb7497f..ea9dde56ce 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/float HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-index.md b/docs/examples/1.8.x/server-rest/examples/databases/create-index.md index 6d9b486ed6..c78bdc37f9 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-index.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-index.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md index 721f10e0c7..cce3a3f265 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md index 61378e6780..80afccb4c1 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md index c519a4a494..d9e6c6441c 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/relationship HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md index 7a5eafdf2a..5591ca8d8a 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/string HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md index ea4d76ce06..4ee9595717 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create.md b/docs/examples/1.8.x/server-rest/examples/databases/create.md index dab52ff67c..fd1ae143fa 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create.md @@ -1,7 +1,7 @@ POST /v1/databases HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md index d569f8d7e6..53ee43c6c5 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md index 8b7f1eee07..5d8f7f2932 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md index 153b3a2bdd..96d044df4e 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md index ca093c9177..b5580b04bf 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md index 49ab276fa6..cb27719953 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md index 9c27a6fd4c..d8664ef7ca 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete.md b/docs/examples/1.8.x/server-rest/examples/databases/delete.md index 19cf58549a..85d5f7bb0e 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md index c4cd093de0..60161187da 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md index 0e33fc4ef7..837138aaa0 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-document.md b/docs/examples/1.8.x/server-rest/examples/databases/get-document.md index b71ec4f83c..78a0e7d37c 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-document.md @@ -1,6 +1,6 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-index.md b/docs/examples/1.8.x/server-rest/examples/databases/get-index.md index 5aa5aa0fb2..58665ed283 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get-index.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-index.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get.md b/docs/examples/1.8.x/server-rest/examples/databases/get.md index 7c43330625..644f251f56 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md index 8658cb0ee6..accfca5b06 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md index e829678007..1d16e3308d 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/attributes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md b/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md index 0cfdce9c8e..18499144d3 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md index 0bc5c9b7f9..468956232d 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md @@ -1,6 +1,6 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md index e65ba2483c..1e1f134ef0 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list.md b/docs/examples/1.8.x/server-rest/examples/databases/list.md index 31db5cca0d..3b9530eec4 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list.md @@ -1,5 +1,5 @@ GET /v1/databases HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md index 7a2ae34ce9..75f3d66b50 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md index 4cba7f5230..6d6e5603ed 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md @@ -1,7 +1,7 @@ PUT /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md index c9685e6c89..59a477aca7 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-document.md b/docs/examples/1.8.x/server-rest/examples/databases/update-document.md index 19b25bdf45..9a156375de 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-document.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md index f2606e3a1f..69ea7a0d6f 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md index eece253459..08257e8906 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/email/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md index 47ef168090..8e69a703ea 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md index bb35f3450c..214567660d 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/float/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md index 96290f4313..1f566c1369 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md index 9e3cf7d4b5..31bc18c587 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md index 645e8f8ae4..3cb7d4f679 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md index 650b6f1b8b..2026b854a9 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/string/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md index 8409285677..4f90c7ade3 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/url/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update.md b/docs/examples/1.8.x/server-rest/examples/databases/update.md index 02efbf5270..d57ad48927 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update.md @@ -1,7 +1,7 @@ PUT /v1/databases/{databaseId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md index 7339c7e611..97b61bfc7f 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md @@ -1,9 +1,13 @@ PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-JWT: <YOUR_JWT> +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md index 1a24810a03..4bcb9cb0c0 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md @@ -1,7 +1,10 @@ PUT /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> +{ + "documents": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md index 5d65eff5fd..f68e54dedc 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> Content-Length: *Length of your entity body in bytes* diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md index 898117c117..f2ba3c5f13 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments/duplicate HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md index 5a4c7667cf..a2863046ce 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/executions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> @@ -13,5 +13,5 @@ X-Appwrite-JWT: <YOUR_JWT> "path": "<PATH>", "method": "GET", "headers": {}, - "scheduledAt": + "scheduledAt": "<SCHEDULED_AT>" } diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md index 656c2e2a27..18ebf65efe 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments/template HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md index 7251a3a352..7f71f07417 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/variables HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md index 1b5267ca14..cd409fa892 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments/vcs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create.md b/docs/examples/1.8.x/server-rest/examples/functions/create.md index c5f364ad63..1f034e60a4 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create.md @@ -1,7 +1,7 @@ POST /v1/functions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md index b70f282167..81a80209a8 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md @@ -1,7 +1,7 @@ DELETE /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md index fb26ae47aa..020a9efc3e 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md @@ -1,7 +1,7 @@ DELETE /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md index aa01835ae4..88f4de15eb 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md @@ -1,7 +1,7 @@ DELETE /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete.md b/docs/examples/1.8.x/server-rest/examples/functions/delete.md index 9f9ab74019..2148d8148b 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete.md @@ -1,7 +1,7 @@ DELETE /v1/functions/{functionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md index 9195d203ab..e9c9ce0073 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/deployments/{deploymentId}/download HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md index 2557ca698e..aa6e92449b 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md index 52e54c2a6c..54da369660 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md index 2a01307b0d..91f14f0db8 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get.md b/docs/examples/1.8.x/server-rest/examples/functions/get.md index 062b7e67ec..fb0f049f6d 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md index 5b4dabc679..db89edf692 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId}/deployments HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md b/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md index b0ac3076ab..5876a8ba46 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/executions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md index 762e47fbcb..d8e4bc4272 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md @@ -1,5 +1,5 @@ GET /v1/functions/runtimes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md index 989adc0576..1a84b56ac9 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md @@ -1,5 +1,5 @@ GET /v1/functions/specifications HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md b/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md index b46b69fb5f..41bfde5e28 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId}/variables HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list.md b/docs/examples/1.8.x/server-rest/examples/functions/list.md index 318a2d56ed..e12af0e774 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list.md @@ -1,5 +1,5 @@ GET /v1/functions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md index 8788e21c2b..ba4a882910 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md @@ -1,7 +1,7 @@ PATCH /v1/functions/{functionId}/deployments/{deploymentId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md index 1f89f35da0..d649b2ea69 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md @@ -1,7 +1,7 @@ PATCH /v1/functions/{functionId}/deployment HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md index 36ae244548..5a0ad6805d 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md @@ -1,7 +1,7 @@ PUT /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update.md b/docs/examples/1.8.x/server-rest/examples/functions/update.md index ee3b8b8c6d..40329e5580 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/update.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/update.md @@ -1,7 +1,7 @@ PUT /v1/functions/{functionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md b/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md index 7d58d77ede..2d59370324 100644 --- a/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md @@ -2,7 +2,7 @@ POST /v1/graphql/mutation HTTP/1.1 Host: cloud.appwrite.io X-Sdk-Graphql: true Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/server-rest/examples/graphql/query.md b/docs/examples/1.8.x/server-rest/examples/graphql/query.md index 8b87cd9f33..c7242de6ef 100644 --- a/docs/examples/1.8.x/server-rest/examples/graphql/query.md +++ b/docs/examples/1.8.x/server-rest/examples/graphql/query.md @@ -2,7 +2,7 @@ POST /v1/graphql HTTP/1.1 Host: cloud.appwrite.io X-Sdk-Graphql: true Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md index 2acacb5a5f..f0e27277b1 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md @@ -1,5 +1,5 @@ GET /v1/health/anti-virus HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-cache.md b/docs/examples/1.8.x/server-rest/examples/health/get-cache.md index c98dcf8af1..e0628a1b8a 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-cache.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-cache.md @@ -1,5 +1,5 @@ GET /v1/health/cache HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md b/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md index 9f4f5efee4..8928e8f25a 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md @@ -1,5 +1,5 @@ GET /v1/health/certificate HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md b/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md index 9f1efb921b..f636c9c8e7 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md @@ -1,5 +1,5 @@ GET /v1/health/db HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md index b646b7923f..b9bfab3b73 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md @@ -1,5 +1,5 @@ GET /v1/health/queue/failed/{name} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md index d28025f719..e9ab32729c 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md @@ -1,5 +1,5 @@ GET /v1/health/pubsub HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md index d51b4d60b3..c3d9189a65 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md @@ -1,5 +1,5 @@ GET /v1/health/queue/builds HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md index 0f3c2f65fe..d70ee360a8 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md @@ -1,5 +1,5 @@ GET /v1/health/queue/certificates HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md index ccc72c3404..60fc6db3b2 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md @@ -1,5 +1,5 @@ GET /v1/health/queue/databases HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md index a4c5e15586..5a9ce59da3 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md @@ -1,5 +1,5 @@ GET /v1/health/queue/deletes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md index a28dbf921c..854100e092 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md @@ -1,5 +1,5 @@ GET /v1/health/queue/functions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md index 0c16e61757..9fa98f13f5 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md @@ -1,5 +1,5 @@ GET /v1/health/queue/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md index 82b6151af1..2bb61550bb 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md @@ -1,5 +1,5 @@ GET /v1/health/queue/mails HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md index 6082ec41bd..5fd0f35919 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md @@ -1,5 +1,5 @@ GET /v1/health/queue/messaging HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md index c9687b3224..2832b1c980 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md @@ -1,5 +1,5 @@ GET /v1/health/queue/migrations HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md index 90eefe75fc..6500b1f84c 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md @@ -1,5 +1,5 @@ GET /v1/health/queue/stats-resources HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md index 663d39dd2f..9c4e797f32 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md @@ -1,5 +1,5 @@ GET /v1/health/queue/stats-usage HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md index 0843ad174f..4db6cf7d8c 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md @@ -1,5 +1,5 @@ GET /v1/health/queue/webhooks HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md index 9047713439..31c9b8725f 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md @@ -1,5 +1,5 @@ GET /v1/health/storage/local HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-storage.md b/docs/examples/1.8.x/server-rest/examples/health/get-storage.md index 1d46ab179e..69c4ebd910 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-storage.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-storage.md @@ -1,5 +1,5 @@ GET /v1/health/storage HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-time.md b/docs/examples/1.8.x/server-rest/examples/health/get-time.md index 7661df5732..5396aac6fb 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-time.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-time.md @@ -1,5 +1,5 @@ GET /v1/health/time HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get.md b/docs/examples/1.8.x/server-rest/examples/health/get.md index c64b480826..b37e30c4f8 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get.md @@ -1,5 +1,5 @@ GET /v1/health HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/get.md b/docs/examples/1.8.x/server-rest/examples/locale/get.md index 7b300acb41..6c60c076b6 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/get.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/get.md @@ -1,6 +1,6 @@ GET /v1/locale HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md b/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md index 336ac1477f..3cc2aa9939 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md @@ -1,6 +1,6 @@ GET /v1/locale/codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md b/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md index d99b138653..8d2b0fa19d 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md @@ -1,6 +1,6 @@ GET /v1/locale/continents HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md index 3c94877234..ae341f5982 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md @@ -1,6 +1,6 @@ GET /v1/locale/countries/eu HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md index 09619edb36..9d59f37a19 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md @@ -1,6 +1,6 @@ GET /v1/locale/countries/phones HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md index 0f1be7e5df..19205d538d 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md @@ -1,6 +1,6 @@ GET /v1/locale/countries HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md index c1e03ecae2..fbf6d63496 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md @@ -1,6 +1,6 @@ GET /v1/locale/currencies HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md b/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md index 1e2a125985..7f1304d6ff 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md @@ -1,6 +1,6 @@ GET /v1/locale/languages HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md index b6860358c1..47d3b98615 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/apns HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md index efec44982c..b6c1392bb2 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md @@ -1,7 +1,7 @@ POST /v1/messaging/messages/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md index ec885465a7..f234c80e6e 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/fcm HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md index 8d0eb33938..fd138606e2 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/mailgun HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md index 2877ff7b89..edbd690d5d 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/msg91 HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md index 6210273820..08ba0357fe 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md @@ -1,7 +1,7 @@ POST /v1/messaging/messages/push HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md index a9f7c933dc..3fa7ee8dd8 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/sendgrid HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md index f885563f6f..82926e2a82 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md @@ -1,7 +1,7 @@ POST /v1/messaging/messages/sms HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md index bbb8e7d212..5963ee474c 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/smtp HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md index 2e61d50b5c..e22a626ac4 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md @@ -1,7 +1,7 @@ POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md index 198ccae6f5..a474db823f 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/telesign HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md index 2f2ce558a7..caa7bcd014 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/textmagic HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md index a44af2764d..9974584212 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md @@ -1,7 +1,7 @@ POST /v1/messaging/topics HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md index 61fd63b52e..e612eed8be 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/twilio HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md index 16d1c6b594..fdd66526a9 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/vonage HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md index e25c3dcc1c..cfd1ff3b30 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/providers/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md index b988897d60..8226237777 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md index 3c5c8a9cdb..d340209e93 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/topics/{topicId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete.md index a918c2b6f8..e076c96ebf 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/messages/{messageId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md index abe744e9c7..ef9ef2c8df 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md @@ -1,5 +1,5 @@ GET /v1/messaging/messages/{messageId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md index 0d2ffe4eaa..361d634760 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md @@ -1,5 +1,5 @@ GET /v1/messaging/providers/{providerId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md index a1629d4546..c01c5876ac 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md index 5d7efd06de..df5256f5e3 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics/{topicId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md index 066970a9fb..d8c982e7ea 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md @@ -1,5 +1,5 @@ GET /v1/messaging/messages/{messageId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md index 03a286c376..88964162e3 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md @@ -1,5 +1,5 @@ GET /v1/messaging/messages HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md index 562264f48e..46c0f76a10 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md @@ -1,5 +1,5 @@ GET /v1/messaging/providers/{providerId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md index 43522ee34f..e454b3101b 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md @@ -1,5 +1,5 @@ GET /v1/messaging/providers HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md index f403362529..7fb1192035 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md @@ -1,5 +1,5 @@ GET /v1/messaging/subscribers/{subscriberId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md index a357f9dc3d..06f67c27c1 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md index 0b4f8caf6f..7c793cfae0 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md @@ -1,5 +1,5 @@ GET /v1/messaging/messages/{messageId}/targets HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md index 80073b2165..e371aeb2b5 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics/{topicId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md index 2835277aeb..9f18e14b70 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md index a398b186cb..a55c593039 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/apns/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md index 0ef5b89409..97f3911ed1 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/messages/email/{messageId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md index 50e3a5400d..d485981c5b 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/fcm/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md index f05f0057e7..ec132692c5 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/mailgun/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md index 1c88425fc1..1013915e5d 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/msg91/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md index adf269301c..438ef373e5 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/messages/push/{messageId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md index 28ffb526f8..fd30512320 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/sendgrid/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md index b5ad82d0f9..a917e270f7 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/messages/sms/{messageId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md index 8e69659ce1..9fc45d6726 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/smtp/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md index 548d39dc92..919e99577e 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/telesign/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md index 724b0a4afe..94f965c44a 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/textmagic/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md index add0bf8ee4..75644d9828 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/topics/{topicId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md index 38730383b1..41d04c0c14 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/twilio/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md index 8c284c827f..0344691e51 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/vonage/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md index 554d2a5365..669ac50a75 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> Content-Length: *Length of your entity body in bytes* diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md index 3da246715b..dbee572372 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments/duplicate HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md index e37819bfb2..3b21f4f754 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments/template HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md index 73217d198c..c34be9d619 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/variables HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md index 7d5fd3e92e..2e466da0f6 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments/vcs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create.md b/docs/examples/1.8.x/server-rest/examples/sites/create.md index 5493e9d2b6..52b4d87219 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create.md @@ -1,7 +1,7 @@ POST /v1/sites HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md index 35bac59efc..3df6aca50f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md @@ -1,7 +1,7 @@ DELETE /v1/sites/{siteId}/deployments/{deploymentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md index 0bd2f661cf..af1d1c339a 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md @@ -1,7 +1,7 @@ DELETE /v1/sites/{siteId}/logs/{logId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md index c3f1d2d293..008ab4b190 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md @@ -1,7 +1,7 @@ DELETE /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete.md b/docs/examples/1.8.x/server-rest/examples/sites/delete.md index cdb4ced577..0657fff9ef 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete.md @@ -1,7 +1,7 @@ DELETE /v1/sites/{siteId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md index d81a7dfc56..3ce065f600 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md @@ -1,6 +1,6 @@ GET /v1/sites/{siteId}/deployments/{deploymentId}/download HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md index 381c20db77..2ad95813d9 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/deployments/{deploymentId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-log.md b/docs/examples/1.8.x/server-rest/examples/sites/get-log.md index 6b8366461e..41dd30dc8f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get-log.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-log.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/logs/{logId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md index 7c9703ef88..c6d5e70211 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get.md b/docs/examples/1.8.x/server-rest/examples/sites/get.md index f13b46ecab..da7b67883f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md index 22512f809d..0bc5467894 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/deployments HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md index 0007a7cd78..8c5f7ff318 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md @@ -1,5 +1,5 @@ GET /v1/sites/frameworks HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md b/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md index 7e77b7e755..57b35c4ef5 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md index 17e8d281c6..cf31760070 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md @@ -1,5 +1,5 @@ GET /v1/sites/specifications HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md b/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md index 4f99a74984..7e12fdfd02 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/variables HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list.md b/docs/examples/1.8.x/server-rest/examples/sites/list.md index d1800f05e5..dc4dc3695f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list.md @@ -1,5 +1,5 @@ GET /v1/sites HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md index 697d9ac371..d4f251c20f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md @@ -1,7 +1,7 @@ PATCH /v1/sites/{siteId}/deployments/{deploymentId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md index 51d8736df5..c288b2bf00 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md @@ -1,7 +1,7 @@ PATCH /v1/sites/{siteId}/deployment HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md index 61902ee02f..c7fe824ac4 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md @@ -1,7 +1,7 @@ PUT /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update.md b/docs/examples/1.8.x/server-rest/examples/sites/update.md index ab3c4dddd1..370984721f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/update.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/update.md @@ -1,7 +1,7 @@ PUT /v1/sites/{siteId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md index 8ca9c5701b..59f1c4f403 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/create-file.md b/docs/examples/1.8.x/server-rest/examples/storage/create-file.md index e8a54e723b..086fd6dc72 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/create-file.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md index 3db8bfbb72..d6083186de 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md @@ -1,7 +1,7 @@ DELETE /v1/storage/buckets/{bucketId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md b/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md index cc8a2481f7..467fdf96d1 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md @@ -1,7 +1,7 @@ DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md index b7def1d44b..2ad1e577c5 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md @@ -1,5 +1,5 @@ GET /v1/storage/buckets/{bucketId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md index 4d9c691ba9..af382d3a9a 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md index e8a1bdeedf..e00f0ff76f 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md index d41b8a3512..79f47dcabc 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file.md index e11aaa9f05..4a479a78fc 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-file.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md index 3061208d75..bd61c61082 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md @@ -1,5 +1,5 @@ GET /v1/storage/buckets HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/list-files.md b/docs/examples/1.8.x/server-rest/examples/storage/list-files.md index 7cf8616335..b040ad3a65 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/list-files.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/list-files.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md index adf12647e2..0f966da0b5 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md @@ -1,7 +1,7 @@ PUT /v1/storage/buckets/{bucketId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/update-file.md b/docs/examples/1.8.x/server-rest/examples/storage/update-file.md index d91ab4c2d6..1b0137a7de 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/update-file.md @@ -1,7 +1,7 @@ PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md index f52f796d90..773208cb45 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md @@ -1,7 +1,7 @@ POST /v1/teams/{teamId}/memberships HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/create.md b/docs/examples/1.8.x/server-rest/examples/teams/create.md index 27e7429464..2e1881b5ff 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/create.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/create.md @@ -1,7 +1,7 @@ POST /v1/teams HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md index e897d84a12..454a3f6f4a 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md @@ -1,7 +1,7 @@ DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/delete.md b/docs/examples/1.8.x/server-rest/examples/teams/delete.md index 213489c7fb..1bdf2a89ac 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/delete.md @@ -1,7 +1,7 @@ DELETE /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md index 1d10cfe437..8a90498292 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md index ddb863181d..e541fd3fd8 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get.md b/docs/examples/1.8.x/server-rest/examples/teams/get.md index 4ecf74596b..491e04dc55 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/get.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/get.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md index 38cc17b71a..9b0fa00492 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/memberships HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/list.md b/docs/examples/1.8.x/server-rest/examples/teams/list.md index c67b429008..95b6178e31 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/list.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/list.md @@ -1,6 +1,6 @@ GET /v1/teams HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md index 9d828118f0..da2c9189cd 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md @@ -1,7 +1,7 @@ PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md index 6730d5c27c..a5b8c28723 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md @@ -1,7 +1,7 @@ PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-name.md b/docs/examples/1.8.x/server-rest/examples/teams/update-name.md index fa811a2438..1d32b77d39 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/update-name.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-name.md @@ -1,7 +1,7 @@ PUT /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md index 1db6300350..e17dcdb260 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md @@ -1,7 +1,7 @@ PUT /v1/teams/{teamId}/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md index c1fbb63d2d..3d884e2c5d 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md @@ -1,7 +1,7 @@ POST /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/delete.md b/docs/examples/1.8.x/server-rest/examples/tokens/delete.md index ee564b01c4..a955b4aef5 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/delete.md @@ -1,7 +1,7 @@ DELETE /v1/tokens/{tokenId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/get.md b/docs/examples/1.8.x/server-rest/examples/tokens/get.md index b39c8390e3..381945f58f 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/get.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/get.md @@ -1,5 +1,5 @@ GET /v1/tokens/{tokenId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/list.md b/docs/examples/1.8.x/server-rest/examples/tokens/list.md index 8909d05572..3b0782a81a 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/list.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/list.md @@ -1,5 +1,5 @@ GET /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/update.md b/docs/examples/1.8.x/server-rest/examples/tokens/update.md index 8ab9d60555..ab58a4842a 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/update.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/update.md @@ -1,7 +1,7 @@ PATCH /v1/tokens/{tokenId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md index d557cf6d5f..4985ecefd0 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md @@ -1,7 +1,7 @@ POST /v1/users/argon2 HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md index cda7491160..eaf1628252 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md @@ -1,7 +1,7 @@ POST /v1/users/bcrypt HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md index 83208adadb..8342089042 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md @@ -1,7 +1,7 @@ POST /v1/users/{userId}/jwts HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md index d4896133a1..6e82969f00 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md @@ -1,7 +1,7 @@ POST /v1/users/md5 HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md index 2f6524646d..bef314b585 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md index 4c10b1a82d..b75c9e23c5 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md @@ -1,7 +1,7 @@ POST /v1/users/phpass HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md index 5c6467a2fe..7757b44500 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md @@ -1,7 +1,7 @@ POST /v1/users/sha HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md index 19d0650840..9fb5f8de0f 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md @@ -1,7 +1,7 @@ POST /v1/users/scrypt-modified HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md index 008eab6848..ee8828f294 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md @@ -1,7 +1,7 @@ POST /v1/users/scrypt HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-session.md b/docs/examples/1.8.x/server-rest/examples/users/create-session.md index ec71d421e0..955e253d39 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-session.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-session.md @@ -1,7 +1,7 @@ POST /v1/users/{userId}/sessions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-target.md b/docs/examples/1.8.x/server-rest/examples/users/create-target.md index fced935c1b..08147220b2 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-target.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-target.md @@ -1,7 +1,7 @@ POST /v1/users/{userId}/targets HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-token.md b/docs/examples/1.8.x/server-rest/examples/users/create-token.md index 4339252660..2d3b58435a 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-token.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-token.md @@ -1,7 +1,7 @@ POST /v1/users/{userId}/tokens HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create.md b/docs/examples/1.8.x/server-rest/examples/users/create.md index 67d377255b..b638e6511e 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create.md @@ -1,7 +1,7 @@ POST /v1/users HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md b/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md index c2aa5eed16..a9b2cd04f6 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md @@ -1,7 +1,7 @@ DELETE /v1/users/identities/{identityId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md index 9d9e2e950f..92d51fefb5 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId}/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-session.md b/docs/examples/1.8.x/server-rest/examples/users/delete-session.md index be204911a2..1ae56081ab 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-session.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-session.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId}/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md index 54f3a8d4f1..f620f1addc 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId}/sessions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-target.md b/docs/examples/1.8.x/server-rest/examples/users/delete-target.md index 77e2c23dd8..4ea75b979b 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-target.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-target.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId}/targets/{targetId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete.md b/docs/examples/1.8.x/server-rest/examples/users/delete.md index c31212aa71..be2533f442 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md index 58dd32d2a4..1f561f02ad 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md index ac04cc5c44..4d55589a73 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-target.md b/docs/examples/1.8.x/server-rest/examples/users/get-target.md index 2f19db7c7a..3613d7acb6 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/get-target.md +++ b/docs/examples/1.8.x/server-rest/examples/users/get-target.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/targets/{targetId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get.md b/docs/examples/1.8.x/server-rest/examples/users/get.md index f654676d9b..53357720cf 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/get.md +++ b/docs/examples/1.8.x/server-rest/examples/users/get.md @@ -1,5 +1,5 @@ GET /v1/users/{userId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-identities.md b/docs/examples/1.8.x/server-rest/examples/users/list-identities.md index 180a2127a4..40eed8beec 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-identities.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-identities.md @@ -1,5 +1,5 @@ GET /v1/users/identities HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-logs.md b/docs/examples/1.8.x/server-rest/examples/users/list-logs.md index 7149f50abe..526615b80f 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-logs.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md b/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md index 7d32f2f726..24de2cdc59 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/memberships HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md index a75b26e1c5..eb2d3691de 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/mfa/factors HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md b/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md index 1ef39b835b..33efecd536 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/sessions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-targets.md b/docs/examples/1.8.x/server-rest/examples/users/list-targets.md index e9542c0da0..229559c958 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-targets.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-targets.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/targets HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list.md b/docs/examples/1.8.x/server-rest/examples/users/list.md index a92f71439b..2938255449 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list.md @@ -1,5 +1,5 @@ GET /v1/users HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md index cf65c72b0c..1db5556964 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-email.md b/docs/examples/1.8.x/server-rest/examples/users/update-email.md index 10ccafb079..48d871d8d4 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-email.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-email.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-labels.md b/docs/examples/1.8.x/server-rest/examples/users/update-labels.md index f01603f1f4..d6acca5c7a 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-labels.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-labels.md @@ -1,7 +1,7 @@ PUT /v1/users/{userId}/labels HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md index aa3bb3f6e6..91e657aec7 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md @@ -1,7 +1,7 @@ PUT /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md b/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md index fce9198887..8a5d1f5052 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/mfa HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-name.md b/docs/examples/1.8.x/server-rest/examples/users/update-name.md index c8988dfb1d..ae1472387a 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-name.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-name.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/name HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-password.md b/docs/examples/1.8.x/server-rest/examples/users/update-password.md index fb796d5619..40220f80d5 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-password.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-password.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/password HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md index ca3958605b..837874a1e2 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-phone.md b/docs/examples/1.8.x/server-rest/examples/users/update-phone.md index 5bc196d668..a36f0cc656 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-phone.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-phone.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md index 1db82743e8..5de942c081 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-status.md b/docs/examples/1.8.x/server-rest/examples/users/update-status.md index 6d07f2e15f..95e29fb66e 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-status.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-status.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-target.md b/docs/examples/1.8.x/server-rest/examples/users/update-target.md index 926fb166a4..c5f92f342e 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-target.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-target.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/targets/{targetId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md index ce8dea79ef..e6831084a1 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md @@ -4,9 +4,8 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_session('') # The user session to authenticate with - .set_key('<YOUR_API_KEY>') # Your secret API key - .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token databases = Databases.new(client) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md index ecccdf5b21..16abc5e465 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md @@ -4,7 +4,7 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_admin('') # + .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases.new(client) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md index d165e1e6cd..238081864f 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md @@ -4,14 +4,15 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_session('') # The user session to authenticate with - .set_key('<YOUR_API_KEY>') # Your secret API key - .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token databases = Databases.new(client) result = databases.upsert_document( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', - document_id: '<DOCUMENT_ID>' + document_id: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"] # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md index 8e404e684e..30c42aa439 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md @@ -4,12 +4,13 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_admin('') # + .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases.new(client) result = databases.upsert_documents( database_id: '<DATABASE_ID>', - collection_id: '<COLLECTION_ID>' + collection_id: '<COLLECTION_ID>', + documents: [] ) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md index b64b1d5c57..666b995d77 100644 --- a/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md @@ -16,5 +16,5 @@ result = functions.create_execution( path: '<PATH>', # optional method: ExecutionMethod::GET, # optional headers: {}, # optional - scheduled_at: '' # optional + scheduled_at: '<SCHEDULED_AT>' # optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-document.md b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md index 4ee21048ab..daeaf144e1 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md @@ -2,9 +2,8 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token let databases = Databases(client) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md index e4f8582f49..2e992d9e3a 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md @@ -2,7 +2,7 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key let databases = Databases(client) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md index 9c9684e42d..e78bd458a0 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md @@ -2,15 +2,16 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token let databases = Databases(client) let document = try await databases.upsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>" + documentId: "<DOCUMENT_ID>", + data: [:], + permissions: ["read("any")"] // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md index e63b9a3e67..544f02f9c0 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md @@ -2,13 +2,14 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key let databases = Databases(client) let documentList = try await databases.upsertDocuments( databaseId: "<DATABASE_ID>", - collectionId: "<COLLECTION_ID>" + collectionId: "<COLLECTION_ID>", + documents: [] ) diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md b/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md index aae7a0f52f..46c9d69087 100644 --- a/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md @@ -15,6 +15,6 @@ let execution = try await functions.createExecution( path: "<PATH>", // optional method: .gET, // optional headers: [:], // optional - scheduledAt: "" // optional + scheduledAt: "<SCHEDULED_AT>" // optional ) From bc8d5963aed8b0d465170b16a65518aadc27aba1 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 17:15:17 +0530 Subject: [PATCH 295/362] update: regen examples for grids. --- .../client-android/java/grids/create-row.md | 26 +++++++++++++++ .../client-android/java/grids/delete-row.md | 24 ++++++++++++++ .../client-android/java/grids/get-row.md | 25 ++++++++++++++ .../client-android/java/grids/list-rows.md | 24 ++++++++++++++ .../client-android/java/grids/update-row.md | 26 +++++++++++++++ .../client-android/java/grids/upsert-row.md | 26 +++++++++++++++ .../client-android/kotlin/grids/create-row.md | 17 ++++++++++ .../client-android/kotlin/grids/delete-row.md | 15 +++++++++ .../client-android/kotlin/grids/get-row.md | 16 +++++++++ .../client-android/kotlin/grids/list-rows.md | 15 +++++++++ .../client-android/kotlin/grids/update-row.md | 17 ++++++++++ .../client-android/kotlin/grids/upsert-row.md | 17 ++++++++++ .../client-apple/examples/grids/create-row.md | 16 +++++++++ .../client-apple/examples/grids/delete-row.md | 14 ++++++++ .../client-apple/examples/grids/get-row.md | 15 +++++++++ .../client-apple/examples/grids/list-rows.md | 14 ++++++++ .../client-apple/examples/grids/update-row.md | 16 +++++++++ .../client-apple/examples/grids/upsert-row.md | 16 +++++++++ .../examples/grids/create-row.md | 15 +++++++++ .../examples/grids/delete-row.md | 13 ++++++++ .../client-flutter/examples/grids/get-row.md | 14 ++++++++ .../examples/grids/list-rows.md | 13 ++++++++ .../examples/grids/update-row.md | 15 +++++++++ .../examples/grids/upsert-row.md | 15 +++++++++ .../examples/grids/create-row.md | 18 ++++++++++ .../examples/grids/delete-row.md | 9 +++++ .../client-graphql/examples/grids/get-row.md | 0 .../examples/grids/list-rows.md | 0 .../examples/grids/update-row.md | 18 ++++++++++ .../examples/grids/upsert-row.md | 18 ++++++++++ .../examples/grids/create-row.md | 17 ++++++++++ .../examples/grids/delete-row.md | 15 +++++++++ .../examples/grids/get-row.md | 16 +++++++++ .../examples/grids/list-rows.md | 15 +++++++++ .../examples/grids/update-row.md | 17 ++++++++++ .../examples/grids/upsert-row.md | 17 ++++++++++ .../client-rest/examples/grids/create-row.md | 13 ++++++++ .../client-rest/examples/grids/delete-row.md | 8 +++++ .../client-rest/examples/grids/get-row.md | 6 ++++ .../client-rest/examples/grids/list-rows.md | 6 ++++ .../client-rest/examples/grids/update-row.md | 12 +++++++ .../client-rest/examples/grids/upsert-row.md | 12 +++++++ .../client-web/examples/grids/create-row.md | 17 ++++++++++ .../client-web/examples/grids/delete-row.md | 15 +++++++++ .../client-web/examples/grids/get-row.md | 16 +++++++++ .../client-web/examples/grids/list-rows.md | 15 +++++++++ .../client-web/examples/grids/update-row.md | 17 ++++++++++ .../client-web/examples/grids/upsert-row.md | 17 ++++++++++ .../examples/grids/create-boolean-column.md | 7 ++++ .../examples/grids/create-database.md | 4 +++ .../examples/grids/create-datetime-column.md | 7 ++++ .../examples/grids/create-email-column.md | 7 ++++ .../examples/grids/create-enum-column.md | 8 +++++ .../examples/grids/create-float-column.md | 9 +++++ .../examples/grids/create-index.md | 8 +++++ .../examples/grids/create-integer-column.md | 9 +++++ .../examples/grids/create-ip-column.md | 7 ++++ .../grids/create-relationship-column.md | 9 +++++ .../console-cli/examples/grids/create-row.md | 6 ++++ .../console-cli/examples/grids/create-rows.md | 4 +++ .../examples/grids/create-string-column.md | 9 +++++ .../examples/grids/create-table.md | 7 ++++ .../examples/grids/create-url-column.md | 7 ++++ .../examples/grids/decrement-row-column.md | 7 ++++ .../examples/grids/delete-column.md | 4 +++ .../examples/grids/delete-database.md | 2 ++ .../examples/grids/delete-index.md | 4 +++ .../console-cli/examples/grids/delete-row.md | 4 +++ .../console-cli/examples/grids/delete-rows.md | 4 +++ .../examples/grids/delete-table.md | 3 ++ .../console-cli/examples/grids/get-column.md | 4 +++ .../examples/grids/get-database-usage.md | 3 ++ .../examples/grids/get-database.md | 2 ++ .../console-cli/examples/grids/get-index.md | 4 +++ .../console-cli/examples/grids/get-row.md | 5 +++ .../examples/grids/get-table-usage.md | 4 +++ .../console-cli/examples/grids/get-table.md | 3 ++ .../examples/grids/increment-row-column.md | 7 ++++ .../examples/grids/list-columns.md | 4 +++ .../examples/grids/list-database-logs.md | 3 ++ .../examples/grids/list-database-usage.md | 2 ++ .../examples/grids/list-databases.md | 3 ++ .../examples/grids/list-indexes.md | 4 +++ .../examples/grids/list-row-logs.md | 5 +++ .../console-cli/examples/grids/list-rows.md | 4 +++ .../examples/grids/list-table-logs.md | 4 +++ .../console-cli/examples/grids/list-tables.md | 4 +++ .../examples/grids/update-boolean-column.md | 7 ++++ .../examples/grids/update-database.md | 4 +++ .../examples/grids/update-datetime-column.md | 7 ++++ .../examples/grids/update-email-column.md | 7 ++++ .../examples/grids/update-enum-column.md | 8 +++++ .../examples/grids/update-float-column.md | 9 +++++ .../examples/grids/update-integer-column.md | 9 +++++ .../examples/grids/update-ip-column.md | 7 ++++ .../grids/update-relationship-column.md | 6 ++++ .../console-cli/examples/grids/update-row.md | 6 ++++ .../console-cli/examples/grids/update-rows.md | 5 +++ .../examples/grids/update-string-column.md | 8 +++++ .../examples/grids/update-table.md | 7 ++++ .../examples/grids/update-url-column.md | 7 ++++ .../console-cli/examples/grids/upsert-row.md | 6 ++++ .../console-cli/examples/grids/upsert-rows.md | 4 +++ .../examples/grids/create-boolean-column.md | 18 ++++++++++ .../examples/grids/create-database.md | 15 +++++++++ .../examples/grids/create-datetime-column.md | 18 ++++++++++ .../examples/grids/create-email-column.md | 18 ++++++++++ .../examples/grids/create-enum-column.md | 19 +++++++++++ .../examples/grids/create-float-column.md | 20 +++++++++++ .../examples/grids/create-index.md | 19 +++++++++++ .../examples/grids/create-integer-column.md | 20 +++++++++++ .../examples/grids/create-ip-column.md | 18 ++++++++++ .../grids/create-relationship-column.md | 20 +++++++++++ .../console-web/examples/grids/create-row.md | 17 ++++++++++ .../console-web/examples/grids/create-rows.md | 15 +++++++++ .../examples/grids/create-string-column.md | 20 +++++++++++ .../examples/grids/create-table.md | 18 ++++++++++ .../examples/grids/create-url-column.md | 18 ++++++++++ .../examples/grids/decrement-row-column.md | 18 ++++++++++ .../examples/grids/delete-column.md | 15 +++++++++ .../examples/grids/delete-database.md | 13 ++++++++ .../examples/grids/delete-index.md | 15 +++++++++ .../console-web/examples/grids/delete-row.md | 15 +++++++++ .../console-web/examples/grids/delete-rows.md | 15 +++++++++ .../examples/grids/delete-table.md | 14 ++++++++ .../console-web/examples/grids/get-column.md | 15 +++++++++ .../examples/grids/get-database-usage.md | 14 ++++++++ .../examples/grids/get-database.md | 13 ++++++++ .../console-web/examples/grids/get-index.md | 15 +++++++++ .../console-web/examples/grids/get-row.md | 16 +++++++++ .../examples/grids/get-table-usage.md | 15 +++++++++ .../console-web/examples/grids/get-table.md | 14 ++++++++ .../examples/grids/increment-row-column.md | 18 ++++++++++ .../examples/grids/list-columns.md | 15 +++++++++ .../examples/grids/list-database-logs.md | 14 ++++++++ .../examples/grids/list-database-usage.md | 13 ++++++++ .../examples/grids/list-databases.md | 14 ++++++++ .../examples/grids/list-indexes.md | 15 +++++++++ .../examples/grids/list-row-logs.md | 16 +++++++++ .../console-web/examples/grids/list-rows.md | 15 +++++++++ .../examples/grids/list-table-logs.md | 15 +++++++++ .../console-web/examples/grids/list-tables.md | 15 +++++++++ .../examples/grids/update-boolean-column.md | 18 ++++++++++ .../examples/grids/update-database.md | 15 +++++++++ .../examples/grids/update-datetime-column.md | 18 ++++++++++ .../examples/grids/update-email-column.md | 18 ++++++++++ .../examples/grids/update-enum-column.md | 19 +++++++++++ .../examples/grids/update-float-column.md | 20 +++++++++++ .../examples/grids/update-integer-column.md | 20 +++++++++++ .../examples/grids/update-ip-column.md | 18 ++++++++++ .../grids/update-relationship-column.md | 17 ++++++++++ .../console-web/examples/grids/update-row.md | 17 ++++++++++ .../console-web/examples/grids/update-rows.md | 16 +++++++++ .../examples/grids/update-string-column.md | 19 +++++++++++ .../examples/grids/update-table.md | 18 ++++++++++ .../examples/grids/update-url-column.md | 18 ++++++++++ .../console-web/examples/grids/upsert-row.md | 17 ++++++++++ .../console-web/examples/grids/upsert-rows.md | 15 +++++++++ .../examples/grids/create-boolean-column.md | 17 ++++++++++ .../examples/grids/create-database.md | 14 ++++++++ .../examples/grids/create-datetime-column.md | 17 ++++++++++ .../examples/grids/create-email-column.md | 17 ++++++++++ .../examples/grids/create-enum-column.md | 18 ++++++++++ .../examples/grids/create-float-column.md | 19 +++++++++++ .../examples/grids/create-index.md | 18 ++++++++++ .../examples/grids/create-integer-column.md | 19 +++++++++++ .../examples/grids/create-ip-column.md | 17 ++++++++++ .../grids/create-relationship-column.md | 19 +++++++++++ .../server-dart/examples/grids/create-row.md | 16 +++++++++ .../server-dart/examples/grids/create-rows.md | 14 ++++++++ .../examples/grids/create-string-column.md | 19 +++++++++++ .../examples/grids/create-table.md | 17 ++++++++++ .../examples/grids/create-url-column.md | 17 ++++++++++ .../examples/grids/decrement-row-column.md | 17 ++++++++++ .../examples/grids/delete-column.md | 14 ++++++++ .../examples/grids/delete-database.md | 12 +++++++ .../examples/grids/delete-index.md | 14 ++++++++ .../server-dart/examples/grids/delete-row.md | 14 ++++++++ .../server-dart/examples/grids/delete-rows.md | 14 ++++++++ .../examples/grids/delete-table.md | 13 ++++++++ .../server-dart/examples/grids/get-column.md | 14 ++++++++ .../examples/grids/get-database.md | 12 +++++++ .../server-dart/examples/grids/get-index.md | 14 ++++++++ .../server-dart/examples/grids/get-row.md | 15 +++++++++ .../server-dart/examples/grids/get-table.md | 13 ++++++++ .../examples/grids/increment-row-column.md | 17 ++++++++++ .../examples/grids/list-columns.md | 14 ++++++++ .../examples/grids/list-databases.md | 13 ++++++++ .../examples/grids/list-indexes.md | 14 ++++++++ .../server-dart/examples/grids/list-rows.md | 14 ++++++++ .../server-dart/examples/grids/list-tables.md | 14 ++++++++ .../examples/grids/update-boolean-column.md | 17 ++++++++++ .../examples/grids/update-database.md | 14 ++++++++ .../examples/grids/update-datetime-column.md | 17 ++++++++++ .../examples/grids/update-email-column.md | 17 ++++++++++ .../examples/grids/update-enum-column.md | 18 ++++++++++ .../examples/grids/update-float-column.md | 19 +++++++++++ .../examples/grids/update-integer-column.md | 19 +++++++++++ .../examples/grids/update-ip-column.md | 17 ++++++++++ .../grids/update-relationship-column.md | 16 +++++++++ .../server-dart/examples/grids/update-row.md | 16 +++++++++ .../server-dart/examples/grids/update-rows.md | 15 +++++++++ .../examples/grids/update-string-column.md | 18 ++++++++++ .../examples/grids/update-table.md | 17 ++++++++++ .../examples/grids/update-url-column.md | 17 ++++++++++ .../server-dart/examples/grids/upsert-row.md | 16 +++++++++ .../server-dart/examples/grids/upsert-rows.md | 14 ++++++++ .../examples/grids/create-boolean-column.md | 17 ++++++++++ .../examples/grids/create-database.md | 14 ++++++++ .../examples/grids/create-datetime-column.md | 17 ++++++++++ .../examples/grids/create-email-column.md | 17 ++++++++++ .../examples/grids/create-enum-column.md | 18 ++++++++++ .../examples/grids/create-float-column.md | 19 +++++++++++ .../examples/grids/create-index.md | 18 ++++++++++ .../examples/grids/create-integer-column.md | 19 +++++++++++ .../examples/grids/create-ip-column.md | 17 ++++++++++ .../grids/create-relationship-column.md | 19 +++++++++++ .../server-deno/examples/grids/create-row.md | 16 +++++++++ .../server-deno/examples/grids/create-rows.md | 14 ++++++++ .../examples/grids/create-string-column.md | 19 +++++++++++ .../examples/grids/create-table.md | 17 ++++++++++ .../examples/grids/create-url-column.md | 17 ++++++++++ .../examples/grids/decrement-row-column.md | 17 ++++++++++ .../examples/grids/delete-column.md | 14 ++++++++ .../examples/grids/delete-database.md | 12 +++++++ .../examples/grids/delete-index.md | 14 ++++++++ .../server-deno/examples/grids/delete-row.md | 14 ++++++++ .../server-deno/examples/grids/delete-rows.md | 14 ++++++++ .../examples/grids/delete-table.md | 13 ++++++++ .../server-deno/examples/grids/get-column.md | 14 ++++++++ .../examples/grids/get-database.md | 12 +++++++ .../server-deno/examples/grids/get-index.md | 14 ++++++++ .../server-deno/examples/grids/get-row.md | 15 +++++++++ .../server-deno/examples/grids/get-table.md | 13 ++++++++ .../examples/grids/increment-row-column.md | 17 ++++++++++ .../examples/grids/list-columns.md | 14 ++++++++ .../examples/grids/list-databases.md | 13 ++++++++ .../examples/grids/list-indexes.md | 14 ++++++++ .../server-deno/examples/grids/list-rows.md | 14 ++++++++ .../server-deno/examples/grids/list-tables.md | 14 ++++++++ .../examples/grids/update-boolean-column.md | 17 ++++++++++ .../examples/grids/update-database.md | 14 ++++++++ .../examples/grids/update-datetime-column.md | 17 ++++++++++ .../examples/grids/update-email-column.md | 17 ++++++++++ .../examples/grids/update-enum-column.md | 18 ++++++++++ .../examples/grids/update-float-column.md | 19 +++++++++++ .../examples/grids/update-integer-column.md | 19 +++++++++++ .../examples/grids/update-ip-column.md | 17 ++++++++++ .../grids/update-relationship-column.md | 16 +++++++++ .../server-deno/examples/grids/update-row.md | 16 +++++++++ .../server-deno/examples/grids/update-rows.md | 15 +++++++++ .../examples/grids/update-string-column.md | 18 ++++++++++ .../examples/grids/update-table.md | 17 ++++++++++ .../examples/grids/update-url-column.md | 17 ++++++++++ .../server-deno/examples/grids/upsert-row.md | 16 +++++++++ .../server-deno/examples/grids/upsert-rows.md | 14 ++++++++ .../examples/grids/create-boolean-column.md | 19 +++++++++++ .../examples/grids/create-database.md | 16 +++++++++ .../examples/grids/create-datetime-column.md | 19 +++++++++++ .../examples/grids/create-email-column.md | 19 +++++++++++ .../examples/grids/create-enum-column.md | 20 +++++++++++ .../examples/grids/create-float-column.md | 21 ++++++++++++ .../examples/grids/create-index.md | 21 ++++++++++++ .../examples/grids/create-integer-column.md | 21 ++++++++++++ .../examples/grids/create-ip-column.md | 19 +++++++++++ .../grids/create-relationship-column.md | 22 +++++++++++++ .../examples/grids/create-row.md | 18 ++++++++++ .../examples/grids/create-rows.md | 16 +++++++++ .../examples/grids/create-string-column.md | 21 ++++++++++++ .../examples/grids/create-table.md | 19 +++++++++++ .../examples/grids/create-url-column.md | 19 +++++++++++ .../examples/grids/decrement-row-column.md | 19 +++++++++++ .../examples/grids/delete-column.md | 16 +++++++++ .../examples/grids/delete-database.md | 14 ++++++++ .../examples/grids/delete-index.md | 16 +++++++++ .../examples/grids/delete-row.md | 16 +++++++++ .../examples/grids/delete-rows.md | 16 +++++++++ .../examples/grids/delete-table.md | 15 +++++++++ .../examples/grids/get-column.md | 16 +++++++++ .../examples/grids/get-database.md | 14 ++++++++ .../server-dotnet/examples/grids/get-index.md | 16 +++++++++ .../server-dotnet/examples/grids/get-row.md | 17 ++++++++++ .../server-dotnet/examples/grids/get-table.md | 15 +++++++++ .../examples/grids/increment-row-column.md | 19 +++++++++++ .../examples/grids/list-columns.md | 16 +++++++++ .../examples/grids/list-databases.md | 15 +++++++++ .../examples/grids/list-indexes.md | 16 +++++++++ .../server-dotnet/examples/grids/list-rows.md | 16 +++++++++ .../examples/grids/list-tables.md | 16 +++++++++ .../examples/grids/update-boolean-column.md | 19 +++++++++++ .../examples/grids/update-database.md | 16 +++++++++ .../examples/grids/update-datetime-column.md | 19 +++++++++++ .../examples/grids/update-email-column.md | 19 +++++++++++ .../examples/grids/update-enum-column.md | 20 +++++++++++ .../examples/grids/update-float-column.md | 21 ++++++++++++ .../examples/grids/update-integer-column.md | 21 ++++++++++++ .../examples/grids/update-ip-column.md | 19 +++++++++++ .../grids/update-relationship-column.md | 19 +++++++++++ .../examples/grids/update-row.md | 18 ++++++++++ .../examples/grids/update-rows.md | 17 ++++++++++ .../examples/grids/update-string-column.md | 20 +++++++++++ .../examples/grids/update-table.md | 19 +++++++++++ .../examples/grids/update-url-column.md | 19 +++++++++++ .../examples/grids/upsert-row.md | 18 ++++++++++ .../examples/grids/upsert-rows.md | 16 +++++++++ .../examples/grids/create-boolean-column.md | 31 +++++++++++++++++ .../examples/grids/create-database.md | 28 ++++++++++++++++ .../examples/grids/create-datetime-column.md | 31 +++++++++++++++++ .../examples/grids/create-email-column.md | 31 +++++++++++++++++ .../examples/grids/create-enum-column.md | 32 ++++++++++++++++++ .../examples/grids/create-float-column.md | 33 +++++++++++++++++++ .../server-go/examples/grids/create-index.md | 32 ++++++++++++++++++ .../examples/grids/create-integer-column.md | 33 +++++++++++++++++++ .../examples/grids/create-ip-column.md | 31 +++++++++++++++++ .../grids/create-relationship-column.md | 33 +++++++++++++++++++ .../server-go/examples/grids/create-row.md | 30 +++++++++++++++++ .../server-go/examples/grids/create-rows.md | 28 ++++++++++++++++ .../examples/grids/create-string-column.md | 33 +++++++++++++++++++ .../server-go/examples/grids/create-table.md | 31 +++++++++++++++++ .../examples/grids/create-url-column.md | 31 +++++++++++++++++ .../examples/grids/decrement-row-column.md | 31 +++++++++++++++++ .../server-go/examples/grids/delete-column.md | 28 ++++++++++++++++ .../examples/grids/delete-database.md | 26 +++++++++++++++ .../server-go/examples/grids/delete-index.md | 28 ++++++++++++++++ .../server-go/examples/grids/delete-row.md | 28 ++++++++++++++++ .../server-go/examples/grids/delete-rows.md | 28 ++++++++++++++++ .../server-go/examples/grids/delete-table.md | 27 +++++++++++++++ .../server-go/examples/grids/get-column.md | 28 ++++++++++++++++ .../server-go/examples/grids/get-database.md | 26 +++++++++++++++ .../server-go/examples/grids/get-index.md | 28 ++++++++++++++++ .../1.8.x/server-go/examples/grids/get-row.md | 29 ++++++++++++++++ .../server-go/examples/grids/get-table.md | 27 +++++++++++++++ .../examples/grids/increment-row-column.md | 31 +++++++++++++++++ .../server-go/examples/grids/list-columns.md | 28 ++++++++++++++++ .../examples/grids/list-databases.md | 27 +++++++++++++++ .../server-go/examples/grids/list-indexes.md | 28 ++++++++++++++++ .../server-go/examples/grids/list-rows.md | 28 ++++++++++++++++ .../server-go/examples/grids/list-tables.md | 28 ++++++++++++++++ .../examples/grids/update-boolean-column.md | 31 +++++++++++++++++ .../examples/grids/update-database.md | 28 ++++++++++++++++ .../examples/grids/update-datetime-column.md | 31 +++++++++++++++++ .../examples/grids/update-email-column.md | 31 +++++++++++++++++ .../examples/grids/update-enum-column.md | 32 ++++++++++++++++++ .../examples/grids/update-float-column.md | 33 +++++++++++++++++++ .../examples/grids/update-integer-column.md | 33 +++++++++++++++++++ .../examples/grids/update-ip-column.md | 31 +++++++++++++++++ .../grids/update-relationship-column.md | 30 +++++++++++++++++ .../server-go/examples/grids/update-row.md | 30 +++++++++++++++++ .../server-go/examples/grids/update-rows.md | 29 ++++++++++++++++ .../examples/grids/update-string-column.md | 32 ++++++++++++++++++ .../server-go/examples/grids/update-table.md | 31 +++++++++++++++++ .../examples/grids/update-url-column.md | 31 +++++++++++++++++ .../server-go/examples/grids/upsert-row.md | 30 +++++++++++++++++ .../server-go/examples/grids/upsert-rows.md | 28 ++++++++++++++++ .../examples/grids/create-boolean-column.md | 20 +++++++++++ .../examples/grids/create-database.md | 13 ++++++++ .../examples/grids/create-datetime-column.md | 21 ++++++++++++ .../examples/grids/create-email-column.md | 21 ++++++++++++ .../examples/grids/create-enum-column.md | 23 +++++++++++++ .../examples/grids/create-float-column.md | 24 ++++++++++++++ .../examples/grids/create-index.md | 22 +++++++++++++ .../examples/grids/create-integer-column.md | 24 ++++++++++++++ .../examples/grids/create-ip-column.md | 21 ++++++++++++ .../grids/create-relationship-column.md | 27 +++++++++++++++ .../examples/grids/create-row.md | 18 ++++++++++ .../examples/grids/create-rows.md | 19 +++++++++++ .../examples/grids/create-string-column.md | 24 ++++++++++++++ .../examples/grids/create-table.md | 32 ++++++++++++++++++ .../examples/grids/create-url-column.md | 21 ++++++++++++ .../examples/grids/decrement-row-column.md | 19 +++++++++++ .../examples/grids/delete-column.md | 9 +++++ .../examples/grids/delete-database.md | 7 ++++ .../examples/grids/delete-index.md | 9 +++++ .../examples/grids/delete-row.md | 9 +++++ .../examples/grids/delete-rows.md | 19 +++++++++++ .../examples/grids/delete-table.md | 8 +++++ .../examples/grids/get-column.md | 0 .../examples/grids/get-database.md | 0 .../examples/grids/get-index.md | 0 .../server-graphql/examples/grids/get-row.md | 0 .../examples/grids/get-table.md | 0 .../examples/grids/increment-row-column.md | 19 +++++++++++ .../examples/grids/list-columns.md | 0 .../examples/grids/list-databases.md | 0 .../examples/grids/list-indexes.md | 0 .../examples/grids/list-rows.md | 0 .../examples/grids/list-tables.md | 0 .../examples/grids/update-boolean-column.md | 20 +++++++++++ .../examples/grids/update-database.md | 13 ++++++++ .../examples/grids/update-datetime-column.md | 21 ++++++++++++ .../examples/grids/update-email-column.md | 21 ++++++++++++ .../examples/grids/update-enum-column.md | 23 +++++++++++++ .../examples/grids/update-float-column.md | 24 ++++++++++++++ .../examples/grids/update-integer-column.md | 24 ++++++++++++++ .../examples/grids/update-ip-column.md | 21 ++++++++++++ .../grids/update-relationship-column.md | 24 ++++++++++++++ .../examples/grids/update-row.md | 18 ++++++++++ .../examples/grids/update-rows.md | 20 +++++++++++ .../examples/grids/update-string-column.md | 23 +++++++++++++ .../examples/grids/update-table.md | 32 ++++++++++++++++++ .../examples/grids/update-url-column.md | 21 ++++++++++++ .../examples/grids/upsert-row.md | 18 ++++++++++ .../examples/grids/upsert-rows.md | 19 +++++++++++ .../java/grids/create-boolean-column.md | 28 ++++++++++++++++ .../java/grids/create-database.md | 25 ++++++++++++++ .../java/grids/create-datetime-column.md | 28 ++++++++++++++++ .../java/grids/create-email-column.md | 28 ++++++++++++++++ .../java/grids/create-enum-column.md | 29 ++++++++++++++++ .../java/grids/create-float-column.md | 30 +++++++++++++++++ .../server-kotlin/java/grids/create-index.md | 30 +++++++++++++++++ .../java/grids/create-integer-column.md | 30 +++++++++++++++++ .../java/grids/create-ip-column.md | 28 ++++++++++++++++ .../java/grids/create-relationship-column.md | 31 +++++++++++++++++ .../server-kotlin/java/grids/create-row.md | 27 +++++++++++++++ .../server-kotlin/java/grids/create-rows.md | 25 ++++++++++++++ .../java/grids/create-string-column.md | 30 +++++++++++++++++ .../server-kotlin/java/grids/create-table.md | 28 ++++++++++++++++ .../java/grids/create-url-column.md | 28 ++++++++++++++++ .../java/grids/decrement-row-column.md | 28 ++++++++++++++++ .../server-kotlin/java/grids/delete-column.md | 25 ++++++++++++++ .../java/grids/delete-database.md | 23 +++++++++++++ .../server-kotlin/java/grids/delete-index.md | 25 ++++++++++++++ .../server-kotlin/java/grids/delete-row.md | 25 ++++++++++++++ .../server-kotlin/java/grids/delete-rows.md | 25 ++++++++++++++ .../server-kotlin/java/grids/delete-table.md | 24 ++++++++++++++ .../server-kotlin/java/grids/get-column.md | 25 ++++++++++++++ .../server-kotlin/java/grids/get-database.md | 23 +++++++++++++ .../server-kotlin/java/grids/get-index.md | 25 ++++++++++++++ .../1.8.x/server-kotlin/java/grids/get-row.md | 26 +++++++++++++++ .../server-kotlin/java/grids/get-table.md | 24 ++++++++++++++ .../java/grids/increment-row-column.md | 28 ++++++++++++++++ .../server-kotlin/java/grids/list-columns.md | 25 ++++++++++++++ .../java/grids/list-databases.md | 24 ++++++++++++++ .../server-kotlin/java/grids/list-indexes.md | 25 ++++++++++++++ .../server-kotlin/java/grids/list-rows.md | 25 ++++++++++++++ .../server-kotlin/java/grids/list-tables.md | 25 ++++++++++++++ .../java/grids/update-boolean-column.md | 28 ++++++++++++++++ .../java/grids/update-database.md | 25 ++++++++++++++ .../java/grids/update-datetime-column.md | 28 ++++++++++++++++ .../java/grids/update-email-column.md | 28 ++++++++++++++++ .../java/grids/update-enum-column.md | 29 ++++++++++++++++ .../java/grids/update-float-column.md | 30 +++++++++++++++++ .../java/grids/update-integer-column.md | 30 +++++++++++++++++ .../java/grids/update-ip-column.md | 28 ++++++++++++++++ .../java/grids/update-relationship-column.md | 27 +++++++++++++++ .../server-kotlin/java/grids/update-row.md | 27 +++++++++++++++ .../server-kotlin/java/grids/update-rows.md | 26 +++++++++++++++ .../java/grids/update-string-column.md | 29 ++++++++++++++++ .../server-kotlin/java/grids/update-table.md | 28 ++++++++++++++++ .../java/grids/update-url-column.md | 28 ++++++++++++++++ .../server-kotlin/java/grids/upsert-row.md | 27 +++++++++++++++ .../server-kotlin/java/grids/upsert-rows.md | 25 ++++++++++++++ .../kotlin/grids/create-boolean-column.md | 19 +++++++++++ .../kotlin/grids/create-database.md | 16 +++++++++ .../kotlin/grids/create-datetime-column.md | 19 +++++++++++ .../kotlin/grids/create-email-column.md | 19 +++++++++++ .../kotlin/grids/create-enum-column.md | 20 +++++++++++ .../kotlin/grids/create-float-column.md | 21 ++++++++++++ .../kotlin/grids/create-index.md | 21 ++++++++++++ .../kotlin/grids/create-integer-column.md | 21 ++++++++++++ .../kotlin/grids/create-ip-column.md | 19 +++++++++++ .../grids/create-relationship-column.md | 22 +++++++++++++ .../server-kotlin/kotlin/grids/create-row.md | 18 ++++++++++ .../server-kotlin/kotlin/grids/create-rows.md | 16 +++++++++ .../kotlin/grids/create-string-column.md | 21 ++++++++++++ .../kotlin/grids/create-table.md | 19 +++++++++++ .../kotlin/grids/create-url-column.md | 19 +++++++++++ .../kotlin/grids/decrement-row-column.md | 19 +++++++++++ .../kotlin/grids/delete-column.md | 16 +++++++++ .../kotlin/grids/delete-database.md | 14 ++++++++ .../kotlin/grids/delete-index.md | 16 +++++++++ .../server-kotlin/kotlin/grids/delete-row.md | 16 +++++++++ .../server-kotlin/kotlin/grids/delete-rows.md | 16 +++++++++ .../kotlin/grids/delete-table.md | 15 +++++++++ .../server-kotlin/kotlin/grids/get-column.md | 16 +++++++++ .../kotlin/grids/get-database.md | 14 ++++++++ .../server-kotlin/kotlin/grids/get-index.md | 16 +++++++++ .../server-kotlin/kotlin/grids/get-row.md | 17 ++++++++++ .../server-kotlin/kotlin/grids/get-table.md | 15 +++++++++ .../kotlin/grids/increment-row-column.md | 19 +++++++++++ .../kotlin/grids/list-columns.md | 16 +++++++++ .../kotlin/grids/list-databases.md | 15 +++++++++ .../kotlin/grids/list-indexes.md | 16 +++++++++ .../server-kotlin/kotlin/grids/list-rows.md | 16 +++++++++ .../server-kotlin/kotlin/grids/list-tables.md | 16 +++++++++ .../kotlin/grids/update-boolean-column.md | 19 +++++++++++ .../kotlin/grids/update-database.md | 16 +++++++++ .../kotlin/grids/update-datetime-column.md | 19 +++++++++++ .../kotlin/grids/update-email-column.md | 19 +++++++++++ .../kotlin/grids/update-enum-column.md | 20 +++++++++++ .../kotlin/grids/update-float-column.md | 21 ++++++++++++ .../kotlin/grids/update-integer-column.md | 21 ++++++++++++ .../kotlin/grids/update-ip-column.md | 19 +++++++++++ .../grids/update-relationship-column.md | 18 ++++++++++ .../server-kotlin/kotlin/grids/update-row.md | 18 ++++++++++ .../server-kotlin/kotlin/grids/update-rows.md | 17 ++++++++++ .../kotlin/grids/update-string-column.md | 20 +++++++++++ .../kotlin/grids/update-table.md | 19 +++++++++++ .../kotlin/grids/update-url-column.md | 19 +++++++++++ .../server-kotlin/kotlin/grids/upsert-row.md | 18 ++++++++++ .../server-kotlin/kotlin/grids/upsert-rows.md | 16 +++++++++ .../examples/grids/create-boolean-column.md | 17 ++++++++++ .../examples/grids/create-database.md | 14 ++++++++ .../examples/grids/create-datetime-column.md | 17 ++++++++++ .../examples/grids/create-email-column.md | 17 ++++++++++ .../examples/grids/create-enum-column.md | 18 ++++++++++ .../examples/grids/create-float-column.md | 19 +++++++++++ .../examples/grids/create-index.md | 18 ++++++++++ .../examples/grids/create-integer-column.md | 19 +++++++++++ .../examples/grids/create-ip-column.md | 17 ++++++++++ .../grids/create-relationship-column.md | 19 +++++++++++ .../examples/grids/create-row.md | 16 +++++++++ .../examples/grids/create-rows.md | 14 ++++++++ .../examples/grids/create-string-column.md | 19 +++++++++++ .../examples/grids/create-table.md | 17 ++++++++++ .../examples/grids/create-url-column.md | 17 ++++++++++ .../examples/grids/decrement-row-column.md | 17 ++++++++++ .../examples/grids/delete-column.md | 14 ++++++++ .../examples/grids/delete-database.md | 12 +++++++ .../examples/grids/delete-index.md | 14 ++++++++ .../examples/grids/delete-row.md | 14 ++++++++ .../examples/grids/delete-rows.md | 14 ++++++++ .../examples/grids/delete-table.md | 13 ++++++++ .../examples/grids/get-column.md | 14 ++++++++ .../examples/grids/get-database.md | 12 +++++++ .../server-nodejs/examples/grids/get-index.md | 14 ++++++++ .../server-nodejs/examples/grids/get-row.md | 15 +++++++++ .../server-nodejs/examples/grids/get-table.md | 13 ++++++++ .../examples/grids/increment-row-column.md | 17 ++++++++++ .../examples/grids/list-columns.md | 14 ++++++++ .../examples/grids/list-databases.md | 13 ++++++++ .../examples/grids/list-indexes.md | 14 ++++++++ .../server-nodejs/examples/grids/list-rows.md | 14 ++++++++ .../examples/grids/list-tables.md | 14 ++++++++ .../examples/grids/update-boolean-column.md | 17 ++++++++++ .../examples/grids/update-database.md | 14 ++++++++ .../examples/grids/update-datetime-column.md | 17 ++++++++++ .../examples/grids/update-email-column.md | 17 ++++++++++ .../examples/grids/update-enum-column.md | 18 ++++++++++ .../examples/grids/update-float-column.md | 19 +++++++++++ .../examples/grids/update-integer-column.md | 19 +++++++++++ .../examples/grids/update-ip-column.md | 17 ++++++++++ .../grids/update-relationship-column.md | 16 +++++++++ .../examples/grids/update-row.md | 16 +++++++++ .../examples/grids/update-rows.md | 15 +++++++++ .../examples/grids/update-string-column.md | 18 ++++++++++ .../examples/grids/update-table.md | 17 ++++++++++ .../examples/grids/update-url-column.md | 17 ++++++++++ .../examples/grids/upsert-row.md | 16 +++++++++ .../examples/grids/upsert-rows.md | 14 ++++++++ .../examples/grids/create-boolean-column.md | 20 +++++++++++ .../examples/grids/create-database.md | 17 ++++++++++ .../examples/grids/create-datetime-column.md | 20 +++++++++++ .../examples/grids/create-email-column.md | 20 +++++++++++ .../examples/grids/create-enum-column.md | 21 ++++++++++++ .../examples/grids/create-float-column.md | 22 +++++++++++++ .../server-php/examples/grids/create-index.md | 22 +++++++++++++ .../examples/grids/create-integer-column.md | 22 +++++++++++++ .../examples/grids/create-ip-column.md | 20 +++++++++++ .../grids/create-relationship-column.md | 23 +++++++++++++ .../server-php/examples/grids/create-row.md | 19 +++++++++++ .../server-php/examples/grids/create-rows.md | 17 ++++++++++ .../examples/grids/create-string-column.md | 22 +++++++++++++ .../server-php/examples/grids/create-table.md | 20 +++++++++++ .../examples/grids/create-url-column.md | 20 +++++++++++ .../examples/grids/decrement-row-column.md | 20 +++++++++++ .../examples/grids/delete-column.md | 17 ++++++++++ .../examples/grids/delete-database.md | 15 +++++++++ .../server-php/examples/grids/delete-index.md | 17 ++++++++++ .../server-php/examples/grids/delete-row.md | 17 ++++++++++ .../server-php/examples/grids/delete-rows.md | 17 ++++++++++ .../server-php/examples/grids/delete-table.md | 16 +++++++++ .../server-php/examples/grids/get-column.md | 17 ++++++++++ .../server-php/examples/grids/get-database.md | 15 +++++++++ .../server-php/examples/grids/get-index.md | 17 ++++++++++ .../server-php/examples/grids/get-row.md | 18 ++++++++++ .../server-php/examples/grids/get-table.md | 16 +++++++++ .../examples/grids/increment-row-column.md | 20 +++++++++++ .../server-php/examples/grids/list-columns.md | 17 ++++++++++ .../examples/grids/list-databases.md | 16 +++++++++ .../server-php/examples/grids/list-indexes.md | 17 ++++++++++ .../server-php/examples/grids/list-rows.md | 17 ++++++++++ .../server-php/examples/grids/list-tables.md | 17 ++++++++++ .../examples/grids/update-boolean-column.md | 20 +++++++++++ .../examples/grids/update-database.md | 17 ++++++++++ .../examples/grids/update-datetime-column.md | 20 +++++++++++ .../examples/grids/update-email-column.md | 20 +++++++++++ .../examples/grids/update-enum-column.md | 21 ++++++++++++ .../examples/grids/update-float-column.md | 22 +++++++++++++ .../examples/grids/update-integer-column.md | 22 +++++++++++++ .../examples/grids/update-ip-column.md | 20 +++++++++++ .../grids/update-relationship-column.md | 19 +++++++++++ .../server-php/examples/grids/update-row.md | 19 +++++++++++ .../server-php/examples/grids/update-rows.md | 18 ++++++++++ .../examples/grids/update-string-column.md | 21 ++++++++++++ .../server-php/examples/grids/update-table.md | 20 +++++++++++ .../examples/grids/update-url-column.md | 20 +++++++++++ .../server-php/examples/grids/upsert-row.md | 19 +++++++++++ .../server-php/examples/grids/upsert-rows.md | 17 ++++++++++ .../examples/grids/create-boolean-column.md | 18 ++++++++++ .../examples/grids/create-database.md | 15 +++++++++ .../examples/grids/create-datetime-column.md | 18 ++++++++++ .../examples/grids/create-email-column.md | 18 ++++++++++ .../examples/grids/create-enum-column.md | 19 +++++++++++ .../examples/grids/create-float-column.md | 20 +++++++++++ .../examples/grids/create-index.md | 20 +++++++++++ .../examples/grids/create-integer-column.md | 20 +++++++++++ .../examples/grids/create-ip-column.md | 18 ++++++++++ .../grids/create-relationship-column.md | 21 ++++++++++++ .../examples/grids/create-row.md | 17 ++++++++++ .../examples/grids/create-rows.md | 15 +++++++++ .../examples/grids/create-string-column.md | 20 +++++++++++ .../examples/grids/create-table.md | 18 ++++++++++ .../examples/grids/create-url-column.md | 18 ++++++++++ .../examples/grids/decrement-row-column.md | 18 ++++++++++ .../examples/grids/delete-column.md | 15 +++++++++ .../examples/grids/delete-database.md | 13 ++++++++ .../examples/grids/delete-index.md | 15 +++++++++ .../examples/grids/delete-row.md | 15 +++++++++ .../examples/grids/delete-rows.md | 15 +++++++++ .../examples/grids/delete-table.md | 14 ++++++++ .../examples/grids/get-column.md | 15 +++++++++ .../examples/grids/get-database.md | 13 ++++++++ .../server-python/examples/grids/get-index.md | 15 +++++++++ .../server-python/examples/grids/get-row.md | 16 +++++++++ .../server-python/examples/grids/get-table.md | 14 ++++++++ .../examples/grids/increment-row-column.md | 18 ++++++++++ .../examples/grids/list-columns.md | 15 +++++++++ .../examples/grids/list-databases.md | 14 ++++++++ .../examples/grids/list-indexes.md | 15 +++++++++ .../server-python/examples/grids/list-rows.md | 15 +++++++++ .../examples/grids/list-tables.md | 15 +++++++++ .../examples/grids/update-boolean-column.md | 18 ++++++++++ .../examples/grids/update-database.md | 15 +++++++++ .../examples/grids/update-datetime-column.md | 18 ++++++++++ .../examples/grids/update-email-column.md | 18 ++++++++++ .../examples/grids/update-enum-column.md | 19 +++++++++++ .../examples/grids/update-float-column.md | 20 +++++++++++ .../examples/grids/update-integer-column.md | 20 +++++++++++ .../examples/grids/update-ip-column.md | 18 ++++++++++ .../grids/update-relationship-column.md | 17 ++++++++++ .../examples/grids/update-row.md | 17 ++++++++++ .../examples/grids/update-rows.md | 16 +++++++++ .../examples/grids/update-string-column.md | 19 +++++++++++ .../examples/grids/update-table.md | 18 ++++++++++ .../examples/grids/update-url-column.md | 18 ++++++++++ .../examples/grids/upsert-row.md | 17 ++++++++++ .../examples/grids/upsert-rows.md | 15 +++++++++ .../examples/grids/create-boolean-column.md | 13 ++++++++ .../examples/grids/create-database.md | 12 +++++++ .../examples/grids/create-datetime-column.md | 13 ++++++++ .../examples/grids/create-email-column.md | 13 ++++++++ .../examples/grids/create-enum-column.md | 14 ++++++++ .../examples/grids/create-float-column.md | 15 +++++++++ .../examples/grids/create-index.md | 14 ++++++++ .../examples/grids/create-integer-column.md | 15 +++++++++ .../examples/grids/create-ip-column.md | 13 ++++++++ .../grids/create-relationship-column.md | 15 +++++++++ .../server-rest/examples/grids/create-row.md | 14 ++++++++ .../server-rest/examples/grids/create-rows.md | 12 +++++++ .../examples/grids/create-string-column.md | 15 +++++++++ .../examples/grids/create-table.md | 14 ++++++++ .../examples/grids/create-url-column.md | 13 ++++++++ .../examples/grids/decrement-row-column.md | 11 +++++++ .../examples/grids/delete-column.md | 7 ++++ .../examples/grids/delete-database.md | 7 ++++ .../examples/grids/delete-index.md | 7 ++++ .../server-rest/examples/grids/delete-row.md | 9 +++++ .../server-rest/examples/grids/delete-rows.md | 10 ++++++ .../examples/grids/delete-table.md | 7 ++++ .../server-rest/examples/grids/get-column.md | 5 +++ .../examples/grids/get-database.md | 5 +++ .../server-rest/examples/grids/get-index.md | 5 +++ .../server-rest/examples/grids/get-row.md | 7 ++++ .../server-rest/examples/grids/get-table.md | 5 +++ .../examples/grids/increment-row-column.md | 11 +++++++ .../examples/grids/list-columns.md | 5 +++ .../examples/grids/list-databases.md | 5 +++ .../examples/grids/list-indexes.md | 5 +++ .../server-rest/examples/grids/list-rows.md | 7 ++++ .../server-rest/examples/grids/list-tables.md | 5 +++ .../examples/grids/update-boolean-column.md | 12 +++++++ .../examples/grids/update-database.md | 11 +++++++ .../examples/grids/update-datetime-column.md | 12 +++++++ .../examples/grids/update-email-column.md | 12 +++++++ .../examples/grids/update-enum-column.md | 13 ++++++++ .../examples/grids/update-float-column.md | 14 ++++++++ .../examples/grids/update-integer-column.md | 14 ++++++++ .../examples/grids/update-ip-column.md | 12 +++++++ .../grids/update-relationship-column.md | 11 +++++++ .../server-rest/examples/grids/update-row.md | 13 ++++++++ .../server-rest/examples/grids/update-rows.md | 11 +++++++ .../examples/grids/update-string-column.md | 13 ++++++++ .../examples/grids/update-table.md | 13 ++++++++ .../examples/grids/update-url-column.md | 12 +++++++ .../server-rest/examples/grids/upsert-row.md | 13 ++++++++ .../server-rest/examples/grids/upsert-rows.md | 10 ++++++ .../examples/grids/create-boolean-column.md | 19 +++++++++++ .../examples/grids/create-database.md | 16 +++++++++ .../examples/grids/create-datetime-column.md | 19 +++++++++++ .../examples/grids/create-email-column.md | 19 +++++++++++ .../examples/grids/create-enum-column.md | 20 +++++++++++ .../examples/grids/create-float-column.md | 21 ++++++++++++ .../examples/grids/create-index.md | 21 ++++++++++++ .../examples/grids/create-integer-column.md | 21 ++++++++++++ .../examples/grids/create-ip-column.md | 19 +++++++++++ .../grids/create-relationship-column.md | 22 +++++++++++++ .../server-ruby/examples/grids/create-row.md | 18 ++++++++++ .../server-ruby/examples/grids/create-rows.md | 16 +++++++++ .../examples/grids/create-string-column.md | 21 ++++++++++++ .../examples/grids/create-table.md | 19 +++++++++++ .../examples/grids/create-url-column.md | 19 +++++++++++ .../examples/grids/decrement-row-column.md | 19 +++++++++++ .../examples/grids/delete-column.md | 16 +++++++++ .../examples/grids/delete-database.md | 14 ++++++++ .../examples/grids/delete-index.md | 16 +++++++++ .../server-ruby/examples/grids/delete-row.md | 16 +++++++++ .../server-ruby/examples/grids/delete-rows.md | 16 +++++++++ .../examples/grids/delete-table.md | 15 +++++++++ .../server-ruby/examples/grids/get-column.md | 16 +++++++++ .../examples/grids/get-database.md | 14 ++++++++ .../server-ruby/examples/grids/get-index.md | 16 +++++++++ .../server-ruby/examples/grids/get-row.md | 17 ++++++++++ .../server-ruby/examples/grids/get-table.md | 15 +++++++++ .../examples/grids/increment-row-column.md | 19 +++++++++++ .../examples/grids/list-columns.md | 16 +++++++++ .../examples/grids/list-databases.md | 15 +++++++++ .../examples/grids/list-indexes.md | 16 +++++++++ .../server-ruby/examples/grids/list-rows.md | 16 +++++++++ .../server-ruby/examples/grids/list-tables.md | 16 +++++++++ .../examples/grids/update-boolean-column.md | 19 +++++++++++ .../examples/grids/update-database.md | 16 +++++++++ .../examples/grids/update-datetime-column.md | 19 +++++++++++ .../examples/grids/update-email-column.md | 19 +++++++++++ .../examples/grids/update-enum-column.md | 20 +++++++++++ .../examples/grids/update-float-column.md | 21 ++++++++++++ .../examples/grids/update-integer-column.md | 21 ++++++++++++ .../examples/grids/update-ip-column.md | 19 +++++++++++ .../grids/update-relationship-column.md | 18 ++++++++++ .../server-ruby/examples/grids/update-row.md | 18 ++++++++++ .../server-ruby/examples/grids/update-rows.md | 17 ++++++++++ .../examples/grids/update-string-column.md | 20 +++++++++++ .../examples/grids/update-table.md | 19 +++++++++++ .../examples/grids/update-url-column.md | 19 +++++++++++ .../server-ruby/examples/grids/upsert-row.md | 18 ++++++++++ .../server-ruby/examples/grids/upsert-rows.md | 16 +++++++++ .../examples/grids/create-boolean-column.md | 18 ++++++++++ .../examples/grids/create-database.md | 15 +++++++++ .../examples/grids/create-datetime-column.md | 18 ++++++++++ .../examples/grids/create-email-column.md | 18 ++++++++++ .../examples/grids/create-enum-column.md | 19 +++++++++++ .../examples/grids/create-float-column.md | 20 +++++++++++ .../examples/grids/create-index.md | 20 +++++++++++ .../examples/grids/create-integer-column.md | 20 +++++++++++ .../examples/grids/create-ip-column.md | 18 ++++++++++ .../grids/create-relationship-column.md | 21 ++++++++++++ .../server-swift/examples/grids/create-row.md | 17 ++++++++++ .../examples/grids/create-rows.md | 15 +++++++++ .../examples/grids/create-string-column.md | 20 +++++++++++ .../examples/grids/create-table.md | 18 ++++++++++ .../examples/grids/create-url-column.md | 18 ++++++++++ .../examples/grids/decrement-row-column.md | 18 ++++++++++ .../examples/grids/delete-column.md | 15 +++++++++ .../examples/grids/delete-database.md | 13 ++++++++ .../examples/grids/delete-index.md | 15 +++++++++ .../server-swift/examples/grids/delete-row.md | 15 +++++++++ .../examples/grids/delete-rows.md | 15 +++++++++ .../examples/grids/delete-table.md | 14 ++++++++ .../server-swift/examples/grids/get-column.md | 15 +++++++++ .../examples/grids/get-database.md | 13 ++++++++ .../server-swift/examples/grids/get-index.md | 15 +++++++++ .../server-swift/examples/grids/get-row.md | 16 +++++++++ .../server-swift/examples/grids/get-table.md | 14 ++++++++ .../examples/grids/increment-row-column.md | 18 ++++++++++ .../examples/grids/list-columns.md | 15 +++++++++ .../examples/grids/list-databases.md | 14 ++++++++ .../examples/grids/list-indexes.md | 15 +++++++++ .../server-swift/examples/grids/list-rows.md | 15 +++++++++ .../examples/grids/list-tables.md | 15 +++++++++ .../examples/grids/update-boolean-column.md | 18 ++++++++++ .../examples/grids/update-database.md | 15 +++++++++ .../examples/grids/update-datetime-column.md | 18 ++++++++++ .../examples/grids/update-email-column.md | 18 ++++++++++ .../examples/grids/update-enum-column.md | 19 +++++++++++ .../examples/grids/update-float-column.md | 20 +++++++++++ .../examples/grids/update-integer-column.md | 20 +++++++++++ .../examples/grids/update-ip-column.md | 18 ++++++++++ .../grids/update-relationship-column.md | 18 ++++++++++ .../server-swift/examples/grids/update-row.md | 17 ++++++++++ .../examples/grids/update-rows.md | 16 +++++++++ .../examples/grids/update-string-column.md | 19 +++++++++++ .../examples/grids/update-table.md | 18 ++++++++++ .../examples/grids/update-url-column.md | 18 ++++++++++ .../server-swift/examples/grids/upsert-row.md | 17 ++++++++++ .../examples/grids/upsert-rows.md | 15 +++++++++ 795 files changed, 13581 insertions(+) create mode 100644 docs/examples/1.8.x/client-android/java/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-android/java/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-android/java/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-android/java/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-android/java/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-android/java/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-apple/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-rest/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-web/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-database-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-table-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-database-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-database-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-row-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-table-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-database-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-table-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-database-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-database-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-row-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-table-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md diff --git a/docs/examples/1.8.x/client-android/java/grids/create-row.md b/docs/examples/1.8.x/client-android/java/grids/create-row.md new file mode 100644 index 0000000000..93cea1f09c --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/grids/create-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Grids grids = new Grids(client); + +grids.createRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/grids/delete-row.md b/docs/examples/1.8.x/client-android/java/grids/delete-row.md new file mode 100644 index 0000000000..a73c03a06e --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/grids/delete-row.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Grids grids = new Grids(client); + +grids.deleteRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/grids/get-row.md b/docs/examples/1.8.x/client-android/java/grids/get-row.md new file mode 100644 index 0000000000..4968759d6b --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/grids/get-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Grids grids = new Grids(client); + +grids.getRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/grids/list-rows.md b/docs/examples/1.8.x/client-android/java/grids/list-rows.md new file mode 100644 index 0000000000..55336dc452 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/grids/list-rows.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Grids grids = new Grids(client); + +grids.listRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/grids/update-row.md b/docs/examples/1.8.x/client-android/java/grids/update-row.md new file mode 100644 index 0000000000..23dc0907eb --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/grids/update-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Grids grids = new Grids(client); + +grids.updateRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/grids/upsert-row.md b/docs/examples/1.8.x/client-android/java/grids/upsert-row.md new file mode 100644 index 0000000000..3938fde103 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/grids/upsert-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Grids grids = new Grids(client); + +grids.upsertRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/create-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/create-row.md new file mode 100644 index 0000000000..5b29ac0db0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/grids/create-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val grids = Grids(client) + +val result = grids.createRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md new file mode 100644 index 0000000000..e85ff6c4ad --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val grids = Grids(client) + +val result = grids.deleteRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/get-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/get-row.md new file mode 100644 index 0000000000..0b6c313645 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/grids/get-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val grids = Grids(client) + +val result = grids.getRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md b/docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md new file mode 100644 index 0000000000..153e62787f --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val grids = Grids(client) + +val result = grids.listRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/update-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/update-row.md new file mode 100644 index 0000000000..8dff0b157c --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/grids/update-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val grids = Grids(client) + +val result = grids.updateRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md new file mode 100644 index 0000000000..a6f5bb846e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val grids = Grids(client) + +val result = grids.upsertRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-apple/examples/grids/create-row.md b/docs/examples/1.8.x/client-apple/examples/grids/create-row.md new file mode 100644 index 0000000000..0739b27949 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/grids/create-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let grids = Grids(client) + +let row = try await grids.createRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/grids/delete-row.md b/docs/examples/1.8.x/client-apple/examples/grids/delete-row.md new file mode 100644 index 0000000000..58ae835ec5 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/grids/delete-row.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let grids = Grids(client) + +let result = try await grids.deleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/grids/get-row.md b/docs/examples/1.8.x/client-apple/examples/grids/get-row.md new file mode 100644 index 0000000000..fccdad1f34 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/grids/get-row.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let grids = Grids(client) + +let row = try await grids.getRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/grids/list-rows.md b/docs/examples/1.8.x/client-apple/examples/grids/list-rows.md new file mode 100644 index 0000000000..1b4d885a64 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/grids/list-rows.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let grids = Grids(client) + +let rowList = try await grids.listRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/grids/update-row.md b/docs/examples/1.8.x/client-apple/examples/grids/update-row.md new file mode 100644 index 0000000000..95a3611a92 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/grids/update-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let grids = Grids(client) + +let row = try await grids.updateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md new file mode 100644 index 0000000000..c5638a4881 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let grids = Grids(client) + +let row = try await grids.upsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/create-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/create-row.md new file mode 100644 index 0000000000..2f80a01806 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/grids/create-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Grids grids = Grids(client); + +Row result = await grids.createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md new file mode 100644 index 0000000000..04f5aec544 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Grids grids = Grids(client); + +await grids.deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/get-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/get-row.md new file mode 100644 index 0000000000..a8a380ee7c --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/grids/get-row.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Grids grids = Grids(client); + +Row result = await grids.getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md b/docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md new file mode 100644 index 0000000000..6654c57aaa --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Grids grids = Grids(client); + +RowList result = await grids.listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/update-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/update-row.md new file mode 100644 index 0000000000..293f38877a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/grids/update-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Grids grids = Grids(client); + +Row result = await grids.updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md new file mode 100644 index 0000000000..2cec5621b7 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Grids grids = Grids(client); + +Row result = await grids.upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/create-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/create-row.md new file mode 100644 index 0000000000..cffb7361f2 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/grids/create-row.md @@ -0,0 +1,18 @@ +mutation { + gridsCreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md new file mode 100644 index 0000000000..40dcbdc219 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md @@ -0,0 +1,9 @@ +mutation { + gridsDeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/get-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/get-row.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/list-rows.md b/docs/examples/1.8.x/client-graphql/examples/grids/list-rows.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/update-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/update-row.md new file mode 100644 index 0000000000..2bb105e8c0 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/grids/update-row.md @@ -0,0 +1,18 @@ +mutation { + gridsUpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md new file mode 100644 index 0000000000..f8e0606109 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md @@ -0,0 +1,18 @@ +mutation { + gridsUpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/create-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/create-row.md new file mode 100644 index 0000000000..9fdbce2dd9 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/grids/create-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/delete-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/delete-row.md new file mode 100644 index 0000000000..33a5a50a69 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/grids/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/get-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/get-row.md new file mode 100644 index 0000000000..7df0636b2e --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/grids/get-row.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/list-rows.md b/docs/examples/1.8.x/client-react-native/examples/grids/list-rows.md new file mode 100644 index 0000000000..3fd58773ef --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/grids/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/update-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/update-row.md new file mode 100644 index 0000000000..39b147758f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/grids/update-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/upsert-row.md new file mode 100644 index 0000000000..54443a6a4d --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/grids/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-rest/examples/grids/create-row.md b/docs/examples/1.8.x/client-rest/examples/grids/create-row.md new file mode 100644 index 0000000000..98b261ecba --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/grids/create-row.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rowId": "<ROW_ID>", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/grids/delete-row.md b/docs/examples/1.8.x/client-rest/examples/grids/delete-row.md new file mode 100644 index 0000000000..6f702a8526 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/grids/delete-row.md @@ -0,0 +1,8 @@ +DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/client-rest/examples/grids/get-row.md b/docs/examples/1.8.x/client-rest/examples/grids/get-row.md new file mode 100644 index 0000000000..876fe0f796 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/grids/get-row.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/grids/list-rows.md b/docs/examples/1.8.x/client-rest/examples/grids/list-rows.md new file mode 100644 index 0000000000..86751cfcaf --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/grids/list-rows.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/grids/update-row.md b/docs/examples/1.8.x/client-rest/examples/grids/update-row.md new file mode 100644 index 0000000000..bacfb5389a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/grids/update-row.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md new file mode 100644 index 0000000000..7368fc436d --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md @@ -0,0 +1,12 @@ +PUT /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-web/examples/grids/create-row.md b/docs/examples/1.8.x/client-web/examples/grids/create-row.md new file mode 100644 index 0000000000..9dc6de2769 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/grids/create-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/delete-row.md b/docs/examples/1.8.x/client-web/examples/grids/delete-row.md new file mode 100644 index 0000000000..7d3fb7df7e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/grids/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/get-row.md b/docs/examples/1.8.x/client-web/examples/grids/get-row.md new file mode 100644 index 0000000000..778377b61b --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/grids/get-row.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/list-rows.md b/docs/examples/1.8.x/client-web/examples/grids/list-rows.md new file mode 100644 index 0000000000..07de125329 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/grids/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/update-row.md b/docs/examples/1.8.x/client-web/examples/grids/update-row.md new file mode 100644 index 0000000000..f37659e3ca --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/grids/update-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-web/examples/grids/upsert-row.md new file mode 100644 index 0000000000..8850c27ebd --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/grids/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..3a26ed2935 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-boolean-column.md @@ -0,0 +1,7 @@ +appwrite grids createBooleanColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-database.md b/docs/examples/1.8.x/console-cli/examples/grids/create-database.md new file mode 100644 index 0000000000..741d5f83ee --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-database.md @@ -0,0 +1,4 @@ +appwrite grids createDatabase \ + --databaseId <DATABASE_ID> \ + --name <NAME> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..1efced687d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-datetime-column.md @@ -0,0 +1,7 @@ +appwrite grids createDatetimeColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-email-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-email-column.md new file mode 100644 index 0000000000..f0758d2753 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-email-column.md @@ -0,0 +1,7 @@ +appwrite grids createEmailColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-enum-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..e6ca5fdbd6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-enum-column.md @@ -0,0 +1,8 @@ +appwrite grids createEnumColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-float-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-float-column.md new file mode 100644 index 0000000000..a17535614d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-float-column.md @@ -0,0 +1,9 @@ +appwrite grids createFloatColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-index.md b/docs/examples/1.8.x/console-cli/examples/grids/create-index.md new file mode 100644 index 0000000000..9b92ecc614 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-index.md @@ -0,0 +1,8 @@ +appwrite grids createIndex \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --type key \ + --columns one two three \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-integer-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..0e7d408fea --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-integer-column.md @@ -0,0 +1,9 @@ +appwrite grids createIntegerColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-ip-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..bc16e6b9a7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-ip-column.md @@ -0,0 +1,7 @@ +appwrite grids createIpColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..d60fd4516a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-relationship-column.md @@ -0,0 +1,9 @@ +appwrite grids createRelationshipColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --relatedTableId <RELATED_TABLE_ID> \ + --type oneToOne \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-row.md b/docs/examples/1.8.x/console-cli/examples/grids/create-row.md new file mode 100644 index 0000000000..f59ac8253c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-row.md @@ -0,0 +1,6 @@ +appwrite grids createRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/create-rows.md new file mode 100644 index 0000000000..8d89674dc6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-rows.md @@ -0,0 +1,4 @@ +appwrite grids createRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rows one two three diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-string-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-string-column.md new file mode 100644 index 0000000000..658bedec06 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-string-column.md @@ -0,0 +1,9 @@ +appwrite grids createStringColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --size 1 \ + --required false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-table.md b/docs/examples/1.8.x/console-cli/examples/grids/create-table.md new file mode 100644 index 0000000000..9e707fde1c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-table.md @@ -0,0 +1,7 @@ +appwrite grids createTable \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --name <NAME> \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-url-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-url-column.md new file mode 100644 index 0000000000..88adbdbb5d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-url-column.md @@ -0,0 +1,7 @@ +appwrite grids createUrlColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/console-cli/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..f3c1a50c2d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/decrement-row-column.md @@ -0,0 +1,7 @@ +appwrite grids decrementRowColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + --column '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-column.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-column.md new file mode 100644 index 0000000000..0b60af67cc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/delete-column.md @@ -0,0 +1,4 @@ +appwrite grids deleteColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-database.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-database.md new file mode 100644 index 0000000000..c5e0ad3c63 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/delete-database.md @@ -0,0 +1,2 @@ +appwrite grids deleteDatabase \ + --databaseId <DATABASE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-index.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-index.md new file mode 100644 index 0000000000..0a1f6dc404 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/delete-index.md @@ -0,0 +1,4 @@ +appwrite grids deleteIndex \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-row.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-row.md new file mode 100644 index 0000000000..b360f6919a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/delete-row.md @@ -0,0 +1,4 @@ +appwrite grids deleteRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-rows.md new file mode 100644 index 0000000000..46b768f28d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/delete-rows.md @@ -0,0 +1,4 @@ +appwrite grids deleteRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-table.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-table.md new file mode 100644 index 0000000000..416a07052d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/delete-table.md @@ -0,0 +1,3 @@ +appwrite grids deleteTable \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-column.md b/docs/examples/1.8.x/console-cli/examples/grids/get-column.md new file mode 100644 index 0000000000..f875d56d33 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-column.md @@ -0,0 +1,4 @@ +appwrite grids getColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-database-usage.md b/docs/examples/1.8.x/console-cli/examples/grids/get-database-usage.md new file mode 100644 index 0000000000..0c35ea978d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-database-usage.md @@ -0,0 +1,3 @@ +appwrite grids getDatabaseUsage \ + --databaseId <DATABASE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-database.md b/docs/examples/1.8.x/console-cli/examples/grids/get-database.md new file mode 100644 index 0000000000..f2232bb5c0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-database.md @@ -0,0 +1,2 @@ +appwrite grids getDatabase \ + --databaseId <DATABASE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-index.md b/docs/examples/1.8.x/console-cli/examples/grids/get-index.md new file mode 100644 index 0000000000..6f88f74c23 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-index.md @@ -0,0 +1,4 @@ +appwrite grids getIndex \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-row.md b/docs/examples/1.8.x/console-cli/examples/grids/get-row.md new file mode 100644 index 0000000000..73cc207eec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-row.md @@ -0,0 +1,5 @@ +appwrite grids getRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-table-usage.md b/docs/examples/1.8.x/console-cli/examples/grids/get-table-usage.md new file mode 100644 index 0000000000..e4002ec61e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-table-usage.md @@ -0,0 +1,4 @@ +appwrite grids getTableUsage \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-table.md b/docs/examples/1.8.x/console-cli/examples/grids/get-table.md new file mode 100644 index 0000000000..e44c98ad83 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-table.md @@ -0,0 +1,3 @@ +appwrite grids getTable \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/increment-row-column.md b/docs/examples/1.8.x/console-cli/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..b4b84b6392 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/increment-row-column.md @@ -0,0 +1,7 @@ +appwrite grids incrementRowColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + --column '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-columns.md b/docs/examples/1.8.x/console-cli/examples/grids/list-columns.md new file mode 100644 index 0000000000..968643bb6c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-columns.md @@ -0,0 +1,4 @@ +appwrite grids listColumns \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-database-logs.md b/docs/examples/1.8.x/console-cli/examples/grids/list-database-logs.md new file mode 100644 index 0000000000..c135a2b358 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-database-logs.md @@ -0,0 +1,3 @@ +appwrite grids listDatabaseLogs \ + --databaseId <DATABASE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-database-usage.md b/docs/examples/1.8.x/console-cli/examples/grids/list-database-usage.md new file mode 100644 index 0000000000..f13c4e4e0a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-database-usage.md @@ -0,0 +1,2 @@ +appwrite grids listDatabaseUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-databases.md b/docs/examples/1.8.x/console-cli/examples/grids/list-databases.md new file mode 100644 index 0000000000..11d448043a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-databases.md @@ -0,0 +1,3 @@ +appwrite grids listDatabases \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-indexes.md b/docs/examples/1.8.x/console-cli/examples/grids/list-indexes.md new file mode 100644 index 0000000000..85df307deb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-indexes.md @@ -0,0 +1,4 @@ +appwrite grids listIndexes \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-row-logs.md b/docs/examples/1.8.x/console-cli/examples/grids/list-row-logs.md new file mode 100644 index 0000000000..3a073e4708 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-row-logs.md @@ -0,0 +1,5 @@ +appwrite grids listRowLogs \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/list-rows.md new file mode 100644 index 0000000000..99bf470bfb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-rows.md @@ -0,0 +1,4 @@ +appwrite grids listRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-table-logs.md b/docs/examples/1.8.x/console-cli/examples/grids/list-table-logs.md new file mode 100644 index 0000000000..e38af040a6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-table-logs.md @@ -0,0 +1,4 @@ +appwrite grids listTableLogs \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-tables.md b/docs/examples/1.8.x/console-cli/examples/grids/list-tables.md new file mode 100644 index 0000000000..69f464ba86 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-tables.md @@ -0,0 +1,4 @@ +appwrite grids listTables \ + --databaseId <DATABASE_ID> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..a980b12aa0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-boolean-column.md @@ -0,0 +1,7 @@ +appwrite grids updateBooleanColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default false \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-database.md b/docs/examples/1.8.x/console-cli/examples/grids/update-database.md new file mode 100644 index 0000000000..079e88dfd0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-database.md @@ -0,0 +1,4 @@ +appwrite grids updateDatabase \ + --databaseId <DATABASE_ID> \ + --name <NAME> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..97ee021e80 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-datetime-column.md @@ -0,0 +1,7 @@ +appwrite grids updateDatetimeColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-email-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-email-column.md new file mode 100644 index 0000000000..d8b0827d62 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-email-column.md @@ -0,0 +1,7 @@ +appwrite grids updateEmailColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default email@example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-enum-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..82eb62f996 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-enum-column.md @@ -0,0 +1,8 @@ +appwrite grids updateEnumColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --elements one two three \ + --required false \ + --default <DEFAULT> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-float-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-float-column.md new file mode 100644 index 0000000000..ef3a4ad36f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-float-column.md @@ -0,0 +1,9 @@ +appwrite grids updateFloatColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-integer-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..5b83ca938b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-integer-column.md @@ -0,0 +1,9 @@ +appwrite grids updateIntegerColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-ip-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..b0e6b8cf3a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-ip-column.md @@ -0,0 +1,7 @@ +appwrite grids updateIpColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..00ddda788c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-relationship-column.md @@ -0,0 +1,6 @@ +appwrite grids updateRelationshipColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-row.md b/docs/examples/1.8.x/console-cli/examples/grids/update-row.md new file mode 100644 index 0000000000..b89566b570 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-row.md @@ -0,0 +1,6 @@ +appwrite grids updateRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/update-rows.md new file mode 100644 index 0000000000..72c63ddb41 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-rows.md @@ -0,0 +1,5 @@ +appwrite grids updateRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-string-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-string-column.md new file mode 100644 index 0000000000..a6b6280560 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-string-column.md @@ -0,0 +1,8 @@ +appwrite grids updateStringColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default <DEFAULT> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-table.md b/docs/examples/1.8.x/console-cli/examples/grids/update-table.md new file mode 100644 index 0000000000..66e26b1752 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-table.md @@ -0,0 +1,7 @@ +appwrite grids updateTable \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --name <NAME> \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-url-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-url-column.md new file mode 100644 index 0000000000..ad41af9fa1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-url-column.md @@ -0,0 +1,7 @@ +appwrite grids updateUrlColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default https://example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/upsert-row.md b/docs/examples/1.8.x/console-cli/examples/grids/upsert-row.md new file mode 100644 index 0000000000..8a356e7a1e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/upsert-row.md @@ -0,0 +1,6 @@ +appwrite grids upsertRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/upsert-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..e4e31c1e83 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/upsert-rows.md @@ -0,0 +1,4 @@ +appwrite grids upsertRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rows one two three diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..5a61510aa7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-database.md b/docs/examples/1.8.x/console-web/examples/grids/create-database.md new file mode 100644 index 0000000000..b7eeb33253 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-database.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createDatabase( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..7580178d62 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-email-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-email-column.md new file mode 100644 index 0000000000..9e44cbbd66 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-email-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-enum-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..c596b1408a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-enum-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-float-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-float-column.md new file mode 100644 index 0000000000..d1b4c21898 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-float-column.md @@ -0,0 +1,20 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-index.md b/docs/examples/1.8.x/console-web/examples/grids/create-index.md new file mode 100644 index 0000000000..2c22cafde8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-index.md @@ -0,0 +1,19 @@ +import { Client, Grids, IndexType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + IndexType.Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-integer-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..709694e358 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-integer-column.md @@ -0,0 +1,20 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-ip-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..1691d3fc81 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-ip-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..5536e26488 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-relationship-column.md @@ -0,0 +1,20 @@ +import { Client, Grids, RelationshipType, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-row.md b/docs/examples/1.8.x/console-web/examples/grids/create-row.md new file mode 100644 index 0000000000..f5259cff2d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-rows.md b/docs/examples/1.8.x/console-web/examples/grids/create-rows.md new file mode 100644 index 0000000000..ff84c045cb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-string-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-string-column.md new file mode 100644 index 0000000000..4032caede0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-string-column.md @@ -0,0 +1,20 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-table.md b/docs/examples/1.8.x/console-web/examples/grids/create-table.md new file mode 100644 index 0000000000..74227efe98 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-table.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-url-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-url-column.md new file mode 100644 index 0000000000..4991da6cd6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-url-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/console-web/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..6e0abb0ac8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/decrement-row-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-column.md b/docs/examples/1.8.x/console-web/examples/grids/delete-column.md new file mode 100644 index 0000000000..8e46121f01 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/delete-column.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-database.md b/docs/examples/1.8.x/console-web/examples/grids/delete-database.md new file mode 100644 index 0000000000..b34b4adfdb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/delete-database.md @@ -0,0 +1,13 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteDatabase( + '<DATABASE_ID>' // databaseId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-index.md b/docs/examples/1.8.x/console-web/examples/grids/delete-index.md new file mode 100644 index 0000000000..9e405de80f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/delete-index.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-row.md b/docs/examples/1.8.x/console-web/examples/grids/delete-row.md new file mode 100644 index 0000000000..cc49130d4f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-rows.md b/docs/examples/1.8.x/console-web/examples/grids/delete-rows.md new file mode 100644 index 0000000000..fdaa4278fa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/delete-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-table.md b/docs/examples/1.8.x/console-web/examples/grids/delete-table.md new file mode 100644 index 0000000000..1817122ec3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/delete-table.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-column.md b/docs/examples/1.8.x/console-web/examples/grids/get-column.md new file mode 100644 index 0000000000..116cee2f24 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-column.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-database-usage.md b/docs/examples/1.8.x/console-web/examples/grids/get-database-usage.md new file mode 100644 index 0000000000..f961dc4fdf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-database-usage.md @@ -0,0 +1,14 @@ +import { Client, Grids, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getDatabaseUsage( + '<DATABASE_ID>', // databaseId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-database.md b/docs/examples/1.8.x/console-web/examples/grids/get-database.md new file mode 100644 index 0000000000..d41e9c2d45 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-database.md @@ -0,0 +1,13 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getDatabase( + '<DATABASE_ID>' // databaseId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-index.md b/docs/examples/1.8.x/console-web/examples/grids/get-index.md new file mode 100644 index 0000000000..34880a8c0e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-index.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-row.md b/docs/examples/1.8.x/console-web/examples/grids/get-row.md new file mode 100644 index 0000000000..29b51f2225 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-row.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-table-usage.md b/docs/examples/1.8.x/console-web/examples/grids/get-table-usage.md new file mode 100644 index 0000000000..5684786fb7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-table-usage.md @@ -0,0 +1,15 @@ +import { Client, Grids, GridUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getTableUsage( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + GridUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-table.md b/docs/examples/1.8.x/console-web/examples/grids/get-table.md new file mode 100644 index 0000000000..b98d321f28 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-table.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/increment-row-column.md b/docs/examples/1.8.x/console-web/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..5177cd6c08 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/increment-row-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-columns.md b/docs/examples/1.8.x/console-web/examples/grids/list-columns.md new file mode 100644 index 0000000000..cd72e91daf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-columns.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-database-logs.md b/docs/examples/1.8.x/console-web/examples/grids/list-database-logs.md new file mode 100644 index 0000000000..cf20dc6b49 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-database-logs.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listDatabaseLogs( + '<DATABASE_ID>', // databaseId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-database-usage.md b/docs/examples/1.8.x/console-web/examples/grids/list-database-usage.md new file mode 100644 index 0000000000..09faf5f2f5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-database-usage.md @@ -0,0 +1,13 @@ +import { Client, Grids, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listDatabaseUsage( + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-databases.md b/docs/examples/1.8.x/console-web/examples/grids/list-databases.md new file mode 100644 index 0000000000..871d29ebe8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-databases.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listDatabases( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-indexes.md b/docs/examples/1.8.x/console-web/examples/grids/list-indexes.md new file mode 100644 index 0000000000..b8755d0b82 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-indexes.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-row-logs.md b/docs/examples/1.8.x/console-web/examples/grids/list-row-logs.md new file mode 100644 index 0000000000..0fcde33520 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-row-logs.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listRowLogs( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-rows.md b/docs/examples/1.8.x/console-web/examples/grids/list-rows.md new file mode 100644 index 0000000000..4eb3b71407 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-table-logs.md b/docs/examples/1.8.x/console-web/examples/grids/list-table-logs.md new file mode 100644 index 0000000000..e7f756886d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-table-logs.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listTableLogs( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-tables.md b/docs/examples/1.8.x/console-web/examples/grids/list-tables.md new file mode 100644 index 0000000000..9288788dfe --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-tables.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listTables( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..84dd95cd41 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-database.md b/docs/examples/1.8.x/console-web/examples/grids/update-database.md new file mode 100644 index 0000000000..abd6b285fd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-database.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateDatabase( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..81fa471471 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-email-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-email-column.md new file mode 100644 index 0000000000..3a63b0d4d3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-email-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-enum-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..7c6d2e1b03 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-enum-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-float-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-float-column.md new file mode 100644 index 0000000000..6662f4b00f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-float-column.md @@ -0,0 +1,20 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-integer-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..95c0510a1a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-integer-column.md @@ -0,0 +1,20 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-ip-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..e92db67751 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-ip-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..bdfd71f71c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-relationship-column.md @@ -0,0 +1,17 @@ +import { Client, Grids, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-row.md b/docs/examples/1.8.x/console-web/examples/grids/update-row.md new file mode 100644 index 0000000000..a86f5fd58b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-rows.md b/docs/examples/1.8.x/console-web/examples/grids/update-rows.md new file mode 100644 index 0000000000..939615a5bd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-rows.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-string-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-string-column.md new file mode 100644 index 0000000000..b0b92f041e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-string-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-table.md b/docs/examples/1.8.x/console-web/examples/grids/update-table.md new file mode 100644 index 0000000000..8988133beb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-table.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-url-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-url-column.md new file mode 100644 index 0000000000..ecad0043a3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-url-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/upsert-row.md b/docs/examples/1.8.x/console-web/examples/grids/upsert-row.md new file mode 100644 index 0000000000..66764b001a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/upsert-rows.md b/docs/examples/1.8.x/console-web/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..b79a74d7e1 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/upsert-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..d462336207 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnBoolean result = await grids.createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: false, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-database.md b/docs/examples/1.8.x/server-dart/examples/grids/create-database.md new file mode 100644 index 0000000000..d77e3747c9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-database.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Database result = await grids.createDatabase( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..88365e0d0f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnDatetime result = await grids.createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md new file mode 100644 index 0000000000..69d6c03d8f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnEmail result = await grids.createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..a3a1e3ff60 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnEnum result = await grids.createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md new file mode 100644 index 0000000000..eba5e98ccc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnFloat result = await grids.createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-index.md b/docs/examples/1.8.x/server-dart/examples/grids/create-index.md new file mode 100644 index 0000000000..4926b9ec83 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-index.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnIndex result = await grids.createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType.key, + columns: [], + orders: [], // (optional) + lengths: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..d5bfdf3144 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnInteger result = await grids.createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..91b83fde8c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnIp result = await grids.createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..99f0427a85 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnRelationship result = await grids.createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType.oneToOne, + twoWay: false, // (optional) + key: '', // (optional) + twoWayKey: '', // (optional) + onDelete: RelationMutate.cascade, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-row.md b/docs/examples/1.8.x/server-dart/examples/grids/create-row.md new file mode 100644 index 0000000000..4db0893686 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-row.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Grids grids = Grids(client); + +Row result = await grids.createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/create-rows.md new file mode 100644 index 0000000000..111d061c3e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +RowList result = await grids.createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md new file mode 100644 index 0000000000..74b9cb7fa6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnString result = await grids.createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-table.md b/docs/examples/1.8.x/server-dart/examples/grids/create-table.md new file mode 100644 index 0000000000..1bb7afadd3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-table.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Table result = await grids.createTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md new file mode 100644 index 0000000000..cc129fce97 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnUrl result = await grids.createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..ad0744dbc6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Row result = await grids.decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: 0, // (optional) + min: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-column.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-column.md new file mode 100644 index 0000000000..e326064f4f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/delete-column.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +await grids.deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-database.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-database.md new file mode 100644 index 0000000000..0738454382 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/delete-database.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +await grids.deleteDatabase( + databaseId: '<DATABASE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-index.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-index.md new file mode 100644 index 0000000000..14dbccb979 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/delete-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +await grids.deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-row.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-row.md new file mode 100644 index 0000000000..8a37455490 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/delete-row.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Grids grids = Grids(client); + +await grids.deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md new file mode 100644 index 0000000000..dd2214fc68 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +await grids.deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-table.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-table.md new file mode 100644 index 0000000000..af29d31b87 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/delete-table.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +await grids.deleteTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-column.md b/docs/examples/1.8.x/server-dart/examples/grids/get-column.md new file mode 100644 index 0000000000..4040124454 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/get-column.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + + result = await grids.getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-database.md b/docs/examples/1.8.x/server-dart/examples/grids/get-database.md new file mode 100644 index 0000000000..e8a674b1ab --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/get-database.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Database result = await grids.getDatabase( + databaseId: '<DATABASE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-index.md b/docs/examples/1.8.x/server-dart/examples/grids/get-index.md new file mode 100644 index 0000000000..6e66a55b37 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/get-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnIndex result = await grids.getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-row.md b/docs/examples/1.8.x/server-dart/examples/grids/get-row.md new file mode 100644 index 0000000000..da2a609d32 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/get-row.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Grids grids = Grids(client); + +Row result = await grids.getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-table.md b/docs/examples/1.8.x/server-dart/examples/grids/get-table.md new file mode 100644 index 0000000000..d38fca0455 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/get-table.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Table result = await grids.getTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..14c041404c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Row result = await grids.incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: 0, // (optional) + max: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-columns.md b/docs/examples/1.8.x/server-dart/examples/grids/list-columns.md new file mode 100644 index 0000000000..222b5ba172 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/list-columns.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnList result = await grids.listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-databases.md b/docs/examples/1.8.x/server-dart/examples/grids/list-databases.md new file mode 100644 index 0000000000..14e2c78b63 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/list-databases.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +DatabaseList result = await grids.listDatabases( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md new file mode 100644 index 0000000000..218c3e0ccc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnIndexList result = await grids.listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/list-rows.md new file mode 100644 index 0000000000..49f2a7ef21 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/list-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Grids grids = Grids(client); + +RowList result = await grids.listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-tables.md b/docs/examples/1.8.x/server-dart/examples/grids/list-tables.md new file mode 100644 index 0000000000..4f1e08b713 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/list-tables.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +TableList result = await grids.listTables( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..e9e5a1fe32 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnBoolean result = await grids.updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: false, + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-database.md b/docs/examples/1.8.x/server-dart/examples/grids/update-database.md new file mode 100644 index 0000000000..d65a80185f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-database.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Database result = await grids.updateDatabase( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..6eb1bb6cbf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnDatetime result = await grids.updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md new file mode 100644 index 0000000000..0fabb3e6a3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnEmail result = await grids.updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..5aa1613b75 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnEnum result = await grids.updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md new file mode 100644 index 0000000000..0326f3c6f8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnFloat result = await grids.updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..3572a064b3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnInteger result = await grids.updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..a75ff07569 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnIp result = await grids.updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..4ecb479124 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnRelationship result = await grids.updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate.cascade, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-row.md b/docs/examples/1.8.x/server-dart/examples/grids/update-row.md new file mode 100644 index 0000000000..f11cf400cb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-row.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Grids grids = Grids(client); + +Row result = await grids.updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/update-rows.md new file mode 100644 index 0000000000..6dd4db1d3c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-rows.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +RowList result = await grids.updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: {}, // (optional) + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md new file mode 100644 index 0000000000..2bc58912cb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnString result = await grids.updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '<DEFAULT>', + size: 1, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-table.md b/docs/examples/1.8.x/server-dart/examples/grids/update-table.md new file mode 100644 index 0000000000..c5c497eddf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-table.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Table result = await grids.updateTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md new file mode 100644 index 0000000000..79359f5436 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnUrl result = await grids.updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md new file mode 100644 index 0000000000..e8a697664e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Grids grids = Grids(client); + +Row result = await grids.upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..b12d6960f0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +RowList result = await grids.upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..7097a84ebe --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-database.md b/docs/examples/1.8.x/server-deno/examples/grids/create-database.md new file mode 100644 index 0000000000..3b1a67d75a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-database.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createDatabase( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..f33479cd2e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-email-column.md new file mode 100644 index 0000000000..eec09fb453 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-email-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..df68204c8b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-enum-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-float-column.md new file mode 100644 index 0000000000..e7fdc524dc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-float-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-index.md b/docs/examples/1.8.x/server-deno/examples/grids/create-index.md new file mode 100644 index 0000000000..d1442d57be --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-index.md @@ -0,0 +1,18 @@ +import { Client, Grids, IndexType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + IndexType.Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..0dc377dff2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-integer-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..222e262042 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-ip-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..5cfc17ebbd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-relationship-column.md @@ -0,0 +1,19 @@ +import { Client, Grids, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-row.md b/docs/examples/1.8.x/server-deno/examples/grids/create-row.md new file mode 100644 index 0000000000..0bf0ec7f09 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-row.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new Grids(client); + +const response = await grids.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/create-rows.md new file mode 100644 index 0000000000..e5d81e6f68 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-rows.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-string-column.md new file mode 100644 index 0000000000..fb73a25faa --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-string-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-table.md b/docs/examples/1.8.x/server-deno/examples/grids/create-table.md new file mode 100644 index 0000000000..832b9c5218 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-table.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-url-column.md new file mode 100644 index 0000000000..905d86c6cf --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-url-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-deno/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..cd86f6f8f3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/decrement-row-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-column.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-column.md new file mode 100644 index 0000000000..d299323df6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/delete-column.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-database.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-database.md new file mode 100644 index 0000000000..aad02459e4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/delete-database.md @@ -0,0 +1,12 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.deleteDatabase( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-index.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-index.md new file mode 100644 index 0000000000..2354fc2485 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/delete-index.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-row.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-row.md new file mode 100644 index 0000000000..b62fd2145f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/delete-row.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new Grids(client); + +const response = await grids.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-rows.md new file mode 100644 index 0000000000..a1c75d7fd2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/delete-rows.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-table.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-table.md new file mode 100644 index 0000000000..b7b09bc1ed --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/delete-table.md @@ -0,0 +1,13 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.deleteTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-column.md b/docs/examples/1.8.x/server-deno/examples/grids/get-column.md new file mode 100644 index 0000000000..cd78228565 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/get-column.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-database.md b/docs/examples/1.8.x/server-deno/examples/grids/get-database.md new file mode 100644 index 0000000000..c1fecfeff7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/get-database.md @@ -0,0 +1,12 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.getDatabase( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-index.md b/docs/examples/1.8.x/server-deno/examples/grids/get-index.md new file mode 100644 index 0000000000..8f3a48aec2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/get-index.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-row.md b/docs/examples/1.8.x/server-deno/examples/grids/get-row.md new file mode 100644 index 0000000000..257b24b67e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/get-row.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new Grids(client); + +const response = await grids.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-table.md b/docs/examples/1.8.x/server-deno/examples/grids/get-table.md new file mode 100644 index 0000000000..5b9c36ab44 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/get-table.md @@ -0,0 +1,13 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.getTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-deno/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..d01174e938 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/increment-row-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-columns.md b/docs/examples/1.8.x/server-deno/examples/grids/list-columns.md new file mode 100644 index 0000000000..3e249e2782 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/list-columns.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-databases.md b/docs/examples/1.8.x/server-deno/examples/grids/list-databases.md new file mode 100644 index 0000000000..40ce554e50 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/list-databases.md @@ -0,0 +1,13 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.listDatabases( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/grids/list-indexes.md new file mode 100644 index 0000000000..e605c67cc6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/list-indexes.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/list-rows.md new file mode 100644 index 0000000000..2416578d70 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/list-rows.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new Grids(client); + +const response = await grids.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-tables.md b/docs/examples/1.8.x/server-deno/examples/grids/list-tables.md new file mode 100644 index 0000000000..f68d5465b5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/list-tables.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.listTables( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..22c0fe97f8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-database.md b/docs/examples/1.8.x/server-deno/examples/grids/update-database.md new file mode 100644 index 0000000000..0fc883028e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-database.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateDatabase( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..00cee55b33 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-email-column.md new file mode 100644 index 0000000000..eb263b428f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-email-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..974dcc99cb --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-enum-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-float-column.md new file mode 100644 index 0000000000..c1375b015f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-float-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..c46dbb1994 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-integer-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..2013e16429 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-ip-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..5151a5c5bc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-relationship-column.md @@ -0,0 +1,16 @@ +import { Client, Grids, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-row.md b/docs/examples/1.8.x/server-deno/examples/grids/update-row.md new file mode 100644 index 0000000000..5e37a9cb90 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-row.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new Grids(client); + +const response = await grids.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/update-rows.md new file mode 100644 index 0000000000..35dc58d22d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-string-column.md new file mode 100644 index 0000000000..ff0113baeb --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-string-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-table.md b/docs/examples/1.8.x/server-deno/examples/grids/update-table.md new file mode 100644 index 0000000000..ce01cd0fc7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-table.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-url-column.md new file mode 100644 index 0000000000..285f88fbfd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-url-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-deno/examples/grids/upsert-row.md new file mode 100644 index 0000000000..33534265d5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/upsert-row.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new Grids(client); + +const response = await grids.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..8cd7218f17 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/upsert-rows.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..e173d1189b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnBoolean result = await grids.CreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md new file mode 100644 index 0000000000..7006f00d01 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Database result = await grids.CreateDatabase( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..b4e730fc6d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnDatetime result = await grids.CreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md new file mode 100644 index 0000000000..bb2cad7dbd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnEmail result = await grids.CreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..4ce99366ad --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnEnum result = await grids.CreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md new file mode 100644 index 0000000000..3ecd76c367 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnFloat result = await grids.CreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md new file mode 100644 index 0000000000..854ed47e81 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnIndex result = await grids.CreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: IndexType.Key, + columns: new List<string>(), + orders: new List<string>(), // optional + lengths: new List<long>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..ef13d5569c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnInteger result = await grids.CreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..bfaa594d49 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnIp result = await grids.CreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..614f5d4fec --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md @@ -0,0 +1,22 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnRelationship result = await grids.CreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: RelationMutate.Cascade // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md new file mode 100644 index 0000000000..235c9b5c4e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +Row result = await grids.CreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md new file mode 100644 index 0000000000..42ee3ef6a2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +RowList result = await grids.CreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: new List<object>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md new file mode 100644 index 0000000000..ca00dcf32e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnString result = await grids.CreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md new file mode 100644 index 0000000000..50fdfa878e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Table result = await grids.CreateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md new file mode 100644 index 0000000000..8a4f69bd26 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnUrl result = await grids.CreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..b17e902e45 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Row result = await grids.DecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + min: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md new file mode 100644 index 0000000000..24f23546ba --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +await grids.DeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md new file mode 100644 index 0000000000..38f28a001a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +await grids.DeleteDatabase( + databaseId: "<DATABASE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md new file mode 100644 index 0000000000..5a037e2a96 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +await grids.DeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md new file mode 100644 index 0000000000..13972747a8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +await grids.DeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md new file mode 100644 index 0000000000..4ddd11b6d1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +await grids.DeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md new file mode 100644 index 0000000000..9741ac2c2e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +await grids.DeleteTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md new file mode 100644 index 0000000000..2c6d7a3944 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + + result = await grids.GetColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md new file mode 100644 index 0000000000..5aebe5104d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Database result = await grids.GetDatabase( + databaseId: "<DATABASE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md new file mode 100644 index 0000000000..ff99a21ed0 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnIndex result = await grids.GetIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md new file mode 100644 index 0000000000..c75e0e50d5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +Row result = await grids.GetRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md new file mode 100644 index 0000000000..7fcecc6170 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Table result = await grids.GetTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..3e6d044905 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Row result = await grids.IncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + max: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md new file mode 100644 index 0000000000..e8478c1d23 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnList result = await grids.ListColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md new file mode 100644 index 0000000000..f37deb8ef2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +DatabaseList result = await grids.ListDatabases( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md new file mode 100644 index 0000000000..b6f3737b43 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnIndexList result = await grids.ListIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md new file mode 100644 index 0000000000..a1a64fe256 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +RowList result = await grids.ListRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md new file mode 100644 index 0000000000..85f431b7ef --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +TableList result = await grids.ListTables( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..ff2376e403 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnBoolean result = await grids.UpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md new file mode 100644 index 0000000000..cd3b0a236d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Database result = await grids.UpdateDatabase( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..7b630922e8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnDatetime result = await grids.UpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md new file mode 100644 index 0000000000..9ce04025ca --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnEmail result = await grids.UpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..b29b3615de --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnEnum result = await grids.UpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md new file mode 100644 index 0000000000..96db20a2c5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnFloat result = await grids.UpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..87e6b0fee2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnInteger result = await grids.UpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..789c6c98e6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnIp result = await grids.UpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..a1d30a43a2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnRelationship result = await grids.UpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: RelationMutate.Cascade, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md new file mode 100644 index 0000000000..2dc2b23d32 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +Row result = await grids.UpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md new file mode 100644 index 0000000000..c0103c9639 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +RowList result = await grids.UpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [object], // optional + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md new file mode 100644 index 0000000000..2277142eb8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnString result = await grids.UpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md new file mode 100644 index 0000000000..76362573a5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Table result = await grids.UpdateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md new file mode 100644 index 0000000000..8054b60e3f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnUrl result = await grids.UpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md new file mode 100644 index 0000000000..7f517a2f09 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +Row result = await grids.UpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..1cb3b54d0b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +RowList result = await grids.UpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: new List<object>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..11d8b0ca50 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-boolean-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateBooleanColumnDefault(false), + grids.WithCreateBooleanColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-database.md b/docs/examples/1.8.x/server-go/examples/grids/create-database.md new file mode 100644 index 0000000000..d66dea2c03 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-database.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateDatabase( + "<DATABASE_ID>", + "<NAME>", + grids.WithCreateDatabaseEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..e386f763ff --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-datetime-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateDatetimeColumnDefault(""), + grids.WithCreateDatetimeColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-email-column.md new file mode 100644 index 0000000000..9ecdf5cadf --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-email-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateEmailColumnDefault("email@example.com"), + grids.WithCreateEmailColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..35a2ed3f0f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-enum-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + grids.WithCreateEnumColumnDefault("<DEFAULT>"), + grids.WithCreateEnumColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-float-column.md new file mode 100644 index 0000000000..765eb58f24 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-float-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateFloatColumnMin(0), + grids.WithCreateFloatColumnMax(0), + grids.WithCreateFloatColumnDefault(0), + grids.WithCreateFloatColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-index.md b/docs/examples/1.8.x/server-go/examples/grids/create-index.md new file mode 100644 index 0000000000..ad39cc5c83 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-index.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + "key", + []interface{}{}, + grids.WithCreateIndexOrders([]interface{}{}), + grids.WithCreateIndexLengths([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..3b67883650 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-integer-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateIntegerColumnMin(0), + grids.WithCreateIntegerColumnMax(0), + grids.WithCreateIntegerColumnDefault(0), + grids.WithCreateIntegerColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..8954c91144 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-ip-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateIpColumnDefault(""), + grids.WithCreateIpColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..2ce5bd2acd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-relationship-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<RELATED_TABLE_ID>", + "oneToOne", + grids.WithCreateRelationshipColumnTwoWay(false), + grids.WithCreateRelationshipColumnKey(""), + grids.WithCreateRelationshipColumnTwoWayKey(""), + grids.WithCreateRelationshipColumnOnDelete("cascade"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-row.md b/docs/examples/1.8.x/server-go/examples/grids/create-row.md new file mode 100644 index 0000000000..b2e8aac2a2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-row.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := grids.New(client) + response, error := service.CreateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + map[string]interface{}{}, + grids.WithCreateRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-rows.md b/docs/examples/1.8.x/server-go/examples/grids/create-rows.md new file mode 100644 index 0000000000..95442b0231 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-string-column.md new file mode 100644 index 0000000000..0033ea1af6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-string-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + 1, + false, + grids.WithCreateStringColumnDefault("<DEFAULT>"), + grids.WithCreateStringColumnArray(false), + grids.WithCreateStringColumnEncrypt(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-table.md b/docs/examples/1.8.x/server-go/examples/grids/create-table.md new file mode 100644 index 0000000000..adc367db5c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-table.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateTable( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + grids.WithCreateTablePermissions(interface{}{"read("any")"}), + grids.WithCreateTableRowSecurity(false), + grids.WithCreateTableEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-url-column.md new file mode 100644 index 0000000000..3e93fe1838 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-url-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateUrlColumnDefault("https://example.com"), + grids.WithCreateUrlColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-go/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..cb36ada619 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/decrement-row-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.DecrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + grids.WithDecrementRowColumnValue(0), + grids.WithDecrementRowColumnMin(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-column.md b/docs/examples/1.8.x/server-go/examples/grids/delete-column.md new file mode 100644 index 0000000000..6b73e86c05 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/delete-column.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.DeleteColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-database.md b/docs/examples/1.8.x/server-go/examples/grids/delete-database.md new file mode 100644 index 0000000000..4d74f859fc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/delete-database.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.DeleteDatabase( + "<DATABASE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-index.md b/docs/examples/1.8.x/server-go/examples/grids/delete-index.md new file mode 100644 index 0000000000..c34a2752ac --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/delete-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.DeleteIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-row.md b/docs/examples/1.8.x/server-go/examples/grids/delete-row.md new file mode 100644 index 0000000000..cb072c49bd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/delete-row.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := grids.New(client) + response, error := service.DeleteRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-go/examples/grids/delete-rows.md new file mode 100644 index 0000000000..0ce880f996 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/delete-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.DeleteRows( + "<DATABASE_ID>", + "<TABLE_ID>", + grids.WithDeleteRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-table.md b/docs/examples/1.8.x/server-go/examples/grids/delete-table.md new file mode 100644 index 0000000000..66e031a5ce --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/delete-table.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.DeleteTable( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-column.md b/docs/examples/1.8.x/server-go/examples/grids/get-column.md new file mode 100644 index 0000000000..bff6153550 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/get-column.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.GetColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-database.md b/docs/examples/1.8.x/server-go/examples/grids/get-database.md new file mode 100644 index 0000000000..4f80bf5590 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/get-database.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.GetDatabase( + "<DATABASE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-index.md b/docs/examples/1.8.x/server-go/examples/grids/get-index.md new file mode 100644 index 0000000000..5982b49b2e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/get-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.GetIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-row.md b/docs/examples/1.8.x/server-go/examples/grids/get-row.md new file mode 100644 index 0000000000..1551d4969b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/get-row.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := grids.New(client) + response, error := service.GetRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + grids.WithGetRowQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-table.md b/docs/examples/1.8.x/server-go/examples/grids/get-table.md new file mode 100644 index 0000000000..1f96e8526d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/get-table.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.GetTable( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-go/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..52f5858884 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/increment-row-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.IncrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + grids.WithIncrementRowColumnValue(0), + grids.WithIncrementRowColumnMax(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-columns.md b/docs/examples/1.8.x/server-go/examples/grids/list-columns.md new file mode 100644 index 0000000000..ae411a216c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/list-columns.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.ListColumns( + "<DATABASE_ID>", + "<TABLE_ID>", + grids.WithListColumnsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-databases.md b/docs/examples/1.8.x/server-go/examples/grids/list-databases.md new file mode 100644 index 0000000000..e43bd7d100 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/list-databases.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.ListDatabases( + grids.WithListDatabasesQueries([]interface{}{}), + grids.WithListDatabasesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-go/examples/grids/list-indexes.md new file mode 100644 index 0000000000..092c75301a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/list-indexes.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.ListIndexes( + "<DATABASE_ID>", + "<TABLE_ID>", + grids.WithListIndexesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-rows.md b/docs/examples/1.8.x/server-go/examples/grids/list-rows.md new file mode 100644 index 0000000000..b406f106bb --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/list-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := grids.New(client) + response, error := service.ListRows( + "<DATABASE_ID>", + "<TABLE_ID>", + grids.WithListRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-tables.md b/docs/examples/1.8.x/server-go/examples/grids/list-tables.md new file mode 100644 index 0000000000..f38879c65b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/list-tables.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.ListTables( + "<DATABASE_ID>", + grids.WithListTablesQueries([]interface{}{}), + grids.WithListTablesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..5ffc910caf --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-boolean-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + false, + grids.WithUpdateBooleanColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-database.md b/docs/examples/1.8.x/server-go/examples/grids/update-database.md new file mode 100644 index 0000000000..9f9c95546a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-database.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateDatabase( + "<DATABASE_ID>", + "<NAME>", + grids.WithUpdateDatabaseEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..5bf6440a74 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-datetime-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + grids.WithUpdateDatetimeColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-email-column.md new file mode 100644 index 0000000000..8ebbdcabc4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-email-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "email@example.com", + grids.WithUpdateEmailColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..edec1cbcc0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-enum-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + "<DEFAULT>", + grids.WithUpdateEnumColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-float-column.md new file mode 100644 index 0000000000..80057dab06 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-float-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + grids.WithUpdateFloatColumnMin(0), + grids.WithUpdateFloatColumnMax(0), + grids.WithUpdateFloatColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..a3b9bd316c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-integer-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + grids.WithUpdateIntegerColumnMin(0), + grids.WithUpdateIntegerColumnMax(0), + grids.WithUpdateIntegerColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..888c69e9ee --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-ip-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + grids.WithUpdateIpColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..db57f41995 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-relationship-column.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + grids.WithUpdateRelationshipColumnOnDelete("cascade"), + grids.WithUpdateRelationshipColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-row.md b/docs/examples/1.8.x/server-go/examples/grids/update-row.md new file mode 100644 index 0000000000..e1a99f289f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-row.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := grids.New(client) + response, error := service.UpdateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + grids.WithUpdateRowData(map[string]interface{}{}), + grids.WithUpdateRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-rows.md b/docs/examples/1.8.x/server-go/examples/grids/update-rows.md new file mode 100644 index 0000000000..f2b0c0c6de --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-rows.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + grids.WithUpdateRowsData(map[string]interface{}{}), + grids.WithUpdateRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-string-column.md new file mode 100644 index 0000000000..a50fcb704c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-string-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "<DEFAULT>", + grids.WithUpdateStringColumnSize(1), + grids.WithUpdateStringColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-table.md b/docs/examples/1.8.x/server-go/examples/grids/update-table.md new file mode 100644 index 0000000000..cf1bef575f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-table.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateTable( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + grids.WithUpdateTablePermissions(interface{}{"read("any")"}), + grids.WithUpdateTableRowSecurity(false), + grids.WithUpdateTableEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-url-column.md new file mode 100644 index 0000000000..0c28025e5c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-url-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "https://example.com", + grids.WithUpdateUrlColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-go/examples/grids/upsert-row.md new file mode 100644 index 0000000000..bc104a159a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/upsert-row.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := grids.New(client) + response, error := service.UpsertRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + grids.WithUpsertRowData(map[string]interface{}{}), + grids.WithUpsertRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-go/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..6282f9da2e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/upsert-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpsertRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..bd7abcb175 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md @@ -0,0 +1,20 @@ +mutation { + gridsCreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-database.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-database.md new file mode 100644 index 0000000000..41d37ebdee --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-database.md @@ -0,0 +1,13 @@ +mutation { + gridsCreateDatabase( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..aa14c43156 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md @@ -0,0 +1,21 @@ +mutation { + gridsCreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md new file mode 100644 index 0000000000..c9bc913726 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md @@ -0,0 +1,21 @@ +mutation { + gridsCreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..8ace10f9ac --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md @@ -0,0 +1,23 @@ +mutation { + gridsCreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md new file mode 100644 index 0000000000..92031d03ca --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md @@ -0,0 +1,24 @@ +mutation { + gridsCreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-index.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-index.md new file mode 100644 index 0000000000..cc338ddad2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-index.md @@ -0,0 +1,22 @@ +mutation { + gridsCreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: "key", + columns: [], + orders: [], + lengths: [] + ) { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..735d47c8ac --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md @@ -0,0 +1,24 @@ +mutation { + gridsCreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..241d308f09 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md @@ -0,0 +1,21 @@ +mutation { + gridsCreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..2c08478e09 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md @@ -0,0 +1,27 @@ +mutation { + gridsCreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: "oneToOne", + twoWay: false, + key: "", + twoWayKey: "", + onDelete: "cascade" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-row.md new file mode 100644 index 0000000000..cffb7361f2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-row.md @@ -0,0 +1,18 @@ +mutation { + gridsCreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md new file mode 100644 index 0000000000..cd134ec201 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md @@ -0,0 +1,19 @@ +mutation { + gridsCreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md new file mode 100644 index 0000000000..57b42c6010 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md @@ -0,0 +1,24 @@ +mutation { + gridsCreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-table.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-table.md new file mode 100644 index 0000000000..77335ad867 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-table.md @@ -0,0 +1,32 @@ +mutation { + gridsCreateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], + rowSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md new file mode 100644 index 0000000000..07ca9ab869 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md @@ -0,0 +1,21 @@ +mutation { + gridsCreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..6b47884a92 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md @@ -0,0 +1,19 @@ +mutation { + gridsDecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, + min: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md new file mode 100644 index 0000000000..0ad25321b5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md @@ -0,0 +1,9 @@ +mutation { + gridsDeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md new file mode 100644 index 0000000000..a3e3d1a5bf --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md @@ -0,0 +1,7 @@ +mutation { + gridsDeleteDatabase( + databaseId: "<DATABASE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md new file mode 100644 index 0000000000..0921aa0aef --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md @@ -0,0 +1,9 @@ +mutation { + gridsDeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md new file mode 100644 index 0000000000..40dcbdc219 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md @@ -0,0 +1,9 @@ +mutation { + gridsDeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md new file mode 100644 index 0000000000..69559934a4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md @@ -0,0 +1,19 @@ +mutation { + gridsDeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md new file mode 100644 index 0000000000..a145be50d9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md @@ -0,0 +1,8 @@ +mutation { + gridsDeleteTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-column.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-database.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-database.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-index.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-index.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-row.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-table.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-table.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..709e6b2f0d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md @@ -0,0 +1,19 @@ +mutation { + gridsIncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, + max: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-columns.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-columns.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-databases.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-databases.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-indexes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-rows.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-tables.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-tables.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..67c8495471 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md @@ -0,0 +1,20 @@ +mutation { + gridsUpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-database.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-database.md new file mode 100644 index 0000000000..02c045b9cd --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-database.md @@ -0,0 +1,13 @@ +mutation { + gridsUpdateDatabase( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..5e19393c67 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md @@ -0,0 +1,21 @@ +mutation { + gridsUpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md new file mode 100644 index 0000000000..caa6153896 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md @@ -0,0 +1,21 @@ +mutation { + gridsUpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..c3d90f4e23 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md @@ -0,0 +1,23 @@ +mutation { + gridsUpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md new file mode 100644 index 0000000000..a6b700ce73 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md @@ -0,0 +1,24 @@ +mutation { + gridsUpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..fcc53102d1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md @@ -0,0 +1,24 @@ +mutation { + gridsUpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..f867063151 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md @@ -0,0 +1,21 @@ +mutation { + gridsUpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..e24311b53a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md @@ -0,0 +1,24 @@ +mutation { + gridsUpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: "cascade", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-row.md new file mode 100644 index 0000000000..2bb105e8c0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-row.md @@ -0,0 +1,18 @@ +mutation { + gridsUpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md new file mode 100644 index 0000000000..99df9b0b99 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md @@ -0,0 +1,20 @@ +mutation { + gridsUpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: "{}", + queries: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md new file mode 100644 index 0000000000..c98f49a807 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md @@ -0,0 +1,23 @@ +mutation { + gridsUpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-table.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-table.md new file mode 100644 index 0000000000..cea6d5cfff --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-table.md @@ -0,0 +1,32 @@ +mutation { + gridsUpdateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], + rowSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md new file mode 100644 index 0000000000..c64d93882d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md @@ -0,0 +1,21 @@ +mutation { + gridsUpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md new file mode 100644 index 0000000000..f8e0606109 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md @@ -0,0 +1,18 @@ +mutation { + gridsUpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..d456e9883d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md @@ -0,0 +1,19 @@ +mutation { + gridsUpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md new file mode 100644 index 0000000000..2981fc8cf4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-database.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-database.md new file mode 100644 index 0000000000..4c6155962e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-database.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createDatabase( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md new file mode 100644 index 0000000000..7389ea9a94 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md new file mode 100644 index 0000000000..be481047e1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md new file mode 100644 index 0000000000..33c6b63e27 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md new file mode 100644 index 0000000000..d66f1b5c60 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-index.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-index.md new file mode 100644 index 0000000000..670310bb66 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-index.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; +import io.appwrite.enums.IndexType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + IndexType.KEY, // type + listOf(), // columns + listOf(), // orders (optional) + listOf(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md new file mode 100644 index 0000000000..342654ef1a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md new file mode 100644 index 0000000000..d72e7dd59d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md new file mode 100644 index 0000000000..2d1c5fb22a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; +import io.appwrite.enums.RelationshipType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<RELATED_TABLE_ID>", // relatedTableId + RelationshipType.ONETOONE, // type + false, // twoWay (optional) + "", // key (optional) + "", // twoWayKey (optional) + RelationMutate.CASCADE, // onDelete (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-row.md new file mode 100644 index 0000000000..6b954814c0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +grids.createRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md new file mode 100644 index 0000000000..a55855d8f5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md new file mode 100644 index 0000000000..b819afb4b4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + 1, // size + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + false, // encrypt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-table.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-table.md new file mode 100644 index 0000000000..aa98b81de6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-table.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md new file mode 100644 index 0000000000..d8761440b3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md new file mode 100644 index 0000000000..407ea83f81 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.decrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // min (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md new file mode 100644 index 0000000000..cc3c40fba7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.deleteColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md new file mode 100644 index 0000000000..fca41e75ea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.deleteDatabase( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md new file mode 100644 index 0000000000..43449e908f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.deleteIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md new file mode 100644 index 0000000000..cb812bac12 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +grids.deleteRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md new file mode 100644 index 0000000000..2425af9e8c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.deleteRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md new file mode 100644 index 0000000000..dbbb4781ba --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.deleteTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-column.md new file mode 100644 index 0000000000..1d630f17d7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/get-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.getColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-database.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-database.md new file mode 100644 index 0000000000..bc7eea4dbb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/get-database.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.getDatabase( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-index.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-index.md new file mode 100644 index 0000000000..14163c34a9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/get-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.getIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-row.md new file mode 100644 index 0000000000..e9d89c92b8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/get-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +grids.getRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-table.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-table.md new file mode 100644 index 0000000000..39d090219b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/get-table.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.getTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md new file mode 100644 index 0000000000..aaccf0a1a3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.incrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // max (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md new file mode 100644 index 0000000000..f95ca925a6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.listColumns( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md new file mode 100644 index 0000000000..97f7263dd4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.listDatabases( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md new file mode 100644 index 0000000000..aa5b11a8c2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.listIndexes( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md new file mode 100644 index 0000000000..ccf3d74a25 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +grids.listRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md new file mode 100644 index 0000000000..0a60dbeebe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.listTables( + "<DATABASE_ID>", // databaseId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md new file mode 100644 index 0000000000..e3d6b71b70 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-database.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-database.md new file mode 100644 index 0000000000..da9bd7d04b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-database.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateDatabase( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md new file mode 100644 index 0000000000..ede33229ad --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md new file mode 100644 index 0000000000..48803eb4f4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md new file mode 100644 index 0000000000..63dc238d2e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md new file mode 100644 index 0000000000..9833f5ec8b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md new file mode 100644 index 0000000000..059b1328d5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md new file mode 100644 index 0000000000..8e31214981 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md new file mode 100644 index 0000000000..b90b21b164 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + RelationMutate.CASCADE, // onDelete (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-row.md new file mode 100644 index 0000000000..5f95afb5f5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +grids.updateRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md new file mode 100644 index 0000000000..67c9a1be89 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + mapOf( "a" to "b" ), // data (optional) + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md new file mode 100644 index 0000000000..13e266abc0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "<DEFAULT>", // default + 1, // size (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-table.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-table.md new file mode 100644 index 0000000000..24dfc05e49 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-table.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md new file mode 100644 index 0000000000..5217121225 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md new file mode 100644 index 0000000000..8f1b8670df --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +grids.upsertRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md new file mode 100644 index 0000000000..2081f0f19f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.upsertRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md new file mode 100644 index 0000000000..5966655e1e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md new file mode 100644 index 0000000000..bc9999ff18 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createDatabase( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md new file mode 100644 index 0000000000..f3b11b5018 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md new file mode 100644 index 0000000000..a70dd3ac45 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md new file mode 100644 index 0000000000..3858155479 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md new file mode 100644 index 0000000000..d7b4c0155d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md new file mode 100644 index 0000000000..df16a35cc2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids +import io.appwrite.enums.IndexType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + type = IndexType.KEY, + columns = listOf(), + orders = listOf(), // optional + lengths = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md new file mode 100644 index 0000000000..db8bde2d72 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md new file mode 100644 index 0000000000..f3ab36bd0c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md new file mode 100644 index 0000000000..9ba4cafbb7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids +import io.appwrite.enums.RelationshipType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + relatedTableId = "<RELATED_TABLE_ID>", + type = RelationshipType.ONETOONE, + twoWay = false, // optional + key = "", // optional + twoWayKey = "", // optional + onDelete = "cascade" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md new file mode 100644 index 0000000000..0c3d2531c5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val grids = Grids(client) + +val response = grids.createRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md new file mode 100644 index 0000000000..9c7da7c93b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf() +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md new file mode 100644 index 0000000000..f6793c817b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + size = 1, + required = false, + default = "<DEFAULT>", // optional + array = false, // optional + encrypt = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md new file mode 100644 index 0000000000..55de471725 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md new file mode 100644 index 0000000000..33311e29ca --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md new file mode 100644 index 0000000000..9a450f66f3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.decrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + min = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md new file mode 100644 index 0000000000..09636dae09 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.deleteColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md new file mode 100644 index 0000000000..f872453a99 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.deleteDatabase( + databaseId = "<DATABASE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md new file mode 100644 index 0000000000..d3037ca6b0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.deleteIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md new file mode 100644 index 0000000000..25b60e0e2d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val grids = Grids(client) + +val response = grids.deleteRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md new file mode 100644 index 0000000000..c3aa106eac --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.deleteRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md new file mode 100644 index 0000000000..f0208d4345 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.deleteTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md new file mode 100644 index 0000000000..92890a7dc3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.getColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md new file mode 100644 index 0000000000..fd91ab0ad3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.getDatabase( + databaseId = "<DATABASE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md new file mode 100644 index 0000000000..7c0b2dc8cb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.getIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md new file mode 100644 index 0000000000..b217814b27 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val grids = Grids(client) + +val response = grids.getRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md new file mode 100644 index 0000000000..d8a4cd243e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.getTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md new file mode 100644 index 0000000000..adbe5c287e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.incrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + max = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md new file mode 100644 index 0000000000..b033eb423d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.listColumns( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md new file mode 100644 index 0000000000..c713568269 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.listDatabases( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md new file mode 100644 index 0000000000..84bbcbd232 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.listIndexes( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md new file mode 100644 index 0000000000..ea54280ff3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val grids = Grids(client) + +val response = grids.listRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md new file mode 100644 index 0000000000..6bb5a588b2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.listTables( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md new file mode 100644 index 0000000000..b9360ec99e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md new file mode 100644 index 0000000000..ae8aacc343 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateDatabase( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md new file mode 100644 index 0000000000..50282217d7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md new file mode 100644 index 0000000000..a9c2996800 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md new file mode 100644 index 0000000000..c23eef358b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md new file mode 100644 index 0000000000..1054c34fbd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md new file mode 100644 index 0000000000..288c74b4fe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md new file mode 100644 index 0000000000..cbc358a3b6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md new file mode 100644 index 0000000000..99df537cfe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + onDelete = "cascade", // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md new file mode 100644 index 0000000000..ae18af353a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val grids = Grids(client) + +val response = grids.updateRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md new file mode 100644 index 0000000000..3682cd0724 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + data = mapOf( "a" to "b" ), // optional + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md new file mode 100644 index 0000000000..8f7a213260 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "<DEFAULT>", + size = 1, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md new file mode 100644 index 0000000000..99232d858f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md new file mode 100644 index 0000000000..65d299dba8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md new file mode 100644 index 0000000000..cbf0f38c8d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val grids = Grids(client) + +val response = grids.upsertRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md new file mode 100644 index 0000000000..c767b66803 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.upsertRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf() +) diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..dae3f30840 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-boolean-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-database.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-database.md new file mode 100644 index 0000000000..720c0d6f23 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-database.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createDatabase( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..d2b5c7e00f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-datetime-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-email-column.md new file mode 100644 index 0000000000..ce56e96d85 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-email-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..653b1ed75c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-enum-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-float-column.md new file mode 100644 index 0000000000..dc6aee4805 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-float-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-index.md new file mode 100644 index 0000000000..975fa3047e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-index.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + sdk.IndexType.Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..3444f82b58 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-integer-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..52a9e8fbeb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-ip-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..c0270dab85 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-relationship-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + sdk.RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + sdk.RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-row.md new file mode 100644 index 0000000000..a8495c4b94 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-row.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new sdk.Grids(client); + +const result = await grids.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md new file mode 100644 index 0000000000..c9400a4edf --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md new file mode 100644 index 0000000000..f72d042dfb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-table.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-table.md new file mode 100644 index 0000000000..d022de372f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-table.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-url-column.md new file mode 100644 index 0000000000..83c6d5a01b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-url-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..a166a1bfc0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/decrement-row-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md new file mode 100644 index 0000000000..7130f48cae --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md new file mode 100644 index 0000000000..4a31d091b7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.deleteDatabase( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md new file mode 100644 index 0000000000..b266062053 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md new file mode 100644 index 0000000000..cf202374a0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new sdk.Grids(client); + +const result = await grids.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md new file mode 100644 index 0000000000..aa36bacbda --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md new file mode 100644 index 0000000000..d3bb221e0d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.deleteTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md new file mode 100644 index 0000000000..d3b08936d2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md new file mode 100644 index 0000000000..7d27bbca94 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.getDatabase( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md new file mode 100644 index 0000000000..e47b942df9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md new file mode 100644 index 0000000000..15c753000a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new sdk.Grids(client); + +const result = await grids.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md new file mode 100644 index 0000000000..f7b28eb191 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.getTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..ac5257f658 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/increment-row-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md new file mode 100644 index 0000000000..dbfaac0262 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-databases.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-databases.md new file mode 100644 index 0000000000..8a20b2ac88 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/list-databases.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.listDatabases( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md new file mode 100644 index 0000000000..8a102996a6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md new file mode 100644 index 0000000000..9f9bb3bc33 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new sdk.Grids(client); + +const result = await grids.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md new file mode 100644 index 0000000000..e020b883e0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.listTables( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..b695e2d194 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-boolean-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-database.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-database.md new file mode 100644 index 0000000000..689c38f605 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-database.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateDatabase( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..8ec6f1cda7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-datetime-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-email-column.md new file mode 100644 index 0000000000..f8e0918819 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-email-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..bda1aad53a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-enum-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-float-column.md new file mode 100644 index 0000000000..ae3d5ceb4b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-float-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..a3e28bc406 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-integer-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..ff8692f81e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-ip-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..19f957f67a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-relationship-column.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + sdk.RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-row.md new file mode 100644 index 0000000000..79c845f558 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-row.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new sdk.Grids(client); + +const result = await grids.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md new file mode 100644 index 0000000000..65c8f63cbd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-string-column.md new file mode 100644 index 0000000000..b04f38bd5d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-string-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-table.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-table.md new file mode 100644 index 0000000000..3d80666600 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-table.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-url-column.md new file mode 100644 index 0000000000..aa368bfcc0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-url-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-row.md new file mode 100644 index 0000000000..03476fc311 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-row.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new sdk.Grids(client); + +const result = await grids.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..19f2ce1a90 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..22e7cf8058 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-database.md b/docs/examples/1.8.x/server-php/examples/grids/create-database.md new file mode 100644 index 0000000000..ff7c3f73fb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-database.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createDatabase( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..afb847fd30 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-email-column.md new file mode 100644 index 0000000000..7516614820 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-email-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..f4a9ff2e5d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-float-column.md new file mode 100644 index 0000000000..7a02a1790b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-float-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-index.md b/docs/examples/1.8.x/server-php/examples/grids/create-index.md new file mode 100644 index 0000000000..31bfdc2754 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-index.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; +use Appwrite\Enums\IndexType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType::KEY(), + columns: [], + orders: [], // optional + lengths: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..6495fc6309 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..65379a2f94 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..cde72569ad --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md @@ -0,0 +1,23 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; +use Appwrite\Enums\RelationshipType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType::ONETOONE(), + twoWay: false, // optional + key: '', // optional + twoWayKey: '', // optional + onDelete: RelationMutate::CASCADE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-row.md b/docs/examples/1.8.x/server-php/examples/grids/create-row.md new file mode 100644 index 0000000000..58f678c6c3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-row.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$grids = new Grids($client); + +$result = $grids->createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-rows.md b/docs/examples/1.8.x/server-php/examples/grids/create-rows.md new file mode 100644 index 0000000000..531ebaf846 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-string-column.md new file mode 100644 index 0000000000..a5acf25859 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-string-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-table.md b/docs/examples/1.8.x/server-php/examples/grids/create-table.md new file mode 100644 index 0000000000..ca6e017375 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-table.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-url-column.md new file mode 100644 index 0000000000..b0149f279b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-url-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..d7db09ed30 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + min: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-column.md b/docs/examples/1.8.x/server-php/examples/grids/delete-column.md new file mode 100644 index 0000000000..3862ecbde9 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/delete-column.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-database.md b/docs/examples/1.8.x/server-php/examples/grids/delete-database.md new file mode 100644 index 0000000000..761406ba9b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/delete-database.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->deleteDatabase( + databaseId: '<DATABASE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-index.md b/docs/examples/1.8.x/server-php/examples/grids/delete-index.md new file mode 100644 index 0000000000..913091455b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/delete-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-row.md b/docs/examples/1.8.x/server-php/examples/grids/delete-row.md new file mode 100644 index 0000000000..14b72e6e56 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/delete-row.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$grids = new Grids($client); + +$result = $grids->deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-php/examples/grids/delete-rows.md new file mode 100644 index 0000000000..567b497f04 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/delete-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-table.md b/docs/examples/1.8.x/server-php/examples/grids/delete-table.md new file mode 100644 index 0000000000..ea0eeda80f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/delete-table.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->deleteTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-column.md b/docs/examples/1.8.x/server-php/examples/grids/get-column.md new file mode 100644 index 0000000000..ac2c9bb0c4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/get-column.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-database.md b/docs/examples/1.8.x/server-php/examples/grids/get-database.md new file mode 100644 index 0000000000..c3e9f896c2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/get-database.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->getDatabase( + databaseId: '<DATABASE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-index.md b/docs/examples/1.8.x/server-php/examples/grids/get-index.md new file mode 100644 index 0000000000..2434fd933b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/get-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-row.md b/docs/examples/1.8.x/server-php/examples/grids/get-row.md new file mode 100644 index 0000000000..e13ea67209 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/get-row.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$grids = new Grids($client); + +$result = $grids->getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-table.md b/docs/examples/1.8.x/server-php/examples/grids/get-table.md new file mode 100644 index 0000000000..1c9721f1c7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/get-table.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->getTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..fc9ee9a9eb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + max: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-columns.md b/docs/examples/1.8.x/server-php/examples/grids/list-columns.md new file mode 100644 index 0000000000..7be7581a28 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/list-columns.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-databases.md b/docs/examples/1.8.x/server-php/examples/grids/list-databases.md new file mode 100644 index 0000000000..f5fec16a25 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/list-databases.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->listDatabases( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-php/examples/grids/list-indexes.md new file mode 100644 index 0000000000..d23248e5d4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/list-indexes.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-rows.md b/docs/examples/1.8.x/server-php/examples/grids/list-rows.md new file mode 100644 index 0000000000..c8537651c6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/list-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$grids = new Grids($client); + +$result = $grids->listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-tables.md b/docs/examples/1.8.x/server-php/examples/grids/list-tables.md new file mode 100644 index 0000000000..95f4f7b65d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/list-tables.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->listTables( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..bc7405d35d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-database.md b/docs/examples/1.8.x/server-php/examples/grids/update-database.md new file mode 100644 index 0000000000..9d71e5e043 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-database.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateDatabase( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..6850a6d373 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-email-column.md new file mode 100644 index 0000000000..6fe7f82477 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-email-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..4a18d02488 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-float-column.md new file mode 100644 index 0000000000..5e58f8efaf --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-float-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..c097b7e286 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..9ce131b8e1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..a0241afb06 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate::CASCADE(), // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-row.md b/docs/examples/1.8.x/server-php/examples/grids/update-row.md new file mode 100644 index 0000000000..a0aae15730 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-row.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$grids = new Grids($client); + +$result = $grids->updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-rows.md b/docs/examples/1.8.x/server-php/examples/grids/update-rows.md new file mode 100644 index 0000000000..270489f44e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-rows.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: [], // optional + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-string-column.md new file mode 100644 index 0000000000..6213deb7aa --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-string-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-table.md b/docs/examples/1.8.x/server-php/examples/grids/update-table.md new file mode 100644 index 0000000000..1483eee2a9 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-table.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-url-column.md new file mode 100644 index 0000000000..7f7916c81a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-url-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-php/examples/grids/upsert-row.md new file mode 100644 index 0000000000..a07cbe976f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/upsert-row.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$grids = new Grids($client); + +$result = $grids->upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..5d31648e02 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..73d8323533 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = False, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-database.md b/docs/examples/1.8.x/server-python/examples/grids/create-database.md new file mode 100644 index 0000000000..a7749e4903 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-database.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_database( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..a98024c16c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-email-column.md new file mode 100644 index 0000000000..372cbafce3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-email-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'email@example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..d7b47c80cb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-float-column.md new file mode 100644 index 0000000000..5a52128ac1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-float-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-index.md b/docs/examples/1.8.x/server-python/examples/grids/create-index.md new file mode 100644 index 0000000000..1d67b8abc0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-index.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids +from appwrite.enums import IndexType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + type = IndexType.KEY, + columns = [], + orders = [], # optional + lengths = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..aed49578aa --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..af873c91a1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..3cb858d260 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md @@ -0,0 +1,21 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids +from appwrite.enums import RelationshipType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + related_table_id = '<RELATED_TABLE_ID>', + type = RelationshipType.ONETOONE, + two_way = False, # optional + key = '', # optional + two_way_key = '', # optional + on_delete = RelationMutate.CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-row.md b/docs/examples/1.8.x/server-python/examples/grids/create-row.md new file mode 100644 index 0000000000..5645f0bd23 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-row.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +grids = Grids(client) + +result = grids.create_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-rows.md b/docs/examples/1.8.x/server-python/examples/grids/create-rows.md new file mode 100644 index 0000000000..3274c48a10 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [] +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-string-column.md new file mode 100644 index 0000000000..3771a070ba --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-string-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + size = 1, + required = False, + default = '<DEFAULT>', # optional + array = False, # optional + encrypt = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-table.md b/docs/examples/1.8.x/server-python/examples/grids/create-table.md new file mode 100644 index 0000000000..64c1b50d69 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-table.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + row_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-url-column.md new file mode 100644 index 0000000000..45c1a2d82e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-url-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'https://example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..9608337398 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.decrement_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '', + value = None, # optional + min = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-column.md b/docs/examples/1.8.x/server-python/examples/grids/delete-column.md new file mode 100644 index 0000000000..650a1c3578 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/delete-column.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.delete_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-database.md b/docs/examples/1.8.x/server-python/examples/grids/delete-database.md new file mode 100644 index 0000000000..9898c07bc8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/delete-database.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.delete_database( + database_id = '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-index.md b/docs/examples/1.8.x/server-python/examples/grids/delete-index.md new file mode 100644 index 0000000000..fed36f1d9c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/delete-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.delete_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-row.md b/docs/examples/1.8.x/server-python/examples/grids/delete-row.md new file mode 100644 index 0000000000..eb1e661738 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/delete-row.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +grids = Grids(client) + +result = grids.delete_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-python/examples/grids/delete-rows.md new file mode 100644 index 0000000000..31503cdee1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/delete-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.delete_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-table.md b/docs/examples/1.8.x/server-python/examples/grids/delete-table.md new file mode 100644 index 0000000000..d170c31d20 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/delete-table.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.delete_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-column.md b/docs/examples/1.8.x/server-python/examples/grids/get-column.md new file mode 100644 index 0000000000..a724e07b0a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/get-column.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.get_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-database.md b/docs/examples/1.8.x/server-python/examples/grids/get-database.md new file mode 100644 index 0000000000..e393d7587b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/get-database.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.get_database( + database_id = '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-index.md b/docs/examples/1.8.x/server-python/examples/grids/get-index.md new file mode 100644 index 0000000000..6e3753dea5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/get-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.get_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-row.md b/docs/examples/1.8.x/server-python/examples/grids/get-row.md new file mode 100644 index 0000000000..939a992868 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/get-row.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +grids = Grids(client) + +result = grids.get_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-table.md b/docs/examples/1.8.x/server-python/examples/grids/get-table.md new file mode 100644 index 0000000000..afe24bd0f2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/get-table.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.get_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..598cf58874 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.increment_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '', + value = None, # optional + max = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-columns.md b/docs/examples/1.8.x/server-python/examples/grids/list-columns.md new file mode 100644 index 0000000000..b78327182c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/list-columns.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.list_columns( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-databases.md b/docs/examples/1.8.x/server-python/examples/grids/list-databases.md new file mode 100644 index 0000000000..78c5cb4bd7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/list-databases.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.list_databases( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-python/examples/grids/list-indexes.md new file mode 100644 index 0000000000..a6b52416c6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/list-indexes.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.list_indexes( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-rows.md b/docs/examples/1.8.x/server-python/examples/grids/list-rows.md new file mode 100644 index 0000000000..975f88f763 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/list-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +grids = Grids(client) + +result = grids.list_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-tables.md b/docs/examples/1.8.x/server-python/examples/grids/list-tables.md new file mode 100644 index 0000000000..3e2e5508bc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/list-tables.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.list_tables( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..6bcbf27355 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = False, + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-database.md b/docs/examples/1.8.x/server-python/examples/grids/update-database.md new file mode 100644 index 0000000000..2df676bcbc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-database.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_database( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..6ae0e4dea5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-email-column.md new file mode 100644 index 0000000000..c1ff1d0637 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-email-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'email@example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..6da49cfb81 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-float-column.md new file mode 100644 index 0000000000..8d3d9edb5f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-float-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..966f7b6805 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..e5fccac320 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..fcff4591fd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + on_delete = RelationMutate.CASCADE, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-row.md b/docs/examples/1.8.x/server-python/examples/grids/update-row.md new file mode 100644 index 0000000000..e379697ce4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-row.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +grids = Grids(client) + +result = grids.update_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-rows.md b/docs/examples/1.8.x/server-python/examples/grids/update-rows.md new file mode 100644 index 0000000000..344bb5904b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-rows.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + data = {}, # optional + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-string-column.md new file mode 100644 index 0000000000..f303189b80 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-string-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '<DEFAULT>', + size = 1, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-table.md b/docs/examples/1.8.x/server-python/examples/grids/update-table.md new file mode 100644 index 0000000000..cfd5b4d92e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-table.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + row_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-url-column.md new file mode 100644 index 0000000000..ea6dc386ed --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-url-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'https://example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-python/examples/grids/upsert-row.md new file mode 100644 index 0000000000..79528818e0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/upsert-row.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +grids = Grids(client) + +result = grids.upsert_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..b7573d4794 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.upsert_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [] +) diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..d594385572 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/boolean HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": false, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-database.md b/docs/examples/1.8.x/server-rest/examples/grids/create-database.md new file mode 100644 index 0000000000..fd1ae143fa --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-database.md @@ -0,0 +1,12 @@ +POST /v1/databases HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..88505a8a1f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/datetime HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md new file mode 100644 index 0000000000..28d733dab8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "email@example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..35de1b5e2f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/enum HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "elements": [], + "required": false, + "default": "<DEFAULT>", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md new file mode 100644 index 0000000000..9c9996aced --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/float HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-index.md b/docs/examples/1.8.x/server-rest/examples/grids/create-index.md new file mode 100644 index 0000000000..7a7487bdae --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-index.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "type": "key", + "columns": [], + "orders": [], + "lengths": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..be6eb92544 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/integer HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..30406d7025 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/ip HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..75f54c9602 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "relatedTableId": "<RELATED_TABLE_ID>", + "type": "oneToOne", + "twoWay": false, + "key": , + "twoWayKey": , + "onDelete": "cascade" +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-row.md b/docs/examples/1.8.x/server-rest/examples/grids/create-row.md new file mode 100644 index 0000000000..443b4e30c9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-row.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rowId": "<ROW_ID>", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/create-rows.md new file mode 100644 index 0000000000..32578d87de --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-rows.md @@ -0,0 +1,12 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rows": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md new file mode 100644 index 0000000000..2a0b0dc372 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/string HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "size": 1, + "required": false, + "default": "<DEFAULT>", + "array": false, + "encrypt": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-table.md b/docs/examples/1.8.x/server-rest/examples/grids/create-table.md new file mode 100644 index 0000000000..7c22e81e7c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-table.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/grids/tables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "tableId": "<TABLE_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md new file mode 100644 index 0000000000..5dada907a0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "https://example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-rest/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..6548a58273 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/decrement-row-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId}/{column}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "min": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-column.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-column.md new file mode 100644 index 0000000000..2680bcf03a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/delete-column.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/columns/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-database.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-database.md new file mode 100644 index 0000000000..85d5f7bb0e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/delete-database.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-index.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-index.md new file mode 100644 index 0000000000..ca7d67a1b4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/delete-index.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-row.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-row.md new file mode 100644 index 0000000000..8fd3f6ee7d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/delete-row.md @@ -0,0 +1,9 @@ +DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md new file mode 100644 index 0000000000..af1fabdb7a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md @@ -0,0 +1,10 @@ +DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-table.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-table.md new file mode 100644 index 0000000000..e068291849 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/delete-table.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/grids/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-column.md b/docs/examples/1.8.x/server-rest/examples/grids/get-column.md new file mode 100644 index 0000000000..0888fb7273 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/get-column.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/columns/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-database.md b/docs/examples/1.8.x/server-rest/examples/grids/get-database.md new file mode 100644 index 0000000000..644f251f56 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/get-database.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-index.md b/docs/examples/1.8.x/server-rest/examples/grids/get-index.md new file mode 100644 index 0000000000..3a9c1ae705 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/get-index.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-row.md b/docs/examples/1.8.x/server-rest/examples/grids/get-row.md new file mode 100644 index 0000000000..ba3b87bee0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/get-row.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-table.md b/docs/examples/1.8.x/server-rest/examples/grids/get-table.md new file mode 100644 index 0000000000..e562f5c763 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/get-table.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-rest/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..4501951530 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/increment-row-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId}/{column}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "max": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-columns.md b/docs/examples/1.8.x/server-rest/examples/grids/list-columns.md new file mode 100644 index 0000000000..82859eaabd --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/list-columns.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/columns HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-databases.md b/docs/examples/1.8.x/server-rest/examples/grids/list-databases.md new file mode 100644 index 0000000000..3b9530eec4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/list-databases.md @@ -0,0 +1,5 @@ +GET /v1/databases HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/grids/list-indexes.md new file mode 100644 index 0000000000..847b2342fe --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/list-indexes.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/list-rows.md new file mode 100644 index 0000000000..d22624083f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/list-rows.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-tables.md b/docs/examples/1.8.x/server-rest/examples/grids/list-tables.md new file mode 100644 index 0000000000..d3a4230165 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/list-tables.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/grids/tables HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..4327743a81 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/boolean/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": false, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-database.md b/docs/examples/1.8.x/server-rest/examples/grids/update-database.md new file mode 100644 index 0000000000..d57ad48927 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-database.md @@ -0,0 +1,11 @@ +PUT /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..bbdc0c3bc4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/datetime/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md new file mode 100644 index 0000000000..b9145a1c33 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/email/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "email@example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..8d3d6c359f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/enum/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "elements": [], + "required": false, + "default": "<DEFAULT>", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md new file mode 100644 index 0000000000..5e1a67c6a1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/float/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..f45fbf278f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/integer/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..5080aaab25 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/ip/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..d5d188ced4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/{key}/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "onDelete": "cascade", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-row.md b/docs/examples/1.8.x/server-rest/examples/grids/update-row.md new file mode 100644 index 0000000000..015fa8faf1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-row.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/update-rows.md new file mode 100644 index 0000000000..eb5b77bb31 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-rows.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "data": {}, + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md new file mode 100644 index 0000000000..eda416a4d9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/string/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "<DEFAULT>", + "size": 1, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-table.md b/docs/examples/1.8.x/server-rest/examples/grids/update-table.md new file mode 100644 index 0000000000..02d68944f9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-table.md @@ -0,0 +1,13 @@ +PUT /v1/databases/{databaseId}/grids/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md new file mode 100644 index 0000000000..4e0796887a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/url/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "https://example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md new file mode 100644 index 0000000000..c461d7c981 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md @@ -0,0 +1,13 @@ +PUT /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..5d9446550f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md @@ -0,0 +1,10 @@ +PUT /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "rows": [] +} diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..592f6028aa --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: false, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-database.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-database.md new file mode 100644 index 0000000000..db94d2386e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-database.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_database( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..4bc97b94ae --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md new file mode 100644 index 0000000000..4a1687d405 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..2a9b6de5de --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md new file mode 100644 index 0000000000..0cd3bee568 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-index.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-index.md new file mode 100644 index 0000000000..7ef4c2c790 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-index.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + type: IndexType::KEY, + columns: [], + orders: [], # optional + lengths: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..ae7c416965 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..e407abaee8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..3aecd5757d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md @@ -0,0 +1,22 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + related_table_id: '<RELATED_TABLE_ID>', + type: RelationshipType::ONETOONE, + two_way: false, # optional + key: '', # optional + two_way_key: '', # optional + on_delete: RelationMutate::CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-row.md new file mode 100644 index 0000000000..4c4433bd10 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-row.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +grids = Grids.new(client) + +result = grids.create_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md new file mode 100644 index 0000000000..1e619d25ce --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + rows: [] +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md new file mode 100644 index 0000000000..7808c6cfa2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', # optional + array: false, # optional + encrypt: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-table.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-table.md new file mode 100644 index 0000000000..ef3bc4b5cf --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-table.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + row_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md new file mode 100644 index 0000000000..55ff12a1c0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..fcbc6efedc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.decrement_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '', + value: null, # optional + min: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md new file mode 100644 index 0000000000..79cf84f3fd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.delete_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md new file mode 100644 index 0000000000..54d3660b9f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.delete_database( + database_id: '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md new file mode 100644 index 0000000000..3968cfb675 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.delete_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md new file mode 100644 index 0000000000..183f02c5d3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +grids = Grids.new(client) + +result = grids.delete_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md new file mode 100644 index 0000000000..560d63b033 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.delete_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md new file mode 100644 index 0000000000..d0c15da17c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.delete_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-column.md new file mode 100644 index 0000000000..6288772e65 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/get-column.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.get_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-database.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-database.md new file mode 100644 index 0000000000..49a5cde300 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/get-database.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.get_database( + database_id: '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-index.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-index.md new file mode 100644 index 0000000000..78a923c0ff --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/get-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.get_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-row.md new file mode 100644 index 0000000000..e8dc2cb6b1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/get-row.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +grids = Grids.new(client) + +result = grids.get_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-table.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-table.md new file mode 100644 index 0000000000..bafdfe1140 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/get-table.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.get_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..d09f72080c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.increment_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '', + value: null, # optional + max: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md new file mode 100644 index 0000000000..343775300b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.list_columns( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md new file mode 100644 index 0000000000..21e54951ee --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.list_databases( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md new file mode 100644 index 0000000000..2229c87249 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.list_indexes( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md new file mode 100644 index 0000000000..40b7be88a7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +grids = Grids.new(client) + +result = grids.list_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md new file mode 100644 index 0000000000..69b213d3f3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.list_tables( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..78055c777f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: false, + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-database.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-database.md new file mode 100644 index 0000000000..79216c3fd3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-database.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_database( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..1737c5a020 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md new file mode 100644 index 0000000000..bc1f4cd7b6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..5012002e29 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md new file mode 100644 index 0000000000..e05037f10c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..3ec34bd2f2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..5394075ae5 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..2c730048de --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + on_delete: RelationMutate::CASCADE, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-row.md new file mode 100644 index 0000000000..57dd5cd381 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-row.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +grids = Grids.new(client) + +result = grids.update_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md new file mode 100644 index 0000000000..602670d67f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + data: {}, # optional + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md new file mode 100644 index 0000000000..09de9ba697 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-table.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-table.md new file mode 100644 index 0000000000..742a0c9829 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-table.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + row_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md new file mode 100644 index 0000000000..fc3f055708 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md new file mode 100644 index 0000000000..2cf50d92d9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +grids = Grids.new(client) + +result = grids.upsert_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..af3a7e1dbf --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.upsert_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + rows: [] +) diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..4d0a226eb2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnBoolean = try await grids.createBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-database.md b/docs/examples/1.8.x/server-swift/examples/grids/create-database.md new file mode 100644 index 0000000000..75ec62df4b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-database.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let database = try await grids.createDatabase( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..8271b44c9f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnDatetime = try await grids.createDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md new file mode 100644 index 0000000000..ca99534c78 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnEmail = try await grids.createEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..3d52e94a96 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnEnum = try await grids.createEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md new file mode 100644 index 0000000000..f0abdc7b9f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnFloat = try await grids.createFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-index.md b/docs/examples/1.8.x/server-swift/examples/grids/create-index.md new file mode 100644 index 0000000000..2d0c1272b2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-index.md @@ -0,0 +1,20 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnIndex = try await grids.createIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: .key, + columns: [], + orders: [], // optional + lengths: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..dca7968bfb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnInteger = try await grids.createIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..9517ed960f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnIp = try await grids.createIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..1ead20f97d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md @@ -0,0 +1,21 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnRelationship = try await grids.createRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: .oneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: .cascade // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-row.md b/docs/examples/1.8.x/server-swift/examples/grids/create-row.md new file mode 100644 index 0000000000..9d042b4034 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-row.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let grids = Grids(client) + +let row = try await grids.createRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/create-rows.md new file mode 100644 index 0000000000..3e1aced6e7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let rowList = try await grids.createRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md new file mode 100644 index 0000000000..74eea86fe4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnString = try await grids.createStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-table.md b/docs/examples/1.8.x/server-swift/examples/grids/create-table.md new file mode 100644 index 0000000000..3792c0aee4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-table.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let table = try await grids.createTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md new file mode 100644 index 0000000000..7ea729aa1a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnUrl = try await grids.createUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..9445843d71 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let row = try await grids.decrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + min: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-column.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-column.md new file mode 100644 index 0000000000..b58a4d0890 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/delete-column.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let result = try await grids.deleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-database.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-database.md new file mode 100644 index 0000000000..e7600d7726 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/delete-database.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let result = try await grids.deleteDatabase( + databaseId: "<DATABASE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-index.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-index.md new file mode 100644 index 0000000000..d83cd551da --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/delete-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let result = try await grids.deleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-row.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-row.md new file mode 100644 index 0000000000..d2d77234a3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/delete-row.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let grids = Grids(client) + +let result = try await grids.deleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md new file mode 100644 index 0000000000..6a3f145526 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let rowList = try await grids.deleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-table.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-table.md new file mode 100644 index 0000000000..8abdfcae2d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/delete-table.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let result = try await grids.deleteTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-column.md b/docs/examples/1.8.x/server-swift/examples/grids/get-column.md new file mode 100644 index 0000000000..68c0d3933d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/get-column.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let result = try await grids.getColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-database.md b/docs/examples/1.8.x/server-swift/examples/grids/get-database.md new file mode 100644 index 0000000000..f3936ae4ba --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/get-database.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let database = try await grids.getDatabase( + databaseId: "<DATABASE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-index.md b/docs/examples/1.8.x/server-swift/examples/grids/get-index.md new file mode 100644 index 0000000000..24c3be9e27 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/get-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnIndex = try await grids.getIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-row.md b/docs/examples/1.8.x/server-swift/examples/grids/get-row.md new file mode 100644 index 0000000000..4d3e53cba6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/get-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let grids = Grids(client) + +let row = try await grids.getRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-table.md b/docs/examples/1.8.x/server-swift/examples/grids/get-table.md new file mode 100644 index 0000000000..9ad5e0c202 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/get-table.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let table = try await grids.getTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..00d9663c22 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let row = try await grids.incrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + max: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-columns.md b/docs/examples/1.8.x/server-swift/examples/grids/list-columns.md new file mode 100644 index 0000000000..facf87f9a3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/list-columns.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnList = try await grids.listColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-databases.md b/docs/examples/1.8.x/server-swift/examples/grids/list-databases.md new file mode 100644 index 0000000000..26d50a24b1 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/list-databases.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let databaseList = try await grids.listDatabases( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md new file mode 100644 index 0000000000..c31f162d5d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnIndexList = try await grids.listIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/list-rows.md new file mode 100644 index 0000000000..01dd6637fc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/list-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let grids = Grids(client) + +let rowList = try await grids.listRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-tables.md b/docs/examples/1.8.x/server-swift/examples/grids/list-tables.md new file mode 100644 index 0000000000..af8cdd1264 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/list-tables.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let tableList = try await grids.listTables( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..8994b79e7c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnBoolean = try await grids.updateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-database.md b/docs/examples/1.8.x/server-swift/examples/grids/update-database.md new file mode 100644 index 0000000000..827245bd97 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-database.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let database = try await grids.updateDatabase( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..7a59cd1ef1 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnDatetime = try await grids.updateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md new file mode 100644 index 0000000000..3704401fa5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnEmail = try await grids.updateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..946804a88c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnEnum = try await grids.updateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md new file mode 100644 index 0000000000..10f0babb2c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnFloat = try await grids.updateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..60e145e3b0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnInteger = try await grids.updateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..17f490d644 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnIp = try await grids.updateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..994feefa92 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md @@ -0,0 +1,18 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnRelationship = try await grids.updateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: .cascade, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-row.md b/docs/examples/1.8.x/server-swift/examples/grids/update-row.md new file mode 100644 index 0000000000..3e4408f700 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-row.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let grids = Grids(client) + +let row = try await grids.updateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/update-rows.md new file mode 100644 index 0000000000..c57463cc8a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-rows.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let rowList = try await grids.updateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [:], // optional + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md new file mode 100644 index 0000000000..e9e2d71c62 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnString = try await grids.updateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-table.md b/docs/examples/1.8.x/server-swift/examples/grids/update-table.md new file mode 100644 index 0000000000..8b3fa5e12e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-table.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let table = try await grids.updateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md new file mode 100644 index 0000000000..b72666e240 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnUrl = try await grids.updateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md new file mode 100644 index 0000000000..1d09e7b767 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let grids = Grids(client) + +let row = try await grids.upsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..84173c9c0f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let rowList = try await grids.upsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] +) + From d25332987010bbdc49b429253cc633ac56a6b524 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 17:28:24 +0530 Subject: [PATCH 296/362] remove: local setup. --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 76ca3e7ae2..b2b76be8d1 100755 --- a/Dockerfile +++ b/Dockerfile @@ -42,8 +42,6 @@ COPY ./bin /usr/local/bin COPY ./src /usr/src/code/src COPY ./dev /usr/src/code/dev -COPY ./vendor/appwrite/sdk-generator /usr/src/code/vendor/appwrite/sdk-generator - # Set Volumes RUN mkdir -p /storage/uploads && \ mkdir -p /storage/imports && \ From e41ee30ed9986bfe0a5f922134003708b1ddc853 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 17:28:37 +0530 Subject: [PATCH 297/362] remove: local setup. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b2b76be8d1..30b017b573 100755 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ COPY --from=composer /usr/local/src/vendor /usr/src/code/vendor COPY ./app /usr/src/code/app COPY ./public /usr/src/code/public COPY ./bin /usr/local/bin -#COPY ./docs /usr/src/code/docs +COPY ./docs /usr/src/code/docs COPY ./src /usr/src/code/src COPY ./dev /usr/src/code/dev From d17e7e853b967f20b0ea9b6dd3c510903d7375f0 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 17:39:43 +0530 Subject: [PATCH 298/362] update: deprecation methods. --- .../Http/Databases/Collections/Attributes/Boolean/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Boolean/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Datetime/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Datetime/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Delete.php | 2 +- .../Http/Databases/Collections/Attributes/Email/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Email/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Enum/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Enum/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Float/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Float/Update.php | 2 +- .../Databases/Http/Databases/Collections/Attributes/Get.php | 2 +- .../Http/Databases/Collections/Attributes/IP/Create.php | 2 +- .../Http/Databases/Collections/Attributes/IP/Update.php | 2 +- .../Http/Databases/Collections/Attributes/Integer/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Integer/Update.php | 2 +- .../Databases/Collections/Attributes/Relationship/Create.php | 2 +- .../Databases/Collections/Attributes/Relationship/Update.php | 2 +- .../Http/Databases/Collections/Attributes/String/Create.php | 2 +- .../Http/Databases/Collections/Attributes/String/Update.php | 2 +- .../Http/Databases/Collections/Attributes/URL/Create.php | 2 +- .../Http/Databases/Collections/Attributes/URL/Update.php | 2 +- .../Databases/Http/Databases/Collections/Attributes/XList.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Create.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Delete.php | 2 +- .../Databases/Collections/Documents/Attribute/Decrement.php | 2 +- .../Databases/Collections/Documents/Attribute/Increment.php | 2 +- .../Http/Databases/Collections/Documents/Bulk/Delete.php | 2 +- .../Http/Databases/Collections/Documents/Bulk/Update.php | 2 +- .../Http/Databases/Collections/Documents/Bulk/Upsert.php | 2 +- .../Databases/Http/Databases/Collections/Documents/Create.php | 4 ++-- .../Databases/Http/Databases/Collections/Documents/Delete.php | 2 +- .../Databases/Http/Databases/Collections/Documents/Get.php | 2 +- .../Http/Databases/Collections/Documents/Logs/XList.php | 2 +- .../Databases/Http/Databases/Collections/Documents/Update.php | 2 +- .../Databases/Http/Databases/Collections/Documents/Upsert.php | 2 +- .../Databases/Http/Databases/Collections/Documents/XList.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Get.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Create.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Delete.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Get.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/XList.php | 2 +- .../Databases/Http/Databases/Collections/Logs/XList.php | 2 +- .../Modules/Databases/Http/Databases/Collections/Update.php | 2 +- .../Databases/Http/Databases/Collections/Usage/Get.php | 2 +- .../Modules/Databases/Http/Databases/Collections/XList.php | 2 +- 46 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php index 04fc96456e..ba44cf5900 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Create.php @@ -55,7 +55,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createBooleanColumn', + replaceWith: 'grids.createBooleanColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php index 487eca769f..2c46e457b8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Boolean/Update.php @@ -56,7 +56,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateBooleanColumn', + replaceWith: 'grids.updateBooleanColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php index a750a53d75..693b87726e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Create.php @@ -56,7 +56,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createDatetimeColumn', + replaceWith: 'grids.createDatetimeColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php index 8d7a383cf1..3bc76b5ecb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Datetime/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateDatetimeColumn', + replaceWith: 'grids.updateDatetimeColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php index 67ee8d814d..c86bb956f9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Delete.php @@ -57,7 +57,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.deleteColumn', + replaceWith: 'grids.deleteColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php index 9037ce1dcb..6638622bae 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Create.php @@ -56,7 +56,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createEmailColumn', + replaceWith: 'grids.createEmailColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php index bfe9733449..66d0e611b4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Email/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateEmailColumn', + replaceWith: 'grids.updateEmailColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php index b54dd1c0ad..414aa12e1b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Create.php @@ -58,7 +58,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createEnumColumn', + replaceWith: 'grids.createEnumColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php index 2fde9eaecc..201af5c394 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Enum/Update.php @@ -58,7 +58,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateEnumColumn', + replaceWith: 'grids.updateEnumColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php index bc1eb2d4c9..4d2bb1f827 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Create.php @@ -58,7 +58,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createFloatColumn', + replaceWith: 'grids.createFloatColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php index cb770067ff..74e81210be 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Float/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateFloatColumn', + replaceWith: 'grids.updateFloatColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php index a9d4d36758..5fedfc608a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Get.php @@ -60,7 +60,7 @@ class Get extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.getColumn', + replaceWith: 'grids.getColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php index e49b775a54..a022fe39a9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Create.php @@ -56,7 +56,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createIpColumn', + replaceWith: 'grids.createIpColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php index 44b8347807..70495b1755 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/IP/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateIpColumn', + replaceWith: 'grids.updateIpColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php index ea8a38e6c1..d7c345759d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php @@ -58,7 +58,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createIntegerColumn', + replaceWith: 'grids.createIntegerColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php index 39e8bad1f9..c29f634114 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateIntegerColumn', + replaceWith: 'grids.updateIntegerColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php index a062b96a36..a4112bacd1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Create.php @@ -58,7 +58,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createRelationshipColumn', + replaceWith: 'grids.createRelationshipColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php index 08a6475bb0..b71d7175a0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Relationship/Update.php @@ -55,7 +55,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateRelationshipColumn', + replaceWith: 'grids.updateRelationshipColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php index c1692c77d6..d3fa0a01dc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Create.php @@ -60,7 +60,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createStringColumn', + replaceWith: 'grids.createStringColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php index 770854f0f9..e450abe88a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/String/Update.php @@ -59,7 +59,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateStringColumn', + replaceWith: 'grids.updateStringColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php index d471cf24f1..86474d4ca4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Create.php @@ -56,7 +56,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createUrlColumn', + replaceWith: 'grids.createUrlColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php index dc475194c8..c3e6456c11 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/URL/Update.php @@ -57,7 +57,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateUrlColumn', + replaceWith: 'grids.updateUrlColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php index f4ff635759..7b01e7c4fa 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/XList.php @@ -54,7 +54,7 @@ class XList extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.listColumns', + replaceWith: 'grids.listColumns', ), )) ->param('databaseId', '', new UID(), 'Database ID.') 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 a88652b9e1..c3fdd372ee 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Create.php @@ -65,7 +65,7 @@ class Create extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.create', + replaceWith: 'grids.createTable', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php index 642d0d0978..f6755f7437 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Delete.php @@ -55,7 +55,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.delete', + replaceWith: 'grids.deleteTable', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php index cb38f8f75e..49a408e64c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php @@ -65,7 +65,7 @@ class Decrement extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.decrementRowColumn', + replaceWith: 'grids.decrementRowColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php index 82b688caae..5eadc96b9e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php @@ -65,7 +65,7 @@ class Increment extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.incrementRowColumn', + replaceWith: 'grids.incrementRowColumn', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index e6ce45f2f9..440927d45c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -63,7 +63,7 @@ class Delete extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.deleteRows', + replaceWith: 'grids.deleteRows', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index e153d0af20..daa7179395 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -66,7 +66,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateRows', + replaceWith: 'grids.updateRows', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index 687a426a3a..6b5da25a2c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -64,7 +64,7 @@ class Upsert extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.upsertRows', + replaceWith: 'grids.upsertRows', ), ) ]) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 64b1280eff..46bf9c3f55 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -84,7 +84,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createRow', + replaceWith: 'grids.createRow', ), ), new Method( @@ -107,7 +107,7 @@ class Create extends Action ], deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createRows', + replaceWith: 'grids.createRows', ), ) ]) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php index 8b0b43c05e..7bc81ab7db 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Delete.php @@ -65,7 +65,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.deleteRow', + replaceWith: 'grids.deleteRow', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php index 35463d2d40..f3e2a24672 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Get.php @@ -56,7 +56,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.getRow', + replaceWith: 'grids.getRow', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index 482b0fb05c..f8ae29bd3e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -62,7 +62,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.listLogs', + replaceWith: 'grids.listRowLogs', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 450f555dd2..0be66f0f40 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -69,7 +69,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.updateRow', + replaceWith: 'grids.updateRow', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index f514237fdf..c42b4ee6fd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -71,7 +71,7 @@ class Upsert extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.upsertRow', + replaceWith: 'grids.upsertRow', ), ), ]) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 9c00f9548c..42fe51e09a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -59,7 +59,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.listRows', + replaceWith: 'grids.listRows', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php index 67c6cea5f3..3dfff2a621 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Get.php @@ -50,7 +50,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.get', + replaceWith: 'grids.getTable', ), )) ->param('databaseId', '', new UID(), 'Database ID.') 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 a826ade364..5ba1fff5bf 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 @@ -65,7 +65,7 @@ class Create extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.createIndex', + replaceWith: 'grids.createIndex', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index 1b62e2bec8..80ccd8fadf 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -60,7 +60,7 @@ class Delete extends Action contentType: ContentType::NONE, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.deleteIndex', + replaceWith: 'grids.deleteIndex', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index 957ca98f61..475835538a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -51,7 +51,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.getIndex', + replaceWith: 'grids.getIndex', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index ed570d8abd..643360c12d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -56,7 +56,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.listIndexes', + replaceWith: 'grids.listIndexes', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 9527859efa..0eca31e679 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -62,7 +62,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.listLogs', + replaceWith: 'grids.listTableLogs', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index cc29b6ea66..09b3ee2b35 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -58,7 +58,7 @@ class Update extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.update', + replaceWith: 'grids.updateTable', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php index d829d18714..ec46f77581 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Usage/Get.php @@ -55,7 +55,7 @@ class Get extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.getUsage', + replaceWith: 'grids.getTableUsage', ), )) ->param('databaseId', '', new UID(), 'Database ID.') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php index 13269834a2..1b2f3cab32 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/XList.php @@ -57,7 +57,7 @@ class XList extends Action contentType: ContentType::JSON, deprecated: new Deprecated( since: '1.8.0', - replaceWith: 'tables.list', + replaceWith: 'grids.listTables', ), )) ->param('databaseId', '', new UID(), 'Database ID.') From 4146671ff8216fba92f3fcf6dc1dfd37342ac35e Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 17:55:07 +0530 Subject: [PATCH 299/362] address comments. --- .../Databases/Http/Databases/Create.php | 49 +++++++++---- .../Databases/Http/Databases/Delete.php | 49 +++++++++---- .../Modules/Databases/Http/Databases/Get.php | 49 +++++++++---- .../Databases/Http/Databases/Logs/XList.php | 49 +++++++++---- .../Databases/Http/Databases/Update.php | 49 +++++++++---- .../Databases/Http/Databases/Usage/Get.php | 50 +++++++++---- .../Databases/Http/Databases/Usage/XList.php | 49 +++++++++---- .../Databases/Http/Databases/XList.php | 49 +++++++++---- .../Platform/Modules/Databases/SDKMethod.php | 72 ------------------- 9 files changed, 281 insertions(+), 184 deletions(-) delete mode 100644 src/Appwrite/Platform/Modules/Databases/SDKMethod.php diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index 0dbe3eebbd..9b52b482bb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -4,9 +4,10 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases; use Appwrite\Event\Event; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; +use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\Utopia\Response as UtopiaResponse; @@ -42,20 +43,40 @@ class Create extends Action ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'database.create') ->label('audits.resource', 'database/{response.$id}') - ->label('sdk', SDKMethod::withGridsAPI( - namespace: 'databases', - group: 'databases', - name: 'create', - description: '/docs/references/databases/create.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_CREATED, - model: UtopiaResponse::MODEL_DATABASE, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'databases', + name: 'create', + description: '/docs/references/databases/create.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.createDatabase', ) - ], - contentType: ContentType::JSON - )) + ), + new Method( + namespace: 'grids', + group: 'grids', + name: 'createDatabase', + description: '/docs/references/grids/create-database.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_CREATED, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON + ) + ]) ->param('databaseId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Database name. Max length: 128 chars.') ->param('enabled', true, new Boolean(), 'Is the database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php index fb5594abb8..388b5edf7e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Delete.php @@ -5,9 +5,10 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; +use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; @@ -34,20 +35,40 @@ class Delete extends Action ->label('event', 'databases.[databaseId].delete') ->label('audits.event', 'database.delete') ->label('audits.resource', 'database/{request.databaseId}') - ->label('sdk', SDKMethod::withGridsAPI( - namespace: 'databases', - group: 'databases', - name: 'delete', - description: '/docs/references/databases/delete.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_NOCONTENT, - model: UtopiaResponse::MODEL_NONE, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'databases', + name: 'delete', + description: '/docs/references/databases/delete.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.deleteDatabase', ) - ], - contentType: ContentType::NONE - )) + ), + new Method( + namespace: 'grids', + group: 'grids', + name: 'deleteDatabase', + description: '/docs/references/grids/delete-database.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_NOCONTENT, + model: UtopiaResponse::MODEL_NONE, + ) + ], + contentType: ContentType::NONE + ), + ]) ->param('databaseId', '', new UID(), 'Database ID.') ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php index ff4a9af0a4..a3ac4d0da0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Get.php @@ -3,9 +3,10 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; +use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; @@ -29,20 +30,40 @@ class Get extends Action ->groups(['api', 'database']) ->label('scope', 'databases.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', SDKMethod::withGridsAPI( - namespace: 'databases', - group: 'databases', - name: 'get', - description: '/docs/references/databases/get.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DATABASE, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'databases', + name: 'get', + description: '/docs/references/databases/get.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.getDatabase', ) - ], - contentType: ContentType::JSON - )) + ), + new Method( + namespace: 'grids', + group: 'grids', + name: 'getDatabase', + description: '/docs/references/grids/get-database.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON + ), + ]) ->param('databaseId', '', new UID(), 'Database ID.') ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php index 6d3e30f52a..5828b9f8b8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Logs/XList.php @@ -3,9 +3,10 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Logs; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; +use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use DeviceDetector\DeviceDetector as Detector; @@ -41,20 +42,40 @@ class XList extends Action ->groups(['api', 'database']) ->label('scope', 'databases.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', SDKMethod::withGridsAPI( - namespace: 'databases', - group: 'logs', - name: 'listLogs', - description: '/docs/references/databases/get-logs.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_LOG_LIST, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'logs', + name: 'listLogs', + description: '/docs/references/databases/get-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_LOG_LIST, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.listDatabaseLogs', ) - ], - contentType: ContentType::JSON - )) + ), + new Method( + namespace: 'grids', + group: 'logs', + name: 'listDatabaseLogs', + description: '/docs/references/grids/list-database-logs.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_LOG_LIST, + ) + ], + contentType: ContentType::JSON + ), + ]) ->param('databaseId', '', new UID(), 'Database ID.') ->param('queries', [], new Queries([new Limit(), new Offset()]), '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', true) ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php index d164325469..b2b268075c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Update.php @@ -4,9 +4,10 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases; use Appwrite\Event\Event; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; +use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; @@ -35,20 +36,40 @@ class Update extends Action ->label('event', 'databases.[databaseId].update') ->label('audits.event', 'database.update') ->label('audits.resource', 'database/{response.$id}') - ->label('sdk', SDKMethod::withGridsAPI( - namespace: 'databases', - group: 'databases', - name: 'update', - description: '/docs/references/databases/update.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DATABASE, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'databases', + name: 'update', + description: '/docs/references/databases/update.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.updateDatabase', ) - ], - contentType: ContentType::JSON - )) + ), + new Method( + namespace: 'grids', + group: 'grids', + name: 'updateDatabase', + description: '/docs/references/grids/update-database.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE, + ) + ], + contentType: ContentType::JSON + ), + ]) ->param('databaseId', '', new UID(), 'Database ID.') ->param('name', null, new Text(128), 'Database name. Max length: 128 chars.') ->param('enabled', true, new Boolean(), 'Is database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php index fcdb4c615d..8efb6ae0ee 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/Get.php @@ -3,9 +3,10 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Usage; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; +use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Config\Config; @@ -34,20 +35,41 @@ class Get extends Action ->groups(['api', 'database', 'usage']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', SDKMethod::withGridsAPI( - namespace: 'databases', - group: null, - name: self::getName(), - description: '/docs/references/databases/get-database-usage.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_USAGE_DATABASE, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: null, + name: self::getName(), + description: '/docs/references/databases/get-database-usage.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_USAGE_DATABASE, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.' . self::getName(), ) - ], - contentType: ContentType::JSON, - )) + ), + new Method( + namespace: 'grids', + group: null, + name: self::getName(), + description: '/docs/references/grids/get-database-usage.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_USAGE_DATABASE, + ) + ], + contentType: ContentType::JSON, + ), + + ]) ->param('databaseId', '', new UID(), 'Database ID.') ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php index b3ff8a6fac..31d520611e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Usage/XList.php @@ -2,9 +2,10 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Usage; -use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; +use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Config\Config; @@ -32,20 +33,40 @@ class XList extends Action ->groups(['api', 'database', 'usage']) ->label('scope', 'collections.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', SDKMethod::withGridsAPI( - namespace: 'databases', - group: null, - name: self::getName(), - description: '/docs/references/databases/list-usage.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_USAGE_DATABASES, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: null, + name: self::getName(), + description: '/docs/references/databases/list-usage.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_USAGE_DATABASES, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.listDatabaseUsage' ) - ], - contentType: ContentType::JSON - )) + ), + new Method( + namespace: 'grids', + group: null, + name: 'listDatabaseUsage', + description: '/docs/references/grids/list-database-usage.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_USAGE_DATABASES, + ) + ], + contentType: ContentType::JSON + ), + ]) ->param('range', '30d', new WhiteList(['24h', '30d', '90d'], true), 'Date range.', true) ->inject('response') ->inject('dbForProject') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php index 1806cdc3fb..fdf3428101 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/XList.php @@ -3,9 +3,10 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases; use Appwrite\Extend\Exception; -use Appwrite\Platform\Modules\Databases\SDKMethod; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; +use Appwrite\SDK\Deprecated; +use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Database\Validator\Queries\Databases; use Appwrite\Utopia\Response as UtopiaResponse; @@ -35,20 +36,40 @@ class XList extends Action ->groups(['api', 'database']) ->label('scope', 'databases.read') ->label('resourceType', RESOURCE_TYPE_DATABASES) - ->label('sdk', SDKMethod::withGridsAPI( - namespace: 'databases', - group: 'databases', - name: 'list', - description: '/docs/references/databases/list.md', - auth: [AuthType::KEY], - responses: [ - new SDKResponse( - code: SwooleResponse::STATUS_CODE_OK, - model: UtopiaResponse::MODEL_DATABASE_LIST, + ->label('sdk', [ + new Method( + namespace: 'databases', + group: 'databases', + name: 'list', + description: '/docs/references/databases/list.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE_LIST, + ) + ], + contentType: ContentType::JSON, + deprecated: new Deprecated( + since: '1.8.0', + replaceWith: 'grids.listDatabases', ) - ], - contentType: ContentType::JSON - )) + ), + new Method( + namespace: 'grids', + group: 'grids', + name: 'listDatabases', + description: '/docs/references/grids/list-databases.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: SwooleResponse::STATUS_CODE_OK, + model: UtopiaResponse::MODEL_DATABASE_LIST, + ) + ], + contentType: ContentType::JSON + ), + ]) ->param('queries', [], new Databases(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Databases::ALLOWED_ATTRIBUTES), true) ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/SDKMethod.php b/src/Appwrite/Platform/Modules/Databases/SDKMethod.php deleted file mode 100644 index e3f12776c2..0000000000 --- a/src/Appwrite/Platform/Modules/Databases/SDKMethod.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php - -namespace Appwrite\Platform\Modules\Databases; - -use Appwrite\SDK\ContentType; -use Appwrite\SDK\Method; - -class SDKMethod -{ - private const array SDK_INFO_MAP = [ - 'create' => ['name' => 'createDatabase', 'docs' => 'create-database'], - 'list' => ['name' => 'listDatabases', 'docs' => 'list-databases'], - 'get' => ['name' => 'getDatabase', 'docs' => 'get-database'], - 'update' => ['name' => 'updateDatabase', 'docs' => 'update-database'], - 'delete' => ['name' => 'deleteDatabase', 'docs' => 'delete-database'], - 'listLogs' => ['name' => 'listDatabaseLogs', 'docs' => 'list-database-logs'], - 'listUsage' => ['name' => 'listDatabaseUsage', 'docs' => 'list-database-usage'], - 'getDatabaseUsage' => ['name' => 'getDatabaseUsage', 'docs' => 'get-database-usage'], - ]; - - /** - * @return Method[] - */ - public static function withGridsAPI( - string $namespace, - ?string $group, - string $name, - string $description, - array $auth, - array $responses, - ContentType $contentType, - ): array { - return [ - new Method( - namespace: $namespace, - group: $group, - name: $name, - description: $description, - auth: $auth, - responses: $responses, - contentType: $contentType, - ), - new Method( - namespace: 'grids', - group: $group === null ? null : 'grids', - name: self::transformNameForGrids($name), - description: self::transformDocsPathForGrids($description), - auth: $auth, - responses: $responses, - contentType: $contentType, - ) - ]; - } - - private static function transformNameForGrids(string $original): string - { - return self::SDK_INFO_MAP[$original]['name'] ?? $original; - } - - private static function transformDocsPathForGrids(string $original): string - { - $path = str_replace('/databases/', '/grids/', $original); - - foreach (self::SDK_INFO_MAP as $from => $mapped) { - if (str_ends_with($path, "/$from.md")) { - return substr($path, 0, -strlen("$from.md")) . $mapped['docs'] . '.md'; - } - } - - return $path; - } -} From 7a5a3706b6ec63495b0995de5e23c8274f66cea7 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 18:13:30 +0530 Subject: [PATCH 300/362] fix: tests. --- tests/e2e/General/UsageTest.php | 12 +++++----- .../Services/Migrations/MigrationsBase.php | 23 +++++++++---------- .../Realtime/RealtimeConsoleClientTest.php | 10 ++++---- tests/e2e/Services/Webhooks/WebhooksBase.php | 18 +++++++-------- .../Webhooks/WebhooksCustomServerTest.php | 10 ++++---- 5 files changed, 36 insertions(+), 37 deletions(-) diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index b5800eac37..090f1faec7 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -713,7 +713,7 @@ class UsageTest extends Scope $response = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/tables', + '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] @@ -742,7 +742,7 @@ class UsageTest extends Scope if ($i < (self::CREATE / 2)) { $response = $this->client->call( Client::METHOD_DELETE, - '/databases/' . $databaseId . '/tables/' . $tableId, + '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), @@ -757,7 +757,7 @@ class UsageTest extends Scope $response = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/tables/' . $tableId . '/columns' . '/string', + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns' . '/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] @@ -780,7 +780,7 @@ class UsageTest extends Scope $response = $this->client->call( Client::METHOD_POST, - '/databases/' . $databaseId . '/tables/' . $tableId . '/rows', + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'] @@ -802,7 +802,7 @@ class UsageTest extends Scope if ($i < (self::CREATE / 2)) { $response = $this->client->call( Client::METHOD_DELETE, - '/databases/' . $databaseId . '/tables/' . $tableId . '/rows/' . $rowId, + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ 'x-appwrite-project' => $this->getProject()['$id'] ], $this->getHeaders()), @@ -898,7 +898,7 @@ class UsageTest extends Scope $response = $this->client->call( Client::METHOD_GET, - '/databases/' . $databaseId . '/tables/' . $tableId . '/usage?range=30d', + '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/usage?range=30d', $this->getConsoleHeaders() ); diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index a752740ca2..d527f24a93 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -13,7 +13,6 @@ use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use Utopia\Migration\Resource; use Utopia\Migration\Sources\Appwrite; -use Utopia\Migration\Sources\CSV; trait MigrationsBase { @@ -440,7 +439,7 @@ trait MigrationsBase { $databaseId = $data['databaseId']; - $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', [ + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -454,7 +453,7 @@ trait MigrationsBase $tableId = $table['body']['$id']; // Create Column - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', [ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -469,7 +468,7 @@ trait MigrationsBase // Wait for column to be ready $this->assertEventually(function () use ($databaseId, $tableId) { - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/name', [ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/name', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -502,7 +501,7 @@ trait MigrationsBase $this->assertEquals(0, $result['statusCounters'][$resource]['warning']); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId, [ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -514,7 +513,7 @@ trait MigrationsBase $this->assertEquals($tableId, $response['body']['$id']); $this->assertEquals('Test Table', $response['body']['name']); - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/name', [ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/name', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -548,7 +547,7 @@ trait MigrationsBase $table = $data['tableId']; $databaseId = $data['databaseId']; - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $table . '/rows', [ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $table . '/rows', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'], @@ -598,7 +597,7 @@ trait MigrationsBase $this->assertEquals(0, $result['statusCounters'][$resource]['warning']); } - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/tables/' . $table . '/rows/' . $rowId, [ + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $table . '/rows/' . $rowId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getDestinationProject()['$id'], 'x-appwrite-key' => $this->getDestinationProject()['apiKey'], @@ -920,7 +919,7 @@ trait MigrationsBase $databaseId = $response['body']['$id']; // make a table - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -935,7 +934,7 @@ trait MigrationsBase $tableId = $response['body']['$id']; // make columns - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/string', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -951,7 +950,7 @@ trait MigrationsBase $this->assertEquals($response['body']['size'], 256); $this->assertEquals($response['body']['required'], true); - $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $tableId . '/columns/integer', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/integer', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -1176,7 +1175,7 @@ trait MigrationsBase }, 1000, 500); // get rows count - $rows = $this->client->call(Client::METHOD_GET, '/databases/'.$databaseId.'/tables/'.$tableId.'/rows', array_merge([ + $rows = $this->client->call(Client::METHOD_GET, '/databases/'.$databaseId.'/grids/tables/'.$tableId.'/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index 0f1f43d1e4..a318eb82ba 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -272,7 +272,7 @@ class RealtimeConsoleClientTest extends Scope /** * Test Attributes */ - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -288,7 +288,7 @@ class RealtimeConsoleClientTest extends Scope $actorsId = $actors['body']['$id']; - $name = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/columns/string', array_merge([ + $name = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -462,7 +462,7 @@ class RealtimeConsoleClientTest extends Scope /** * Test Indexes */ - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -629,7 +629,7 @@ class RealtimeConsoleClientTest extends Scope * Test Delete Index */ $indexKey = 'key_name'; - $attribute = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $actorsId . '/indexes/' . $indexKey, array_merge([ + $attribute = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/indexes/' . $indexKey, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); @@ -783,7 +783,7 @@ class RealtimeConsoleClientTest extends Scope /** * Test Delete Attribute */ - $attribute = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['actorsId'] . '/columns/' . $attributeKey, array_merge([ + $attribute = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['actorsId'] . '/columns/' . $attributeKey, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); diff --git a/tests/e2e/Services/Webhooks/WebhooksBase.php b/tests/e2e/Services/Webhooks/WebhooksBase.php index fe9a4ed366..35cf003586 100644 --- a/tests/e2e/Services/Webhooks/WebhooksBase.php +++ b/tests/e2e/Services/Webhooks/WebhooksBase.php @@ -409,7 +409,7 @@ trait WebhooksBase /** * Test for SUCCESS */ - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -460,7 +460,7 @@ trait WebhooksBase $actorsId = $data['actorsId']; $databaseId = $data['databaseId']; - $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/columns/string', array_merge([ + $firstName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -470,7 +470,7 @@ trait WebhooksBase 'required' => true, ]); - $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/columns/string', array_merge([ + $lastName = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -480,7 +480,7 @@ trait WebhooksBase 'required' => true, ]); - $extra = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/columns/string', array_merge([ + $extra = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/columns/string', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -518,7 +518,7 @@ trait WebhooksBase $this->assertNotEmpty($webhook['data']['key']); $this->assertEquals($webhook['data']['key'], 'extra'); - $removed = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['actorsId'] . '/columns/' . $extra['body']['key'], array_merge([ + $removed = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['actorsId'] . '/columns/' . $extra['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -558,7 +558,7 @@ trait WebhooksBase /** * Test for SUCCESS */ - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -621,7 +621,7 @@ trait WebhooksBase /** * Test for SUCCESS */ - $document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/tables/' . $actorsId . '/rows/' . $data['rowId'], array_merge([ + $document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/rows/' . $data['rowId'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -682,7 +682,7 @@ trait WebhooksBase /** * Test for SUCCESS */ - $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $actorsId . '/rows', array_merge([ + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/rows', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ @@ -704,7 +704,7 @@ trait WebhooksBase $this->assertEquals($row['headers']['status-code'], 201); $this->assertNotEmpty($row['body']['$id']); - $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $actorsId . '/rows/' . $row['body']['$id'], array_merge([ + $row = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $actorsId . '/rows/' . $row['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders())); diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index 30d39a27bb..1d9b9061d9 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -218,7 +218,7 @@ class WebhooksCustomServerTest extends Scope /** * Test for SUCCESS */ - $actors = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/tables/' . $id, array_merge([ + $actors = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $id, array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -260,7 +260,7 @@ class WebhooksCustomServerTest extends Scope $actorsId = $data['actorsId']; $databaseId = $data['databaseId']; - $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables/' . $data['actorsId'] . '/indexes', array_merge([ + $index = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $data['actorsId'] . '/indexes', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -295,7 +295,7 @@ class WebhooksCustomServerTest extends Scope $this->assertTrue(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? '')); // Remove index - $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $data['actorsId'] . '/indexes/' . $index['body']['key'], array_merge([ + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $data['actorsId'] . '/indexes/' . $index['body']['key'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -341,7 +341,7 @@ class WebhooksCustomServerTest extends Scope /** * Test for SUCCESS */ - $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/tables', array_merge([ + $actors = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] @@ -362,7 +362,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals(201, $actors['headers']['status-code']); $this->assertNotEmpty($actors['body']['$id']); - $actors = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/tables/' . $actors['body']['$id'], array_merge([ + $actors = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $actors['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] From dccf64ae2e4f69ef674ccc288fc89cd96520c244 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 18:16:13 +0530 Subject: [PATCH 301/362] update: regen specs with updated deprecations. --- app/config/specs/open-api3-1.8.x-client.json | 12 +- app/config/specs/open-api3-1.8.x-console.json | 144 +++++++++++------- app/config/specs/open-api3-1.8.x-server.json | 116 ++++++++------ app/config/specs/open-api3-latest-client.json | 12 +- .../specs/open-api3-latest-console.json | 144 +++++++++++------- app/config/specs/open-api3-latest-server.json | 116 ++++++++------ app/config/specs/swagger2-1.8.x-client.json | 12 +- app/config/specs/swagger2-1.8.x-console.json | 144 +++++++++++------- app/config/specs/swagger2-1.8.x-server.json | 116 ++++++++------ app/config/specs/swagger2-latest-client.json | 12 +- app/config/specs/swagger2-latest-console.json | 144 +++++++++++------- app/config/specs/swagger2-latest-server.json | 116 ++++++++------ 12 files changed, 648 insertions(+), 440 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 0853e74dd1..39e3f4da59 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4379,7 +4379,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -4468,7 +4468,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { @@ -4612,7 +4612,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -4711,7 +4711,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { @@ -4853,7 +4853,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -4956,7 +4956,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] 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 4e026f0343..d5bf0ee5ad 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4539,7 +4539,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4556,6 +4556,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, "methods": [ { "name": "list", @@ -4652,7 +4656,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4669,6 +4673,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, "methods": [ { "name": "create", @@ -4779,7 +4787,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listUsage", "group": null, @@ -4796,6 +4804,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + }, "methods": [ { "name": "listUsage", @@ -4831,7 +4843,7 @@ "model": "#\/components\/schemas\/usageDatabases" } ], - "description": "" + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { @@ -4889,7 +4901,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4906,6 +4918,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, "methods": [ { "name": "get", @@ -4990,7 +5006,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -5007,6 +5023,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, "methods": [ { "name": "update", @@ -5114,7 +5134,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -5131,6 +5151,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, "methods": [ { "name": "delete", @@ -5234,7 +5258,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [] @@ -5321,7 +5345,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [] @@ -5429,7 +5453,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [] @@ -5502,7 +5526,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [] @@ -5605,7 +5629,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [] @@ -5680,7 +5704,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [] @@ -5768,7 +5792,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [] @@ -5878,7 +5902,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [] @@ -5993,7 +6017,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [] @@ -6103,7 +6127,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6218,7 +6242,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [] @@ -6328,7 +6352,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [] @@ -6443,7 +6467,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [] @@ -6562,7 +6586,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [] @@ -6686,7 +6710,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [] @@ -6806,7 +6830,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [] @@ -6931,7 +6955,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [] @@ -7051,7 +7075,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [] @@ -7176,7 +7200,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [] @@ -7286,7 +7310,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [] @@ -7401,7 +7425,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [] @@ -7536,7 +7560,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [] @@ -7657,7 +7681,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [] @@ -7777,7 +7801,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [] @@ -7887,7 +7911,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [] @@ -8033,7 +8057,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [] @@ -8108,7 +8132,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [] @@ -8192,7 +8216,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8306,7 +8330,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -8395,7 +8419,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { @@ -8560,7 +8584,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { @@ -8682,7 +8706,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [] @@ -8780,7 +8804,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [] @@ -8876,7 +8900,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -8975,7 +8999,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { @@ -9117,7 +9141,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -9220,7 +9244,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] @@ -9306,7 +9330,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listRowLogs" }, "auth": { "Project": [] @@ -9404,7 +9428,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [] @@ -9520,7 +9544,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [] @@ -9635,7 +9659,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [] @@ -9721,7 +9745,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [] @@ -9853,7 +9877,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [] @@ -9928,7 +9952,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [] @@ -10012,7 +10036,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listTableLogs" }, "auth": { "Project": [] @@ -10099,7 +10123,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getUsage" + "replaceWith": "grids.getTableUsage" }, "auth": { "Project": [] @@ -14949,7 +14973,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listLogs", "group": "logs", @@ -14966,6 +14990,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + }, "methods": [ { "name": "listLogs", @@ -15007,7 +15035,7 @@ "model": "#\/components\/schemas\/logList" } ], - "description": "Get the database activity logs list by its unique ID." + "description": "" } ], "auth": { @@ -15066,7 +15094,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getDatabaseUsage", "group": null, @@ -15083,6 +15111,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + }, "methods": [ { "name": "getDatabaseUsage", 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 2ad2b3c265..c34a486a61 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4057,7 +4057,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4074,6 +4074,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, "methods": [ { "name": "list", @@ -4173,7 +4177,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4190,6 +4194,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, "methods": [ { "name": "create", @@ -4303,7 +4311,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4320,6 +4328,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, "methods": [ { "name": "get", @@ -4407,7 +4419,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -4424,6 +4436,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, "methods": [ { "name": "update", @@ -4534,7 +4550,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -4551,6 +4567,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, "methods": [ { "name": "delete", @@ -4657,7 +4677,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [], @@ -4745,7 +4765,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [], @@ -4854,7 +4874,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [], @@ -4928,7 +4948,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [], @@ -5032,7 +5052,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [], @@ -5108,7 +5128,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [], @@ -5197,7 +5217,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [], @@ -5308,7 +5328,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [], @@ -5424,7 +5444,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [], @@ -5535,7 +5555,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5651,7 +5671,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [], @@ -5762,7 +5782,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [], @@ -5878,7 +5898,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [], @@ -5998,7 +6018,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [], @@ -6123,7 +6143,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [], @@ -6244,7 +6264,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [], @@ -6370,7 +6390,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [], @@ -6491,7 +6511,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [], @@ -6617,7 +6637,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [], @@ -6728,7 +6748,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [], @@ -6844,7 +6864,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [], @@ -6980,7 +7000,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [], @@ -7102,7 +7122,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [], @@ -7223,7 +7243,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [], @@ -7334,7 +7354,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [], @@ -7481,7 +7501,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [], @@ -7557,7 +7577,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [], @@ -7642,7 +7662,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7757,7 +7777,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [], @@ -7848,7 +7868,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { @@ -8017,7 +8037,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { @@ -8141,7 +8161,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [], @@ -8240,7 +8260,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [], @@ -8337,7 +8357,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [], @@ -8438,7 +8458,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { @@ -8583,7 +8603,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [], @@ -8688,7 +8708,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [], @@ -8777,7 +8797,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [], @@ -8894,7 +8914,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [], @@ -9010,7 +9030,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [], @@ -9097,7 +9117,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [], @@ -9230,7 +9250,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [], @@ -9306,7 +9326,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [], diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 0853e74dd1..39e3f4da59 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4379,7 +4379,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -4468,7 +4468,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { @@ -4612,7 +4612,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -4711,7 +4711,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { @@ -4853,7 +4853,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -4956,7 +4956,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 4e026f0343..d5bf0ee5ad 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4539,7 +4539,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4556,6 +4556,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, "methods": [ { "name": "list", @@ -4652,7 +4656,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4669,6 +4673,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, "methods": [ { "name": "create", @@ -4779,7 +4787,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listUsage", "group": null, @@ -4796,6 +4804,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + }, "methods": [ { "name": "listUsage", @@ -4831,7 +4843,7 @@ "model": "#\/components\/schemas\/usageDatabases" } ], - "description": "" + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { @@ -4889,7 +4901,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4906,6 +4918,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, "methods": [ { "name": "get", @@ -4990,7 +5006,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -5007,6 +5023,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, "methods": [ { "name": "update", @@ -5114,7 +5134,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -5131,6 +5151,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, "methods": [ { "name": "delete", @@ -5234,7 +5258,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [] @@ -5321,7 +5345,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [] @@ -5429,7 +5453,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [] @@ -5502,7 +5526,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [] @@ -5605,7 +5629,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [] @@ -5680,7 +5704,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [] @@ -5768,7 +5792,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [] @@ -5878,7 +5902,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [] @@ -5993,7 +6017,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [] @@ -6103,7 +6127,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6218,7 +6242,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [] @@ -6328,7 +6352,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [] @@ -6443,7 +6467,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [] @@ -6562,7 +6586,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [] @@ -6686,7 +6710,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [] @@ -6806,7 +6830,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [] @@ -6931,7 +6955,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [] @@ -7051,7 +7075,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [] @@ -7176,7 +7200,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [] @@ -7286,7 +7310,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [] @@ -7401,7 +7425,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [] @@ -7536,7 +7560,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [] @@ -7657,7 +7681,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [] @@ -7777,7 +7801,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [] @@ -7887,7 +7911,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [] @@ -8033,7 +8057,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [] @@ -8108,7 +8132,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [] @@ -8192,7 +8216,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8306,7 +8330,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -8395,7 +8419,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { @@ -8560,7 +8584,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { @@ -8682,7 +8706,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [] @@ -8780,7 +8804,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [] @@ -8876,7 +8900,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -8975,7 +8999,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { @@ -9117,7 +9141,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -9220,7 +9244,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] @@ -9306,7 +9330,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listRowLogs" }, "auth": { "Project": [] @@ -9404,7 +9428,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [] @@ -9520,7 +9544,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [] @@ -9635,7 +9659,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [] @@ -9721,7 +9745,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [] @@ -9853,7 +9877,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [] @@ -9928,7 +9952,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [] @@ -10012,7 +10036,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listTableLogs" }, "auth": { "Project": [] @@ -10099,7 +10123,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getUsage" + "replaceWith": "grids.getTableUsage" }, "auth": { "Project": [] @@ -14949,7 +14973,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listLogs", "group": "logs", @@ -14966,6 +14990,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + }, "methods": [ { "name": "listLogs", @@ -15007,7 +15035,7 @@ "model": "#\/components\/schemas\/logList" } ], - "description": "Get the database activity logs list by its unique ID." + "description": "" } ], "auth": { @@ -15066,7 +15094,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getDatabaseUsage", "group": null, @@ -15083,6 +15111,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + }, "methods": [ { "name": "getDatabaseUsage", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 2ad2b3c265..c34a486a61 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -4057,7 +4057,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4074,6 +4074,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, "methods": [ { "name": "list", @@ -4173,7 +4177,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4190,6 +4194,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, "methods": [ { "name": "create", @@ -4303,7 +4311,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4320,6 +4328,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, "methods": [ { "name": "get", @@ -4407,7 +4419,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -4424,6 +4436,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, "methods": [ { "name": "update", @@ -4534,7 +4550,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -4551,6 +4567,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, "methods": [ { "name": "delete", @@ -4657,7 +4677,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [], @@ -4745,7 +4765,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [], @@ -4854,7 +4874,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [], @@ -4928,7 +4948,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [], @@ -5032,7 +5052,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [], @@ -5108,7 +5128,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [], @@ -5197,7 +5217,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [], @@ -5308,7 +5328,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [], @@ -5424,7 +5444,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [], @@ -5535,7 +5555,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5651,7 +5671,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [], @@ -5762,7 +5782,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [], @@ -5878,7 +5898,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [], @@ -5998,7 +6018,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [], @@ -6123,7 +6143,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [], @@ -6244,7 +6264,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [], @@ -6370,7 +6390,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [], @@ -6491,7 +6511,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [], @@ -6617,7 +6637,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [], @@ -6728,7 +6748,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [], @@ -6844,7 +6864,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [], @@ -6980,7 +7000,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [], @@ -7102,7 +7122,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [], @@ -7223,7 +7243,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [], @@ -7334,7 +7354,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [], @@ -7481,7 +7501,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [], @@ -7557,7 +7577,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [], @@ -7642,7 +7662,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7757,7 +7777,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [], @@ -7848,7 +7868,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { @@ -8017,7 +8037,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { @@ -8141,7 +8161,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [], @@ -8240,7 +8260,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [], @@ -8337,7 +8357,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [], @@ -8438,7 +8458,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { @@ -8583,7 +8603,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [], @@ -8688,7 +8708,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [], @@ -8777,7 +8797,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [], @@ -8894,7 +8914,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [], @@ -9010,7 +9030,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [], @@ -9097,7 +9117,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [], @@ -9230,7 +9250,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [], @@ -9306,7 +9326,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [], diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index c25de95c78..13b8fc3404 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -4520,7 +4520,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -4605,7 +4605,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { @@ -4746,7 +4746,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -4839,7 +4839,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { @@ -4976,7 +4976,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -5076,7 +5076,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index dadd2fac84..4a19acfef4 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -4699,7 +4699,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4716,6 +4716,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, "methods": [ { "name": "list", @@ -4811,7 +4815,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4828,6 +4832,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, "methods": [ { "name": "create", @@ -4941,7 +4949,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listUsage", "group": null, @@ -4958,6 +4966,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + }, "methods": [ { "name": "listUsage", @@ -4993,7 +5005,7 @@ "model": "#\/definitions\/usageDatabases" } ], - "description": "" + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { @@ -5049,7 +5061,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -5066,6 +5078,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, "methods": [ { "name": "get", @@ -5150,7 +5166,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -5167,6 +5183,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, "methods": [ { "name": "update", @@ -5276,7 +5296,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -5293,6 +5313,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, "methods": [ { "name": "delete", @@ -5394,7 +5418,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [] @@ -5478,7 +5502,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [] @@ -5587,7 +5611,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [] @@ -5658,7 +5682,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [] @@ -5763,7 +5787,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [] @@ -5834,7 +5858,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [] @@ -5919,7 +5943,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [] @@ -6029,7 +6053,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [] @@ -6141,7 +6165,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [] @@ -6251,7 +6275,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6363,7 +6387,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [] @@ -6473,7 +6497,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [] @@ -6585,7 +6609,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [] @@ -6705,7 +6729,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [] @@ -6827,7 +6851,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [] @@ -6949,7 +6973,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [] @@ -7073,7 +7097,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [] @@ -7195,7 +7219,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [] @@ -7319,7 +7343,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [] @@ -7429,7 +7453,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [] @@ -7541,7 +7565,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [] @@ -7678,7 +7702,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [] @@ -7801,7 +7825,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [] @@ -7919,7 +7943,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [] @@ -8029,7 +8053,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [] @@ -8170,7 +8194,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [] @@ -8243,7 +8267,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [] @@ -8323,7 +8347,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8430,7 +8454,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -8515,7 +8539,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { @@ -8680,7 +8704,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { @@ -8799,7 +8823,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [] @@ -8895,7 +8919,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [] @@ -8985,7 +9009,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -9078,7 +9102,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { @@ -9215,7 +9239,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -9315,7 +9339,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] @@ -9395,7 +9419,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listRowLogs" }, "auth": { "Project": [] @@ -9488,7 +9512,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [] @@ -9598,7 +9622,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [] @@ -9705,7 +9729,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [] @@ -9788,7 +9812,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [] @@ -9919,7 +9943,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [] @@ -9992,7 +10016,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [] @@ -10070,7 +10094,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listTableLogs" }, "auth": { "Project": [] @@ -10152,7 +10176,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getUsage" + "replaceWith": "grids.getTableUsage" }, "auth": { "Project": [] @@ -14883,7 +14907,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listLogs", "group": "logs", @@ -14900,6 +14924,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + }, "methods": [ { "name": "listLogs", @@ -14941,7 +14969,7 @@ "model": "#\/definitions\/logList" } ], - "description": "Get the database activity logs list by its unique ID." + "description": "" } ], "auth": { @@ -14997,7 +15025,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getDatabaseUsage", "group": null, @@ -15014,6 +15042,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + }, "methods": [ { "name": "getDatabaseUsage", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index ed8068ad87..22d88b4044 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -4205,7 +4205,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4222,6 +4222,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, "methods": [ { "name": "list", @@ -4320,7 +4324,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4337,6 +4341,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, "methods": [ { "name": "create", @@ -4453,7 +4461,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4470,6 +4478,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, "methods": [ { "name": "get", @@ -4557,7 +4569,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -4574,6 +4586,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, "methods": [ { "name": "update", @@ -4686,7 +4702,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -4703,6 +4719,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, "methods": [ { "name": "delete", @@ -4807,7 +4827,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [], @@ -4892,7 +4912,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [], @@ -5002,7 +5022,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [], @@ -5074,7 +5094,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [], @@ -5180,7 +5200,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [], @@ -5252,7 +5272,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [], @@ -5338,7 +5358,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [], @@ -5449,7 +5469,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [], @@ -5562,7 +5582,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [], @@ -5673,7 +5693,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5786,7 +5806,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [], @@ -5897,7 +5917,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [], @@ -6010,7 +6030,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [], @@ -6131,7 +6151,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [], @@ -6254,7 +6274,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [], @@ -6377,7 +6397,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [], @@ -6502,7 +6522,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [], @@ -6625,7 +6645,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [], @@ -6750,7 +6770,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [], @@ -6861,7 +6881,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [], @@ -6974,7 +6994,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [], @@ -7112,7 +7132,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [], @@ -7236,7 +7256,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [], @@ -7355,7 +7375,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [], @@ -7466,7 +7486,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [], @@ -7608,7 +7628,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [], @@ -7682,7 +7702,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [], @@ -7763,7 +7783,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7871,7 +7891,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [], @@ -7958,7 +7978,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { @@ -8127,7 +8147,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { @@ -8248,7 +8268,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [], @@ -8345,7 +8365,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [], @@ -8436,7 +8456,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [], @@ -8531,7 +8551,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { @@ -8671,7 +8691,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [], @@ -8773,7 +8793,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [], @@ -8858,7 +8878,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [], @@ -8969,7 +8989,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [], @@ -9077,7 +9097,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [], @@ -9161,7 +9181,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [], @@ -9293,7 +9313,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [], @@ -9367,7 +9387,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [], diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index c25de95c78..13b8fc3404 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4520,7 +4520,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -4605,7 +4605,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { @@ -4746,7 +4746,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -4839,7 +4839,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { @@ -4976,7 +4976,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -5076,7 +5076,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index dadd2fac84..4a19acfef4 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4699,7 +4699,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4716,6 +4716,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, "methods": [ { "name": "list", @@ -4811,7 +4815,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4828,6 +4832,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, "methods": [ { "name": "create", @@ -4941,7 +4949,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listUsage", "group": null, @@ -4958,6 +4966,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + }, "methods": [ { "name": "listUsage", @@ -4993,7 +5005,7 @@ "model": "#\/definitions\/usageDatabases" } ], - "description": "" + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." } ], "auth": { @@ -5049,7 +5061,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -5066,6 +5078,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, "methods": [ { "name": "get", @@ -5150,7 +5166,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -5167,6 +5183,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, "methods": [ { "name": "update", @@ -5276,7 +5296,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -5293,6 +5313,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, "methods": [ { "name": "delete", @@ -5394,7 +5418,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [] @@ -5478,7 +5502,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [] @@ -5587,7 +5611,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [] @@ -5658,7 +5682,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [] @@ -5763,7 +5787,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [] @@ -5834,7 +5858,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [] @@ -5919,7 +5943,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [] @@ -6029,7 +6053,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [] @@ -6141,7 +6165,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [] @@ -6251,7 +6275,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [] @@ -6363,7 +6387,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [] @@ -6473,7 +6497,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [] @@ -6585,7 +6609,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [] @@ -6705,7 +6729,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [] @@ -6827,7 +6851,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [] @@ -6949,7 +6973,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [] @@ -7073,7 +7097,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [] @@ -7195,7 +7219,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [] @@ -7319,7 +7343,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [] @@ -7429,7 +7453,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [] @@ -7541,7 +7565,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [] @@ -7678,7 +7702,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [] @@ -7801,7 +7825,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [] @@ -7919,7 +7943,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [] @@ -8029,7 +8053,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [] @@ -8170,7 +8194,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [] @@ -8243,7 +8267,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [] @@ -8323,7 +8347,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [] @@ -8430,7 +8454,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [] @@ -8515,7 +8539,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { @@ -8680,7 +8704,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { @@ -8799,7 +8823,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [] @@ -8895,7 +8919,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [] @@ -8985,7 +9009,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [] @@ -9078,7 +9102,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { @@ -9215,7 +9239,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [] @@ -9315,7 +9339,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [] @@ -9395,7 +9419,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listRowLogs" }, "auth": { "Project": [] @@ -9488,7 +9512,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [] @@ -9598,7 +9622,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [] @@ -9705,7 +9729,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [] @@ -9788,7 +9812,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [] @@ -9919,7 +9943,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [] @@ -9992,7 +10016,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [] @@ -10070,7 +10094,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listLogs" + "replaceWith": "grids.listTableLogs" }, "auth": { "Project": [] @@ -10152,7 +10176,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getUsage" + "replaceWith": "grids.getTableUsage" }, "auth": { "Project": [] @@ -14883,7 +14907,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "listLogs", "group": "logs", @@ -14900,6 +14924,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + }, "methods": [ { "name": "listLogs", @@ -14941,7 +14969,7 @@ "model": "#\/definitions\/logList" } ], - "description": "Get the database activity logs list by its unique ID." + "description": "" } ], "auth": { @@ -14997,7 +15025,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "getDatabaseUsage", "group": null, @@ -15014,6 +15042,10 @@ "console" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + }, "methods": [ { "name": "getDatabaseUsage", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index ed8068ad87..22d88b4044 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -4205,7 +4205,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "list", "group": "databases", @@ -4222,6 +4222,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + }, "methods": [ { "name": "list", @@ -4320,7 +4324,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "create", "group": "databases", @@ -4337,6 +4341,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + }, "methods": [ { "name": "create", @@ -4453,7 +4461,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "get", "group": "databases", @@ -4470,6 +4478,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + }, "methods": [ { "name": "get", @@ -4557,7 +4569,7 @@ } } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "update", "group": "databases", @@ -4574,6 +4586,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + }, "methods": [ { "name": "update", @@ -4686,7 +4702,7 @@ "description": "No content" } }, - "deprecated": false, + "deprecated": true, "x-appwrite": { "method": "delete", "group": "databases", @@ -4703,6 +4719,10 @@ "server" ], "packaging": false, + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + }, "methods": [ { "name": "delete", @@ -4807,7 +4827,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.list" + "replaceWith": "grids.listTables" }, "auth": { "Project": [], @@ -4892,7 +4912,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.create" + "replaceWith": "grids.createTable" }, "auth": { "Project": [], @@ -5002,7 +5022,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.get" + "replaceWith": "grids.getTable" }, "auth": { "Project": [], @@ -5074,7 +5094,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.update" + "replaceWith": "grids.updateTable" }, "auth": { "Project": [], @@ -5180,7 +5200,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.delete" + "replaceWith": "grids.deleteTable" }, "auth": { "Project": [], @@ -5252,7 +5272,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listColumns" + "replaceWith": "grids.listColumns" }, "auth": { "Project": [], @@ -5338,7 +5358,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createBooleanColumn" + "replaceWith": "grids.createBooleanColumn" }, "auth": { "Project": [], @@ -5449,7 +5469,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateBooleanColumn" + "replaceWith": "grids.updateBooleanColumn" }, "auth": { "Project": [], @@ -5562,7 +5582,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createDatetimeColumn" + "replaceWith": "grids.createDatetimeColumn" }, "auth": { "Project": [], @@ -5673,7 +5693,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateDatetimeColumn" + "replaceWith": "grids.updateDatetimeColumn" }, "auth": { "Project": [], @@ -5786,7 +5806,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEmailColumn" + "replaceWith": "grids.createEmailColumn" }, "auth": { "Project": [], @@ -5897,7 +5917,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEmailColumn" + "replaceWith": "grids.updateEmailColumn" }, "auth": { "Project": [], @@ -6010,7 +6030,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createEnumColumn" + "replaceWith": "grids.createEnumColumn" }, "auth": { "Project": [], @@ -6131,7 +6151,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateEnumColumn" + "replaceWith": "grids.updateEnumColumn" }, "auth": { "Project": [], @@ -6254,7 +6274,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createFloatColumn" + "replaceWith": "grids.createFloatColumn" }, "auth": { "Project": [], @@ -6377,7 +6397,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateFloatColumn" + "replaceWith": "grids.updateFloatColumn" }, "auth": { "Project": [], @@ -6502,7 +6522,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIntegerColumn" + "replaceWith": "grids.createIntegerColumn" }, "auth": { "Project": [], @@ -6625,7 +6645,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIntegerColumn" + "replaceWith": "grids.updateIntegerColumn" }, "auth": { "Project": [], @@ -6750,7 +6770,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIpColumn" + "replaceWith": "grids.createIpColumn" }, "auth": { "Project": [], @@ -6861,7 +6881,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateIpColumn" + "replaceWith": "grids.updateIpColumn" }, "auth": { "Project": [], @@ -6974,7 +6994,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRelationshipColumn" + "replaceWith": "grids.createRelationshipColumn" }, "auth": { "Project": [], @@ -7112,7 +7132,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createStringColumn" + "replaceWith": "grids.createStringColumn" }, "auth": { "Project": [], @@ -7236,7 +7256,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateStringColumn" + "replaceWith": "grids.updateStringColumn" }, "auth": { "Project": [], @@ -7355,7 +7375,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createUrlColumn" + "replaceWith": "grids.createUrlColumn" }, "auth": { "Project": [], @@ -7466,7 +7486,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateUrlColumn" + "replaceWith": "grids.updateUrlColumn" }, "auth": { "Project": [], @@ -7608,7 +7628,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getColumn" + "replaceWith": "grids.getColumn" }, "auth": { "Project": [], @@ -7682,7 +7702,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteColumn" + "replaceWith": "grids.deleteColumn" }, "auth": { "Project": [], @@ -7763,7 +7783,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRelationshipColumn" + "replaceWith": "grids.updateRelationshipColumn" }, "auth": { "Project": [], @@ -7871,7 +7891,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listRows" + "replaceWith": "grids.listRows" }, "auth": { "Project": [], @@ -7958,7 +7978,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createRow" + "replaceWith": "grids.createRow" }, "methods": [ { @@ -8127,7 +8147,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRows" + "replaceWith": "grids.upsertRows" }, "methods": [ { @@ -8248,7 +8268,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRows" + "replaceWith": "grids.updateRows" }, "auth": { "Project": [], @@ -8345,7 +8365,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRows" + "replaceWith": "grids.deleteRows" }, "auth": { "Project": [], @@ -8436,7 +8456,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getRow" + "replaceWith": "grids.getRow" }, "auth": { "Project": [], @@ -8531,7 +8551,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.upsertRow" + "replaceWith": "grids.upsertRow" }, "methods": [ { @@ -8671,7 +8691,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.updateRow" + "replaceWith": "grids.updateRow" }, "auth": { "Project": [], @@ -8773,7 +8793,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteRow" + "replaceWith": "grids.deleteRow" }, "auth": { "Project": [], @@ -8858,7 +8878,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.decrementRowColumn" + "replaceWith": "grids.decrementRowColumn" }, "auth": { "Project": [], @@ -8969,7 +8989,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.incrementRowColumn" + "replaceWith": "grids.incrementRowColumn" }, "auth": { "Project": [], @@ -9077,7 +9097,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.listIndexes" + "replaceWith": "grids.listIndexes" }, "auth": { "Project": [], @@ -9161,7 +9181,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.createIndex" + "replaceWith": "grids.createIndex" }, "auth": { "Project": [], @@ -9293,7 +9313,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.getIndex" + "replaceWith": "grids.getIndex" }, "auth": { "Project": [], @@ -9367,7 +9387,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tables.deleteIndex" + "replaceWith": "grids.deleteIndex" }, "auth": { "Project": [], From c71ff3542fcc5019240b7cdc2e6a1157d1fdd201 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 19:19:14 +0530 Subject: [PATCH 302/362] fix: deprecation inheritance on other methods with different namespace. --- src/Appwrite/SDK/Specification/Format/OpenAPI3.php | 8 ++++++++ src/Appwrite/SDK/Specification/Format/Swagger2.php | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index a9991d7b03..98c33b8ae0 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -223,6 +223,14 @@ class OpenAPI3 extends Format 'description' => ($desc) ? \file_get_contents($desc) : '', ]; + // add deprecation only if method has it! + if ($methodObj->getDeprecated() instanceof Deprecated) { + $additionalMethod['deprecated'] = [ + 'since' => $methodObj->getDeprecated()->getSince(), + 'replaceWith' => $methodObj->getDeprecated()->getReplaceWith(), + ]; + } + // If additional method has no parameters, inherit from route if (empty($methodObj->getParameters())) { foreach ($route->getParams() as $name => $param) { diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 305a10b34b..96f7b96f06 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -232,6 +232,14 @@ class Swagger2 extends Format 'description' => ($desc) ? \file_get_contents($desc) : '', ]; + // add deprecation only if method has it! + if ($methodObj->getDeprecated() instanceof Deprecated) { + $additionalMethod['deprecated'] = [ + 'since' => $methodObj->getDeprecated()->getSince(), + 'replaceWith' => $methodObj->getDeprecated()->getReplaceWith(), + ]; + } + // If additional method has no parameters, inherit from route if (empty($methodObj->getParameters())) { foreach ($route->getParams() as $name => $param) { From be3d91d5418784dcefc54e0b5a565df5bc817f73 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Sun, 27 Jul 2025 19:20:21 +0530 Subject: [PATCH 303/362] regen: specs. --- app/config/specs/open-api3-1.8.x-client.json | 12 +++- app/config/specs/open-api3-1.8.x-console.json | 72 +++++++++++++++---- app/config/specs/open-api3-1.8.x-server.json | 54 +++++++++++--- app/config/specs/open-api3-latest-client.json | 12 +++- .../specs/open-api3-latest-console.json | 72 +++++++++++++++---- app/config/specs/open-api3-latest-server.json | 54 +++++++++++--- app/config/specs/swagger2-1.8.x-client.json | 12 +++- app/config/specs/swagger2-1.8.x-console.json | 72 +++++++++++++++---- app/config/specs/swagger2-1.8.x-server.json | 54 +++++++++++--- app/config/specs/swagger2-latest-client.json | 12 +++- app/config/specs/swagger2-latest-console.json | 72 +++++++++++++++---- app/config/specs/swagger2-latest-server.json | 54 +++++++++++--- 12 files changed, 460 insertions(+), 92 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 39e3f4da59..69cdf83180 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -4496,7 +4496,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } } ], "auth": { @@ -4739,7 +4743,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { 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 d5bf0ee5ad..4ee19cd594 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -4578,7 +4578,11 @@ "model": "#\/components\/schemas\/databaseList" } ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } }, { "name": "listDatabases", @@ -4699,7 +4703,11 @@ "model": "#\/components\/schemas\/database" } ], - "description": "Create a new Database.\n" + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + } }, { "name": "createDatabase", @@ -4825,7 +4833,11 @@ "model": "#\/components\/schemas\/usageDatabases" } ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + } }, { "name": "listDatabaseUsage", @@ -4941,7 +4953,11 @@ "model": "#\/components\/schemas\/database" } ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } }, { "name": "getDatabase", @@ -5049,7 +5065,11 @@ "model": "#\/components\/schemas\/database" } ], - "description": "Update a database by its unique ID." + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } }, { "name": "updateDatabase", @@ -5173,7 +5193,11 @@ "code": 204 } ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } }, { "name": "deleteDatabase", @@ -8447,7 +8471,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", @@ -8471,7 +8499,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -8609,7 +8641,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -9027,7 +9063,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -15014,7 +15054,11 @@ "model": "#\/components\/schemas\/logList" } ], - "description": "Get the database activity logs list by its unique ID." + "description": "Get the database activity logs list by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + } }, { "name": "listDatabaseLogs", @@ -15135,7 +15179,11 @@ "model": "#\/components\/schemas\/usageDatabase" } ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + } }, { "name": "getDatabaseUsage", 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 c34a486a61..639817ac35 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -4097,7 +4097,11 @@ "model": "#\/components\/schemas\/databaseList" } ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } }, { "name": "listDatabases", @@ -4221,7 +4225,11 @@ "model": "#\/components\/schemas\/database" } ], - "description": "Create a new Database.\n" + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + } }, { "name": "createDatabase", @@ -4352,7 +4360,11 @@ "model": "#\/components\/schemas\/database" } ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } }, { "name": "getDatabase", @@ -4463,7 +4475,11 @@ "model": "#\/components\/schemas\/database" } ], - "description": "Update a database by its unique ID." + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } }, { "name": "updateDatabase", @@ -4590,7 +4606,11 @@ "code": 204 } ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } }, { "name": "deleteDatabase", @@ -7897,7 +7917,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", @@ -7922,7 +7946,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -8063,7 +8091,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -8487,7 +8519,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 39e3f4da59..69cdf83180 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4496,7 +4496,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } } ], "auth": { @@ -4739,7 +4743,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index d5bf0ee5ad..4ee19cd594 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4578,7 +4578,11 @@ "model": "#\/components\/schemas\/databaseList" } ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } }, { "name": "listDatabases", @@ -4699,7 +4703,11 @@ "model": "#\/components\/schemas\/database" } ], - "description": "Create a new Database.\n" + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + } }, { "name": "createDatabase", @@ -4825,7 +4833,11 @@ "model": "#\/components\/schemas\/usageDatabases" } ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + } }, { "name": "listDatabaseUsage", @@ -4941,7 +4953,11 @@ "model": "#\/components\/schemas\/database" } ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } }, { "name": "getDatabase", @@ -5049,7 +5065,11 @@ "model": "#\/components\/schemas\/database" } ], - "description": "Update a database by its unique ID." + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } }, { "name": "updateDatabase", @@ -5173,7 +5193,11 @@ "code": 204 } ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } }, { "name": "deleteDatabase", @@ -8447,7 +8471,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", @@ -8471,7 +8499,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -8609,7 +8641,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -9027,7 +9063,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -15014,7 +15054,11 @@ "model": "#\/components\/schemas\/logList" } ], - "description": "Get the database activity logs list by its unique ID." + "description": "Get the database activity logs list by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + } }, { "name": "listDatabaseLogs", @@ -15135,7 +15179,11 @@ "model": "#\/components\/schemas\/usageDatabase" } ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + } }, { "name": "getDatabaseUsage", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index c34a486a61..639817ac35 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -4097,7 +4097,11 @@ "model": "#\/components\/schemas\/databaseList" } ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } }, { "name": "listDatabases", @@ -4221,7 +4225,11 @@ "model": "#\/components\/schemas\/database" } ], - "description": "Create a new Database.\n" + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + } }, { "name": "createDatabase", @@ -4352,7 +4360,11 @@ "model": "#\/components\/schemas\/database" } ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } }, { "name": "getDatabase", @@ -4463,7 +4475,11 @@ "model": "#\/components\/schemas\/database" } ], - "description": "Update a database by its unique ID." + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } }, { "name": "updateDatabase", @@ -4590,7 +4606,11 @@ "code": 204 } ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } }, { "name": "deleteDatabase", @@ -7897,7 +7917,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", @@ -7922,7 +7946,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -8063,7 +8091,11 @@ "model": "#\/components\/schemas\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -8487,7 +8519,11 @@ "model": "#\/components\/schemas\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 13b8fc3404..21264f2afb 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -4633,7 +4633,11 @@ "model": "#\/definitions\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } } ], "auth": { @@ -4867,7 +4871,11 @@ "model": "#\/definitions\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 4a19acfef4..c8597b8b80 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -4738,7 +4738,11 @@ "model": "#\/definitions\/databaseList" } ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } }, { "name": "listDatabases", @@ -4858,7 +4862,11 @@ "model": "#\/definitions\/database" } ], - "description": "Create a new Database.\n" + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + } }, { "name": "createDatabase", @@ -4987,7 +4995,11 @@ "model": "#\/definitions\/usageDatabases" } ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + } }, { "name": "listDatabaseUsage", @@ -5101,7 +5113,11 @@ "model": "#\/definitions\/database" } ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } }, { "name": "getDatabase", @@ -5209,7 +5225,11 @@ "model": "#\/definitions\/database" } ], - "description": "Update a database by its unique ID." + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } }, { "name": "updateDatabase", @@ -5335,7 +5355,11 @@ "code": 204 } ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } }, { "name": "deleteDatabase", @@ -8567,7 +8591,11 @@ "model": "#\/definitions\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", @@ -8591,7 +8619,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -8729,7 +8761,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -9130,7 +9166,11 @@ "model": "#\/definitions\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -14948,7 +14988,11 @@ "model": "#\/definitions\/logList" } ], - "description": "Get the database activity logs list by its unique ID." + "description": "Get the database activity logs list by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + } }, { "name": "listDatabaseLogs", @@ -15066,7 +15110,11 @@ "model": "#\/definitions\/usageDatabase" } ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + } }, { "name": "getDatabaseUsage", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 22d88b4044..a7f93152d1 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -4245,7 +4245,11 @@ "model": "#\/definitions\/databaseList" } ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } }, { "name": "listDatabases", @@ -4368,7 +4372,11 @@ "model": "#\/definitions\/database" } ], - "description": "Create a new Database.\n" + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + } }, { "name": "createDatabase", @@ -4502,7 +4510,11 @@ "model": "#\/definitions\/database" } ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } }, { "name": "getDatabase", @@ -4613,7 +4625,11 @@ "model": "#\/definitions\/database" } ], - "description": "Update a database by its unique ID." + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } }, { "name": "updateDatabase", @@ -4742,7 +4758,11 @@ "code": 204 } ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } }, { "name": "deleteDatabase", @@ -8007,7 +8027,11 @@ "model": "#\/definitions\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", @@ -8032,7 +8056,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -8173,7 +8201,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -8580,7 +8612,11 @@ "model": "#\/definitions\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 13b8fc3404..21264f2afb 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4633,7 +4633,11 @@ "model": "#\/definitions\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } } ], "auth": { @@ -4867,7 +4871,11 @@ "model": "#\/definitions\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 4a19acfef4..c8597b8b80 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4738,7 +4738,11 @@ "model": "#\/definitions\/databaseList" } ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } }, { "name": "listDatabases", @@ -4858,7 +4862,11 @@ "model": "#\/definitions\/database" } ], - "description": "Create a new Database.\n" + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + } }, { "name": "createDatabase", @@ -4987,7 +4995,11 @@ "model": "#\/definitions\/usageDatabases" } ], - "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + "description": "List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections\/tables, documents\/rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseUsage" + } }, { "name": "listDatabaseUsage", @@ -5101,7 +5113,11 @@ "model": "#\/definitions\/database" } ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } }, { "name": "getDatabase", @@ -5209,7 +5225,11 @@ "model": "#\/definitions\/database" } ], - "description": "Update a database by its unique ID." + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } }, { "name": "updateDatabase", @@ -5335,7 +5355,11 @@ "code": 204 } ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } }, { "name": "deleteDatabase", @@ -8567,7 +8591,11 @@ "model": "#\/definitions\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", @@ -8591,7 +8619,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -8729,7 +8761,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -9130,7 +9166,11 @@ "model": "#\/definitions\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { @@ -14948,7 +14988,11 @@ "model": "#\/definitions\/logList" } ], - "description": "Get the database activity logs list by its unique ID." + "description": "Get the database activity logs list by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabaseLogs" + } }, { "name": "listDatabaseLogs", @@ -15066,7 +15110,11 @@ "model": "#\/definitions\/usageDatabase" } ], - "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days." + "description": "Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabaseUsage" + } }, { "name": "getDatabaseUsage", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 22d88b4044..a7f93152d1 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -4245,7 +4245,11 @@ "model": "#\/definitions\/databaseList" } ], - "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results." + "description": "Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.listDatabases" + } }, { "name": "listDatabases", @@ -4368,7 +4372,11 @@ "model": "#\/definitions\/database" } ], - "description": "Create a new Database.\n" + "description": "Create a new Database.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createDatabase" + } }, { "name": "createDatabase", @@ -4502,7 +4510,11 @@ "model": "#\/definitions\/database" } ], - "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata." + "description": "Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.getDatabase" + } }, { "name": "getDatabase", @@ -4613,7 +4625,11 @@ "model": "#\/definitions\/database" } ], - "description": "Update a database by its unique ID." + "description": "Update a database by its unique ID.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.updateDatabase" + } }, { "name": "updateDatabase", @@ -4742,7 +4758,11 @@ "code": 204 } ], - "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database." + "description": "Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.deleteDatabase" + } }, { "name": "deleteDatabase", @@ -8007,7 +8027,11 @@ "model": "#\/definitions\/document" } ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRow" + } }, { "name": "createDocuments", @@ -8032,7 +8056,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.createRows" + } } ], "auth": { @@ -8173,7 +8201,11 @@ "model": "#\/definitions\/documentList" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRows" + } } ], "auth": { @@ -8580,7 +8612,11 @@ "model": "#\/definitions\/document" } ], - "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate or update a Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.", + "deprecated": { + "since": "1.8.0", + "replaceWith": "grids.upsertRow" + } } ], "auth": { From 4adff285405192dd05ca3ca42f85c7c8a1f33683 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Mon, 28 Jul 2025 15:02:01 +1200 Subject: [PATCH 304/362] Update migration --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index c092b802e4..1142ccdbd1 100644 --- a/composer.lock +++ b/composer.lock @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.13.3", + "version": "0.13.4", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "cf6b192f78dacfa06b659646c228b203212b3c6b" + "reference": "e0e351b073e216e54bcb27bcadaa6b3e6fe77e60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/cf6b192f78dacfa06b659646c228b203212b3c6b", - "reference": "cf6b192f78dacfa06b659646c228b203212b3c6b", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/e0e351b073e216e54bcb27bcadaa6b3e6fe77e60", + "reference": "e0e351b073e216e54bcb27bcadaa6b3e6fe77e60", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.13.3" + "source": "https://github.com/utopia-php/migration/tree/0.13.4" }, - "time": "2025-07-23T08:02:04+00:00" + "time": "2025-07-28T02:43:54+00:00" }, { "name": "utopia-php/orchestration", @@ -5336,16 +5336,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.5.0", + "version": "v5.6.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "ae59794362fe85e051a58ad36b289443f57be7a9" + "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ae59794362fe85e051a58ad36b289443f57be7a9", - "reference": "ae59794362fe85e051a58ad36b289443f57be7a9", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56", + "reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56", "shasum": "" }, "require": { @@ -5388,9 +5388,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.5.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.0" }, - "time": "2025-05-31T08:24:38+00:00" + "time": "2025-07-27T20:03:57+00:00" }, { "name": "phar-io/manifest", From 00290bdb6534d3db97453d2ccbcb0bca44463e27 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 28 Jul 2025 11:46:43 +0530 Subject: [PATCH 305/362] reset: docs for easier review. --- .../client-android/java/tables/create-row.md | 28 ++++++++++++++++ .../client-android/java/tables/create-rows.md | 25 ++++++++++++++ .../client-android/java/tables/delete-row.md | 24 ++++++++++++++ .../client-android/java/tables/get-row.md | 25 ++++++++++++++ .../client-android/java/tables/list-rows.md | 24 ++++++++++++++ .../client-android/java/tables/update-row.md | 26 +++++++++++++++ .../client-android/java/tables/upsert-row.md | 26 +++++++++++++++ .../kotlin/tables/create-row.md | 19 +++++++++++ .../kotlin/tables/create-rows.md | 16 +++++++++ .../kotlin/tables/delete-row.md | 15 +++++++++ .../client-android/kotlin/tables/get-row.md | 16 +++++++++ .../client-android/kotlin/tables/list-rows.md | 15 +++++++++ .../kotlin/tables/update-row.md | 17 ++++++++++ .../kotlin/tables/upsert-row.md | 17 ++++++++++ .../examples/tables/create-row.md | 18 ++++++++++ .../examples/tables/create-rows.md | 15 +++++++++ .../examples/tables/delete-row.md | 14 ++++++++ .../client-apple/examples/tables/get-row.md | 15 +++++++++ .../client-apple/examples/tables/list-rows.md | 14 ++++++++ .../examples/tables/update-row.md | 16 +++++++++ .../examples/tables/upsert-row.md | 16 +++++++++ .../examples/tables/create-row.md | 17 ++++++++++ .../examples/tables/create-rows.md | 14 ++++++++ .../examples/tables/delete-row.md | 13 ++++++++ .../client-flutter/examples/tables/get-row.md | 14 ++++++++ .../examples/tables/list-rows.md | 13 ++++++++ .../examples/tables/update-row.md | 15 +++++++++ .../examples/tables/upsert-row.md | 15 +++++++++ .../examples/tables/create-row.md | 18 ++++++++++ .../examples/tables/create-rows.md | 19 +++++++++++ .../examples/tables/delete-row.md | 9 +++++ .../client-graphql/examples/tables/get-row.md | 0 .../examples/tables/list-rows.md | 0 .../examples/tables/update-row.md | 18 ++++++++++ .../examples/tables/upsert-row.md | 16 +++++++++ .../examples/tables/create-row.md | 19 +++++++++++ .../examples/tables/create-rows.md | 16 +++++++++ .../examples/tables/delete-row.md | 15 +++++++++ .../examples/tables/get-row.md | 16 +++++++++ .../examples/tables/list-rows.md | 15 +++++++++ .../examples/tables/update-row.md | 17 ++++++++++ .../examples/tables/upsert-row.md | 17 ++++++++++ .../client-rest/examples/tables/create-row.md | 13 ++++++++ .../examples/tables/create-rows.md | 11 +++++++ .../client-rest/examples/tables/delete-row.md | 8 +++++ .../client-rest/examples/tables/get-row.md | 6 ++++ .../client-rest/examples/tables/list-rows.md | 6 ++++ .../client-rest/examples/tables/update-row.md | 12 +++++++ .../client-rest/examples/tables/upsert-row.md | 8 +++++ .../client-web/examples/tables/create-row.md | 19 +++++++++++ .../client-web/examples/tables/create-rows.md | 16 +++++++++ .../client-web/examples/tables/delete-row.md | 15 +++++++++ .../client-web/examples/tables/get-row.md | 16 +++++++++ .../client-web/examples/tables/list-rows.md | 15 +++++++++ .../client-web/examples/tables/update-row.md | 17 ++++++++++ .../client-web/examples/tables/upsert-row.md | 17 ++++++++++ .../examples/tables/create-boolean-column.md | 7 ++++ .../examples/tables/create-datetime-column.md | 7 ++++ .../examples/tables/create-email-column.md | 7 ++++ .../examples/tables/create-enum-column.md | 8 +++++ .../examples/tables/create-float-column.md | 9 +++++ .../examples/tables/create-index.md | 8 +++++ .../examples/tables/create-integer-column.md | 9 +++++ .../examples/tables/create-ip-column.md | 7 ++++ .../tables/create-relationship-column.md | 9 +++++ .../console-cli/examples/tables/create-row.md | 6 ++++ .../examples/tables/create-rows.md | 4 +++ .../examples/tables/create-string-column.md | 9 +++++ .../examples/tables/create-url-column.md | 7 ++++ .../console-cli/examples/tables/create.md | 7 ++++ .../examples/tables/decrement-row-column.md | 7 ++++ .../examples/tables/delete-column.md | 4 +++ .../examples/tables/delete-index.md | 4 +++ .../console-cli/examples/tables/delete-row.md | 4 +++ .../examples/tables/delete-rows.md | 4 +++ .../console-cli/examples/tables/delete.md | 3 ++ .../console-cli/examples/tables/get-column.md | 4 +++ .../console-cli/examples/tables/get-index.md | 4 +++ .../console-cli/examples/tables/get-row.md | 5 +++ .../examples/tables/get-table-usage.md | 4 +++ .../console-cli/examples/tables/get-usage.md | 4 +++ .../1.8.x/console-cli/examples/tables/get.md | 3 ++ .../examples/tables/increment-row-column.md | 7 ++++ .../examples/tables/list-columns.md | 4 +++ .../examples/tables/list-indexes.md | 4 +++ .../console-cli/examples/tables/list-logs.md | 4 +++ .../examples/tables/list-row-logs.md | 5 +++ .../console-cli/examples/tables/list-rows.md | 4 +++ .../1.8.x/console-cli/examples/tables/list.md | 4 +++ .../examples/tables/update-boolean-column.md | 7 ++++ .../examples/tables/update-datetime-column.md | 7 ++++ .../examples/tables/update-email-column.md | 7 ++++ .../examples/tables/update-enum-column.md | 8 +++++ .../examples/tables/update-float-column.md | 9 +++++ .../examples/tables/update-integer-column.md | 9 +++++ .../examples/tables/update-ip-column.md | 7 ++++ .../tables/update-relationship-column.md | 6 ++++ .../console-cli/examples/tables/update-row.md | 6 ++++ .../examples/tables/update-rows.md | 5 +++ .../examples/tables/update-string-column.md | 8 +++++ .../examples/tables/update-url-column.md | 7 ++++ .../console-cli/examples/tables/update.md | 7 ++++ .../console-cli/examples/tables/upsert-row.md | 4 +++ .../examples/tables/upsert-rows.md | 3 ++ .../examples/tables/create-boolean-column.md | 18 ++++++++++ .../examples/tables/create-datetime-column.md | 18 ++++++++++ .../examples/tables/create-email-column.md | 18 ++++++++++ .../examples/tables/create-enum-column.md | 19 +++++++++++ .../examples/tables/create-float-column.md | 20 +++++++++++ .../examples/tables/create-index.md | 19 +++++++++++ .../examples/tables/create-integer-column.md | 20 +++++++++++ .../examples/tables/create-ip-column.md | 18 ++++++++++ .../tables/create-relationship-column.md | 20 +++++++++++ .../console-web/examples/tables/create-row.md | 19 +++++++++++ .../examples/tables/create-rows.md | 16 +++++++++ .../examples/tables/create-string-column.md | 20 +++++++++++ .../examples/tables/create-url-column.md | 18 ++++++++++ .../console-web/examples/tables/create.md | 18 ++++++++++ .../examples/tables/decrement-row-column.md | 18 ++++++++++ .../examples/tables/delete-column.md | 15 +++++++++ .../examples/tables/delete-index.md | 15 +++++++++ .../console-web/examples/tables/delete-row.md | 15 +++++++++ .../examples/tables/delete-rows.md | 15 +++++++++ .../console-web/examples/tables/delete.md | 14 ++++++++ .../console-web/examples/tables/get-column.md | 15 +++++++++ .../console-web/examples/tables/get-index.md | 15 +++++++++ .../console-web/examples/tables/get-row.md | 16 +++++++++ .../examples/tables/get-table-usage.md | 15 +++++++++ .../console-web/examples/tables/get-usage.md | 15 +++++++++ .../1.8.x/console-web/examples/tables/get.md | 14 ++++++++ .../examples/tables/increment-row-column.md | 18 ++++++++++ .../examples/tables/list-columns.md | 15 +++++++++ .../examples/tables/list-indexes.md | 15 +++++++++ .../console-web/examples/tables/list-logs.md | 15 +++++++++ .../examples/tables/list-row-logs.md | 16 +++++++++ .../console-web/examples/tables/list-rows.md | 15 +++++++++ .../1.8.x/console-web/examples/tables/list.md | 15 +++++++++ .../examples/tables/update-boolean-column.md | 18 ++++++++++ .../examples/tables/update-datetime-column.md | 18 ++++++++++ .../examples/tables/update-email-column.md | 18 ++++++++++ .../examples/tables/update-enum-column.md | 19 +++++++++++ .../examples/tables/update-float-column.md | 20 +++++++++++ .../examples/tables/update-integer-column.md | 20 +++++++++++ .../examples/tables/update-ip-column.md | 18 ++++++++++ .../tables/update-relationship-column.md | 17 ++++++++++ .../console-web/examples/tables/update-row.md | 17 ++++++++++ .../examples/tables/update-rows.md | 16 +++++++++ .../examples/tables/update-string-column.md | 19 +++++++++++ .../examples/tables/update-url-column.md | 18 ++++++++++ .../console-web/examples/tables/update.md | 18 ++++++++++ .../console-web/examples/tables/upsert-row.md | 17 ++++++++++ .../examples/tables/upsert-rows.md | 15 +++++++++ .../examples/tables/create-boolean-column.md | 17 ++++++++++ .../examples/tables/create-datetime-column.md | 17 ++++++++++ .../examples/tables/create-email-column.md | 17 ++++++++++ .../examples/tables/create-enum-column.md | 18 ++++++++++ .../examples/tables/create-float-column.md | 19 +++++++++++ .../examples/tables/create-index.md | 18 ++++++++++ .../examples/tables/create-integer-column.md | 19 +++++++++++ .../examples/tables/create-ip-column.md | 17 ++++++++++ .../tables/create-relationship-column.md | 19 +++++++++++ .../server-dart/examples/tables/create-row.md | 17 ++++++++++ .../examples/tables/create-rows.md | 14 ++++++++ .../examples/tables/create-string-column.md | 19 +++++++++++ .../examples/tables/create-url-column.md | 17 ++++++++++ .../server-dart/examples/tables/create.md | 17 ++++++++++ .../examples/tables/decrement-row-column.md | 17 ++++++++++ .../examples/tables/delete-column.md | 14 ++++++++ .../examples/tables/delete-index.md | 14 ++++++++ .../server-dart/examples/tables/delete-row.md | 14 ++++++++ .../examples/tables/delete-rows.md | 14 ++++++++ .../server-dart/examples/tables/delete.md | 13 ++++++++ .../server-dart/examples/tables/get-column.md | 14 ++++++++ .../server-dart/examples/tables/get-index.md | 14 ++++++++ .../server-dart/examples/tables/get-row.md | 15 +++++++++ .../1.8.x/server-dart/examples/tables/get.md | 13 ++++++++ .../examples/tables/increment-row-column.md | 17 ++++++++++ .../examples/tables/list-columns.md | 14 ++++++++ .../examples/tables/list-indexes.md | 14 ++++++++ .../server-dart/examples/tables/list-rows.md | 14 ++++++++ .../1.8.x/server-dart/examples/tables/list.md | 14 ++++++++ .../examples/tables/update-boolean-column.md | 17 ++++++++++ .../examples/tables/update-datetime-column.md | 17 ++++++++++ .../examples/tables/update-email-column.md | 17 ++++++++++ .../examples/tables/update-enum-column.md | 18 ++++++++++ .../examples/tables/update-float-column.md | 19 +++++++++++ .../examples/tables/update-integer-column.md | 19 +++++++++++ .../examples/tables/update-ip-column.md | 17 ++++++++++ .../tables/update-relationship-column.md | 16 +++++++++ .../server-dart/examples/tables/update-row.md | 16 +++++++++ .../examples/tables/update-rows.md | 15 +++++++++ .../examples/tables/update-string-column.md | 18 ++++++++++ .../examples/tables/update-url-column.md | 17 ++++++++++ .../server-dart/examples/tables/update.md | 17 ++++++++++ .../server-dart/examples/tables/upsert-row.md | 15 +++++++++ .../examples/tables/upsert-rows.md | 13 ++++++++ .../examples/tables/create-boolean-column.md | 17 ++++++++++ .../examples/tables/create-datetime-column.md | 17 ++++++++++ .../examples/tables/create-email-column.md | 17 ++++++++++ .../examples/tables/create-enum-column.md | 18 ++++++++++ .../examples/tables/create-float-column.md | 19 +++++++++++ .../examples/tables/create-index.md | 18 ++++++++++ .../examples/tables/create-integer-column.md | 19 +++++++++++ .../examples/tables/create-ip-column.md | 17 ++++++++++ .../tables/create-relationship-column.md | 19 +++++++++++ .../server-deno/examples/tables/create-row.md | 17 ++++++++++ .../examples/tables/create-rows.md | 14 ++++++++ .../examples/tables/create-string-column.md | 19 +++++++++++ .../examples/tables/create-url-column.md | 17 ++++++++++ .../server-deno/examples/tables/create.md | 17 ++++++++++ .../examples/tables/decrement-row-column.md | 17 ++++++++++ .../examples/tables/delete-column.md | 14 ++++++++ .../examples/tables/delete-index.md | 14 ++++++++ .../server-deno/examples/tables/delete-row.md | 14 ++++++++ .../examples/tables/delete-rows.md | 14 ++++++++ .../server-deno/examples/tables/delete.md | 13 ++++++++ .../server-deno/examples/tables/get-column.md | 14 ++++++++ .../server-deno/examples/tables/get-index.md | 14 ++++++++ .../server-deno/examples/tables/get-row.md | 15 +++++++++ .../1.8.x/server-deno/examples/tables/get.md | 13 ++++++++ .../examples/tables/increment-row-column.md | 17 ++++++++++ .../examples/tables/list-columns.md | 14 ++++++++ .../examples/tables/list-indexes.md | 14 ++++++++ .../server-deno/examples/tables/list-rows.md | 14 ++++++++ .../1.8.x/server-deno/examples/tables/list.md | 14 ++++++++ .../examples/tables/update-boolean-column.md | 17 ++++++++++ .../examples/tables/update-datetime-column.md | 17 ++++++++++ .../examples/tables/update-email-column.md | 17 ++++++++++ .../examples/tables/update-enum-column.md | 18 ++++++++++ .../examples/tables/update-float-column.md | 19 +++++++++++ .../examples/tables/update-integer-column.md | 19 +++++++++++ .../examples/tables/update-ip-column.md | 17 ++++++++++ .../tables/update-relationship-column.md | 16 +++++++++ .../server-deno/examples/tables/update-row.md | 16 +++++++++ .../examples/tables/update-rows.md | 15 +++++++++ .../examples/tables/update-string-column.md | 18 ++++++++++ .../examples/tables/update-url-column.md | 17 ++++++++++ .../server-deno/examples/tables/update.md | 17 ++++++++++ .../server-deno/examples/tables/upsert-row.md | 15 +++++++++ .../examples/tables/upsert-rows.md | 13 ++++++++ .../examples/tables/create-boolean-column.md | 19 +++++++++++ .../examples/tables/create-datetime-column.md | 19 +++++++++++ .../examples/tables/create-email-column.md | 19 +++++++++++ .../examples/tables/create-enum-column.md | 20 +++++++++++ .../examples/tables/create-float-column.md | 21 ++++++++++++ .../examples/tables/create-index.md | 21 ++++++++++++ .../examples/tables/create-integer-column.md | 21 ++++++++++++ .../examples/tables/create-ip-column.md | 19 +++++++++++ .../tables/create-relationship-column.md | 22 +++++++++++++ .../examples/tables/create-row.md | 19 +++++++++++ .../examples/tables/create-rows.md | 16 +++++++++ .../examples/tables/create-string-column.md | 21 ++++++++++++ .../examples/tables/create-url-column.md | 19 +++++++++++ .../server-dotnet/examples/tables/create.md | 19 +++++++++++ .../examples/tables/decrement-row-column.md | 19 +++++++++++ .../examples/tables/delete-column.md | 16 +++++++++ .../examples/tables/delete-index.md | 16 +++++++++ .../examples/tables/delete-row.md | 16 +++++++++ .../examples/tables/delete-rows.md | 16 +++++++++ .../server-dotnet/examples/tables/delete.md | 15 +++++++++ .../examples/tables/get-column.md | 16 +++++++++ .../examples/tables/get-index.md | 16 +++++++++ .../server-dotnet/examples/tables/get-row.md | 17 ++++++++++ .../server-dotnet/examples/tables/get.md | 15 +++++++++ .../examples/tables/increment-row-column.md | 19 +++++++++++ .../examples/tables/list-columns.md | 16 +++++++++ .../examples/tables/list-indexes.md | 16 +++++++++ .../examples/tables/list-rows.md | 16 +++++++++ .../server-dotnet/examples/tables/list.md | 16 +++++++++ .../examples/tables/update-boolean-column.md | 19 +++++++++++ .../examples/tables/update-datetime-column.md | 19 +++++++++++ .../examples/tables/update-email-column.md | 19 +++++++++++ .../examples/tables/update-enum-column.md | 20 +++++++++++ .../examples/tables/update-float-column.md | 21 ++++++++++++ .../examples/tables/update-integer-column.md | 21 ++++++++++++ .../examples/tables/update-ip-column.md | 19 +++++++++++ .../tables/update-relationship-column.md | 19 +++++++++++ .../examples/tables/update-row.md | 18 ++++++++++ .../examples/tables/update-rows.md | 17 ++++++++++ .../examples/tables/update-string-column.md | 20 +++++++++++ .../examples/tables/update-url-column.md | 19 +++++++++++ .../server-dotnet/examples/tables/update.md | 19 +++++++++++ .../examples/tables/upsert-row.md | 17 ++++++++++ .../examples/tables/upsert-rows.md | 15 +++++++++ .../examples/tables/create-boolean-column.md | 31 +++++++++++++++++ .../examples/tables/create-datetime-column.md | 31 +++++++++++++++++ .../examples/tables/create-email-column.md | 31 +++++++++++++++++ .../examples/tables/create-enum-column.md | 32 ++++++++++++++++++ .../examples/tables/create-float-column.md | 33 +++++++++++++++++++ .../server-go/examples/tables/create-index.md | 32 ++++++++++++++++++ .../examples/tables/create-integer-column.md | 33 +++++++++++++++++++ .../examples/tables/create-ip-column.md | 31 +++++++++++++++++ .../tables/create-relationship-column.md | 33 +++++++++++++++++++ .../server-go/examples/tables/create-row.md | 31 +++++++++++++++++ .../server-go/examples/tables/create-rows.md | 28 ++++++++++++++++ .../examples/tables/create-string-column.md | 33 +++++++++++++++++++ .../examples/tables/create-url-column.md | 31 +++++++++++++++++ .../1.8.x/server-go/examples/tables/create.md | 31 +++++++++++++++++ .../examples/tables/decrement-row-column.md | 31 +++++++++++++++++ .../examples/tables/delete-column.md | 28 ++++++++++++++++ .../server-go/examples/tables/delete-index.md | 28 ++++++++++++++++ .../server-go/examples/tables/delete-row.md | 28 ++++++++++++++++ .../server-go/examples/tables/delete-rows.md | 28 ++++++++++++++++ .../1.8.x/server-go/examples/tables/delete.md | 27 +++++++++++++++ .../server-go/examples/tables/get-column.md | 28 ++++++++++++++++ .../server-go/examples/tables/get-index.md | 28 ++++++++++++++++ .../server-go/examples/tables/get-row.md | 29 ++++++++++++++++ .../1.8.x/server-go/examples/tables/get.md | 27 +++++++++++++++ .../examples/tables/increment-row-column.md | 31 +++++++++++++++++ .../server-go/examples/tables/list-columns.md | 28 ++++++++++++++++ .../server-go/examples/tables/list-indexes.md | 28 ++++++++++++++++ .../server-go/examples/tables/list-rows.md | 28 ++++++++++++++++ .../1.8.x/server-go/examples/tables/list.md | 28 ++++++++++++++++ .../examples/tables/update-boolean-column.md | 31 +++++++++++++++++ .../examples/tables/update-datetime-column.md | 31 +++++++++++++++++ .../examples/tables/update-email-column.md | 31 +++++++++++++++++ .../examples/tables/update-enum-column.md | 32 ++++++++++++++++++ .../examples/tables/update-float-column.md | 33 +++++++++++++++++++ .../examples/tables/update-integer-column.md | 33 +++++++++++++++++++ .../examples/tables/update-ip-column.md | 31 +++++++++++++++++ .../tables/update-relationship-column.md | 30 +++++++++++++++++ .../server-go/examples/tables/update-row.md | 30 +++++++++++++++++ .../server-go/examples/tables/update-rows.md | 29 ++++++++++++++++ .../examples/tables/update-string-column.md | 32 ++++++++++++++++++ .../examples/tables/update-url-column.md | 31 +++++++++++++++++ .../1.8.x/server-go/examples/tables/update.md | 31 +++++++++++++++++ .../server-go/examples/tables/upsert-row.md | 29 ++++++++++++++++ .../server-go/examples/tables/upsert-rows.md | 27 +++++++++++++++ .../examples/tables/create-boolean-column.md | 20 +++++++++++ .../examples/tables/create-datetime-column.md | 21 ++++++++++++ .../examples/tables/create-email-column.md | 21 ++++++++++++ .../examples/tables/create-enum-column.md | 23 +++++++++++++ .../examples/tables/create-float-column.md | 24 ++++++++++++++ .../examples/tables/create-index.md | 21 ++++++++++++ .../examples/tables/create-integer-column.md | 24 ++++++++++++++ .../examples/tables/create-ip-column.md | 21 ++++++++++++ .../tables/create-relationship-column.md | 27 +++++++++++++++ .../examples/tables/create-row.md | 18 ++++++++++ .../examples/tables/create-rows.md | 19 +++++++++++ .../examples/tables/create-string-column.md | 24 ++++++++++++++ .../examples/tables/create-url-column.md | 21 ++++++++++++ .../server-graphql/examples/tables/create.md | 31 +++++++++++++++++ .../examples/tables/decrement-row-column.md | 19 +++++++++++ .../examples/tables/delete-column.md | 9 +++++ .../examples/tables/delete-index.md | 9 +++++ .../examples/tables/delete-row.md | 9 +++++ .../examples/tables/delete-rows.md | 19 +++++++++++ .../server-graphql/examples/tables/delete.md | 8 +++++ .../examples/tables/get-column.md | 0 .../examples/tables/get-index.md | 0 .../server-graphql/examples/tables/get-row.md | 0 .../server-graphql/examples/tables/get.md | 0 .../examples/tables/increment-row-column.md | 19 +++++++++++ .../examples/tables/list-columns.md | 0 .../examples/tables/list-indexes.md | 0 .../examples/tables/list-rows.md | 0 .../server-graphql/examples/tables/list.md | 0 .../examples/tables/update-boolean-column.md | 20 +++++++++++ .../examples/tables/update-datetime-column.md | 21 ++++++++++++ .../examples/tables/update-email-column.md | 21 ++++++++++++ .../examples/tables/update-enum-column.md | 23 +++++++++++++ .../examples/tables/update-float-column.md | 24 ++++++++++++++ .../examples/tables/update-integer-column.md | 24 ++++++++++++++ .../examples/tables/update-ip-column.md | 21 ++++++++++++ .../tables/update-relationship-column.md | 24 ++++++++++++++ .../examples/tables/update-row.md | 18 ++++++++++ .../examples/tables/update-rows.md | 20 +++++++++++ .../examples/tables/update-string-column.md | 23 +++++++++++++ .../examples/tables/update-url-column.md | 21 ++++++++++++ .../server-graphql/examples/tables/update.md | 31 +++++++++++++++++ .../examples/tables/upsert-row.md | 16 +++++++++ .../examples/tables/upsert-rows.md | 18 ++++++++++ .../java/tables/create-boolean-column.md | 28 ++++++++++++++++ .../java/tables/create-datetime-column.md | 28 ++++++++++++++++ .../java/tables/create-email-column.md | 28 ++++++++++++++++ .../java/tables/create-enum-column.md | 29 ++++++++++++++++ .../java/tables/create-float-column.md | 30 +++++++++++++++++ .../server-kotlin/java/tables/create-index.md | 30 +++++++++++++++++ .../java/tables/create-integer-column.md | 30 +++++++++++++++++ .../java/tables/create-ip-column.md | 28 ++++++++++++++++ .../java/tables/create-relationship-column.md | 31 +++++++++++++++++ .../server-kotlin/java/tables/create-row.md | 28 ++++++++++++++++ .../server-kotlin/java/tables/create-rows.md | 25 ++++++++++++++ .../java/tables/create-string-column.md | 30 +++++++++++++++++ .../java/tables/create-url-column.md | 28 ++++++++++++++++ .../1.8.x/server-kotlin/java/tables/create.md | 28 ++++++++++++++++ .../java/tables/decrement-row-column.md | 28 ++++++++++++++++ .../java/tables/delete-column.md | 25 ++++++++++++++ .../server-kotlin/java/tables/delete-index.md | 25 ++++++++++++++ .../server-kotlin/java/tables/delete-row.md | 25 ++++++++++++++ .../server-kotlin/java/tables/delete-rows.md | 25 ++++++++++++++ .../1.8.x/server-kotlin/java/tables/delete.md | 24 ++++++++++++++ .../server-kotlin/java/tables/get-column.md | 25 ++++++++++++++ .../server-kotlin/java/tables/get-index.md | 25 ++++++++++++++ .../server-kotlin/java/tables/get-row.md | 26 +++++++++++++++ .../1.8.x/server-kotlin/java/tables/get.md | 24 ++++++++++++++ .../java/tables/increment-row-column.md | 28 ++++++++++++++++ .../server-kotlin/java/tables/list-columns.md | 25 ++++++++++++++ .../server-kotlin/java/tables/list-indexes.md | 25 ++++++++++++++ .../server-kotlin/java/tables/list-rows.md | 25 ++++++++++++++ .../1.8.x/server-kotlin/java/tables/list.md | 25 ++++++++++++++ .../java/tables/update-boolean-column.md | 28 ++++++++++++++++ .../java/tables/update-datetime-column.md | 28 ++++++++++++++++ .../java/tables/update-email-column.md | 28 ++++++++++++++++ .../java/tables/update-enum-column.md | 29 ++++++++++++++++ .../java/tables/update-float-column.md | 30 +++++++++++++++++ .../java/tables/update-integer-column.md | 30 +++++++++++++++++ .../java/tables/update-ip-column.md | 28 ++++++++++++++++ .../java/tables/update-relationship-column.md | 27 +++++++++++++++ .../server-kotlin/java/tables/update-row.md | 27 +++++++++++++++ .../server-kotlin/java/tables/update-rows.md | 26 +++++++++++++++ .../java/tables/update-string-column.md | 29 ++++++++++++++++ .../java/tables/update-url-column.md | 28 ++++++++++++++++ .../1.8.x/server-kotlin/java/tables/update.md | 28 ++++++++++++++++ .../server-kotlin/java/tables/upsert-row.md | 26 +++++++++++++++ .../server-kotlin/java/tables/upsert-rows.md | 24 ++++++++++++++ .../kotlin/tables/create-boolean-column.md | 19 +++++++++++ .../kotlin/tables/create-datetime-column.md | 19 +++++++++++ .../kotlin/tables/create-email-column.md | 19 +++++++++++ .../kotlin/tables/create-enum-column.md | 20 +++++++++++ .../kotlin/tables/create-float-column.md | 21 ++++++++++++ .../kotlin/tables/create-index.md | 21 ++++++++++++ .../kotlin/tables/create-integer-column.md | 21 ++++++++++++ .../kotlin/tables/create-ip-column.md | 19 +++++++++++ .../tables/create-relationship-column.md | 22 +++++++++++++ .../server-kotlin/kotlin/tables/create-row.md | 19 +++++++++++ .../kotlin/tables/create-rows.md | 16 +++++++++ .../kotlin/tables/create-string-column.md | 21 ++++++++++++ .../kotlin/tables/create-url-column.md | 19 +++++++++++ .../server-kotlin/kotlin/tables/create.md | 19 +++++++++++ .../kotlin/tables/decrement-row-column.md | 19 +++++++++++ .../kotlin/tables/delete-column.md | 16 +++++++++ .../kotlin/tables/delete-index.md | 16 +++++++++ .../server-kotlin/kotlin/tables/delete-row.md | 16 +++++++++ .../kotlin/tables/delete-rows.md | 16 +++++++++ .../server-kotlin/kotlin/tables/delete.md | 15 +++++++++ .../server-kotlin/kotlin/tables/get-column.md | 16 +++++++++ .../server-kotlin/kotlin/tables/get-index.md | 16 +++++++++ .../server-kotlin/kotlin/tables/get-row.md | 17 ++++++++++ .../1.8.x/server-kotlin/kotlin/tables/get.md | 15 +++++++++ .../kotlin/tables/increment-row-column.md | 19 +++++++++++ .../kotlin/tables/list-columns.md | 16 +++++++++ .../kotlin/tables/list-indexes.md | 16 +++++++++ .../server-kotlin/kotlin/tables/list-rows.md | 16 +++++++++ .../1.8.x/server-kotlin/kotlin/tables/list.md | 16 +++++++++ .../kotlin/tables/update-boolean-column.md | 19 +++++++++++ .../kotlin/tables/update-datetime-column.md | 19 +++++++++++ .../kotlin/tables/update-email-column.md | 19 +++++++++++ .../kotlin/tables/update-enum-column.md | 20 +++++++++++ .../kotlin/tables/update-float-column.md | 21 ++++++++++++ .../kotlin/tables/update-integer-column.md | 21 ++++++++++++ .../kotlin/tables/update-ip-column.md | 19 +++++++++++ .../tables/update-relationship-column.md | 18 ++++++++++ .../server-kotlin/kotlin/tables/update-row.md | 18 ++++++++++ .../kotlin/tables/update-rows.md | 17 ++++++++++ .../kotlin/tables/update-string-column.md | 20 +++++++++++ .../kotlin/tables/update-url-column.md | 19 +++++++++++ .../server-kotlin/kotlin/tables/update.md | 19 +++++++++++ .../server-kotlin/kotlin/tables/upsert-row.md | 17 ++++++++++ .../kotlin/tables/upsert-rows.md | 15 +++++++++ .../examples/tables/create-boolean-column.md | 17 ++++++++++ .../examples/tables/create-datetime-column.md | 17 ++++++++++ .../examples/tables/create-email-column.md | 17 ++++++++++ .../examples/tables/create-enum-column.md | 18 ++++++++++ .../examples/tables/create-float-column.md | 19 +++++++++++ .../examples/tables/create-index.md | 18 ++++++++++ .../examples/tables/create-integer-column.md | 19 +++++++++++ .../examples/tables/create-ip-column.md | 17 ++++++++++ .../tables/create-relationship-column.md | 19 +++++++++++ .../examples/tables/create-row.md | 17 ++++++++++ .../examples/tables/create-rows.md | 14 ++++++++ .../examples/tables/create-string-column.md | 19 +++++++++++ .../examples/tables/create-url-column.md | 17 ++++++++++ .../server-nodejs/examples/tables/create.md | 17 ++++++++++ .../examples/tables/decrement-row-column.md | 17 ++++++++++ .../examples/tables/delete-column.md | 14 ++++++++ .../examples/tables/delete-index.md | 14 ++++++++ .../examples/tables/delete-row.md | 14 ++++++++ .../examples/tables/delete-rows.md | 14 ++++++++ .../server-nodejs/examples/tables/delete.md | 13 ++++++++ .../examples/tables/get-column.md | 14 ++++++++ .../examples/tables/get-index.md | 14 ++++++++ .../server-nodejs/examples/tables/get-row.md | 15 +++++++++ .../server-nodejs/examples/tables/get.md | 13 ++++++++ .../examples/tables/increment-row-column.md | 17 ++++++++++ .../examples/tables/list-columns.md | 14 ++++++++ .../examples/tables/list-indexes.md | 14 ++++++++ .../examples/tables/list-rows.md | 14 ++++++++ .../server-nodejs/examples/tables/list.md | 14 ++++++++ .../examples/tables/update-boolean-column.md | 17 ++++++++++ .../examples/tables/update-datetime-column.md | 17 ++++++++++ .../examples/tables/update-email-column.md | 17 ++++++++++ .../examples/tables/update-enum-column.md | 18 ++++++++++ .../examples/tables/update-float-column.md | 19 +++++++++++ .../examples/tables/update-integer-column.md | 19 +++++++++++ .../examples/tables/update-ip-column.md | 17 ++++++++++ .../tables/update-relationship-column.md | 16 +++++++++ .../examples/tables/update-row.md | 16 +++++++++ .../examples/tables/update-rows.md | 15 +++++++++ .../examples/tables/update-string-column.md | 18 ++++++++++ .../examples/tables/update-url-column.md | 17 ++++++++++ .../server-nodejs/examples/tables/update.md | 17 ++++++++++ .../examples/tables/upsert-row.md | 15 +++++++++ .../examples/tables/upsert-rows.md | 13 ++++++++ .../examples/tables/create-boolean-column.md | 20 +++++++++++ .../examples/tables/create-datetime-column.md | 20 +++++++++++ .../examples/tables/create-email-column.md | 20 +++++++++++ .../examples/tables/create-enum-column.md | 21 ++++++++++++ .../examples/tables/create-float-column.md | 22 +++++++++++++ .../examples/tables/create-index.md | 22 +++++++++++++ .../examples/tables/create-integer-column.md | 22 +++++++++++++ .../examples/tables/create-ip-column.md | 20 +++++++++++ .../tables/create-relationship-column.md | 23 +++++++++++++ .../server-php/examples/tables/create-row.md | 20 +++++++++++ .../server-php/examples/tables/create-rows.md | 17 ++++++++++ .../examples/tables/create-string-column.md | 22 +++++++++++++ .../examples/tables/create-url-column.md | 20 +++++++++++ .../server-php/examples/tables/create.md | 20 +++++++++++ .../examples/tables/decrement-row-column.md | 20 +++++++++++ .../examples/tables/delete-column.md | 17 ++++++++++ .../examples/tables/delete-index.md | 17 ++++++++++ .../server-php/examples/tables/delete-row.md | 17 ++++++++++ .../server-php/examples/tables/delete-rows.md | 17 ++++++++++ .../server-php/examples/tables/delete.md | 16 +++++++++ .../server-php/examples/tables/get-column.md | 17 ++++++++++ .../server-php/examples/tables/get-index.md | 17 ++++++++++ .../server-php/examples/tables/get-row.md | 18 ++++++++++ .../1.8.x/server-php/examples/tables/get.md | 16 +++++++++ .../examples/tables/increment-row-column.md | 20 +++++++++++ .../examples/tables/list-columns.md | 17 ++++++++++ .../examples/tables/list-indexes.md | 17 ++++++++++ .../server-php/examples/tables/list-rows.md | 17 ++++++++++ .../1.8.x/server-php/examples/tables/list.md | 17 ++++++++++ .../examples/tables/update-boolean-column.md | 20 +++++++++++ .../examples/tables/update-datetime-column.md | 20 +++++++++++ .../examples/tables/update-email-column.md | 20 +++++++++++ .../examples/tables/update-enum-column.md | 21 ++++++++++++ .../examples/tables/update-float-column.md | 22 +++++++++++++ .../examples/tables/update-integer-column.md | 22 +++++++++++++ .../examples/tables/update-ip-column.md | 20 +++++++++++ .../tables/update-relationship-column.md | 19 +++++++++++ .../server-php/examples/tables/update-row.md | 19 +++++++++++ .../server-php/examples/tables/update-rows.md | 18 ++++++++++ .../examples/tables/update-string-column.md | 21 ++++++++++++ .../examples/tables/update-url-column.md | 20 +++++++++++ .../server-php/examples/tables/update.md | 20 +++++++++++ .../server-php/examples/tables/upsert-row.md | 18 ++++++++++ .../server-php/examples/tables/upsert-rows.md | 16 +++++++++ .../examples/tables/create-boolean-column.md | 18 ++++++++++ .../examples/tables/create-datetime-column.md | 18 ++++++++++ .../examples/tables/create-email-column.md | 18 ++++++++++ .../examples/tables/create-enum-column.md | 19 +++++++++++ .../examples/tables/create-float-column.md | 20 +++++++++++ .../examples/tables/create-index.md | 20 +++++++++++ .../examples/tables/create-integer-column.md | 20 +++++++++++ .../examples/tables/create-ip-column.md | 18 ++++++++++ .../tables/create-relationship-column.md | 21 ++++++++++++ .../examples/tables/create-row.md | 18 ++++++++++ .../examples/tables/create-rows.md | 15 +++++++++ .../examples/tables/create-string-column.md | 20 +++++++++++ .../examples/tables/create-url-column.md | 18 ++++++++++ .../server-python/examples/tables/create.md | 18 ++++++++++ .../examples/tables/decrement-row-column.md | 18 ++++++++++ .../examples/tables/delete-column.md | 15 +++++++++ .../examples/tables/delete-index.md | 15 +++++++++ .../examples/tables/delete-row.md | 15 +++++++++ .../examples/tables/delete-rows.md | 15 +++++++++ .../server-python/examples/tables/delete.md | 14 ++++++++ .../examples/tables/get-column.md | 15 +++++++++ .../examples/tables/get-index.md | 15 +++++++++ .../server-python/examples/tables/get-row.md | 16 +++++++++ .../server-python/examples/tables/get.md | 14 ++++++++ .../examples/tables/increment-row-column.md | 18 ++++++++++ .../examples/tables/list-columns.md | 15 +++++++++ .../examples/tables/list-indexes.md | 15 +++++++++ .../examples/tables/list-rows.md | 15 +++++++++ .../server-python/examples/tables/list.md | 15 +++++++++ .../examples/tables/update-boolean-column.md | 18 ++++++++++ .../examples/tables/update-datetime-column.md | 18 ++++++++++ .../examples/tables/update-email-column.md | 18 ++++++++++ .../examples/tables/update-enum-column.md | 19 +++++++++++ .../examples/tables/update-float-column.md | 20 +++++++++++ .../examples/tables/update-integer-column.md | 20 +++++++++++ .../examples/tables/update-ip-column.md | 18 ++++++++++ .../tables/update-relationship-column.md | 17 ++++++++++ .../examples/tables/update-row.md | 17 ++++++++++ .../examples/tables/update-rows.md | 16 +++++++++ .../examples/tables/update-string-column.md | 19 +++++++++++ .../examples/tables/update-url-column.md | 18 ++++++++++ .../server-python/examples/tables/update.md | 18 ++++++++++ .../examples/tables/upsert-row.md | 16 +++++++++ .../examples/tables/upsert-rows.md | 14 ++++++++ .../examples/tables/create-boolean-column.md | 13 ++++++++ .../examples/tables/create-datetime-column.md | 13 ++++++++ .../examples/tables/create-email-column.md | 13 ++++++++ .../examples/tables/create-enum-column.md | 14 ++++++++ .../examples/tables/create-float-column.md | 15 +++++++++ .../examples/tables/create-index.md | 14 ++++++++ .../examples/tables/create-integer-column.md | 15 +++++++++ .../examples/tables/create-ip-column.md | 13 ++++++++ .../tables/create-relationship-column.md | 15 +++++++++ .../server-rest/examples/tables/create-row.md | 14 ++++++++ .../examples/tables/create-rows.md | 12 +++++++ .../examples/tables/create-string-column.md | 15 +++++++++ .../examples/tables/create-url-column.md | 13 ++++++++ .../server-rest/examples/tables/create.md | 14 ++++++++ .../examples/tables/decrement-row-column.md | 11 +++++++ .../examples/tables/delete-column.md | 7 ++++ .../examples/tables/delete-index.md | 7 ++++ .../server-rest/examples/tables/delete-row.md | 9 +++++ .../examples/tables/delete-rows.md | 10 ++++++ .../server-rest/examples/tables/delete.md | 7 ++++ .../server-rest/examples/tables/get-column.md | 5 +++ .../server-rest/examples/tables/get-index.md | 5 +++ .../server-rest/examples/tables/get-row.md | 7 ++++ .../1.8.x/server-rest/examples/tables/get.md | 5 +++ .../examples/tables/increment-row-column.md | 11 +++++++ .../examples/tables/list-columns.md | 5 +++ .../examples/tables/list-indexes.md | 5 +++ .../server-rest/examples/tables/list-rows.md | 7 ++++ .../1.8.x/server-rest/examples/tables/list.md | 5 +++ .../examples/tables/update-boolean-column.md | 12 +++++++ .../examples/tables/update-datetime-column.md | 12 +++++++ .../examples/tables/update-email-column.md | 12 +++++++ .../examples/tables/update-enum-column.md | 13 ++++++++ .../examples/tables/update-float-column.md | 14 ++++++++ .../examples/tables/update-integer-column.md | 14 ++++++++ .../examples/tables/update-ip-column.md | 12 +++++++ .../tables/update-relationship-column.md | 11 +++++++ .../server-rest/examples/tables/update-row.md | 13 ++++++++ .../examples/tables/update-rows.md | 11 +++++++ .../examples/tables/update-string-column.md | 13 ++++++++ .../examples/tables/update-url-column.md | 12 +++++++ .../server-rest/examples/tables/update.md | 13 ++++++++ .../server-rest/examples/tables/upsert-row.md | 9 +++++ .../examples/tables/upsert-rows.md | 7 ++++ .../examples/tables/create-boolean-column.md | 19 +++++++++++ .../examples/tables/create-datetime-column.md | 19 +++++++++++ .../examples/tables/create-email-column.md | 19 +++++++++++ .../examples/tables/create-enum-column.md | 20 +++++++++++ .../examples/tables/create-float-column.md | 21 ++++++++++++ .../examples/tables/create-index.md | 21 ++++++++++++ .../examples/tables/create-integer-column.md | 21 ++++++++++++ .../examples/tables/create-ip-column.md | 19 +++++++++++ .../tables/create-relationship-column.md | 22 +++++++++++++ .../server-ruby/examples/tables/create-row.md | 19 +++++++++++ .../examples/tables/create-rows.md | 16 +++++++++ .../examples/tables/create-string-column.md | 21 ++++++++++++ .../examples/tables/create-url-column.md | 19 +++++++++++ .../server-ruby/examples/tables/create.md | 19 +++++++++++ .../examples/tables/decrement-row-column.md | 19 +++++++++++ .../examples/tables/delete-column.md | 16 +++++++++ .../examples/tables/delete-index.md | 16 +++++++++ .../server-ruby/examples/tables/delete-row.md | 16 +++++++++ .../examples/tables/delete-rows.md | 16 +++++++++ .../server-ruby/examples/tables/delete.md | 15 +++++++++ .../server-ruby/examples/tables/get-column.md | 16 +++++++++ .../server-ruby/examples/tables/get-index.md | 16 +++++++++ .../server-ruby/examples/tables/get-row.md | 17 ++++++++++ .../1.8.x/server-ruby/examples/tables/get.md | 15 +++++++++ .../examples/tables/increment-row-column.md | 19 +++++++++++ .../examples/tables/list-columns.md | 16 +++++++++ .../examples/tables/list-indexes.md | 16 +++++++++ .../server-ruby/examples/tables/list-rows.md | 16 +++++++++ .../1.8.x/server-ruby/examples/tables/list.md | 16 +++++++++ .../examples/tables/update-boolean-column.md | 19 +++++++++++ .../examples/tables/update-datetime-column.md | 19 +++++++++++ .../examples/tables/update-email-column.md | 19 +++++++++++ .../examples/tables/update-enum-column.md | 20 +++++++++++ .../examples/tables/update-float-column.md | 21 ++++++++++++ .../examples/tables/update-integer-column.md | 21 ++++++++++++ .../examples/tables/update-ip-column.md | 19 +++++++++++ .../tables/update-relationship-column.md | 18 ++++++++++ .../server-ruby/examples/tables/update-row.md | 18 ++++++++++ .../examples/tables/update-rows.md | 17 ++++++++++ .../examples/tables/update-string-column.md | 20 +++++++++++ .../examples/tables/update-url-column.md | 19 +++++++++++ .../server-ruby/examples/tables/update.md | 19 +++++++++++ .../server-ruby/examples/tables/upsert-row.md | 17 ++++++++++ .../examples/tables/upsert-rows.md | 15 +++++++++ .../examples/tables/create-boolean-column.md | 18 ++++++++++ .../examples/tables/create-datetime-column.md | 18 ++++++++++ .../examples/tables/create-email-column.md | 18 ++++++++++ .../examples/tables/create-enum-column.md | 19 +++++++++++ .../examples/tables/create-float-column.md | 20 +++++++++++ .../examples/tables/create-index.md | 20 +++++++++++ .../examples/tables/create-integer-column.md | 20 +++++++++++ .../examples/tables/create-ip-column.md | 18 ++++++++++ .../tables/create-relationship-column.md | 21 ++++++++++++ .../examples/tables/create-row.md | 18 ++++++++++ .../examples/tables/create-rows.md | 15 +++++++++ .../examples/tables/create-string-column.md | 20 +++++++++++ .../examples/tables/create-url-column.md | 18 ++++++++++ .../server-swift/examples/tables/create.md | 18 ++++++++++ .../examples/tables/decrement-row-column.md | 18 ++++++++++ .../examples/tables/delete-column.md | 15 +++++++++ .../examples/tables/delete-index.md | 15 +++++++++ .../examples/tables/delete-row.md | 15 +++++++++ .../examples/tables/delete-rows.md | 15 +++++++++ .../server-swift/examples/tables/delete.md | 14 ++++++++ .../examples/tables/get-column.md | 15 +++++++++ .../server-swift/examples/tables/get-index.md | 15 +++++++++ .../server-swift/examples/tables/get-row.md | 16 +++++++++ .../1.8.x/server-swift/examples/tables/get.md | 14 ++++++++ .../examples/tables/increment-row-column.md | 18 ++++++++++ .../examples/tables/list-columns.md | 15 +++++++++ .../examples/tables/list-indexes.md | 15 +++++++++ .../server-swift/examples/tables/list-rows.md | 15 +++++++++ .../server-swift/examples/tables/list.md | 15 +++++++++ .../examples/tables/update-boolean-column.md | 18 ++++++++++ .../examples/tables/update-datetime-column.md | 18 ++++++++++ .../examples/tables/update-email-column.md | 18 ++++++++++ .../examples/tables/update-enum-column.md | 19 +++++++++++ .../examples/tables/update-float-column.md | 20 +++++++++++ .../examples/tables/update-integer-column.md | 20 +++++++++++ .../examples/tables/update-ip-column.md | 18 ++++++++++ .../tables/update-relationship-column.md | 18 ++++++++++ .../examples/tables/update-row.md | 17 ++++++++++ .../examples/tables/update-rows.md | 16 +++++++++ .../examples/tables/update-string-column.md | 19 +++++++++++ .../examples/tables/update-url-column.md | 18 ++++++++++ .../server-swift/examples/tables/update.md | 18 ++++++++++ .../examples/tables/upsert-row.md | 16 +++++++++ .../examples/tables/upsert-rows.md | 14 ++++++++ 724 files changed, 12612 insertions(+) create mode 100644 docs/examples/1.8.x/client-android/java/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-android/java/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/create.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/get.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/list.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/update.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list-columns.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md diff --git a/docs/examples/1.8.x/client-android/java/tables/create-row.md b/docs/examples/1.8.x/client-android/java/tables/create-row.md new file mode 100644 index 0000000000..8102b82c75 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/create-row.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.createRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/create-rows.md b/docs/examples/1.8.x/client-android/java/tables/create-rows.md new file mode 100644 index 0000000000..26f5d67789 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/create-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey(""); // + +Tables tables = new Tables(client); + +tables.createRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/delete-row.md b/docs/examples/1.8.x/client-android/java/tables/delete-row.md new file mode 100644 index 0000000000..596a8b7aca --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/delete-row.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Tables tables = new Tables(client); + +tables.deleteRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/get-row.md b/docs/examples/1.8.x/client-android/java/tables/get-row.md new file mode 100644 index 0000000000..882a195376 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/get-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Tables tables = new Tables(client); + +tables.getRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/list-rows.md b/docs/examples/1.8.x/client-android/java/tables/list-rows.md new file mode 100644 index 0000000000..4d37570246 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/list-rows.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Tables tables = new Tables(client); + +tables.listRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/update-row.md b/docs/examples/1.8.x/client-android/java/tables/update-row.md new file mode 100644 index 0000000000..0421c9cffb --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/update-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Tables tables = new Tables(client); + +tables.updateRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/tables/upsert-row.md b/docs/examples/1.8.x/client-android/java/tables/upsert-row.md new file mode 100644 index 0000000000..a8be0cfc6c --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/tables/upsert-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.upsertRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md new file mode 100644 index 0000000000..8c581bf1d5 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val tables = Tables(client) + +val result = tables.createRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md b/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md new file mode 100644 index 0000000000..1fde9c50cf --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("") // + +val tables = Tables(client) + +val result = tables.createRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf(), +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md new file mode 100644 index 0000000000..ffa3229f30 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val tables = Tables(client) + +val result = tables.deleteRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md new file mode 100644 index 0000000000..15dabff397 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val tables = Tables(client) + +val result = tables.getRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md b/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md new file mode 100644 index 0000000000..ff36543938 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val tables = Tables(client) + +val result = tables.listRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md new file mode 100644 index 0000000000..e9b515cef4 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val tables = Tables(client) + +val result = tables.updateRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md new file mode 100644 index 0000000000..6b7cb6666b --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val tables = Tables(client) + +val result = tables.upsertRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-apple/examples/tables/create-row.md b/docs/examples/1.8.x/client-apple/examples/tables/create-row.md new file mode 100644 index 0000000000..533cf2d555 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/create-row.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let tables = Tables(client) + +let row = try await tables.createRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md b/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md new file mode 100644 index 0000000000..effd748aa0 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("") // + +let tables = Tables(client) + +let rowList = try await tables.createRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md b/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md new file mode 100644 index 0000000000..7d12ec4f4c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let tables = Tables(client) + +let result = try await tables.deleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/get-row.md b/docs/examples/1.8.x/client-apple/examples/tables/get-row.md new file mode 100644 index 0000000000..93fbef9e7c --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/get-row.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let tables = Tables(client) + +let row = try await tables.getRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md b/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md new file mode 100644 index 0000000000..31545cce4d --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let tables = Tables(client) + +let rowList = try await tables.listRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/update-row.md b/docs/examples/1.8.x/client-apple/examples/tables/update-row.md new file mode 100644 index 0000000000..601c4f0a77 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/update-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let tables = Tables(client) + +let row = try await tables.updateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md new file mode 100644 index 0000000000..eabcb181c3 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let tables = Tables(client) + +let row = try await tables.upsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md new file mode 100644 index 0000000000..ac9923d813 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md @@ -0,0 +1,17 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Tables tables = Tables(client); + +Row result = await tables.createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md b/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md new file mode 100644 index 0000000000..38c4c7503d --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +Tables tables = Tables(client); + +RowList result = await tables.createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md new file mode 100644 index 0000000000..4187c4766d --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Tables tables = Tables(client); + +await tables.deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md new file mode 100644 index 0000000000..8d8c52caa6 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Tables tables = Tables(client); + +Row result = await tables.getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md b/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md new file mode 100644 index 0000000000..f770bbbd92 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Tables tables = Tables(client); + +RowList result = await tables.listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md new file mode 100644 index 0000000000..f43ba5e689 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Tables tables = Tables(client); + +Row result = await tables.updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md new file mode 100644 index 0000000000..26a872b692 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Tables tables = Tables(client); + +Row result = await tables.upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md new file mode 100644 index 0000000000..c88a7f36cf --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md @@ -0,0 +1,18 @@ +mutation { + tablesCreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md b/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md new file mode 100644 index 0000000000..a4ae62cfae --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md @@ -0,0 +1,19 @@ +mutation { + tablesCreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md new file mode 100644 index 0000000000..f3a35c1df1 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md @@ -0,0 +1,9 @@ +mutation { + tablesDeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/get-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/get-row.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md b/docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md new file mode 100644 index 0000000000..8449d8499b --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md @@ -0,0 +1,18 @@ +mutation { + tablesUpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md new file mode 100644 index 0000000000..480d7651bd --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +mutation { + tablesUpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md new file mode 100644 index 0000000000..75de1c2a39 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md b/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md new file mode 100644 index 0000000000..165aa4cb71 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +const tables = new Tables(client); + +const result = await tables.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md new file mode 100644 index 0000000000..9746f85ea0 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md new file mode 100644 index 0000000000..b9434e3957 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md b/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md new file mode 100644 index 0000000000..75f81a1435 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md new file mode 100644 index 0000000000..7bb36dd254 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md new file mode 100644 index 0000000000..f176425abb --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-rest/examples/tables/create-row.md b/docs/examples/1.8.x/client-rest/examples/tables/create-row.md new file mode 100644 index 0000000000..c4166b8b80 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/create-row.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rowId": "<ROW_ID>", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md b/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md new file mode 100644 index 0000000000..0935afd11e --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md @@ -0,0 +1,11 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rows": [] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md b/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md new file mode 100644 index 0000000000..954303d17a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md @@ -0,0 +1,8 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/client-rest/examples/tables/get-row.md b/docs/examples/1.8.x/client-rest/examples/tables/get-row.md new file mode 100644 index 0000000000..fc09601df7 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/get-row.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md b/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md new file mode 100644 index 0000000000..de214e7cea --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/tables/update-row.md b/docs/examples/1.8.x/client-rest/examples/tables/update-row.md new file mode 100644 index 0000000000..f09f639e60 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/update-row.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md new file mode 100644 index 0000000000..60528077ef --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md @@ -0,0 +1,8 @@ +PUT /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/client-web/examples/tables/create-row.md b/docs/examples/1.8.x/client-web/examples/tables/create-row.md new file mode 100644 index 0000000000..f7b54d1894 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/create-row.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/create-rows.md b/docs/examples/1.8.x/client-web/examples/tables/create-rows.md new file mode 100644 index 0000000000..79d7d3f311 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey(''); // + +const tables = new Tables(client); + +const result = await tables.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/delete-row.md b/docs/examples/1.8.x/client-web/examples/tables/delete-row.md new file mode 100644 index 0000000000..5c6c4b96d9 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/get-row.md b/docs/examples/1.8.x/client-web/examples/tables/get-row.md new file mode 100644 index 0000000000..708b3d96cc --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/get-row.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/list-rows.md b/docs/examples/1.8.x/client-web/examples/tables/list-rows.md new file mode 100644 index 0000000000..f82d358f0d --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/update-row.md b/docs/examples/1.8.x/client-web/examples/tables/update-row.md new file mode 100644 index 0000000000..0e0c5a012e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/update-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md new file mode 100644 index 0000000000..f111fefd71 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..88e6bf8853 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md @@ -0,0 +1,7 @@ +appwrite tables createBooleanColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..de28b7537c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md @@ -0,0 +1,7 @@ +appwrite tables createDatetimeColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md new file mode 100644 index 0000000000..23b672e62d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md @@ -0,0 +1,7 @@ +appwrite tables createEmailColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..4cd3e1d241 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md @@ -0,0 +1,8 @@ +appwrite tables createEnumColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md new file mode 100644 index 0000000000..9c69e29e91 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md @@ -0,0 +1,9 @@ +appwrite tables createFloatColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-index.md b/docs/examples/1.8.x/console-cli/examples/tables/create-index.md new file mode 100644 index 0000000000..4c6d641727 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-index.md @@ -0,0 +1,8 @@ +appwrite tables createIndex \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --type key \ + --columns one two three \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..afab48e803 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md @@ -0,0 +1,9 @@ +appwrite tables createIntegerColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..000b54b918 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md @@ -0,0 +1,7 @@ +appwrite tables createIpColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..4ce3342768 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md @@ -0,0 +1,9 @@ +appwrite tables createRelationshipColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --relatedTableId <RELATED_TABLE_ID> \ + --type oneToOne \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-row.md b/docs/examples/1.8.x/console-cli/examples/tables/create-row.md new file mode 100644 index 0000000000..e446de157b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-row.md @@ -0,0 +1,6 @@ +appwrite tables createRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md new file mode 100644 index 0000000000..cb7c68dd7b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md @@ -0,0 +1,4 @@ +appwrite tables createRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rows one two three diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md new file mode 100644 index 0000000000..4df1792a34 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md @@ -0,0 +1,9 @@ +appwrite tables createStringColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --size 1 \ + --required false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md new file mode 100644 index 0000000000..fcb81491bd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md @@ -0,0 +1,7 @@ +appwrite tables createUrlColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create.md b/docs/examples/1.8.x/console-cli/examples/tables/create.md new file mode 100644 index 0000000000..09f52f16a1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/create.md @@ -0,0 +1,7 @@ +appwrite tables create \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --name <NAME> \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..73743c21ce --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md @@ -0,0 +1,7 @@ +appwrite tables decrementRowColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + --column '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md new file mode 100644 index 0000000000..e659af54d0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md @@ -0,0 +1,4 @@ +appwrite tables deleteColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md new file mode 100644 index 0000000000..0de1e417d3 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md @@ -0,0 +1,4 @@ +appwrite tables deleteIndex \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md new file mode 100644 index 0000000000..d6918be89e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md @@ -0,0 +1,4 @@ +appwrite tables deleteRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md new file mode 100644 index 0000000000..579586b561 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md @@ -0,0 +1,4 @@ +appwrite tables deleteRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete.md b/docs/examples/1.8.x/console-cli/examples/tables/delete.md new file mode 100644 index 0000000000..0f189e09f1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/delete.md @@ -0,0 +1,3 @@ +appwrite tables delete \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-column.md b/docs/examples/1.8.x/console-cli/examples/tables/get-column.md new file mode 100644 index 0000000000..33a94b5ebc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-column.md @@ -0,0 +1,4 @@ +appwrite tables getColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-index.md b/docs/examples/1.8.x/console-cli/examples/tables/get-index.md new file mode 100644 index 0000000000..e956175e09 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-index.md @@ -0,0 +1,4 @@ +appwrite tables getIndex \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-row.md b/docs/examples/1.8.x/console-cli/examples/tables/get-row.md new file mode 100644 index 0000000000..5b3b64bfbc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-row.md @@ -0,0 +1,5 @@ +appwrite tables getRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md b/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md new file mode 100644 index 0000000000..f766a418a0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md @@ -0,0 +1,4 @@ +appwrite tables getTableUsage \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md b/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md new file mode 100644 index 0000000000..ca955ce6df --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md @@ -0,0 +1,4 @@ +appwrite tables getUsage \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get.md b/docs/examples/1.8.x/console-cli/examples/tables/get.md new file mode 100644 index 0000000000..a41e6c10ed --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/get.md @@ -0,0 +1,3 @@ +appwrite tables get \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md b/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..da73950231 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md @@ -0,0 +1,7 @@ +appwrite tables incrementRowColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + --column '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md b/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md new file mode 100644 index 0000000000..0439d58127 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md @@ -0,0 +1,4 @@ +appwrite tables listColumns \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md b/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md new file mode 100644 index 0000000000..b5fd85b911 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md @@ -0,0 +1,4 @@ +appwrite tables listIndexes \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md b/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md new file mode 100644 index 0000000000..08c4ff0f8d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md @@ -0,0 +1,4 @@ +appwrite tables listLogs \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md b/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md new file mode 100644 index 0000000000..e7a8c5b8ce --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md @@ -0,0 +1,5 @@ +appwrite tables listRowLogs \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md new file mode 100644 index 0000000000..2a6d69d574 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md @@ -0,0 +1,4 @@ +appwrite tables listRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list.md b/docs/examples/1.8.x/console-cli/examples/tables/list.md new file mode 100644 index 0000000000..1c58d9ed03 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/list.md @@ -0,0 +1,4 @@ +appwrite tables list \ + --databaseId <DATABASE_ID> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..7d736f35e5 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md @@ -0,0 +1,7 @@ +appwrite tables updateBooleanColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default false \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..3da3e4a919 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md @@ -0,0 +1,7 @@ +appwrite tables updateDatetimeColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md new file mode 100644 index 0000000000..df718b8d9a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md @@ -0,0 +1,7 @@ +appwrite tables updateEmailColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default email@example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..55c55fc2bd --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md @@ -0,0 +1,8 @@ +appwrite tables updateEnumColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --elements one two three \ + --required false \ + --default <DEFAULT> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md new file mode 100644 index 0000000000..99667a8447 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md @@ -0,0 +1,9 @@ +appwrite tables updateFloatColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..098efa0e3e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md @@ -0,0 +1,9 @@ +appwrite tables updateIntegerColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..50eadc3fff --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md @@ -0,0 +1,7 @@ +appwrite tables updateIpColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..43e0c0ae6e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md @@ -0,0 +1,6 @@ +appwrite tables updateRelationshipColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-row.md b/docs/examples/1.8.x/console-cli/examples/tables/update-row.md new file mode 100644 index 0000000000..d5cd0fe4ee --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-row.md @@ -0,0 +1,6 @@ +appwrite tables updateRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md new file mode 100644 index 0000000000..173d608d5a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md @@ -0,0 +1,5 @@ +appwrite tables updateRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md new file mode 100644 index 0000000000..3feaa734ec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md @@ -0,0 +1,8 @@ +appwrite tables updateStringColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default <DEFAULT> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md new file mode 100644 index 0000000000..2df1ab14d7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md @@ -0,0 +1,7 @@ +appwrite tables updateUrlColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default https://example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update.md b/docs/examples/1.8.x/console-cli/examples/tables/update.md new file mode 100644 index 0000000000..a1550287c8 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/update.md @@ -0,0 +1,7 @@ +appwrite tables update \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --name <NAME> \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md b/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md new file mode 100644 index 0000000000..0281a89b20 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md @@ -0,0 +1,4 @@ +appwrite tables upsertRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..828caf8f10 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md @@ -0,0 +1,3 @@ +appwrite tables upsertRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..bf0cca08c1 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..c9eb3af82c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md new file mode 100644 index 0000000000..3952161779 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..7b16da6c14 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md new file mode 100644 index 0000000000..6608864efe --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-index.md b/docs/examples/1.8.x/console-web/examples/tables/create-index.md new file mode 100644 index 0000000000..c303dd289d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-index.md @@ -0,0 +1,19 @@ +import { Client, Tables, IndexType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + IndexType.Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..0490b71189 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..644f520032 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..5658eec690 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md @@ -0,0 +1,20 @@ +import { Client, Tables, RelationshipType, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-row.md b/docs/examples/1.8.x/console-web/examples/tables/create-row.md new file mode 100644 index 0000000000..ba18cb6fba --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-row.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-rows.md b/docs/examples/1.8.x/console-web/examples/tables/create-rows.md new file mode 100644 index 0000000000..bd7f984ee3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const result = await tables.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md new file mode 100644 index 0000000000..6c1fbd7c99 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md new file mode 100644 index 0000000000..88e1fc584d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create.md b/docs/examples/1.8.x/console-web/examples/tables/create.md new file mode 100644 index 0000000000..a7bda74508 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/create.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.create( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..35cb78686c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-column.md b/docs/examples/1.8.x/console-web/examples/tables/delete-column.md new file mode 100644 index 0000000000..642856448a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete-column.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-index.md b/docs/examples/1.8.x/console-web/examples/tables/delete-index.md new file mode 100644 index 0000000000..f517513909 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete-index.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-row.md b/docs/examples/1.8.x/console-web/examples/tables/delete-row.md new file mode 100644 index 0000000000..accbb3092a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md b/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md new file mode 100644 index 0000000000..adbb613a35 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete.md b/docs/examples/1.8.x/console-web/examples/tables/delete.md new file mode 100644 index 0000000000..f235d8dda0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/delete.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.delete( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-column.md b/docs/examples/1.8.x/console-web/examples/tables/get-column.md new file mode 100644 index 0000000000..7bd7f2db30 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-column.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-index.md b/docs/examples/1.8.x/console-web/examples/tables/get-index.md new file mode 100644 index 0000000000..dc8c3362cf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-index.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-row.md b/docs/examples/1.8.x/console-web/examples/tables/get-row.md new file mode 100644 index 0000000000..f37558d4ff --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-row.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md b/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md new file mode 100644 index 0000000000..4e6ca3270d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md @@ -0,0 +1,15 @@ +import { Client, Tables, } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getTableUsage( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + .24h // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-usage.md b/docs/examples/1.8.x/console-web/examples/tables/get-usage.md new file mode 100644 index 0000000000..0f9d31c92d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get-usage.md @@ -0,0 +1,15 @@ +import { Client, Tables, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.getUsage( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get.md b/docs/examples/1.8.x/console-web/examples/tables/get.md new file mode 100644 index 0000000000..2b8951582a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/get.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.get( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md b/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..ed9710a0e3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-columns.md b/docs/examples/1.8.x/console-web/examples/tables/list-columns.md new file mode 100644 index 0000000000..91348c4e61 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-columns.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md b/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md new file mode 100644 index 0000000000..0ae874663d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-logs.md b/docs/examples/1.8.x/console-web/examples/tables/list-logs.md new file mode 100644 index 0000000000..04d6c2300c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-logs.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listLogs( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md b/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md new file mode 100644 index 0000000000..691e589a77 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listRowLogs( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-rows.md b/docs/examples/1.8.x/console-web/examples/tables/list-rows.md new file mode 100644 index 0000000000..79f5e242a5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list.md b/docs/examples/1.8.x/console-web/examples/tables/list.md new file mode 100644 index 0000000000..e8eb3c3dd6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/list.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.list( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..e4bb9012e6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..d24683aafb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md new file mode 100644 index 0000000000..b9e2483191 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..bfe084212c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md new file mode 100644 index 0000000000..9075e31e69 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..c45e4735a9 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md @@ -0,0 +1,20 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..f7cdb490dc --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..192eac7175 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md @@ -0,0 +1,17 @@ +import { Client, Tables, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-row.md b/docs/examples/1.8.x/console-web/examples/tables/update-row.md new file mode 100644 index 0000000000..0db00657c2 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-rows.md b/docs/examples/1.8.x/console-web/examples/tables/update-rows.md new file mode 100644 index 0000000000..72b2244f75 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-rows.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md new file mode 100644 index 0000000000..8f6b3b5dad --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md new file mode 100644 index 0000000000..a2cb65d700 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update.md b/docs/examples/1.8.x/console-web/examples/tables/update.md new file mode 100644 index 0000000000..f0552604af --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/update.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const tables = new Tables(client); + +const result = await tables.update( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md b/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md new file mode 100644 index 0000000000..f1cb65e675 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const result = await tables.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md b/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..2d818cdbca --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const result = await tables.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..5b3e987b9b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnBoolean result = await tables.createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: false, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..1ad3fa250d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnDatetime result = await tables.createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md new file mode 100644 index 0000000000..fa7ec71410 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnEmail result = await tables.createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..5ab6bcc774 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnEnum result = await tables.createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md new file mode 100644 index 0000000000..43331187ea --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnFloat result = await tables.createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-index.md b/docs/examples/1.8.x/server-dart/examples/tables/create-index.md new file mode 100644 index 0000000000..d76c46959f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-index.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIndex result = await tables.createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType.key, + columns: [], + orders: [], // (optional) + lengths: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..3304325af7 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnInteger result = await tables.createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..68c7abf754 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIp result = await tables.createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..a059740bf8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnRelationship result = await tables.createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType.oneToOne, + twoWay: false, // (optional) + key: '', // (optional) + twoWayKey: '', // (optional) + onDelete: RelationMutate.cascade, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-row.md b/docs/examples/1.8.x/server-dart/examples/tables/create-row.md new file mode 100644 index 0000000000..1ce1e1db7a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-row.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Tables tables = Tables(client); + +Row result = await tables.createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md new file mode 100644 index 0000000000..219f2d2d33 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +RowList result = await tables.createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md new file mode 100644 index 0000000000..17e192b27e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnString result = await tables.createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md new file mode 100644 index 0000000000..d3692fc7ac --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnUrl result = await tables.createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create.md b/docs/examples/1.8.x/server-dart/examples/tables/create.md new file mode 100644 index 0000000000..c3a4b2a989 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/create.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Table result = await tables.create( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..33d296110c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Row result = await tables.decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: 0, // (optional) + min: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md new file mode 100644 index 0000000000..466564f618 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +await tables.deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md new file mode 100644 index 0000000000..f2dfdbe74b --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +await tables.deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md new file mode 100644 index 0000000000..b84c1b7a9f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tables tables = Tables(client); + +await tables.deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md new file mode 100644 index 0000000000..41dc3a9520 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +await tables.deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete.md b/docs/examples/1.8.x/server-dart/examples/tables/delete.md new file mode 100644 index 0000000000..07c9815422 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/delete.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +await tables.delete( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-column.md b/docs/examples/1.8.x/server-dart/examples/tables/get-column.md new file mode 100644 index 0000000000..087139c87d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/get-column.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + + result = await tables.getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-index.md b/docs/examples/1.8.x/server-dart/examples/tables/get-index.md new file mode 100644 index 0000000000..3f79deef2f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/get-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIndex result = await tables.getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-row.md b/docs/examples/1.8.x/server-dart/examples/tables/get-row.md new file mode 100644 index 0000000000..7efd04a69d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/get-row.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tables tables = Tables(client); + +Row result = await tables.getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get.md b/docs/examples/1.8.x/server-dart/examples/tables/get.md new file mode 100644 index 0000000000..d02f9ff9d2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/get.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Table result = await tables.get( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..188ab5d1ad --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Row result = await tables.incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: 0, // (optional) + max: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md b/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md new file mode 100644 index 0000000000..7b2d479ea3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnList result = await tables.listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md new file mode 100644 index 0000000000..e7418de3bc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIndexList result = await tables.listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md new file mode 100644 index 0000000000..05f9567ac2 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tables tables = Tables(client); + +RowList result = await tables.listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list.md b/docs/examples/1.8.x/server-dart/examples/tables/list.md new file mode 100644 index 0000000000..51a19c099d --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/list.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +TableList result = await tables.list( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..c452238d7c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnBoolean result = await tables.updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: false, + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..5b41d7e532 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnDatetime result = await tables.updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md new file mode 100644 index 0000000000..444649a4fd --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnEmail result = await tables.updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..2e0566418a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnEnum result = await tables.updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md new file mode 100644 index 0000000000..199d3840d6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnFloat result = await tables.updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..479e63d870 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnInteger result = await tables.updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..837ae4e606 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnIp result = await tables.updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..45745627ef --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnRelationship result = await tables.updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate.cascade, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-row.md b/docs/examples/1.8.x/server-dart/examples/tables/update-row.md new file mode 100644 index 0000000000..436329235a --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-row.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Tables tables = Tables(client); + +Row result = await tables.updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md new file mode 100644 index 0000000000..3d2aaf3e28 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +RowList result = await tables.updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: {}, // (optional) + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md new file mode 100644 index 0000000000..dbd569feac --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnString result = await tables.updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '<DEFAULT>', + size: 1, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md new file mode 100644 index 0000000000..8630c718b5 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +ColumnUrl result = await tables.updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update.md b/docs/examples/1.8.x/server-dart/examples/tables/update.md new file mode 100644 index 0000000000..28ce03cd6c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/update.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +Table result = await tables.update( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md new file mode 100644 index 0000000000..47f93f2434 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +Tables tables = Tables(client); + +Row result = await tables.upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..73ceffa917 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Tables tables = Tables(client); + +RowList result = await tables.upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..3f9abc8c05 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..898b67a787 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md new file mode 100644 index 0000000000..82872e4087 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..afbb8d00aa --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md new file mode 100644 index 0000000000..44658bbaa9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-index.md b/docs/examples/1.8.x/server-deno/examples/tables/create-index.md new file mode 100644 index 0000000000..c255189881 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-index.md @@ -0,0 +1,18 @@ +import { Client, Tables, IndexType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + IndexType.Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..0f1721b24a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..ca96de6293 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..8c7e26e62c --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md @@ -0,0 +1,19 @@ +import { Client, Tables, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-row.md b/docs/examples/1.8.x/server-deno/examples/tables/create-row.md new file mode 100644 index 0000000000..12cec49af0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-row.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const response = await tables.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md new file mode 100644 index 0000000000..6c4f7d5627 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md new file mode 100644 index 0000000000..db7ac8a760 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md new file mode 100644 index 0000000000..8d6f127c00 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create.md b/docs/examples/1.8.x/server-deno/examples/tables/create.md new file mode 100644 index 0000000000..9c75c22c3d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/create.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.create( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..e561acc529 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md new file mode 100644 index 0000000000..89900bfbf0 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md new file mode 100644 index 0000000000..a17791cef2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md new file mode 100644 index 0000000000..8f30eae2d2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new Tables(client); + +const response = await tables.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md new file mode 100644 index 0000000000..c5aa88f9a2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete.md b/docs/examples/1.8.x/server-deno/examples/tables/delete.md new file mode 100644 index 0000000000..36df1373dc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/delete.md @@ -0,0 +1,13 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.delete( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-column.md b/docs/examples/1.8.x/server-deno/examples/tables/get-column.md new file mode 100644 index 0000000000..8a56af67e7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/get-column.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-index.md b/docs/examples/1.8.x/server-deno/examples/tables/get-index.md new file mode 100644 index 0000000000..61105dc661 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/get-index.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-row.md b/docs/examples/1.8.x/server-deno/examples/tables/get-row.md new file mode 100644 index 0000000000..674ea3e648 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/get-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new Tables(client); + +const response = await tables.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get.md b/docs/examples/1.8.x/server-deno/examples/tables/get.md new file mode 100644 index 0000000000..cc1dcb8c51 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/get.md @@ -0,0 +1,13 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.get( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..9779d8776e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md b/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md new file mode 100644 index 0000000000..63ec0777bb --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md new file mode 100644 index 0000000000..587d19f362 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md new file mode 100644 index 0000000000..6db6bea439 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new Tables(client); + +const response = await tables.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list.md b/docs/examples/1.8.x/server-deno/examples/tables/list.md new file mode 100644 index 0000000000..d4da8409c9 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/list.md @@ -0,0 +1,14 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.list( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..8710c27ede --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..e1ca760e31 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md new file mode 100644 index 0000000000..b0e25348d4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..8771213a79 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md new file mode 100644 index 0000000000..a2e6f55c1f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..51ea17f943 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md @@ -0,0 +1,19 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..4a5a1d0f81 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..c83b82037a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md @@ -0,0 +1,16 @@ +import { Client, Tables, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-row.md b/docs/examples/1.8.x/server-deno/examples/tables/update-row.md new file mode 100644 index 0000000000..13da5615e7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-row.md @@ -0,0 +1,16 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new Tables(client); + +const response = await tables.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md new file mode 100644 index 0000000000..1bc0a18b98 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md new file mode 100644 index 0000000000..00dd310b1e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md @@ -0,0 +1,18 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md new file mode 100644 index 0000000000..2ebf80a356 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update.md b/docs/examples/1.8.x/server-deno/examples/tables/update.md new file mode 100644 index 0000000000..43b51bd284 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/update.md @@ -0,0 +1,17 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.update( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md new file mode 100644 index 0000000000..45e932c7f6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md @@ -0,0 +1,15 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new Tables(client); + +const response = await tables.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..9e3f542051 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md @@ -0,0 +1,13 @@ +import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new Tables(client); + +const response = await tables.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..1492487721 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnBoolean result = await tables.CreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..6a1e07b907 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnDatetime result = await tables.CreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md new file mode 100644 index 0000000000..a4740484f5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnEmail result = await tables.CreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..9529ad1331 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnEnum result = await tables.CreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md new file mode 100644 index 0000000000..f8146ce272 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnFloat result = await tables.CreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md new file mode 100644 index 0000000000..4ea3817da2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIndex result = await tables.CreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: IndexType.Key, + columns: new List<string>(), + orders: new List<string>(), // optional + lengths: new List<long>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..6090426792 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnInteger result = await tables.CreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..b5e5067e6f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIp result = await tables.CreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..7c4cba49dd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md @@ -0,0 +1,22 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnRelationship result = await tables.CreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: RelationMutate.Cascade // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md new file mode 100644 index 0000000000..642bfe457c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetKey("<YOUR_API_KEY>") // Your secret API key + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +Row result = await tables.CreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md new file mode 100644 index 0000000000..1d44dc51ed --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetAdmin("") // + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +RowList result = await tables.CreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: new List<object>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md new file mode 100644 index 0000000000..e623ac0789 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnString result = await tables.CreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md new file mode 100644 index 0000000000..7a0fbd0a83 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnUrl result = await tables.CreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create.md new file mode 100644 index 0000000000..694f4101a7 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/create.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Table result = await tables.Create( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..220fb2b18a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Row result = await tables.DecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + min: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md new file mode 100644 index 0000000000..ca8987eec9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +await tables.DeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md new file mode 100644 index 0000000000..ba7a024167 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +await tables.DeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md new file mode 100644 index 0000000000..95bae6ad6b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +await tables.DeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md new file mode 100644 index 0000000000..46a6e0ba94 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +await tables.DeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md new file mode 100644 index 0000000000..bcff3ea05a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +await tables.Delete( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md new file mode 100644 index 0000000000..71ebb81aef --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + + result = await tables.GetColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md new file mode 100644 index 0000000000..f5b886e3e9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIndex result = await tables.GetIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md new file mode 100644 index 0000000000..474b3342c9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +Row result = await tables.GetRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get.md new file mode 100644 index 0000000000..1e86d228a6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/get.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Table result = await tables.Get( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..e8ccd8ca78 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Row result = await tables.IncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + max: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md new file mode 100644 index 0000000000..fe8c739cf9 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnList result = await tables.ListColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md new file mode 100644 index 0000000000..907a21048f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIndexList result = await tables.ListIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md new file mode 100644 index 0000000000..474c597a1c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +RowList result = await tables.ListRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list.md new file mode 100644 index 0000000000..2871a927c4 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/list.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +TableList result = await tables.List( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..5c610fbe7a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnBoolean result = await tables.UpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..754d0f1ae6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnDatetime result = await tables.UpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md new file mode 100644 index 0000000000..6000c54e8f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnEmail result = await tables.UpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..2eaa1a51a1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnEnum result = await tables.UpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md new file mode 100644 index 0000000000..7d18d8e624 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnFloat result = await tables.UpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..0b3b85652c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnInteger result = await tables.UpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..ccdd0d5235 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnIp result = await tables.UpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..be6aa31f73 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnRelationship result = await tables.UpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: RelationMutate.Cascade, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md new file mode 100644 index 0000000000..d049ccf805 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +Row result = await tables.UpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md new file mode 100644 index 0000000000..9d2c51c4b3 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +RowList result = await tables.UpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [object], // optional + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md new file mode 100644 index 0000000000..da280e7d8c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnString result = await tables.UpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md new file mode 100644 index 0000000000..1ce961da2b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +ColumnUrl result = await tables.UpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update.md new file mode 100644 index 0000000000..584c61c6bb --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/update.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +Table result = await tables.Update( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md new file mode 100644 index 0000000000..a73c4e2402 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetKey("<YOUR_API_KEY>") // Your secret API key + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +Row result = await tables.UpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..07e5e927c6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetAdmin("") // + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +RowList result = await tables.UpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..70a666257f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateBooleanColumnDefault(false), + tables.WithCreateBooleanColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..beb8bd09e6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateDatetimeColumnDefault(""), + tables.WithCreateDatetimeColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md new file mode 100644 index 0000000000..449cc0e88a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateEmailColumnDefault("email@example.com"), + tables.WithCreateEmailColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..8f3bb84bb7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + tables.WithCreateEnumColumnDefault("<DEFAULT>"), + tables.WithCreateEnumColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md new file mode 100644 index 0000000000..eeabd851b9 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateFloatColumnMin(0), + tables.WithCreateFloatColumnMax(0), + tables.WithCreateFloatColumnDefault(0), + tables.WithCreateFloatColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-index.md b/docs/examples/1.8.x/server-go/examples/tables/create-index.md new file mode 100644 index 0000000000..1737b29f6f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-index.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + "key", + []interface{}{}, + tables.WithCreateIndexOrders([]interface{}{}), + tables.WithCreateIndexLengths([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..45a81f6415 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateIntegerColumnMin(0), + tables.WithCreateIntegerColumnMax(0), + tables.WithCreateIntegerColumnDefault(0), + tables.WithCreateIntegerColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..f6d203d65e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateIpColumnDefault(""), + tables.WithCreateIpColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..e2e6de59de --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<RELATED_TABLE_ID>", + "oneToOne", + tables.WithCreateRelationshipColumnTwoWay(false), + tables.WithCreateRelationshipColumnKey(""), + tables.WithCreateRelationshipColumnTwoWayKey(""), + tables.WithCreateRelationshipColumnOnDelete("cascade"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-row.md b/docs/examples/1.8.x/server-go/examples/tables/create-row.md new file mode 100644 index 0000000000..329f2a1c9c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-row.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithSession("") // The user session to authenticate with + client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := tables.New(client) + response, error := service.CreateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + map[string]interface{}{}, + tables.WithCreateRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-rows.md b/docs/examples/1.8.x/server-go/examples/tables/create-rows.md new file mode 100644 index 0000000000..7d32206bea --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithAdmin("") // + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md new file mode 100644 index 0000000000..afb41e2728 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + 1, + false, + tables.WithCreateStringColumnDefault("<DEFAULT>"), + tables.WithCreateStringColumnArray(false), + tables.WithCreateStringColumnEncrypt(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md new file mode 100644 index 0000000000..c4e30e30cd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.CreateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + tables.WithCreateUrlColumnDefault("https://example.com"), + tables.WithCreateUrlColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create.md b/docs/examples/1.8.x/server-go/examples/tables/create.md new file mode 100644 index 0000000000..672824daa6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/create.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.Create( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + tables.WithCreatePermissions(interface{}{"read("any")"}), + tables.WithCreateRowSecurity(false), + tables.WithCreateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..8ef1d26a59 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.DecrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + tables.WithDecrementRowColumnValue(0), + tables.WithDecrementRowColumnMin(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-column.md b/docs/examples/1.8.x/server-go/examples/tables/delete-column.md new file mode 100644 index 0000000000..f66fc199c3 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete-column.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.DeleteColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-index.md b/docs/examples/1.8.x/server-go/examples/tables/delete-index.md new file mode 100644 index 0000000000..1dddeef4e8 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.DeleteIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-row.md b/docs/examples/1.8.x/server-go/examples/tables/delete-row.md new file mode 100644 index 0000000000..9f55934e41 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete-row.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tables.New(client) + response, error := service.DeleteRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md new file mode 100644 index 0000000000..3ad38f8067 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.DeleteRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithDeleteRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete.md b/docs/examples/1.8.x/server-go/examples/tables/delete.md new file mode 100644 index 0000000000..9637acc51d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/delete.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.Delete( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-column.md b/docs/examples/1.8.x/server-go/examples/tables/get-column.md new file mode 100644 index 0000000000..292d22800e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/get-column.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.GetColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-index.md b/docs/examples/1.8.x/server-go/examples/tables/get-index.md new file mode 100644 index 0000000000..077e823195 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/get-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.GetIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-row.md b/docs/examples/1.8.x/server-go/examples/tables/get-row.md new file mode 100644 index 0000000000..a224c60d98 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/get-row.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tables.New(client) + response, error := service.GetRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tables.WithGetRowQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get.md b/docs/examples/1.8.x/server-go/examples/tables/get.md new file mode 100644 index 0000000000..60304a8fd0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/get.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.Get( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..5d8b2f5578 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.IncrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + tables.WithIncrementRowColumnValue(0), + tables.WithIncrementRowColumnMax(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-columns.md b/docs/examples/1.8.x/server-go/examples/tables/list-columns.md new file mode 100644 index 0000000000..25712ef2a7 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/list-columns.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.ListColumns( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithListColumnsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md new file mode 100644 index 0000000000..0be8e81164 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.ListIndexes( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithListIndexesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-rows.md b/docs/examples/1.8.x/server-go/examples/tables/list-rows.md new file mode 100644 index 0000000000..aadbcf1dad --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/list-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tables.New(client) + response, error := service.ListRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithListRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list.md b/docs/examples/1.8.x/server-go/examples/tables/list.md new file mode 100644 index 0000000000..1942b7a2d2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/list.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.List( + "<DATABASE_ID>", + tables.WithListQueries([]interface{}{}), + tables.WithListSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..c76c3bb1cc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + false, + tables.WithUpdateBooleanColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..e093904ad5 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + tables.WithUpdateDatetimeColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md new file mode 100644 index 0000000000..08845b5149 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "email@example.com", + tables.WithUpdateEmailColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..e639f850ba --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + "<DEFAULT>", + tables.WithUpdateEnumColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md new file mode 100644 index 0000000000..83fa3777c2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + tables.WithUpdateFloatColumnMin(0), + tables.WithUpdateFloatColumnMax(0), + tables.WithUpdateFloatColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..5bbea02709 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + tables.WithUpdateIntegerColumnMin(0), + tables.WithUpdateIntegerColumnMax(0), + tables.WithUpdateIntegerColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..f67711aaed --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + tables.WithUpdateIpColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..1ec20edbb6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + tables.WithUpdateRelationshipColumnOnDelete("cascade"), + tables.WithUpdateRelationshipColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-row.md b/docs/examples/1.8.x/server-go/examples/tables/update-row.md new file mode 100644 index 0000000000..8ef1189769 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-row.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := tables.New(client) + response, error := service.UpdateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + tables.WithUpdateRowData(map[string]interface{}{}), + tables.WithUpdateRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-rows.md b/docs/examples/1.8.x/server-go/examples/tables/update-rows.md new file mode 100644 index 0000000000..7579e32851 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-rows.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + tables.WithUpdateRowsData(map[string]interface{}{}), + tables.WithUpdateRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md new file mode 100644 index 0000000000..0a21b05e19 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "<DEFAULT>", + tables.WithUpdateStringColumnSize(1), + tables.WithUpdateStringColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md new file mode 100644 index 0000000000..aeb0541648 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpdateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "https://example.com", + tables.WithUpdateUrlColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update.md b/docs/examples/1.8.x/server-go/examples/tables/update.md new file mode 100644 index 0000000000..7a75c10713 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/update.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.Update( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + tables.WithUpdatePermissions(interface{}{"read("any")"}), + tables.WithUpdateRowSecurity(false), + tables.WithUpdateEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md new file mode 100644 index 0000000000..9bc9f00f8b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithSession("") // The user session to authenticate with + client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token + ) + + service := tables.New(client) + response, error := service.UpsertRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..bc5a4db007 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/tables" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithAdmin("") // + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := tables.New(client) + response, error := service.UpsertRows( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..564b1a964c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md @@ -0,0 +1,20 @@ +mutation { + tablesCreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..34055c27fa --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md new file mode 100644 index 0000000000..a45001d0be --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..5d1c516e3a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md @@ -0,0 +1,23 @@ +mutation { + tablesCreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md new file mode 100644 index 0000000000..09bf481a33 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md @@ -0,0 +1,24 @@ +mutation { + tablesCreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md new file mode 100644 index 0000000000..bc47403c64 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: "key", + columns: [], + orders: [], + lengths: [] + ) { + key + type + status + error + columns + lengths + orders + _createdAt + _updatedAt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..04273b18b5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md @@ -0,0 +1,24 @@ +mutation { + tablesCreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..c2f07c760b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..8e56bd3867 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md @@ -0,0 +1,27 @@ +mutation { + tablesCreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: "oneToOne", + twoWay: false, + key: "", + twoWayKey: "", + onDelete: "cascade" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md new file mode 100644 index 0000000000..c88a7f36cf --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md @@ -0,0 +1,18 @@ +mutation { + tablesCreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md new file mode 100644 index 0000000000..a4ae62cfae --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md @@ -0,0 +1,19 @@ +mutation { + tablesCreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md new file mode 100644 index 0000000000..b0b11c2610 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md @@ -0,0 +1,24 @@ +mutation { + tablesCreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md new file mode 100644 index 0000000000..134208b432 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md @@ -0,0 +1,21 @@ +mutation { + tablesCreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create.md b/docs/examples/1.8.x/server-graphql/examples/tables/create.md new file mode 100644 index 0000000000..73af2c4a8c --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/create.md @@ -0,0 +1,31 @@ +mutation { + tablesCreate( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], + rowSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + key + type + status + error + columns + lengths + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..4ee58849ff --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +mutation { + tablesDecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, + min: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md new file mode 100644 index 0000000000..2c2ab098d6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md @@ -0,0 +1,9 @@ +mutation { + tablesDeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md new file mode 100644 index 0000000000..c95db41fd6 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md @@ -0,0 +1,9 @@ +mutation { + tablesDeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md new file mode 100644 index 0000000000..f3a35c1df1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md @@ -0,0 +1,9 @@ +mutation { + tablesDeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md new file mode 100644 index 0000000000..1ee227b7e5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md @@ -0,0 +1,19 @@ +mutation { + tablesDeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete.md new file mode 100644 index 0000000000..1749422f6a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/delete.md @@ -0,0 +1,8 @@ +mutation { + tablesDelete( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-column.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-index.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-row.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get.md b/docs/examples/1.8.x/server-graphql/examples/tables/get.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..f84f149672 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md @@ -0,0 +1,19 @@ +mutation { + tablesIncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, + max: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list.md b/docs/examples/1.8.x/server-graphql/examples/tables/list.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..541abd97cc --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md @@ -0,0 +1,20 @@ +mutation { + tablesUpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..01714377a4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md @@ -0,0 +1,21 @@ +mutation { + tablesUpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md new file mode 100644 index 0000000000..ffb3a21e66 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md @@ -0,0 +1,21 @@ +mutation { + tablesUpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..45ddb00d6f --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md @@ -0,0 +1,23 @@ +mutation { + tablesUpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md new file mode 100644 index 0000000000..f592a53858 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md @@ -0,0 +1,24 @@ +mutation { + tablesUpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..a51f02d4d7 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md @@ -0,0 +1,24 @@ +mutation { + tablesUpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..c353c79105 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md @@ -0,0 +1,21 @@ +mutation { + tablesUpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..e94800345b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md @@ -0,0 +1,24 @@ +mutation { + tablesUpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: "cascade", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md new file mode 100644 index 0000000000..8449d8499b --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md @@ -0,0 +1,18 @@ +mutation { + tablesUpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md new file mode 100644 index 0000000000..510648f6e1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md @@ -0,0 +1,20 @@ +mutation { + tablesUpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: "{}", + queries: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md new file mode 100644 index 0000000000..0771d9a6af --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md @@ -0,0 +1,23 @@ +mutation { + tablesUpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md new file mode 100644 index 0000000000..a5c4a4432d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md @@ -0,0 +1,21 @@ +mutation { + tablesUpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update.md b/docs/examples/1.8.x/server-graphql/examples/tables/update.md new file mode 100644 index 0000000000..4aa434c3ed --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/update.md @@ -0,0 +1,31 @@ +mutation { + tablesUpdate( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], + rowSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + key + type + status + error + columns + lengths + orders + _createdAt + _updatedAt + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md new file mode 100644 index 0000000000..480d7651bd --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +mutation { + tablesUpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..6015470c16 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md @@ -0,0 +1,18 @@ +mutation { + tablesUpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md new file mode 100644 index 0000000000..2336ee90e0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md new file mode 100644 index 0000000000..dd3df83dbf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md new file mode 100644 index 0000000000..3b130d1ecd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md new file mode 100644 index 0000000000..73c6e1c7de --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md new file mode 100644 index 0000000000..dd6f207ff4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md new file mode 100644 index 0000000000..2a4df003c0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; +import io.appwrite.enums.IndexType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + IndexType.KEY, // type + listOf(), // columns + listOf(), // orders (optional) + listOf(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md new file mode 100644 index 0000000000..3546ac8174 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md new file mode 100644 index 0000000000..825d8b0c5c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md new file mode 100644 index 0000000000..7a0b50a541 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; +import io.appwrite.enums.RelationshipType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<RELATED_TABLE_ID>", // relatedTableId + RelationshipType.ONETOONE, // type + false, // twoWay (optional) + "", // key (optional) + "", // twoWayKey (optional) + RelationMutate.CASCADE, // onDelete (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md new file mode 100644 index 0000000000..7ba3678aad --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.createRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md new file mode 100644 index 0000000000..c20aa2c11f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md new file mode 100644 index 0000000000..b8cb626601 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + 1, // size + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + false, // encrypt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md new file mode 100644 index 0000000000..91e90c8bc4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.createUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create.md b/docs/examples/1.8.x/server-kotlin/java/tables/create.md new file mode 100644 index 0000000000..6a9faf06dd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/create.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.create( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md new file mode 100644 index 0000000000..9e79f36e14 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.decrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // min (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md new file mode 100644 index 0000000000..f14390c905 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.deleteColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md new file mode 100644 index 0000000000..1b22eb00d8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.deleteIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md new file mode 100644 index 0000000000..a48745a225 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.deleteRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md new file mode 100644 index 0000000000..6a86321fad --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.deleteRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete.md new file mode 100644 index 0000000000..e777c7292e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/delete.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.delete( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md new file mode 100644 index 0000000000..b4f7e1298f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.getColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md new file mode 100644 index 0000000000..5bcd59d4cd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.getIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md new file mode 100644 index 0000000000..7f72c25cd8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.getRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get.md b/docs/examples/1.8.x/server-kotlin/java/tables/get.md new file mode 100644 index 0000000000..6f3c639450 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/get.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.get( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md new file mode 100644 index 0000000000..f9c828398a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.incrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // max (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md new file mode 100644 index 0000000000..05e1960021 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.listColumns( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md new file mode 100644 index 0000000000..c9bd445fe8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.listIndexes( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md new file mode 100644 index 0000000000..8cbc356556 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.listRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list.md b/docs/examples/1.8.x/server-kotlin/java/tables/list.md new file mode 100644 index 0000000000..c3e0c559aa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/list.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.list( + "<DATABASE_ID>", // databaseId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md new file mode 100644 index 0000000000..647190e7bc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md new file mode 100644 index 0000000000..38e0e60da5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md new file mode 100644 index 0000000000..918884e0b3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md new file mode 100644 index 0000000000..b1bbc83520 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md new file mode 100644 index 0000000000..977c23727c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md new file mode 100644 index 0000000000..d2ad81d0eb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md new file mode 100644 index 0000000000..cd6e67bc2c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md new file mode 100644 index 0000000000..e0dc185e0e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + RelationMutate.CASCADE, // onDelete (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md new file mode 100644 index 0000000000..8270c3fa9b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Tables tables = new Tables(client); + +tables.updateRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md new file mode 100644 index 0000000000..a51878508f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + mapOf( "a" to "b" ), // data (optional) + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md new file mode 100644 index 0000000000..31e279d068 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "<DEFAULT>", // default + 1, // size (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md new file mode 100644 index 0000000000..201e578ac6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.updateUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update.md b/docs/examples/1.8.x/server-kotlin/java/tables/update.md new file mode 100644 index 0000000000..cf560cb461 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/update.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.update( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md new file mode 100644 index 0000000000..11127c5bfa --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + +Tables tables = new Tables(client); + +tables.upsertRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md new file mode 100644 index 0000000000..14b382263b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Tables; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Tables tables = new Tables(client); + +tables.upsertRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md new file mode 100644 index 0000000000..68b8dc51bd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md new file mode 100644 index 0000000000..8740a71d3c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md new file mode 100644 index 0000000000..34a6cb669f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md new file mode 100644 index 0000000000..d3d2fc9286 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md new file mode 100644 index 0000000000..8540430cea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md new file mode 100644 index 0000000000..053c88a93a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables +import io.appwrite.enums.IndexType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + type = IndexType.KEY, + columns = listOf(), + orders = listOf(), // optional + lengths = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md new file mode 100644 index 0000000000..1222746259 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md new file mode 100644 index 0000000000..277c756d24 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md new file mode 100644 index 0000000000..aa07fac6a8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables +import io.appwrite.enums.RelationshipType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + relatedTableId = "<RELATED_TABLE_ID>", + type = RelationshipType.ONETOONE, + twoWay = false, // optional + key = "", // optional + twoWayKey = "", // optional + onDelete = "cascade" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md new file mode 100644 index 0000000000..5df0890f99 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val tables = Tables(client) + +val response = tables.createRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md new file mode 100644 index 0000000000..f549d6fb8c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf() +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md new file mode 100644 index 0000000000..d82026c31d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + size = 1, + required = false, + default = "<DEFAULT>", // optional + array = false, // optional + encrypt = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md new file mode 100644 index 0000000000..42f50e9ec9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.createUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md new file mode 100644 index 0000000000..3dc1d1a37d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.create( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md new file mode 100644 index 0000000000..f78f7bbed7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.decrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + min = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md new file mode 100644 index 0000000000..d41f2ceabf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.deleteColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md new file mode 100644 index 0000000000..7af6648f2f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.deleteIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md new file mode 100644 index 0000000000..d182ccff95 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.deleteRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md new file mode 100644 index 0000000000..54ff6b690c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.deleteRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md new file mode 100644 index 0000000000..5cbd03226a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.delete( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md new file mode 100644 index 0000000000..6f4d65b4dc --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.getColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md new file mode 100644 index 0000000000..660502f228 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.getIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md new file mode 100644 index 0000000000..cbaaa6c3e9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.getRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md new file mode 100644 index 0000000000..ff6d354c15 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.get( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md new file mode 100644 index 0000000000..7917b7f939 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.incrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + max = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md new file mode 100644 index 0000000000..4c1765193d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.listColumns( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md new file mode 100644 index 0000000000..bcd1fe75ab --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.listIndexes( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md new file mode 100644 index 0000000000..38b776acb8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.listRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md new file mode 100644 index 0000000000..37b03445da --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.list( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md new file mode 100644 index 0000000000..10a0422d2d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md new file mode 100644 index 0000000000..69ccf0354e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md new file mode 100644 index 0000000000..593a89b4ce --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md new file mode 100644 index 0000000000..b672e3e155 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md new file mode 100644 index 0000000000..005c4e64a5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md new file mode 100644 index 0000000000..39da19d562 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md new file mode 100644 index 0000000000..40e54bcdfd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md new file mode 100644 index 0000000000..d4c36e8802 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + onDelete = "cascade", // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md new file mode 100644 index 0000000000..6d3d9a47f7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val tables = Tables(client) + +val response = tables.updateRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md new file mode 100644 index 0000000000..aac87c19b0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + data = mapOf( "a" to "b" ), // optional + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md new file mode 100644 index 0000000000..bb5b1f4bcf --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "<DEFAULT>", + size = 1, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md new file mode 100644 index 0000000000..07f43e3907 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.updateUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md new file mode 100644 index 0000000000..381532316d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.update( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md new file mode 100644 index 0000000000..6e02b3abe9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +val tables = Tables(client) + +val response = tables.upsertRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md new file mode 100644 index 0000000000..d639e3d30b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Tables + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +val tables = Tables(client) + +val response = tables.upsertRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..64893d77a8 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..0d63244727 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md new file mode 100644 index 0000000000..2257fdd7d6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..dbc75feea5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md new file mode 100644 index 0000000000..690b5849eb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md new file mode 100644 index 0000000000..aef047ba5f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + sdk.IndexType.Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..05e66b548c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..69b5c635d2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..b6e7fa517f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + sdk.RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + sdk.RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md new file mode 100644 index 0000000000..84da608d41 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new sdk.Tables(client); + +const result = await tables.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md new file mode 100644 index 0000000000..6a6918b8df --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md new file mode 100644 index 0000000000..8e14cb45c9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md new file mode 100644 index 0000000000..73cdfa3710 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create.md new file mode 100644 index 0000000000..54d6bc61bd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/create.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.create( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..2e7df6aa92 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md new file mode 100644 index 0000000000..a892c61baa --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md new file mode 100644 index 0000000000..f6bc7919db --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md new file mode 100644 index 0000000000..5bc60cd6cb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new sdk.Tables(client); + +const result = await tables.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md new file mode 100644 index 0000000000..11b16b71ae --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md new file mode 100644 index 0000000000..fed3eee5a4 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.delete( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md new file mode 100644 index 0000000000..daa20e17e2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md new file mode 100644 index 0000000000..56ba871d67 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md new file mode 100644 index 0000000000..df952d9595 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new sdk.Tables(client); + +const result = await tables.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get.md new file mode 100644 index 0000000000..b078574b5c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/get.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.get( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..bb5856c74a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md new file mode 100644 index 0000000000..f9af43bea5 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md new file mode 100644 index 0000000000..7eaf4b8710 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md new file mode 100644 index 0000000000..aa5b341649 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new sdk.Tables(client); + +const result = await tables.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list.md new file mode 100644 index 0000000000..872a98df08 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/list.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.list( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..84ff5d2bef --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..c02559a171 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md new file mode 100644 index 0000000000..9560b60e29 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..861fce6add --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md new file mode 100644 index 0000000000..01845ca3cc --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..0b7432247f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..6ba5eccf3e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..3409b8caad --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + sdk.RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md new file mode 100644 index 0000000000..ff8e98eb38 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const tables = new sdk.Tables(client); + +const result = await tables.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md new file mode 100644 index 0000000000..72cef07202 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md new file mode 100644 index 0000000000..f9445a50c1 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md new file mode 100644 index 0000000000..c6ffdf3044 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update.md new file mode 100644 index 0000000000..4fd981ffbf --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/update.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.update( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md new file mode 100644 index 0000000000..2b08d56785 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +const tables = new sdk.Tables(client); + +const result = await tables.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..75d681dbf0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const tables = new sdk.Tables(client); + +const result = await tables.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..28339753ac --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..d7f18f2ede --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md new file mode 100644 index 0000000000..15ec2cf2e5 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..aa2b6138f7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md new file mode 100644 index 0000000000..1f620dc887 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-index.md b/docs/examples/1.8.x/server-php/examples/tables/create-index.md new file mode 100644 index 0000000000..9844e041d4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-index.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; +use Appwrite\Enums\IndexType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType::KEY(), + columns: [], + orders: [], // optional + lengths: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..185f12c5cb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..1f74e4dd72 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..c86b4c558a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md @@ -0,0 +1,23 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; +use Appwrite\Enums\RelationshipType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType::ONETOONE(), + twoWay: false, // optional + key: '', // optional + twoWayKey: '', // optional + onDelete: RelationMutate::CASCADE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-row.md b/docs/examples/1.8.x/server-php/examples/tables/create-row.md new file mode 100644 index 0000000000..6b64a7e058 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-row.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setKey('<YOUR_API_KEY>') // Your secret API key + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$tables = new Tables($client); + +$result = $tables->createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-rows.md b/docs/examples/1.8.x/server-php/examples/tables/create-rows.md new file mode 100644 index 0000000000..a1bf72ad13 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setAdmin('') // + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md new file mode 100644 index 0000000000..085aff25c8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md new file mode 100644 index 0000000000..d0bdb55dd4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create.md b/docs/examples/1.8.x/server-php/examples/tables/create.md new file mode 100644 index 0000000000..773d7a24eb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/create.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->create( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..b0c44b6d0a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + min: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-column.md b/docs/examples/1.8.x/server-php/examples/tables/delete-column.md new file mode 100644 index 0000000000..9bd6738cb7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete-column.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-index.md b/docs/examples/1.8.x/server-php/examples/tables/delete-index.md new file mode 100644 index 0000000000..bbd748433a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-row.md b/docs/examples/1.8.x/server-php/examples/tables/delete-row.md new file mode 100644 index 0000000000..0c4ab6ef40 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete-row.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tables = new Tables($client); + +$result = $tables->deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md new file mode 100644 index 0000000000..b0c984cc17 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete.md b/docs/examples/1.8.x/server-php/examples/tables/delete.md new file mode 100644 index 0000000000..f145eedc91 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/delete.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->delete( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-column.md b/docs/examples/1.8.x/server-php/examples/tables/get-column.md new file mode 100644 index 0000000000..b8b676564e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/get-column.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-index.md b/docs/examples/1.8.x/server-php/examples/tables/get-index.md new file mode 100644 index 0000000000..5d1139d596 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/get-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-row.md b/docs/examples/1.8.x/server-php/examples/tables/get-row.md new file mode 100644 index 0000000000..ccde387b89 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/get-row.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tables = new Tables($client); + +$result = $tables->getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get.md b/docs/examples/1.8.x/server-php/examples/tables/get.md new file mode 100644 index 0000000000..d07ef7338a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/get.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->get( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..aa5a3c0d53 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + max: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-columns.md b/docs/examples/1.8.x/server-php/examples/tables/list-columns.md new file mode 100644 index 0000000000..0338567240 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/list-columns.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md new file mode 100644 index 0000000000..df1f8c6aca --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-rows.md b/docs/examples/1.8.x/server-php/examples/tables/list-rows.md new file mode 100644 index 0000000000..2041d72b05 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/list-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tables = new Tables($client); + +$result = $tables->listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list.md b/docs/examples/1.8.x/server-php/examples/tables/list.md new file mode 100644 index 0000000000..37df0a4baa --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/list.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->list( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..8ad80506d8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..5185357f17 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md new file mode 100644 index 0000000000..7acbb811eb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..478905af67 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md new file mode 100644 index 0000000000..1d9c5fd997 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..f6998db0a2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..e7906fbd0f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..d6505c77f1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate::CASCADE(), // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-row.md b/docs/examples/1.8.x/server-php/examples/tables/update-row.md new file mode 100644 index 0000000000..921c43d935 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-row.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$tables = new Tables($client); + +$result = $tables->updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-rows.md b/docs/examples/1.8.x/server-php/examples/tables/update-rows.md new file mode 100644 index 0000000000..f61fa2b17d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-rows.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: [], // optional + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md new file mode 100644 index 0000000000..8856ec19c1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md new file mode 100644 index 0000000000..faa46d1806 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update.md b/docs/examples/1.8.x/server-php/examples/tables/update.md new file mode 100644 index 0000000000..39f076b8f8 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/update.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->update( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md new file mode 100644 index 0000000000..2bddd9b5b3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setKey('<YOUR_API_KEY>') // Your secret API key + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + +$tables = new Tables($client); + +$result = $tables->upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..5ed5f028a9 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Tables; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setAdmin('') // + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$tables = new Tables($client); + +$result = $tables->upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..cfbaa3b0ee --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = False, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..a9f76b5e5f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md new file mode 100644 index 0000000000..73ac0faad6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'email@example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..2013c39fa0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md new file mode 100644 index 0000000000..a56a196093 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-index.md b/docs/examples/1.8.x/server-python/examples/tables/create-index.md new file mode 100644 index 0000000000..69086af0b0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-index.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables +from appwrite.enums import IndexType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + type = IndexType.KEY, + columns = [], + orders = [], # optional + lengths = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..d52b14bc5c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..b5c7ef56db --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..187271f887 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md @@ -0,0 +1,21 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables +from appwrite.enums import RelationshipType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + related_table_id = '<RELATED_TABLE_ID>', + type = RelationshipType.ONETOONE, + two_way = False, # optional + key = '', # optional + two_way_key = '', # optional + on_delete = RelationMutate.CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-row.md b/docs/examples/1.8.x/server-python/examples/tables/create-row.md new file mode 100644 index 0000000000..8850a974b8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-row.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_session('') # The user session to authenticate with +client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +tables = Tables(client) + +result = tables.create_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-rows.md b/docs/examples/1.8.x/server-python/examples/tables/create-rows.md new file mode 100644 index 0000000000..3fae165081 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_admin('') # +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [] +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md new file mode 100644 index 0000000000..1308fea2ad --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + size = 1, + required = False, + default = '<DEFAULT>', # optional + array = False, # optional + encrypt = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md new file mode 100644 index 0000000000..f15c3e0574 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'https://example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create.md b/docs/examples/1.8.x/server-python/examples/tables/create.md new file mode 100644 index 0000000000..3a02843c4d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/create.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.create( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + row_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..bf027d6e76 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.decrement_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '', + value = None, # optional + min = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-column.md b/docs/examples/1.8.x/server-python/examples/tables/delete-column.md new file mode 100644 index 0000000000..cf2dd6d5e5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete-column.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.delete_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-index.md b/docs/examples/1.8.x/server-python/examples/tables/delete-index.md new file mode 100644 index 0000000000..5f78d1ce1d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.delete_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-row.md b/docs/examples/1.8.x/server-python/examples/tables/delete-row.md new file mode 100644 index 0000000000..40a8b09fcf --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables = Tables(client) + +result = tables.delete_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md new file mode 100644 index 0000000000..236aea1c9b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.delete_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete.md b/docs/examples/1.8.x/server-python/examples/tables/delete.md new file mode 100644 index 0000000000..de48bfc2b5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/delete.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.delete( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-column.md b/docs/examples/1.8.x/server-python/examples/tables/get-column.md new file mode 100644 index 0000000000..4bd4617142 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/get-column.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.get_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-index.md b/docs/examples/1.8.x/server-python/examples/tables/get-index.md new file mode 100644 index 0000000000..cf88017fbe --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/get-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.get_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-row.md b/docs/examples/1.8.x/server-python/examples/tables/get-row.md new file mode 100644 index 0000000000..25fefb23fd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/get-row.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables = Tables(client) + +result = tables.get_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get.md b/docs/examples/1.8.x/server-python/examples/tables/get.md new file mode 100644 index 0000000000..789410cfb7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/get.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.get( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..cfb923029e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.increment_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '', + value = None, # optional + max = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-columns.md b/docs/examples/1.8.x/server-python/examples/tables/list-columns.md new file mode 100644 index 0000000000..d9c5b16468 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/list-columns.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.list_columns( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md new file mode 100644 index 0000000000..0b0bb585e7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.list_indexes( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-rows.md b/docs/examples/1.8.x/server-python/examples/tables/list-rows.md new file mode 100644 index 0000000000..2ece6f6cf7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables = Tables(client) + +result = tables.list_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list.md b/docs/examples/1.8.x/server-python/examples/tables/list.md new file mode 100644 index 0000000000..55a99e996d --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/list.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.list( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..1bc7a4afac --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = False, + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..157ff44a7b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md new file mode 100644 index 0000000000..8b9e4cad36 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'email@example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..b46971beac --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md new file mode 100644 index 0000000000..243a26f0aa --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..99b55c17a7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..2fb470ae6e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..35a307c7e2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + on_delete = RelationMutate.CASCADE, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-row.md b/docs/examples/1.8.x/server-python/examples/tables/update-row.md new file mode 100644 index 0000000000..4a71fc97f2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-row.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +tables = Tables(client) + +result = tables.update_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-rows.md b/docs/examples/1.8.x/server-python/examples/tables/update-rows.md new file mode 100644 index 0000000000..a834346678 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-rows.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + data = {}, # optional + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md new file mode 100644 index 0000000000..252c26433e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '<DEFAULT>', + size = 1, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md new file mode 100644 index 0000000000..235e2f3bc4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'https://example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update.md b/docs/examples/1.8.x/server-python/examples/tables/update.md new file mode 100644 index 0000000000..c567bd5500 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/update.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.update( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + row_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md new file mode 100644 index 0000000000..e418708bc3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_session('') # The user session to authenticate with +client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +tables = Tables(client) + +result = tables.upsert_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..85c2e94d69 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.tables import Tables + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_admin('') # +client.set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables(client) + +result = tables.upsert_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..4152d8538f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/boolean HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": false, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..d5318d96db --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/datetime HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md new file mode 100644 index 0000000000..b213fa6ceb --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "email@example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..125f617f1f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/enum HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "elements": [], + "required": false, + "default": "<DEFAULT>", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md new file mode 100644 index 0000000000..2e010318ff --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/float HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-index.md b/docs/examples/1.8.x/server-rest/examples/tables/create-index.md new file mode 100644 index 0000000000..eaddec973a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-index.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "type": "key", + "columns": [], + "orders": [], + "lengths": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..f284dc03ef --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/integer HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..8def17fc27 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/ip HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..d8feb21916 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "relatedTableId": "<RELATED_TABLE_ID>", + "type": "oneToOne", + "twoWay": false, + "key": , + "twoWayKey": , + "onDelete": "cascade" +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-row.md b/docs/examples/1.8.x/server-rest/examples/tables/create-row.md new file mode 100644 index 0000000000..075be16fa4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-row.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rowId": "<ROW_ID>", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md new file mode 100644 index 0000000000..ad3d6983cc --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md @@ -0,0 +1,12 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rows": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md new file mode 100644 index 0000000000..e654a05e3a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/string HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "size": 1, + "required": false, + "default": "<DEFAULT>", + "array": false, + "encrypt": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md new file mode 100644 index 0000000000..d98d77c68d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/tables/{tableId}/columns/url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "https://example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create.md b/docs/examples/1.8.x/server-rest/examples/tables/create.md new file mode 100644 index 0000000000..14e1f6ec05 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/create.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/tables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "tableId": "<TABLE_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..a76efb3a69 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "min": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md new file mode 100644 index 0000000000..2bda57366c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md new file mode 100644 index 0000000000..ffffc38c64 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md new file mode 100644 index 0000000000..f10adef821 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md @@ -0,0 +1,9 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md new file mode 100644 index 0000000000..fcaf8fb472 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md @@ -0,0 +1,10 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete.md b/docs/examples/1.8.x/server-rest/examples/tables/delete.md new file mode 100644 index 0000000000..379bead1ad --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/delete.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-column.md b/docs/examples/1.8.x/server-rest/examples/tables/get-column.md new file mode 100644 index 0000000000..31d1856539 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/get-column.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-index.md b/docs/examples/1.8.x/server-rest/examples/tables/get-index.md new file mode 100644 index 0000000000..076058d7f3 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/get-index.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-row.md b/docs/examples/1.8.x/server-rest/examples/tables/get-row.md new file mode 100644 index 0000000000..0b827f18a8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/get-row.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get.md b/docs/examples/1.8.x/server-rest/examples/tables/get.md new file mode 100644 index 0000000000..74877ec0c0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/get.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..480645c39c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "max": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md b/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md new file mode 100644 index 0000000000..152b36ca26 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/columns HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md new file mode 100644 index 0000000000..ee10a85d5e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md new file mode 100644 index 0000000000..46e69ab609 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list.md b/docs/examples/1.8.x/server-rest/examples/tables/list.md new file mode 100644 index 0000000000..e856ef7241 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/list.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/tables HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..e4a1c4602a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/boolean/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": false, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..6b531dc604 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/datetime/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md new file mode 100644 index 0000000000..531aa7a31a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/email/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "email@example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..b02936fc5a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/enum/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "elements": [], + "required": false, + "default": "<DEFAULT>", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md new file mode 100644 index 0000000000..313acb6c20 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/float/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..a2552e93ff --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/integer/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..b3cef978e2 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/ip/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..19fed27fdf --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/{key}/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "onDelete": "cascade", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-row.md b/docs/examples/1.8.x/server-rest/examples/tables/update-row.md new file mode 100644 index 0000000000..20c92d746b --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-row.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md new file mode 100644 index 0000000000..249653070c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "data": {}, + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md new file mode 100644 index 0000000000..7a25ee52e8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/string/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "<DEFAULT>", + "size": 1, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md new file mode 100644 index 0000000000..2097e91d85 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/url/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "https://example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update.md b/docs/examples/1.8.x/server-rest/examples/tables/update.md new file mode 100644 index 0000000000..786a36cf3c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/update.md @@ -0,0 +1,13 @@ +PUT /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md new file mode 100644 index 0000000000..7edca8018c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md @@ -0,0 +1,9 @@ +PUT /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..cfcb914866 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md @@ -0,0 +1,7 @@ +PUT /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..7df3908513 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: false, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..2d65509184 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md new file mode 100644 index 0000000000..01f7ad43b5 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..97fcb589e4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md new file mode 100644 index 0000000000..9df32a3f5b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md new file mode 100644 index 0000000000..3c8dfdfb6b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + type: IndexType::KEY, + columns: [], + orders: [], # optional + lengths: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..d0c5c78108 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..0c97840a27 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..8f7fb841aa --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md @@ -0,0 +1,22 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + related_table_id: '<RELATED_TABLE_ID>', + type: RelationshipType::ONETOONE, + two_way: false, # optional + key: '', # optional + two_way_key: '', # optional + on_delete: RelationMutate::CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md new file mode 100644 index 0000000000..a625249700 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_key('<YOUR_API_KEY>') # Your secret API key + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +tables = Tables.new(client) + +result = tables.create_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md new file mode 100644 index 0000000000..2e78b96cbc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_admin('') # + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + rows: [] +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md new file mode 100644 index 0000000000..d47cf49e0c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', # optional + array: false, # optional + encrypt: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md new file mode 100644 index 0000000000..fcfebac7a8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create.md b/docs/examples/1.8.x/server-ruby/examples/tables/create.md new file mode 100644 index 0000000000..5a255fafac --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/create.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.create( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + row_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..e22afcb0ad --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.decrement_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '', + value: null, # optional + min: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md new file mode 100644 index 0000000000..245864053f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.delete_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md new file mode 100644 index 0000000000..54bd5455aa --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.delete_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md new file mode 100644 index 0000000000..9841fc2d2f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables = Tables.new(client) + +result = tables.delete_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md new file mode 100644 index 0000000000..7be1e4bc70 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.delete_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete.md new file mode 100644 index 0000000000..ca607f2b6b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/delete.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.delete( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md new file mode 100644 index 0000000000..1a1469d005 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.get_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md new file mode 100644 index 0000000000..7d762ce8ae --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.get_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md new file mode 100644 index 0000000000..4526bb7316 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables = Tables.new(client) + +result = tables.get_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get.md b/docs/examples/1.8.x/server-ruby/examples/tables/get.md new file mode 100644 index 0000000000..22ba02aebc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/get.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.get( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..c0a91d4b62 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.increment_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '', + value: null, # optional + max: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md new file mode 100644 index 0000000000..7e851564c2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.list_columns( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md new file mode 100644 index 0000000000..0789291071 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.list_indexes( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md new file mode 100644 index 0000000000..bc9a0a49f6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables = Tables.new(client) + +result = tables.list_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list.md b/docs/examples/1.8.x/server-ruby/examples/tables/list.md new file mode 100644 index 0000000000..7cf987ebb9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/list.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.list( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..a09b365cd1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: false, + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..55e0484b4c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md new file mode 100644 index 0000000000..285cd6655a --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..90773ed9e4 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md new file mode 100644 index 0000000000..0bb992bd3c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..35f8c471a8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..2ad1840a9d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..de86fd53d7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + on_delete: RelationMutate::CASCADE, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md new file mode 100644 index 0000000000..500927dcf0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +tables = Tables.new(client) + +result = tables.update_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md new file mode 100644 index 0000000000..8cee1810be --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + data: {}, # optional + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md new file mode 100644 index 0000000000..2240f49555 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md new file mode 100644 index 0000000000..0947a78a9e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update.md b/docs/examples/1.8.x/server-ruby/examples/tables/update.md new file mode 100644 index 0000000000..003d3d041c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/update.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.update( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + row_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md new file mode 100644 index 0000000000..d96172e1ec --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_key('<YOUR_API_KEY>') # Your secret API key + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token + +tables = Tables.new(client) + +result = tables.upsert_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..8987b1ee0e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_admin('') # + .set_key('<YOUR_API_KEY>') # Your secret API key + +tables = Tables.new(client) + +result = tables.upsert_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md new file mode 100644 index 0000000000..1b9627afac --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnBoolean = try await tables.createBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md new file mode 100644 index 0000000000..e002fb8042 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnDatetime = try await tables.createDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md new file mode 100644 index 0000000000..338493dbc5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnEmail = try await tables.createEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md new file mode 100644 index 0000000000..a6a9fff2c4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnEnum = try await tables.createEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md new file mode 100644 index 0000000000..12e4062454 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnFloat = try await tables.createFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-index.md b/docs/examples/1.8.x/server-swift/examples/tables/create-index.md new file mode 100644 index 0000000000..03dea1ac48 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-index.md @@ -0,0 +1,20 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIndex = try await tables.createIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: .key, + columns: [], + orders: [], // optional + lengths: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md new file mode 100644 index 0000000000..6c04294025 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnInteger = try await tables.createIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md new file mode 100644 index 0000000000..2cd0b2795f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIp = try await tables.createIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md new file mode 100644 index 0000000000..66b993cf9a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md @@ -0,0 +1,21 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnRelationship = try await tables.createRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: .oneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: .cascade // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-row.md b/docs/examples/1.8.x/server-swift/examples/tables/create-row.md new file mode 100644 index 0000000000..a736355127 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-row.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let tables = Tables(client) + +let row = try await tables.createRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md new file mode 100644 index 0000000000..ee2095f08f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let rowList = try await tables.createRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md new file mode 100644 index 0000000000..e83ffdf367 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnString = try await tables.createStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md new file mode 100644 index 0000000000..150b51309d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnUrl = try await tables.createUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create.md b/docs/examples/1.8.x/server-swift/examples/tables/create.md new file mode 100644 index 0000000000..0843dfd242 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/create.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let table = try await tables.create( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md new file mode 100644 index 0000000000..ef24324780 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let row = try await tables.decrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + min: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md new file mode 100644 index 0000000000..07f825ddbe --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let result = try await tables.deleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md new file mode 100644 index 0000000000..b6d2e5bfea --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let result = try await tables.deleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md new file mode 100644 index 0000000000..92bc38777e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tables = Tables(client) + +let result = try await tables.deleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md new file mode 100644 index 0000000000..d27fbce85f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let rowList = try await tables.deleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete.md b/docs/examples/1.8.x/server-swift/examples/tables/delete.md new file mode 100644 index 0000000000..aefa1d8cda --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/delete.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let result = try await tables.delete( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-column.md b/docs/examples/1.8.x/server-swift/examples/tables/get-column.md new file mode 100644 index 0000000000..653f79dce7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/get-column.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let result = try await tables.getColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-index.md b/docs/examples/1.8.x/server-swift/examples/tables/get-index.md new file mode 100644 index 0000000000..6835f56aa0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/get-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIndex = try await tables.getIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-row.md b/docs/examples/1.8.x/server-swift/examples/tables/get-row.md new file mode 100644 index 0000000000..e2ff10f09a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/get-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tables = Tables(client) + +let row = try await tables.getRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get.md b/docs/examples/1.8.x/server-swift/examples/tables/get.md new file mode 100644 index 0000000000..610bf42529 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/get.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let table = try await tables.get( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md new file mode 100644 index 0000000000..6ea883d612 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let row = try await tables.incrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + max: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md b/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md new file mode 100644 index 0000000000..88c86137a4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnList = try await tables.listColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md new file mode 100644 index 0000000000..2ea8e99eca --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIndexList = try await tables.listIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md new file mode 100644 index 0000000000..ca2e5b0d4b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tables = Tables(client) + +let rowList = try await tables.listRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list.md b/docs/examples/1.8.x/server-swift/examples/tables/list.md new file mode 100644 index 0000000000..e135b50289 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/list.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let tableList = try await tables.list( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md new file mode 100644 index 0000000000..e0d1ea2f9f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnBoolean = try await tables.updateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md new file mode 100644 index 0000000000..f09e27920b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnDatetime = try await tables.updateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md new file mode 100644 index 0000000000..f7b8cc4ede --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnEmail = try await tables.updateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md new file mode 100644 index 0000000000..776da72e59 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnEnum = try await tables.updateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md new file mode 100644 index 0000000000..d6cd34c4b5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnFloat = try await tables.updateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md new file mode 100644 index 0000000000..e1265cedbf --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnInteger = try await tables.updateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md new file mode 100644 index 0000000000..4f3538bb7a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnIp = try await tables.updateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md new file mode 100644 index 0000000000..74bfd62750 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md @@ -0,0 +1,18 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnRelationship = try await tables.updateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: .cascade, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-row.md b/docs/examples/1.8.x/server-swift/examples/tables/update-row.md new file mode 100644 index 0000000000..7fa81f6b58 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-row.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let tables = Tables(client) + +let row = try await tables.updateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md new file mode 100644 index 0000000000..d7cd0697da --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let rowList = try await tables.updateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [:], // optional + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md new file mode 100644 index 0000000000..ba14d9a96a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnString = try await tables.updateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md new file mode 100644 index 0000000000..19015e4c88 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let columnUrl = try await tables.updateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update.md b/docs/examples/1.8.x/server-swift/examples/tables/update.md new file mode 100644 index 0000000000..c9840a0a51 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/update.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let table = try await tables.update( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md new file mode 100644 index 0000000000..c5c5b73afc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + +let tables = Tables(client) + +let row = try await tables.upsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md new file mode 100644 index 0000000000..037d927dc9 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setAdmin("") // + .setKey("<YOUR_API_KEY>") // Your secret API key + +let tables = Tables(client) + +let rowList = try await tables.upsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + From c9d9c4ab7674296dc74635128ef6939312e151e3 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 28 Jul 2025 11:49:49 +0530 Subject: [PATCH 306/362] reset: docs for easier review. --- .../java/databases/create-document.md | 4 ++- .../java/databases/upsert-document.md | 6 ++-- .../java/functions/create-execution.md | 2 +- .../client-android/java/grids/create-row.md | 26 --------------- .../client-android/java/grids/delete-row.md | 24 -------------- .../client-android/java/grids/get-row.md | 25 -------------- .../client-android/java/grids/list-rows.md | 24 -------------- .../client-android/java/grids/update-row.md | 26 --------------- .../client-android/java/grids/upsert-row.md | 26 --------------- .../kotlin/databases/create-document.md | 4 ++- .../kotlin/databases/upsert-document.md | 6 ++-- .../kotlin/functions/create-execution.md | 2 +- .../client-android/kotlin/grids/create-row.md | 17 ---------- .../client-android/kotlin/grids/delete-row.md | 15 --------- .../client-android/kotlin/grids/get-row.md | 16 --------- .../client-android/kotlin/grids/list-rows.md | 15 --------- .../client-android/kotlin/grids/update-row.md | 17 ---------- .../client-android/kotlin/grids/upsert-row.md | 17 ---------- .../examples/databases/create-document.md | 4 ++- .../examples/databases/upsert-document.md | 8 ++--- .../examples/functions/create-execution.md | 2 +- .../client-apple/examples/grids/create-row.md | 16 --------- .../client-apple/examples/grids/delete-row.md | 14 -------- .../client-apple/examples/grids/get-row.md | 15 --------- .../client-apple/examples/grids/list-rows.md | 14 -------- .../client-apple/examples/grids/update-row.md | 16 --------- .../client-apple/examples/grids/upsert-row.md | 16 --------- .../examples/databases/create-document.md | 4 ++- .../examples/databases/upsert-document.md | 6 ++-- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-row.md | 15 --------- .../examples/grids/delete-row.md | 13 -------- .../client-flutter/examples/grids/get-row.md | 14 -------- .../examples/grids/list-rows.md | 13 -------- .../examples/grids/update-row.md | 15 --------- .../examples/grids/upsert-row.md | 15 --------- .../examples/databases/upsert-document.md | 4 +-- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-row.md | 18 ---------- .../examples/grids/delete-row.md | 9 ----- .../client-graphql/examples/grids/get-row.md | 0 .../examples/grids/list-rows.md | 0 .../examples/grids/update-row.md | 18 ---------- .../examples/grids/upsert-row.md | 18 ---------- .../examples/storage/create-file.md | 2 +- .../examples/databases/create-document.md | 4 ++- .../examples/databases/upsert-document.md | 8 ++--- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-row.md | 17 ---------- .../examples/grids/delete-row.md | 15 --------- .../examples/grids/get-row.md | 16 --------- .../examples/grids/list-rows.md | 15 --------- .../examples/grids/update-row.md | 17 ---------- .../examples/grids/upsert-row.md | 17 ---------- .../account/create-anonymous-session.md | 2 +- .../account/create-email-password-session.md | 2 +- .../examples/account/create-email-token.md | 2 +- .../examples/account/create-j-w-t.md | 2 +- .../account/create-magic-u-r-l-token.md | 2 +- .../account/create-mfa-authenticator.md | 2 +- .../examples/account/create-mfa-challenge.md | 2 +- .../account/create-mfa-recovery-codes.md | 2 +- .../examples/account/create-o-auth2session.md | 2 +- .../examples/account/create-o-auth2token.md | 2 +- .../examples/account/create-phone-token.md | 2 +- .../account/create-phone-verification.md | 2 +- .../examples/account/create-push-target.md | 2 +- .../examples/account/create-recovery.md | 2 +- .../examples/account/create-session.md | 2 +- .../examples/account/create-verification.md | 2 +- .../client-rest/examples/account/create.md | 2 +- .../examples/account/delete-identity.md | 2 +- .../account/delete-mfa-authenticator.md | 2 +- .../examples/account/delete-push-target.md | 2 +- .../examples/account/delete-session.md | 2 +- .../examples/account/delete-sessions.md | 2 +- .../account/get-mfa-recovery-codes.md | 2 +- .../client-rest/examples/account/get-prefs.md | 2 +- .../examples/account/get-session.md | 2 +- .../1.8.x/client-rest/examples/account/get.md | 2 +- .../examples/account/list-identities.md | 2 +- .../client-rest/examples/account/list-logs.md | 2 +- .../examples/account/list-mfa-factors.md | 2 +- .../examples/account/list-sessions.md | 2 +- .../examples/account/update-email.md | 2 +- .../examples/account/update-m-f-a.md | 2 +- .../account/update-magic-u-r-l-session.md | 2 +- .../account/update-mfa-authenticator.md | 2 +- .../examples/account/update-mfa-challenge.md | 2 +- .../account/update-mfa-recovery-codes.md | 2 +- .../examples/account/update-name.md | 2 +- .../examples/account/update-password.md | 2 +- .../examples/account/update-phone-session.md | 2 +- .../account/update-phone-verification.md | 2 +- .../examples/account/update-phone.md | 2 +- .../examples/account/update-prefs.md | 2 +- .../examples/account/update-push-target.md | 2 +- .../examples/account/update-recovery.md | 2 +- .../examples/account/update-session.md | 2 +- .../examples/account/update-status.md | 2 +- .../examples/account/update-verification.md | 2 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../examples/avatars/get-favicon.md | 2 +- .../client-rest/examples/avatars/get-flag.md | 2 +- .../client-rest/examples/avatars/get-image.md | 2 +- .../examples/avatars/get-initials.md | 2 +- .../client-rest/examples/avatars/get-q-r.md | 2 +- .../examples/databases/create-document.md | 2 +- .../examples/databases/delete-document.md | 2 +- .../examples/databases/get-document.md | 2 +- .../examples/databases/list-documents.md | 2 +- .../examples/databases/update-document.md | 2 +- .../examples/databases/upsert-document.md | 6 +--- .../examples/functions/create-execution.md | 4 +-- .../examples/functions/get-execution.md | 2 +- .../examples/functions/list-executions.md | 2 +- .../client-rest/examples/graphql/mutation.md | 2 +- .../client-rest/examples/graphql/query.md | 2 +- .../client-rest/examples/grids/create-row.md | 13 -------- .../client-rest/examples/grids/delete-row.md | 8 ----- .../client-rest/examples/grids/get-row.md | 6 ---- .../client-rest/examples/grids/list-rows.md | 6 ---- .../client-rest/examples/grids/update-row.md | 12 ------- .../client-rest/examples/grids/upsert-row.md | 12 ------- .../1.8.x/client-rest/examples/locale/get.md | 2 +- .../client-rest/examples/locale/list-codes.md | 2 +- .../examples/locale/list-continents.md | 2 +- .../examples/locale/list-countries-e-u.md | 2 +- .../examples/locale/list-countries-phones.md | 2 +- .../examples/locale/list-countries.md | 2 +- .../examples/locale/list-currencies.md | 2 +- .../examples/locale/list-languages.md | 2 +- .../examples/messaging/create-subscriber.md | 2 +- .../examples/messaging/delete-subscriber.md | 2 +- .../examples/storage/create-file.md | 2 +- .../examples/storage/delete-file.md | 2 +- .../examples/storage/get-file-download.md | 2 +- .../examples/storage/get-file-preview.md | 2 +- .../examples/storage/get-file-view.md | 2 +- .../client-rest/examples/storage/get-file.md | 2 +- .../examples/storage/list-files.md | 2 +- .../examples/storage/update-file.md | 2 +- .../examples/teams/create-membership.md | 2 +- .../client-rest/examples/teams/create.md | 2 +- .../examples/teams/delete-membership.md | 2 +- .../client-rest/examples/teams/delete.md | 2 +- .../examples/teams/get-membership.md | 2 +- .../client-rest/examples/teams/get-prefs.md | 2 +- .../1.8.x/client-rest/examples/teams/get.md | 2 +- .../examples/teams/list-memberships.md | 2 +- .../1.8.x/client-rest/examples/teams/list.md | 2 +- .../teams/update-membership-status.md | 2 +- .../examples/teams/update-membership.md | 2 +- .../client-rest/examples/teams/update-name.md | 2 +- .../examples/teams/update-prefs.md | 2 +- .../examples/databases/create-document.md | 4 ++- .../examples/databases/upsert-document.md | 8 ++--- .../examples/functions/create-execution.md | 2 +- .../client-web/examples/grids/create-row.md | 17 ---------- .../client-web/examples/grids/delete-row.md | 15 --------- .../client-web/examples/grids/get-row.md | 16 --------- .../client-web/examples/grids/list-rows.md | 15 --------- .../client-web/examples/grids/update-row.md | 17 ---------- .../client-web/examples/grids/upsert-row.md | 17 ---------- .../examples/databases/upsert-document.md | 4 +-- .../examples/databases/upsert-documents.md | 3 +- .../examples/grids/create-boolean-column.md | 7 ---- .../examples/grids/create-database.md | 4 --- .../examples/grids/create-datetime-column.md | 7 ---- .../examples/grids/create-email-column.md | 7 ---- .../examples/grids/create-enum-column.md | 8 ----- .../examples/grids/create-float-column.md | 9 ----- .../examples/grids/create-index.md | 8 ----- .../examples/grids/create-integer-column.md | 9 ----- .../examples/grids/create-ip-column.md | 7 ---- .../grids/create-relationship-column.md | 9 ----- .../console-cli/examples/grids/create-row.md | 6 ---- .../console-cli/examples/grids/create-rows.md | 4 --- .../examples/grids/create-string-column.md | 9 ----- .../examples/grids/create-table.md | 7 ---- .../examples/grids/create-url-column.md | 7 ---- .../examples/grids/decrement-row-column.md | 7 ---- .../examples/grids/delete-column.md | 4 --- .../examples/grids/delete-database.md | 2 -- .../examples/grids/delete-index.md | 4 --- .../console-cli/examples/grids/delete-row.md | 4 --- .../console-cli/examples/grids/delete-rows.md | 4 --- .../examples/grids/delete-table.md | 3 -- .../console-cli/examples/grids/get-column.md | 4 --- .../examples/grids/get-database-usage.md | 3 -- .../examples/grids/get-database.md | 2 -- .../console-cli/examples/grids/get-index.md | 4 --- .../console-cli/examples/grids/get-row.md | 5 --- .../examples/grids/get-table-usage.md | 4 --- .../console-cli/examples/grids/get-table.md | 3 -- .../examples/grids/increment-row-column.md | 7 ---- .../examples/grids/list-columns.md | 4 --- .../examples/grids/list-database-logs.md | 3 -- .../examples/grids/list-database-usage.md | 2 -- .../examples/grids/list-databases.md | 3 -- .../examples/grids/list-indexes.md | 4 --- .../examples/grids/list-row-logs.md | 5 --- .../console-cli/examples/grids/list-rows.md | 4 --- .../examples/grids/list-table-logs.md | 4 --- .../console-cli/examples/grids/list-tables.md | 4 --- .../examples/grids/update-boolean-column.md | 7 ---- .../examples/grids/update-database.md | 4 --- .../examples/grids/update-datetime-column.md | 7 ---- .../examples/grids/update-email-column.md | 7 ---- .../examples/grids/update-enum-column.md | 8 ----- .../examples/grids/update-float-column.md | 9 ----- .../examples/grids/update-integer-column.md | 9 ----- .../examples/grids/update-ip-column.md | 7 ---- .../grids/update-relationship-column.md | 6 ---- .../console-cli/examples/grids/update-row.md | 6 ---- .../console-cli/examples/grids/update-rows.md | 5 --- .../examples/grids/update-string-column.md | 8 ----- .../examples/grids/update-table.md | 7 ---- .../examples/grids/update-url-column.md | 7 ---- .../console-cli/examples/grids/upsert-row.md | 6 ---- .../console-cli/examples/grids/upsert-rows.md | 4 --- .../examples/databases/create-document.md | 4 ++- .../examples/databases/create-documents.md | 3 +- .../examples/databases/upsert-document.md | 8 ++--- .../examples/databases/upsert-documents.md | 6 ++-- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 18 ---------- .../examples/grids/create-database.md | 15 --------- .../examples/grids/create-datetime-column.md | 18 ---------- .../examples/grids/create-email-column.md | 18 ---------- .../examples/grids/create-enum-column.md | 19 ----------- .../examples/grids/create-float-column.md | 20 ----------- .../examples/grids/create-index.md | 19 ----------- .../examples/grids/create-integer-column.md | 20 ----------- .../examples/grids/create-ip-column.md | 18 ---------- .../grids/create-relationship-column.md | 20 ----------- .../console-web/examples/grids/create-row.md | 17 ---------- .../console-web/examples/grids/create-rows.md | 15 --------- .../examples/grids/create-string-column.md | 20 ----------- .../examples/grids/create-table.md | 18 ---------- .../examples/grids/create-url-column.md | 18 ---------- .../examples/grids/decrement-row-column.md | 18 ---------- .../examples/grids/delete-column.md | 15 --------- .../examples/grids/delete-database.md | 13 -------- .../examples/grids/delete-index.md | 15 --------- .../console-web/examples/grids/delete-row.md | 15 --------- .../console-web/examples/grids/delete-rows.md | 15 --------- .../examples/grids/delete-table.md | 14 -------- .../console-web/examples/grids/get-column.md | 15 --------- .../examples/grids/get-database-usage.md | 14 -------- .../examples/grids/get-database.md | 13 -------- .../console-web/examples/grids/get-index.md | 15 --------- .../console-web/examples/grids/get-row.md | 16 --------- .../examples/grids/get-table-usage.md | 15 --------- .../console-web/examples/grids/get-table.md | 14 -------- .../examples/grids/increment-row-column.md | 18 ---------- .../examples/grids/list-columns.md | 15 --------- .../examples/grids/list-database-logs.md | 14 -------- .../examples/grids/list-database-usage.md | 13 -------- .../examples/grids/list-databases.md | 14 -------- .../examples/grids/list-indexes.md | 15 --------- .../examples/grids/list-row-logs.md | 16 --------- .../console-web/examples/grids/list-rows.md | 15 --------- .../examples/grids/list-table-logs.md | 15 --------- .../console-web/examples/grids/list-tables.md | 15 --------- .../examples/grids/update-boolean-column.md | 18 ---------- .../examples/grids/update-database.md | 15 --------- .../examples/grids/update-datetime-column.md | 18 ---------- .../examples/grids/update-email-column.md | 18 ---------- .../examples/grids/update-enum-column.md | 19 ----------- .../examples/grids/update-float-column.md | 20 ----------- .../examples/grids/update-integer-column.md | 20 ----------- .../examples/grids/update-ip-column.md | 18 ---------- .../grids/update-relationship-column.md | 17 ---------- .../console-web/examples/grids/update-row.md | 17 ---------- .../console-web/examples/grids/update-rows.md | 16 --------- .../examples/grids/update-string-column.md | 19 ----------- .../examples/grids/update-table.md | 18 ---------- .../examples/grids/update-url-column.md | 18 ---------- .../console-web/examples/grids/upsert-row.md | 17 ---------- .../console-web/examples/grids/upsert-rows.md | 15 --------- .../examples/databases/create-document.md | 5 +-- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 7 ++-- .../examples/databases/upsert-documents.md | 3 +- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 17 ---------- .../examples/grids/create-database.md | 14 -------- .../examples/grids/create-datetime-column.md | 17 ---------- .../examples/grids/create-email-column.md | 17 ---------- .../examples/grids/create-enum-column.md | 18 ---------- .../examples/grids/create-float-column.md | 19 ----------- .../examples/grids/create-index.md | 18 ---------- .../examples/grids/create-integer-column.md | 19 ----------- .../examples/grids/create-ip-column.md | 17 ---------- .../grids/create-relationship-column.md | 19 ----------- .../server-dart/examples/grids/create-row.md | 16 --------- .../server-dart/examples/grids/create-rows.md | 14 -------- .../examples/grids/create-string-column.md | 19 ----------- .../examples/grids/create-table.md | 17 ---------- .../examples/grids/create-url-column.md | 17 ---------- .../examples/grids/decrement-row-column.md | 17 ---------- .../examples/grids/delete-column.md | 14 -------- .../examples/grids/delete-database.md | 12 ------- .../examples/grids/delete-index.md | 14 -------- .../server-dart/examples/grids/delete-row.md | 14 -------- .../server-dart/examples/grids/delete-rows.md | 14 -------- .../examples/grids/delete-table.md | 13 -------- .../server-dart/examples/grids/get-column.md | 14 -------- .../examples/grids/get-database.md | 12 ------- .../server-dart/examples/grids/get-index.md | 14 -------- .../server-dart/examples/grids/get-row.md | 15 --------- .../server-dart/examples/grids/get-table.md | 13 -------- .../examples/grids/increment-row-column.md | 17 ---------- .../examples/grids/list-columns.md | 14 -------- .../examples/grids/list-databases.md | 13 -------- .../examples/grids/list-indexes.md | 14 -------- .../server-dart/examples/grids/list-rows.md | 14 -------- .../server-dart/examples/grids/list-tables.md | 14 -------- .../examples/grids/update-boolean-column.md | 17 ---------- .../examples/grids/update-database.md | 14 -------- .../examples/grids/update-datetime-column.md | 17 ---------- .../examples/grids/update-email-column.md | 17 ---------- .../examples/grids/update-enum-column.md | 18 ---------- .../examples/grids/update-float-column.md | 19 ----------- .../examples/grids/update-integer-column.md | 19 ----------- .../examples/grids/update-ip-column.md | 17 ---------- .../grids/update-relationship-column.md | 16 --------- .../server-dart/examples/grids/update-row.md | 16 --------- .../server-dart/examples/grids/update-rows.md | 15 --------- .../examples/grids/update-string-column.md | 18 ---------- .../examples/grids/update-table.md | 17 ---------- .../examples/grids/update-url-column.md | 17 ---------- .../server-dart/examples/grids/upsert-row.md | 16 --------- .../server-dart/examples/grids/upsert-rows.md | 14 -------- .../examples/databases/create-document.md | 5 +-- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 9 +++-- .../examples/databases/upsert-documents.md | 5 ++- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 17 ---------- .../examples/grids/create-database.md | 14 -------- .../examples/grids/create-datetime-column.md | 17 ---------- .../examples/grids/create-email-column.md | 17 ---------- .../examples/grids/create-enum-column.md | 18 ---------- .../examples/grids/create-float-column.md | 19 ----------- .../examples/grids/create-index.md | 18 ---------- .../examples/grids/create-integer-column.md | 19 ----------- .../examples/grids/create-ip-column.md | 17 ---------- .../grids/create-relationship-column.md | 19 ----------- .../server-deno/examples/grids/create-row.md | 16 --------- .../server-deno/examples/grids/create-rows.md | 14 -------- .../examples/grids/create-string-column.md | 19 ----------- .../examples/grids/create-table.md | 17 ---------- .../examples/grids/create-url-column.md | 17 ---------- .../examples/grids/decrement-row-column.md | 17 ---------- .../examples/grids/delete-column.md | 14 -------- .../examples/grids/delete-database.md | 12 ------- .../examples/grids/delete-index.md | 14 -------- .../server-deno/examples/grids/delete-row.md | 14 -------- .../server-deno/examples/grids/delete-rows.md | 14 -------- .../examples/grids/delete-table.md | 13 -------- .../server-deno/examples/grids/get-column.md | 14 -------- .../examples/grids/get-database.md | 12 ------- .../server-deno/examples/grids/get-index.md | 14 -------- .../server-deno/examples/grids/get-row.md | 15 --------- .../server-deno/examples/grids/get-table.md | 13 -------- .../examples/grids/increment-row-column.md | 17 ---------- .../examples/grids/list-columns.md | 14 -------- .../examples/grids/list-databases.md | 13 -------- .../examples/grids/list-indexes.md | 14 -------- .../server-deno/examples/grids/list-rows.md | 14 -------- .../server-deno/examples/grids/list-tables.md | 14 -------- .../examples/grids/update-boolean-column.md | 17 ---------- .../examples/grids/update-database.md | 14 -------- .../examples/grids/update-datetime-column.md | 17 ---------- .../examples/grids/update-email-column.md | 17 ---------- .../examples/grids/update-enum-column.md | 18 ---------- .../examples/grids/update-float-column.md | 19 ----------- .../examples/grids/update-integer-column.md | 19 ----------- .../examples/grids/update-ip-column.md | 17 ---------- .../grids/update-relationship-column.md | 16 --------- .../server-deno/examples/grids/update-row.md | 16 --------- .../server-deno/examples/grids/update-rows.md | 15 --------- .../examples/grids/update-string-column.md | 18 ---------- .../examples/grids/update-table.md | 17 ---------- .../examples/grids/update-url-column.md | 17 ---------- .../server-deno/examples/grids/upsert-row.md | 16 --------- .../server-deno/examples/grids/upsert-rows.md | 14 -------- .../examples/databases/create-document.md | 5 +-- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 9 +++-- .../examples/databases/upsert-documents.md | 5 ++- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 19 ----------- .../examples/grids/create-database.md | 16 --------- .../examples/grids/create-datetime-column.md | 19 ----------- .../examples/grids/create-email-column.md | 19 ----------- .../examples/grids/create-enum-column.md | 20 ----------- .../examples/grids/create-float-column.md | 21 ------------ .../examples/grids/create-index.md | 21 ------------ .../examples/grids/create-integer-column.md | 21 ------------ .../examples/grids/create-ip-column.md | 19 ----------- .../grids/create-relationship-column.md | 22 ------------- .../examples/grids/create-row.md | 18 ---------- .../examples/grids/create-rows.md | 16 --------- .../examples/grids/create-string-column.md | 21 ------------ .../examples/grids/create-table.md | 19 ----------- .../examples/grids/create-url-column.md | 19 ----------- .../examples/grids/decrement-row-column.md | 19 ----------- .../examples/grids/delete-column.md | 16 --------- .../examples/grids/delete-database.md | 14 -------- .../examples/grids/delete-index.md | 16 --------- .../examples/grids/delete-row.md | 16 --------- .../examples/grids/delete-rows.md | 16 --------- .../examples/grids/delete-table.md | 15 --------- .../examples/grids/get-column.md | 16 --------- .../examples/grids/get-database.md | 14 -------- .../server-dotnet/examples/grids/get-index.md | 16 --------- .../server-dotnet/examples/grids/get-row.md | 17 ---------- .../server-dotnet/examples/grids/get-table.md | 15 --------- .../examples/grids/increment-row-column.md | 19 ----------- .../examples/grids/list-columns.md | 16 --------- .../examples/grids/list-databases.md | 15 --------- .../examples/grids/list-indexes.md | 16 --------- .../server-dotnet/examples/grids/list-rows.md | 16 --------- .../examples/grids/list-tables.md | 16 --------- .../examples/grids/update-boolean-column.md | 19 ----------- .../examples/grids/update-database.md | 16 --------- .../examples/grids/update-datetime-column.md | 19 ----------- .../examples/grids/update-email-column.md | 19 ----------- .../examples/grids/update-enum-column.md | 20 ----------- .../examples/grids/update-float-column.md | 21 ------------ .../examples/grids/update-integer-column.md | 21 ------------ .../examples/grids/update-ip-column.md | 19 ----------- .../grids/update-relationship-column.md | 19 ----------- .../examples/grids/update-row.md | 18 ---------- .../examples/grids/update-rows.md | 17 ---------- .../examples/grids/update-string-column.md | 20 ----------- .../examples/grids/update-table.md | 19 ----------- .../examples/grids/update-url-column.md | 19 ----------- .../examples/grids/upsert-row.md | 18 ---------- .../examples/grids/upsert-rows.md | 16 --------- .../examples/databases/create-document.md | 3 +- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 5 ++- .../examples/databases/upsert-documents.md | 3 +- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 31 ----------------- .../examples/grids/create-database.md | 28 ---------------- .../examples/grids/create-datetime-column.md | 31 ----------------- .../examples/grids/create-email-column.md | 31 ----------------- .../examples/grids/create-enum-column.md | 32 ------------------ .../examples/grids/create-float-column.md | 33 ------------------- .../server-go/examples/grids/create-index.md | 32 ------------------ .../examples/grids/create-integer-column.md | 33 ------------------- .../examples/grids/create-ip-column.md | 31 ----------------- .../grids/create-relationship-column.md | 33 ------------------- .../server-go/examples/grids/create-row.md | 30 ----------------- .../server-go/examples/grids/create-rows.md | 28 ---------------- .../examples/grids/create-string-column.md | 33 ------------------- .../server-go/examples/grids/create-table.md | 31 ----------------- .../examples/grids/create-url-column.md | 31 ----------------- .../examples/grids/decrement-row-column.md | 31 ----------------- .../server-go/examples/grids/delete-column.md | 28 ---------------- .../examples/grids/delete-database.md | 26 --------------- .../server-go/examples/grids/delete-index.md | 28 ---------------- .../server-go/examples/grids/delete-row.md | 28 ---------------- .../server-go/examples/grids/delete-rows.md | 28 ---------------- .../server-go/examples/grids/delete-table.md | 27 --------------- .../server-go/examples/grids/get-column.md | 28 ---------------- .../server-go/examples/grids/get-database.md | 26 --------------- .../server-go/examples/grids/get-index.md | 28 ---------------- .../1.8.x/server-go/examples/grids/get-row.md | 29 ---------------- .../server-go/examples/grids/get-table.md | 27 --------------- .../examples/grids/increment-row-column.md | 31 ----------------- .../server-go/examples/grids/list-columns.md | 28 ---------------- .../examples/grids/list-databases.md | 27 --------------- .../server-go/examples/grids/list-indexes.md | 28 ---------------- .../server-go/examples/grids/list-rows.md | 28 ---------------- .../server-go/examples/grids/list-tables.md | 28 ---------------- .../examples/grids/update-boolean-column.md | 31 ----------------- .../examples/grids/update-database.md | 28 ---------------- .../examples/grids/update-datetime-column.md | 31 ----------------- .../examples/grids/update-email-column.md | 31 ----------------- .../examples/grids/update-enum-column.md | 32 ------------------ .../examples/grids/update-float-column.md | 33 ------------------- .../examples/grids/update-integer-column.md | 33 ------------------- .../examples/grids/update-ip-column.md | 31 ----------------- .../grids/update-relationship-column.md | 30 ----------------- .../server-go/examples/grids/update-row.md | 30 ----------------- .../server-go/examples/grids/update-rows.md | 29 ---------------- .../examples/grids/update-string-column.md | 32 ------------------ .../server-go/examples/grids/update-table.md | 31 ----------------- .../examples/grids/update-url-column.md | 31 ----------------- .../server-go/examples/grids/upsert-row.md | 30 ----------------- .../server-go/examples/grids/upsert-rows.md | 28 ---------------- .../examples/databases/create-collection.md | 5 ++- .../examples/databases/create-index.md | 5 ++- .../examples/databases/update-collection.md | 5 ++- .../examples/databases/upsert-document.md | 4 +-- .../examples/databases/upsert-documents.md | 3 +- .../examples/functions/create-deployment.md | 2 +- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 20 ----------- .../examples/grids/create-database.md | 13 -------- .../examples/grids/create-datetime-column.md | 21 ------------ .../examples/grids/create-email-column.md | 21 ------------ .../examples/grids/create-enum-column.md | 23 ------------- .../examples/grids/create-float-column.md | 24 -------------- .../examples/grids/create-index.md | 22 ------------- .../examples/grids/create-integer-column.md | 24 -------------- .../examples/grids/create-ip-column.md | 21 ------------ .../grids/create-relationship-column.md | 27 --------------- .../examples/grids/create-row.md | 18 ---------- .../examples/grids/create-rows.md | 19 ----------- .../examples/grids/create-string-column.md | 24 -------------- .../examples/grids/create-table.md | 32 ------------------ .../examples/grids/create-url-column.md | 21 ------------ .../examples/grids/decrement-row-column.md | 19 ----------- .../examples/grids/delete-column.md | 9 ----- .../examples/grids/delete-database.md | 7 ---- .../examples/grids/delete-index.md | 9 ----- .../examples/grids/delete-row.md | 9 ----- .../examples/grids/delete-rows.md | 19 ----------- .../examples/grids/delete-table.md | 8 ----- .../examples/grids/get-column.md | 0 .../examples/grids/get-database.md | 0 .../examples/grids/get-index.md | 0 .../server-graphql/examples/grids/get-row.md | 0 .../examples/grids/get-table.md | 0 .../examples/grids/increment-row-column.md | 19 ----------- .../examples/grids/list-columns.md | 0 .../examples/grids/list-databases.md | 0 .../examples/grids/list-indexes.md | 0 .../examples/grids/list-rows.md | 0 .../examples/grids/list-tables.md | 0 .../examples/grids/update-boolean-column.md | 20 ----------- .../examples/grids/update-database.md | 13 -------- .../examples/grids/update-datetime-column.md | 21 ------------ .../examples/grids/update-email-column.md | 21 ------------ .../examples/grids/update-enum-column.md | 23 ------------- .../examples/grids/update-float-column.md | 24 -------------- .../examples/grids/update-integer-column.md | 24 -------------- .../examples/grids/update-ip-column.md | 21 ------------ .../grids/update-relationship-column.md | 24 -------------- .../examples/grids/update-row.md | 18 ---------- .../examples/grids/update-rows.md | 20 ----------- .../examples/grids/update-string-column.md | 23 ------------- .../examples/grids/update-table.md | 32 ------------------ .../examples/grids/update-url-column.md | 21 ------------ .../examples/grids/upsert-row.md | 18 ---------- .../examples/grids/upsert-rows.md | 19 ----------- .../examples/sites/create-deployment.md | 2 +- .../examples/storage/create-file.md | 2 +- .../java/databases/create-document.md | 5 +-- .../java/databases/create-documents.md | 2 +- .../java/databases/upsert-document.md | 7 ++-- .../java/databases/upsert-documents.md | 3 +- .../java/functions/create-execution.md | 2 +- .../java/grids/create-boolean-column.md | 28 ---------------- .../java/grids/create-database.md | 25 -------------- .../java/grids/create-datetime-column.md | 28 ---------------- .../java/grids/create-email-column.md | 28 ---------------- .../java/grids/create-enum-column.md | 29 ---------------- .../java/grids/create-float-column.md | 30 ----------------- .../server-kotlin/java/grids/create-index.md | 30 ----------------- .../java/grids/create-integer-column.md | 30 ----------------- .../java/grids/create-ip-column.md | 28 ---------------- .../java/grids/create-relationship-column.md | 31 ----------------- .../server-kotlin/java/grids/create-row.md | 27 --------------- .../server-kotlin/java/grids/create-rows.md | 25 -------------- .../java/grids/create-string-column.md | 30 ----------------- .../server-kotlin/java/grids/create-table.md | 28 ---------------- .../java/grids/create-url-column.md | 28 ---------------- .../java/grids/decrement-row-column.md | 28 ---------------- .../server-kotlin/java/grids/delete-column.md | 25 -------------- .../java/grids/delete-database.md | 23 ------------- .../server-kotlin/java/grids/delete-index.md | 25 -------------- .../server-kotlin/java/grids/delete-row.md | 25 -------------- .../server-kotlin/java/grids/delete-rows.md | 25 -------------- .../server-kotlin/java/grids/delete-table.md | 24 -------------- .../server-kotlin/java/grids/get-column.md | 25 -------------- .../server-kotlin/java/grids/get-database.md | 23 ------------- .../server-kotlin/java/grids/get-index.md | 25 -------------- .../1.8.x/server-kotlin/java/grids/get-row.md | 26 --------------- .../server-kotlin/java/grids/get-table.md | 24 -------------- .../java/grids/increment-row-column.md | 28 ---------------- .../server-kotlin/java/grids/list-columns.md | 25 -------------- .../java/grids/list-databases.md | 24 -------------- .../server-kotlin/java/grids/list-indexes.md | 25 -------------- .../server-kotlin/java/grids/list-rows.md | 25 -------------- .../server-kotlin/java/grids/list-tables.md | 25 -------------- .../java/grids/update-boolean-column.md | 28 ---------------- .../java/grids/update-database.md | 25 -------------- .../java/grids/update-datetime-column.md | 28 ---------------- .../java/grids/update-email-column.md | 28 ---------------- .../java/grids/update-enum-column.md | 29 ---------------- .../java/grids/update-float-column.md | 30 ----------------- .../java/grids/update-integer-column.md | 30 ----------------- .../java/grids/update-ip-column.md | 28 ---------------- .../java/grids/update-relationship-column.md | 27 --------------- .../server-kotlin/java/grids/update-row.md | 27 --------------- .../server-kotlin/java/grids/update-rows.md | 26 --------------- .../java/grids/update-string-column.md | 29 ---------------- .../server-kotlin/java/grids/update-table.md | 28 ---------------- .../java/grids/update-url-column.md | 28 ---------------- .../server-kotlin/java/grids/upsert-row.md | 27 --------------- .../server-kotlin/java/grids/upsert-rows.md | 25 -------------- .../kotlin/databases/create-document.md | 3 +- .../kotlin/databases/create-documents.md | 2 +- .../kotlin/databases/upsert-document.md | 7 ++-- .../kotlin/databases/upsert-documents.md | 5 ++- .../kotlin/functions/create-execution.md | 2 +- .../kotlin/grids/create-boolean-column.md | 19 ----------- .../kotlin/grids/create-database.md | 16 --------- .../kotlin/grids/create-datetime-column.md | 19 ----------- .../kotlin/grids/create-email-column.md | 19 ----------- .../kotlin/grids/create-enum-column.md | 20 ----------- .../kotlin/grids/create-float-column.md | 21 ------------ .../kotlin/grids/create-index.md | 21 ------------ .../kotlin/grids/create-integer-column.md | 21 ------------ .../kotlin/grids/create-ip-column.md | 19 ----------- .../grids/create-relationship-column.md | 22 ------------- .../server-kotlin/kotlin/grids/create-row.md | 18 ---------- .../server-kotlin/kotlin/grids/create-rows.md | 16 --------- .../kotlin/grids/create-string-column.md | 21 ------------ .../kotlin/grids/create-table.md | 19 ----------- .../kotlin/grids/create-url-column.md | 19 ----------- .../kotlin/grids/decrement-row-column.md | 19 ----------- .../kotlin/grids/delete-column.md | 16 --------- .../kotlin/grids/delete-database.md | 14 -------- .../kotlin/grids/delete-index.md | 16 --------- .../server-kotlin/kotlin/grids/delete-row.md | 16 --------- .../server-kotlin/kotlin/grids/delete-rows.md | 16 --------- .../kotlin/grids/delete-table.md | 15 --------- .../server-kotlin/kotlin/grids/get-column.md | 16 --------- .../kotlin/grids/get-database.md | 14 -------- .../server-kotlin/kotlin/grids/get-index.md | 16 --------- .../server-kotlin/kotlin/grids/get-row.md | 17 ---------- .../server-kotlin/kotlin/grids/get-table.md | 15 --------- .../kotlin/grids/increment-row-column.md | 19 ----------- .../kotlin/grids/list-columns.md | 16 --------- .../kotlin/grids/list-databases.md | 15 --------- .../kotlin/grids/list-indexes.md | 16 --------- .../server-kotlin/kotlin/grids/list-rows.md | 16 --------- .../server-kotlin/kotlin/grids/list-tables.md | 16 --------- .../kotlin/grids/update-boolean-column.md | 19 ----------- .../kotlin/grids/update-database.md | 16 --------- .../kotlin/grids/update-datetime-column.md | 19 ----------- .../kotlin/grids/update-email-column.md | 19 ----------- .../kotlin/grids/update-enum-column.md | 20 ----------- .../kotlin/grids/update-float-column.md | 21 ------------ .../kotlin/grids/update-integer-column.md | 21 ------------ .../kotlin/grids/update-ip-column.md | 19 ----------- .../grids/update-relationship-column.md | 18 ---------- .../server-kotlin/kotlin/grids/update-row.md | 18 ---------- .../server-kotlin/kotlin/grids/update-rows.md | 17 ---------- .../kotlin/grids/update-string-column.md | 20 ----------- .../kotlin/grids/update-table.md | 19 ----------- .../kotlin/grids/update-url-column.md | 19 ----------- .../server-kotlin/kotlin/grids/upsert-row.md | 18 ---------- .../server-kotlin/kotlin/grids/upsert-rows.md | 16 --------- .../examples/databases/create-document.md | 5 +-- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 9 +++-- .../examples/databases/upsert-documents.md | 5 ++- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 17 ---------- .../examples/grids/create-database.md | 14 -------- .../examples/grids/create-datetime-column.md | 17 ---------- .../examples/grids/create-email-column.md | 17 ---------- .../examples/grids/create-enum-column.md | 18 ---------- .../examples/grids/create-float-column.md | 19 ----------- .../examples/grids/create-index.md | 18 ---------- .../examples/grids/create-integer-column.md | 19 ----------- .../examples/grids/create-ip-column.md | 17 ---------- .../grids/create-relationship-column.md | 19 ----------- .../examples/grids/create-row.md | 16 --------- .../examples/grids/create-rows.md | 14 -------- .../examples/grids/create-string-column.md | 19 ----------- .../examples/grids/create-table.md | 17 ---------- .../examples/grids/create-url-column.md | 17 ---------- .../examples/grids/decrement-row-column.md | 17 ---------- .../examples/grids/delete-column.md | 14 -------- .../examples/grids/delete-database.md | 12 ------- .../examples/grids/delete-index.md | 14 -------- .../examples/grids/delete-row.md | 14 -------- .../examples/grids/delete-rows.md | 14 -------- .../examples/grids/delete-table.md | 13 -------- .../examples/grids/get-column.md | 14 -------- .../examples/grids/get-database.md | 12 ------- .../server-nodejs/examples/grids/get-index.md | 14 -------- .../server-nodejs/examples/grids/get-row.md | 15 --------- .../server-nodejs/examples/grids/get-table.md | 13 -------- .../examples/grids/increment-row-column.md | 17 ---------- .../examples/grids/list-columns.md | 14 -------- .../examples/grids/list-databases.md | 13 -------- .../examples/grids/list-indexes.md | 14 -------- .../server-nodejs/examples/grids/list-rows.md | 14 -------- .../examples/grids/list-tables.md | 14 -------- .../examples/grids/update-boolean-column.md | 17 ---------- .../examples/grids/update-database.md | 14 -------- .../examples/grids/update-datetime-column.md | 17 ---------- .../examples/grids/update-email-column.md | 17 ---------- .../examples/grids/update-enum-column.md | 18 ---------- .../examples/grids/update-float-column.md | 19 ----------- .../examples/grids/update-integer-column.md | 19 ----------- .../examples/grids/update-ip-column.md | 17 ---------- .../grids/update-relationship-column.md | 16 --------- .../examples/grids/update-row.md | 16 --------- .../examples/grids/update-rows.md | 15 --------- .../examples/grids/update-string-column.md | 18 ---------- .../examples/grids/update-table.md | 17 ---------- .../examples/grids/update-url-column.md | 17 ---------- .../examples/grids/upsert-row.md | 16 --------- .../examples/grids/upsert-rows.md | 14 -------- .../examples/databases/create-document.md | 5 +-- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 9 +++-- .../examples/databases/upsert-documents.md | 5 ++- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 20 ----------- .../examples/grids/create-database.md | 17 ---------- .../examples/grids/create-datetime-column.md | 20 ----------- .../examples/grids/create-email-column.md | 20 ----------- .../examples/grids/create-enum-column.md | 21 ------------ .../examples/grids/create-float-column.md | 22 ------------- .../server-php/examples/grids/create-index.md | 22 ------------- .../examples/grids/create-integer-column.md | 22 ------------- .../examples/grids/create-ip-column.md | 20 ----------- .../grids/create-relationship-column.md | 23 ------------- .../server-php/examples/grids/create-row.md | 19 ----------- .../server-php/examples/grids/create-rows.md | 17 ---------- .../examples/grids/create-string-column.md | 22 ------------- .../server-php/examples/grids/create-table.md | 20 ----------- .../examples/grids/create-url-column.md | 20 ----------- .../examples/grids/decrement-row-column.md | 20 ----------- .../examples/grids/delete-column.md | 17 ---------- .../examples/grids/delete-database.md | 15 --------- .../server-php/examples/grids/delete-index.md | 17 ---------- .../server-php/examples/grids/delete-row.md | 17 ---------- .../server-php/examples/grids/delete-rows.md | 17 ---------- .../server-php/examples/grids/delete-table.md | 16 --------- .../server-php/examples/grids/get-column.md | 17 ---------- .../server-php/examples/grids/get-database.md | 15 --------- .../server-php/examples/grids/get-index.md | 17 ---------- .../server-php/examples/grids/get-row.md | 18 ---------- .../server-php/examples/grids/get-table.md | 16 --------- .../examples/grids/increment-row-column.md | 20 ----------- .../server-php/examples/grids/list-columns.md | 17 ---------- .../examples/grids/list-databases.md | 16 --------- .../server-php/examples/grids/list-indexes.md | 17 ---------- .../server-php/examples/grids/list-rows.md | 17 ---------- .../server-php/examples/grids/list-tables.md | 17 ---------- .../examples/grids/update-boolean-column.md | 20 ----------- .../examples/grids/update-database.md | 17 ---------- .../examples/grids/update-datetime-column.md | 20 ----------- .../examples/grids/update-email-column.md | 20 ----------- .../examples/grids/update-enum-column.md | 21 ------------ .../examples/grids/update-float-column.md | 22 ------------- .../examples/grids/update-integer-column.md | 22 ------------- .../examples/grids/update-ip-column.md | 20 ----------- .../grids/update-relationship-column.md | 19 ----------- .../server-php/examples/grids/update-row.md | 19 ----------- .../server-php/examples/grids/update-rows.md | 18 ---------- .../examples/grids/update-string-column.md | 21 ------------ .../server-php/examples/grids/update-table.md | 20 ----------- .../examples/grids/update-url-column.md | 20 ----------- .../server-php/examples/grids/upsert-row.md | 19 ----------- .../server-php/examples/grids/upsert-rows.md | 17 ---------- .../examples/databases/create-document.md | 3 +- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 7 ++-- .../examples/databases/upsert-documents.md | 5 ++- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 18 ---------- .../examples/grids/create-database.md | 15 --------- .../examples/grids/create-datetime-column.md | 18 ---------- .../examples/grids/create-email-column.md | 18 ---------- .../examples/grids/create-enum-column.md | 19 ----------- .../examples/grids/create-float-column.md | 20 ----------- .../examples/grids/create-index.md | 20 ----------- .../examples/grids/create-integer-column.md | 20 ----------- .../examples/grids/create-ip-column.md | 18 ---------- .../grids/create-relationship-column.md | 21 ------------ .../examples/grids/create-row.md | 17 ---------- .../examples/grids/create-rows.md | 15 --------- .../examples/grids/create-string-column.md | 20 ----------- .../examples/grids/create-table.md | 18 ---------- .../examples/grids/create-url-column.md | 18 ---------- .../examples/grids/decrement-row-column.md | 18 ---------- .../examples/grids/delete-column.md | 15 --------- .../examples/grids/delete-database.md | 13 -------- .../examples/grids/delete-index.md | 15 --------- .../examples/grids/delete-row.md | 15 --------- .../examples/grids/delete-rows.md | 15 --------- .../examples/grids/delete-table.md | 14 -------- .../examples/grids/get-column.md | 15 --------- .../examples/grids/get-database.md | 13 -------- .../server-python/examples/grids/get-index.md | 15 --------- .../server-python/examples/grids/get-row.md | 16 --------- .../server-python/examples/grids/get-table.md | 14 -------- .../examples/grids/increment-row-column.md | 18 ---------- .../examples/grids/list-columns.md | 15 --------- .../examples/grids/list-databases.md | 14 -------- .../examples/grids/list-indexes.md | 15 --------- .../server-python/examples/grids/list-rows.md | 15 --------- .../examples/grids/list-tables.md | 15 --------- .../examples/grids/update-boolean-column.md | 18 ---------- .../examples/grids/update-database.md | 15 --------- .../examples/grids/update-datetime-column.md | 18 ---------- .../examples/grids/update-email-column.md | 18 ---------- .../examples/grids/update-enum-column.md | 19 ----------- .../examples/grids/update-float-column.md | 20 ----------- .../examples/grids/update-integer-column.md | 20 ----------- .../examples/grids/update-ip-column.md | 18 ---------- .../grids/update-relationship-column.md | 17 ---------- .../examples/grids/update-row.md | 17 ---------- .../examples/grids/update-rows.md | 16 --------- .../examples/grids/update-string-column.md | 19 ----------- .../examples/grids/update-table.md | 18 ---------- .../examples/grids/update-url-column.md | 18 ---------- .../examples/grids/upsert-row.md | 17 ---------- .../examples/grids/upsert-rows.md | 15 --------- .../account/create-anonymous-session.md | 2 +- .../account/create-email-password-session.md | 2 +- .../examples/account/create-email-token.md | 2 +- .../examples/account/create-j-w-t.md | 2 +- .../account/create-magic-u-r-l-token.md | 2 +- .../account/create-mfa-authenticator.md | 2 +- .../examples/account/create-mfa-challenge.md | 2 +- .../account/create-mfa-recovery-codes.md | 2 +- .../examples/account/create-o-auth2token.md | 2 +- .../examples/account/create-phone-token.md | 2 +- .../account/create-phone-verification.md | 2 +- .../examples/account/create-recovery.md | 2 +- .../examples/account/create-session.md | 2 +- .../examples/account/create-verification.md | 2 +- .../server-rest/examples/account/create.md | 2 +- .../examples/account/delete-identity.md | 2 +- .../account/delete-mfa-authenticator.md | 2 +- .../examples/account/delete-session.md | 2 +- .../examples/account/delete-sessions.md | 2 +- .../account/get-mfa-recovery-codes.md | 2 +- .../server-rest/examples/account/get-prefs.md | 2 +- .../examples/account/get-session.md | 2 +- .../1.8.x/server-rest/examples/account/get.md | 2 +- .../examples/account/list-identities.md | 2 +- .../server-rest/examples/account/list-logs.md | 2 +- .../examples/account/list-mfa-factors.md | 2 +- .../examples/account/list-sessions.md | 2 +- .../examples/account/update-email.md | 2 +- .../examples/account/update-m-f-a.md | 2 +- .../account/update-magic-u-r-l-session.md | 2 +- .../account/update-mfa-authenticator.md | 2 +- .../examples/account/update-mfa-challenge.md | 2 +- .../account/update-mfa-recovery-codes.md | 2 +- .../examples/account/update-name.md | 2 +- .../examples/account/update-password.md | 2 +- .../examples/account/update-phone-session.md | 2 +- .../account/update-phone-verification.md | 2 +- .../examples/account/update-phone.md | 2 +- .../examples/account/update-prefs.md | 2 +- .../examples/account/update-recovery.md | 2 +- .../examples/account/update-session.md | 2 +- .../examples/account/update-status.md | 2 +- .../examples/account/update-verification.md | 2 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../examples/avatars/get-favicon.md | 2 +- .../server-rest/examples/avatars/get-flag.md | 2 +- .../server-rest/examples/avatars/get-image.md | 2 +- .../examples/avatars/get-initials.md | 2 +- .../server-rest/examples/avatars/get-q-r.md | 2 +- .../databases/create-boolean-attribute.md | 2 +- .../examples/databases/create-collection.md | 2 +- .../databases/create-datetime-attribute.md | 2 +- .../examples/databases/create-document.md | 2 +- .../examples/databases/create-documents.md | 2 +- .../databases/create-email-attribute.md | 2 +- .../databases/create-enum-attribute.md | 2 +- .../databases/create-float-attribute.md | 2 +- .../examples/databases/create-index.md | 2 +- .../databases/create-integer-attribute.md | 2 +- .../examples/databases/create-ip-attribute.md | 2 +- .../create-relationship-attribute.md | 2 +- .../databases/create-string-attribute.md | 2 +- .../databases/create-url-attribute.md | 2 +- .../server-rest/examples/databases/create.md | 2 +- .../databases/decrement-document-attribute.md | 2 +- .../examples/databases/delete-attribute.md | 2 +- .../examples/databases/delete-collection.md | 2 +- .../examples/databases/delete-document.md | 2 +- .../examples/databases/delete-documents.md | 2 +- .../examples/databases/delete-index.md | 2 +- .../server-rest/examples/databases/delete.md | 2 +- .../examples/databases/get-attribute.md | 2 +- .../examples/databases/get-collection.md | 2 +- .../examples/databases/get-document.md | 2 +- .../examples/databases/get-index.md | 2 +- .../server-rest/examples/databases/get.md | 2 +- .../databases/increment-document-attribute.md | 2 +- .../examples/databases/list-attributes.md | 2 +- .../examples/databases/list-collections.md | 2 +- .../examples/databases/list-documents.md | 2 +- .../examples/databases/list-indexes.md | 2 +- .../server-rest/examples/databases/list.md | 2 +- .../databases/update-boolean-attribute.md | 2 +- .../examples/databases/update-collection.md | 2 +- .../databases/update-datetime-attribute.md | 2 +- .../examples/databases/update-document.md | 2 +- .../examples/databases/update-documents.md | 2 +- .../databases/update-email-attribute.md | 2 +- .../databases/update-enum-attribute.md | 2 +- .../databases/update-float-attribute.md | 2 +- .../databases/update-integer-attribute.md | 2 +- .../examples/databases/update-ip-attribute.md | 2 +- .../update-relationship-attribute.md | 2 +- .../databases/update-string-attribute.md | 2 +- .../databases/update-url-attribute.md | 2 +- .../server-rest/examples/databases/update.md | 2 +- .../examples/databases/upsert-document.md | 6 +--- .../examples/databases/upsert-documents.md | 5 +-- .../examples/functions/create-deployment.md | 2 +- .../functions/create-duplicate-deployment.md | 2 +- .../examples/functions/create-execution.md | 4 +-- .../functions/create-template-deployment.md | 2 +- .../examples/functions/create-variable.md | 2 +- .../functions/create-vcs-deployment.md | 2 +- .../server-rest/examples/functions/create.md | 2 +- .../examples/functions/delete-deployment.md | 2 +- .../examples/functions/delete-execution.md | 2 +- .../examples/functions/delete-variable.md | 2 +- .../server-rest/examples/functions/delete.md | 2 +- .../functions/get-deployment-download.md | 2 +- .../examples/functions/get-deployment.md | 2 +- .../examples/functions/get-execution.md | 2 +- .../examples/functions/get-variable.md | 2 +- .../server-rest/examples/functions/get.md | 2 +- .../examples/functions/list-deployments.md | 2 +- .../examples/functions/list-executions.md | 2 +- .../examples/functions/list-runtimes.md | 2 +- .../examples/functions/list-specifications.md | 2 +- .../examples/functions/list-variables.md | 2 +- .../server-rest/examples/functions/list.md | 2 +- .../functions/update-deployment-status.md | 2 +- .../functions/update-function-deployment.md | 2 +- .../examples/functions/update-variable.md | 2 +- .../server-rest/examples/functions/update.md | 2 +- .../server-rest/examples/graphql/mutation.md | 2 +- .../server-rest/examples/graphql/query.md | 2 +- .../examples/grids/create-boolean-column.md | 13 -------- .../examples/grids/create-database.md | 12 ------- .../examples/grids/create-datetime-column.md | 13 -------- .../examples/grids/create-email-column.md | 13 -------- .../examples/grids/create-enum-column.md | 14 -------- .../examples/grids/create-float-column.md | 15 --------- .../examples/grids/create-index.md | 14 -------- .../examples/grids/create-integer-column.md | 15 --------- .../examples/grids/create-ip-column.md | 13 -------- .../grids/create-relationship-column.md | 15 --------- .../server-rest/examples/grids/create-row.md | 14 -------- .../server-rest/examples/grids/create-rows.md | 12 ------- .../examples/grids/create-string-column.md | 15 --------- .../examples/grids/create-table.md | 14 -------- .../examples/grids/create-url-column.md | 13 -------- .../examples/grids/decrement-row-column.md | 11 ------- .../examples/grids/delete-column.md | 7 ---- .../examples/grids/delete-database.md | 7 ---- .../examples/grids/delete-index.md | 7 ---- .../server-rest/examples/grids/delete-row.md | 9 ----- .../server-rest/examples/grids/delete-rows.md | 10 ------ .../examples/grids/delete-table.md | 7 ---- .../server-rest/examples/grids/get-column.md | 5 --- .../examples/grids/get-database.md | 5 --- .../server-rest/examples/grids/get-index.md | 5 --- .../server-rest/examples/grids/get-row.md | 7 ---- .../server-rest/examples/grids/get-table.md | 5 --- .../examples/grids/increment-row-column.md | 11 ------- .../examples/grids/list-columns.md | 5 --- .../examples/grids/list-databases.md | 5 --- .../examples/grids/list-indexes.md | 5 --- .../server-rest/examples/grids/list-rows.md | 7 ---- .../server-rest/examples/grids/list-tables.md | 5 --- .../examples/grids/update-boolean-column.md | 12 ------- .../examples/grids/update-database.md | 11 ------- .../examples/grids/update-datetime-column.md | 12 ------- .../examples/grids/update-email-column.md | 12 ------- .../examples/grids/update-enum-column.md | 13 -------- .../examples/grids/update-float-column.md | 14 -------- .../examples/grids/update-integer-column.md | 14 -------- .../examples/grids/update-ip-column.md | 12 ------- .../grids/update-relationship-column.md | 11 ------- .../server-rest/examples/grids/update-row.md | 13 -------- .../server-rest/examples/grids/update-rows.md | 11 ------- .../examples/grids/update-string-column.md | 13 -------- .../examples/grids/update-table.md | 13 -------- .../examples/grids/update-url-column.md | 12 ------- .../server-rest/examples/grids/upsert-row.md | 13 -------- .../server-rest/examples/grids/upsert-rows.md | 10 ------ .../examples/health/get-antivirus.md | 2 +- .../server-rest/examples/health/get-cache.md | 2 +- .../examples/health/get-certificate.md | 2 +- .../server-rest/examples/health/get-d-b.md | 2 +- .../examples/health/get-failed-jobs.md | 2 +- .../examples/health/get-pub-sub.md | 2 +- .../examples/health/get-queue-builds.md | 2 +- .../examples/health/get-queue-certificates.md | 2 +- .../examples/health/get-queue-databases.md | 2 +- .../examples/health/get-queue-deletes.md | 2 +- .../examples/health/get-queue-functions.md | 2 +- .../examples/health/get-queue-logs.md | 2 +- .../examples/health/get-queue-mails.md | 2 +- .../examples/health/get-queue-messaging.md | 2 +- .../examples/health/get-queue-migrations.md | 2 +- .../health/get-queue-stats-resources.md | 2 +- .../examples/health/get-queue-usage.md | 2 +- .../examples/health/get-queue-webhooks.md | 2 +- .../examples/health/get-storage-local.md | 2 +- .../examples/health/get-storage.md | 2 +- .../server-rest/examples/health/get-time.md | 2 +- .../1.8.x/server-rest/examples/health/get.md | 2 +- .../1.8.x/server-rest/examples/locale/get.md | 2 +- .../server-rest/examples/locale/list-codes.md | 2 +- .../examples/locale/list-continents.md | 2 +- .../examples/locale/list-countries-e-u.md | 2 +- .../examples/locale/list-countries-phones.md | 2 +- .../examples/locale/list-countries.md | 2 +- .../examples/locale/list-currencies.md | 2 +- .../examples/locale/list-languages.md | 2 +- .../messaging/create-apns-provider.md | 2 +- .../examples/messaging/create-email.md | 2 +- .../examples/messaging/create-fcm-provider.md | 2 +- .../messaging/create-mailgun-provider.md | 2 +- .../messaging/create-msg91provider.md | 2 +- .../examples/messaging/create-push.md | 2 +- .../messaging/create-sendgrid-provider.md | 2 +- .../examples/messaging/create-sms.md | 2 +- .../messaging/create-smtp-provider.md | 2 +- .../examples/messaging/create-subscriber.md | 2 +- .../messaging/create-telesign-provider.md | 2 +- .../messaging/create-textmagic-provider.md | 2 +- .../examples/messaging/create-topic.md | 2 +- .../messaging/create-twilio-provider.md | 2 +- .../messaging/create-vonage-provider.md | 2 +- .../examples/messaging/delete-provider.md | 2 +- .../examples/messaging/delete-subscriber.md | 2 +- .../examples/messaging/delete-topic.md | 2 +- .../server-rest/examples/messaging/delete.md | 2 +- .../examples/messaging/get-message.md | 2 +- .../examples/messaging/get-provider.md | 2 +- .../examples/messaging/get-subscriber.md | 2 +- .../examples/messaging/get-topic.md | 2 +- .../examples/messaging/list-message-logs.md | 2 +- .../examples/messaging/list-messages.md | 2 +- .../examples/messaging/list-provider-logs.md | 2 +- .../examples/messaging/list-providers.md | 2 +- .../messaging/list-subscriber-logs.md | 2 +- .../examples/messaging/list-subscribers.md | 2 +- .../examples/messaging/list-targets.md | 2 +- .../examples/messaging/list-topic-logs.md | 2 +- .../examples/messaging/list-topics.md | 2 +- .../messaging/update-apns-provider.md | 2 +- .../examples/messaging/update-email.md | 2 +- .../examples/messaging/update-fcm-provider.md | 2 +- .../messaging/update-mailgun-provider.md | 2 +- .../messaging/update-msg91provider.md | 2 +- .../examples/messaging/update-push.md | 2 +- .../messaging/update-sendgrid-provider.md | 2 +- .../examples/messaging/update-sms.md | 2 +- .../messaging/update-smtp-provider.md | 2 +- .../messaging/update-telesign-provider.md | 2 +- .../messaging/update-textmagic-provider.md | 2 +- .../examples/messaging/update-topic.md | 2 +- .../messaging/update-twilio-provider.md | 2 +- .../messaging/update-vonage-provider.md | 2 +- .../examples/sites/create-deployment.md | 2 +- .../sites/create-duplicate-deployment.md | 2 +- .../sites/create-template-deployment.md | 2 +- .../examples/sites/create-variable.md | 2 +- .../examples/sites/create-vcs-deployment.md | 2 +- .../server-rest/examples/sites/create.md | 2 +- .../examples/sites/delete-deployment.md | 2 +- .../server-rest/examples/sites/delete-log.md | 2 +- .../examples/sites/delete-variable.md | 2 +- .../server-rest/examples/sites/delete.md | 2 +- .../examples/sites/get-deployment-download.md | 2 +- .../examples/sites/get-deployment.md | 2 +- .../server-rest/examples/sites/get-log.md | 2 +- .../examples/sites/get-variable.md | 2 +- .../1.8.x/server-rest/examples/sites/get.md | 2 +- .../examples/sites/list-deployments.md | 2 +- .../examples/sites/list-frameworks.md | 2 +- .../server-rest/examples/sites/list-logs.md | 2 +- .../examples/sites/list-specifications.md | 2 +- .../examples/sites/list-variables.md | 2 +- .../1.8.x/server-rest/examples/sites/list.md | 2 +- .../sites/update-deployment-status.md | 2 +- .../examples/sites/update-site-deployment.md | 2 +- .../examples/sites/update-variable.md | 2 +- .../server-rest/examples/sites/update.md | 2 +- .../examples/storage/create-bucket.md | 2 +- .../examples/storage/create-file.md | 2 +- .../examples/storage/delete-bucket.md | 2 +- .../examples/storage/delete-file.md | 2 +- .../examples/storage/get-bucket.md | 2 +- .../examples/storage/get-file-download.md | 2 +- .../examples/storage/get-file-preview.md | 2 +- .../examples/storage/get-file-view.md | 2 +- .../server-rest/examples/storage/get-file.md | 2 +- .../examples/storage/list-buckets.md | 2 +- .../examples/storage/list-files.md | 2 +- .../examples/storage/update-bucket.md | 2 +- .../examples/storage/update-file.md | 2 +- .../examples/teams/create-membership.md | 2 +- .../server-rest/examples/teams/create.md | 2 +- .../examples/teams/delete-membership.md | 2 +- .../server-rest/examples/teams/delete.md | 2 +- .../examples/teams/get-membership.md | 2 +- .../server-rest/examples/teams/get-prefs.md | 2 +- .../1.8.x/server-rest/examples/teams/get.md | 2 +- .../examples/teams/list-memberships.md | 2 +- .../1.8.x/server-rest/examples/teams/list.md | 2 +- .../teams/update-membership-status.md | 2 +- .../examples/teams/update-membership.md | 2 +- .../server-rest/examples/teams/update-name.md | 2 +- .../examples/teams/update-prefs.md | 2 +- .../examples/tokens/create-file-token.md | 2 +- .../server-rest/examples/tokens/delete.md | 2 +- .../1.8.x/server-rest/examples/tokens/get.md | 2 +- .../1.8.x/server-rest/examples/tokens/list.md | 2 +- .../server-rest/examples/tokens/update.md | 2 +- .../examples/users/create-argon2user.md | 2 +- .../examples/users/create-bcrypt-user.md | 2 +- .../examples/users/create-j-w-t.md | 2 +- .../examples/users/create-m-d5user.md | 2 +- .../users/create-mfa-recovery-codes.md | 2 +- .../examples/users/create-p-h-pass-user.md | 2 +- .../examples/users/create-s-h-a-user.md | 2 +- .../users/create-scrypt-modified-user.md | 2 +- .../examples/users/create-scrypt-user.md | 2 +- .../examples/users/create-session.md | 2 +- .../examples/users/create-target.md | 2 +- .../examples/users/create-token.md | 2 +- .../server-rest/examples/users/create.md | 2 +- .../examples/users/delete-identity.md | 2 +- .../users/delete-mfa-authenticator.md | 2 +- .../examples/users/delete-session.md | 2 +- .../examples/users/delete-sessions.md | 2 +- .../examples/users/delete-target.md | 2 +- .../server-rest/examples/users/delete.md | 2 +- .../examples/users/get-mfa-recovery-codes.md | 2 +- .../server-rest/examples/users/get-prefs.md | 2 +- .../server-rest/examples/users/get-target.md | 2 +- .../1.8.x/server-rest/examples/users/get.md | 2 +- .../examples/users/list-identities.md | 2 +- .../server-rest/examples/users/list-logs.md | 2 +- .../examples/users/list-memberships.md | 2 +- .../examples/users/list-mfa-factors.md | 2 +- .../examples/users/list-sessions.md | 2 +- .../examples/users/list-targets.md | 2 +- .../1.8.x/server-rest/examples/users/list.md | 2 +- .../users/update-email-verification.md | 2 +- .../examples/users/update-email.md | 2 +- .../examples/users/update-labels.md | 2 +- .../users/update-mfa-recovery-codes.md | 2 +- .../server-rest/examples/users/update-mfa.md | 2 +- .../server-rest/examples/users/update-name.md | 2 +- .../examples/users/update-password.md | 2 +- .../users/update-phone-verification.md | 2 +- .../examples/users/update-phone.md | 2 +- .../examples/users/update-prefs.md | 2 +- .../examples/users/update-status.md | 2 +- .../examples/users/update-target.md | 2 +- .../examples/databases/create-document.md | 3 +- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 7 ++-- .../examples/databases/upsert-documents.md | 5 ++- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 19 ----------- .../examples/grids/create-database.md | 16 --------- .../examples/grids/create-datetime-column.md | 19 ----------- .../examples/grids/create-email-column.md | 19 ----------- .../examples/grids/create-enum-column.md | 20 ----------- .../examples/grids/create-float-column.md | 21 ------------ .../examples/grids/create-index.md | 21 ------------ .../examples/grids/create-integer-column.md | 21 ------------ .../examples/grids/create-ip-column.md | 19 ----------- .../grids/create-relationship-column.md | 22 ------------- .../server-ruby/examples/grids/create-row.md | 18 ---------- .../server-ruby/examples/grids/create-rows.md | 16 --------- .../examples/grids/create-string-column.md | 21 ------------ .../examples/grids/create-table.md | 19 ----------- .../examples/grids/create-url-column.md | 19 ----------- .../examples/grids/decrement-row-column.md | 19 ----------- .../examples/grids/delete-column.md | 16 --------- .../examples/grids/delete-database.md | 14 -------- .../examples/grids/delete-index.md | 16 --------- .../server-ruby/examples/grids/delete-row.md | 16 --------- .../server-ruby/examples/grids/delete-rows.md | 16 --------- .../examples/grids/delete-table.md | 15 --------- .../server-ruby/examples/grids/get-column.md | 16 --------- .../examples/grids/get-database.md | 14 -------- .../server-ruby/examples/grids/get-index.md | 16 --------- .../server-ruby/examples/grids/get-row.md | 17 ---------- .../server-ruby/examples/grids/get-table.md | 15 --------- .../examples/grids/increment-row-column.md | 19 ----------- .../examples/grids/list-columns.md | 16 --------- .../examples/grids/list-databases.md | 15 --------- .../examples/grids/list-indexes.md | 16 --------- .../server-ruby/examples/grids/list-rows.md | 16 --------- .../server-ruby/examples/grids/list-tables.md | 16 --------- .../examples/grids/update-boolean-column.md | 19 ----------- .../examples/grids/update-database.md | 16 --------- .../examples/grids/update-datetime-column.md | 19 ----------- .../examples/grids/update-email-column.md | 19 ----------- .../examples/grids/update-enum-column.md | 20 ----------- .../examples/grids/update-float-column.md | 21 ------------ .../examples/grids/update-integer-column.md | 21 ------------ .../examples/grids/update-ip-column.md | 19 ----------- .../grids/update-relationship-column.md | 18 ---------- .../server-ruby/examples/grids/update-row.md | 18 ---------- .../server-ruby/examples/grids/update-rows.md | 17 ---------- .../examples/grids/update-string-column.md | 20 ----------- .../examples/grids/update-table.md | 19 ----------- .../examples/grids/update-url-column.md | 19 ----------- .../server-ruby/examples/grids/upsert-row.md | 18 ---------- .../server-ruby/examples/grids/upsert-rows.md | 16 --------- .../examples/databases/create-document.md | 3 +- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 7 ++-- .../examples/databases/upsert-documents.md | 5 ++- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 18 ---------- .../examples/grids/create-database.md | 15 --------- .../examples/grids/create-datetime-column.md | 18 ---------- .../examples/grids/create-email-column.md | 18 ---------- .../examples/grids/create-enum-column.md | 19 ----------- .../examples/grids/create-float-column.md | 20 ----------- .../examples/grids/create-index.md | 20 ----------- .../examples/grids/create-integer-column.md | 20 ----------- .../examples/grids/create-ip-column.md | 18 ---------- .../grids/create-relationship-column.md | 21 ------------ .../server-swift/examples/grids/create-row.md | 17 ---------- .../examples/grids/create-rows.md | 15 --------- .../examples/grids/create-string-column.md | 20 ----------- .../examples/grids/create-table.md | 18 ---------- .../examples/grids/create-url-column.md | 18 ---------- .../examples/grids/decrement-row-column.md | 18 ---------- .../examples/grids/delete-column.md | 15 --------- .../examples/grids/delete-database.md | 13 -------- .../examples/grids/delete-index.md | 15 --------- .../server-swift/examples/grids/delete-row.md | 15 --------- .../examples/grids/delete-rows.md | 15 --------- .../examples/grids/delete-table.md | 14 -------- .../server-swift/examples/grids/get-column.md | 15 --------- .../examples/grids/get-database.md | 13 -------- .../server-swift/examples/grids/get-index.md | 15 --------- .../server-swift/examples/grids/get-row.md | 16 --------- .../server-swift/examples/grids/get-table.md | 14 -------- .../examples/grids/increment-row-column.md | 18 ---------- .../examples/grids/list-columns.md | 15 --------- .../examples/grids/list-databases.md | 14 -------- .../examples/grids/list-indexes.md | 15 --------- .../server-swift/examples/grids/list-rows.md | 15 --------- .../examples/grids/list-tables.md | 15 --------- .../examples/grids/update-boolean-column.md | 18 ---------- .../examples/grids/update-database.md | 15 --------- .../examples/grids/update-datetime-column.md | 18 ---------- .../examples/grids/update-email-column.md | 18 ---------- .../examples/grids/update-enum-column.md | 19 ----------- .../examples/grids/update-float-column.md | 20 ----------- .../examples/grids/update-integer-column.md | 20 ----------- .../examples/grids/update-ip-column.md | 18 ---------- .../grids/update-relationship-column.md | 18 ---------- .../server-swift/examples/grids/update-row.md | 17 ---------- .../examples/grids/update-rows.md | 16 --------- .../examples/grids/update-string-column.md | 19 ----------- .../examples/grids/update-table.md | 18 ---------- .../examples/grids/update-url-column.md | 18 ---------- .../server-swift/examples/grids/upsert-row.md | 17 ---------- .../examples/grids/upsert-rows.md | 15 --------- 1284 files changed, 579 insertions(+), 14178 deletions(-) delete mode 100644 docs/examples/1.8.x/client-android/java/grids/create-row.md delete mode 100644 docs/examples/1.8.x/client-android/java/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/client-android/java/grids/get-row.md delete mode 100644 docs/examples/1.8.x/client-android/java/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/client-android/java/grids/update-row.md delete mode 100644 docs/examples/1.8.x/client-android/java/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/create-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/get-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/update-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/client-web/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-database-usage.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-table-usage.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-database-logs.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-database-usage.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-row-logs.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-table-logs.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-database-usage.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-table-usage.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-database-logs.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-database-usage.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-row-logs.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-table-logs.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-database.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-index.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-table.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-database.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-index.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-table.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-database.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-index.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-table.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-columns.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-databases.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-tables.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-database.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-table.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md diff --git a/docs/examples/1.8.x/client-android/java/databases/create-document.md b/docs/examples/1.8.x/client-android/java/databases/create-document.md index 4804d751e3..7fb129bb0b 100644 --- a/docs/examples/1.8.x/client-android/java/databases/create-document.md +++ b/docs/examples/1.8.x/client-android/java/databases/create-document.md @@ -4,7 +4,9 @@ import io.appwrite.services.Databases; Client client = new Client(context) .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/client-android/java/databases/upsert-document.md b/docs/examples/1.8.x/client-android/java/databases/upsert-document.md index 868576b982..ba7336f3f9 100644 --- a/docs/examples/1.8.x/client-android/java/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-android/java/databases/upsert-document.md @@ -4,7 +4,9 @@ import io.appwrite.services.Databases; Client client = new Client(context) .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token Databases databases = new Databases(client); @@ -12,8 +14,6 @@ databases.upsertDocument( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId - mapOf( "a" to "b" ), // data - listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/client-android/java/functions/create-execution.md b/docs/examples/1.8.x/client-android/java/functions/create-execution.md index 06c50278a5..c138b0ef86 100644 --- a/docs/examples/1.8.x/client-android/java/functions/create-execution.md +++ b/docs/examples/1.8.x/client-android/java/functions/create-execution.md @@ -15,7 +15,7 @@ functions.createExecution( "<PATH>", // path (optional) ExecutionMethod.GET, // method (optional) mapOf( "a" to "b" ), // headers (optional) - "<SCHEDULED_AT>", // scheduledAt (optional) + "", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/client-android/java/grids/create-row.md b/docs/examples/1.8.x/client-android/java/grids/create-row.md deleted file mode 100644 index 93cea1f09c..0000000000 --- a/docs/examples/1.8.x/client-android/java/grids/create-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Grids grids = new Grids(client); - -grids.createRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/grids/delete-row.md b/docs/examples/1.8.x/client-android/java/grids/delete-row.md deleted file mode 100644 index a73c03a06e..0000000000 --- a/docs/examples/1.8.x/client-android/java/grids/delete-row.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Grids grids = new Grids(client); - -grids.deleteRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/grids/get-row.md b/docs/examples/1.8.x/client-android/java/grids/get-row.md deleted file mode 100644 index 4968759d6b..0000000000 --- a/docs/examples/1.8.x/client-android/java/grids/get-row.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Grids grids = new Grids(client); - -grids.getRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/grids/list-rows.md b/docs/examples/1.8.x/client-android/java/grids/list-rows.md deleted file mode 100644 index 55336dc452..0000000000 --- a/docs/examples/1.8.x/client-android/java/grids/list-rows.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Grids grids = new Grids(client); - -grids.listRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/grids/update-row.md b/docs/examples/1.8.x/client-android/java/grids/update-row.md deleted file mode 100644 index 23dc0907eb..0000000000 --- a/docs/examples/1.8.x/client-android/java/grids/update-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Grids grids = new Grids(client); - -grids.updateRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/grids/upsert-row.md b/docs/examples/1.8.x/client-android/java/grids/upsert-row.md deleted file mode 100644 index 3938fde103..0000000000 --- a/docs/examples/1.8.x/client-android/java/grids/upsert-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Grids grids = new Grids(client); - -grids.upsertRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md index 849a636afb..0bafb315e7 100644 --- a/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md +++ b/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md @@ -4,7 +4,9 @@ import io.appwrite.services.Databases val client = Client(context) .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token val databases = Databases(client) diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md index a31dfc8797..7939fde2be 100644 --- a/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md @@ -4,7 +4,9 @@ import io.appwrite.services.Databases val client = Client(context) .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token val databases = Databases(client) @@ -12,6 +14,4 @@ val result = databases.upsertDocument( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", documentId = "<DOCUMENT_ID>", - data = mapOf( "a" to "b" ), - permissions = listOf("read("any")"), // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md b/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md index 5e1950b8d9..cb7c60bac1 100644 --- a/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md +++ b/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md @@ -15,5 +15,5 @@ val result = functions.createExecution( path = "<PATH>", // (optional) method = ExecutionMethod.GET, // (optional) headers = mapOf( "a" to "b" ), // (optional) - scheduledAt = "<SCHEDULED_AT>", // (optional) + scheduledAt = "", // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/create-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/create-row.md deleted file mode 100644 index 5b29ac0db0..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/grids/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val grids = Grids(client) - -val result = grids.createRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), - permissions = listOf("read("any")"), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md deleted file mode 100644 index e85ff6c4ad..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val grids = Grids(client) - -val result = grids.deleteRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/get-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/get-row.md deleted file mode 100644 index 0b6c313645..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/grids/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val grids = Grids(client) - -val result = grids.getRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - queries = listOf(), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md b/docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md deleted file mode 100644 index 153e62787f..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val grids = Grids(client) - -val result = grids.listRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf(), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/update-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/update-row.md deleted file mode 100644 index 8dff0b157c..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/grids/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val grids = Grids(client) - -val result = grids.updateRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), // (optional) - permissions = listOf("read("any")"), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md deleted file mode 100644 index a6f5bb846e..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val grids = Grids(client) - -val result = grids.upsertRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), // (optional) - permissions = listOf("read("any")"), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-apple/examples/databases/create-document.md b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md index 51adb64bb3..6c2baee728 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md @@ -2,7 +2,9 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token let databases = Databases(client) diff --git a/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md index 3e1bf83a66..bb713146ec 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md @@ -2,15 +2,15 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + .setKey("") // + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token let databases = Databases(client) let document = try await databases.upsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>", - data: [:], - permissions: ["read("any")"] // optional + documentId: "<DOCUMENT_ID>" ) diff --git a/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md b/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md index b7311df846..7470e9ebf6 100644 --- a/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md @@ -14,6 +14,6 @@ let execution = try await functions.createExecution( path: "<PATH>", // optional method: .gET, // optional headers: [:], // optional - scheduledAt: "<SCHEDULED_AT>" // optional + scheduledAt: "" // optional ) diff --git a/docs/examples/1.8.x/client-apple/examples/grids/create-row.md b/docs/examples/1.8.x/client-apple/examples/grids/create-row.md deleted file mode 100644 index 0739b27949..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/grids/create-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let grids = Grids(client) - -let row = try await grids.createRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/client-apple/examples/grids/delete-row.md b/docs/examples/1.8.x/client-apple/examples/grids/delete-row.md deleted file mode 100644 index 58ae835ec5..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/grids/delete-row.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let grids = Grids(client) - -let result = try await grids.deleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -) - diff --git a/docs/examples/1.8.x/client-apple/examples/grids/get-row.md b/docs/examples/1.8.x/client-apple/examples/grids/get-row.md deleted file mode 100644 index fccdad1f34..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/grids/get-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let grids = Grids(client) - -let row = try await grids.getRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/client-apple/examples/grids/list-rows.md b/docs/examples/1.8.x/client-apple/examples/grids/list-rows.md deleted file mode 100644 index 1b4d885a64..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/grids/list-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let grids = Grids(client) - -let rowList = try await grids.listRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/client-apple/examples/grids/update-row.md b/docs/examples/1.8.x/client-apple/examples/grids/update-row.md deleted file mode 100644 index 95a3611a92..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/grids/update-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let grids = Grids(client) - -let row = try await grids.updateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], // optional - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md deleted file mode 100644 index c5638a4881..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let grids = Grids(client) - -let row = try await grids.upsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], // optional - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md index 27efc34580..4f286fff95 100644 --- a/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md @@ -2,7 +2,9 @@ import 'package:appwrite/appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token Databases databases = Databases(client); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md index 398a99cb1d..ec3af47c3a 100644 --- a/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md @@ -2,7 +2,9 @@ import 'package:appwrite/appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token Databases databases = Databases(client); @@ -10,6 +12,4 @@ Document result = await databases.upsertDocument( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', documentId: '<DOCUMENT_ID>', - data: {}, - permissions: ["read("any")"], // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md b/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md index bbd7cd37a6..d2a3d9e00a 100644 --- a/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md @@ -13,5 +13,5 @@ Execution result = await functions.createExecution( path: '<PATH>', // optional method: ExecutionMethod.gET, // optional headers: {}, // optional - scheduledAt: '<SCHEDULED_AT>', // optional + scheduledAt: '', // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/create-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/create-row.md deleted file mode 100644 index 2f80a01806..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/grids/create-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Grids grids = Grids(client); - -Row result = await grids.createRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, - permissions: ["read("any")"], // optional -); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md deleted file mode 100644 index 04f5aec544..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Grids grids = Grids(client); - -await grids.deleteRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', -); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/get-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/get-row.md deleted file mode 100644 index a8a380ee7c..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/grids/get-row.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Grids grids = Grids(client); - -Row result = await grids.getRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - queries: [], // optional -); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md b/docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md deleted file mode 100644 index 6654c57aaa..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Grids grids = Grids(client); - -RowList result = await grids.listRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // optional -); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/update-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/update-row.md deleted file mode 100644 index 293f38877a..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/grids/update-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Grids grids = Grids(client); - -Row result = await grids.updateRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, // optional - permissions: ["read("any")"], // optional -); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md deleted file mode 100644 index 2cec5621b7..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Grids grids = Grids(client); - -Row result = await grids.upsertRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, // optional - permissions: ["read("any")"], // optional -); diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md index 9d1e753081..c381fe35a3 100644 --- a/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md @@ -2,9 +2,7 @@ mutation { databasesUpsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>", - data: "{}", - permissions: ["read("any")"] + documentId: "<DOCUMENT_ID>" ) { _id _sequence diff --git a/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md b/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md index 8979880723..1479aa3bb6 100644 --- a/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md @@ -6,7 +6,7 @@ mutation { path: "<PATH>", method: "GET", headers: "{}", - scheduledAt: "<SCHEDULED_AT>" + scheduledAt: "" ) { _id _createdAt diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/create-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/create-row.md deleted file mode 100644 index cffb7361f2..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/grids/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - gridsCreateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md deleted file mode 100644 index 40dcbdc219..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md +++ /dev/null @@ -1,9 +0,0 @@ -mutation { - gridsDeleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" - ) { - status - } -} diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/get-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/get-row.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/list-rows.md b/docs/examples/1.8.x/client-graphql/examples/grids/list-rows.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/update-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/update-row.md deleted file mode 100644 index 2bb105e8c0..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/grids/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - gridsUpdateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md deleted file mode 100644 index f8e0606109..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - gridsUpsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md b/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md index 50161e433f..97e2150c39 100644 --- a/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md +++ b/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md index 1b28231ed3..ec768fcfaf 100644 --- a/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md @@ -2,7 +2,9 @@ import { Client, Databases } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token const databases = new Databases(client); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md index ae423d12a7..56d3af23ae 100644 --- a/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md @@ -2,16 +2,16 @@ import { Client, Databases } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token const databases = new Databases(client); const result = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data - ["read("any")"] // permissions (optional) + '<DOCUMENT_ID>' // documentId ); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md b/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md index 7d850c8103..72c71f7767 100644 --- a/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md @@ -13,7 +13,7 @@ const result = await functions.createExecution( '<PATH>', // path (optional) ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '<SCHEDULED_AT>' // scheduledAt (optional) + '' // scheduledAt (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/create-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/create-row.md deleted file mode 100644 index 9fdbce2dd9..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/grids/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/delete-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/delete-row.md deleted file mode 100644 index 33a5a50a69..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/grids/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/get-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/get-row.md deleted file mode 100644 index 7df0636b2e..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/grids/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Grids } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/list-rows.md b/docs/examples/1.8.x/client-react-native/examples/grids/list-rows.md deleted file mode 100644 index 3fd58773ef..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/grids/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/update-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/update-row.md deleted file mode 100644 index 39b147758f..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/grids/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/upsert-row.md deleted file mode 100644 index 54443a6a4d..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/grids/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md index b62c82a6a8..2079b045d1 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md @@ -1,6 +1,6 @@ POST /v1/account/sessions/anonymous HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md index 1103d2ebfb..8aee0e5b15 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md @@ -1,7 +1,7 @@ POST /v1/account/sessions/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md index 552b724b9c..98c5c9b454 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md index 62a7dee7e9..a8da4695c3 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md @@ -1,6 +1,6 @@ POST /v1/account/jwts HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md index 29d68bd0fa..a3db43516a 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/magic-url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md index 62a068b6cf..8d6b52b877 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md index dd5ef4c731..9a84c0ef69 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/challenge HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md index f09323df0b..797824d5d7 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md index d136722ec8..293170b490 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md @@ -1,4 +1,4 @@ GET /v1/account/sessions/oauth2/{provider} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md index 8a0cab614f..dd1dd3ec5e 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md @@ -1,4 +1,4 @@ GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md index 5127c8377a..eef1021d9e 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md index 57b3b7d160..d161e580ff 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md @@ -1,7 +1,7 @@ POST /v1/account/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md index 459a2a2ecc..5844ccc19e 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md @@ -1,7 +1,7 @@ POST /v1/account/targets/push HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md b/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md index ea0146228b..c195b96a5e 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md @@ -1,7 +1,7 @@ POST /v1/account/recovery HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-session.md index 0acc50cda6..18e3b1acdd 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-session.md @@ -1,7 +1,7 @@ POST /v1/account/sessions/token HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-verification.md b/docs/examples/1.8.x/client-rest/examples/account/create-verification.md index ed5479dbe5..1185d3a875 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-verification.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-verification.md @@ -1,7 +1,7 @@ POST /v1/account/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create.md b/docs/examples/1.8.x/client-rest/examples/account/create.md index 15bb386f41..f546c07de5 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create.md @@ -1,7 +1,7 @@ POST /v1/account HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md b/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md index bacca18870..edb036a593 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md @@ -1,7 +1,7 @@ DELETE /v1/account/identities/{identityId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md index a0eb5a0869..de58948195 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md @@ -1,7 +1,7 @@ DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md index 9ec6e20d27..fdfc75a41b 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md @@ -1,7 +1,7 @@ DELETE /v1/account/targets/{targetId}/push HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-session.md b/docs/examples/1.8.x/client-rest/examples/account/delete-session.md index c9b0f48d6f..9454a84913 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-session.md @@ -1,7 +1,7 @@ DELETE /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md index 0b3fcd1c45..97931c12e5 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md @@ -1,7 +1,7 @@ DELETE /v1/account/sessions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md index 2ab10a2475..81edee5234 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md @@ -1,6 +1,6 @@ GET /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md b/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md index a038dacbfd..13a0b74d8f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md +++ b/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md @@ -1,6 +1,6 @@ GET /v1/account/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-session.md b/docs/examples/1.8.x/client-rest/examples/account/get-session.md index 3e372a05ef..9417755b04 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/get-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/get-session.md @@ -1,6 +1,6 @@ GET /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/get.md b/docs/examples/1.8.x/client-rest/examples/account/get.md index 104b643074..023a6d116f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/get.md +++ b/docs/examples/1.8.x/client-rest/examples/account/get.md @@ -1,6 +1,6 @@ GET /v1/account HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-identities.md b/docs/examples/1.8.x/client-rest/examples/account/list-identities.md index 5acb221584..65edceb8d6 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/list-identities.md +++ b/docs/examples/1.8.x/client-rest/examples/account/list-identities.md @@ -1,6 +1,6 @@ GET /v1/account/identities HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-logs.md b/docs/examples/1.8.x/client-rest/examples/account/list-logs.md index 8314123c9e..71e2e138ef 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/list-logs.md +++ b/docs/examples/1.8.x/client-rest/examples/account/list-logs.md @@ -1,6 +1,6 @@ GET /v1/account/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md index c591143d4e..217ec6cb30 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md +++ b/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md @@ -1,6 +1,6 @@ GET /v1/account/mfa/factors HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md b/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md index 89ef6962c9..7bff23f25b 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md +++ b/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md @@ -1,6 +1,6 @@ GET /v1/account/sessions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-email.md b/docs/examples/1.8.x/client-rest/examples/account/update-email.md index 382327e31b..fc3baaf4a4 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-email.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-email.md @@ -1,7 +1,7 @@ PATCH /v1/account/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md index a22b169751..803c47a857 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md @@ -1,7 +1,7 @@ PATCH /v1/account/mfa HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md index 1a82afbfcc..3238322e0f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md @@ -1,7 +1,7 @@ PUT /v1/account/sessions/magic-url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md index 780472291c..9d3e5dceea 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md @@ -1,7 +1,7 @@ PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md index b6a7e92b28..ddc27ae334 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md @@ -1,7 +1,7 @@ PUT /v1/account/mfa/challenge HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md index 74e9225f3e..e4ab8abb3b 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md @@ -1,7 +1,7 @@ PATCH /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-name.md b/docs/examples/1.8.x/client-rest/examples/account/update-name.md index 4c9c0e302c..f2f7caa204 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-name.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-name.md @@ -1,7 +1,7 @@ PATCH /v1/account/name HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-password.md b/docs/examples/1.8.x/client-rest/examples/account/update-password.md index e05a1c2b7f..4f69b9ab3f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-password.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-password.md @@ -1,7 +1,7 @@ PATCH /v1/account/password HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md index 54872eecd2..f1bc27d201 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md @@ -1,7 +1,7 @@ PUT /v1/account/sessions/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md index 1d4dc22520..ee6f5a68ff 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md @@ -1,7 +1,7 @@ PUT /v1/account/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone.md index 791caadb0d..bbe602a181 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-phone.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone.md @@ -1,7 +1,7 @@ PATCH /v1/account/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md b/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md index 24f2d3bcb6..aeabc2b68f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md @@ -1,7 +1,7 @@ PATCH /v1/account/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md index 95210b5a1c..2e42a2d67f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md @@ -1,7 +1,7 @@ PUT /v1/account/targets/{targetId}/push HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md b/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md index 7d40ee79fe..054aacc8ed 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md @@ -1,7 +1,7 @@ PUT /v1/account/recovery HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-session.md index 8e2257aeed..9b2ba0e4a7 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-session.md @@ -1,7 +1,7 @@ PATCH /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-status.md b/docs/examples/1.8.x/client-rest/examples/account/update-status.md index 557697fe5f..8a3e01db0b 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-status.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-status.md @@ -1,7 +1,7 @@ PATCH /v1/account/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-verification.md b/docs/examples/1.8.x/client-rest/examples/account/update-verification.md index a4dcbf76a3..0c5ed8b55d 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-verification.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-verification.md @@ -1,7 +1,7 @@ PUT /v1/account/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md index 9de9d99173..e5f6f22ab5 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md @@ -1,6 +1,6 @@ GET /v1/avatars/browsers/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md index ed30226d3b..ab513115f8 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md @@ -1,6 +1,6 @@ GET /v1/avatars/credit-cards/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md index 8eaca9452e..837dba633c 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md @@ -1,6 +1,6 @@ GET /v1/avatars/favicon HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md index 07172e89d8..d0c92d7c02 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md @@ -1,6 +1,6 @@ GET /v1/avatars/flags/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md index 98d4898e6f..2f80018f20 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md @@ -1,6 +1,6 @@ GET /v1/avatars/image HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md index 93a70a80ab..f3879b5d52 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md @@ -1,6 +1,6 @@ GET /v1/avatars/initials HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md index 39e513c810..263c54742c 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md @@ -1,6 +1,6 @@ GET /v1/avatars/qr HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/create-document.md b/docs/examples/1.8.x/client-rest/examples/databases/create-document.md index e9b165e2ac..3126197555 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/create-document.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md b/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md index 2ee4f92ec4..6b86aba853 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/get-document.md b/docs/examples/1.8.x/client-rest/examples/databases/get-document.md index dac5e48131..a32db40087 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/get-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/get-document.md @@ -1,6 +1,6 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md b/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md index e5c4936d6f..22ca529e89 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md @@ -1,6 +1,6 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/update-document.md b/docs/examples/1.8.x/client-rest/examples/databases/update-document.md index ffc5d36011..945b957c6e 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/update-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/update-document.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md index d2baeac6a8..7cfa380a40 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md @@ -1,12 +1,8 @@ PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> -{ - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md b/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md index 4ae83f3096..fec92ddab0 100644 --- a/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/executions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> @@ -12,5 +12,5 @@ X-Appwrite-JWT: <YOUR_JWT> "path": "<PATH>", "method": "GET", "headers": {}, - "scheduledAt": "<SCHEDULED_AT>" + "scheduledAt": } diff --git a/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md b/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md index e2f3e97d10..7df2f3acbe 100644 --- a/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md +++ b/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md b/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md index 445ed1fa83..b2ab0e05d1 100644 --- a/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md +++ b/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/executions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md b/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md index 4080765d58..db3b1c0c78 100644 --- a/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md @@ -2,7 +2,7 @@ POST /v1/graphql/mutation HTTP/1.1 Host: cloud.appwrite.io X-Sdk-Graphql: true Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/graphql/query.md b/docs/examples/1.8.x/client-rest/examples/graphql/query.md index b05ce724c8..8fc41efcfe 100644 --- a/docs/examples/1.8.x/client-rest/examples/graphql/query.md +++ b/docs/examples/1.8.x/client-rest/examples/graphql/query.md @@ -2,7 +2,7 @@ POST /v1/graphql HTTP/1.1 Host: cloud.appwrite.io X-Sdk-Graphql: true Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/grids/create-row.md b/docs/examples/1.8.x/client-rest/examples/grids/create-row.md deleted file mode 100644 index 98b261ecba..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/grids/create-row.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - -{ - "rowId": "<ROW_ID>", - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/client-rest/examples/grids/delete-row.md b/docs/examples/1.8.x/client-rest/examples/grids/delete-row.md deleted file mode 100644 index 6f702a8526..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/grids/delete-row.md +++ /dev/null @@ -1,8 +0,0 @@ -DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - diff --git a/docs/examples/1.8.x/client-rest/examples/grids/get-row.md b/docs/examples/1.8.x/client-rest/examples/grids/get-row.md deleted file mode 100644 index 876fe0f796..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/grids/get-row.md +++ /dev/null @@ -1,6 +0,0 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/grids/list-rows.md b/docs/examples/1.8.x/client-rest/examples/grids/list-rows.md deleted file mode 100644 index 86751cfcaf..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/grids/list-rows.md +++ /dev/null @@ -1,6 +0,0 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/grids/update-row.md b/docs/examples/1.8.x/client-rest/examples/grids/update-row.md deleted file mode 100644 index bacfb5389a..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/grids/update-row.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - -{ - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md deleted file mode 100644 index 7368fc436d..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md +++ /dev/null @@ -1,12 +0,0 @@ -PUT /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - -{ - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/client-rest/examples/locale/get.md b/docs/examples/1.8.x/client-rest/examples/locale/get.md index 8f8a1741e6..0d67644583 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/get.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/get.md @@ -1,6 +1,6 @@ GET /v1/locale HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md b/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md index 61110f6527..f362c5987e 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md @@ -1,6 +1,6 @@ GET /v1/locale/codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md b/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md index cb96cc4e16..93db4fb302 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md @@ -1,6 +1,6 @@ GET /v1/locale/continents HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md index d4de74a879..09eba6168f 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md @@ -1,6 +1,6 @@ GET /v1/locale/countries/eu HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md index 0e1ed67a7d..94ef0bb943 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md @@ -1,6 +1,6 @@ GET /v1/locale/countries/phones HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md index 58e487a875..dc8289980a 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md @@ -1,6 +1,6 @@ GET /v1/locale/countries HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md index a3a9b96c48..9a3af20c94 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md @@ -1,6 +1,6 @@ GET /v1/locale/currencies HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md b/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md index 8c7cbabddf..7d90c8b40a 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md @@ -1,6 +1,6 @@ GET /v1/locale/languages HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md index 708ec0782a..94e98c4438 100644 --- a/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md +++ b/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md @@ -1,7 +1,7 @@ POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md index 1cb9c3e516..e5ac0830a3 100644 --- a/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/create-file.md b/docs/examples/1.8.x/client-rest/examples/storage/create-file.md index 0f83797b70..f044b577b2 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/create-file.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/create-file.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md b/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md index e00392a525..8d074341fe 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md @@ -1,7 +1,7 @@ DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md index 92991d0727..58c9c6d276 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md index e84dd4dd85..ff24de4ec4 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md index f482706f6f..9c95a2b48f 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file.md index 4f929caadf..ffb3703fe1 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/get-file.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/list-files.md b/docs/examples/1.8.x/client-rest/examples/storage/list-files.md index 977bb9e713..d1258b97de 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/list-files.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/list-files.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/update-file.md b/docs/examples/1.8.x/client-rest/examples/storage/update-file.md index fed35bb860..210433622b 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/update-file.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/update-file.md @@ -1,7 +1,7 @@ PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md index f96f20c2b8..83e4803502 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md @@ -1,7 +1,7 @@ POST /v1/teams/{teamId}/memberships HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/create.md b/docs/examples/1.8.x/client-rest/examples/teams/create.md index 33cf95ba01..c80b2bda8e 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/create.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/create.md @@ -1,7 +1,7 @@ POST /v1/teams HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md index 8da481d5cf..0fc17e11ee 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md @@ -1,7 +1,7 @@ DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/delete.md b/docs/examples/1.8.x/client-rest/examples/teams/delete.md index d1dc59c23a..ad614b17d1 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/delete.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/delete.md @@ -1,7 +1,7 @@ DELETE /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md index 6e7379b0d7..dbe034f34b 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md index e541fd3fd8..ddb863181d 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get.md b/docs/examples/1.8.x/client-rest/examples/teams/get.md index 32d9156267..730d23a03b 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/get.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/get.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md index 4e364053b3..82a9f82c33 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/memberships HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/list.md b/docs/examples/1.8.x/client-rest/examples/teams/list.md index e5f0439a13..00a419269a 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/list.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/list.md @@ -1,6 +1,6 @@ GET /v1/teams HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md index da2c9189cd..9d828118f0 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md @@ -1,7 +1,7 @@ PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md index b1010ea460..3768499d16 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md @@ -1,7 +1,7 @@ PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-name.md b/docs/examples/1.8.x/client-rest/examples/teams/update-name.md index cd92d686ce..ec381348e8 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/update-name.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-name.md @@ -1,7 +1,7 @@ PUT /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md index e17dcdb260..1db6300350 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md @@ -1,7 +1,7 @@ PUT /v1/teams/{teamId}/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-web/examples/databases/create-document.md b/docs/examples/1.8.x/client-web/examples/databases/create-document.md index 916cc92689..401a67488c 100644 --- a/docs/examples/1.8.x/client-web/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-web/examples/databases/create-document.md @@ -2,7 +2,9 @@ import { Client, Databases } from "appwrite"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token const databases = new Databases(client); diff --git a/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md index cfefe06242..a581396da8 100644 --- a/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md @@ -2,16 +2,16 @@ import { Client, Databases } from "appwrite"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID + .setSession('') // The user session to authenticate with + .setKey('') // + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token const databases = new Databases(client); const result = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data - ["read("any")"] // permissions (optional) + '<DOCUMENT_ID>' // documentId ); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/functions/create-execution.md b/docs/examples/1.8.x/client-web/examples/functions/create-execution.md index be9bb508c0..8f07523b2b 100644 --- a/docs/examples/1.8.x/client-web/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-web/examples/functions/create-execution.md @@ -13,7 +13,7 @@ const result = await functions.createExecution( '<PATH>', // path (optional) ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '<SCHEDULED_AT>' // scheduledAt (optional) + '' // scheduledAt (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/create-row.md b/docs/examples/1.8.x/client-web/examples/grids/create-row.md deleted file mode 100644 index 9dc6de2769..0000000000 --- a/docs/examples/1.8.x/client-web/examples/grids/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/delete-row.md b/docs/examples/1.8.x/client-web/examples/grids/delete-row.md deleted file mode 100644 index 7d3fb7df7e..0000000000 --- a/docs/examples/1.8.x/client-web/examples/grids/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/get-row.md b/docs/examples/1.8.x/client-web/examples/grids/get-row.md deleted file mode 100644 index 778377b61b..0000000000 --- a/docs/examples/1.8.x/client-web/examples/grids/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Grids } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/list-rows.md b/docs/examples/1.8.x/client-web/examples/grids/list-rows.md deleted file mode 100644 index 07de125329..0000000000 --- a/docs/examples/1.8.x/client-web/examples/grids/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/update-row.md b/docs/examples/1.8.x/client-web/examples/grids/update-row.md deleted file mode 100644 index f37659e3ca..0000000000 --- a/docs/examples/1.8.x/client-web/examples/grids/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-web/examples/grids/upsert-row.md deleted file mode 100644 index 8850c27ebd..0000000000 --- a/docs/examples/1.8.x/client-web/examples/grids/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md b/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md index 40932014ba..151e466d02 100644 --- a/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md @@ -1,6 +1,4 @@ appwrite databases upsertDocument \ --databaseId <DATABASE_ID> \ --collectionId <COLLECTION_ID> \ - --documentId <DOCUMENT_ID> \ - --data '{ "key": "value" }' \ - + --documentId <DOCUMENT_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md index cb1677b14c..30c7dc5b4b 100644 --- a/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md @@ -1,4 +1,3 @@ appwrite databases upsertDocuments \ --databaseId <DATABASE_ID> \ - --collectionId <COLLECTION_ID> \ - --documents one two three + --collectionId <COLLECTION_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-boolean-column.md deleted file mode 100644 index 3a26ed2935..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids createBooleanColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-database.md b/docs/examples/1.8.x/console-cli/examples/grids/create-database.md deleted file mode 100644 index 741d5f83ee..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-database.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids createDatabase \ - --databaseId <DATABASE_ID> \ - --name <NAME> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-datetime-column.md deleted file mode 100644 index 1efced687d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids createDatetimeColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-email-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-email-column.md deleted file mode 100644 index f0758d2753..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-email-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids createEmailColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-enum-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-enum-column.md deleted file mode 100644 index e6ca5fdbd6..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-enum-column.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite grids createEnumColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --elements one two three \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-float-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-float-column.md deleted file mode 100644 index a17535614d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-float-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite grids createFloatColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-index.md b/docs/examples/1.8.x/console-cli/examples/grids/create-index.md deleted file mode 100644 index 9b92ecc614..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-index.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite grids createIndex \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --type key \ - --columns one two three \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-integer-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-integer-column.md deleted file mode 100644 index 0e7d408fea..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-integer-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite grids createIntegerColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-ip-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-ip-column.md deleted file mode 100644 index bc16e6b9a7..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-ip-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids createIpColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-relationship-column.md deleted file mode 100644 index d60fd4516a..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite grids createRelationshipColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --relatedTableId <RELATED_TABLE_ID> \ - --type oneToOne \ - - - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-row.md b/docs/examples/1.8.x/console-cli/examples/grids/create-row.md deleted file mode 100644 index f59ac8253c..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-row.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite grids createRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - --data '{ "key": "value" }' \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/create-rows.md deleted file mode 100644 index 8d89674dc6..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-rows.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids createRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rows one two three diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-string-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-string-column.md deleted file mode 100644 index 658bedec06..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-string-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite grids createStringColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --size 1 \ - --required false \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-table.md b/docs/examples/1.8.x/console-cli/examples/grids/create-table.md deleted file mode 100644 index 9e707fde1c..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-table.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids createTable \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --name <NAME> \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-url-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-url-column.md deleted file mode 100644 index 88adbdbb5d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/create-url-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids createUrlColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/console-cli/examples/grids/decrement-row-column.md deleted file mode 100644 index f3c1a50c2d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids decrementRowColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - --column '' \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-column.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-column.md deleted file mode 100644 index 0b60af67cc..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/delete-column.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids deleteColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-database.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-database.md deleted file mode 100644 index c5e0ad3c63..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/delete-database.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite grids deleteDatabase \ - --databaseId <DATABASE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-index.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-index.md deleted file mode 100644 index 0a1f6dc404..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/delete-index.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids deleteIndex \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-row.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-row.md deleted file mode 100644 index b360f6919a..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/delete-row.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids deleteRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-rows.md deleted file mode 100644 index 46b768f28d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/delete-rows.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids deleteRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-table.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-table.md deleted file mode 100644 index 416a07052d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/delete-table.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite grids deleteTable \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-column.md b/docs/examples/1.8.x/console-cli/examples/grids/get-column.md deleted file mode 100644 index f875d56d33..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/get-column.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids getColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-database-usage.md b/docs/examples/1.8.x/console-cli/examples/grids/get-database-usage.md deleted file mode 100644 index 0c35ea978d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/get-database-usage.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite grids getDatabaseUsage \ - --databaseId <DATABASE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-database.md b/docs/examples/1.8.x/console-cli/examples/grids/get-database.md deleted file mode 100644 index f2232bb5c0..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/get-database.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite grids getDatabase \ - --databaseId <DATABASE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-index.md b/docs/examples/1.8.x/console-cli/examples/grids/get-index.md deleted file mode 100644 index 6f88f74c23..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/get-index.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids getIndex \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-row.md b/docs/examples/1.8.x/console-cli/examples/grids/get-row.md deleted file mode 100644 index 73cc207eec..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/get-row.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite grids getRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-table-usage.md b/docs/examples/1.8.x/console-cli/examples/grids/get-table-usage.md deleted file mode 100644 index e4002ec61e..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/get-table-usage.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids getTableUsage \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-table.md b/docs/examples/1.8.x/console-cli/examples/grids/get-table.md deleted file mode 100644 index e44c98ad83..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/get-table.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite grids getTable \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/increment-row-column.md b/docs/examples/1.8.x/console-cli/examples/grids/increment-row-column.md deleted file mode 100644 index b4b84b6392..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/increment-row-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids incrementRowColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - --column '' \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-columns.md b/docs/examples/1.8.x/console-cli/examples/grids/list-columns.md deleted file mode 100644 index 968643bb6c..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/list-columns.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids listColumns \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-database-logs.md b/docs/examples/1.8.x/console-cli/examples/grids/list-database-logs.md deleted file mode 100644 index c135a2b358..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/list-database-logs.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite grids listDatabaseLogs \ - --databaseId <DATABASE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-database-usage.md b/docs/examples/1.8.x/console-cli/examples/grids/list-database-usage.md deleted file mode 100644 index f13c4e4e0a..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/list-database-usage.md +++ /dev/null @@ -1,2 +0,0 @@ -appwrite grids listDatabaseUsage \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-databases.md b/docs/examples/1.8.x/console-cli/examples/grids/list-databases.md deleted file mode 100644 index 11d448043a..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/list-databases.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite grids listDatabases \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-indexes.md b/docs/examples/1.8.x/console-cli/examples/grids/list-indexes.md deleted file mode 100644 index 85df307deb..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/list-indexes.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids listIndexes \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-row-logs.md b/docs/examples/1.8.x/console-cli/examples/grids/list-row-logs.md deleted file mode 100644 index 3a073e4708..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/list-row-logs.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite grids listRowLogs \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/list-rows.md deleted file mode 100644 index 99bf470bfb..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/list-rows.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids listRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-table-logs.md b/docs/examples/1.8.x/console-cli/examples/grids/list-table-logs.md deleted file mode 100644 index e38af040a6..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/list-table-logs.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids listTableLogs \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-tables.md b/docs/examples/1.8.x/console-cli/examples/grids/list-tables.md deleted file mode 100644 index 69f464ba86..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/list-tables.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids listTables \ - --databaseId <DATABASE_ID> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-boolean-column.md deleted file mode 100644 index a980b12aa0..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids updateBooleanColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default false \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-database.md b/docs/examples/1.8.x/console-cli/examples/grids/update-database.md deleted file mode 100644 index 079e88dfd0..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-database.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids updateDatabase \ - --databaseId <DATABASE_ID> \ - --name <NAME> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-datetime-column.md deleted file mode 100644 index 97ee021e80..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids updateDatetimeColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default '' \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-email-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-email-column.md deleted file mode 100644 index d8b0827d62..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-email-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids updateEmailColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default email@example.com \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-enum-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-enum-column.md deleted file mode 100644 index 82eb62f996..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-enum-column.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite grids updateEnumColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --elements one two three \ - --required false \ - --default <DEFAULT> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-float-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-float-column.md deleted file mode 100644 index ef3a4ad36f..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-float-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite grids updateFloatColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default null \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-integer-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-integer-column.md deleted file mode 100644 index 5b83ca938b..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-integer-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite grids updateIntegerColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default null \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-ip-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-ip-column.md deleted file mode 100644 index b0e6b8cf3a..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-ip-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids updateIpColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default '' \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-relationship-column.md deleted file mode 100644 index 00ddda788c..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite grids updateRelationshipColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-row.md b/docs/examples/1.8.x/console-cli/examples/grids/update-row.md deleted file mode 100644 index b89566b570..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-row.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite grids updateRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/update-rows.md deleted file mode 100644 index 72c63ddb41..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-rows.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite grids updateRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-string-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-string-column.md deleted file mode 100644 index a6b6280560..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-string-column.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite grids updateStringColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default <DEFAULT> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-table.md b/docs/examples/1.8.x/console-cli/examples/grids/update-table.md deleted file mode 100644 index 66e26b1752..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-table.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids updateTable \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --name <NAME> \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-url-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-url-column.md deleted file mode 100644 index ad41af9fa1..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/update-url-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite grids updateUrlColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default https://example.com \ - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/upsert-row.md b/docs/examples/1.8.x/console-cli/examples/grids/upsert-row.md deleted file mode 100644 index 8a356e7a1e..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/upsert-row.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite grids upsertRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/grids/upsert-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/upsert-rows.md deleted file mode 100644 index e4e31c1e83..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/grids/upsert-rows.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite grids upsertRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rows one two three diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-document.md b/docs/examples/1.8.x/console-web/examples/databases/create-document.md index 1b96d07899..4524017dd5 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-document.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-document.md @@ -2,7 +2,9 @@ import { Client, Databases } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID + .setSession('') // + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token const databases = new Databases(client); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-documents.md b/docs/examples/1.8.x/console-web/examples/databases/create-documents.md index 09f3007208..f7ffbe809c 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-documents.md @@ -2,7 +2,8 @@ import { Client, Databases } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new Databases(client); diff --git a/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md b/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md index 3b89ed3aef..6d92656543 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md @@ -2,16 +2,16 @@ import { Client, Databases } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID + .setSession('') // + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token const databases = new Databases(client); const result = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data - ["read("any")"] // permissions (optional) + '<DOCUMENT_ID>' // documentId ); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md b/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md index 2d12f7caec..519b0ec160 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md @@ -2,14 +2,14 @@ import { Client, Databases } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID + .setAdmin('') // + .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new Databases(client); const result = await databases.upsertDocuments( '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // documents + '<COLLECTION_ID>' // collectionId ); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-execution.md b/docs/examples/1.8.x/console-web/examples/functions/create-execution.md index 1886a831f2..813e1fd0a7 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/console-web/examples/functions/create-execution.md @@ -13,7 +13,7 @@ const result = await functions.createExecution( '<PATH>', // path (optional) ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '<SCHEDULED_AT>' // scheduledAt (optional) + '' // scheduledAt (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-boolean-column.md deleted file mode 100644 index 5a61510aa7..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-database.md b/docs/examples/1.8.x/console-web/examples/grids/create-database.md deleted file mode 100644 index b7eeb33253..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-database.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createDatabase( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-datetime-column.md deleted file mode 100644 index 7580178d62..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-email-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-email-column.md deleted file mode 100644 index 9e44cbbd66..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-enum-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-enum-column.md deleted file mode 100644 index c596b1408a..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-float-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-float-column.md deleted file mode 100644 index d1b4c21898..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-index.md b/docs/examples/1.8.x/console-web/examples/grids/create-index.md deleted file mode 100644 index 2c22cafde8..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-index.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Grids, IndexType } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - IndexType.Key, // type - [], // columns - [], // orders (optional) - [] // lengths (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-integer-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-integer-column.md deleted file mode 100644 index 709694e358..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-ip-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-ip-column.md deleted file mode 100644 index 1691d3fc81..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-relationship-column.md deleted file mode 100644 index 5536e26488..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Grids, RelationshipType, RelationMutate } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<RELATED_TABLE_ID>', // relatedTableId - RelationshipType.OneToOne, // type - false, // twoWay (optional) - '', // key (optional) - '', // twoWayKey (optional) - RelationMutate.Cascade // onDelete (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-row.md b/docs/examples/1.8.x/console-web/examples/grids/create-row.md deleted file mode 100644 index f5259cff2d..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-rows.md b/docs/examples/1.8.x/console-web/examples/grids/create-rows.md deleted file mode 100644 index ff84c045cb..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-string-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-string-column.md deleted file mode 100644 index 4032caede0..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - 1, // size - false, // required - '<DEFAULT>', // default (optional) - false, // array (optional) - false // encrypt (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-table.md b/docs/examples/1.8.x/console-web/examples/grids/create-table.md deleted file mode 100644 index 74227efe98..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-table.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-url-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-url-column.md deleted file mode 100644 index 4991da6cd6..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/create-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.createUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/console-web/examples/grids/decrement-row-column.md deleted file mode 100644 index 6e0abb0ac8..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.decrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // min (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-column.md b/docs/examples/1.8.x/console-web/examples/grids/delete-column.md deleted file mode 100644 index 8e46121f01..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/delete-column.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-database.md b/docs/examples/1.8.x/console-web/examples/grids/delete-database.md deleted file mode 100644 index b34b4adfdb..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/delete-database.md +++ /dev/null @@ -1,13 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteDatabase( - '<DATABASE_ID>' // databaseId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-index.md b/docs/examples/1.8.x/console-web/examples/grids/delete-index.md deleted file mode 100644 index 9e405de80f..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/delete-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-row.md b/docs/examples/1.8.x/console-web/examples/grids/delete-row.md deleted file mode 100644 index cc49130d4f..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-rows.md b/docs/examples/1.8.x/console-web/examples/grids/delete-rows.md deleted file mode 100644 index fdaa4278fa..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/delete-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-table.md b/docs/examples/1.8.x/console-web/examples/grids/delete-table.md deleted file mode 100644 index 1817122ec3..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/delete-table.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.deleteTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-column.md b/docs/examples/1.8.x/console-web/examples/grids/get-column.md deleted file mode 100644 index 116cee2f24..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/get-column.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-database-usage.md b/docs/examples/1.8.x/console-web/examples/grids/get-database-usage.md deleted file mode 100644 index f961dc4fdf..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/get-database-usage.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids, DatabaseUsageRange } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getDatabaseUsage( - '<DATABASE_ID>', // databaseId - DatabaseUsageRange.TwentyFourHours // range (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-database.md b/docs/examples/1.8.x/console-web/examples/grids/get-database.md deleted file mode 100644 index d41e9c2d45..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/get-database.md +++ /dev/null @@ -1,13 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getDatabase( - '<DATABASE_ID>' // databaseId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-index.md b/docs/examples/1.8.x/console-web/examples/grids/get-index.md deleted file mode 100644 index 34880a8c0e..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/get-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-row.md b/docs/examples/1.8.x/console-web/examples/grids/get-row.md deleted file mode 100644 index 29b51f2225..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-table-usage.md b/docs/examples/1.8.x/console-web/examples/grids/get-table-usage.md deleted file mode 100644 index 5684786fb7..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/get-table-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids, GridUsageRange } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getTableUsage( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - GridUsageRange.TwentyFourHours // range (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-table.md b/docs/examples/1.8.x/console-web/examples/grids/get-table.md deleted file mode 100644 index b98d321f28..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/get-table.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.getTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/increment-row-column.md b/docs/examples/1.8.x/console-web/examples/grids/increment-row-column.md deleted file mode 100644 index 5177cd6c08..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/increment-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.incrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // max (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-columns.md b/docs/examples/1.8.x/console-web/examples/grids/list-columns.md deleted file mode 100644 index cd72e91daf..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/list-columns.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listColumns( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-database-logs.md b/docs/examples/1.8.x/console-web/examples/grids/list-database-logs.md deleted file mode 100644 index cf20dc6b49..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/list-database-logs.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listDatabaseLogs( - '<DATABASE_ID>', // databaseId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-database-usage.md b/docs/examples/1.8.x/console-web/examples/grids/list-database-usage.md deleted file mode 100644 index 09faf5f2f5..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/list-database-usage.md +++ /dev/null @@ -1,13 +0,0 @@ -import { Client, Grids, DatabaseUsageRange } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listDatabaseUsage( - DatabaseUsageRange.TwentyFourHours // range (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-databases.md b/docs/examples/1.8.x/console-web/examples/grids/list-databases.md deleted file mode 100644 index 871d29ebe8..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/list-databases.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listDatabases( - [], // queries (optional) - '<SEARCH>' // search (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-indexes.md b/docs/examples/1.8.x/console-web/examples/grids/list-indexes.md deleted file mode 100644 index b8755d0b82..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/list-indexes.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listIndexes( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-row-logs.md b/docs/examples/1.8.x/console-web/examples/grids/list-row-logs.md deleted file mode 100644 index 0fcde33520..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/list-row-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listRowLogs( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-rows.md b/docs/examples/1.8.x/console-web/examples/grids/list-rows.md deleted file mode 100644 index 4eb3b71407..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-table-logs.md b/docs/examples/1.8.x/console-web/examples/grids/list-table-logs.md deleted file mode 100644 index e7f756886d..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/list-table-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listTableLogs( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-tables.md b/docs/examples/1.8.x/console-web/examples/grids/list-tables.md deleted file mode 100644 index 9288788dfe..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/list-tables.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.listTables( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-boolean-column.md deleted file mode 100644 index 84dd95cd41..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-database.md b/docs/examples/1.8.x/console-web/examples/grids/update-database.md deleted file mode 100644 index abd6b285fd..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-database.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateDatabase( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-datetime-column.md deleted file mode 100644 index 81fa471471..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-email-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-email-column.md deleted file mode 100644 index 3a63b0d4d3..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-enum-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-enum-column.md deleted file mode 100644 index 7c6d2e1b03..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-float-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-float-column.md deleted file mode 100644 index 6662f4b00f..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-integer-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-integer-column.md deleted file mode 100644 index 95c0510a1a..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-ip-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-ip-column.md deleted file mode 100644 index e92db67751..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-relationship-column.md deleted file mode 100644 index bdfd71f71c..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids, RelationMutate } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-row.md b/docs/examples/1.8.x/console-web/examples/grids/update-row.md deleted file mode 100644 index a86f5fd58b..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-rows.md b/docs/examples/1.8.x/console-web/examples/grids/update-rows.md deleted file mode 100644 index 939615a5bd..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - {}, // data (optional) - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-string-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-string-column.md deleted file mode 100644 index b0b92f041e..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '<DEFAULT>', // default - 1, // size (optional) - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-table.md b/docs/examples/1.8.x/console-web/examples/grids/update-table.md deleted file mode 100644 index 8988133beb..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-table.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-url-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-url-column.md deleted file mode 100644 index ecad0043a3..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/update-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.updateUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/upsert-row.md b/docs/examples/1.8.x/console-web/examples/grids/upsert-row.md deleted file mode 100644 index 66764b001a..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/upsert-rows.md b/docs/examples/1.8.x/console-web/examples/grids/upsert-rows.md deleted file mode 100644 index b79a74d7e1..0000000000 --- a/docs/examples/1.8.x/console-web/examples/grids/upsert-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const grids = new Grids(client); - -const result = await grids.upsertRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); - -console.log(result); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-document.md b/docs/examples/1.8.x/server-dart/examples/databases/create-document.md index 1d58fc586c..1c9af5112c 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-document.md @@ -2,8 +2,9 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token Databases databases = Databases(client); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md index ba0e34950b..f66ef9f1a9 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md @@ -2,7 +2,7 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setAdmin('') // .setKey('<YOUR_API_KEY>'); // Your secret API key Databases databases = Databases(client); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md index 93e306ebce..f17f6cbbbd 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md @@ -2,8 +2,9 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token Databases databases = Databases(client); @@ -11,6 +12,4 @@ Document result = await databases.upsertDocument( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', documentId: '<DOCUMENT_ID>', - data: {}, - permissions: ["read("any")"], // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md index cd35014f63..f60a37935a 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md @@ -2,7 +2,7 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setAdmin('') // .setKey('<YOUR_API_KEY>'); // Your secret API key Databases databases = Databases(client); @@ -10,5 +10,4 @@ Databases databases = Databases(client); DocumentList result = await databases.upsertDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], ); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md b/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md index 64b28d5f0c..2ae64bce55 100644 --- a/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md @@ -14,5 +14,5 @@ Execution result = await functions.createExecution( path: '<PATH>', // (optional) method: ExecutionMethod.gET, // (optional) headers: {}, // (optional) - scheduledAt: '<SCHEDULED_AT>', // (optional) + scheduledAt: '', // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md deleted file mode 100644 index d462336207..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnBoolean result = await grids.createBooleanColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: false, // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-database.md b/docs/examples/1.8.x/server-dart/examples/grids/create-database.md deleted file mode 100644 index d77e3747c9..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-database.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -Database result = await grids.createDatabase( - databaseId: '<DATABASE_ID>', - name: '<NAME>', - enabled: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md deleted file mode 100644 index 88365e0d0f..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnDatetime result = await grids.createDatetimeColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md deleted file mode 100644 index 69d6c03d8f..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnEmail result = await grids.createEmailColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 'email@example.com', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md deleted file mode 100644 index a3a1e3ff60..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnEnum result = await grids.createEnumColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - elements: [], - xrequired: false, - xdefault: '<DEFAULT>', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md deleted file mode 100644 index eba5e98ccc..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnFloat result = await grids.createFloatColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - min: 0, // (optional) - max: 0, // (optional) - xdefault: 0, // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-index.md b/docs/examples/1.8.x/server-dart/examples/grids/create-index.md deleted file mode 100644 index 4926b9ec83..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-index.md +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnIndex result = await grids.createIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - type: IndexType.key, - columns: [], - orders: [], // (optional) - lengths: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md deleted file mode 100644 index d5bfdf3144..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnInteger result = await grids.createIntegerColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - min: 0, // (optional) - max: 0, // (optional) - xdefault: 0, // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md deleted file mode 100644 index 91b83fde8c..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnIp result = await grids.createIpColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md deleted file mode 100644 index 99f0427a85..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnRelationship result = await grids.createRelationshipColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - relatedTableId: '<RELATED_TABLE_ID>', - type: RelationshipType.oneToOne, - twoWay: false, // (optional) - key: '', // (optional) - twoWayKey: '', // (optional) - onDelete: RelationMutate.cascade, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-row.md b/docs/examples/1.8.x/server-dart/examples/grids/create-row.md deleted file mode 100644 index 4db0893686..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Grids grids = Grids(client); - -Row result = await grids.createRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, - permissions: ["read("any")"], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/create-rows.md deleted file mode 100644 index 111d061c3e..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -RowList result = await grids.createRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rows: [], -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md deleted file mode 100644 index 74b9cb7fa6..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnString result = await grids.createStringColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - size: 1, - xrequired: false, - xdefault: '<DEFAULT>', // (optional) - array: false, // (optional) - encrypt: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-table.md b/docs/examples/1.8.x/server-dart/examples/grids/create-table.md deleted file mode 100644 index 1bb7afadd3..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-table.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -Table result = await grids.createTable( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], // (optional) - rowSecurity: false, // (optional) - enabled: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md deleted file mode 100644 index cc129fce97..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnUrl result = await grids.createUrlColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 'https://example.com', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md deleted file mode 100644 index ad0744dbc6..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -Row result = await grids.decrementRowColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - column: '', - value: 0, // (optional) - min: 0, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-column.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-column.md deleted file mode 100644 index e326064f4f..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/delete-column.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -await grids.deleteColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-database.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-database.md deleted file mode 100644 index 0738454382..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/delete-database.md +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -await grids.deleteDatabase( - databaseId: '<DATABASE_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-index.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-index.md deleted file mode 100644 index 14dbccb979..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/delete-index.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -await grids.deleteIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-row.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-row.md deleted file mode 100644 index 8a37455490..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/delete-row.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Grids grids = Grids(client); - -await grids.deleteRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md deleted file mode 100644 index dd2214fc68..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -await grids.deleteRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-table.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-table.md deleted file mode 100644 index af29d31b87..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/delete-table.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -await grids.deleteTable( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-column.md b/docs/examples/1.8.x/server-dart/examples/grids/get-column.md deleted file mode 100644 index 4040124454..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/get-column.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - - result = await grids.getColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-database.md b/docs/examples/1.8.x/server-dart/examples/grids/get-database.md deleted file mode 100644 index e8a674b1ab..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/get-database.md +++ /dev/null @@ -1,12 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -Database result = await grids.getDatabase( - databaseId: '<DATABASE_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-index.md b/docs/examples/1.8.x/server-dart/examples/grids/get-index.md deleted file mode 100644 index 6e66a55b37..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/get-index.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnIndex result = await grids.getIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-row.md b/docs/examples/1.8.x/server-dart/examples/grids/get-row.md deleted file mode 100644 index da2a609d32..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/get-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Grids grids = Grids(client); - -Row result = await grids.getRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-table.md b/docs/examples/1.8.x/server-dart/examples/grids/get-table.md deleted file mode 100644 index d38fca0455..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/get-table.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -Table result = await grids.getTable( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md deleted file mode 100644 index 14c041404c..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -Row result = await grids.incrementRowColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - column: '', - value: 0, // (optional) - max: 0, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-columns.md b/docs/examples/1.8.x/server-dart/examples/grids/list-columns.md deleted file mode 100644 index 222b5ba172..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/list-columns.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnList result = await grids.listColumns( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-databases.md b/docs/examples/1.8.x/server-dart/examples/grids/list-databases.md deleted file mode 100644 index 14e2c78b63..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/list-databases.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -DatabaseList result = await grids.listDatabases( - queries: [], // (optional) - search: '<SEARCH>', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md deleted file mode 100644 index 218c3e0ccc..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnIndexList result = await grids.listIndexes( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/list-rows.md deleted file mode 100644 index 49f2a7ef21..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/list-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Grids grids = Grids(client); - -RowList result = await grids.listRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-tables.md b/docs/examples/1.8.x/server-dart/examples/grids/list-tables.md deleted file mode 100644 index 4f1e08b713..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/list-tables.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -TableList result = await grids.listTables( - databaseId: '<DATABASE_ID>', - queries: [], // (optional) - search: '<SEARCH>', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md deleted file mode 100644 index e9e5a1fe32..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnBoolean result = await grids.updateBooleanColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: false, - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-database.md b/docs/examples/1.8.x/server-dart/examples/grids/update-database.md deleted file mode 100644 index d65a80185f..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-database.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -Database result = await grids.updateDatabase( - databaseId: '<DATABASE_ID>', - name: '<NAME>', - enabled: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md deleted file mode 100644 index 6eb1bb6cbf..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnDatetime result = await grids.updateDatetimeColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md deleted file mode 100644 index 0fabb3e6a3..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnEmail result = await grids.updateEmailColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 'email@example.com', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md deleted file mode 100644 index 5aa1613b75..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnEnum result = await grids.updateEnumColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - elements: [], - xrequired: false, - xdefault: '<DEFAULT>', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md deleted file mode 100644 index 0326f3c6f8..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnFloat result = await grids.updateFloatColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 0, - min: 0, // (optional) - max: 0, // (optional) - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md deleted file mode 100644 index 3572a064b3..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnInteger result = await grids.updateIntegerColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 0, - min: 0, // (optional) - max: 0, // (optional) - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md deleted file mode 100644 index a75ff07569..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnIp result = await grids.updateIpColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md deleted file mode 100644 index 4ecb479124..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnRelationship result = await grids.updateRelationshipColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - onDelete: RelationMutate.cascade, // (optional) - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-row.md b/docs/examples/1.8.x/server-dart/examples/grids/update-row.md deleted file mode 100644 index f11cf400cb..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Grids grids = Grids(client); - -Row result = await grids.updateRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, // (optional) - permissions: ["read("any")"], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/update-rows.md deleted file mode 100644 index 6dd4db1d3c..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -RowList result = await grids.updateRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - data: {}, // (optional) - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md deleted file mode 100644 index 2bc58912cb..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnString result = await grids.updateStringColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '<DEFAULT>', - size: 1, // (optional) - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-table.md b/docs/examples/1.8.x/server-dart/examples/grids/update-table.md deleted file mode 100644 index c5c497eddf..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-table.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -Table result = await grids.updateTable( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], // (optional) - rowSecurity: false, // (optional) - enabled: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md deleted file mode 100644 index 79359f5436..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -ColumnUrl result = await grids.updateUrlColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 'https://example.com', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md deleted file mode 100644 index e8a697664e..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Grids grids = Grids(client); - -Row result = await grids.upsertRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, // (optional) - permissions: ["read("any")"], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md deleted file mode 100644 index b12d6960f0..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Grids grids = Grids(client); - -RowList result = await grids.upsertRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rows: [], -); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-document.md b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md index be8a1bdac9..f18b4f30dc 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md @@ -2,8 +2,9 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token const databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md index 26c9796cf0..fa3fe84731 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md @@ -2,7 +2,7 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setAdmin('') // .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md index f05100e3df..a8a61ca43c 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md @@ -2,15 +2,14 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token const databases = new Databases(client); const response = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data - ["read("any")"] // permissions (optional) + '<DOCUMENT_ID>' // documentId ); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md index 0cd804bfb6..bf9e7ded89 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md @@ -2,13 +2,12 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setAdmin('') // .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new Databases(client); const response = await databases.upsertDocuments( '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // documents + '<COLLECTION_ID>' // collectionId ); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md b/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md index 58c6c494b1..bec6a17db2 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md @@ -14,5 +14,5 @@ const response = await functions.createExecution( '<PATH>', // path (optional) ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '<SCHEDULED_AT>' // scheduledAt (optional) + '' // scheduledAt (optional) ); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-boolean-column.md deleted file mode 100644 index 7097a84ebe..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-database.md b/docs/examples/1.8.x/server-deno/examples/grids/create-database.md deleted file mode 100644 index 3b1a67d75a..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-database.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createDatabase( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-datetime-column.md deleted file mode 100644 index f33479cd2e..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-email-column.md deleted file mode 100644 index eec09fb453..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-enum-column.md deleted file mode 100644 index df68204c8b..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-float-column.md deleted file mode 100644 index e7fdc524dc..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-index.md b/docs/examples/1.8.x/server-deno/examples/grids/create-index.md deleted file mode 100644 index d1442d57be..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-index.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids, IndexType } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - IndexType.Key, // type - [], // columns - [], // orders (optional) - [] // lengths (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-integer-column.md deleted file mode 100644 index 0dc377dff2..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-ip-column.md deleted file mode 100644 index 222e262042..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-relationship-column.md deleted file mode 100644 index 5cfc17ebbd..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Grids, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<RELATED_TABLE_ID>', // relatedTableId - RelationshipType.OneToOne, // type - false, // twoWay (optional) - '', // key (optional) - '', // twoWayKey (optional) - RelationMutate.Cascade // onDelete (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-row.md b/docs/examples/1.8.x/server-deno/examples/grids/create-row.md deleted file mode 100644 index 0bf0ec7f09..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const grids = new Grids(client); - -const response = await grids.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/create-rows.md deleted file mode 100644 index e5d81e6f68..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-string-column.md deleted file mode 100644 index fb73a25faa..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - 1, // size - false, // required - '<DEFAULT>', // default (optional) - false, // array (optional) - false // encrypt (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-table.md b/docs/examples/1.8.x/server-deno/examples/grids/create-table.md deleted file mode 100644 index 832b9c5218..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-table.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-url-column.md deleted file mode 100644 index 905d86c6cf..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/create-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.createUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-deno/examples/grids/decrement-row-column.md deleted file mode 100644 index cd86f6f8f3..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.decrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // min (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-column.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-column.md deleted file mode 100644 index d299323df6..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/delete-column.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.deleteColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-database.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-database.md deleted file mode 100644 index aad02459e4..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/delete-database.md +++ /dev/null @@ -1,12 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.deleteDatabase( - '<DATABASE_ID>' // databaseId -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-index.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-index.md deleted file mode 100644 index 2354fc2485..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/delete-index.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.deleteIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-row.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-row.md deleted file mode 100644 index b62fd2145f..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/delete-row.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const grids = new Grids(client); - -const response = await grids.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-rows.md deleted file mode 100644 index a1c75d7fd2..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/delete-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.deleteRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-table.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-table.md deleted file mode 100644 index b7b09bc1ed..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/delete-table.md +++ /dev/null @@ -1,13 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.deleteTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-column.md b/docs/examples/1.8.x/server-deno/examples/grids/get-column.md deleted file mode 100644 index cd78228565..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/get-column.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.getColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-database.md b/docs/examples/1.8.x/server-deno/examples/grids/get-database.md deleted file mode 100644 index c1fecfeff7..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/get-database.md +++ /dev/null @@ -1,12 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.getDatabase( - '<DATABASE_ID>' // databaseId -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-index.md b/docs/examples/1.8.x/server-deno/examples/grids/get-index.md deleted file mode 100644 index 8f3a48aec2..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/get-index.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.getIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-row.md b/docs/examples/1.8.x/server-deno/examples/grids/get-row.md deleted file mode 100644 index 257b24b67e..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/get-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const grids = new Grids(client); - -const response = await grids.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-table.md b/docs/examples/1.8.x/server-deno/examples/grids/get-table.md deleted file mode 100644 index 5b9c36ab44..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/get-table.md +++ /dev/null @@ -1,13 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.getTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-deno/examples/grids/increment-row-column.md deleted file mode 100644 index d01174e938..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/increment-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.incrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // max (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-columns.md b/docs/examples/1.8.x/server-deno/examples/grids/list-columns.md deleted file mode 100644 index 3e249e2782..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/list-columns.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.listColumns( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-databases.md b/docs/examples/1.8.x/server-deno/examples/grids/list-databases.md deleted file mode 100644 index 40ce554e50..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/list-databases.md +++ /dev/null @@ -1,13 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.listDatabases( - [], // queries (optional) - '<SEARCH>' // search (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/grids/list-indexes.md deleted file mode 100644 index e605c67cc6..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.listIndexes( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/list-rows.md deleted file mode 100644 index 2416578d70..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/list-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const grids = new Grids(client); - -const response = await grids.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-tables.md b/docs/examples/1.8.x/server-deno/examples/grids/list-tables.md deleted file mode 100644 index f68d5465b5..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/list-tables.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.listTables( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-boolean-column.md deleted file mode 100644 index 22c0fe97f8..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-database.md b/docs/examples/1.8.x/server-deno/examples/grids/update-database.md deleted file mode 100644 index 0fc883028e..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-database.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateDatabase( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-datetime-column.md deleted file mode 100644 index 00cee55b33..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-email-column.md deleted file mode 100644 index eb263b428f..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-enum-column.md deleted file mode 100644 index 974dcc99cb..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-float-column.md deleted file mode 100644 index c1375b015f..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-integer-column.md deleted file mode 100644 index c46dbb1994..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-ip-column.md deleted file mode 100644 index 2013e16429..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-relationship-column.md deleted file mode 100644 index 5151a5c5bc..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Grids, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-row.md b/docs/examples/1.8.x/server-deno/examples/grids/update-row.md deleted file mode 100644 index 5e37a9cb90..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const grids = new Grids(client); - -const response = await grids.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/update-rows.md deleted file mode 100644 index 35dc58d22d..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - {}, // data (optional) - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-string-column.md deleted file mode 100644 index ff0113baeb..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-string-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '<DEFAULT>', // default - 1, // size (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-table.md b/docs/examples/1.8.x/server-deno/examples/grids/update-table.md deleted file mode 100644 index ce01cd0fc7..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-table.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-url-column.md deleted file mode 100644 index 285f88fbfd..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/update-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.updateUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-deno/examples/grids/upsert-row.md deleted file mode 100644 index 33534265d5..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const grids = new Grids(client); - -const response = await grids.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/upsert-rows.md deleted file mode 100644 index 8cd7218f17..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/grids/upsert-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new Grids(client); - -const response = await grids.upsertRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md index 52254e0c25..cb4bc62ced 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md @@ -4,8 +4,9 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with + .SetSession("") // The user session to authenticate with + .SetKey("<YOUR_API_KEY>") // Your secret API key + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md index dad710f0df..c46715b25d 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md @@ -4,7 +4,7 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetAdmin("") // .SetKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md index c0876bfa73..c809a497fe 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md @@ -4,15 +4,14 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with + .SetSession("") // The user session to authenticate with + .SetKey("<YOUR_API_KEY>") // Your secret API key + .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token Databases databases = new Databases(client); Document result = await databases.UpsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>", - data: [object], - permissions: ["read("any")"] // optional + documentId: "<DOCUMENT_ID>" ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md index 6c124c16e5..48c0aa7044 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md @@ -4,13 +4,12 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetAdmin("") // .SetKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); DocumentList result = await databases.UpsertDocuments( databaseId: "<DATABASE_ID>", - collectionId: "<COLLECTION_ID>", - documents: new List<object>() + collectionId: "<COLLECTION_ID>" ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md index 98d1b2f3ff..c8fd5595e9 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md @@ -17,5 +17,5 @@ Execution result = await functions.CreateExecution( path: "<PATH>", // optional method: ExecutionMethod.GET, // optional headers: [object], // optional - scheduledAt: "<SCHEDULED_AT>" // optional + scheduledAt: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md deleted file mode 100644 index e173d1189b..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnBoolean result = await grids.CreateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md deleted file mode 100644 index 7006f00d01..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -Database result = await grids.CreateDatabase( - databaseId: "<DATABASE_ID>", - name: "<NAME>", - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md deleted file mode 100644 index b4e730fc6d..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnDatetime result = await grids.CreateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md deleted file mode 100644 index bb2cad7dbd..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnEmail result = await grids.CreateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md deleted file mode 100644 index 4ce99366ad..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnEnum result = await grids.CreateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: new List<string>(), - required: false, - default: "<DEFAULT>", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md deleted file mode 100644 index 3ecd76c367..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnFloat result = await grids.CreateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, // optional - max: 0, // optional - default: 0, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md deleted file mode 100644 index 854ed47e81..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Enums; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnIndex result = await grids.CreateIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - type: IndexType.Key, - columns: new List<string>(), - orders: new List<string>(), // optional - lengths: new List<long>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md deleted file mode 100644 index ef13d5569c..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnInteger result = await grids.CreateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, // optional - max: 0, // optional - default: 0, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md deleted file mode 100644 index bfaa594d49..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnIp result = await grids.CreateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md deleted file mode 100644 index 614f5d4fec..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,22 +0,0 @@ -using Appwrite; -using Appwrite.Enums; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnRelationship result = await grids.CreateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - relatedTableId: "<RELATED_TABLE_ID>", - type: RelationshipType.OneToOne, - twoWay: false, // optional - key: "", // optional - twoWayKey: "", // optional - onDelete: RelationMutate.Cascade // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md deleted file mode 100644 index 235c9b5c4e..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Grids grids = new Grids(client); - -Row result = await grids.CreateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [object], - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md deleted file mode 100644 index 42ee3ef6a2..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -RowList result = await grids.CreateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: new List<object>() -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md deleted file mode 100644 index ca00dcf32e..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnString result = await grids.CreateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - size: 1, - required: false, - default: "<DEFAULT>", // optional - array: false, // optional - encrypt: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md deleted file mode 100644 index 50fdfa878e..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -Table result = await grids.CreateTable( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md deleted file mode 100644 index 8a4f69bd26..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnUrl result = await grids.CreateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md deleted file mode 100644 index b17e902e45..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -Row result = await grids.DecrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, // optional - min: 0 // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md deleted file mode 100644 index 24f23546ba..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -await grids.DeleteColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md deleted file mode 100644 index 38f28a001a..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md +++ /dev/null @@ -1,14 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -await grids.DeleteDatabase( - databaseId: "<DATABASE_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md deleted file mode 100644 index 5a037e2a96..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -await grids.DeleteIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md deleted file mode 100644 index 13972747a8..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Grids grids = new Grids(client); - -await grids.DeleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md deleted file mode 100644 index 4ddd11b6d1..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -await grids.DeleteRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md deleted file mode 100644 index 9741ac2c2e..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md +++ /dev/null @@ -1,15 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -await grids.DeleteTable( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md deleted file mode 100644 index 2c6d7a3944..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - - result = await grids.GetColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md deleted file mode 100644 index 5aebe5104d..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md +++ /dev/null @@ -1,14 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -Database result = await grids.GetDatabase( - databaseId: "<DATABASE_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md deleted file mode 100644 index ff99a21ed0..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnIndex result = await grids.GetIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md deleted file mode 100644 index c75e0e50d5..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md +++ /dev/null @@ -1,17 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Grids grids = new Grids(client); - -Row result = await grids.GetRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md deleted file mode 100644 index 7fcecc6170..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md +++ /dev/null @@ -1,15 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -Table result = await grids.GetTable( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md deleted file mode 100644 index 3e6d044905..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -Row result = await grids.IncrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, // optional - max: 0 // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md deleted file mode 100644 index e8478c1d23..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnList result = await grids.ListColumns( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md deleted file mode 100644 index f37deb8ef2..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md +++ /dev/null @@ -1,15 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -DatabaseList result = await grids.ListDatabases( - queries: new List<string>(), // optional - search: "<SEARCH>" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md deleted file mode 100644 index b6f3737b43..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnIndexList result = await grids.ListIndexes( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md deleted file mode 100644 index a1a64fe256..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Grids grids = new Grids(client); - -RowList result = await grids.ListRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md deleted file mode 100644 index 85f431b7ef..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -TableList result = await grids.ListTables( - databaseId: "<DATABASE_ID>", - queries: new List<string>(), // optional - search: "<SEARCH>" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md deleted file mode 100644 index ff2376e403..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnBoolean result = await grids.UpdateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md deleted file mode 100644 index cd3b0a236d..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -Database result = await grids.UpdateDatabase( - databaseId: "<DATABASE_ID>", - name: "<NAME>", - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md deleted file mode 100644 index 7b630922e8..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnDatetime result = await grids.UpdateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md deleted file mode 100644 index 9ce04025ca..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnEmail result = await grids.UpdateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md deleted file mode 100644 index b29b3615de..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnEnum result = await grids.UpdateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: new List<string>(), - required: false, - default: "<DEFAULT>", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md deleted file mode 100644 index 96db20a2c5..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnFloat result = await grids.UpdateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, // optional - max: 0, // optional - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md deleted file mode 100644 index 87e6b0fee2..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnInteger result = await grids.UpdateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, // optional - max: 0, // optional - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md deleted file mode 100644 index 789c6c98e6..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnIp result = await grids.UpdateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md deleted file mode 100644 index a1d30a43a2..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Enums; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnRelationship result = await grids.UpdateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - onDelete: RelationMutate.Cascade, // optional - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md deleted file mode 100644 index 2dc2b23d32..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Grids grids = new Grids(client); - -Row result = await grids.UpdateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [object], // optional - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md deleted file mode 100644 index c0103c9639..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -RowList result = await grids.UpdateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - data: [object], // optional - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md deleted file mode 100644 index 2277142eb8..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnString result = await grids.UpdateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "<DEFAULT>", - size: 1, // optional - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md deleted file mode 100644 index 76362573a5..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -Table result = await grids.UpdateTable( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md deleted file mode 100644 index 8054b60e3f..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -ColumnUrl result = await grids.UpdateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md deleted file mode 100644 index 7f517a2f09..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md +++ /dev/null @@ -1,18 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Grids grids = new Grids(client); - -Row result = await grids.UpsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [object], // optional - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md deleted file mode 100644 index 1cb3b54d0b..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -RowList result = await grids.UpsertRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: new List<object>() -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-document.md b/docs/examples/1.8.x/server-go/examples/databases/create-document.md index fe96a0d601..8990beaa8d 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-document.md @@ -9,8 +9,9 @@ import ( func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID client.WithSession("") // The user session to authenticate with + client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token ) service := databases.New(client) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-documents.md b/docs/examples/1.8.x/server-go/examples/databases/create-documents.md index 9e4da5dac7..d85d0d5395 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-documents.md @@ -9,7 +9,7 @@ import ( func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithAdmin("") // client.WithKey("<YOUR_API_KEY>") // Your secret API key ) diff --git a/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md index e6241b9198..c5304b1860 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md @@ -9,8 +9,9 @@ import ( func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID client.WithSession("") // The user session to authenticate with + client.WithKey("<YOUR_API_KEY>") // Your secret API key + client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token ) service := databases.New(client) @@ -18,8 +19,6 @@ func main() { "<DATABASE_ID>", "<COLLECTION_ID>", "<DOCUMENT_ID>", - map[string]interface{}{}, - databases.WithUpsertDocumentPermissions(interface{}{"read("any")"}), ) if error != nil { diff --git a/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md index d2731cd128..5fe0fc5831 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md @@ -9,7 +9,7 @@ import ( func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithAdmin("") // client.WithKey("<YOUR_API_KEY>") // Your secret API key ) @@ -17,7 +17,6 @@ func main() { response, error := service.UpsertDocuments( "<DATABASE_ID>", "<COLLECTION_ID>", - []interface{}{}, ) if error != nil { diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-execution.md b/docs/examples/1.8.x/server-go/examples/functions/create-execution.md index bc839e422e..33657d2503 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-go/examples/functions/create-execution.md @@ -21,7 +21,7 @@ func main() { functions.WithCreateExecutionPath("<PATH>"), functions.WithCreateExecutionMethod("GET"), functions.WithCreateExecutionHeaders(map[string]interface{}{}), - functions.WithCreateExecutionScheduledAt("<SCHEDULED_AT>"), + functions.WithCreateExecutionScheduledAt(""), ) if error != nil { diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-boolean-column.md deleted file mode 100644 index 11d8b0ca50..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateBooleanColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - grids.WithCreateBooleanColumnDefault(false), - grids.WithCreateBooleanColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-database.md b/docs/examples/1.8.x/server-go/examples/grids/create-database.md deleted file mode 100644 index d66dea2c03..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-database.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateDatabase( - "<DATABASE_ID>", - "<NAME>", - grids.WithCreateDatabaseEnabled(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-datetime-column.md deleted file mode 100644 index e386f763ff..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateDatetimeColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - grids.WithCreateDatetimeColumnDefault(""), - grids.WithCreateDatetimeColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-email-column.md deleted file mode 100644 index 9ecdf5cadf..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-email-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateEmailColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - grids.WithCreateEmailColumnDefault("email@example.com"), - grids.WithCreateEmailColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-enum-column.md deleted file mode 100644 index 35a2ed3f0f..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-enum-column.md +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateEnumColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - []interface{}{}, - false, - grids.WithCreateEnumColumnDefault("<DEFAULT>"), - grids.WithCreateEnumColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-float-column.md deleted file mode 100644 index 765eb58f24..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-float-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateFloatColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - grids.WithCreateFloatColumnMin(0), - grids.WithCreateFloatColumnMax(0), - grids.WithCreateFloatColumnDefault(0), - grids.WithCreateFloatColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-index.md b/docs/examples/1.8.x/server-go/examples/grids/create-index.md deleted file mode 100644 index ad39cc5c83..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-index.md +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateIndex( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - "key", - []interface{}{}, - grids.WithCreateIndexOrders([]interface{}{}), - grids.WithCreateIndexLengths([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-integer-column.md deleted file mode 100644 index 3b67883650..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-integer-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateIntegerColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - grids.WithCreateIntegerColumnMin(0), - grids.WithCreateIntegerColumnMax(0), - grids.WithCreateIntegerColumnDefault(0), - grids.WithCreateIntegerColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-ip-column.md deleted file mode 100644 index 8954c91144..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-ip-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateIpColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - grids.WithCreateIpColumnDefault(""), - grids.WithCreateIpColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-relationship-column.md deleted file mode 100644 index 2ce5bd2acd..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateRelationshipColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "<RELATED_TABLE_ID>", - "oneToOne", - grids.WithCreateRelationshipColumnTwoWay(false), - grids.WithCreateRelationshipColumnKey(""), - grids.WithCreateRelationshipColumnTwoWayKey(""), - grids.WithCreateRelationshipColumnOnDelete("cascade"), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-row.md b/docs/examples/1.8.x/server-go/examples/grids/create-row.md deleted file mode 100644 index b2e8aac2a2..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-row.md +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := grids.New(client) - response, error := service.CreateRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - map[string]interface{}{}, - grids.WithCreateRowPermissions(interface{}{"read("any")"}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-rows.md b/docs/examples/1.8.x/server-go/examples/grids/create-rows.md deleted file mode 100644 index 95442b0231..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-rows.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateRows( - "<DATABASE_ID>", - "<TABLE_ID>", - []interface{}{}, - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-string-column.md deleted file mode 100644 index 0033ea1af6..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-string-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateStringColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - 1, - false, - grids.WithCreateStringColumnDefault("<DEFAULT>"), - grids.WithCreateStringColumnArray(false), - grids.WithCreateStringColumnEncrypt(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-table.md b/docs/examples/1.8.x/server-go/examples/grids/create-table.md deleted file mode 100644 index adc367db5c..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-table.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateTable( - "<DATABASE_ID>", - "<TABLE_ID>", - "<NAME>", - grids.WithCreateTablePermissions(interface{}{"read("any")"}), - grids.WithCreateTableRowSecurity(false), - grids.WithCreateTableEnabled(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-url-column.md deleted file mode 100644 index 3e93fe1838..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/create-url-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.CreateUrlColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - grids.WithCreateUrlColumnDefault("https://example.com"), - grids.WithCreateUrlColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-go/examples/grids/decrement-row-column.md deleted file mode 100644 index cb36ada619..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.DecrementRowColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - "", - grids.WithDecrementRowColumnValue(0), - grids.WithDecrementRowColumnMin(0), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-column.md b/docs/examples/1.8.x/server-go/examples/grids/delete-column.md deleted file mode 100644 index 6b73e86c05..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/delete-column.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.DeleteColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-database.md b/docs/examples/1.8.x/server-go/examples/grids/delete-database.md deleted file mode 100644 index 4d74f859fc..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/delete-database.md +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.DeleteDatabase( - "<DATABASE_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-index.md b/docs/examples/1.8.x/server-go/examples/grids/delete-index.md deleted file mode 100644 index c34a2752ac..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/delete-index.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.DeleteIndex( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-row.md b/docs/examples/1.8.x/server-go/examples/grids/delete-row.md deleted file mode 100644 index cb072c49bd..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/delete-row.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := grids.New(client) - response, error := service.DeleteRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-go/examples/grids/delete-rows.md deleted file mode 100644 index 0ce880f996..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/delete-rows.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.DeleteRows( - "<DATABASE_ID>", - "<TABLE_ID>", - grids.WithDeleteRowsQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-table.md b/docs/examples/1.8.x/server-go/examples/grids/delete-table.md deleted file mode 100644 index 66e031a5ce..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/delete-table.md +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.DeleteTable( - "<DATABASE_ID>", - "<TABLE_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-column.md b/docs/examples/1.8.x/server-go/examples/grids/get-column.md deleted file mode 100644 index bff6153550..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/get-column.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.GetColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-database.md b/docs/examples/1.8.x/server-go/examples/grids/get-database.md deleted file mode 100644 index 4f80bf5590..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/get-database.md +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.GetDatabase( - "<DATABASE_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-index.md b/docs/examples/1.8.x/server-go/examples/grids/get-index.md deleted file mode 100644 index 5982b49b2e..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/get-index.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.GetIndex( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-row.md b/docs/examples/1.8.x/server-go/examples/grids/get-row.md deleted file mode 100644 index 1551d4969b..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/get-row.md +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := grids.New(client) - response, error := service.GetRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - grids.WithGetRowQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-table.md b/docs/examples/1.8.x/server-go/examples/grids/get-table.md deleted file mode 100644 index 1f96e8526d..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/get-table.md +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.GetTable( - "<DATABASE_ID>", - "<TABLE_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-go/examples/grids/increment-row-column.md deleted file mode 100644 index 52f5858884..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/increment-row-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.IncrementRowColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - "", - grids.WithIncrementRowColumnValue(0), - grids.WithIncrementRowColumnMax(0), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-columns.md b/docs/examples/1.8.x/server-go/examples/grids/list-columns.md deleted file mode 100644 index ae411a216c..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/list-columns.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.ListColumns( - "<DATABASE_ID>", - "<TABLE_ID>", - grids.WithListColumnsQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-databases.md b/docs/examples/1.8.x/server-go/examples/grids/list-databases.md deleted file mode 100644 index e43bd7d100..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/list-databases.md +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.ListDatabases( - grids.WithListDatabasesQueries([]interface{}{}), - grids.WithListDatabasesSearch("<SEARCH>"), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-go/examples/grids/list-indexes.md deleted file mode 100644 index 092c75301a..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/list-indexes.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.ListIndexes( - "<DATABASE_ID>", - "<TABLE_ID>", - grids.WithListIndexesQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-rows.md b/docs/examples/1.8.x/server-go/examples/grids/list-rows.md deleted file mode 100644 index b406f106bb..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/list-rows.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := grids.New(client) - response, error := service.ListRows( - "<DATABASE_ID>", - "<TABLE_ID>", - grids.WithListRowsQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-tables.md b/docs/examples/1.8.x/server-go/examples/grids/list-tables.md deleted file mode 100644 index f38879c65b..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/list-tables.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.ListTables( - "<DATABASE_ID>", - grids.WithListTablesQueries([]interface{}{}), - grids.WithListTablesSearch("<SEARCH>"), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-boolean-column.md deleted file mode 100644 index 5ffc910caf..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateBooleanColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - false, - grids.WithUpdateBooleanColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-database.md b/docs/examples/1.8.x/server-go/examples/grids/update-database.md deleted file mode 100644 index 9f9c95546a..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-database.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateDatabase( - "<DATABASE_ID>", - "<NAME>", - grids.WithUpdateDatabaseEnabled(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-datetime-column.md deleted file mode 100644 index 5bf6440a74..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateDatetimeColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "", - grids.WithUpdateDatetimeColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-email-column.md deleted file mode 100644 index 8ebbdcabc4..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-email-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateEmailColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "email@example.com", - grids.WithUpdateEmailColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-enum-column.md deleted file mode 100644 index edec1cbcc0..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-enum-column.md +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateEnumColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - []interface{}{}, - false, - "<DEFAULT>", - grids.WithUpdateEnumColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-float-column.md deleted file mode 100644 index 80057dab06..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-float-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateFloatColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - 0, - grids.WithUpdateFloatColumnMin(0), - grids.WithUpdateFloatColumnMax(0), - grids.WithUpdateFloatColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-integer-column.md deleted file mode 100644 index a3b9bd316c..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-integer-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateIntegerColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - 0, - grids.WithUpdateIntegerColumnMin(0), - grids.WithUpdateIntegerColumnMax(0), - grids.WithUpdateIntegerColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-ip-column.md deleted file mode 100644 index 888c69e9ee..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-ip-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateIpColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "", - grids.WithUpdateIpColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-relationship-column.md deleted file mode 100644 index db57f41995..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateRelationshipColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - grids.WithUpdateRelationshipColumnOnDelete("cascade"), - grids.WithUpdateRelationshipColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-row.md b/docs/examples/1.8.x/server-go/examples/grids/update-row.md deleted file mode 100644 index e1a99f289f..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-row.md +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := grids.New(client) - response, error := service.UpdateRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - grids.WithUpdateRowData(map[string]interface{}{}), - grids.WithUpdateRowPermissions(interface{}{"read("any")"}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-rows.md b/docs/examples/1.8.x/server-go/examples/grids/update-rows.md deleted file mode 100644 index f2b0c0c6de..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-rows.md +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateRows( - "<DATABASE_ID>", - "<TABLE_ID>", - grids.WithUpdateRowsData(map[string]interface{}{}), - grids.WithUpdateRowsQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-string-column.md deleted file mode 100644 index a50fcb704c..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-string-column.md +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateStringColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "<DEFAULT>", - grids.WithUpdateStringColumnSize(1), - grids.WithUpdateStringColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-table.md b/docs/examples/1.8.x/server-go/examples/grids/update-table.md deleted file mode 100644 index cf1bef575f..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-table.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateTable( - "<DATABASE_ID>", - "<TABLE_ID>", - "<NAME>", - grids.WithUpdateTablePermissions(interface{}{"read("any")"}), - grids.WithUpdateTableRowSecurity(false), - grids.WithUpdateTableEnabled(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-url-column.md deleted file mode 100644 index 0c28025e5c..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/update-url-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpdateUrlColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "https://example.com", - grids.WithUpdateUrlColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-go/examples/grids/upsert-row.md deleted file mode 100644 index bc104a159a..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/upsert-row.md +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := grids.New(client) - response, error := service.UpsertRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - grids.WithUpsertRowData(map[string]interface{}{}), - grids.WithUpsertRowPermissions(interface{}{"read("any")"}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-go/examples/grids/upsert-rows.md deleted file mode 100644 index 6282f9da2e..0000000000 --- a/docs/examples/1.8.x/server-go/examples/grids/upsert-rows.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/grids" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := grids.New(client) - response, error := service.UpsertRows( - "<DATABASE_ID>", - "<TABLE_ID>", - []interface{}{}, - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md index 7ee68b41c7..00dfba1e7b 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md @@ -17,9 +17,6 @@ mutation { documentSecurity attributes indexes { - _id - _createdAt - _updatedAt key type status @@ -27,6 +24,8 @@ mutation { attributes lengths orders + _createdAt + _updatedAt } } } diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md index 38e64980b2..c647930943 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md @@ -8,9 +8,6 @@ mutation { orders: [], lengths: [] ) { - _id - _createdAt - _updatedAt key type status @@ -18,5 +15,7 @@ mutation { attributes lengths orders + _createdAt + _updatedAt } } diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md index ad43b879d2..040578ae9d 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md @@ -17,9 +17,6 @@ mutation { documentSecurity attributes indexes { - _id - _createdAt - _updatedAt key type status @@ -27,6 +24,8 @@ mutation { attributes lengths orders + _createdAt + _updatedAt } } } diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md index 9d1e753081..c381fe35a3 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md @@ -2,9 +2,7 @@ mutation { databasesUpsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>", - data: "{}", - permissions: ["read("any")"] + documentId: "<DOCUMENT_ID>" ) { _id _sequence diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md index 2bfb765915..b4bf914eca 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md @@ -1,8 +1,7 @@ mutation { databasesUpsertDocuments( databaseId: "<DATABASE_ID>", - collectionId: "<COLLECTION_ID>", - documents: [] + collectionId: "<COLLECTION_ID>" ) { total documents { diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md index 3751448e57..0e7cc7d19a 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> Content-Length: *Length of your entity body in bytes* diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md index 8979880723..1479aa3bb6 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md @@ -6,7 +6,7 @@ mutation { path: "<PATH>", method: "GET", headers: "{}", - scheduledAt: "<SCHEDULED_AT>" + scheduledAt: "" ) { _id _createdAt diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md deleted file mode 100644 index bd7abcb175..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,20 +0,0 @@ -mutation { - gridsCreateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-database.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-database.md deleted file mode 100644 index 41d37ebdee..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-database.md +++ /dev/null @@ -1,13 +0,0 @@ -mutation { - gridsCreateDatabase( - databaseId: "<DATABASE_ID>", - name: "<NAME>", - enabled: false - ) { - _id - name - _createdAt - _updatedAt - enabled - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md deleted file mode 100644 index aa14c43156..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - gridsCreateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md deleted file mode 100644 index c9bc913726..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - gridsCreateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md deleted file mode 100644 index 8ace10f9ac..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md +++ /dev/null @@ -1,23 +0,0 @@ -mutation { - gridsCreateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: [], - required: false, - default: "<DEFAULT>", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - elements - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md deleted file mode 100644 index 92031d03ca..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - gridsCreateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, - max: 0, - default: 0, - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - min - max - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-index.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-index.md deleted file mode 100644 index cc338ddad2..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-index.md +++ /dev/null @@ -1,22 +0,0 @@ -mutation { - gridsCreateIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - type: "key", - columns: [], - orders: [], - lengths: [] - ) { - _id - _createdAt - _updatedAt - key - type - status - error - columns - lengths - orders - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md deleted file mode 100644 index 735d47c8ac..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - gridsCreateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, - max: 0, - default: 0, - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - min - max - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md deleted file mode 100644 index 241d308f09..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - gridsCreateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md deleted file mode 100644 index 2c08478e09..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,27 +0,0 @@ -mutation { - gridsCreateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - relatedTableId: "<RELATED_TABLE_ID>", - type: "oneToOne", - twoWay: false, - key: "", - twoWayKey: "", - onDelete: "cascade" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - relatedTable - relationType - twoWay - twoWayKey - onDelete - side - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-row.md deleted file mode 100644 index cffb7361f2..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - gridsCreateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md deleted file mode 100644 index cd134ec201..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - gridsCreateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: [] - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md deleted file mode 100644 index 57b42c6010..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - gridsCreateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - size: 1, - required: false, - default: "<DEFAULT>", - array: false, - encrypt: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - size - default - encrypt - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-table.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-table.md deleted file mode 100644 index 77335ad867..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-table.md +++ /dev/null @@ -1,32 +0,0 @@ -mutation { - gridsCreateTable( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], - rowSecurity: false, - enabled: false - ) { - _id - _createdAt - _updatedAt - _permissions - databaseId - name - enabled - rowSecurity - columns - indexes { - _id - _createdAt - _updatedAt - key - type - status - error - columns - lengths - orders - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md deleted file mode 100644 index 07ca9ab869..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - gridsCreateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md deleted file mode 100644 index 6b47884a92..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - gridsDecrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, - min: 0 - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md deleted file mode 100644 index 0ad25321b5..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md +++ /dev/null @@ -1,9 +0,0 @@ -mutation { - gridsDeleteColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md deleted file mode 100644 index a3e3d1a5bf..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md +++ /dev/null @@ -1,7 +0,0 @@ -mutation { - gridsDeleteDatabase( - databaseId: "<DATABASE_ID>" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md deleted file mode 100644 index 0921aa0aef..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md +++ /dev/null @@ -1,9 +0,0 @@ -mutation { - gridsDeleteIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md deleted file mode 100644 index 40dcbdc219..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md +++ /dev/null @@ -1,9 +0,0 @@ -mutation { - gridsDeleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md deleted file mode 100644 index 69559934a4..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - gridsDeleteRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md deleted file mode 100644 index a145be50d9..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md +++ /dev/null @@ -1,8 +0,0 @@ -mutation { - gridsDeleteTable( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-column.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-database.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-database.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-index.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-index.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-row.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-table.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-table.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md deleted file mode 100644 index 709e6b2f0d..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - gridsIncrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, - max: 0 - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-columns.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-columns.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-databases.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-databases.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-indexes.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-rows.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-tables.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-tables.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md deleted file mode 100644 index 67c8495471..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,20 +0,0 @@ -mutation { - gridsUpdateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-database.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-database.md deleted file mode 100644 index 02c045b9cd..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-database.md +++ /dev/null @@ -1,13 +0,0 @@ -mutation { - gridsUpdateDatabase( - databaseId: "<DATABASE_ID>", - name: "<NAME>", - enabled: false - ) { - _id - name - _createdAt - _updatedAt - enabled - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md deleted file mode 100644 index 5e19393c67..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - gridsUpdateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md deleted file mode 100644 index caa6153896..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - gridsUpdateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md deleted file mode 100644 index c3d90f4e23..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md +++ /dev/null @@ -1,23 +0,0 @@ -mutation { - gridsUpdateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: [], - required: false, - default: "<DEFAULT>", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - elements - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md deleted file mode 100644 index a6b700ce73..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - gridsUpdateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, - max: 0, - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - min - max - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md deleted file mode 100644 index fcc53102d1..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - gridsUpdateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, - max: 0, - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - min - max - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md deleted file mode 100644 index f867063151..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - gridsUpdateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md deleted file mode 100644 index e24311b53a..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - gridsUpdateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - onDelete: "cascade", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - relatedTable - relationType - twoWay - twoWayKey - onDelete - side - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-row.md deleted file mode 100644 index 2bb105e8c0..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - gridsUpdateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md deleted file mode 100644 index 99df9b0b99..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md +++ /dev/null @@ -1,20 +0,0 @@ -mutation { - gridsUpdateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - data: "{}", - queries: [] - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md deleted file mode 100644 index c98f49a807..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md +++ /dev/null @@ -1,23 +0,0 @@ -mutation { - gridsUpdateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "<DEFAULT>", - size: 1, - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - size - default - encrypt - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-table.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-table.md deleted file mode 100644 index cea6d5cfff..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-table.md +++ /dev/null @@ -1,32 +0,0 @@ -mutation { - gridsUpdateTable( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], - rowSecurity: false, - enabled: false - ) { - _id - _createdAt - _updatedAt - _permissions - databaseId - name - enabled - rowSecurity - columns - indexes { - _id - _createdAt - _updatedAt - key - type - status - error - columns - lengths - orders - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md deleted file mode 100644 index c64d93882d..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - gridsUpdateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md deleted file mode 100644 index f8e0606109..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - gridsUpsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md deleted file mode 100644 index d456e9883d..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - gridsUpsertRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: [] - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md index 26970a18a8..8f77dd60eb 100644 --- a/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> Content-Length: *Length of your entity body in bytes* diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md b/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md index 70bf6cbb1f..5b4f9a0c22 100644 --- a/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md index 5231be33d6..368b816219 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md @@ -4,8 +4,9 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md index 0de0c276ed..77d79812a9 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setAdmin("") // .setKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md index daa44141e2..b1b4de4db4 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md @@ -4,8 +4,9 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with + .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token Databases databases = new Databases(client); @@ -13,8 +14,6 @@ databases.upsertDocument( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId - mapOf( "a" to "b" ), // data - listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md index 95e9a33ef2..0bf0c1778c 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setAdmin("") // .setKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); @@ -12,7 +12,6 @@ Databases databases = new Databases(client); databases.upsertDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId - listOf(), // documents new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md index 93efa0adf8..82d48fa55b 100644 --- a/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md @@ -16,7 +16,7 @@ functions.createExecution( "<PATH>", // path (optional) ExecutionMethod.GET, // method (optional) mapOf( "a" to "b" ), // headers (optional) - "<SCHEDULED_AT>", // scheduledAt (optional) + "", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md deleted file mode 100644 index 2981fc8cf4..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createBooleanColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - false, // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-database.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-database.md deleted file mode 100644 index 4c6155962e..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-database.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createDatabase( - "<DATABASE_ID>", // databaseId - "<NAME>", // name - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md deleted file mode 100644 index 7389ea9a94..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createDatetimeColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md deleted file mode 100644 index be481047e1..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createEmailColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "email@example.com", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md deleted file mode 100644 index 33c6b63e27..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createEnumColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - listOf(), // elements - false, // required - "<DEFAULT>", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md deleted file mode 100644 index d66f1b5c60..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createFloatColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // min (optional) - 0, // max (optional) - 0, // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-index.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-index.md deleted file mode 100644 index 670310bb66..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-index.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; -import io.appwrite.enums.IndexType; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createIndex( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - IndexType.KEY, // type - listOf(), // columns - listOf(), // orders (optional) - listOf(), // lengths (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md deleted file mode 100644 index 342654ef1a..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createIntegerColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // min (optional) - 0, // max (optional) - 0, // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md deleted file mode 100644 index d72e7dd59d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createIpColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md deleted file mode 100644 index 2d1c5fb22a..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md +++ /dev/null @@ -1,31 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; -import io.appwrite.enums.RelationshipType; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createRelationshipColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<RELATED_TABLE_ID>", // relatedTableId - RelationshipType.ONETOONE, // type - false, // twoWay (optional) - "", // key (optional) - "", // twoWayKey (optional) - RelationMutate.CASCADE, // onDelete (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-row.md deleted file mode 100644 index 6b954814c0..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-row.md +++ /dev/null @@ -1,27 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Grids grids = new Grids(client); - -grids.createRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md deleted file mode 100644 index a55855d8f5..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // rows - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md deleted file mode 100644 index b819afb4b4..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createStringColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - 1, // size - false, // required - "<DEFAULT>", // default (optional) - false, // array (optional) - false, // encrypt (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-table.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-table.md deleted file mode 100644 index aa98b81de6..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-table.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createTable( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<NAME>", // name - listOf("read("any")"), // permissions (optional) - false, // rowSecurity (optional) - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md deleted file mode 100644 index d8761440b3..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.createUrlColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "https://example.com", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md deleted file mode 100644 index 407ea83f81..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.decrementRowColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - "", // column - 0, // value (optional) - 0, // min (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md deleted file mode 100644 index cc3c40fba7..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.deleteColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md deleted file mode 100644 index fca41e75ea..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md +++ /dev/null @@ -1,23 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.deleteDatabase( - "<DATABASE_ID>", // databaseId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md deleted file mode 100644 index 43449e908f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.deleteIndex( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md deleted file mode 100644 index cb812bac12..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Grids grids = new Grids(client); - -grids.deleteRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md deleted file mode 100644 index 2425af9e8c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.deleteRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md deleted file mode 100644 index dbbb4781ba..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.deleteTable( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-column.md deleted file mode 100644 index 1d630f17d7..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/get-column.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.getColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-database.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-database.md deleted file mode 100644 index bc7eea4dbb..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/get-database.md +++ /dev/null @@ -1,23 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.getDatabase( - "<DATABASE_ID>", // databaseId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-index.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-index.md deleted file mode 100644 index 14163c34a9..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/get-index.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.getIndex( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-row.md deleted file mode 100644 index e9d89c92b8..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/get-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Grids grids = new Grids(client); - -grids.getRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-table.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-table.md deleted file mode 100644 index 39d090219b..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/get-table.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.getTable( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md deleted file mode 100644 index aaccf0a1a3..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.incrementRowColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - "", // column - 0, // value (optional) - 0, // max (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md deleted file mode 100644 index f95ca925a6..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.listColumns( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md deleted file mode 100644 index 97f7263dd4..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.listDatabases( - listOf(), // queries (optional) - "<SEARCH>", // search (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md deleted file mode 100644 index aa5b11a8c2..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.listIndexes( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md deleted file mode 100644 index ccf3d74a25..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Grids grids = new Grids(client); - -grids.listRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md deleted file mode 100644 index 0a60dbeebe..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.listTables( - "<DATABASE_ID>", // databaseId - listOf(), // queries (optional) - "<SEARCH>", // search (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md deleted file mode 100644 index e3d6b71b70..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateBooleanColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - false, // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-database.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-database.md deleted file mode 100644 index da9bd7d04b..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-database.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateDatabase( - "<DATABASE_ID>", // databaseId - "<NAME>", // name - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md deleted file mode 100644 index ede33229ad..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateDatetimeColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md deleted file mode 100644 index 48803eb4f4..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateEmailColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "email@example.com", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md deleted file mode 100644 index 63dc238d2e..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateEnumColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - listOf(), // elements - false, // required - "<DEFAULT>", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md deleted file mode 100644 index 9833f5ec8b..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateFloatColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // default - 0, // min (optional) - 0, // max (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md deleted file mode 100644 index 059b1328d5..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateIntegerColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // default - 0, // min (optional) - 0, // max (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md deleted file mode 100644 index 8e31214981..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateIpColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md deleted file mode 100644 index b90b21b164..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md +++ /dev/null @@ -1,27 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateRelationshipColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - RelationMutate.CASCADE, // onDelete (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-row.md deleted file mode 100644 index 5f95afb5f5..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-row.md +++ /dev/null @@ -1,27 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Grids grids = new Grids(client); - -grids.updateRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md deleted file mode 100644 index 67c9a1be89..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - mapOf( "a" to "b" ), // data (optional) - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md deleted file mode 100644 index 13e266abc0..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateStringColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "<DEFAULT>", // default - 1, // size (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-table.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-table.md deleted file mode 100644 index 24dfc05e49..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-table.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateTable( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<NAME>", // name - listOf("read("any")"), // permissions (optional) - false, // rowSecurity (optional) - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md deleted file mode 100644 index 5217121225..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.updateUrlColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "https://example.com", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md deleted file mode 100644 index 8f1b8670df..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md +++ /dev/null @@ -1,27 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Grids grids = new Grids(client); - -grids.upsertRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md deleted file mode 100644 index 2081f0f19f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Grids; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Grids grids = new Grids(client); - -grids.upsertRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // rows - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md index 695fdbdfaa..93da01eefa 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md @@ -4,8 +4,9 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token val databases = Databases(client) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md index 41a98dc016..ddce31c71c 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setAdmin("") // .setKey("<YOUR_API_KEY>") // Your secret API key val databases = Databases(client) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md index d8be0e13db..df261dbcb6 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md @@ -4,15 +4,14 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token val databases = Databases(client) val response = databases.upsertDocument( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - documentId = "<DOCUMENT_ID>", - data = mapOf( "a" to "b" ), - permissions = listOf("read("any")") // optional + documentId = "<DOCUMENT_ID>" ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md index ca861c61b2..1cb376f107 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md @@ -4,13 +4,12 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setAdmin("") // .setKey("<YOUR_API_KEY>") // Your secret API key val databases = Databases(client) val response = databases.upsertDocuments( databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>", - documents = listOf() + collectionId = "<COLLECTION_ID>" ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md index 2734412232..94bfa2310c 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md @@ -16,5 +16,5 @@ val response = functions.createExecution( path = "<PATH>", // optional method = "GET", // optional headers = mapOf( "a" to "b" ), // optional - scheduledAt = "<SCHEDULED_AT>" // optional + scheduledAt = "" // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md deleted file mode 100644 index 5966655e1e..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createBooleanColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = false, // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md deleted file mode 100644 index bc9999ff18..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createDatabase( - databaseId = "<DATABASE_ID>", - name = "<NAME>", - enabled = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md deleted file mode 100644 index f3b11b5018..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createDatetimeColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md deleted file mode 100644 index a70dd3ac45..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createEmailColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "email@example.com", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md deleted file mode 100644 index 3858155479..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createEnumColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - elements = listOf(), - required = false, - default = "<DEFAULT>", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md deleted file mode 100644 index d7b4c0155d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createFloatColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - min = 0, // optional - max = 0, // optional - default = 0, // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md deleted file mode 100644 index df16a35cc2..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids -import io.appwrite.enums.IndexType - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createIndex( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - type = IndexType.KEY, - columns = listOf(), - orders = listOf(), // optional - lengths = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md deleted file mode 100644 index db8bde2d72..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createIntegerColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - min = 0, // optional - max = 0, // optional - default = 0, // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md deleted file mode 100644 index f3ab36bd0c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createIpColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md deleted file mode 100644 index 9ba4cafbb7..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md +++ /dev/null @@ -1,22 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids -import io.appwrite.enums.RelationshipType - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createRelationshipColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - relatedTableId = "<RELATED_TABLE_ID>", - type = RelationshipType.ONETOONE, - twoWay = false, // optional - key = "", // optional - twoWayKey = "", // optional - onDelete = "cascade" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md deleted file mode 100644 index 0c3d2531c5..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val grids = Grids(client) - -val response = grids.createRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), - permissions = listOf("read("any")") // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md deleted file mode 100644 index 9c7da7c93b..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rows = listOf() -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md deleted file mode 100644 index f6793c817b..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createStringColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - size = 1, - required = false, - default = "<DEFAULT>", // optional - array = false, // optional - encrypt = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md deleted file mode 100644 index 55de471725..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createTable( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - name = "<NAME>", - permissions = listOf("read("any")"), // optional - rowSecurity = false, // optional - enabled = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md deleted file mode 100644 index 33311e29ca..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.createUrlColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "https://example.com", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md deleted file mode 100644 index 9a450f66f3..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.decrementRowColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - column = "", - value = 0, // optional - min = 0 // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md deleted file mode 100644 index 09636dae09..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.deleteColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md deleted file mode 100644 index f872453a99..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md +++ /dev/null @@ -1,14 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.deleteDatabase( - databaseId = "<DATABASE_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md deleted file mode 100644 index d3037ca6b0..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.deleteIndex( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md deleted file mode 100644 index 25b60e0e2d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val grids = Grids(client) - -val response = grids.deleteRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md deleted file mode 100644 index c3aa106eac..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.deleteRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md deleted file mode 100644 index f0208d4345..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.deleteTable( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md deleted file mode 100644 index 92890a7dc3..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.getColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md deleted file mode 100644 index fd91ab0ad3..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md +++ /dev/null @@ -1,14 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.getDatabase( - databaseId = "<DATABASE_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md deleted file mode 100644 index 7c0b2dc8cb..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.getIndex( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md deleted file mode 100644 index b217814b27..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val grids = Grids(client) - -val response = grids.getRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md deleted file mode 100644 index d8a4cd243e..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.getTable( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md deleted file mode 100644 index adbe5c287e..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.incrementRowColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - column = "", - value = 0, // optional - max = 0 // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md deleted file mode 100644 index b033eb423d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.listColumns( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md deleted file mode 100644 index c713568269..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.listDatabases( - queries = listOf(), // optional - search = "<SEARCH>" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md deleted file mode 100644 index 84bbcbd232..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.listIndexes( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md deleted file mode 100644 index ea54280ff3..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val grids = Grids(client) - -val response = grids.listRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md deleted file mode 100644 index 6bb5a588b2..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.listTables( - databaseId = "<DATABASE_ID>", - queries = listOf(), // optional - search = "<SEARCH>" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md deleted file mode 100644 index b9360ec99e..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateBooleanColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = false, - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md deleted file mode 100644 index ae8aacc343..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateDatabase( - databaseId = "<DATABASE_ID>", - name = "<NAME>", - enabled = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md deleted file mode 100644 index 50282217d7..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateDatetimeColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md deleted file mode 100644 index a9c2996800..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateEmailColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "email@example.com", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md deleted file mode 100644 index c23eef358b..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateEnumColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - elements = listOf(), - required = false, - default = "<DEFAULT>", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md deleted file mode 100644 index 1054c34fbd..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateFloatColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = 0, - min = 0, // optional - max = 0, // optional - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md deleted file mode 100644 index 288c74b4fe..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateIntegerColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = 0, - min = 0, // optional - max = 0, // optional - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md deleted file mode 100644 index cbc358a3b6..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateIpColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md deleted file mode 100644 index 99df537cfe..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateRelationshipColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - onDelete = "cascade", // optional - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md deleted file mode 100644 index ae18af353a..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val grids = Grids(client) - -val response = grids.updateRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), // optional - permissions = listOf("read("any")") // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md deleted file mode 100644 index 3682cd0724..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - data = mapOf( "a" to "b" ), // optional - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md deleted file mode 100644 index 8f7a213260..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateStringColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "<DEFAULT>", - size = 1, // optional - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md deleted file mode 100644 index 99232d858f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateTable( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - name = "<NAME>", - permissions = listOf("read("any")"), // optional - rowSecurity = false, // optional - enabled = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md deleted file mode 100644 index 65d299dba8..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.updateUrlColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "https://example.com", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md deleted file mode 100644 index cbf0f38c8d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val grids = Grids(client) - -val response = grids.upsertRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), // optional - permissions = listOf("read("any")") // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md deleted file mode 100644 index c767b66803..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Grids - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val grids = Grids(client) - -val response = grids.upsertRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rows = listOf() -) diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md index a2e77b9241..44cfc3c199 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md @@ -2,8 +2,9 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token const databases = new sdk.Databases(client); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md index d73df44cd1..7ecaa6bef4 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setAdmin('') // .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md index fcc62d601c..7f2ffba3a3 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md @@ -2,15 +2,14 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with + .setSession('') // The user session to authenticate with + .setKey('<YOUR_API_KEY>') // Your secret API key + .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token const databases = new sdk.Databases(client); const result = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>', // documentId - {}, // data - ["read("any")"] // permissions (optional) + '<DOCUMENT_ID>' // documentId ); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md index 425b7ba51f..52f7b55e11 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md @@ -2,13 +2,12 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setAdmin('') // .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new sdk.Databases(client); const result = await databases.upsertDocuments( '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>', // collectionId - [] // documents + '<COLLECTION_ID>' // collectionId ); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md index 5671483191..3c89030ca6 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md @@ -14,5 +14,5 @@ const result = await functions.createExecution( '<PATH>', // path (optional) sdk.ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '<SCHEDULED_AT>' // scheduledAt (optional) + '' // scheduledAt (optional) ); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-boolean-column.md deleted file mode 100644 index dae3f30840..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-database.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-database.md deleted file mode 100644 index 720c0d6f23..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-database.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createDatabase( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-datetime-column.md deleted file mode 100644 index d2b5c7e00f..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-email-column.md deleted file mode 100644 index ce56e96d85..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-enum-column.md deleted file mode 100644 index 653b1ed75c..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-float-column.md deleted file mode 100644 index dc6aee4805..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-index.md deleted file mode 100644 index 975fa3047e..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-index.md +++ /dev/null @@ -1,18 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - sdk.IndexType.Key, // type - [], // columns - [], // orders (optional) - [] // lengths (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-integer-column.md deleted file mode 100644 index 3444f82b58..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-ip-column.md deleted file mode 100644 index 52a9e8fbeb..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-relationship-column.md deleted file mode 100644 index c0270dab85..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<RELATED_TABLE_ID>', // relatedTableId - sdk.RelationshipType.OneToOne, // type - false, // twoWay (optional) - '', // key (optional) - '', // twoWayKey (optional) - sdk.RelationMutate.Cascade // onDelete (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-row.md deleted file mode 100644 index a8495c4b94..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-row.md +++ /dev/null @@ -1,16 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const grids = new sdk.Grids(client); - -const result = await grids.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md deleted file mode 100644 index c9400a4edf..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md deleted file mode 100644 index f72d042dfb..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - 1, // size - false, // required - '<DEFAULT>', // default (optional) - false, // array (optional) - false // encrypt (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-table.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-table.md deleted file mode 100644 index d022de372f..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-table.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-url-column.md deleted file mode 100644 index 83c6d5a01b..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/create-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.createUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/decrement-row-column.md deleted file mode 100644 index a166a1bfc0..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.decrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // min (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md deleted file mode 100644 index 7130f48cae..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.deleteColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md deleted file mode 100644 index 4a31d091b7..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md +++ /dev/null @@ -1,12 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.deleteDatabase( - '<DATABASE_ID>' // databaseId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md deleted file mode 100644 index b266062053..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.deleteIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md deleted file mode 100644 index cf202374a0..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const grids = new sdk.Grids(client); - -const result = await grids.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md deleted file mode 100644 index aa36bacbda..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.deleteRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md deleted file mode 100644 index d3bb221e0d..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md +++ /dev/null @@ -1,13 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.deleteTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md deleted file mode 100644 index d3b08936d2..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.getColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md deleted file mode 100644 index 7d27bbca94..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md +++ /dev/null @@ -1,12 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.getDatabase( - '<DATABASE_ID>' // databaseId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md deleted file mode 100644 index e47b942df9..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.getIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md deleted file mode 100644 index 15c753000a..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md +++ /dev/null @@ -1,15 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const grids = new sdk.Grids(client); - -const result = await grids.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md deleted file mode 100644 index f7b28eb191..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md +++ /dev/null @@ -1,13 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.getTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/increment-row-column.md deleted file mode 100644 index ac5257f658..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/increment-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.incrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // max (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md deleted file mode 100644 index dbfaac0262..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.listColumns( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-databases.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-databases.md deleted file mode 100644 index 8a20b2ac88..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/list-databases.md +++ /dev/null @@ -1,13 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.listDatabases( - [], // queries (optional) - '<SEARCH>' // search (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md deleted file mode 100644 index 8a102996a6..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.listIndexes( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md deleted file mode 100644 index 9f9bb3bc33..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const grids = new sdk.Grids(client); - -const result = await grids.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md deleted file mode 100644 index e020b883e0..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.listTables( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-boolean-column.md deleted file mode 100644 index b695e2d194..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-database.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-database.md deleted file mode 100644 index 689c38f605..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-database.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateDatabase( - '<DATABASE_ID>', // databaseId - '<NAME>', // name - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-datetime-column.md deleted file mode 100644 index 8ec6f1cda7..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-email-column.md deleted file mode 100644 index f8e0918819..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-enum-column.md deleted file mode 100644 index bda1aad53a..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-float-column.md deleted file mode 100644 index ae3d5ceb4b..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-integer-column.md deleted file mode 100644 index a3e28bc406..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-ip-column.md deleted file mode 100644 index ff8692f81e..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-relationship-column.md deleted file mode 100644 index 19f957f67a..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,16 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - sdk.RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-row.md deleted file mode 100644 index 79c845f558..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-row.md +++ /dev/null @@ -1,16 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const grids = new sdk.Grids(client); - -const result = await grids.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md deleted file mode 100644 index 65c8f63cbd..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - {}, // data (optional) - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-string-column.md deleted file mode 100644 index b04f38bd5d..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-string-column.md +++ /dev/null @@ -1,18 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '<DEFAULT>', // default - 1, // size (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-table.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-table.md deleted file mode 100644 index 3d80666600..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-table.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateTable( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-url-column.md deleted file mode 100644 index aa368bfcc0..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/update-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.updateUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-row.md deleted file mode 100644 index 03476fc311..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const grids = new sdk.Grids(client); - -const result = await grids.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md deleted file mode 100644 index 19f2ce1a90..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const grids = new sdk.Grids(client); - -const result = await grids.upsertRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-document.md b/docs/examples/1.8.x/server-php/examples/databases/create-document.md index bf1ee3f62a..8726b37719 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-php/examples/databases/create-document.md @@ -5,8 +5,9 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with + ->setSession('') // The user session to authenticate with + ->setKey('<YOUR_API_KEY>') // Your secret API key + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token $databases = new Databases($client); diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-documents.md b/docs/examples/1.8.x/server-php/examples/databases/create-documents.md index bc05f67260..9429b57aba 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-php/examples/databases/create-documents.md @@ -5,7 +5,7 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setAdmin('') // ->setKey('<YOUR_API_KEY>'); // Your secret API key $databases = new Databases($client); diff --git a/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md index 6cff8296a3..2f8464c995 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md @@ -5,15 +5,14 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with + ->setSession('') // The user session to authenticate with + ->setKey('<YOUR_API_KEY>') // Your secret API key + ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token $databases = new Databases($client); $result = $databases->upsertDocument( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documentId: '<DOCUMENT_ID>', - data: [], - permissions: ["read("any")"] // optional + documentId: '<DOCUMENT_ID>' ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md index d9f9efda5c..11898dc33a 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md @@ -5,13 +5,12 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setAdmin('') // ->setKey('<YOUR_API_KEY>'); // Your secret API key $databases = new Databases($client); $result = $databases->upsertDocuments( databaseId: '<DATABASE_ID>', - collectionId: '<COLLECTION_ID>', - documents: [] + collectionId: '<COLLECTION_ID>' ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-execution.md b/docs/examples/1.8.x/server-php/examples/functions/create-execution.md index cd11b5ea6e..9aeb976cf3 100644 --- a/docs/examples/1.8.x/server-php/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-php/examples/functions/create-execution.md @@ -17,5 +17,5 @@ $result = $functions->createExecution( path: '<PATH>', // optional method: ExecutionMethod::GET(), // optional headers: [], // optional - scheduledAt: '<SCHEDULED_AT>' // optional + scheduledAt: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md deleted file mode 100644 index 22e7cf8058..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createBooleanColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: false, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-database.md b/docs/examples/1.8.x/server-php/examples/grids/create-database.md deleted file mode 100644 index ff7c3f73fb..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-database.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createDatabase( - databaseId: '<DATABASE_ID>', - name: '<NAME>', - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md deleted file mode 100644 index afb847fd30..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createDatetimeColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-email-column.md deleted file mode 100644 index 7516614820..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-email-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createEmailColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: 'email@example.com', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md deleted file mode 100644 index f4a9ff2e5d..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createEnumColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - elements: [], - required: false, - default: '<DEFAULT>', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-float-column.md deleted file mode 100644 index 7a02a1790b..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-float-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createFloatColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - min: null, // optional - max: null, // optional - default: null, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-index.md b/docs/examples/1.8.x/server-php/examples/grids/create-index.md deleted file mode 100644 index 31bfdc2754..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-index.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; -use Appwrite\Enums\IndexType; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - type: IndexType::KEY(), - columns: [], - orders: [], // optional - lengths: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md deleted file mode 100644 index 6495fc6309..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createIntegerColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - min: null, // optional - max: null, // optional - default: null, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md deleted file mode 100644 index 65379a2f94..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createIpColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md deleted file mode 100644 index cde72569ad..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; -use Appwrite\Enums\RelationshipType; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createRelationshipColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - relatedTableId: '<RELATED_TABLE_ID>', - type: RelationshipType::ONETOONE(), - twoWay: false, // optional - key: '', // optional - twoWayKey: '', // optional - onDelete: RelationMutate::CASCADE() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-row.md b/docs/examples/1.8.x/server-php/examples/grids/create-row.md deleted file mode 100644 index 58f678c6c3..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$grids = new Grids($client); - -$result = $grids->createRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: [], - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-rows.md b/docs/examples/1.8.x/server-php/examples/grids/create-rows.md deleted file mode 100644 index 531ebaf846..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rows: [] -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-string-column.md deleted file mode 100644 index a5acf25859..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-string-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createStringColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - size: 1, - required: false, - default: '<DEFAULT>', // optional - array: false, // optional - encrypt: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-table.md b/docs/examples/1.8.x/server-php/examples/grids/create-table.md deleted file mode 100644 index ca6e017375..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-table.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createTable( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-url-column.md deleted file mode 100644 index b0149f279b..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/create-url-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->createUrlColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: 'https://example.com', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md deleted file mode 100644 index d7db09ed30..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->decrementRowColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - column: '', - value: null, // optional - min: null // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-column.md b/docs/examples/1.8.x/server-php/examples/grids/delete-column.md deleted file mode 100644 index 3862ecbde9..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/delete-column.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->deleteColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-database.md b/docs/examples/1.8.x/server-php/examples/grids/delete-database.md deleted file mode 100644 index 761406ba9b..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/delete-database.md +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->deleteDatabase( - databaseId: '<DATABASE_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-index.md b/docs/examples/1.8.x/server-php/examples/grids/delete-index.md deleted file mode 100644 index 913091455b..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/delete-index.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->deleteIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-row.md b/docs/examples/1.8.x/server-php/examples/grids/delete-row.md deleted file mode 100644 index 14b72e6e56..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/delete-row.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$grids = new Grids($client); - -$result = $grids->deleteRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-php/examples/grids/delete-rows.md deleted file mode 100644 index 567b497f04..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/delete-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->deleteRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-table.md b/docs/examples/1.8.x/server-php/examples/grids/delete-table.md deleted file mode 100644 index ea0eeda80f..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/delete-table.md +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->deleteTable( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-column.md b/docs/examples/1.8.x/server-php/examples/grids/get-column.md deleted file mode 100644 index ac2c9bb0c4..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/get-column.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->getColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-database.md b/docs/examples/1.8.x/server-php/examples/grids/get-database.md deleted file mode 100644 index c3e9f896c2..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/get-database.md +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->getDatabase( - databaseId: '<DATABASE_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-index.md b/docs/examples/1.8.x/server-php/examples/grids/get-index.md deleted file mode 100644 index 2434fd933b..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/get-index.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->getIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-row.md b/docs/examples/1.8.x/server-php/examples/grids/get-row.md deleted file mode 100644 index e13ea67209..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/get-row.md +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$grids = new Grids($client); - -$result = $grids->getRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-table.md b/docs/examples/1.8.x/server-php/examples/grids/get-table.md deleted file mode 100644 index 1c9721f1c7..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/get-table.md +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->getTable( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md deleted file mode 100644 index fc9ee9a9eb..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->incrementRowColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - column: '', - value: null, // optional - max: null // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-columns.md b/docs/examples/1.8.x/server-php/examples/grids/list-columns.md deleted file mode 100644 index 7be7581a28..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/list-columns.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->listColumns( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-databases.md b/docs/examples/1.8.x/server-php/examples/grids/list-databases.md deleted file mode 100644 index f5fec16a25..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/list-databases.md +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->listDatabases( - queries: [], // optional - search: '<SEARCH>' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-php/examples/grids/list-indexes.md deleted file mode 100644 index d23248e5d4..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/list-indexes.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->listIndexes( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-rows.md b/docs/examples/1.8.x/server-php/examples/grids/list-rows.md deleted file mode 100644 index c8537651c6..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/list-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$grids = new Grids($client); - -$result = $grids->listRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-tables.md b/docs/examples/1.8.x/server-php/examples/grids/list-tables.md deleted file mode 100644 index 95f4f7b65d..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/list-tables.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->listTables( - databaseId: '<DATABASE_ID>', - queries: [], // optional - search: '<SEARCH>' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md deleted file mode 100644 index bc7405d35d..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateBooleanColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: false, - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-database.md b/docs/examples/1.8.x/server-php/examples/grids/update-database.md deleted file mode 100644 index 9d71e5e043..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-database.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateDatabase( - databaseId: '<DATABASE_ID>', - name: '<NAME>', - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md deleted file mode 100644 index 6850a6d373..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateDatetimeColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-email-column.md deleted file mode 100644 index 6fe7f82477..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-email-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateEmailColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: 'email@example.com', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md deleted file mode 100644 index 4a18d02488..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateEnumColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - elements: [], - required: false, - default: '<DEFAULT>', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-float-column.md deleted file mode 100644 index 5e58f8efaf..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-float-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateFloatColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: null, - min: null, // optional - max: null, // optional - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md deleted file mode 100644 index c097b7e286..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateIntegerColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: null, - min: null, // optional - max: null, // optional - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md deleted file mode 100644 index 9ce131b8e1..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateIpColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md deleted file mode 100644 index a0241afb06..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateRelationshipColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - onDelete: RelationMutate::CASCADE(), // optional - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-row.md b/docs/examples/1.8.x/server-php/examples/grids/update-row.md deleted file mode 100644 index a0aae15730..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-row.md +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$grids = new Grids($client); - -$result = $grids->updateRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: [], // optional - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-rows.md b/docs/examples/1.8.x/server-php/examples/grids/update-rows.md deleted file mode 100644 index 270489f44e..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-rows.md +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - data: [], // optional - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-string-column.md deleted file mode 100644 index 6213deb7aa..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateStringColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '<DEFAULT>', - size: 1, // optional - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-table.md b/docs/examples/1.8.x/server-php/examples/grids/update-table.md deleted file mode 100644 index 1483eee2a9..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-table.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateTable( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-url-column.md deleted file mode 100644 index 7f7916c81a..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/update-url-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->updateUrlColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: 'https://example.com', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-php/examples/grids/upsert-row.md deleted file mode 100644 index a07cbe976f..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/upsert-row.md +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$grids = new Grids($client); - -$result = $grids->upsertRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: [], // optional - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md deleted file mode 100644 index 5d31648e02..0000000000 --- a/docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Grids; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$grids = new Grids($client); - -$result = $grids->upsertRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rows: [] -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-document.md b/docs/examples/1.8.x/server-python/examples/databases/create-document.md index 1eaf0246f3..1a8500b0f2 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-python/examples/databases/create-document.md @@ -3,8 +3,9 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID client.set_session('') # The user session to authenticate with +client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token databases = Databases(client) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-documents.md b/docs/examples/1.8.x/server-python/examples/databases/create-documents.md index 1b94e5165a..27ad6e8aa8 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-python/examples/databases/create-documents.md @@ -3,7 +3,7 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_admin('') # client.set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases(client) diff --git a/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md index c491ea4f44..8711e442c5 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md @@ -3,15 +3,14 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID client.set_session('') # The user session to authenticate with +client.set_key('<YOUR_API_KEY>') # Your secret API key +client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token databases = Databases(client) result = databases.upsert_document( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - document_id = '<DOCUMENT_ID>', - data = {}, - permissions = ["read("any")"] # optional + document_id = '<DOCUMENT_ID>' ) diff --git a/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md index 5136d5fcb1..79888c8be3 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md @@ -3,13 +3,12 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_admin('') # client.set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases(client) result = databases.upsert_documents( database_id = '<DATABASE_ID>', - collection_id = '<COLLECTION_ID>', - documents = [] + collection_id = '<COLLECTION_ID>' ) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-execution.md b/docs/examples/1.8.x/server-python/examples/functions/create-execution.md index f80b8646c2..b41c7e376c 100644 --- a/docs/examples/1.8.x/server-python/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-python/examples/functions/create-execution.md @@ -15,5 +15,5 @@ result = functions.create_execution( path = '<PATH>', # optional method = ExecutionMethod.GET, # optional headers = {}, # optional - scheduled_at = '<SCHEDULED_AT>' # optional + scheduled_at = '' # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md deleted file mode 100644 index 73d8323533..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_boolean_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = False, # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-database.md b/docs/examples/1.8.x/server-python/examples/grids/create-database.md deleted file mode 100644 index a7749e4903..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-database.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_database( - database_id = '<DATABASE_ID>', - name = '<NAME>', - enabled = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md deleted file mode 100644 index a98024c16c..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_datetime_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-email-column.md deleted file mode 100644 index 372cbafce3..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_email_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = 'email@example.com', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md deleted file mode 100644 index d7b47c80cb..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_enum_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - elements = [], - required = False, - default = '<DEFAULT>', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-float-column.md deleted file mode 100644 index 5a52128ac1..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_float_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - min = None, # optional - max = None, # optional - default = None, # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-index.md b/docs/examples/1.8.x/server-python/examples/grids/create-index.md deleted file mode 100644 index 1d67b8abc0..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-index.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids -from appwrite.enums import IndexType - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_index( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - type = IndexType.KEY, - columns = [], - orders = [], # optional - lengths = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md deleted file mode 100644 index aed49578aa..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_integer_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - min = None, # optional - max = None, # optional - default = None, # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md deleted file mode 100644 index af873c91a1..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_ip_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md deleted file mode 100644 index 3cb858d260..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,21 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids -from appwrite.enums import RelationshipType - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_relationship_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - related_table_id = '<RELATED_TABLE_ID>', - type = RelationshipType.ONETOONE, - two_way = False, # optional - key = '', # optional - two_way_key = '', # optional - on_delete = RelationMutate.CASCADE # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-row.md b/docs/examples/1.8.x/server-python/examples/grids/create-row.md deleted file mode 100644 index 5645f0bd23..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -grids = Grids(client) - -result = grids.create_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - data = {}, - permissions = ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-rows.md b/docs/examples/1.8.x/server-python/examples/grids/create-rows.md deleted file mode 100644 index 3274c48a10..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - rows = [] -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-string-column.md deleted file mode 100644 index 3771a070ba..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_string_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - size = 1, - required = False, - default = '<DEFAULT>', # optional - array = False, # optional - encrypt = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-table.md b/docs/examples/1.8.x/server-python/examples/grids/create-table.md deleted file mode 100644 index 64c1b50d69..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-table.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_table( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - name = '<NAME>', - permissions = ["read("any")"], # optional - row_security = False, # optional - enabled = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-url-column.md deleted file mode 100644 index 45c1a2d82e..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/create-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.create_url_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = 'https://example.com', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md deleted file mode 100644 index 9608337398..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.decrement_row_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - column = '', - value = None, # optional - min = None # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-column.md b/docs/examples/1.8.x/server-python/examples/grids/delete-column.md deleted file mode 100644 index 650a1c3578..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/delete-column.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.delete_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '' -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-database.md b/docs/examples/1.8.x/server-python/examples/grids/delete-database.md deleted file mode 100644 index 9898c07bc8..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/delete-database.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.delete_database( - database_id = '<DATABASE_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-index.md b/docs/examples/1.8.x/server-python/examples/grids/delete-index.md deleted file mode 100644 index fed36f1d9c..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/delete-index.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.delete_index( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '' -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-row.md b/docs/examples/1.8.x/server-python/examples/grids/delete-row.md deleted file mode 100644 index eb1e661738..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -grids = Grids(client) - -result = grids.delete_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-python/examples/grids/delete-rows.md deleted file mode 100644 index 31503cdee1..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/delete-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.delete_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-table.md b/docs/examples/1.8.x/server-python/examples/grids/delete-table.md deleted file mode 100644 index d170c31d20..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/delete-table.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.delete_table( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-column.md b/docs/examples/1.8.x/server-python/examples/grids/get-column.md deleted file mode 100644 index a724e07b0a..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/get-column.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.get_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '' -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-database.md b/docs/examples/1.8.x/server-python/examples/grids/get-database.md deleted file mode 100644 index e393d7587b..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/get-database.md +++ /dev/null @@ -1,13 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.get_database( - database_id = '<DATABASE_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-index.md b/docs/examples/1.8.x/server-python/examples/grids/get-index.md deleted file mode 100644 index 6e3753dea5..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/get-index.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.get_index( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '' -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-row.md b/docs/examples/1.8.x/server-python/examples/grids/get-row.md deleted file mode 100644 index 939a992868..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -grids = Grids(client) - -result = grids.get_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-table.md b/docs/examples/1.8.x/server-python/examples/grids/get-table.md deleted file mode 100644 index afe24bd0f2..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/get-table.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.get_table( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md deleted file mode 100644 index 598cf58874..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.increment_row_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - column = '', - value = None, # optional - max = None # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-columns.md b/docs/examples/1.8.x/server-python/examples/grids/list-columns.md deleted file mode 100644 index b78327182c..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/list-columns.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.list_columns( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-databases.md b/docs/examples/1.8.x/server-python/examples/grids/list-databases.md deleted file mode 100644 index 78c5cb4bd7..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/list-databases.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.list_databases( - queries = [], # optional - search = '<SEARCH>' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-python/examples/grids/list-indexes.md deleted file mode 100644 index a6b52416c6..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/list-indexes.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.list_indexes( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-rows.md b/docs/examples/1.8.x/server-python/examples/grids/list-rows.md deleted file mode 100644 index 975f88f763..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -grids = Grids(client) - -result = grids.list_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-tables.md b/docs/examples/1.8.x/server-python/examples/grids/list-tables.md deleted file mode 100644 index 3e2e5508bc..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/list-tables.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.list_tables( - database_id = '<DATABASE_ID>', - queries = [], # optional - search = '<SEARCH>' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md deleted file mode 100644 index 6bcbf27355..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_boolean_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = False, - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-database.md b/docs/examples/1.8.x/server-python/examples/grids/update-database.md deleted file mode 100644 index 2df676bcbc..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-database.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_database( - database_id = '<DATABASE_ID>', - name = '<NAME>', - enabled = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md deleted file mode 100644 index 6ae0e4dea5..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_datetime_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-email-column.md deleted file mode 100644 index c1ff1d0637..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_email_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = 'email@example.com', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md deleted file mode 100644 index 6da49cfb81..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_enum_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - elements = [], - required = False, - default = '<DEFAULT>', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-float-column.md deleted file mode 100644 index 8d3d9edb5f..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_float_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = None, - min = None, # optional - max = None, # optional - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md deleted file mode 100644 index 966f7b6805..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_integer_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = None, - min = None, # optional - max = None, # optional - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md deleted file mode 100644 index e5fccac320..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_ip_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md deleted file mode 100644 index fcff4591fd..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,17 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_relationship_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - on_delete = RelationMutate.CASCADE, # optional - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-row.md b/docs/examples/1.8.x/server-python/examples/grids/update-row.md deleted file mode 100644 index e379697ce4..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -grids = Grids(client) - -result = grids.update_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - data = {}, # optional - permissions = ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-rows.md b/docs/examples/1.8.x/server-python/examples/grids/update-rows.md deleted file mode 100644 index 344bb5904b..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - data = {}, # optional - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-string-column.md deleted file mode 100644 index f303189b80..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_string_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '<DEFAULT>', - size = 1, # optional - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-table.md b/docs/examples/1.8.x/server-python/examples/grids/update-table.md deleted file mode 100644 index cfd5b4d92e..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-table.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_table( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - name = '<NAME>', - permissions = ["read("any")"], # optional - row_security = False, # optional - enabled = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-url-column.md deleted file mode 100644 index ea6dc386ed..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/update-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.update_url_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = 'https://example.com', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-python/examples/grids/upsert-row.md deleted file mode 100644 index 79528818e0..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -grids = Grids(client) - -result = grids.upsert_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - data = {}, # optional - permissions = ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md deleted file mode 100644 index b7573d4794..0000000000 --- a/docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.grids import Grids - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids(client) - -result = grids.upsert_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - rows = [] -) diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md index b62c82a6a8..2079b045d1 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md @@ -1,6 +1,6 @@ POST /v1/account/sessions/anonymous HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md index 1103d2ebfb..8aee0e5b15 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md @@ -1,7 +1,7 @@ POST /v1/account/sessions/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md index 552b724b9c..98c5c9b454 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md index 62a7dee7e9..a8da4695c3 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md @@ -1,6 +1,6 @@ POST /v1/account/jwts HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md index 29d68bd0fa..a3db43516a 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/magic-url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md index 62a068b6cf..8d6b52b877 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md index dd5ef4c731..9a84c0ef69 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/challenge HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md index f09323df0b..797824d5d7 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md index 8a0cab614f..dd1dd3ec5e 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md @@ -1,4 +1,4 @@ GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md index 5127c8377a..eef1021d9e 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md index 57b3b7d160..d161e580ff 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md @@ -1,7 +1,7 @@ POST /v1/account/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md b/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md index ea0146228b..c195b96a5e 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md @@ -1,7 +1,7 @@ POST /v1/account/recovery HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-session.md index 0acc50cda6..18e3b1acdd 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-session.md @@ -1,7 +1,7 @@ POST /v1/account/sessions/token HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-verification.md b/docs/examples/1.8.x/server-rest/examples/account/create-verification.md index ed5479dbe5..1185d3a875 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-verification.md @@ -1,7 +1,7 @@ POST /v1/account/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create.md b/docs/examples/1.8.x/server-rest/examples/account/create.md index 15bb386f41..f546c07de5 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create.md @@ -1,7 +1,7 @@ POST /v1/account HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md b/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md index bacca18870..edb036a593 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md @@ -1,7 +1,7 @@ DELETE /v1/account/identities/{identityId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md index a0eb5a0869..de58948195 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md @@ -1,7 +1,7 @@ DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-session.md b/docs/examples/1.8.x/server-rest/examples/account/delete-session.md index c9b0f48d6f..9454a84913 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/delete-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-session.md @@ -1,7 +1,7 @@ DELETE /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md index 0b3fcd1c45..97931c12e5 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md @@ -1,7 +1,7 @@ DELETE /v1/account/sessions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md index 2ab10a2475..81edee5234 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md @@ -1,6 +1,6 @@ GET /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md index a038dacbfd..13a0b74d8f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md @@ -1,6 +1,6 @@ GET /v1/account/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-session.md b/docs/examples/1.8.x/server-rest/examples/account/get-session.md index 3e372a05ef..9417755b04 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/get-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/get-session.md @@ -1,6 +1,6 @@ GET /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get.md b/docs/examples/1.8.x/server-rest/examples/account/get.md index 104b643074..023a6d116f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/get.md +++ b/docs/examples/1.8.x/server-rest/examples/account/get.md @@ -1,6 +1,6 @@ GET /v1/account HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-identities.md b/docs/examples/1.8.x/server-rest/examples/account/list-identities.md index 5acb221584..65edceb8d6 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/list-identities.md +++ b/docs/examples/1.8.x/server-rest/examples/account/list-identities.md @@ -1,6 +1,6 @@ GET /v1/account/identities HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-logs.md b/docs/examples/1.8.x/server-rest/examples/account/list-logs.md index 8314123c9e..71e2e138ef 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/list-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/account/list-logs.md @@ -1,6 +1,6 @@ GET /v1/account/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md index c591143d4e..217ec6cb30 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md +++ b/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md @@ -1,6 +1,6 @@ GET /v1/account/mfa/factors HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md b/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md index 89ef6962c9..7bff23f25b 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md +++ b/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md @@ -1,6 +1,6 @@ GET /v1/account/sessions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-email.md b/docs/examples/1.8.x/server-rest/examples/account/update-email.md index 382327e31b..fc3baaf4a4 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-email.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-email.md @@ -1,7 +1,7 @@ PATCH /v1/account/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md index a22b169751..803c47a857 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md @@ -1,7 +1,7 @@ PATCH /v1/account/mfa HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md index 1a82afbfcc..3238322e0f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md @@ -1,7 +1,7 @@ PUT /v1/account/sessions/magic-url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md index 780472291c..9d3e5dceea 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md @@ -1,7 +1,7 @@ PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md index b6a7e92b28..ddc27ae334 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md @@ -1,7 +1,7 @@ PUT /v1/account/mfa/challenge HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md index 74e9225f3e..e4ab8abb3b 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md @@ -1,7 +1,7 @@ PATCH /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-name.md b/docs/examples/1.8.x/server-rest/examples/account/update-name.md index 4c9c0e302c..f2f7caa204 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-name.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-name.md @@ -1,7 +1,7 @@ PATCH /v1/account/name HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-password.md b/docs/examples/1.8.x/server-rest/examples/account/update-password.md index e05a1c2b7f..4f69b9ab3f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-password.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-password.md @@ -1,7 +1,7 @@ PATCH /v1/account/password HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md index 54872eecd2..f1bc27d201 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md @@ -1,7 +1,7 @@ PUT /v1/account/sessions/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md index 1d4dc22520..ee6f5a68ff 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md @@ -1,7 +1,7 @@ PUT /v1/account/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone.md index 791caadb0d..bbe602a181 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-phone.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone.md @@ -1,7 +1,7 @@ PATCH /v1/account/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md index 24f2d3bcb6..aeabc2b68f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md @@ -1,7 +1,7 @@ PATCH /v1/account/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md b/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md index 7d40ee79fe..054aacc8ed 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md @@ -1,7 +1,7 @@ PUT /v1/account/recovery HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-session.md index 8e2257aeed..9b2ba0e4a7 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-session.md @@ -1,7 +1,7 @@ PATCH /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-status.md b/docs/examples/1.8.x/server-rest/examples/account/update-status.md index 557697fe5f..8a3e01db0b 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-status.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-status.md @@ -1,7 +1,7 @@ PATCH /v1/account/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-verification.md b/docs/examples/1.8.x/server-rest/examples/account/update-verification.md index a4dcbf76a3..0c5ed8b55d 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-verification.md @@ -1,7 +1,7 @@ PUT /v1/account/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md index 36999839cc..3f18fa0d1e 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md @@ -1,6 +1,6 @@ GET /v1/avatars/browsers/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md index c9126af289..59a38fe8f3 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md @@ -1,6 +1,6 @@ GET /v1/avatars/credit-cards/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md index 5a928fc9cc..7a7c189da1 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md @@ -1,6 +1,6 @@ GET /v1/avatars/favicon HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md index c29ba10970..b4cd119359 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md @@ -1,6 +1,6 @@ GET /v1/avatars/flags/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md index dfc9fdcd92..ca6b5105c3 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md @@ -1,6 +1,6 @@ GET /v1/avatars/image HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md index c784f1ca56..eb90447158 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md @@ -1,6 +1,6 @@ GET /v1/avatars/initials HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md index bac1987d4e..77f7a3d382 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md @@ -1,6 +1,6 @@ GET /v1/avatars/qr HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md index fb11c03cbd..8ae6c2d9ff 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md index 4f1e77728e..ea298e3706 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md index 3d0e718634..6ec4b332a5 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-document.md b/docs/examples/1.8.x/server-rest/examples/databases/create-document.md index e4ba6ec1ff..a5c25315c2 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-document.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md index cee5405fb2..63503ebaaa 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md index 02b7095d64..0fb7aa2814 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md index a921e10c5f..ba033a02ce 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md index ea9dde56ce..ee8cb7497f 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/float HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-index.md b/docs/examples/1.8.x/server-rest/examples/databases/create-index.md index c78bdc37f9..6d9b486ed6 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-index.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-index.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md index cce3a3f265..721f10e0c7 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md index 80afccb4c1..61378e6780 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md index d9e6c6441c..c519a4a494 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/relationship HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md index 5591ca8d8a..7a5eafdf2a 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/string HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md index 4ee9595717..ea4d76ce06 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create.md b/docs/examples/1.8.x/server-rest/examples/databases/create.md index fd1ae143fa..dab52ff67c 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create.md @@ -1,7 +1,7 @@ POST /v1/databases HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md index 53ee43c6c5..d569f8d7e6 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md index 5d8f7f2932..8b7f1eee07 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md index 96d044df4e..153b3a2bdd 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md index b5580b04bf..ca093c9177 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md index cb27719953..49ab276fa6 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md index d8664ef7ca..9c27a6fd4c 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete.md b/docs/examples/1.8.x/server-rest/examples/databases/delete.md index 85d5f7bb0e..19cf58549a 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md index 60161187da..c4cd093de0 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md index 837138aaa0..0e33fc4ef7 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-document.md b/docs/examples/1.8.x/server-rest/examples/databases/get-document.md index 78a0e7d37c..b71ec4f83c 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-document.md @@ -1,6 +1,6 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-index.md b/docs/examples/1.8.x/server-rest/examples/databases/get-index.md index 58665ed283..5aa5aa0fb2 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get-index.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-index.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get.md b/docs/examples/1.8.x/server-rest/examples/databases/get.md index 644f251f56..7c43330625 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md index accfca5b06..8658cb0ee6 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md index 1d16e3308d..e829678007 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/attributes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md b/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md index 18499144d3..0cfdce9c8e 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md index 468956232d..0bc5c9b7f9 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md @@ -1,6 +1,6 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md index 1e1f134ef0..e65ba2483c 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list.md b/docs/examples/1.8.x/server-rest/examples/databases/list.md index 3b9530eec4..31db5cca0d 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list.md @@ -1,5 +1,5 @@ GET /v1/databases HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md index 75f3d66b50..7a2ae34ce9 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md index 6d6e5603ed..4cba7f5230 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md @@ -1,7 +1,7 @@ PUT /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md index 59a477aca7..c9685e6c89 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-document.md b/docs/examples/1.8.x/server-rest/examples/databases/update-document.md index 9a156375de..19b25bdf45 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-document.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md index 69ea7a0d6f..f2606e3a1f 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md index 08257e8906..eece253459 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/email/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md index 8e69a703ea..47ef168090 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md index 214567660d..bb35f3450c 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/float/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md index 1f566c1369..96290f4313 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md index 31bc18c587..9e3cf7d4b5 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md index 3cb7d4f679..645e8f8ae4 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md index 2026b854a9..650b6f1b8b 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/string/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md index 4f90c7ade3..8409285677 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/url/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update.md b/docs/examples/1.8.x/server-rest/examples/databases/update.md index d57ad48927..02efbf5270 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update.md @@ -1,7 +1,7 @@ PUT /v1/databases/{databaseId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md index 97b61bfc7f..7339c7e611 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md @@ -1,13 +1,9 @@ PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-JWT: <YOUR_JWT> -{ - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md index 4bcb9cb0c0..1a24810a03 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md @@ -1,10 +1,7 @@ PUT /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> -{ - "documents": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md index f68e54dedc..5d65eff5fd 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> Content-Length: *Length of your entity body in bytes* diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md index f2ba3c5f13..898117c117 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments/duplicate HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md index a2863046ce..5a4c7667cf 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/executions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> @@ -13,5 +13,5 @@ X-Appwrite-JWT: <YOUR_JWT> "path": "<PATH>", "method": "GET", "headers": {}, - "scheduledAt": "<SCHEDULED_AT>" + "scheduledAt": } diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md index 18ebf65efe..656c2e2a27 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments/template HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md index 7f71f07417..7251a3a352 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/variables HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md index cd409fa892..1b5267ca14 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments/vcs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create.md b/docs/examples/1.8.x/server-rest/examples/functions/create.md index 1f034e60a4..c5f364ad63 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create.md @@ -1,7 +1,7 @@ POST /v1/functions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md index 81a80209a8..b70f282167 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md @@ -1,7 +1,7 @@ DELETE /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md index 020a9efc3e..fb26ae47aa 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md @@ -1,7 +1,7 @@ DELETE /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md index 88f4de15eb..aa01835ae4 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md @@ -1,7 +1,7 @@ DELETE /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete.md b/docs/examples/1.8.x/server-rest/examples/functions/delete.md index 2148d8148b..9f9ab74019 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete.md @@ -1,7 +1,7 @@ DELETE /v1/functions/{functionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md index e9c9ce0073..9195d203ab 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/deployments/{deploymentId}/download HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md index aa6e92449b..2557ca698e 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md index 54da369660..52e54c2a6c 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md index 91f14f0db8..2a01307b0d 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get.md b/docs/examples/1.8.x/server-rest/examples/functions/get.md index fb0f049f6d..062b7e67ec 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md index db89edf692..5b4dabc679 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId}/deployments HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md b/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md index 5876a8ba46..b0ac3076ab 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/executions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md index d8e4bc4272..762e47fbcb 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md @@ -1,5 +1,5 @@ GET /v1/functions/runtimes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md index 1a84b56ac9..989adc0576 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md @@ -1,5 +1,5 @@ GET /v1/functions/specifications HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md b/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md index 41bfde5e28..b46b69fb5f 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId}/variables HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list.md b/docs/examples/1.8.x/server-rest/examples/functions/list.md index e12af0e774..318a2d56ed 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list.md @@ -1,5 +1,5 @@ GET /v1/functions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md index ba4a882910..8788e21c2b 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md @@ -1,7 +1,7 @@ PATCH /v1/functions/{functionId}/deployments/{deploymentId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md index d649b2ea69..1f89f35da0 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md @@ -1,7 +1,7 @@ PATCH /v1/functions/{functionId}/deployment HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md index 5a0ad6805d..36ae244548 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md @@ -1,7 +1,7 @@ PUT /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update.md b/docs/examples/1.8.x/server-rest/examples/functions/update.md index 40329e5580..ee3b8b8c6d 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/update.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/update.md @@ -1,7 +1,7 @@ PUT /v1/functions/{functionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md b/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md index 2d59370324..7d58d77ede 100644 --- a/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md @@ -2,7 +2,7 @@ POST /v1/graphql/mutation HTTP/1.1 Host: cloud.appwrite.io X-Sdk-Graphql: true Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/server-rest/examples/graphql/query.md b/docs/examples/1.8.x/server-rest/examples/graphql/query.md index c7242de6ef..8b87cd9f33 100644 --- a/docs/examples/1.8.x/server-rest/examples/graphql/query.md +++ b/docs/examples/1.8.x/server-rest/examples/graphql/query.md @@ -2,7 +2,7 @@ POST /v1/graphql HTTP/1.1 Host: cloud.appwrite.io X-Sdk-Graphql: true Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md deleted file mode 100644 index d594385572..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/boolean HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": false, - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-database.md b/docs/examples/1.8.x/server-rest/examples/grids/create-database.md deleted file mode 100644 index fd1ae143fa..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-database.md +++ /dev/null @@ -1,12 +0,0 @@ -POST /v1/databases HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "databaseId": "<DATABASE_ID>", - "name": "<NAME>", - "enabled": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md deleted file mode 100644 index 88505a8a1f..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/datetime HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": , - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md deleted file mode 100644 index 28d733dab8..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/email HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": "email@example.com", - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md deleted file mode 100644 index 35de1b5e2f..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md +++ /dev/null @@ -1,14 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/enum HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "elements": [], - "required": false, - "default": "<DEFAULT>", - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md deleted file mode 100644 index 9c9996aced..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md +++ /dev/null @@ -1,15 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/float HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "min": 0, - "max": 0, - "default": 0, - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-index.md b/docs/examples/1.8.x/server-rest/examples/grids/create-index.md deleted file mode 100644 index 7a7487bdae..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-index.md +++ /dev/null @@ -1,14 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/indexes HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "type": "key", - "columns": [], - "orders": [], - "lengths": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md deleted file mode 100644 index be6eb92544..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md +++ /dev/null @@ -1,15 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/integer HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "min": 0, - "max": 0, - "default": 0, - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md deleted file mode 100644 index 30406d7025..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/ip HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": , - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md deleted file mode 100644 index 75f54c9602..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,15 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/relationship HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "relatedTableId": "<RELATED_TABLE_ID>", - "type": "oneToOne", - "twoWay": false, - "key": , - "twoWayKey": , - "onDelete": "cascade" -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-row.md b/docs/examples/1.8.x/server-rest/examples/grids/create-row.md deleted file mode 100644 index 443b4e30c9..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-row.md +++ /dev/null @@ -1,14 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - -{ - "rowId": "<ROW_ID>", - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/create-rows.md deleted file mode 100644 index 32578d87de..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-rows.md +++ /dev/null @@ -1,12 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - -{ - "rows": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md deleted file mode 100644 index 2a0b0dc372..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md +++ /dev/null @@ -1,15 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/string HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "size": 1, - "required": false, - "default": "<DEFAULT>", - "array": false, - "encrypt": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-table.md b/docs/examples/1.8.x/server-rest/examples/grids/create-table.md deleted file mode 100644 index 7c22e81e7c..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-table.md +++ /dev/null @@ -1,14 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "tableId": "<TABLE_ID>", - "name": "<NAME>", - "permissions": ["read(\"any\")"], - "rowSecurity": false, - "enabled": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md deleted file mode 100644 index 5dada907a0..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/url HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": "https://example.com", - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-rest/examples/grids/decrement-row-column.md deleted file mode 100644 index 6548a58273..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,11 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId}/{column}/decrement HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "value": 0, - "min": 0 -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-column.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-column.md deleted file mode 100644 index 2680bcf03a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/delete-column.md +++ /dev/null @@ -1,7 +0,0 @@ -DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/columns/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-database.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-database.md deleted file mode 100644 index 85d5f7bb0e..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/delete-database.md +++ /dev/null @@ -1,7 +0,0 @@ -DELETE /v1/databases/{databaseId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-index.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-index.md deleted file mode 100644 index ca7d67a1b4..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/delete-index.md +++ /dev/null @@ -1,7 +0,0 @@ -DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/indexes/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-row.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-row.md deleted file mode 100644 index 8fd3f6ee7d..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/delete-row.md +++ /dev/null @@ -1,9 +0,0 @@ -DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md deleted file mode 100644 index af1fabdb7a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md +++ /dev/null @@ -1,10 +0,0 @@ -DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "queries": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-table.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-table.md deleted file mode 100644 index e068291849..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/delete-table.md +++ /dev/null @@ -1,7 +0,0 @@ -DELETE /v1/databases/{databaseId}/grids/tables/{tableId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-column.md b/docs/examples/1.8.x/server-rest/examples/grids/get-column.md deleted file mode 100644 index 0888fb7273..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/get-column.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId}/columns/{key} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-database.md b/docs/examples/1.8.x/server-rest/examples/grids/get-database.md deleted file mode 100644 index 644f251f56..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/get-database.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-index.md b/docs/examples/1.8.x/server-rest/examples/grids/get-index.md deleted file mode 100644 index 3a9c1ae705..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/get-index.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId}/indexes/{key} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-row.md b/docs/examples/1.8.x/server-rest/examples/grids/get-row.md deleted file mode 100644 index ba3b87bee0..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/get-row.md +++ /dev/null @@ -1,7 +0,0 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-table.md b/docs/examples/1.8.x/server-rest/examples/grids/get-table.md deleted file mode 100644 index e562f5c763..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/get-table.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-rest/examples/grids/increment-row-column.md deleted file mode 100644 index 4501951530..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/increment-row-column.md +++ /dev/null @@ -1,11 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId}/{column}/increment HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "value": 0, - "max": 0 -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-columns.md b/docs/examples/1.8.x/server-rest/examples/grids/list-columns.md deleted file mode 100644 index 82859eaabd..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/list-columns.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId}/columns HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-databases.md b/docs/examples/1.8.x/server-rest/examples/grids/list-databases.md deleted file mode 100644 index 3b9530eec4..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/list-databases.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/grids/list-indexes.md deleted file mode 100644 index 847b2342fe..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/list-indexes.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId}/indexes HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/list-rows.md deleted file mode 100644 index d22624083f..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/list-rows.md +++ /dev/null @@ -1,7 +0,0 @@ -GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-tables.md b/docs/examples/1.8.x/server-rest/examples/grids/list-tables.md deleted file mode 100644 index d3a4230165..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/list-tables.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/grids/tables HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md deleted file mode 100644 index 4327743a81..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/boolean/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": false, - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-database.md b/docs/examples/1.8.x/server-rest/examples/grids/update-database.md deleted file mode 100644 index d57ad48927..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-database.md +++ /dev/null @@ -1,11 +0,0 @@ -PUT /v1/databases/{databaseId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "name": "<NAME>", - "enabled": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md deleted file mode 100644 index bbdc0c3bc4..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/datetime/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": , - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md deleted file mode 100644 index b9145a1c33..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/email/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": "email@example.com", - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md deleted file mode 100644 index 8d3d6c359f..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md +++ /dev/null @@ -1,13 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/enum/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "elements": [], - "required": false, - "default": "<DEFAULT>", - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md deleted file mode 100644 index 5e1a67c6a1..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md +++ /dev/null @@ -1,14 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/float/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "min": 0, - "max": 0, - "default": 0, - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md deleted file mode 100644 index f45fbf278f..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md +++ /dev/null @@ -1,14 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/integer/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "min": 0, - "max": 0, - "default": 0, - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md deleted file mode 100644 index 5080aaab25..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/ip/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": , - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md deleted file mode 100644 index d5d188ced4..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,11 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/{key}/relationship HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "onDelete": "cascade", - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-row.md b/docs/examples/1.8.x/server-rest/examples/grids/update-row.md deleted file mode 100644 index 015fa8faf1..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-row.md +++ /dev/null @@ -1,13 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - -{ - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/update-rows.md deleted file mode 100644 index eb5b77bb31..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-rows.md +++ /dev/null @@ -1,11 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "data": {}, - "queries": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md deleted file mode 100644 index eda416a4d9..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md +++ /dev/null @@ -1,13 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/string/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": "<DEFAULT>", - "size": 1, - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-table.md b/docs/examples/1.8.x/server-rest/examples/grids/update-table.md deleted file mode 100644 index 02d68944f9..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-table.md +++ /dev/null @@ -1,13 +0,0 @@ -PUT /v1/databases/{databaseId}/grids/tables/{tableId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "name": "<NAME>", - "permissions": ["read(\"any\")"], - "rowSecurity": false, - "enabled": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md deleted file mode 100644 index 4e0796887a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/url/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": "https://example.com", - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md deleted file mode 100644 index c461d7c981..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md +++ /dev/null @@ -1,13 +0,0 @@ -PUT /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - -{ - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md deleted file mode 100644 index 5d9446550f..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md +++ /dev/null @@ -1,10 +0,0 @@ -PUT /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "rows": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md index f0e27277b1..2acacb5a5f 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md @@ -1,5 +1,5 @@ GET /v1/health/anti-virus HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-cache.md b/docs/examples/1.8.x/server-rest/examples/health/get-cache.md index e0628a1b8a..c98dcf8af1 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-cache.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-cache.md @@ -1,5 +1,5 @@ GET /v1/health/cache HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md b/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md index 8928e8f25a..9f4f5efee4 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md @@ -1,5 +1,5 @@ GET /v1/health/certificate HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md b/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md index f636c9c8e7..9f1efb921b 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md @@ -1,5 +1,5 @@ GET /v1/health/db HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md index b9bfab3b73..b646b7923f 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md @@ -1,5 +1,5 @@ GET /v1/health/queue/failed/{name} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md index e9ab32729c..d28025f719 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md @@ -1,5 +1,5 @@ GET /v1/health/pubsub HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md index c3d9189a65..d51b4d60b3 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md @@ -1,5 +1,5 @@ GET /v1/health/queue/builds HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md index d70ee360a8..0f3c2f65fe 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md @@ -1,5 +1,5 @@ GET /v1/health/queue/certificates HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md index 60fc6db3b2..ccc72c3404 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md @@ -1,5 +1,5 @@ GET /v1/health/queue/databases HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md index 5a9ce59da3..a4c5e15586 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md @@ -1,5 +1,5 @@ GET /v1/health/queue/deletes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md index 854100e092..a28dbf921c 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md @@ -1,5 +1,5 @@ GET /v1/health/queue/functions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md index 9fa98f13f5..0c16e61757 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md @@ -1,5 +1,5 @@ GET /v1/health/queue/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md index 2bb61550bb..82b6151af1 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md @@ -1,5 +1,5 @@ GET /v1/health/queue/mails HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md index 5fd0f35919..6082ec41bd 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md @@ -1,5 +1,5 @@ GET /v1/health/queue/messaging HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md index 2832b1c980..c9687b3224 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md @@ -1,5 +1,5 @@ GET /v1/health/queue/migrations HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md index 6500b1f84c..90eefe75fc 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md @@ -1,5 +1,5 @@ GET /v1/health/queue/stats-resources HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md index 9c4e797f32..663d39dd2f 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md @@ -1,5 +1,5 @@ GET /v1/health/queue/stats-usage HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md index 4db6cf7d8c..0843ad174f 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md @@ -1,5 +1,5 @@ GET /v1/health/queue/webhooks HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md index 31c9b8725f..9047713439 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md @@ -1,5 +1,5 @@ GET /v1/health/storage/local HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-storage.md b/docs/examples/1.8.x/server-rest/examples/health/get-storage.md index 69c4ebd910..1d46ab179e 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-storage.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-storage.md @@ -1,5 +1,5 @@ GET /v1/health/storage HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-time.md b/docs/examples/1.8.x/server-rest/examples/health/get-time.md index 5396aac6fb..7661df5732 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-time.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-time.md @@ -1,5 +1,5 @@ GET /v1/health/time HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get.md b/docs/examples/1.8.x/server-rest/examples/health/get.md index b37e30c4f8..c64b480826 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get.md @@ -1,5 +1,5 @@ GET /v1/health HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/get.md b/docs/examples/1.8.x/server-rest/examples/locale/get.md index 6c60c076b6..7b300acb41 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/get.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/get.md @@ -1,6 +1,6 @@ GET /v1/locale HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md b/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md index 3cc2aa9939..336ac1477f 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md @@ -1,6 +1,6 @@ GET /v1/locale/codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md b/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md index 8d2b0fa19d..d99b138653 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md @@ -1,6 +1,6 @@ GET /v1/locale/continents HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md index ae341f5982..3c94877234 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md @@ -1,6 +1,6 @@ GET /v1/locale/countries/eu HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md index 9d59f37a19..09619edb36 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md @@ -1,6 +1,6 @@ GET /v1/locale/countries/phones HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md index 19205d538d..0f1be7e5df 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md @@ -1,6 +1,6 @@ GET /v1/locale/countries HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md index fbf6d63496..c1e03ecae2 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md @@ -1,6 +1,6 @@ GET /v1/locale/currencies HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md b/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md index 7f1304d6ff..1e2a125985 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md @@ -1,6 +1,6 @@ GET /v1/locale/languages HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md index 47d3b98615..b6860358c1 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/apns HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md index b6c1392bb2..efec44982c 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md @@ -1,7 +1,7 @@ POST /v1/messaging/messages/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md index f234c80e6e..ec885465a7 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/fcm HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md index fd138606e2..8d0eb33938 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/mailgun HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md index edbd690d5d..2877ff7b89 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/msg91 HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md index 08ba0357fe..6210273820 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md @@ -1,7 +1,7 @@ POST /v1/messaging/messages/push HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md index 3fa7ee8dd8..a9f7c933dc 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/sendgrid HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md index 82926e2a82..f885563f6f 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md @@ -1,7 +1,7 @@ POST /v1/messaging/messages/sms HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md index 5963ee474c..bbb8e7d212 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/smtp HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md index e22a626ac4..2e61d50b5c 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md @@ -1,7 +1,7 @@ POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md index a474db823f..198ccae6f5 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/telesign HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md index caa7bcd014..2f2ce558a7 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/textmagic HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md index 9974584212..a44af2764d 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md @@ -1,7 +1,7 @@ POST /v1/messaging/topics HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md index e612eed8be..61fd63b52e 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/twilio HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md index fdd66526a9..16d1c6b594 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/vonage HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md index cfd1ff3b30..e25c3dcc1c 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/providers/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md index 8226237777..b988897d60 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md index d340209e93..3c5c8a9cdb 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/topics/{topicId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete.md index e076c96ebf..a918c2b6f8 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/messages/{messageId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md index ef9ef2c8df..abe744e9c7 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md @@ -1,5 +1,5 @@ GET /v1/messaging/messages/{messageId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md index 361d634760..0d2ffe4eaa 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md @@ -1,5 +1,5 @@ GET /v1/messaging/providers/{providerId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md index c01c5876ac..a1629d4546 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md index df5256f5e3..5d7efd06de 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics/{topicId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md index d8c982e7ea..066970a9fb 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md @@ -1,5 +1,5 @@ GET /v1/messaging/messages/{messageId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md index 88964162e3..03a286c376 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md @@ -1,5 +1,5 @@ GET /v1/messaging/messages HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md index 46c0f76a10..562264f48e 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md @@ -1,5 +1,5 @@ GET /v1/messaging/providers/{providerId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md index e454b3101b..43522ee34f 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md @@ -1,5 +1,5 @@ GET /v1/messaging/providers HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md index 7fb1192035..f403362529 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md @@ -1,5 +1,5 @@ GET /v1/messaging/subscribers/{subscriberId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md index 06f67c27c1..a357f9dc3d 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md index 7c793cfae0..0b4f8caf6f 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md @@ -1,5 +1,5 @@ GET /v1/messaging/messages/{messageId}/targets HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md index e371aeb2b5..80073b2165 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics/{topicId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md index 9f18e14b70..2835277aeb 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md index a55c593039..a398b186cb 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/apns/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md index 97f3911ed1..0ef5b89409 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/messages/email/{messageId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md index d485981c5b..50e3a5400d 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/fcm/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md index ec132692c5..f05f0057e7 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/mailgun/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md index 1013915e5d..1c88425fc1 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/msg91/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md index 438ef373e5..adf269301c 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/messages/push/{messageId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md index fd30512320..28ffb526f8 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/sendgrid/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md index a917e270f7..b5ad82d0f9 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/messages/sms/{messageId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md index 9fc45d6726..8e69659ce1 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/smtp/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md index 919e99577e..548d39dc92 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/telesign/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md index 94f965c44a..724b0a4afe 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/textmagic/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md index 75644d9828..add0bf8ee4 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/topics/{topicId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md index 41d04c0c14..38730383b1 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/twilio/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md index 0344691e51..8c284c827f 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/vonage/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md index 669ac50a75..554d2a5365 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> Content-Length: *Length of your entity body in bytes* diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md index dbee572372..3da246715b 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments/duplicate HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md index 3b21f4f754..e37819bfb2 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments/template HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md index c34be9d619..73217d198c 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/variables HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md index 2e466da0f6..7d5fd3e92e 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments/vcs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create.md b/docs/examples/1.8.x/server-rest/examples/sites/create.md index 52b4d87219..5493e9d2b6 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create.md @@ -1,7 +1,7 @@ POST /v1/sites HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md index 3df6aca50f..35bac59efc 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md @@ -1,7 +1,7 @@ DELETE /v1/sites/{siteId}/deployments/{deploymentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md index af1d1c339a..0bd2f661cf 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md @@ -1,7 +1,7 @@ DELETE /v1/sites/{siteId}/logs/{logId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md index 008ab4b190..c3f1d2d293 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md @@ -1,7 +1,7 @@ DELETE /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete.md b/docs/examples/1.8.x/server-rest/examples/sites/delete.md index 0657fff9ef..cdb4ced577 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete.md @@ -1,7 +1,7 @@ DELETE /v1/sites/{siteId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md index 3ce065f600..d81a7dfc56 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md @@ -1,6 +1,6 @@ GET /v1/sites/{siteId}/deployments/{deploymentId}/download HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md index 2ad95813d9..381c20db77 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/deployments/{deploymentId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-log.md b/docs/examples/1.8.x/server-rest/examples/sites/get-log.md index 41dd30dc8f..6b8366461e 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get-log.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-log.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/logs/{logId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md index c6d5e70211..7c9703ef88 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get.md b/docs/examples/1.8.x/server-rest/examples/sites/get.md index da7b67883f..f13b46ecab 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md index 0bc5467894..22512f809d 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/deployments HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md index 8c5f7ff318..0007a7cd78 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md @@ -1,5 +1,5 @@ GET /v1/sites/frameworks HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md b/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md index 57b35c4ef5..7e77b7e755 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md index cf31760070..17e8d281c6 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md @@ -1,5 +1,5 @@ GET /v1/sites/specifications HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md b/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md index 7e12fdfd02..4f99a74984 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/variables HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list.md b/docs/examples/1.8.x/server-rest/examples/sites/list.md index dc4dc3695f..d1800f05e5 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list.md @@ -1,5 +1,5 @@ GET /v1/sites HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md index d4f251c20f..697d9ac371 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md @@ -1,7 +1,7 @@ PATCH /v1/sites/{siteId}/deployments/{deploymentId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md index c288b2bf00..51d8736df5 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md @@ -1,7 +1,7 @@ PATCH /v1/sites/{siteId}/deployment HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md index c7fe824ac4..61902ee02f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md @@ -1,7 +1,7 @@ PUT /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update.md b/docs/examples/1.8.x/server-rest/examples/sites/update.md index 370984721f..ab3c4dddd1 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/update.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/update.md @@ -1,7 +1,7 @@ PUT /v1/sites/{siteId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md index 59f1c4f403..8ca9c5701b 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/create-file.md b/docs/examples/1.8.x/server-rest/examples/storage/create-file.md index 086fd6dc72..e8a54e723b 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/create-file.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md index d6083186de..3db8bfbb72 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md @@ -1,7 +1,7 @@ DELETE /v1/storage/buckets/{bucketId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md b/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md index 467fdf96d1..cc8a2481f7 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md @@ -1,7 +1,7 @@ DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md index 2ad1e577c5..b7def1d44b 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md @@ -1,5 +1,5 @@ GET /v1/storage/buckets/{bucketId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md index af382d3a9a..4d9c691ba9 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md index e00f0ff76f..e8a1bdeedf 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md index 79f47dcabc..d41b8a3512 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file.md index 4a479a78fc..e11aaa9f05 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-file.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md index bd61c61082..3061208d75 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md @@ -1,5 +1,5 @@ GET /v1/storage/buckets HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/list-files.md b/docs/examples/1.8.x/server-rest/examples/storage/list-files.md index b040ad3a65..7cf8616335 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/list-files.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/list-files.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md index 0f966da0b5..adf12647e2 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md @@ -1,7 +1,7 @@ PUT /v1/storage/buckets/{bucketId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/update-file.md b/docs/examples/1.8.x/server-rest/examples/storage/update-file.md index 1b0137a7de..d91ab4c2d6 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/update-file.md @@ -1,7 +1,7 @@ PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md index 773208cb45..f52f796d90 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md @@ -1,7 +1,7 @@ POST /v1/teams/{teamId}/memberships HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/create.md b/docs/examples/1.8.x/server-rest/examples/teams/create.md index 2e1881b5ff..27e7429464 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/create.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/create.md @@ -1,7 +1,7 @@ POST /v1/teams HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md index 454a3f6f4a..e897d84a12 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md @@ -1,7 +1,7 @@ DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/delete.md b/docs/examples/1.8.x/server-rest/examples/teams/delete.md index 1bdf2a89ac..213489c7fb 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/delete.md @@ -1,7 +1,7 @@ DELETE /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md index 8a90498292..1d10cfe437 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md index e541fd3fd8..ddb863181d 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get.md b/docs/examples/1.8.x/server-rest/examples/teams/get.md index 491e04dc55..4ecf74596b 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/get.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/get.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md index 9b0fa00492..38cc17b71a 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/memberships HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/list.md b/docs/examples/1.8.x/server-rest/examples/teams/list.md index 95b6178e31..c67b429008 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/list.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/list.md @@ -1,6 +1,6 @@ GET /v1/teams HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md index da2c9189cd..9d828118f0 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md @@ -1,7 +1,7 @@ PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md index a5b8c28723..6730d5c27c 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md @@ -1,7 +1,7 @@ PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-name.md b/docs/examples/1.8.x/server-rest/examples/teams/update-name.md index 1d32b77d39..fa811a2438 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/update-name.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-name.md @@ -1,7 +1,7 @@ PUT /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md index e17dcdb260..1db6300350 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md @@ -1,7 +1,7 @@ PUT /v1/teams/{teamId}/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md index 3d884e2c5d..c1fbb63d2d 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md @@ -1,7 +1,7 @@ POST /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/delete.md b/docs/examples/1.8.x/server-rest/examples/tokens/delete.md index a955b4aef5..ee564b01c4 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/delete.md @@ -1,7 +1,7 @@ DELETE /v1/tokens/{tokenId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/get.md b/docs/examples/1.8.x/server-rest/examples/tokens/get.md index 381945f58f..b39c8390e3 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/get.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/get.md @@ -1,5 +1,5 @@ GET /v1/tokens/{tokenId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/list.md b/docs/examples/1.8.x/server-rest/examples/tokens/list.md index 3b0782a81a..8909d05572 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/list.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/list.md @@ -1,5 +1,5 @@ GET /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/update.md b/docs/examples/1.8.x/server-rest/examples/tokens/update.md index ab58a4842a..8ab9d60555 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/update.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/update.md @@ -1,7 +1,7 @@ PATCH /v1/tokens/{tokenId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md index 4985ecefd0..d557cf6d5f 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md @@ -1,7 +1,7 @@ POST /v1/users/argon2 HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md index eaf1628252..cda7491160 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md @@ -1,7 +1,7 @@ POST /v1/users/bcrypt HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md index 8342089042..83208adadb 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md @@ -1,7 +1,7 @@ POST /v1/users/{userId}/jwts HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md index 6e82969f00..d4896133a1 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md @@ -1,7 +1,7 @@ POST /v1/users/md5 HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md index bef314b585..2f6524646d 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md index b75c9e23c5..4c10b1a82d 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md @@ -1,7 +1,7 @@ POST /v1/users/phpass HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md index 7757b44500..5c6467a2fe 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md @@ -1,7 +1,7 @@ POST /v1/users/sha HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md index 9fb5f8de0f..19d0650840 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md @@ -1,7 +1,7 @@ POST /v1/users/scrypt-modified HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md index ee8828f294..008eab6848 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md @@ -1,7 +1,7 @@ POST /v1/users/scrypt HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-session.md b/docs/examples/1.8.x/server-rest/examples/users/create-session.md index 955e253d39..ec71d421e0 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-session.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-session.md @@ -1,7 +1,7 @@ POST /v1/users/{userId}/sessions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-target.md b/docs/examples/1.8.x/server-rest/examples/users/create-target.md index 08147220b2..fced935c1b 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-target.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-target.md @@ -1,7 +1,7 @@ POST /v1/users/{userId}/targets HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-token.md b/docs/examples/1.8.x/server-rest/examples/users/create-token.md index 2d3b58435a..4339252660 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-token.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-token.md @@ -1,7 +1,7 @@ POST /v1/users/{userId}/tokens HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create.md b/docs/examples/1.8.x/server-rest/examples/users/create.md index b638e6511e..67d377255b 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create.md @@ -1,7 +1,7 @@ POST /v1/users HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md b/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md index a9b2cd04f6..c2aa5eed16 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md @@ -1,7 +1,7 @@ DELETE /v1/users/identities/{identityId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md index 92d51fefb5..9d9e2e950f 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId}/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-session.md b/docs/examples/1.8.x/server-rest/examples/users/delete-session.md index 1ae56081ab..be204911a2 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-session.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-session.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId}/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md index f620f1addc..54f3a8d4f1 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId}/sessions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-target.md b/docs/examples/1.8.x/server-rest/examples/users/delete-target.md index 4ea75b979b..77e2c23dd8 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-target.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-target.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId}/targets/{targetId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete.md b/docs/examples/1.8.x/server-rest/examples/users/delete.md index be2533f442..c31212aa71 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md index 1f561f02ad..58dd32d2a4 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md index 4d55589a73..ac04cc5c44 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-target.md b/docs/examples/1.8.x/server-rest/examples/users/get-target.md index 3613d7acb6..2f19db7c7a 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/get-target.md +++ b/docs/examples/1.8.x/server-rest/examples/users/get-target.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/targets/{targetId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get.md b/docs/examples/1.8.x/server-rest/examples/users/get.md index 53357720cf..f654676d9b 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/get.md +++ b/docs/examples/1.8.x/server-rest/examples/users/get.md @@ -1,5 +1,5 @@ GET /v1/users/{userId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-identities.md b/docs/examples/1.8.x/server-rest/examples/users/list-identities.md index 40eed8beec..180a2127a4 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-identities.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-identities.md @@ -1,5 +1,5 @@ GET /v1/users/identities HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-logs.md b/docs/examples/1.8.x/server-rest/examples/users/list-logs.md index 526615b80f..7149f50abe 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-logs.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md b/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md index 24de2cdc59..7d32f2f726 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/memberships HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md index eb2d3691de..a75b26e1c5 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/mfa/factors HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md b/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md index 33efecd536..1ef39b835b 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/sessions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-targets.md b/docs/examples/1.8.x/server-rest/examples/users/list-targets.md index 229559c958..e9542c0da0 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-targets.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-targets.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/targets HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list.md b/docs/examples/1.8.x/server-rest/examples/users/list.md index 2938255449..a92f71439b 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list.md @@ -1,5 +1,5 @@ GET /v1/users HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md index 1db5556964..cf65c72b0c 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-email.md b/docs/examples/1.8.x/server-rest/examples/users/update-email.md index 48d871d8d4..10ccafb079 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-email.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-email.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-labels.md b/docs/examples/1.8.x/server-rest/examples/users/update-labels.md index d6acca5c7a..f01603f1f4 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-labels.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-labels.md @@ -1,7 +1,7 @@ PUT /v1/users/{userId}/labels HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md index 91e657aec7..aa3bb3f6e6 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md @@ -1,7 +1,7 @@ PUT /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md b/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md index 8a5d1f5052..fce9198887 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/mfa HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-name.md b/docs/examples/1.8.x/server-rest/examples/users/update-name.md index ae1472387a..c8988dfb1d 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-name.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-name.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/name HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-password.md b/docs/examples/1.8.x/server-rest/examples/users/update-password.md index 40220f80d5..fb796d5619 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-password.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-password.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/password HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md index 837874a1e2..ca3958605b 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-phone.md b/docs/examples/1.8.x/server-rest/examples/users/update-phone.md index a36f0cc656..5bc196d668 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-phone.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-phone.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md index 5de942c081..1db82743e8 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-status.md b/docs/examples/1.8.x/server-rest/examples/users/update-status.md index 95e29fb66e..6d07f2e15f 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-status.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-status.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-target.md b/docs/examples/1.8.x/server-rest/examples/users/update-target.md index c5f92f342e..926fb166a4 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-target.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-target.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/targets/{targetId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md index e6831084a1..ce8dea79ef 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md @@ -4,8 +4,9 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_session('') # The user session to authenticate with + .set_key('<YOUR_API_KEY>') # Your secret API key + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token databases = Databases.new(client) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md index 16abc5e465..ecccdf5b21 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md @@ -4,7 +4,7 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_admin('') # .set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases.new(client) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md index 238081864f..d165e1e6cd 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md @@ -4,15 +4,14 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_session('') # The user session to authenticate with + .set_key('<YOUR_API_KEY>') # Your secret API key + .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token databases = Databases.new(client) result = databases.upsert_document( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', - document_id: '<DOCUMENT_ID>', - data: {}, - permissions: ["read("any")"] # optional + document_id: '<DOCUMENT_ID>' ) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md index 30c42aa439..8e404e684e 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md @@ -4,13 +4,12 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_admin('') # .set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases.new(client) result = databases.upsert_documents( database_id: '<DATABASE_ID>', - collection_id: '<COLLECTION_ID>', - documents: [] + collection_id: '<COLLECTION_ID>' ) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md index 666b995d77..b64b1d5c57 100644 --- a/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md @@ -16,5 +16,5 @@ result = functions.create_execution( path: '<PATH>', # optional method: ExecutionMethod::GET, # optional headers: {}, # optional - scheduled_at: '<SCHEDULED_AT>' # optional + scheduled_at: '' # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md deleted file mode 100644 index 592f6028aa..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_boolean_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: false, # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-database.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-database.md deleted file mode 100644 index db94d2386e..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-database.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_database( - database_id: '<DATABASE_ID>', - name: '<NAME>', - enabled: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md deleted file mode 100644 index 4bc97b94ae..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_datetime_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md deleted file mode 100644 index 4a1687d405..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_email_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: 'email@example.com', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md deleted file mode 100644 index 2a9b6de5de..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_enum_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - elements: [], - required: false, - default: '<DEFAULT>', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md deleted file mode 100644 index 0cd3bee568..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_float_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - min: null, # optional - max: null, # optional - default: null, # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-index.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-index.md deleted file mode 100644 index 7ef4c2c790..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite -include Appwrite::Enums - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_index( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - type: IndexType::KEY, - columns: [], - orders: [], # optional - lengths: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md deleted file mode 100644 index ae7c416965..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_integer_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - min: null, # optional - max: null, # optional - default: null, # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md deleted file mode 100644 index e407abaee8..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_ip_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md deleted file mode 100644 index 3aecd5757d..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,22 +0,0 @@ -require 'appwrite' - -include Appwrite -include Appwrite::Enums - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_relationship_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - related_table_id: '<RELATED_TABLE_ID>', - type: RelationshipType::ONETOONE, - two_way: false, # optional - key: '', # optional - two_way_key: '', # optional - on_delete: RelationMutate::CASCADE # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-row.md deleted file mode 100644 index 4c4433bd10..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -grids = Grids.new(client) - -result = grids.create_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - data: {}, - permissions: ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md deleted file mode 100644 index 1e619d25ce..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - rows: [] -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md deleted file mode 100644 index 7808c6cfa2..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_string_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - size: 1, - required: false, - default: '<DEFAULT>', # optional - array: false, # optional - encrypt: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-table.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-table.md deleted file mode 100644 index ef3bc4b5cf..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-table.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_table( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], # optional - row_security: false, # optional - enabled: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md deleted file mode 100644 index 55ff12a1c0..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.create_url_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: 'https://example.com', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md deleted file mode 100644 index fcbc6efedc..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.decrement_row_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - column: '', - value: null, # optional - min: null # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md deleted file mode 100644 index 79cf84f3fd..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.delete_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md deleted file mode 100644 index 54d3660b9f..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.delete_database( - database_id: '<DATABASE_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md deleted file mode 100644 index 3968cfb675..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.delete_index( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md deleted file mode 100644 index 183f02c5d3..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -grids = Grids.new(client) - -result = grids.delete_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md deleted file mode 100644 index 560d63b033..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.delete_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md deleted file mode 100644 index d0c15da17c..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.delete_table( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-column.md deleted file mode 100644 index 6288772e65..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/get-column.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.get_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-database.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-database.md deleted file mode 100644 index 49a5cde300..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/get-database.md +++ /dev/null @@ -1,14 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.get_database( - database_id: '<DATABASE_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-index.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-index.md deleted file mode 100644 index 78a923c0ff..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/get-index.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.get_index( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-row.md deleted file mode 100644 index e8dc2cb6b1..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/get-row.md +++ /dev/null @@ -1,17 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -grids = Grids.new(client) - -result = grids.get_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-table.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-table.md deleted file mode 100644 index bafdfe1140..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/get-table.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.get_table( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md deleted file mode 100644 index d09f72080c..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.increment_row_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - column: '', - value: null, # optional - max: null # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md deleted file mode 100644 index 343775300b..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.list_columns( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md deleted file mode 100644 index 21e54951ee..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.list_databases( - queries: [], # optional - search: '<SEARCH>' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md deleted file mode 100644 index 2229c87249..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.list_indexes( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md deleted file mode 100644 index 40b7be88a7..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -grids = Grids.new(client) - -result = grids.list_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md deleted file mode 100644 index 69b213d3f3..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.list_tables( - database_id: '<DATABASE_ID>', - queries: [], # optional - search: '<SEARCH>' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md deleted file mode 100644 index 78055c777f..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_boolean_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: false, - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-database.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-database.md deleted file mode 100644 index 79216c3fd3..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-database.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_database( - database_id: '<DATABASE_ID>', - name: '<NAME>', - enabled: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md deleted file mode 100644 index 1737c5a020..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_datetime_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md deleted file mode 100644 index bc1f4cd7b6..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_email_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: 'email@example.com', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md deleted file mode 100644 index 5012002e29..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_enum_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - elements: [], - required: false, - default: '<DEFAULT>', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md deleted file mode 100644 index e05037f10c..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_float_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: null, - min: null, # optional - max: null, # optional - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md deleted file mode 100644 index 3ec34bd2f2..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_integer_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: null, - min: null, # optional - max: null, # optional - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md deleted file mode 100644 index 5394075ae5..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_ip_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md deleted file mode 100644 index 2c730048de..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,18 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_relationship_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - on_delete: RelationMutate::CASCADE, # optional - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-row.md deleted file mode 100644 index 57dd5cd381..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -grids = Grids.new(client) - -result = grids.update_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - data: {}, # optional - permissions: ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md deleted file mode 100644 index 602670d67f..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - data: {}, # optional - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md deleted file mode 100644 index 09de9ba697..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_string_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '<DEFAULT>', - size: 1, # optional - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-table.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-table.md deleted file mode 100644 index 742a0c9829..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-table.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_table( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], # optional - row_security: false, # optional - enabled: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md deleted file mode 100644 index fc3f055708..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.update_url_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: 'https://example.com', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md deleted file mode 100644 index 2cf50d92d9..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md +++ /dev/null @@ -1,18 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -grids = Grids.new(client) - -result = grids.upsert_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - data: {}, # optional - permissions: ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md deleted file mode 100644 index af3a7e1dbf..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -grids = Grids.new(client) - -result = grids.upsert_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - rows: [] -) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-document.md b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md index daeaf144e1..4ee21048ab 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md @@ -2,8 +2,9 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token let databases = Databases(client) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md index 2e992d9e3a..e4f8582f49 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md @@ -2,7 +2,7 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setAdmin("") // .setKey("<YOUR_API_KEY>") // Your secret API key let databases = Databases(client) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md index e78bd458a0..9c9684e42d 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md @@ -2,16 +2,15 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with + .setKey("<YOUR_API_KEY>") // Your secret API key + .setJWT("<YOUR_JWT>") // Your secret JSON Web Token let databases = Databases(client) let document = try await databases.upsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>", - data: [:], - permissions: ["read("any")"] // optional + documentId: "<DOCUMENT_ID>" ) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md index 544f02f9c0..e63b9a3e67 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md @@ -2,14 +2,13 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setAdmin("") // .setKey("<YOUR_API_KEY>") // Your secret API key let databases = Databases(client) let documentList = try await databases.upsertDocuments( databaseId: "<DATABASE_ID>", - collectionId: "<COLLECTION_ID>", - documents: [] + collectionId: "<COLLECTION_ID>" ) diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md b/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md index 46c9d69087..aae7a0f52f 100644 --- a/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md @@ -15,6 +15,6 @@ let execution = try await functions.createExecution( path: "<PATH>", // optional method: .gET, // optional headers: [:], // optional - scheduledAt: "<SCHEDULED_AT>" // optional + scheduledAt: "" // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md deleted file mode 100644 index 4d0a226eb2..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnBoolean = try await grids.createBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-database.md b/docs/examples/1.8.x/server-swift/examples/grids/create-database.md deleted file mode 100644 index 75ec62df4b..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-database.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let database = try await grids.createDatabase( - databaseId: "<DATABASE_ID>", - name: "<NAME>", - enabled: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md deleted file mode 100644 index 8271b44c9f..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnDatetime = try await grids.createDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md deleted file mode 100644 index ca99534c78..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnEmail = try await grids.createEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md deleted file mode 100644 index 3d52e94a96..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnEnum = try await grids.createEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: [], - required: false, - default: "<DEFAULT>", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md deleted file mode 100644 index f0abdc7b9f..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnFloat = try await grids.createFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, // optional - max: 0, // optional - default: 0, // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-index.md b/docs/examples/1.8.x/server-swift/examples/grids/create-index.md deleted file mode 100644 index 2d0c1272b2..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-index.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite -import AppwriteEnums - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnIndex = try await grids.createIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - type: .key, - columns: [], - orders: [], // optional - lengths: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md deleted file mode 100644 index dca7968bfb..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnInteger = try await grids.createIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, // optional - max: 0, // optional - default: 0, // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md deleted file mode 100644 index 9517ed960f..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnIp = try await grids.createIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md deleted file mode 100644 index 1ead20f97d..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import Appwrite -import AppwriteEnums - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnRelationship = try await grids.createRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - relatedTableId: "<RELATED_TABLE_ID>", - type: .oneToOne, - twoWay: false, // optional - key: "", // optional - twoWayKey: "", // optional - onDelete: .cascade // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-row.md b/docs/examples/1.8.x/server-swift/examples/grids/create-row.md deleted file mode 100644 index 9d042b4034..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let grids = Grids(client) - -let row = try await grids.createRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/create-rows.md deleted file mode 100644 index 3e1aced6e7..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let rowList = try await grids.createRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: [] -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md deleted file mode 100644 index 74eea86fe4..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnString = try await grids.createStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - size: 1, - required: false, - default: "<DEFAULT>", // optional - array: false, // optional - encrypt: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-table.md b/docs/examples/1.8.x/server-swift/examples/grids/create-table.md deleted file mode 100644 index 3792c0aee4..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-table.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let table = try await grids.createTable( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md deleted file mode 100644 index 7ea729aa1a..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnUrl = try await grids.createUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md deleted file mode 100644 index 9445843d71..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let row = try await grids.decrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, // optional - min: 0 // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-column.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-column.md deleted file mode 100644 index b58a4d0890..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/delete-column.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let result = try await grids.deleteColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-database.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-database.md deleted file mode 100644 index e7600d7726..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/delete-database.md +++ /dev/null @@ -1,13 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let result = try await grids.deleteDatabase( - databaseId: "<DATABASE_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-index.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-index.md deleted file mode 100644 index d83cd551da..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/delete-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let result = try await grids.deleteIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-row.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-row.md deleted file mode 100644 index d2d77234a3..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let grids = Grids(client) - -let result = try await grids.deleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md deleted file mode 100644 index 6a3f145526..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let rowList = try await grids.deleteRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-table.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-table.md deleted file mode 100644 index 8abdfcae2d..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/delete-table.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let result = try await grids.deleteTable( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-column.md b/docs/examples/1.8.x/server-swift/examples/grids/get-column.md deleted file mode 100644 index 68c0d3933d..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/get-column.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let result = try await grids.getColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-database.md b/docs/examples/1.8.x/server-swift/examples/grids/get-database.md deleted file mode 100644 index f3936ae4ba..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/get-database.md +++ /dev/null @@ -1,13 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let database = try await grids.getDatabase( - databaseId: "<DATABASE_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-index.md b/docs/examples/1.8.x/server-swift/examples/grids/get-index.md deleted file mode 100644 index 24c3be9e27..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/get-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnIndex = try await grids.getIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-row.md b/docs/examples/1.8.x/server-swift/examples/grids/get-row.md deleted file mode 100644 index 4d3e53cba6..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let grids = Grids(client) - -let row = try await grids.getRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-table.md b/docs/examples/1.8.x/server-swift/examples/grids/get-table.md deleted file mode 100644 index 9ad5e0c202..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/get-table.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let table = try await grids.getTable( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md deleted file mode 100644 index 00d9663c22..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let row = try await grids.incrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, // optional - max: 0 // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-columns.md b/docs/examples/1.8.x/server-swift/examples/grids/list-columns.md deleted file mode 100644 index facf87f9a3..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/list-columns.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnList = try await grids.listColumns( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-databases.md b/docs/examples/1.8.x/server-swift/examples/grids/list-databases.md deleted file mode 100644 index 26d50a24b1..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/list-databases.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let databaseList = try await grids.listDatabases( - queries: [], // optional - search: "<SEARCH>" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md deleted file mode 100644 index c31f162d5d..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnIndexList = try await grids.listIndexes( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/list-rows.md deleted file mode 100644 index 01dd6637fc..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let grids = Grids(client) - -let rowList = try await grids.listRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-tables.md b/docs/examples/1.8.x/server-swift/examples/grids/list-tables.md deleted file mode 100644 index af8cdd1264..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/list-tables.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let tableList = try await grids.listTables( - databaseId: "<DATABASE_ID>", - queries: [], // optional - search: "<SEARCH>" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md deleted file mode 100644 index 8994b79e7c..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnBoolean = try await grids.updateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-database.md b/docs/examples/1.8.x/server-swift/examples/grids/update-database.md deleted file mode 100644 index 827245bd97..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-database.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let database = try await grids.updateDatabase( - databaseId: "<DATABASE_ID>", - name: "<NAME>", - enabled: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md deleted file mode 100644 index 7a59cd1ef1..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnDatetime = try await grids.updateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md deleted file mode 100644 index 3704401fa5..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnEmail = try await grids.updateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md deleted file mode 100644 index 946804a88c..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnEnum = try await grids.updateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: [], - required: false, - default: "<DEFAULT>", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md deleted file mode 100644 index 10f0babb2c..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnFloat = try await grids.updateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, // optional - max: 0, // optional - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md deleted file mode 100644 index 60e145e3b0..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnInteger = try await grids.updateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, // optional - max: 0, // optional - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md deleted file mode 100644 index 17f490d644..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnIp = try await grids.updateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md deleted file mode 100644 index 994feefa92..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite -import AppwriteEnums - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnRelationship = try await grids.updateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - onDelete: .cascade, // optional - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-row.md b/docs/examples/1.8.x/server-swift/examples/grids/update-row.md deleted file mode 100644 index 3e4408f700..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let grids = Grids(client) - -let row = try await grids.updateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], // optional - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/update-rows.md deleted file mode 100644 index c57463cc8a..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let rowList = try await grids.updateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - data: [:], // optional - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md deleted file mode 100644 index e9e2d71c62..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnString = try await grids.updateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "<DEFAULT>", - size: 1, // optional - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-table.md b/docs/examples/1.8.x/server-swift/examples/grids/update-table.md deleted file mode 100644 index 8b3fa5e12e..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-table.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let table = try await grids.updateTable( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md deleted file mode 100644 index b72666e240..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let columnUrl = try await grids.updateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md deleted file mode 100644 index 1d09e7b767..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let grids = Grids(client) - -let row = try await grids.upsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], // optional - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md deleted file mode 100644 index 84173c9c0f..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let grids = Grids(client) - -let rowList = try await grids.upsertRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: [] -) - From 0f7d06b4d52b0ed59d5c02694742c479a5a822d6 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Mon, 28 Jul 2025 11:50:08 +0530 Subject: [PATCH 307/362] reset: docs for easier review. --- docs/references/{grids => databases}/create-boolean-column.md | 0 docs/references/{grids => databases}/create-datetime-column.md | 0 docs/references/{grids => databases}/create-email-column.md | 0 docs/references/{grids => databases}/create-enum-column.md | 0 docs/references/{grids => databases}/create-float-column.md | 0 docs/references/{grids => databases}/create-integer-column.md | 0 docs/references/{grids => databases}/create-ip-column.md | 0 .../{grids => databases}/create-relationship-column.md | 0 docs/references/{grids => databases}/create-row.md | 0 docs/references/{grids => databases}/create-rows.md | 0 docs/references/{grids => databases}/create-string-column.md | 0 docs/references/{grids => databases}/create-table.md | 0 docs/references/{grids => databases}/create-url-column.md | 0 docs/references/{grids => databases}/decrement-row-column.md | 0 docs/references/{grids => databases}/delete-column.md | 0 docs/references/{grids => databases}/delete-row.md | 0 docs/references/{grids => databases}/delete-rows.md | 0 docs/references/{grids => databases}/delete-table.md | 0 docs/references/{grids => databases}/get-column.md | 0 docs/references/{grids => databases}/get-row-logs.md | 0 docs/references/{grids => databases}/get-row.md | 0 docs/references/{grids => databases}/get-table-logs.md | 0 docs/references/{grids => databases}/get-table-usage.md | 0 docs/references/{grids => databases}/get-table.md | 0 docs/references/{grids => databases}/increment-row-column.md | 0 docs/references/{grids => databases}/list-columns.md | 0 docs/references/{grids => databases}/list-rows.md | 0 docs/references/{grids => databases}/list-tables.md | 0 docs/references/{grids => databases}/update-boolean-column.md | 0 docs/references/{grids => databases}/update-datetime-column.md | 0 docs/references/{grids => databases}/update-email-column.md | 0 docs/references/{grids => databases}/update-enum-column.md | 0 docs/references/{grids => databases}/update-float-column.md | 0 docs/references/{grids => databases}/update-integer-column.md | 0 docs/references/{grids => databases}/update-ip-column.md | 0 .../{grids => databases}/update-relationship-column.md | 0 docs/references/{grids => databases}/update-row.md | 0 docs/references/{grids => databases}/update-rows.md | 0 docs/references/{grids => databases}/update-string-column.md | 0 docs/references/{grids => databases}/update-table.md | 0 docs/references/{grids => databases}/update-url-column.md | 0 docs/references/{grids => databases}/upsert-row.md | 0 docs/references/{grids => databases}/upsert-rows.md | 0 docs/references/grids/create-database.md | 1 - docs/references/grids/create-index.md | 2 -- docs/references/grids/delete-database.md | 1 - docs/references/grids/delete-index.md | 1 - docs/references/grids/get-database-usage.md | 1 - docs/references/grids/get-database.md | 1 - docs/references/grids/get-index.md | 1 - docs/references/grids/get-logs.md | 1 - docs/references/grids/list-database-usage.md | 1 - docs/references/grids/list-databases.md | 1 - docs/references/grids/list-indexes.md | 1 - docs/references/grids/update-database.md | 1 - 55 files changed, 13 deletions(-) rename docs/references/{grids => databases}/create-boolean-column.md (100%) rename docs/references/{grids => databases}/create-datetime-column.md (100%) rename docs/references/{grids => databases}/create-email-column.md (100%) rename docs/references/{grids => databases}/create-enum-column.md (100%) rename docs/references/{grids => databases}/create-float-column.md (100%) rename docs/references/{grids => databases}/create-integer-column.md (100%) rename docs/references/{grids => databases}/create-ip-column.md (100%) rename docs/references/{grids => databases}/create-relationship-column.md (100%) rename docs/references/{grids => databases}/create-row.md (100%) rename docs/references/{grids => databases}/create-rows.md (100%) rename docs/references/{grids => databases}/create-string-column.md (100%) rename docs/references/{grids => databases}/create-table.md (100%) rename docs/references/{grids => databases}/create-url-column.md (100%) rename docs/references/{grids => databases}/decrement-row-column.md (100%) rename docs/references/{grids => databases}/delete-column.md (100%) rename docs/references/{grids => databases}/delete-row.md (100%) rename docs/references/{grids => databases}/delete-rows.md (100%) rename docs/references/{grids => databases}/delete-table.md (100%) rename docs/references/{grids => databases}/get-column.md (100%) rename docs/references/{grids => databases}/get-row-logs.md (100%) rename docs/references/{grids => databases}/get-row.md (100%) rename docs/references/{grids => databases}/get-table-logs.md (100%) rename docs/references/{grids => databases}/get-table-usage.md (100%) rename docs/references/{grids => databases}/get-table.md (100%) rename docs/references/{grids => databases}/increment-row-column.md (100%) rename docs/references/{grids => databases}/list-columns.md (100%) rename docs/references/{grids => databases}/list-rows.md (100%) rename docs/references/{grids => databases}/list-tables.md (100%) rename docs/references/{grids => databases}/update-boolean-column.md (100%) rename docs/references/{grids => databases}/update-datetime-column.md (100%) rename docs/references/{grids => databases}/update-email-column.md (100%) rename docs/references/{grids => databases}/update-enum-column.md (100%) rename docs/references/{grids => databases}/update-float-column.md (100%) rename docs/references/{grids => databases}/update-integer-column.md (100%) rename docs/references/{grids => databases}/update-ip-column.md (100%) rename docs/references/{grids => databases}/update-relationship-column.md (100%) rename docs/references/{grids => databases}/update-row.md (100%) rename docs/references/{grids => databases}/update-rows.md (100%) rename docs/references/{grids => databases}/update-string-column.md (100%) rename docs/references/{grids => databases}/update-table.md (100%) rename docs/references/{grids => databases}/update-url-column.md (100%) rename docs/references/{grids => databases}/upsert-row.md (100%) rename docs/references/{grids => databases}/upsert-rows.md (100%) delete mode 100644 docs/references/grids/create-database.md delete mode 100644 docs/references/grids/create-index.md delete mode 100644 docs/references/grids/delete-database.md delete mode 100644 docs/references/grids/delete-index.md delete mode 100644 docs/references/grids/get-database-usage.md delete mode 100644 docs/references/grids/get-database.md delete mode 100644 docs/references/grids/get-index.md delete mode 100644 docs/references/grids/get-logs.md delete mode 100644 docs/references/grids/list-database-usage.md delete mode 100644 docs/references/grids/list-databases.md delete mode 100644 docs/references/grids/list-indexes.md delete mode 100644 docs/references/grids/update-database.md diff --git a/docs/references/grids/create-boolean-column.md b/docs/references/databases/create-boolean-column.md similarity index 100% rename from docs/references/grids/create-boolean-column.md rename to docs/references/databases/create-boolean-column.md diff --git a/docs/references/grids/create-datetime-column.md b/docs/references/databases/create-datetime-column.md similarity index 100% rename from docs/references/grids/create-datetime-column.md rename to docs/references/databases/create-datetime-column.md diff --git a/docs/references/grids/create-email-column.md b/docs/references/databases/create-email-column.md similarity index 100% rename from docs/references/grids/create-email-column.md rename to docs/references/databases/create-email-column.md diff --git a/docs/references/grids/create-enum-column.md b/docs/references/databases/create-enum-column.md similarity index 100% rename from docs/references/grids/create-enum-column.md rename to docs/references/databases/create-enum-column.md diff --git a/docs/references/grids/create-float-column.md b/docs/references/databases/create-float-column.md similarity index 100% rename from docs/references/grids/create-float-column.md rename to docs/references/databases/create-float-column.md diff --git a/docs/references/grids/create-integer-column.md b/docs/references/databases/create-integer-column.md similarity index 100% rename from docs/references/grids/create-integer-column.md rename to docs/references/databases/create-integer-column.md diff --git a/docs/references/grids/create-ip-column.md b/docs/references/databases/create-ip-column.md similarity index 100% rename from docs/references/grids/create-ip-column.md rename to docs/references/databases/create-ip-column.md diff --git a/docs/references/grids/create-relationship-column.md b/docs/references/databases/create-relationship-column.md similarity index 100% rename from docs/references/grids/create-relationship-column.md rename to docs/references/databases/create-relationship-column.md diff --git a/docs/references/grids/create-row.md b/docs/references/databases/create-row.md similarity index 100% rename from docs/references/grids/create-row.md rename to docs/references/databases/create-row.md diff --git a/docs/references/grids/create-rows.md b/docs/references/databases/create-rows.md similarity index 100% rename from docs/references/grids/create-rows.md rename to docs/references/databases/create-rows.md diff --git a/docs/references/grids/create-string-column.md b/docs/references/databases/create-string-column.md similarity index 100% rename from docs/references/grids/create-string-column.md rename to docs/references/databases/create-string-column.md diff --git a/docs/references/grids/create-table.md b/docs/references/databases/create-table.md similarity index 100% rename from docs/references/grids/create-table.md rename to docs/references/databases/create-table.md diff --git a/docs/references/grids/create-url-column.md b/docs/references/databases/create-url-column.md similarity index 100% rename from docs/references/grids/create-url-column.md rename to docs/references/databases/create-url-column.md diff --git a/docs/references/grids/decrement-row-column.md b/docs/references/databases/decrement-row-column.md similarity index 100% rename from docs/references/grids/decrement-row-column.md rename to docs/references/databases/decrement-row-column.md diff --git a/docs/references/grids/delete-column.md b/docs/references/databases/delete-column.md similarity index 100% rename from docs/references/grids/delete-column.md rename to docs/references/databases/delete-column.md diff --git a/docs/references/grids/delete-row.md b/docs/references/databases/delete-row.md similarity index 100% rename from docs/references/grids/delete-row.md rename to docs/references/databases/delete-row.md diff --git a/docs/references/grids/delete-rows.md b/docs/references/databases/delete-rows.md similarity index 100% rename from docs/references/grids/delete-rows.md rename to docs/references/databases/delete-rows.md diff --git a/docs/references/grids/delete-table.md b/docs/references/databases/delete-table.md similarity index 100% rename from docs/references/grids/delete-table.md rename to docs/references/databases/delete-table.md diff --git a/docs/references/grids/get-column.md b/docs/references/databases/get-column.md similarity index 100% rename from docs/references/grids/get-column.md rename to docs/references/databases/get-column.md diff --git a/docs/references/grids/get-row-logs.md b/docs/references/databases/get-row-logs.md similarity index 100% rename from docs/references/grids/get-row-logs.md rename to docs/references/databases/get-row-logs.md diff --git a/docs/references/grids/get-row.md b/docs/references/databases/get-row.md similarity index 100% rename from docs/references/grids/get-row.md rename to docs/references/databases/get-row.md diff --git a/docs/references/grids/get-table-logs.md b/docs/references/databases/get-table-logs.md similarity index 100% rename from docs/references/grids/get-table-logs.md rename to docs/references/databases/get-table-logs.md diff --git a/docs/references/grids/get-table-usage.md b/docs/references/databases/get-table-usage.md similarity index 100% rename from docs/references/grids/get-table-usage.md rename to docs/references/databases/get-table-usage.md diff --git a/docs/references/grids/get-table.md b/docs/references/databases/get-table.md similarity index 100% rename from docs/references/grids/get-table.md rename to docs/references/databases/get-table.md diff --git a/docs/references/grids/increment-row-column.md b/docs/references/databases/increment-row-column.md similarity index 100% rename from docs/references/grids/increment-row-column.md rename to docs/references/databases/increment-row-column.md diff --git a/docs/references/grids/list-columns.md b/docs/references/databases/list-columns.md similarity index 100% rename from docs/references/grids/list-columns.md rename to docs/references/databases/list-columns.md diff --git a/docs/references/grids/list-rows.md b/docs/references/databases/list-rows.md similarity index 100% rename from docs/references/grids/list-rows.md rename to docs/references/databases/list-rows.md diff --git a/docs/references/grids/list-tables.md b/docs/references/databases/list-tables.md similarity index 100% rename from docs/references/grids/list-tables.md rename to docs/references/databases/list-tables.md diff --git a/docs/references/grids/update-boolean-column.md b/docs/references/databases/update-boolean-column.md similarity index 100% rename from docs/references/grids/update-boolean-column.md rename to docs/references/databases/update-boolean-column.md diff --git a/docs/references/grids/update-datetime-column.md b/docs/references/databases/update-datetime-column.md similarity index 100% rename from docs/references/grids/update-datetime-column.md rename to docs/references/databases/update-datetime-column.md diff --git a/docs/references/grids/update-email-column.md b/docs/references/databases/update-email-column.md similarity index 100% rename from docs/references/grids/update-email-column.md rename to docs/references/databases/update-email-column.md diff --git a/docs/references/grids/update-enum-column.md b/docs/references/databases/update-enum-column.md similarity index 100% rename from docs/references/grids/update-enum-column.md rename to docs/references/databases/update-enum-column.md diff --git a/docs/references/grids/update-float-column.md b/docs/references/databases/update-float-column.md similarity index 100% rename from docs/references/grids/update-float-column.md rename to docs/references/databases/update-float-column.md diff --git a/docs/references/grids/update-integer-column.md b/docs/references/databases/update-integer-column.md similarity index 100% rename from docs/references/grids/update-integer-column.md rename to docs/references/databases/update-integer-column.md diff --git a/docs/references/grids/update-ip-column.md b/docs/references/databases/update-ip-column.md similarity index 100% rename from docs/references/grids/update-ip-column.md rename to docs/references/databases/update-ip-column.md diff --git a/docs/references/grids/update-relationship-column.md b/docs/references/databases/update-relationship-column.md similarity index 100% rename from docs/references/grids/update-relationship-column.md rename to docs/references/databases/update-relationship-column.md diff --git a/docs/references/grids/update-row.md b/docs/references/databases/update-row.md similarity index 100% rename from docs/references/grids/update-row.md rename to docs/references/databases/update-row.md diff --git a/docs/references/grids/update-rows.md b/docs/references/databases/update-rows.md similarity index 100% rename from docs/references/grids/update-rows.md rename to docs/references/databases/update-rows.md diff --git a/docs/references/grids/update-string-column.md b/docs/references/databases/update-string-column.md similarity index 100% rename from docs/references/grids/update-string-column.md rename to docs/references/databases/update-string-column.md diff --git a/docs/references/grids/update-table.md b/docs/references/databases/update-table.md similarity index 100% rename from docs/references/grids/update-table.md rename to docs/references/databases/update-table.md diff --git a/docs/references/grids/update-url-column.md b/docs/references/databases/update-url-column.md similarity index 100% rename from docs/references/grids/update-url-column.md rename to docs/references/databases/update-url-column.md diff --git a/docs/references/grids/upsert-row.md b/docs/references/databases/upsert-row.md similarity index 100% rename from docs/references/grids/upsert-row.md rename to docs/references/databases/upsert-row.md diff --git a/docs/references/grids/upsert-rows.md b/docs/references/databases/upsert-rows.md similarity index 100% rename from docs/references/grids/upsert-rows.md rename to docs/references/databases/upsert-rows.md diff --git a/docs/references/grids/create-database.md b/docs/references/grids/create-database.md deleted file mode 100644 index b608485341..0000000000 --- a/docs/references/grids/create-database.md +++ /dev/null @@ -1 +0,0 @@ -Create a new Database. diff --git a/docs/references/grids/create-index.md b/docs/references/grids/create-index.md deleted file mode 100644 index 6ce853a217..0000000000 --- a/docs/references/grids/create-index.md +++ /dev/null @@ -1,2 +0,0 @@ -Creates an index on the columns listed. Your index should include all the columns you will query in a single request. -Columns can be `key`, `fulltext`, and `unique`. \ No newline at end of file diff --git a/docs/references/grids/delete-database.md b/docs/references/grids/delete-database.md deleted file mode 100644 index 605fa290d3..0000000000 --- a/docs/references/grids/delete-database.md +++ /dev/null @@ -1 +0,0 @@ -Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database. \ No newline at end of file diff --git a/docs/references/grids/delete-index.md b/docs/references/grids/delete-index.md deleted file mode 100644 index c5b8f49e5f..0000000000 --- a/docs/references/grids/delete-index.md +++ /dev/null @@ -1 +0,0 @@ -Delete an index. \ No newline at end of file diff --git a/docs/references/grids/get-database-usage.md b/docs/references/grids/get-database-usage.md deleted file mode 100644 index d9298f4814..0000000000 --- a/docs/references/grids/get-database-usage.md +++ /dev/null @@ -1 +0,0 @@ -Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/grids/get-database.md b/docs/references/grids/get-database.md deleted file mode 100644 index 24183f6f6b..0000000000 --- a/docs/references/grids/get-database.md +++ /dev/null @@ -1 +0,0 @@ -Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata. \ No newline at end of file diff --git a/docs/references/grids/get-index.md b/docs/references/grids/get-index.md deleted file mode 100644 index cdea5b4f27..0000000000 --- a/docs/references/grids/get-index.md +++ /dev/null @@ -1 +0,0 @@ -Get index by ID. \ No newline at end of file diff --git a/docs/references/grids/get-logs.md b/docs/references/grids/get-logs.md deleted file mode 100644 index 8e49da4603..0000000000 --- a/docs/references/grids/get-logs.md +++ /dev/null @@ -1 +0,0 @@ -Get the database activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/list-database-usage.md b/docs/references/grids/list-database-usage.md deleted file mode 100644 index 2bf5ed81e1..0000000000 --- a/docs/references/grids/list-database-usage.md +++ /dev/null @@ -1 +0,0 @@ -List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/grids/list-databases.md b/docs/references/grids/list-databases.md deleted file mode 100644 index d93fb9d7a8..0000000000 --- a/docs/references/grids/list-databases.md +++ /dev/null @@ -1 +0,0 @@ -Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. \ No newline at end of file diff --git a/docs/references/grids/list-indexes.md b/docs/references/grids/list-indexes.md deleted file mode 100644 index a0c7b2f861..0000000000 --- a/docs/references/grids/list-indexes.md +++ /dev/null @@ -1 +0,0 @@ -List indexes in the table. \ No newline at end of file diff --git a/docs/references/grids/update-database.md b/docs/references/grids/update-database.md deleted file mode 100644 index 4e99bf2e07..0000000000 --- a/docs/references/grids/update-database.md +++ /dev/null @@ -1 +0,0 @@ -Update a database by its unique ID. \ No newline at end of file From e18c8942fd0779b97d049721a4b7a901e855605f Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Mon, 28 Jul 2025 18:23:50 +1200 Subject: [PATCH 308/362] Revert migrations, update db --- composer.json | 2 +- composer.lock | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index e0c3caf63c..78574bbbac 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.13.*", + "utopia-php/migration": "0.13.3", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index 1142ccdbd1..fdb520115a 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": "497a684d3c93c08d4741f5bb886a5474", + "content-hash": "eceecf8e760874848f13650198bda913", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.73.0", + "version": "0.73.1", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "f9b6c587e54069dc64c2d29174ce8a42b7ba6491" + "reference": "728158241f7867e200d1939ccf8b60d8efa9a311" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/f9b6c587e54069dc64c2d29174ce8a42b7ba6491", - "reference": "f9b6c587e54069dc64c2d29174ce8a42b7ba6491", + "url": "https://api.github.com/repos/utopia-php/database/zipball/728158241f7867e200d1939ccf8b60d8efa9a311", + "reference": "728158241f7867e200d1939ccf8b60d8efa9a311", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.73.0" + "source": "https://github.com/utopia-php/database/tree/0.73.1" }, - "time": "2025-07-27T04:10:06+00:00" + "time": "2025-07-28T06:21:29+00:00" }, { "name": "utopia-php/detector", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.13.4", + "version": "0.13.3", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "e0e351b073e216e54bcb27bcadaa6b3e6fe77e60" + "reference": "cf6b192f78dacfa06b659646c228b203212b3c6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/e0e351b073e216e54bcb27bcadaa6b3e6fe77e60", - "reference": "e0e351b073e216e54bcb27bcadaa6b3e6fe77e60", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/cf6b192f78dacfa06b659646c228b203212b3c6b", + "reference": "cf6b192f78dacfa06b659646c228b203212b3c6b", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.13.4" + "source": "https://github.com/utopia-php/migration/tree/0.13.3" }, - "time": "2025-07-28T02:43:54+00:00" + "time": "2025-07-23T08:02:04+00:00" }, { "name": "utopia-php/orchestration", From c359c34917ba55b3e7d3010363d28e5823557d32 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Mon, 28 Jul 2025 18:38:00 +1200 Subject: [PATCH 309/362] Downgrade db --- composer.json | 2 +- composer.lock | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 78574bbbac..b913bc247e 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.73.*", + "utopia-php/database": "0.73.0", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index fdb520115a..0f4b44e2ea 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": "eceecf8e760874848f13650198bda913", + "content-hash": "ee81ef96c463854d58fd5678c28ad896", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.73.1", + "version": "0.73.0", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "728158241f7867e200d1939ccf8b60d8efa9a311" + "reference": "f9b6c587e54069dc64c2d29174ce8a42b7ba6491" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/728158241f7867e200d1939ccf8b60d8efa9a311", - "reference": "728158241f7867e200d1939ccf8b60d8efa9a311", + "url": "https://api.github.com/repos/utopia-php/database/zipball/f9b6c587e54069dc64c2d29174ce8a42b7ba6491", + "reference": "f9b6c587e54069dc64c2d29174ce8a42b7ba6491", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.73.1" + "source": "https://github.com/utopia-php/database/tree/0.73.0" }, - "time": "2025-07-28T06:21:29+00:00" + "time": "2025-07-27T04:10:06+00:00" }, { "name": "utopia-php/detector", @@ -4810,16 +4810,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.23", + "version": "0.41.24", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "188dff738ff7b9f1f9209b34ac2092b5456b1001" + "reference": "c9ebf8daa25332ca701515d42e8d0c4a7be6a489" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/188dff738ff7b9f1f9209b34ac2092b5456b1001", - "reference": "188dff738ff7b9f1f9209b34ac2092b5456b1001", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/c9ebf8daa25332ca701515d42e8d0c4a7be6a489", + "reference": "c9ebf8daa25332ca701515d42e8d0c4a7be6a489", "shasum": "" }, "require": { @@ -4855,9 +4855,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.23" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.24" }, - "time": "2025-07-25T06:47:04+00:00" + "time": "2025-07-28T06:27:00+00:00" }, { "name": "doctrine/annotations", From 503d7e13f8435ac4500509f1009b0872b6848344 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Mon, 28 Jul 2025 18:45:01 +1200 Subject: [PATCH 310/362] Update generator --- composer.json | 2 +- composer.lock | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index f2cbe2bff5..659d6221f7 100644 --- a/composer.json +++ b/composer.json @@ -86,7 +86,7 @@ }, "require-dev": { "ext-fileinfo": "*", - "appwrite/sdk-generator": "dev-feat-multiple-namespaces", + "appwrite/sdk-generator": "0.*.*", "phpunit/phpunit": "9.*", "swoole/ide-helper": "5.1.2", "phpstan/phpstan": "1.8.*", diff --git a/composer.lock b/composer.lock index 84f7ee3fa0..718dbaf64b 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": "ee81ef96c463854d58fd5678c28ad896", + "content-hash": "f4876940be4499bea26a77a036dece4f", "packages": [ { "name": "adhocore/jwt", @@ -8239,9 +8239,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "appwrite/sdk-generator": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { From 9a3687ae3b9c10efae65ccadb319aaff810db7c7 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 28 Jul 2025 10:43:35 +0300 Subject: [PATCH 311/362] Run tests --- app/controllers/api/storage.php | 4 ++-- composer.json | 2 +- composer.lock | 27 ++++++++++++++++++--------- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 480f6c63c6..867b8ff350 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -77,7 +77,7 @@ App::post('/v1/storage/buckets') )) ->param('bucketId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Bucket name') - ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->param('permissions', [], new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('fileSecurity', false, new Boolean(true), 'Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('enabled', true, new Boolean(true), 'Is bucket enabled? When set to \'disabled\', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.', true) ->param('maximumFileSize', fn (array $plan) => empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1000 * 1000, fn (array $plan) => new Range(1, empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1000 * 1000), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(System::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '.', true, ['plan']) @@ -88,7 +88,7 @@ App::post('/v1/storage/buckets') ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $bucketId, string $name, ?array $permissions, bool $fileSecurity, bool $enabled, int $maximumFileSize, array $allowedFileExtensions, ?string $compression, ?bool $encryption, bool $antivirus, Response $response, Database $dbForProject, Event $queueForEvents) { + ->action(function (string $bucketId, string $name, array $permissions, bool $fileSecurity, bool $enabled, int $maximumFileSize, array $allowedFileExtensions, ?string $compression, ?bool $encryption, bool $antivirus, Response $response, Database $dbForProject, Event $queueForEvents) { $bucketId = $bucketId === 'unique()' ? ID::unique() : $bucketId; diff --git a/composer.json b/composer.json index 659d6221f7..289aa74e88 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.73.0", + "utopia-php/database": "dev-document-constructor as 0.73.0", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index 718dbaf64b..481dce2631 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": "f4876940be4499bea26a77a036dece4f", + "content-hash": "1d9f78df647dcd880216183c9b7a3f9f", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.73.0", + "version": "dev-document-constructor", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "f9b6c587e54069dc64c2d29174ce8a42b7ba6491" + "reference": "2d37031df8d939dee5d01815442c5efaf8f66d9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/f9b6c587e54069dc64c2d29174ce8a42b7ba6491", - "reference": "f9b6c587e54069dc64c2d29174ce8a42b7ba6491", + "url": "https://api.github.com/repos/utopia-php/database/zipball/2d37031df8d939dee5d01815442c5efaf8f66d9d", + "reference": "2d37031df8d939dee5d01815442c5efaf8f66d9d", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.73.0" + "source": "https://github.com/utopia-php/database/tree/document-constructor" }, - "time": "2025-07-27T04:10:06+00:00" + "time": "2025-07-28T07:36:23+00:00" }, { "name": "utopia-php/detector", @@ -8237,9 +8237,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-document-constructor", + "alias": "0.73.0", + "alias_normalized": "0.73.0.0" + } + ], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/database": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From 66fa7ad659bcd8c59f76ef92175c2dda845b8997 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 28 Jul 2025 11:08:32 +0300 Subject: [PATCH 312/362] Use null default with fallback --- app/controllers/api/storage.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 867b8ff350..eedda7d744 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -77,7 +77,7 @@ App::post('/v1/storage/buckets') )) ->param('bucketId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Bucket name') - ->param('permissions', [], new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('fileSecurity', false, new Boolean(true), 'Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('enabled', true, new Boolean(true), 'Is bucket enabled? When set to \'disabled\', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.', true) ->param('maximumFileSize', fn (array $plan) => empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1000 * 1000, fn (array $plan) => new Range(1, empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1000 * 1000), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(System::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '.', true, ['plan']) @@ -88,12 +88,13 @@ App::post('/v1/storage/buckets') ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') - ->action(function (string $bucketId, string $name, array $permissions, bool $fileSecurity, bool $enabled, int $maximumFileSize, array $allowedFileExtensions, ?string $compression, ?bool $encryption, bool $antivirus, Response $response, Database $dbForProject, Event $queueForEvents) { + ->action(function (string $bucketId, string $name, ?array $permissions, bool $fileSecurity, bool $enabled, int $maximumFileSize, array $allowedFileExtensions, ?string $compression, ?bool $encryption, bool $antivirus, Response $response, Database $dbForProject, Event $queueForEvents) { $bucketId = $bucketId === 'unique()' ? ID::unique() : $bucketId; // Map aggregate permissions into the multiple permissions they represent. $permissions = Permission::aggregate($permissions); + $permissions ??= []; $compression ??= Compression::NONE; $encryption ??= true; try { @@ -146,7 +147,7 @@ App::post('/v1/storage/buckets') $bucket = $dbForProject->getDocument('buckets', $bucketId); - $dbForProject->createCollection('bucket_' . $bucket->getSequence(), $attributes, $indexes, permissions: $permissions ?? [], documentSecurity: $fileSecurity); + $dbForProject->createCollection('bucket_' . $bucket->getSequence(), $attributes, $indexes, permissions: $permissions, documentSecurity: $fileSecurity); } catch (DuplicateException) { throw new Exception(Exception::STORAGE_BUCKET_ALREADY_EXISTS); } From 78887b9df630c1732d773fd1810d2b0693af1acb Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 28 Jul 2025 11:18:03 +0300 Subject: [PATCH 313/362] fallbacks --- app/controllers/api/storage.php | 3 +-- .../Modules/Databases/Http/Databases/Collections/Update.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index eedda7d744..8cfeb5da3b 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -93,8 +93,7 @@ App::post('/v1/storage/buckets') $bucketId = $bucketId === 'unique()' ? ID::unique() : $bucketId; // Map aggregate permissions into the multiple permissions they represent. - $permissions = Permission::aggregate($permissions); - $permissions ??= []; + $permissions = Permission::aggregate($permissions) ?? []; $compression ??= Compression::NONE; $encryption ??= true; try { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php index 09b3ee2b35..03148eeb2b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Update.php @@ -85,7 +85,7 @@ class Update extends Action throw new Exception($this->getNotFoundException()); } - $permissions ??= $collection->getPermissions() ?? []; + $permissions ??= $collection->getPermissions(); // Map aggregate permissions into the multiple permissions they represent. $permissions = Permission::aggregate($permissions); From bbf3164cac6e848fbde1b2a75712bdff9ab9f03b Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 28 Jul 2025 13:40:27 +0300 Subject: [PATCH 314/362] Run tests --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 481dce2631..94478255d8 100644 --- a/composer.lock +++ b/composer.lock @@ -3497,12 +3497,12 @@ "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "2d37031df8d939dee5d01815442c5efaf8f66d9d" + "reference": "957a496d89398713464da229eeb36cafa0820151" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/2d37031df8d939dee5d01815442c5efaf8f66d9d", - "reference": "2d37031df8d939dee5d01815442c5efaf8f66d9d", + "url": "https://api.github.com/repos/utopia-php/database/zipball/957a496d89398713464da229eeb36cafa0820151", + "reference": "957a496d89398713464da229eeb36cafa0820151", "shasum": "" }, "require": { @@ -3545,7 +3545,7 @@ "issues": "https://github.com/utopia-php/database/issues", "source": "https://github.com/utopia-php/database/tree/document-constructor" }, - "time": "2025-07-28T07:36:23+00:00" + "time": "2025-07-28T10:39:09+00:00" }, { "name": "utopia-php/detector", From ff171853b42cb4c5bb165b1dc9baeb7934f44a5b Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 28 Jul 2025 17:14:41 +0300 Subject: [PATCH 315/362] use 0.73.1 --- composer.json | 2 +- composer.lock | 27 +++++++++------------------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 289aa74e88..40740b711f 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "dev-document-constructor as 0.73.0", + "utopia-php/database": "0.73.*", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index 94478255d8..5545eb2d3e 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": "1d9f78df647dcd880216183c9b7a3f9f", + "content-hash": "f152305ec0b90245773867cde288582d", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "dev-document-constructor", + "version": "0.73.1", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "957a496d89398713464da229eeb36cafa0820151" + "reference": "a893ea6b959613452712ed17301b5eae49e3793f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/957a496d89398713464da229eeb36cafa0820151", - "reference": "957a496d89398713464da229eeb36cafa0820151", + "url": "https://api.github.com/repos/utopia-php/database/zipball/a893ea6b959613452712ed17301b5eae49e3793f", + "reference": "a893ea6b959613452712ed17301b5eae49e3793f", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/document-constructor" + "source": "https://github.com/utopia-php/database/tree/0.73.1" }, - "time": "2025-07-28T10:39:09+00:00" + "time": "2025-07-28T12:28:29+00:00" }, { "name": "utopia-php/detector", @@ -8237,18 +8237,9 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [ - { - "package": "utopia-php/database", - "version": "dev-document-constructor", - "alias": "0.73.0", - "alias_normalized": "0.73.0.0" - } - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/database": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From a520e9fcc9dedc01387e661d8e2aec1af489ce10 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Tue, 29 Jul 2025 08:34:44 +0300 Subject: [PATCH 316/362] Update 0.73.2 --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 5545eb2d3e..bddc8ec936 100644 --- a/composer.lock +++ b/composer.lock @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.73.1", + "version": "0.73.2", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "a893ea6b959613452712ed17301b5eae49e3793f" + "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/a893ea6b959613452712ed17301b5eae49e3793f", - "reference": "a893ea6b959613452712ed17301b5eae49e3793f", + "url": "https://api.github.com/repos/utopia-php/database/zipball/68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", + "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.73.1" + "source": "https://github.com/utopia-php/database/tree/0.73.2" }, - "time": "2025-07-28T12:28:29+00:00" + "time": "2025-07-29T03:23:04+00:00" }, { "name": "utopia-php/detector", From 19bd04e8c9930dcc4eef9096b64c352ab9d21ec6 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Tue, 29 Jul 2025 11:10:25 +0300 Subject: [PATCH 317/362] Skip empty queries --- app/init/resources.php | 29 ++++++++++++++++++++--------- composer.json | 2 +- composer.lock | 27 ++++++++++++++++++--------- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/app/init/resources.php b/app/init/resources.php index 946a977aa4..06a916a58d 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -234,16 +234,18 @@ App::setResource('user', function ($mode, $project, $console, $request, $respons Auth::$unique = $session['id'] ?? ''; Auth::$secret = $session['secret'] ?? ''; - if ($mode === APP_MODE_ADMIN) { - $user = $dbForPlatform->getDocument('users', Auth::$unique); - } else { - if ($project->isEmpty()) { - $user = new Document([]); + $user = new Document([]); + + if (!empty(Auth::$unique)){ + if ($mode === APP_MODE_ADMIN) { + $user = $dbForPlatform->getDocument('users', Auth::$unique); } else { - if ($project->getId() === 'console') { - $user = $dbForPlatform->getDocument('users', Auth::$unique); - } else { - $user = $dbForProject->getDocument('users', Auth::$unique); + if (!$project->isEmpty()) { + if ($project->getId() === 'console') { + $user = $dbForPlatform->getDocument('users', Auth::$unique); + } else { + $user = $dbForProject->getDocument('users', Auth::$unique); + } } } } @@ -849,11 +851,20 @@ App::setResource('team', function (Document $project, Database $dbForPlatform, A $teamInternalId = $p->getAttribute('teamInternalId', ''); } elseif ($path === '/v1/projects') { $teamId = $request->getParam('teamId', ''); + + if (empty($teamId)){ + return new Document([]); + } + $team = Authorization::skip(fn () => $dbForPlatform->getDocument('teams', $teamId)); return $team; } } + if (empty($teamInternalId)){ + return new Document([]); + } + $team = Authorization::skip(function () use ($dbForPlatform, $teamInternalId) { return $dbForPlatform->findOne('teams', [ Query::equal('$sequence', [$teamInternalId]), diff --git a/composer.json b/composer.json index 40740b711f..d76918fa7e 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.73.*", + "utopia-php/database": "dev-cast-sequence as 0.73.2", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index bddc8ec936..db551ed0f4 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": "f152305ec0b90245773867cde288582d", + "content-hash": "69f5a2e965cd9c1233044629699d3d28", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.73.2", + "version": "dev-cast-sequence", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480" + "reference": "749cb0606a88ad4282b182feaa7e380627126b86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", - "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", + "url": "https://api.github.com/repos/utopia-php/database/zipball/749cb0606a88ad4282b182feaa7e380627126b86", + "reference": "749cb0606a88ad4282b182feaa7e380627126b86", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.73.2" + "source": "https://github.com/utopia-php/database/tree/cast-sequence" }, - "time": "2025-07-29T03:23:04+00:00" + "time": "2025-07-29T05:33:45+00:00" }, { "name": "utopia-php/detector", @@ -8237,9 +8237,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-cast-sequence", + "alias": "0.73.2", + "alias_normalized": "0.73.2.0" + } + ], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "utopia-php/database": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From bdf9dd5192dc8d34424c3b20ece1b291309bc3bd Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Tue, 29 Jul 2025 20:12:27 +1200 Subject: [PATCH 318/362] Update migrations --- composer.json | 2 +- composer.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 40740b711f..e0c9dc36af 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.13.3", + "utopia-php/migration": "0.13.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index bddc8ec936..cae0976158 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": "f152305ec0b90245773867cde288582d", + "content-hash": "a2740535c6a9ebbcf6d01df4d35bb78d", "packages": [ { "name": "adhocore/jwt", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.13.3", + "version": "0.13.5", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "cf6b192f78dacfa06b659646c228b203212b3c6b" + "reference": "8142d722d8eeec443e6d5df91b69ecf89b86df8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/cf6b192f78dacfa06b659646c228b203212b3c6b", - "reference": "cf6b192f78dacfa06b659646c228b203212b3c6b", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/8142d722d8eeec443e6d5df91b69ecf89b86df8e", + "reference": "8142d722d8eeec443e6d5df91b69ecf89b86df8e", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.13.3" + "source": "https://github.com/utopia-php/migration/tree/0.13.5" }, - "time": "2025-07-23T08:02:04+00:00" + "time": "2025-07-29T04:15:45+00:00" }, { "name": "utopia-php/orchestration", @@ -8239,7 +8239,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { From eddc782c6efbe811b5b52211c296dfff921c8296 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Tue, 29 Jul 2025 11:24:41 +0300 Subject: [PATCH 319/362] formatting --- app/init/resources.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/init/resources.php b/app/init/resources.php index 06a916a58d..be59871dfe 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -236,7 +236,7 @@ App::setResource('user', function ($mode, $project, $console, $request, $respons $user = new Document([]); - if (!empty(Auth::$unique)){ + if (!empty(Auth::$unique)) { if ($mode === APP_MODE_ADMIN) { $user = $dbForPlatform->getDocument('users', Auth::$unique); } else { @@ -852,7 +852,7 @@ App::setResource('team', function (Document $project, Database $dbForPlatform, A } elseif ($path === '/v1/projects') { $teamId = $request->getParam('teamId', ''); - if (empty($teamId)){ + if (empty($teamId)) { return new Document([]); } @@ -861,7 +861,7 @@ App::setResource('team', function (Document $project, Database $dbForPlatform, A } } - if (empty($teamInternalId)){ + if (empty($teamInternalId)) { return new Document([]); } From 451e590c4903f55b4a306843fdb1b23470afe400 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 30 Jul 2025 10:24:37 +0530 Subject: [PATCH 320/362] remove: tables examples. --- .../client-android/java/tables/create-row.md | 28 ---------------- .../client-android/java/tables/create-rows.md | 25 -------------- .../client-android/java/tables/delete-row.md | 24 -------------- .../client-android/java/tables/get-row.md | 25 -------------- .../client-android/java/tables/list-rows.md | 24 -------------- .../client-android/java/tables/update-row.md | 26 --------------- .../client-android/java/tables/upsert-row.md | 26 --------------- .../kotlin/tables/create-row.md | 19 ----------- .../kotlin/tables/create-rows.md | 16 --------- .../kotlin/tables/delete-row.md | 15 --------- .../client-android/kotlin/tables/get-row.md | 16 --------- .../client-android/kotlin/tables/list-rows.md | 15 --------- .../kotlin/tables/update-row.md | 17 ---------- .../kotlin/tables/upsert-row.md | 17 ---------- .../examples/tables/create-row.md | 18 ---------- .../examples/tables/create-rows.md | 15 --------- .../examples/tables/delete-row.md | 14 -------- .../client-apple/examples/tables/get-row.md | 15 --------- .../client-apple/examples/tables/list-rows.md | 14 -------- .../examples/tables/update-row.md | 16 --------- .../examples/tables/upsert-row.md | 16 --------- .../examples/tables/create-row.md | 17 ---------- .../examples/tables/create-rows.md | 14 -------- .../examples/tables/delete-row.md | 13 -------- .../client-flutter/examples/tables/get-row.md | 14 -------- .../examples/tables/list-rows.md | 13 -------- .../examples/tables/update-row.md | 15 --------- .../examples/tables/upsert-row.md | 15 --------- .../examples/tables/create-row.md | 18 ---------- .../examples/tables/create-rows.md | 19 ----------- .../examples/tables/delete-row.md | 9 ----- .../client-graphql/examples/tables/get-row.md | 0 .../examples/tables/list-rows.md | 0 .../examples/tables/update-row.md | 18 ---------- .../examples/tables/upsert-row.md | 16 --------- .../examples/tables/create-row.md | 19 ----------- .../examples/tables/create-rows.md | 16 --------- .../examples/tables/delete-row.md | 15 --------- .../examples/tables/get-row.md | 16 --------- .../examples/tables/list-rows.md | 15 --------- .../examples/tables/update-row.md | 17 ---------- .../examples/tables/upsert-row.md | 17 ---------- .../client-rest/examples/tables/create-row.md | 13 -------- .../examples/tables/create-rows.md | 11 ------- .../client-rest/examples/tables/delete-row.md | 8 ----- .../client-rest/examples/tables/get-row.md | 6 ---- .../client-rest/examples/tables/list-rows.md | 6 ---- .../client-rest/examples/tables/update-row.md | 12 ------- .../client-rest/examples/tables/upsert-row.md | 8 ----- .../client-web/examples/tables/create-row.md | 19 ----------- .../client-web/examples/tables/create-rows.md | 16 --------- .../client-web/examples/tables/delete-row.md | 15 --------- .../client-web/examples/tables/get-row.md | 16 --------- .../client-web/examples/tables/list-rows.md | 15 --------- .../client-web/examples/tables/update-row.md | 17 ---------- .../client-web/examples/tables/upsert-row.md | 17 ---------- .../examples/tables/create-boolean-column.md | 7 ---- .../examples/tables/create-datetime-column.md | 7 ---- .../examples/tables/create-email-column.md | 7 ---- .../examples/tables/create-enum-column.md | 8 ----- .../examples/tables/create-float-column.md | 9 ----- .../examples/tables/create-index.md | 8 ----- .../examples/tables/create-integer-column.md | 9 ----- .../examples/tables/create-ip-column.md | 7 ---- .../tables/create-relationship-column.md | 9 ----- .../console-cli/examples/tables/create-row.md | 6 ---- .../examples/tables/create-rows.md | 4 --- .../examples/tables/create-string-column.md | 9 ----- .../examples/tables/create-url-column.md | 7 ---- .../console-cli/examples/tables/create.md | 7 ---- .../examples/tables/decrement-row-column.md | 7 ---- .../examples/tables/delete-column.md | 4 --- .../examples/tables/delete-index.md | 4 --- .../console-cli/examples/tables/delete-row.md | 4 --- .../examples/tables/delete-rows.md | 4 --- .../console-cli/examples/tables/delete.md | 3 -- .../console-cli/examples/tables/get-column.md | 4 --- .../console-cli/examples/tables/get-index.md | 4 --- .../console-cli/examples/tables/get-row.md | 5 --- .../examples/tables/get-table-usage.md | 4 --- .../console-cli/examples/tables/get-usage.md | 4 --- .../1.8.x/console-cli/examples/tables/get.md | 3 -- .../examples/tables/increment-row-column.md | 7 ---- .../examples/tables/list-columns.md | 4 --- .../examples/tables/list-indexes.md | 4 --- .../console-cli/examples/tables/list-logs.md | 4 --- .../examples/tables/list-row-logs.md | 5 --- .../console-cli/examples/tables/list-rows.md | 4 --- .../1.8.x/console-cli/examples/tables/list.md | 4 --- .../examples/tables/update-boolean-column.md | 7 ---- .../examples/tables/update-datetime-column.md | 7 ---- .../examples/tables/update-email-column.md | 7 ---- .../examples/tables/update-enum-column.md | 8 ----- .../examples/tables/update-float-column.md | 9 ----- .../examples/tables/update-integer-column.md | 9 ----- .../examples/tables/update-ip-column.md | 7 ---- .../tables/update-relationship-column.md | 6 ---- .../console-cli/examples/tables/update-row.md | 6 ---- .../examples/tables/update-rows.md | 5 --- .../examples/tables/update-string-column.md | 8 ----- .../examples/tables/update-url-column.md | 7 ---- .../console-cli/examples/tables/update.md | 7 ---- .../console-cli/examples/tables/upsert-row.md | 4 --- .../examples/tables/upsert-rows.md | 3 -- .../examples/tables/create-boolean-column.md | 18 ---------- .../examples/tables/create-datetime-column.md | 18 ---------- .../examples/tables/create-email-column.md | 18 ---------- .../examples/tables/create-enum-column.md | 19 ----------- .../examples/tables/create-float-column.md | 20 ----------- .../examples/tables/create-index.md | 19 ----------- .../examples/tables/create-integer-column.md | 20 ----------- .../examples/tables/create-ip-column.md | 18 ---------- .../tables/create-relationship-column.md | 20 ----------- .../console-web/examples/tables/create-row.md | 19 ----------- .../examples/tables/create-rows.md | 16 --------- .../examples/tables/create-string-column.md | 20 ----------- .../examples/tables/create-url-column.md | 18 ---------- .../console-web/examples/tables/create.md | 18 ---------- .../examples/tables/decrement-row-column.md | 18 ---------- .../examples/tables/delete-column.md | 15 --------- .../examples/tables/delete-index.md | 15 --------- .../console-web/examples/tables/delete-row.md | 15 --------- .../examples/tables/delete-rows.md | 15 --------- .../console-web/examples/tables/delete.md | 14 -------- .../console-web/examples/tables/get-column.md | 15 --------- .../console-web/examples/tables/get-index.md | 15 --------- .../console-web/examples/tables/get-row.md | 16 --------- .../examples/tables/get-table-usage.md | 15 --------- .../console-web/examples/tables/get-usage.md | 15 --------- .../1.8.x/console-web/examples/tables/get.md | 14 -------- .../examples/tables/increment-row-column.md | 18 ---------- .../examples/tables/list-columns.md | 15 --------- .../examples/tables/list-indexes.md | 15 --------- .../console-web/examples/tables/list-logs.md | 15 --------- .../examples/tables/list-row-logs.md | 16 --------- .../console-web/examples/tables/list-rows.md | 15 --------- .../1.8.x/console-web/examples/tables/list.md | 15 --------- .../examples/tables/update-boolean-column.md | 18 ---------- .../examples/tables/update-datetime-column.md | 18 ---------- .../examples/tables/update-email-column.md | 18 ---------- .../examples/tables/update-enum-column.md | 19 ----------- .../examples/tables/update-float-column.md | 20 ----------- .../examples/tables/update-integer-column.md | 20 ----------- .../examples/tables/update-ip-column.md | 18 ---------- .../tables/update-relationship-column.md | 17 ---------- .../console-web/examples/tables/update-row.md | 17 ---------- .../examples/tables/update-rows.md | 16 --------- .../examples/tables/update-string-column.md | 19 ----------- .../examples/tables/update-url-column.md | 18 ---------- .../console-web/examples/tables/update.md | 18 ---------- .../console-web/examples/tables/upsert-row.md | 17 ---------- .../examples/tables/upsert-rows.md | 15 --------- .../examples/tables/create-boolean-column.md | 17 ---------- .../examples/tables/create-datetime-column.md | 17 ---------- .../examples/tables/create-email-column.md | 17 ---------- .../examples/tables/create-enum-column.md | 18 ---------- .../examples/tables/create-float-column.md | 19 ----------- .../examples/tables/create-index.md | 18 ---------- .../examples/tables/create-integer-column.md | 19 ----------- .../examples/tables/create-ip-column.md | 17 ---------- .../tables/create-relationship-column.md | 19 ----------- .../server-dart/examples/tables/create-row.md | 17 ---------- .../examples/tables/create-rows.md | 14 -------- .../examples/tables/create-string-column.md | 19 ----------- .../examples/tables/create-url-column.md | 17 ---------- .../server-dart/examples/tables/create.md | 17 ---------- .../examples/tables/decrement-row-column.md | 17 ---------- .../examples/tables/delete-column.md | 14 -------- .../examples/tables/delete-index.md | 14 -------- .../server-dart/examples/tables/delete-row.md | 14 -------- .../examples/tables/delete-rows.md | 14 -------- .../server-dart/examples/tables/delete.md | 13 -------- .../server-dart/examples/tables/get-column.md | 14 -------- .../server-dart/examples/tables/get-index.md | 14 -------- .../server-dart/examples/tables/get-row.md | 15 --------- .../1.8.x/server-dart/examples/tables/get.md | 13 -------- .../examples/tables/increment-row-column.md | 17 ---------- .../examples/tables/list-columns.md | 14 -------- .../examples/tables/list-indexes.md | 14 -------- .../server-dart/examples/tables/list-rows.md | 14 -------- .../1.8.x/server-dart/examples/tables/list.md | 14 -------- .../examples/tables/update-boolean-column.md | 17 ---------- .../examples/tables/update-datetime-column.md | 17 ---------- .../examples/tables/update-email-column.md | 17 ---------- .../examples/tables/update-enum-column.md | 18 ---------- .../examples/tables/update-float-column.md | 19 ----------- .../examples/tables/update-integer-column.md | 19 ----------- .../examples/tables/update-ip-column.md | 17 ---------- .../tables/update-relationship-column.md | 16 --------- .../server-dart/examples/tables/update-row.md | 16 --------- .../examples/tables/update-rows.md | 15 --------- .../examples/tables/update-string-column.md | 18 ---------- .../examples/tables/update-url-column.md | 17 ---------- .../server-dart/examples/tables/update.md | 17 ---------- .../server-dart/examples/tables/upsert-row.md | 15 --------- .../examples/tables/upsert-rows.md | 13 -------- .../examples/tables/create-boolean-column.md | 17 ---------- .../examples/tables/create-datetime-column.md | 17 ---------- .../examples/tables/create-email-column.md | 17 ---------- .../examples/tables/create-enum-column.md | 18 ---------- .../examples/tables/create-float-column.md | 19 ----------- .../examples/tables/create-index.md | 18 ---------- .../examples/tables/create-integer-column.md | 19 ----------- .../examples/tables/create-ip-column.md | 17 ---------- .../tables/create-relationship-column.md | 19 ----------- .../server-deno/examples/tables/create-row.md | 17 ---------- .../examples/tables/create-rows.md | 14 -------- .../examples/tables/create-string-column.md | 19 ----------- .../examples/tables/create-url-column.md | 17 ---------- .../server-deno/examples/tables/create.md | 17 ---------- .../examples/tables/decrement-row-column.md | 17 ---------- .../examples/tables/delete-column.md | 14 -------- .../examples/tables/delete-index.md | 14 -------- .../server-deno/examples/tables/delete-row.md | 14 -------- .../examples/tables/delete-rows.md | 14 -------- .../server-deno/examples/tables/delete.md | 13 -------- .../server-deno/examples/tables/get-column.md | 14 -------- .../server-deno/examples/tables/get-index.md | 14 -------- .../server-deno/examples/tables/get-row.md | 15 --------- .../1.8.x/server-deno/examples/tables/get.md | 13 -------- .../examples/tables/increment-row-column.md | 17 ---------- .../examples/tables/list-columns.md | 14 -------- .../examples/tables/list-indexes.md | 14 -------- .../server-deno/examples/tables/list-rows.md | 14 -------- .../1.8.x/server-deno/examples/tables/list.md | 14 -------- .../examples/tables/update-boolean-column.md | 17 ---------- .../examples/tables/update-datetime-column.md | 17 ---------- .../examples/tables/update-email-column.md | 17 ---------- .../examples/tables/update-enum-column.md | 18 ---------- .../examples/tables/update-float-column.md | 19 ----------- .../examples/tables/update-integer-column.md | 19 ----------- .../examples/tables/update-ip-column.md | 17 ---------- .../tables/update-relationship-column.md | 16 --------- .../server-deno/examples/tables/update-row.md | 16 --------- .../examples/tables/update-rows.md | 15 --------- .../examples/tables/update-string-column.md | 18 ---------- .../examples/tables/update-url-column.md | 17 ---------- .../server-deno/examples/tables/update.md | 17 ---------- .../server-deno/examples/tables/upsert-row.md | 15 --------- .../examples/tables/upsert-rows.md | 13 -------- .../examples/tables/create-boolean-column.md | 19 ----------- .../examples/tables/create-datetime-column.md | 19 ----------- .../examples/tables/create-email-column.md | 19 ----------- .../examples/tables/create-enum-column.md | 20 ----------- .../examples/tables/create-float-column.md | 21 ------------ .../examples/tables/create-index.md | 21 ------------ .../examples/tables/create-integer-column.md | 21 ------------ .../examples/tables/create-ip-column.md | 19 ----------- .../tables/create-relationship-column.md | 22 ------------- .../examples/tables/create-row.md | 19 ----------- .../examples/tables/create-rows.md | 16 --------- .../examples/tables/create-string-column.md | 21 ------------ .../examples/tables/create-url-column.md | 19 ----------- .../server-dotnet/examples/tables/create.md | 19 ----------- .../examples/tables/decrement-row-column.md | 19 ----------- .../examples/tables/delete-column.md | 16 --------- .../examples/tables/delete-index.md | 16 --------- .../examples/tables/delete-row.md | 16 --------- .../examples/tables/delete-rows.md | 16 --------- .../server-dotnet/examples/tables/delete.md | 15 --------- .../examples/tables/get-column.md | 16 --------- .../examples/tables/get-index.md | 16 --------- .../server-dotnet/examples/tables/get-row.md | 17 ---------- .../server-dotnet/examples/tables/get.md | 15 --------- .../examples/tables/increment-row-column.md | 19 ----------- .../examples/tables/list-columns.md | 16 --------- .../examples/tables/list-indexes.md | 16 --------- .../examples/tables/list-rows.md | 16 --------- .../server-dotnet/examples/tables/list.md | 16 --------- .../examples/tables/update-boolean-column.md | 19 ----------- .../examples/tables/update-datetime-column.md | 19 ----------- .../examples/tables/update-email-column.md | 19 ----------- .../examples/tables/update-enum-column.md | 20 ----------- .../examples/tables/update-float-column.md | 21 ------------ .../examples/tables/update-integer-column.md | 21 ------------ .../examples/tables/update-ip-column.md | 19 ----------- .../tables/update-relationship-column.md | 19 ----------- .../examples/tables/update-row.md | 18 ---------- .../examples/tables/update-rows.md | 17 ---------- .../examples/tables/update-string-column.md | 20 ----------- .../examples/tables/update-url-column.md | 19 ----------- .../server-dotnet/examples/tables/update.md | 19 ----------- .../examples/tables/upsert-row.md | 17 ---------- .../examples/tables/upsert-rows.md | 15 --------- .../examples/tables/create-boolean-column.md | 31 ----------------- .../examples/tables/create-datetime-column.md | 31 ----------------- .../examples/tables/create-email-column.md | 31 ----------------- .../examples/tables/create-enum-column.md | 32 ------------------ .../examples/tables/create-float-column.md | 33 ------------------- .../server-go/examples/tables/create-index.md | 32 ------------------ .../examples/tables/create-integer-column.md | 33 ------------------- .../examples/tables/create-ip-column.md | 31 ----------------- .../tables/create-relationship-column.md | 33 ------------------- .../server-go/examples/tables/create-row.md | 31 ----------------- .../server-go/examples/tables/create-rows.md | 28 ---------------- .../examples/tables/create-string-column.md | 33 ------------------- .../examples/tables/create-url-column.md | 31 ----------------- .../1.8.x/server-go/examples/tables/create.md | 31 ----------------- .../examples/tables/decrement-row-column.md | 31 ----------------- .../examples/tables/delete-column.md | 28 ---------------- .../server-go/examples/tables/delete-index.md | 28 ---------------- .../server-go/examples/tables/delete-row.md | 28 ---------------- .../server-go/examples/tables/delete-rows.md | 28 ---------------- .../1.8.x/server-go/examples/tables/delete.md | 27 --------------- .../server-go/examples/tables/get-column.md | 28 ---------------- .../server-go/examples/tables/get-index.md | 28 ---------------- .../server-go/examples/tables/get-row.md | 29 ---------------- .../1.8.x/server-go/examples/tables/get.md | 27 --------------- .../examples/tables/increment-row-column.md | 31 ----------------- .../server-go/examples/tables/list-columns.md | 28 ---------------- .../server-go/examples/tables/list-indexes.md | 28 ---------------- .../server-go/examples/tables/list-rows.md | 28 ---------------- .../1.8.x/server-go/examples/tables/list.md | 28 ---------------- .../examples/tables/update-boolean-column.md | 31 ----------------- .../examples/tables/update-datetime-column.md | 31 ----------------- .../examples/tables/update-email-column.md | 31 ----------------- .../examples/tables/update-enum-column.md | 32 ------------------ .../examples/tables/update-float-column.md | 33 ------------------- .../examples/tables/update-integer-column.md | 33 ------------------- .../examples/tables/update-ip-column.md | 31 ----------------- .../tables/update-relationship-column.md | 30 ----------------- .../server-go/examples/tables/update-row.md | 30 ----------------- .../server-go/examples/tables/update-rows.md | 29 ---------------- .../examples/tables/update-string-column.md | 32 ------------------ .../examples/tables/update-url-column.md | 31 ----------------- .../1.8.x/server-go/examples/tables/update.md | 31 ----------------- .../server-go/examples/tables/upsert-row.md | 29 ---------------- .../server-go/examples/tables/upsert-rows.md | 27 --------------- .../examples/tables/create-boolean-column.md | 20 ----------- .../examples/tables/create-datetime-column.md | 21 ------------ .../examples/tables/create-email-column.md | 21 ------------ .../examples/tables/create-enum-column.md | 23 ------------- .../examples/tables/create-float-column.md | 24 -------------- .../examples/tables/create-index.md | 21 ------------ .../examples/tables/create-integer-column.md | 24 -------------- .../examples/tables/create-ip-column.md | 21 ------------ .../tables/create-relationship-column.md | 27 --------------- .../examples/tables/create-row.md | 18 ---------- .../examples/tables/create-rows.md | 19 ----------- .../examples/tables/create-string-column.md | 24 -------------- .../examples/tables/create-url-column.md | 21 ------------ .../server-graphql/examples/tables/create.md | 31 ----------------- .../examples/tables/decrement-row-column.md | 19 ----------- .../examples/tables/delete-column.md | 9 ----- .../examples/tables/delete-index.md | 9 ----- .../examples/tables/delete-row.md | 9 ----- .../examples/tables/delete-rows.md | 19 ----------- .../server-graphql/examples/tables/delete.md | 8 ----- .../examples/tables/get-column.md | 0 .../examples/tables/get-index.md | 0 .../server-graphql/examples/tables/get-row.md | 0 .../server-graphql/examples/tables/get.md | 0 .../examples/tables/increment-row-column.md | 19 ----------- .../examples/tables/list-columns.md | 0 .../examples/tables/list-indexes.md | 0 .../examples/tables/list-rows.md | 0 .../server-graphql/examples/tables/list.md | 0 .../examples/tables/update-boolean-column.md | 20 ----------- .../examples/tables/update-datetime-column.md | 21 ------------ .../examples/tables/update-email-column.md | 21 ------------ .../examples/tables/update-enum-column.md | 23 ------------- .../examples/tables/update-float-column.md | 24 -------------- .../examples/tables/update-integer-column.md | 24 -------------- .../examples/tables/update-ip-column.md | 21 ------------ .../tables/update-relationship-column.md | 24 -------------- .../examples/tables/update-row.md | 18 ---------- .../examples/tables/update-rows.md | 20 ----------- .../examples/tables/update-string-column.md | 23 ------------- .../examples/tables/update-url-column.md | 21 ------------ .../server-graphql/examples/tables/update.md | 31 ----------------- .../examples/tables/upsert-row.md | 16 --------- .../examples/tables/upsert-rows.md | 18 ---------- .../java/tables/create-boolean-column.md | 28 ---------------- .../java/tables/create-datetime-column.md | 28 ---------------- .../java/tables/create-email-column.md | 28 ---------------- .../java/tables/create-enum-column.md | 29 ---------------- .../java/tables/create-float-column.md | 30 ----------------- .../server-kotlin/java/tables/create-index.md | 30 ----------------- .../java/tables/create-integer-column.md | 30 ----------------- .../java/tables/create-ip-column.md | 28 ---------------- .../java/tables/create-relationship-column.md | 31 ----------------- .../server-kotlin/java/tables/create-row.md | 28 ---------------- .../server-kotlin/java/tables/create-rows.md | 25 -------------- .../java/tables/create-string-column.md | 30 ----------------- .../java/tables/create-url-column.md | 28 ---------------- .../1.8.x/server-kotlin/java/tables/create.md | 28 ---------------- .../java/tables/decrement-row-column.md | 28 ---------------- .../java/tables/delete-column.md | 25 -------------- .../server-kotlin/java/tables/delete-index.md | 25 -------------- .../server-kotlin/java/tables/delete-row.md | 25 -------------- .../server-kotlin/java/tables/delete-rows.md | 25 -------------- .../1.8.x/server-kotlin/java/tables/delete.md | 24 -------------- .../server-kotlin/java/tables/get-column.md | 25 -------------- .../server-kotlin/java/tables/get-index.md | 25 -------------- .../server-kotlin/java/tables/get-row.md | 26 --------------- .../1.8.x/server-kotlin/java/tables/get.md | 24 -------------- .../java/tables/increment-row-column.md | 28 ---------------- .../server-kotlin/java/tables/list-columns.md | 25 -------------- .../server-kotlin/java/tables/list-indexes.md | 25 -------------- .../server-kotlin/java/tables/list-rows.md | 25 -------------- .../1.8.x/server-kotlin/java/tables/list.md | 25 -------------- .../java/tables/update-boolean-column.md | 28 ---------------- .../java/tables/update-datetime-column.md | 28 ---------------- .../java/tables/update-email-column.md | 28 ---------------- .../java/tables/update-enum-column.md | 29 ---------------- .../java/tables/update-float-column.md | 30 ----------------- .../java/tables/update-integer-column.md | 30 ----------------- .../java/tables/update-ip-column.md | 28 ---------------- .../java/tables/update-relationship-column.md | 27 --------------- .../server-kotlin/java/tables/update-row.md | 27 --------------- .../server-kotlin/java/tables/update-rows.md | 26 --------------- .../java/tables/update-string-column.md | 29 ---------------- .../java/tables/update-url-column.md | 28 ---------------- .../1.8.x/server-kotlin/java/tables/update.md | 28 ---------------- .../server-kotlin/java/tables/upsert-row.md | 26 --------------- .../server-kotlin/java/tables/upsert-rows.md | 24 -------------- .../kotlin/tables/create-boolean-column.md | 19 ----------- .../kotlin/tables/create-datetime-column.md | 19 ----------- .../kotlin/tables/create-email-column.md | 19 ----------- .../kotlin/tables/create-enum-column.md | 20 ----------- .../kotlin/tables/create-float-column.md | 21 ------------ .../kotlin/tables/create-index.md | 21 ------------ .../kotlin/tables/create-integer-column.md | 21 ------------ .../kotlin/tables/create-ip-column.md | 19 ----------- .../tables/create-relationship-column.md | 22 ------------- .../server-kotlin/kotlin/tables/create-row.md | 19 ----------- .../kotlin/tables/create-rows.md | 16 --------- .../kotlin/tables/create-string-column.md | 21 ------------ .../kotlin/tables/create-url-column.md | 19 ----------- .../server-kotlin/kotlin/tables/create.md | 19 ----------- .../kotlin/tables/decrement-row-column.md | 19 ----------- .../kotlin/tables/delete-column.md | 16 --------- .../kotlin/tables/delete-index.md | 16 --------- .../server-kotlin/kotlin/tables/delete-row.md | 16 --------- .../kotlin/tables/delete-rows.md | 16 --------- .../server-kotlin/kotlin/tables/delete.md | 15 --------- .../server-kotlin/kotlin/tables/get-column.md | 16 --------- .../server-kotlin/kotlin/tables/get-index.md | 16 --------- .../server-kotlin/kotlin/tables/get-row.md | 17 ---------- .../1.8.x/server-kotlin/kotlin/tables/get.md | 15 --------- .../kotlin/tables/increment-row-column.md | 19 ----------- .../kotlin/tables/list-columns.md | 16 --------- .../kotlin/tables/list-indexes.md | 16 --------- .../server-kotlin/kotlin/tables/list-rows.md | 16 --------- .../1.8.x/server-kotlin/kotlin/tables/list.md | 16 --------- .../kotlin/tables/update-boolean-column.md | 19 ----------- .../kotlin/tables/update-datetime-column.md | 19 ----------- .../kotlin/tables/update-email-column.md | 19 ----------- .../kotlin/tables/update-enum-column.md | 20 ----------- .../kotlin/tables/update-float-column.md | 21 ------------ .../kotlin/tables/update-integer-column.md | 21 ------------ .../kotlin/tables/update-ip-column.md | 19 ----------- .../tables/update-relationship-column.md | 18 ---------- .../server-kotlin/kotlin/tables/update-row.md | 18 ---------- .../kotlin/tables/update-rows.md | 17 ---------- .../kotlin/tables/update-string-column.md | 20 ----------- .../kotlin/tables/update-url-column.md | 19 ----------- .../server-kotlin/kotlin/tables/update.md | 19 ----------- .../server-kotlin/kotlin/tables/upsert-row.md | 17 ---------- .../kotlin/tables/upsert-rows.md | 15 --------- .../examples/tables/create-boolean-column.md | 17 ---------- .../examples/tables/create-datetime-column.md | 17 ---------- .../examples/tables/create-email-column.md | 17 ---------- .../examples/tables/create-enum-column.md | 18 ---------- .../examples/tables/create-float-column.md | 19 ----------- .../examples/tables/create-index.md | 18 ---------- .../examples/tables/create-integer-column.md | 19 ----------- .../examples/tables/create-ip-column.md | 17 ---------- .../tables/create-relationship-column.md | 19 ----------- .../examples/tables/create-row.md | 17 ---------- .../examples/tables/create-rows.md | 14 -------- .../examples/tables/create-string-column.md | 19 ----------- .../examples/tables/create-url-column.md | 17 ---------- .../server-nodejs/examples/tables/create.md | 17 ---------- .../examples/tables/decrement-row-column.md | 17 ---------- .../examples/tables/delete-column.md | 14 -------- .../examples/tables/delete-index.md | 14 -------- .../examples/tables/delete-row.md | 14 -------- .../examples/tables/delete-rows.md | 14 -------- .../server-nodejs/examples/tables/delete.md | 13 -------- .../examples/tables/get-column.md | 14 -------- .../examples/tables/get-index.md | 14 -------- .../server-nodejs/examples/tables/get-row.md | 15 --------- .../server-nodejs/examples/tables/get.md | 13 -------- .../examples/tables/increment-row-column.md | 17 ---------- .../examples/tables/list-columns.md | 14 -------- .../examples/tables/list-indexes.md | 14 -------- .../examples/tables/list-rows.md | 14 -------- .../server-nodejs/examples/tables/list.md | 14 -------- .../examples/tables/update-boolean-column.md | 17 ---------- .../examples/tables/update-datetime-column.md | 17 ---------- .../examples/tables/update-email-column.md | 17 ---------- .../examples/tables/update-enum-column.md | 18 ---------- .../examples/tables/update-float-column.md | 19 ----------- .../examples/tables/update-integer-column.md | 19 ----------- .../examples/tables/update-ip-column.md | 17 ---------- .../tables/update-relationship-column.md | 16 --------- .../examples/tables/update-row.md | 16 --------- .../examples/tables/update-rows.md | 15 --------- .../examples/tables/update-string-column.md | 18 ---------- .../examples/tables/update-url-column.md | 17 ---------- .../server-nodejs/examples/tables/update.md | 17 ---------- .../examples/tables/upsert-row.md | 15 --------- .../examples/tables/upsert-rows.md | 13 -------- .../examples/tables/create-boolean-column.md | 20 ----------- .../examples/tables/create-datetime-column.md | 20 ----------- .../examples/tables/create-email-column.md | 20 ----------- .../examples/tables/create-enum-column.md | 21 ------------ .../examples/tables/create-float-column.md | 22 ------------- .../examples/tables/create-index.md | 22 ------------- .../examples/tables/create-integer-column.md | 22 ------------- .../examples/tables/create-ip-column.md | 20 ----------- .../tables/create-relationship-column.md | 23 ------------- .../server-php/examples/tables/create-row.md | 20 ----------- .../server-php/examples/tables/create-rows.md | 17 ---------- .../examples/tables/create-string-column.md | 22 ------------- .../examples/tables/create-url-column.md | 20 ----------- .../server-php/examples/tables/create.md | 20 ----------- .../examples/tables/decrement-row-column.md | 20 ----------- .../examples/tables/delete-column.md | 17 ---------- .../examples/tables/delete-index.md | 17 ---------- .../server-php/examples/tables/delete-row.md | 17 ---------- .../server-php/examples/tables/delete-rows.md | 17 ---------- .../server-php/examples/tables/delete.md | 16 --------- .../server-php/examples/tables/get-column.md | 17 ---------- .../server-php/examples/tables/get-index.md | 17 ---------- .../server-php/examples/tables/get-row.md | 18 ---------- .../1.8.x/server-php/examples/tables/get.md | 16 --------- .../examples/tables/increment-row-column.md | 20 ----------- .../examples/tables/list-columns.md | 17 ---------- .../examples/tables/list-indexes.md | 17 ---------- .../server-php/examples/tables/list-rows.md | 17 ---------- .../1.8.x/server-php/examples/tables/list.md | 17 ---------- .../examples/tables/update-boolean-column.md | 20 ----------- .../examples/tables/update-datetime-column.md | 20 ----------- .../examples/tables/update-email-column.md | 20 ----------- .../examples/tables/update-enum-column.md | 21 ------------ .../examples/tables/update-float-column.md | 22 ------------- .../examples/tables/update-integer-column.md | 22 ------------- .../examples/tables/update-ip-column.md | 20 ----------- .../tables/update-relationship-column.md | 19 ----------- .../server-php/examples/tables/update-row.md | 19 ----------- .../server-php/examples/tables/update-rows.md | 18 ---------- .../examples/tables/update-string-column.md | 21 ------------ .../examples/tables/update-url-column.md | 20 ----------- .../server-php/examples/tables/update.md | 20 ----------- .../server-php/examples/tables/upsert-row.md | 18 ---------- .../server-php/examples/tables/upsert-rows.md | 16 --------- .../examples/tables/create-boolean-column.md | 18 ---------- .../examples/tables/create-datetime-column.md | 18 ---------- .../examples/tables/create-email-column.md | 18 ---------- .../examples/tables/create-enum-column.md | 19 ----------- .../examples/tables/create-float-column.md | 20 ----------- .../examples/tables/create-index.md | 20 ----------- .../examples/tables/create-integer-column.md | 20 ----------- .../examples/tables/create-ip-column.md | 18 ---------- .../tables/create-relationship-column.md | 21 ------------ .../examples/tables/create-row.md | 18 ---------- .../examples/tables/create-rows.md | 15 --------- .../examples/tables/create-string-column.md | 20 ----------- .../examples/tables/create-url-column.md | 18 ---------- .../server-python/examples/tables/create.md | 18 ---------- .../examples/tables/decrement-row-column.md | 18 ---------- .../examples/tables/delete-column.md | 15 --------- .../examples/tables/delete-index.md | 15 --------- .../examples/tables/delete-row.md | 15 --------- .../examples/tables/delete-rows.md | 15 --------- .../server-python/examples/tables/delete.md | 14 -------- .../examples/tables/get-column.md | 15 --------- .../examples/tables/get-index.md | 15 --------- .../server-python/examples/tables/get-row.md | 16 --------- .../server-python/examples/tables/get.md | 14 -------- .../examples/tables/increment-row-column.md | 18 ---------- .../examples/tables/list-columns.md | 15 --------- .../examples/tables/list-indexes.md | 15 --------- .../examples/tables/list-rows.md | 15 --------- .../server-python/examples/tables/list.md | 15 --------- .../examples/tables/update-boolean-column.md | 18 ---------- .../examples/tables/update-datetime-column.md | 18 ---------- .../examples/tables/update-email-column.md | 18 ---------- .../examples/tables/update-enum-column.md | 19 ----------- .../examples/tables/update-float-column.md | 20 ----------- .../examples/tables/update-integer-column.md | 20 ----------- .../examples/tables/update-ip-column.md | 18 ---------- .../tables/update-relationship-column.md | 17 ---------- .../examples/tables/update-row.md | 17 ---------- .../examples/tables/update-rows.md | 16 --------- .../examples/tables/update-string-column.md | 19 ----------- .../examples/tables/update-url-column.md | 18 ---------- .../server-python/examples/tables/update.md | 18 ---------- .../examples/tables/upsert-row.md | 16 --------- .../examples/tables/upsert-rows.md | 14 -------- .../examples/tables/create-boolean-column.md | 13 -------- .../examples/tables/create-datetime-column.md | 13 -------- .../examples/tables/create-email-column.md | 13 -------- .../examples/tables/create-enum-column.md | 14 -------- .../examples/tables/create-float-column.md | 15 --------- .../examples/tables/create-index.md | 14 -------- .../examples/tables/create-integer-column.md | 15 --------- .../examples/tables/create-ip-column.md | 13 -------- .../tables/create-relationship-column.md | 15 --------- .../server-rest/examples/tables/create-row.md | 14 -------- .../examples/tables/create-rows.md | 12 ------- .../examples/tables/create-string-column.md | 15 --------- .../examples/tables/create-url-column.md | 13 -------- .../server-rest/examples/tables/create.md | 14 -------- .../examples/tables/decrement-row-column.md | 11 ------- .../examples/tables/delete-column.md | 7 ---- .../examples/tables/delete-index.md | 7 ---- .../server-rest/examples/tables/delete-row.md | 9 ----- .../examples/tables/delete-rows.md | 10 ------ .../server-rest/examples/tables/delete.md | 7 ---- .../server-rest/examples/tables/get-column.md | 5 --- .../server-rest/examples/tables/get-index.md | 5 --- .../server-rest/examples/tables/get-row.md | 7 ---- .../1.8.x/server-rest/examples/tables/get.md | 5 --- .../examples/tables/increment-row-column.md | 11 ------- .../examples/tables/list-columns.md | 5 --- .../examples/tables/list-indexes.md | 5 --- .../server-rest/examples/tables/list-rows.md | 7 ---- .../1.8.x/server-rest/examples/tables/list.md | 5 --- .../examples/tables/update-boolean-column.md | 12 ------- .../examples/tables/update-datetime-column.md | 12 ------- .../examples/tables/update-email-column.md | 12 ------- .../examples/tables/update-enum-column.md | 13 -------- .../examples/tables/update-float-column.md | 14 -------- .../examples/tables/update-integer-column.md | 14 -------- .../examples/tables/update-ip-column.md | 12 ------- .../tables/update-relationship-column.md | 11 ------- .../server-rest/examples/tables/update-row.md | 13 -------- .../examples/tables/update-rows.md | 11 ------- .../examples/tables/update-string-column.md | 13 -------- .../examples/tables/update-url-column.md | 12 ------- .../server-rest/examples/tables/update.md | 13 -------- .../server-rest/examples/tables/upsert-row.md | 9 ----- .../examples/tables/upsert-rows.md | 7 ---- .../examples/tables/create-boolean-column.md | 19 ----------- .../examples/tables/create-datetime-column.md | 19 ----------- .../examples/tables/create-email-column.md | 19 ----------- .../examples/tables/create-enum-column.md | 20 ----------- .../examples/tables/create-float-column.md | 21 ------------ .../examples/tables/create-index.md | 21 ------------ .../examples/tables/create-integer-column.md | 21 ------------ .../examples/tables/create-ip-column.md | 19 ----------- .../tables/create-relationship-column.md | 22 ------------- .../server-ruby/examples/tables/create-row.md | 19 ----------- .../examples/tables/create-rows.md | 16 --------- .../examples/tables/create-string-column.md | 21 ------------ .../examples/tables/create-url-column.md | 19 ----------- .../server-ruby/examples/tables/create.md | 19 ----------- .../examples/tables/decrement-row-column.md | 19 ----------- .../examples/tables/delete-column.md | 16 --------- .../examples/tables/delete-index.md | 16 --------- .../server-ruby/examples/tables/delete-row.md | 16 --------- .../examples/tables/delete-rows.md | 16 --------- .../server-ruby/examples/tables/delete.md | 15 --------- .../server-ruby/examples/tables/get-column.md | 16 --------- .../server-ruby/examples/tables/get-index.md | 16 --------- .../server-ruby/examples/tables/get-row.md | 17 ---------- .../1.8.x/server-ruby/examples/tables/get.md | 15 --------- .../examples/tables/increment-row-column.md | 19 ----------- .../examples/tables/list-columns.md | 16 --------- .../examples/tables/list-indexes.md | 16 --------- .../server-ruby/examples/tables/list-rows.md | 16 --------- .../1.8.x/server-ruby/examples/tables/list.md | 16 --------- .../examples/tables/update-boolean-column.md | 19 ----------- .../examples/tables/update-datetime-column.md | 19 ----------- .../examples/tables/update-email-column.md | 19 ----------- .../examples/tables/update-enum-column.md | 20 ----------- .../examples/tables/update-float-column.md | 21 ------------ .../examples/tables/update-integer-column.md | 21 ------------ .../examples/tables/update-ip-column.md | 19 ----------- .../tables/update-relationship-column.md | 18 ---------- .../server-ruby/examples/tables/update-row.md | 18 ---------- .../examples/tables/update-rows.md | 17 ---------- .../examples/tables/update-string-column.md | 20 ----------- .../examples/tables/update-url-column.md | 19 ----------- .../server-ruby/examples/tables/update.md | 19 ----------- .../server-ruby/examples/tables/upsert-row.md | 17 ---------- .../examples/tables/upsert-rows.md | 15 --------- .../examples/tables/create-boolean-column.md | 18 ---------- .../examples/tables/create-datetime-column.md | 18 ---------- .../examples/tables/create-email-column.md | 18 ---------- .../examples/tables/create-enum-column.md | 19 ----------- .../examples/tables/create-float-column.md | 20 ----------- .../examples/tables/create-index.md | 20 ----------- .../examples/tables/create-integer-column.md | 20 ----------- .../examples/tables/create-ip-column.md | 18 ---------- .../tables/create-relationship-column.md | 21 ------------ .../examples/tables/create-row.md | 18 ---------- .../examples/tables/create-rows.md | 15 --------- .../examples/tables/create-string-column.md | 20 ----------- .../examples/tables/create-url-column.md | 18 ---------- .../server-swift/examples/tables/create.md | 18 ---------- .../examples/tables/decrement-row-column.md | 18 ---------- .../examples/tables/delete-column.md | 15 --------- .../examples/tables/delete-index.md | 15 --------- .../examples/tables/delete-row.md | 15 --------- .../examples/tables/delete-rows.md | 15 --------- .../server-swift/examples/tables/delete.md | 14 -------- .../examples/tables/get-column.md | 15 --------- .../server-swift/examples/tables/get-index.md | 15 --------- .../server-swift/examples/tables/get-row.md | 16 --------- .../1.8.x/server-swift/examples/tables/get.md | 14 -------- .../examples/tables/increment-row-column.md | 18 ---------- .../examples/tables/list-columns.md | 15 --------- .../examples/tables/list-indexes.md | 15 --------- .../server-swift/examples/tables/list-rows.md | 15 --------- .../server-swift/examples/tables/list.md | 15 --------- .../examples/tables/update-boolean-column.md | 18 ---------- .../examples/tables/update-datetime-column.md | 18 ---------- .../examples/tables/update-email-column.md | 18 ---------- .../examples/tables/update-enum-column.md | 19 ----------- .../examples/tables/update-float-column.md | 20 ----------- .../examples/tables/update-integer-column.md | 20 ----------- .../examples/tables/update-ip-column.md | 18 ---------- .../tables/update-relationship-column.md | 18 ---------- .../examples/tables/update-row.md | 17 ---------- .../examples/tables/update-rows.md | 16 --------- .../examples/tables/update-string-column.md | 19 ----------- .../examples/tables/update-url-column.md | 18 ---------- .../server-swift/examples/tables/update.md | 18 ---------- .../examples/tables/upsert-row.md | 16 --------- .../examples/tables/upsert-rows.md | 14 -------- 724 files changed, 12612 deletions(-) delete mode 100644 docs/examples/1.8.x/client-android/java/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-android/java/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-android/java/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-android/java/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-android/java/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-android/java/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-android/java/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/client-web/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get-usage.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-logs.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/get-usage.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-logs.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/create.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/get.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/list.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/update.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-index.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/create.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-index.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/delete.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get-index.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/get.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list-columns.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/list.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-rows.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/update.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md delete mode 100644 docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md diff --git a/docs/examples/1.8.x/client-android/java/tables/create-row.md b/docs/examples/1.8.x/client-android/java/tables/create-row.md deleted file mode 100644 index 8102b82c75..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/create-row.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -tables.createRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/tables/create-rows.md b/docs/examples/1.8.x/client-android/java/tables/create-rows.md deleted file mode 100644 index 26f5d67789..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/create-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey(""); // - -Tables tables = new Tables(client); - -tables.createRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // rows - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/tables/delete-row.md b/docs/examples/1.8.x/client-android/java/tables/delete-row.md deleted file mode 100644 index 596a8b7aca..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/delete-row.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Tables tables = new Tables(client); - -tables.deleteRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/tables/get-row.md b/docs/examples/1.8.x/client-android/java/tables/get-row.md deleted file mode 100644 index 882a195376..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/get-row.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Tables tables = new Tables(client); - -tables.getRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/tables/list-rows.md b/docs/examples/1.8.x/client-android/java/tables/list-rows.md deleted file mode 100644 index 4d37570246..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/list-rows.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Tables tables = new Tables(client); - -tables.listRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/tables/update-row.md b/docs/examples/1.8.x/client-android/java/tables/update-row.md deleted file mode 100644 index 0421c9cffb..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/update-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>"); // Your project ID - -Tables tables = new Tables(client); - -tables.updateRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/java/tables/upsert-row.md b/docs/examples/1.8.x/client-android/java/tables/upsert-row.md deleted file mode 100644 index a8be0cfc6c..0000000000 --- a/docs/examples/1.8.x/client-android/java/tables/upsert-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -tables.upsertRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); - diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md deleted file mode 100644 index 8c581bf1d5..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -val tables = Tables(client) - -val result = tables.createRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), - permissions = listOf("read("any")"), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md b/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md deleted file mode 100644 index 1fde9c50cf..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("") // - -val tables = Tables(client) - -val result = tables.createRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rows = listOf(), -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md deleted file mode 100644 index ffa3229f30..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val tables = Tables(client) - -val result = tables.deleteRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md deleted file mode 100644 index 15dabff397..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val tables = Tables(client) - -val result = tables.getRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - queries = listOf(), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md b/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md deleted file mode 100644 index ff36543938..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val tables = Tables(client) - -val result = tables.listRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf(), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md deleted file mode 100644 index e9b515cef4..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -val tables = Tables(client) - -val result = tables.updateRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), // (optional) - permissions = listOf("read("any")"), // (optional) -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md b/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md deleted file mode 100644 index 6b7cb6666b..0000000000 --- a/docs/examples/1.8.x/client-android/kotlin/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client(context) - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -val tables = Tables(client) - -val result = tables.upsertRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", -) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-apple/examples/tables/create-row.md b/docs/examples/1.8.x/client-apple/examples/tables/create-row.md deleted file mode 100644 index 533cf2d555..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -let tables = Tables(client) - -let row = try await tables.createRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md b/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md deleted file mode 100644 index effd748aa0..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/create-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("") // - -let tables = Tables(client) - -let rowList = try await tables.createRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: [] -) - diff --git a/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md b/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md deleted file mode 100644 index 7d12ec4f4c..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/delete-row.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let tables = Tables(client) - -let result = try await tables.deleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -) - diff --git a/docs/examples/1.8.x/client-apple/examples/tables/get-row.md b/docs/examples/1.8.x/client-apple/examples/tables/get-row.md deleted file mode 100644 index 93fbef9e7c..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/get-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let tables = Tables(client) - -let row = try await tables.getRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md b/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md deleted file mode 100644 index 31545cce4d..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/list-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let tables = Tables(client) - -let rowList = try await tables.listRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/client-apple/examples/tables/update-row.md b/docs/examples/1.8.x/client-apple/examples/tables/update-row.md deleted file mode 100644 index 601c4f0a77..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/update-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - -let tables = Tables(client) - -let row = try await tables.updateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], // optional - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md deleted file mode 100644 index eabcb181c3..0000000000 --- a/docs/examples/1.8.x/client-apple/examples/tables/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -let tables = Tables(client) - -let row = try await tables.upsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -) - diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md deleted file mode 100644 index ac9923d813..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -Tables tables = Tables(client); - -Row result = await tables.createRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, - permissions: ["read("any")"], // optional -); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md b/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md deleted file mode 100644 index 38c4c7503d..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/create-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey(''); // - -Tables tables = Tables(client); - -RowList result = await tables.createRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rows: [], -); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md deleted file mode 100644 index 4187c4766d..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/delete-row.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Tables tables = Tables(client); - -await tables.deleteRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', -); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md deleted file mode 100644 index 8d8c52caa6..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/get-row.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Tables tables = Tables(client); - -Row result = await tables.getRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - queries: [], // optional -); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md b/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md deleted file mode 100644 index f770bbbd92..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/list-rows.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Tables tables = Tables(client); - -RowList result = await tables.listRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // optional -); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md deleted file mode 100644 index f43ba5e689..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/update-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -Tables tables = Tables(client); - -Row result = await tables.updateRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, // optional - permissions: ["read("any")"], // optional -); diff --git a/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md deleted file mode 100644 index 26a872b692..0000000000 --- a/docs/examples/1.8.x/client-flutter/examples/tables/upsert-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:appwrite/appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -Tables tables = Tables(client); - -Row result = await tables.upsertRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', -); diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md deleted file mode 100644 index c88a7f36cf..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/tables/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - tablesCreateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md b/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md deleted file mode 100644 index a4ae62cfae..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/tables/create-rows.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - tablesCreateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: [] - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md deleted file mode 100644 index f3a35c1df1..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/tables/delete-row.md +++ /dev/null @@ -1,9 +0,0 @@ -mutation { - tablesDeleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" - ) { - status - } -} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/get-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/get-row.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md b/docs/examples/1.8.x/client-graphql/examples/tables/list-rows.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md deleted file mode 100644 index 8449d8499b..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/tables/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - tablesUpdateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md deleted file mode 100644 index 480d7651bd..0000000000 --- a/docs/examples/1.8.x/client-graphql/examples/tables/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -mutation { - tablesUpsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md deleted file mode 100644 index 75de1c2a39..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const result = await tables.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md b/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md deleted file mode 100644 index 165aa4cb71..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey(''); // - -const tables = new Tables(client); - -const result = await tables.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md deleted file mode 100644 index 9746f85ea0..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md deleted file mode 100644 index b9434e3957..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md b/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md deleted file mode 100644 index 75f81a1435..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md deleted file mode 100644 index 7bb36dd254..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md deleted file mode 100644 index f176425abb..0000000000 --- a/docs/examples/1.8.x/client-react-native/examples/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "react-native-appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const result = await tables.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-rest/examples/tables/create-row.md b/docs/examples/1.8.x/client-rest/examples/tables/create-row.md deleted file mode 100644 index c4166b8b80..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/create-row.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - -{ - "rowId": "<ROW_ID>", - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md b/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md deleted file mode 100644 index 0935afd11e..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/create-rows.md +++ /dev/null @@ -1,11 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - -{ - "rows": [] -} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md b/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md deleted file mode 100644 index 954303d17a..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/delete-row.md +++ /dev/null @@ -1,8 +0,0 @@ -DELETE /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - diff --git a/docs/examples/1.8.x/client-rest/examples/tables/get-row.md b/docs/examples/1.8.x/client-rest/examples/tables/get-row.md deleted file mode 100644 index fc09601df7..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/get-row.md +++ /dev/null @@ -1,6 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md b/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md deleted file mode 100644 index de214e7cea..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/list-rows.md +++ /dev/null @@ -1,6 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/tables/update-row.md b/docs/examples/1.8.x/client-rest/examples/tables/update-row.md deleted file mode 100644 index f09f639e60..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/update-row.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - -{ - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md deleted file mode 100644 index 60528077ef..0000000000 --- a/docs/examples/1.8.x/client-rest/examples/tables/upsert-row.md +++ /dev/null @@ -1,8 +0,0 @@ -PUT /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-JWT: <YOUR_JWT> - diff --git a/docs/examples/1.8.x/client-web/examples/tables/create-row.md b/docs/examples/1.8.x/client-web/examples/tables/create-row.md deleted file mode 100644 index f7b54d1894..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const result = await tables.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/create-rows.md b/docs/examples/1.8.x/client-web/examples/tables/create-rows.md deleted file mode 100644 index 79d7d3f311..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey(''); // - -const tables = new Tables(client); - -const result = await tables.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/delete-row.md b/docs/examples/1.8.x/client-web/examples/tables/delete-row.md deleted file mode 100644 index 5c6c4b96d9..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/get-row.md b/docs/examples/1.8.x/client-web/examples/tables/get-row.md deleted file mode 100644 index 708b3d96cc..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/list-rows.md b/docs/examples/1.8.x/client-web/examples/tables/list-rows.md deleted file mode 100644 index f82d358f0d..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/update-row.md b/docs/examples/1.8.x/client-web/examples/tables/update-row.md deleted file mode 100644 index 0e0c5a012e..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md b/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md deleted file mode 100644 index f111fefd71..0000000000 --- a/docs/examples/1.8.x/client-web/examples/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "appwrite"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const result = await tables.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md deleted file mode 100644 index 88e6bf8853..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables createBooleanColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md deleted file mode 100644 index de28b7537c..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables createDatetimeColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md deleted file mode 100644 index 23b672e62d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-email-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables createEmailColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md deleted file mode 100644 index 4cd3e1d241..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-enum-column.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite tables createEnumColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --elements one two three \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md deleted file mode 100644 index 9c69e29e91..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-float-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite tables createFloatColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-index.md b/docs/examples/1.8.x/console-cli/examples/tables/create-index.md deleted file mode 100644 index 4c6d641727..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-index.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite tables createIndex \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --type key \ - --columns one two three \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md deleted file mode 100644 index afab48e803..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-integer-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite tables createIntegerColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md deleted file mode 100644 index 000b54b918..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-ip-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables createIpColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md deleted file mode 100644 index 4ce3342768..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite tables createRelationshipColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --relatedTableId <RELATED_TABLE_ID> \ - --type oneToOne \ - - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-row.md b/docs/examples/1.8.x/console-cli/examples/tables/create-row.md deleted file mode 100644 index e446de157b..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-row.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite tables createRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - --data '{ "key": "value" }' \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md deleted file mode 100644 index cb7c68dd7b..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-rows.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables createRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rows one two three diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md deleted file mode 100644 index 4df1792a34..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-string-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite tables createStringColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --size 1 \ - --required false \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md b/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md deleted file mode 100644 index fcb81491bd..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create-url-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables createUrlColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/create.md b/docs/examples/1.8.x/console-cli/examples/tables/create.md deleted file mode 100644 index 09f52f16a1..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/create.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables create \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --name <NAME> \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md deleted file mode 100644 index 73743c21ce..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables decrementRowColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - --column '' \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md deleted file mode 100644 index e659af54d0..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/delete-column.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables deleteColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md deleted file mode 100644 index 0de1e417d3..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/delete-index.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables deleteIndex \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md deleted file mode 100644 index d6918be89e..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/delete-row.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables deleteRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md deleted file mode 100644 index 579586b561..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/delete-rows.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables deleteRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/delete.md b/docs/examples/1.8.x/console-cli/examples/tables/delete.md deleted file mode 100644 index 0f189e09f1..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/delete.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite tables delete \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-column.md b/docs/examples/1.8.x/console-cli/examples/tables/get-column.md deleted file mode 100644 index 33a94b5ebc..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/get-column.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables getColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-index.md b/docs/examples/1.8.x/console-cli/examples/tables/get-index.md deleted file mode 100644 index e956175e09..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/get-index.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables getIndex \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-row.md b/docs/examples/1.8.x/console-cli/examples/tables/get-row.md deleted file mode 100644 index 5b3b64bfbc..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/get-row.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite tables getRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md b/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md deleted file mode 100644 index f766a418a0..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/get-table-usage.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables getTableUsage \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md b/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md deleted file mode 100644 index ca955ce6df..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/get-usage.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables getUsage \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/get.md b/docs/examples/1.8.x/console-cli/examples/tables/get.md deleted file mode 100644 index a41e6c10ed..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/get.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite tables get \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md b/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md deleted file mode 100644 index da73950231..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/increment-row-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables incrementRowColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - --column '' \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md b/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md deleted file mode 100644 index 0439d58127..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/list-columns.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables listColumns \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md b/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md deleted file mode 100644 index b5fd85b911..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/list-indexes.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables listIndexes \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md b/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md deleted file mode 100644 index 08c4ff0f8d..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/list-logs.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables listLogs \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md b/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md deleted file mode 100644 index e7a8c5b8ce..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/list-row-logs.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite tables listRowLogs \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md deleted file mode 100644 index 2a6d69d574..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/list-rows.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables listRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/list.md b/docs/examples/1.8.x/console-cli/examples/tables/list.md deleted file mode 100644 index 1c58d9ed03..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/list.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables list \ - --databaseId <DATABASE_ID> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md deleted file mode 100644 index 7d736f35e5..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables updateBooleanColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default false \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md deleted file mode 100644 index 3da3e4a919..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables updateDatetimeColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default '' \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md deleted file mode 100644 index df718b8d9a..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-email-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables updateEmailColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default email@example.com \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md deleted file mode 100644 index 55c55fc2bd..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-enum-column.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite tables updateEnumColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --elements one two three \ - --required false \ - --default <DEFAULT> \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md deleted file mode 100644 index 99667a8447..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-float-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite tables updateFloatColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default null \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md deleted file mode 100644 index 098efa0e3e..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-integer-column.md +++ /dev/null @@ -1,9 +0,0 @@ -appwrite tables updateIntegerColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default null \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md deleted file mode 100644 index 50eadc3fff..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-ip-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables updateIpColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default '' \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md deleted file mode 100644 index 43e0c0ae6e..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite tables updateRelationshipColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-row.md b/docs/examples/1.8.x/console-cli/examples/tables/update-row.md deleted file mode 100644 index d5cd0fe4ee..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-row.md +++ /dev/null @@ -1,6 +0,0 @@ -appwrite tables updateRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md deleted file mode 100644 index 173d608d5a..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-rows.md +++ /dev/null @@ -1,5 +0,0 @@ -appwrite tables updateRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md deleted file mode 100644 index 3feaa734ec..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-string-column.md +++ /dev/null @@ -1,8 +0,0 @@ -appwrite tables updateStringColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default <DEFAULT> \ - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md b/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md deleted file mode 100644 index 2df1ab14d7..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update-url-column.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables updateUrlColumn \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --key '' \ - --required false \ - --default https://example.com \ - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/update.md b/docs/examples/1.8.x/console-cli/examples/tables/update.md deleted file mode 100644 index a1550287c8..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/update.md +++ /dev/null @@ -1,7 +0,0 @@ -appwrite tables update \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --name <NAME> \ - - - diff --git a/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md b/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md deleted file mode 100644 index 0281a89b20..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/upsert-row.md +++ /dev/null @@ -1,4 +0,0 @@ -appwrite tables upsertRow \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> \ - --rowId <ROW_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md b/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md deleted file mode 100644 index 828caf8f10..0000000000 --- a/docs/examples/1.8.x/console-cli/examples/tables/upsert-rows.md +++ /dev/null @@ -1,3 +0,0 @@ -appwrite tables upsertRows \ - --databaseId <DATABASE_ID> \ - --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md deleted file mode 100644 index bf0cca08c1..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md deleted file mode 100644 index c9eb3af82c..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md deleted file mode 100644 index 3952161779..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md deleted file mode 100644 index 7b16da6c14..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md deleted file mode 100644 index 6608864efe..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-index.md b/docs/examples/1.8.x/console-web/examples/tables/create-index.md deleted file mode 100644 index c303dd289d..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-index.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables, IndexType } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - IndexType.Key, // type - [], // columns - [], // orders (optional) - [] // lengths (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md deleted file mode 100644 index 0490b71189..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md deleted file mode 100644 index 644f520032..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md deleted file mode 100644 index 5658eec690..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Tables, RelationshipType, RelationMutate } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<RELATED_TABLE_ID>', // relatedTableId - RelationshipType.OneToOne, // type - false, // twoWay (optional) - '', // key (optional) - '', // twoWayKey (optional) - RelationMutate.Cascade // onDelete (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-row.md b/docs/examples/1.8.x/console-web/examples/tables/create-row.md deleted file mode 100644 index ba18cb6fba..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const result = await tables.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-rows.md b/docs/examples/1.8.x/console-web/examples/tables/create-rows.md deleted file mode 100644 index bd7f984ee3..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const result = await tables.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md deleted file mode 100644 index 6c1fbd7c99..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - 1, // size - false, // required - '<DEFAULT>', // default (optional) - false, // array (optional) - false // encrypt (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md b/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md deleted file mode 100644 index 88e1fc584d..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.createUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/create.md b/docs/examples/1.8.x/console-web/examples/tables/create.md deleted file mode 100644 index a7bda74508..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/create.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.create( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md deleted file mode 100644 index 35cb78686c..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.decrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // min (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-column.md b/docs/examples/1.8.x/console-web/examples/tables/delete-column.md deleted file mode 100644 index 642856448a..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/delete-column.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.deleteColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-index.md b/docs/examples/1.8.x/console-web/examples/tables/delete-index.md deleted file mode 100644 index f517513909..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/delete-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.deleteIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-row.md b/docs/examples/1.8.x/console-web/examples/tables/delete-row.md deleted file mode 100644 index accbb3092a..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md b/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md deleted file mode 100644 index adbb613a35..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/delete-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.deleteRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/delete.md b/docs/examples/1.8.x/console-web/examples/tables/delete.md deleted file mode 100644 index f235d8dda0..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.delete( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-column.md b/docs/examples/1.8.x/console-web/examples/tables/get-column.md deleted file mode 100644 index 7bd7f2db30..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/get-column.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-index.md b/docs/examples/1.8.x/console-web/examples/tables/get-index.md deleted file mode 100644 index dc8c3362cf..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/get-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-row.md b/docs/examples/1.8.x/console-web/examples/tables/get-row.md deleted file mode 100644 index f37558d4ff..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md b/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md deleted file mode 100644 index 4e6ca3270d..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/get-table-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables, } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getTableUsage( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - .24h // range (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get-usage.md b/docs/examples/1.8.x/console-web/examples/tables/get-usage.md deleted file mode 100644 index 0f9d31c92d..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/get-usage.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables, DatabaseUsageRange } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.getUsage( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - DatabaseUsageRange.TwentyFourHours // range (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/get.md b/docs/examples/1.8.x/console-web/examples/tables/get.md deleted file mode 100644 index 2b8951582a..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/get.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.get( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md b/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md deleted file mode 100644 index ed9710a0e3..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/increment-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.incrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // max (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-columns.md b/docs/examples/1.8.x/console-web/examples/tables/list-columns.md deleted file mode 100644 index 91348c4e61..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/list-columns.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listColumns( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md b/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md deleted file mode 100644 index 0ae874663d..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/list-indexes.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listIndexes( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-logs.md b/docs/examples/1.8.x/console-web/examples/tables/list-logs.md deleted file mode 100644 index 04d6c2300c..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/list-logs.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listLogs( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md b/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md deleted file mode 100644 index 691e589a77..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/list-row-logs.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listRowLogs( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list-rows.md b/docs/examples/1.8.x/console-web/examples/tables/list-rows.md deleted file mode 100644 index 79f5e242a5..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/list.md b/docs/examples/1.8.x/console-web/examples/tables/list.md deleted file mode 100644 index e8eb3c3dd6..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/list.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.list( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md deleted file mode 100644 index e4bb9012e6..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md deleted file mode 100644 index d24683aafb..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md deleted file mode 100644 index b9e2483191..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md deleted file mode 100644 index bfe084212c..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md deleted file mode 100644 index 9075e31e69..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md deleted file mode 100644 index c45e4735a9..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md deleted file mode 100644 index f7cdb490dc..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md deleted file mode 100644 index 192eac7175..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables, RelationMutate } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-row.md b/docs/examples/1.8.x/console-web/examples/tables/update-row.md deleted file mode 100644 index 0db00657c2..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-rows.md b/docs/examples/1.8.x/console-web/examples/tables/update-rows.md deleted file mode 100644 index 72b2244f75..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - {}, // data (optional) - [] // queries (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md deleted file mode 100644 index 8f6b3b5dad..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '<DEFAULT>', // default - 1, // size (optional) - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md b/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md deleted file mode 100644 index a2cb65d700..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.updateUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/update.md b/docs/examples/1.8.x/console-web/examples/tables/update.md deleted file mode 100644 index f0552604af..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/update.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>'); // Your project ID - -const tables = new Tables(client); - -const result = await tables.update( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md b/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md deleted file mode 100644 index f1cb65e675..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const result = await tables.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); - -console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md b/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md deleted file mode 100644 index 2d818cdbca..0000000000 --- a/docs/examples/1.8.x/console-web/examples/tables/upsert-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "@appwrite.io/console"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const result = await tables.upsertRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); - -console.log(result); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md deleted file mode 100644 index 5b3e987b9b..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnBoolean result = await tables.createBooleanColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: false, // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md deleted file mode 100644 index 1ad3fa250d..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnDatetime result = await tables.createDatetimeColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md deleted file mode 100644 index fa7ec71410..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnEmail result = await tables.createEmailColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 'email@example.com', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md deleted file mode 100644 index 5ab6bcc774..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnEnum result = await tables.createEnumColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - elements: [], - xrequired: false, - xdefault: '<DEFAULT>', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md deleted file mode 100644 index 43331187ea..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnFloat result = await tables.createFloatColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - min: 0, // (optional) - max: 0, // (optional) - xdefault: 0, // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-index.md b/docs/examples/1.8.x/server-dart/examples/tables/create-index.md deleted file mode 100644 index d76c46959f..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-index.md +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnIndex result = await tables.createIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - type: IndexType.key, - columns: [], - orders: [], // (optional) - lengths: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md deleted file mode 100644 index 3304325af7..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnInteger result = await tables.createIntegerColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - min: 0, // (optional) - max: 0, // (optional) - xdefault: 0, // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md deleted file mode 100644 index 68c7abf754..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnIp result = await tables.createIpColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md deleted file mode 100644 index a059740bf8..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnRelationship result = await tables.createRelationshipColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - relatedTableId: '<RELATED_TABLE_ID>', - type: RelationshipType.oneToOne, - twoWay: false, // (optional) - key: '', // (optional) - twoWayKey: '', // (optional) - onDelete: RelationMutate.cascade, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-row.md b/docs/examples/1.8.x/server-dart/examples/tables/create-row.md deleted file mode 100644 index 1ce1e1db7a..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -Tables tables = Tables(client); - -Row result = await tables.createRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, - permissions: ["read("any")"], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md deleted file mode 100644 index 219f2d2d33..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -RowList result = await tables.createRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rows: [], -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md deleted file mode 100644 index 17e192b27e..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnString result = await tables.createStringColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - size: 1, - xrequired: false, - xdefault: '<DEFAULT>', // (optional) - array: false, // (optional) - encrypt: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md deleted file mode 100644 index d3692fc7ac..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnUrl result = await tables.createUrlColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 'https://example.com', // (optional) - array: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/create.md b/docs/examples/1.8.x/server-dart/examples/tables/create.md deleted file mode 100644 index c3a4b2a989..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/create.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -Table result = await tables.create( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], // (optional) - rowSecurity: false, // (optional) - enabled: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md deleted file mode 100644 index 33d296110c..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -Row result = await tables.decrementRowColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - column: '', - value: 0, // (optional) - min: 0, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md deleted file mode 100644 index 466564f618..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/delete-column.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -await tables.deleteColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md deleted file mode 100644 index f2dfdbe74b..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/delete-index.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -await tables.deleteIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md deleted file mode 100644 index b84c1b7a9f..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/delete-row.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Tables tables = Tables(client); - -await tables.deleteRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md deleted file mode 100644 index 41dc3a9520..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/delete-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -await tables.deleteRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/delete.md b/docs/examples/1.8.x/server-dart/examples/tables/delete.md deleted file mode 100644 index 07c9815422..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/delete.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -await tables.delete( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-column.md b/docs/examples/1.8.x/server-dart/examples/tables/get-column.md deleted file mode 100644 index 087139c87d..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/get-column.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - - result = await tables.getColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-index.md b/docs/examples/1.8.x/server-dart/examples/tables/get-index.md deleted file mode 100644 index 3f79deef2f..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/get-index.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnIndex result = await tables.getIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get-row.md b/docs/examples/1.8.x/server-dart/examples/tables/get-row.md deleted file mode 100644 index 7efd04a69d..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/get-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Tables tables = Tables(client); - -Row result = await tables.getRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/get.md b/docs/examples/1.8.x/server-dart/examples/tables/get.md deleted file mode 100644 index d02f9ff9d2..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/get.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -Table result = await tables.get( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md deleted file mode 100644 index 188ab5d1ad..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/increment-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -Row result = await tables.incrementRowColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - column: '', - value: 0, // (optional) - max: 0, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md b/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md deleted file mode 100644 index 7b2d479ea3..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/list-columns.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnList result = await tables.listColumns( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md deleted file mode 100644 index e7418de3bc..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnIndexList result = await tables.listIndexes( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md deleted file mode 100644 index 05f9567ac2..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/list-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Tables tables = Tables(client); - -RowList result = await tables.listRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/list.md b/docs/examples/1.8.x/server-dart/examples/tables/list.md deleted file mode 100644 index 51a19c099d..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/list.md +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -TableList result = await tables.list( - databaseId: '<DATABASE_ID>', - queries: [], // (optional) - search: '<SEARCH>', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md deleted file mode 100644 index c452238d7c..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnBoolean result = await tables.updateBooleanColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: false, - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md deleted file mode 100644 index 5b41d7e532..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnDatetime result = await tables.updateDatetimeColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md deleted file mode 100644 index 444649a4fd..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnEmail result = await tables.updateEmailColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 'email@example.com', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md deleted file mode 100644 index 2e0566418a..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnEnum result = await tables.updateEnumColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - elements: [], - xrequired: false, - xdefault: '<DEFAULT>', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md deleted file mode 100644 index 199d3840d6..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnFloat result = await tables.updateFloatColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 0, - min: 0, // (optional) - max: 0, // (optional) - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md deleted file mode 100644 index 479e63d870..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnInteger result = await tables.updateIntegerColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 0, - min: 0, // (optional) - max: 0, // (optional) - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md deleted file mode 100644 index 837ae4e606..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnIp result = await tables.updateIpColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md deleted file mode 100644 index 45745627ef..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnRelationship result = await tables.updateRelationshipColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - onDelete: RelationMutate.cascade, // (optional) - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-row.md b/docs/examples/1.8.x/server-dart/examples/tables/update-row.md deleted file mode 100644 index 436329235a..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -Tables tables = Tables(client); - -Row result = await tables.updateRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: {}, // (optional) - permissions: ["read("any")"], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md deleted file mode 100644 index 3d2aaf3e28..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -RowList result = await tables.updateRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - data: {}, // (optional) - queries: [], // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md deleted file mode 100644 index dbd569feac..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-string-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnString result = await tables.updateStringColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: '<DEFAULT>', - size: 1, // (optional) - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md deleted file mode 100644 index 8630c718b5..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -ColumnUrl result = await tables.updateUrlColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - xrequired: false, - xdefault: 'https://example.com', - newKey: '', // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/update.md b/docs/examples/1.8.x/server-dart/examples/tables/update.md deleted file mode 100644 index 28ce03cd6c..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/update.md +++ /dev/null @@ -1,17 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -Table result = await tables.update( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], // (optional) - rowSecurity: false, // (optional) - enabled: false, // (optional) -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md deleted file mode 100644 index 47f93f2434..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/upsert-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -Tables tables = Tables(client); - -Row result = await tables.upsertRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', -); diff --git a/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md deleted file mode 100644 index 73ceffa917..0000000000 --- a/docs/examples/1.8.x/server-dart/examples/tables/upsert-rows.md +++ /dev/null @@ -1,13 +0,0 @@ -import 'package:dart_appwrite/dart_appwrite.dart'; - -Client client = Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -Tables tables = Tables(client); - -RowList result = await tables.upsertRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md deleted file mode 100644 index 3f9abc8c05..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md deleted file mode 100644 index 898b67a787..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md deleted file mode 100644 index 82872e4087..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md deleted file mode 100644 index afbb8d00aa..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md deleted file mode 100644 index 44658bbaa9..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-index.md b/docs/examples/1.8.x/server-deno/examples/tables/create-index.md deleted file mode 100644 index c255189881..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-index.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables, IndexType } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - IndexType.Key, // type - [], // columns - [], // orders (optional) - [] // lengths (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md deleted file mode 100644 index 0f1721b24a..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md deleted file mode 100644 index ca96de6293..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md deleted file mode 100644 index 8c7e26e62c..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<RELATED_TABLE_ID>', // relatedTableId - RelationshipType.OneToOne, // type - false, // twoWay (optional) - '', // key (optional) - '', // twoWayKey (optional) - RelationMutate.Cascade // onDelete (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-row.md b/docs/examples/1.8.x/server-deno/examples/tables/create-row.md deleted file mode 100644 index 12cec49af0..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const response = await tables.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md deleted file mode 100644 index 6c4f7d5627..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md deleted file mode 100644 index db7ac8a760..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - 1, // size - false, // required - '<DEFAULT>', // default (optional) - false, // array (optional) - false // encrypt (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md deleted file mode 100644 index 8d6f127c00..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.createUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/create.md b/docs/examples/1.8.x/server-deno/examples/tables/create.md deleted file mode 100644 index 9c75c22c3d..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/create.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.create( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md deleted file mode 100644 index e561acc529..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.decrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // min (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md deleted file mode 100644 index 89900bfbf0..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/delete-column.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.deleteColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md deleted file mode 100644 index a17791cef2..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/delete-index.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.deleteIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md deleted file mode 100644 index 8f30eae2d2..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/delete-row.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new Tables(client); - -const response = await tables.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md deleted file mode 100644 index c5aa88f9a2..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/delete-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.deleteRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/delete.md b/docs/examples/1.8.x/server-deno/examples/tables/delete.md deleted file mode 100644 index 36df1373dc..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/delete.md +++ /dev/null @@ -1,13 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.delete( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-column.md b/docs/examples/1.8.x/server-deno/examples/tables/get-column.md deleted file mode 100644 index 8a56af67e7..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/get-column.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.getColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-index.md b/docs/examples/1.8.x/server-deno/examples/tables/get-index.md deleted file mode 100644 index 61105dc661..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/get-index.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.getIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get-row.md b/docs/examples/1.8.x/server-deno/examples/tables/get-row.md deleted file mode 100644 index 674ea3e648..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/get-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new Tables(client); - -const response = await tables.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/get.md b/docs/examples/1.8.x/server-deno/examples/tables/get.md deleted file mode 100644 index cc1dcb8c51..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/get.md +++ /dev/null @@ -1,13 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.get( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md deleted file mode 100644 index 9779d8776e..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/increment-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.incrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // max (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md b/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md deleted file mode 100644 index 63ec0777bb..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/list-columns.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.listColumns( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md deleted file mode 100644 index 587d19f362..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.listIndexes( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md deleted file mode 100644 index 6db6bea439..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/list-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new Tables(client); - -const response = await tables.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/list.md b/docs/examples/1.8.x/server-deno/examples/tables/list.md deleted file mode 100644 index d4da8409c9..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/list.md +++ /dev/null @@ -1,14 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.list( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md deleted file mode 100644 index 8710c27ede..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md deleted file mode 100644 index e1ca760e31..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md deleted file mode 100644 index b0e25348d4..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md deleted file mode 100644 index 8771213a79..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md deleted file mode 100644 index a2e6f55c1f..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md deleted file mode 100644 index 51ea17f943..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md deleted file mode 100644 index 4a5a1d0f81..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md deleted file mode 100644 index c83b82037a..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-row.md b/docs/examples/1.8.x/server-deno/examples/tables/update-row.md deleted file mode 100644 index 13da5615e7..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new Tables(client); - -const response = await tables.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md deleted file mode 100644 index 1bc0a18b98..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - {}, // data (optional) - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md deleted file mode 100644 index 00dd310b1e..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-string-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '<DEFAULT>', // default - 1, // size (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md deleted file mode 100644 index 2ebf80a356..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.updateUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/update.md b/docs/examples/1.8.x/server-deno/examples/tables/update.md deleted file mode 100644 index 43b51bd284..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/update.md +++ /dev/null @@ -1,17 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.update( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md deleted file mode 100644 index 45e932c7f6..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/upsert-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new Tables(client); - -const response = await tables.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); diff --git a/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md deleted file mode 100644 index 9e3f542051..0000000000 --- a/docs/examples/1.8.x/server-deno/examples/tables/upsert-rows.md +++ /dev/null @@ -1,13 +0,0 @@ -import { Client, Tables } from "https://deno.land/x/appwrite/mod.ts"; - -const client = new Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new Tables(client); - -const response = await tables.upsertRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md deleted file mode 100644 index 1492487721..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnBoolean result = await tables.CreateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md deleted file mode 100644 index 6a1e07b907..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnDatetime result = await tables.CreateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md deleted file mode 100644 index a4740484f5..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnEmail result = await tables.CreateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md deleted file mode 100644 index 9529ad1331..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnEnum result = await tables.CreateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: new List<string>(), - required: false, - default: "<DEFAULT>", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md deleted file mode 100644 index f8146ce272..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnFloat result = await tables.CreateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, // optional - max: 0, // optional - default: 0, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md deleted file mode 100644 index 4ea3817da2..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Enums; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnIndex result = await tables.CreateIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - type: IndexType.Key, - columns: new List<string>(), - orders: new List<string>(), // optional - lengths: new List<long>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md deleted file mode 100644 index 6090426792..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnInteger result = await tables.CreateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, // optional - max: 0, // optional - default: 0, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md deleted file mode 100644 index b5e5067e6f..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnIp result = await tables.CreateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md deleted file mode 100644 index 7c4cba49dd..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,22 +0,0 @@ -using Appwrite; -using Appwrite.Enums; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnRelationship result = await tables.CreateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - relatedTableId: "<RELATED_TABLE_ID>", - type: RelationshipType.OneToOne, - twoWay: false, // optional - key: "", // optional - twoWayKey: "", // optional - onDelete: RelationMutate.Cascade // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md deleted file mode 100644 index 642bfe457c..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetSession("") // The user session to authenticate with - .SetKey("<YOUR_API_KEY>") // Your secret API key - .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -Row result = await tables.CreateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [object], - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md deleted file mode 100644 index 1d44dc51ed..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetAdmin("") // - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -RowList result = await tables.CreateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: new List<object>() -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md deleted file mode 100644 index e623ac0789..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnString result = await tables.CreateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - size: 1, - required: false, - default: "<DEFAULT>", // optional - array: false, // optional - encrypt: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md deleted file mode 100644 index 7a0fbd0a83..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnUrl result = await tables.CreateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/create.md b/docs/examples/1.8.x/server-dotnet/examples/tables/create.md deleted file mode 100644 index 694f4101a7..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/create.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -Table result = await tables.Create( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md deleted file mode 100644 index 220fb2b18a..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -Row result = await tables.DecrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, // optional - min: 0 // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md deleted file mode 100644 index ca8987eec9..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-column.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -await tables.DeleteColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md deleted file mode 100644 index ba7a024167..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-index.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -await tables.DeleteIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md deleted file mode 100644 index 95bae6ad6b..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-row.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -await tables.DeleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md deleted file mode 100644 index 46a6e0ba94..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/delete-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -await tables.DeleteRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md b/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md deleted file mode 100644 index bcff3ea05a..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -await tables.Delete( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md deleted file mode 100644 index 71ebb81aef..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/get-column.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - - result = await tables.GetColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md deleted file mode 100644 index f5b886e3e9..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/get-index.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnIndex result = await tables.GetIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md deleted file mode 100644 index 474b3342c9..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/get-row.md +++ /dev/null @@ -1,17 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -Row result = await tables.GetRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/get.md b/docs/examples/1.8.x/server-dotnet/examples/tables/get.md deleted file mode 100644 index 1e86d228a6..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/get.md +++ /dev/null @@ -1,15 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -Table result = await tables.Get( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md deleted file mode 100644 index e8ccd8ca78..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -Row result = await tables.IncrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, // optional - max: 0 // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md deleted file mode 100644 index fe8c739cf9..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/list-columns.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnList result = await tables.ListColumns( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md deleted file mode 100644 index 907a21048f..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/list-indexes.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnIndexList result = await tables.ListIndexes( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md deleted file mode 100644 index 474c597a1c..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/list-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -RowList result = await tables.ListRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/list.md b/docs/examples/1.8.x/server-dotnet/examples/tables/list.md deleted file mode 100644 index 2871a927c4..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/list.md +++ /dev/null @@ -1,16 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -TableList result = await tables.List( - databaseId: "<DATABASE_ID>", - queries: new List<string>(), // optional - search: "<SEARCH>" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md deleted file mode 100644 index 5c610fbe7a..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnBoolean result = await tables.UpdateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md deleted file mode 100644 index 754d0f1ae6..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnDatetime result = await tables.UpdateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md deleted file mode 100644 index 6000c54e8f..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnEmail result = await tables.UpdateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md deleted file mode 100644 index 2eaa1a51a1..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnEnum result = await tables.UpdateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: new List<string>(), - required: false, - default: "<DEFAULT>", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md deleted file mode 100644 index 7d18d8e624..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnFloat result = await tables.UpdateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, // optional - max: 0, // optional - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md deleted file mode 100644 index 0b3b85652c..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnInteger result = await tables.UpdateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, // optional - max: 0, // optional - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md deleted file mode 100644 index ccdd0d5235..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnIp result = await tables.UpdateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md deleted file mode 100644 index be6aa31f73..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Enums; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnRelationship result = await tables.UpdateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - onDelete: RelationMutate.Cascade, // optional - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md deleted file mode 100644 index d049ccf805..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -Row result = await tables.UpdateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [object], // optional - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md deleted file mode 100644 index 9d2c51c4b3..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -RowList result = await tables.UpdateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - data: [object], // optional - queries: new List<string>() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md deleted file mode 100644 index da280e7d8c..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnString result = await tables.UpdateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "<DEFAULT>", - size: 1, // optional - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md deleted file mode 100644 index 1ce961da2b..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -ColumnUrl result = await tables.UpdateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", - newKey: "" // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/update.md b/docs/examples/1.8.x/server-dotnet/examples/tables/update.md deleted file mode 100644 index 584c61c6bb..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/update.md +++ /dev/null @@ -1,19 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetProject("<YOUR_PROJECT_ID>") // Your project ID - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -Table result = await tables.Update( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md deleted file mode 100644 index a73c4e2402..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetSession("") // The user session to authenticate with - .SetKey("<YOUR_API_KEY>") // Your secret API key - .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -Row result = await tables.UpsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md deleted file mode 100644 index 07e5e927c6..0000000000 --- a/docs/examples/1.8.x/server-dotnet/examples/tables/upsert-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -using Appwrite; -using Appwrite.Models; -using Appwrite.Services; - -Client client = new Client() - .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetAdmin("") // - .SetKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -RowList result = await tables.UpsertRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md deleted file mode 100644 index 70a666257f..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateBooleanColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateBooleanColumnDefault(false), - tables.WithCreateBooleanColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md deleted file mode 100644 index beb8bd09e6..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateDatetimeColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateDatetimeColumnDefault(""), - tables.WithCreateDatetimeColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md deleted file mode 100644 index 449cc0e88a..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-email-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateEmailColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateEmailColumnDefault("email@example.com"), - tables.WithCreateEmailColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md deleted file mode 100644 index 8f3bb84bb7..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-enum-column.md +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateEnumColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - []interface{}{}, - false, - tables.WithCreateEnumColumnDefault("<DEFAULT>"), - tables.WithCreateEnumColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md deleted file mode 100644 index eeabd851b9..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-float-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateFloatColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateFloatColumnMin(0), - tables.WithCreateFloatColumnMax(0), - tables.WithCreateFloatColumnDefault(0), - tables.WithCreateFloatColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-index.md b/docs/examples/1.8.x/server-go/examples/tables/create-index.md deleted file mode 100644 index 1737b29f6f..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-index.md +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateIndex( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - "key", - []interface{}{}, - tables.WithCreateIndexOrders([]interface{}{}), - tables.WithCreateIndexLengths([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md deleted file mode 100644 index 45a81f6415..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-integer-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateIntegerColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateIntegerColumnMin(0), - tables.WithCreateIntegerColumnMax(0), - tables.WithCreateIntegerColumnDefault(0), - tables.WithCreateIntegerColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md deleted file mode 100644 index f6d203d65e..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-ip-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateIpColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateIpColumnDefault(""), - tables.WithCreateIpColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md deleted file mode 100644 index e2e6de59de..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateRelationshipColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "<RELATED_TABLE_ID>", - "oneToOne", - tables.WithCreateRelationshipColumnTwoWay(false), - tables.WithCreateRelationshipColumnKey(""), - tables.WithCreateRelationshipColumnTwoWayKey(""), - tables.WithCreateRelationshipColumnOnDelete("cascade"), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-row.md b/docs/examples/1.8.x/server-go/examples/tables/create-row.md deleted file mode 100644 index 329f2a1c9c..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-row.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithSession("") // The user session to authenticate with - client.WithKey("<YOUR_API_KEY>") // Your secret API key - client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token - ) - - service := tables.New(client) - response, error := service.CreateRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - map[string]interface{}{}, - tables.WithCreateRowPermissions(interface{}{"read("any")"}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-rows.md b/docs/examples/1.8.x/server-go/examples/tables/create-rows.md deleted file mode 100644 index 7d32206bea..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-rows.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithAdmin("") // - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateRows( - "<DATABASE_ID>", - "<TABLE_ID>", - []interface{}{}, - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md deleted file mode 100644 index afb41e2728..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-string-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateStringColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - 1, - false, - tables.WithCreateStringColumnDefault("<DEFAULT>"), - tables.WithCreateStringColumnArray(false), - tables.WithCreateStringColumnEncrypt(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md deleted file mode 100644 index c4e30e30cd..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create-url-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.CreateUrlColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - tables.WithCreateUrlColumnDefault("https://example.com"), - tables.WithCreateUrlColumnArray(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/create.md b/docs/examples/1.8.x/server-go/examples/tables/create.md deleted file mode 100644 index 672824daa6..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/create.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.Create( - "<DATABASE_ID>", - "<TABLE_ID>", - "<NAME>", - tables.WithCreatePermissions(interface{}{"read("any")"}), - tables.WithCreateRowSecurity(false), - tables.WithCreateEnabled(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md deleted file mode 100644 index 8ef1d26a59..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.DecrementRowColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - "", - tables.WithDecrementRowColumnValue(0), - tables.WithDecrementRowColumnMin(0), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-column.md b/docs/examples/1.8.x/server-go/examples/tables/delete-column.md deleted file mode 100644 index f66fc199c3..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/delete-column.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.DeleteColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-index.md b/docs/examples/1.8.x/server-go/examples/tables/delete-index.md deleted file mode 100644 index 1dddeef4e8..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/delete-index.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.DeleteIndex( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-row.md b/docs/examples/1.8.x/server-go/examples/tables/delete-row.md deleted file mode 100644 index 9f55934e41..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/delete-row.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := tables.New(client) - response, error := service.DeleteRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md deleted file mode 100644 index 3ad38f8067..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/delete-rows.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.DeleteRows( - "<DATABASE_ID>", - "<TABLE_ID>", - tables.WithDeleteRowsQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/delete.md b/docs/examples/1.8.x/server-go/examples/tables/delete.md deleted file mode 100644 index 9637acc51d..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/delete.md +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.Delete( - "<DATABASE_ID>", - "<TABLE_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-column.md b/docs/examples/1.8.x/server-go/examples/tables/get-column.md deleted file mode 100644 index 292d22800e..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/get-column.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.GetColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-index.md b/docs/examples/1.8.x/server-go/examples/tables/get-index.md deleted file mode 100644 index 077e823195..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/get-index.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.GetIndex( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get-row.md b/docs/examples/1.8.x/server-go/examples/tables/get-row.md deleted file mode 100644 index a224c60d98..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/get-row.md +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := tables.New(client) - response, error := service.GetRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - tables.WithGetRowQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/get.md b/docs/examples/1.8.x/server-go/examples/tables/get.md deleted file mode 100644 index 60304a8fd0..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/get.md +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.Get( - "<DATABASE_ID>", - "<TABLE_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md deleted file mode 100644 index 5d8b2f5578..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/increment-row-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.IncrementRowColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - "", - tables.WithIncrementRowColumnValue(0), - tables.WithIncrementRowColumnMax(0), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-columns.md b/docs/examples/1.8.x/server-go/examples/tables/list-columns.md deleted file mode 100644 index 25712ef2a7..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/list-columns.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.ListColumns( - "<DATABASE_ID>", - "<TABLE_ID>", - tables.WithListColumnsQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md deleted file mode 100644 index 0be8e81164..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/list-indexes.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.ListIndexes( - "<DATABASE_ID>", - "<TABLE_ID>", - tables.WithListIndexesQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list-rows.md b/docs/examples/1.8.x/server-go/examples/tables/list-rows.md deleted file mode 100644 index aadbcf1dad..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/list-rows.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := tables.New(client) - response, error := service.ListRows( - "<DATABASE_ID>", - "<TABLE_ID>", - tables.WithListRowsQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/list.md b/docs/examples/1.8.x/server-go/examples/tables/list.md deleted file mode 100644 index 1942b7a2d2..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/list.md +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.List( - "<DATABASE_ID>", - tables.WithListQueries([]interface{}{}), - tables.WithListSearch("<SEARCH>"), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md deleted file mode 100644 index c76c3bb1cc..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateBooleanColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - false, - tables.WithUpdateBooleanColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md deleted file mode 100644 index e093904ad5..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateDatetimeColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "", - tables.WithUpdateDatetimeColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md deleted file mode 100644 index 08845b5149..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-email-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateEmailColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "email@example.com", - tables.WithUpdateEmailColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md deleted file mode 100644 index e639f850ba..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-enum-column.md +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateEnumColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - []interface{}{}, - false, - "<DEFAULT>", - tables.WithUpdateEnumColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md deleted file mode 100644 index 83fa3777c2..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-float-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateFloatColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - 0, - tables.WithUpdateFloatColumnMin(0), - tables.WithUpdateFloatColumnMax(0), - tables.WithUpdateFloatColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md deleted file mode 100644 index 5bbea02709..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-integer-column.md +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateIntegerColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - 0, - tables.WithUpdateIntegerColumnMin(0), - tables.WithUpdateIntegerColumnMax(0), - tables.WithUpdateIntegerColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md deleted file mode 100644 index f67711aaed..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-ip-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateIpColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "", - tables.WithUpdateIpColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md deleted file mode 100644 index 1ec20edbb6..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateRelationshipColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - tables.WithUpdateRelationshipColumnOnDelete("cascade"), - tables.WithUpdateRelationshipColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-row.md b/docs/examples/1.8.x/server-go/examples/tables/update-row.md deleted file mode 100644 index 8ef1189769..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-row.md +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithSession("") // The user session to authenticate with - ) - - service := tables.New(client) - response, error := service.UpdateRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - tables.WithUpdateRowData(map[string]interface{}{}), - tables.WithUpdateRowPermissions(interface{}{"read("any")"}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-rows.md b/docs/examples/1.8.x/server-go/examples/tables/update-rows.md deleted file mode 100644 index 7579e32851..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-rows.md +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateRows( - "<DATABASE_ID>", - "<TABLE_ID>", - tables.WithUpdateRowsData(map[string]interface{}{}), - tables.WithUpdateRowsQueries([]interface{}{}), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md deleted file mode 100644 index 0a21b05e19..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-string-column.md +++ /dev/null @@ -1,32 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateStringColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "<DEFAULT>", - tables.WithUpdateStringColumnSize(1), - tables.WithUpdateStringColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md deleted file mode 100644 index aeb0541648..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update-url-column.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpdateUrlColumn( - "<DATABASE_ID>", - "<TABLE_ID>", - "", - false, - "https://example.com", - tables.WithUpdateUrlColumnNewKey(""), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/update.md b/docs/examples/1.8.x/server-go/examples/tables/update.md deleted file mode 100644 index 7a75c10713..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/update.md +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithProject("<YOUR_PROJECT_ID>") // Your project ID - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.Update( - "<DATABASE_ID>", - "<TABLE_ID>", - "<NAME>", - tables.WithUpdatePermissions(interface{}{"read("any")"}), - tables.WithUpdateRowSecurity(false), - tables.WithUpdateEnabled(false), - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md deleted file mode 100644 index 9bc9f00f8b..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/upsert-row.md +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithSession("") // The user session to authenticate with - client.WithKey("<YOUR_API_KEY>") // Your secret API key - client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token - ) - - service := tables.New(client) - response, error := service.UpsertRow( - "<DATABASE_ID>", - "<TABLE_ID>", - "<ROW_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md deleted file mode 100644 index bc5a4db007..0000000000 --- a/docs/examples/1.8.x/server-go/examples/tables/upsert-rows.md +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "fmt" - "github.com/appwrite/sdk-for-go/client" - "github.com/appwrite/sdk-for-go/tables" -) - -func main() { - client := client.New( - client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithAdmin("") // - client.WithKey("<YOUR_API_KEY>") // Your secret API key - ) - - service := tables.New(client) - response, error := service.UpsertRows( - "<DATABASE_ID>", - "<TABLE_ID>", - ) - - if error != nil { - panic(error) - } - - fmt.Println(response) -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md deleted file mode 100644 index 564b1a964c..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,20 +0,0 @@ -mutation { - tablesCreateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md deleted file mode 100644 index 34055c27fa..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesCreateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md deleted file mode 100644 index a45001d0be..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-email-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesCreateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md deleted file mode 100644 index 5d1c516e3a..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-enum-column.md +++ /dev/null @@ -1,23 +0,0 @@ -mutation { - tablesCreateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: [], - required: false, - default: "<DEFAULT>", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - elements - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md deleted file mode 100644 index 09bf481a33..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-float-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - tablesCreateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, - max: 0, - default: 0, - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - min - max - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md deleted file mode 100644 index bc47403c64..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesCreateIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - type: "key", - columns: [], - orders: [], - lengths: [] - ) { - key - type - status - error - columns - lengths - orders - _createdAt - _updatedAt - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md deleted file mode 100644 index 04273b18b5..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-integer-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - tablesCreateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, - max: 0, - default: 0, - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - min - max - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md deleted file mode 100644 index c2f07c760b..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-ip-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesCreateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md deleted file mode 100644 index 8e56bd3867..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,27 +0,0 @@ -mutation { - tablesCreateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - relatedTableId: "<RELATED_TABLE_ID>", - type: "oneToOne", - twoWay: false, - key: "", - twoWayKey: "", - onDelete: "cascade" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - relatedTable - relationType - twoWay - twoWayKey - onDelete - side - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md deleted file mode 100644 index c88a7f36cf..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - tablesCreateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md deleted file mode 100644 index a4ae62cfae..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-rows.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - tablesCreateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: [] - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md deleted file mode 100644 index b0b11c2610..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-string-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - tablesCreateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - size: 1, - required: false, - default: "<DEFAULT>", - array: false, - encrypt: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - size - default - encrypt - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md deleted file mode 100644 index 134208b432..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create-url-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesCreateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", - array: false - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/create.md b/docs/examples/1.8.x/server-graphql/examples/tables/create.md deleted file mode 100644 index 73af2c4a8c..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/create.md +++ /dev/null @@ -1,31 +0,0 @@ -mutation { - tablesCreate( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], - rowSecurity: false, - enabled: false - ) { - _id - _createdAt - _updatedAt - _permissions - databaseId - name - enabled - rowSecurity - columns - indexes { - key - type - status - error - columns - lengths - orders - _createdAt - _updatedAt - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md deleted file mode 100644 index 4ee58849ff..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - tablesDecrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, - min: 0 - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md deleted file mode 100644 index 2c2ab098d6..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/delete-column.md +++ /dev/null @@ -1,9 +0,0 @@ -mutation { - tablesDeleteColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md deleted file mode 100644 index c95db41fd6..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/delete-index.md +++ /dev/null @@ -1,9 +0,0 @@ -mutation { - tablesDeleteIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md deleted file mode 100644 index f3a35c1df1..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/delete-row.md +++ /dev/null @@ -1,9 +0,0 @@ -mutation { - tablesDeleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md deleted file mode 100644 index 1ee227b7e5..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/delete-rows.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - tablesDeleteRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/delete.md b/docs/examples/1.8.x/server-graphql/examples/tables/delete.md deleted file mode 100644 index 1749422f6a..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/delete.md +++ /dev/null @@ -1,8 +0,0 @@ -mutation { - tablesDelete( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" - ) { - status - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-column.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-index.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-index.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/get-row.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/get.md b/docs/examples/1.8.x/server-graphql/examples/tables/get.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md deleted file mode 100644 index f84f149672..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -mutation { - tablesIncrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, - max: 0 - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-columns.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-indexes.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/list-rows.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/list.md b/docs/examples/1.8.x/server-graphql/examples/tables/list.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md deleted file mode 100644 index 541abd97cc..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,20 +0,0 @@ -mutation { - tablesUpdateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md deleted file mode 100644 index 01714377a4..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesUpdateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md deleted file mode 100644 index ffb3a21e66..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-email-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesUpdateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md deleted file mode 100644 index 45ddb00d6f..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-enum-column.md +++ /dev/null @@ -1,23 +0,0 @@ -mutation { - tablesUpdateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: [], - required: false, - default: "<DEFAULT>", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - elements - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md deleted file mode 100644 index f592a53858..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-float-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - tablesUpdateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, - max: 0, - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - min - max - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md deleted file mode 100644 index a51f02d4d7..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-integer-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - tablesUpdateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, - max: 0, - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - min - max - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md deleted file mode 100644 index c353c79105..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-ip-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesUpdateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md deleted file mode 100644 index e94800345b..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,24 +0,0 @@ -mutation { - tablesUpdateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - onDelete: "cascade", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - relatedTable - relationType - twoWay - twoWayKey - onDelete - side - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md deleted file mode 100644 index 8449d8499b..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - tablesUpdateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: "{}", - permissions: ["read("any")"] - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md deleted file mode 100644 index 510648f6e1..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-rows.md +++ /dev/null @@ -1,20 +0,0 @@ -mutation { - tablesUpdateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - data: "{}", - queries: [] - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md deleted file mode 100644 index 0771d9a6af..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-string-column.md +++ /dev/null @@ -1,23 +0,0 @@ -mutation { - tablesUpdateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "<DEFAULT>", - size: 1, - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - size - default - encrypt - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md deleted file mode 100644 index a5c4a4432d..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update-url-column.md +++ /dev/null @@ -1,21 +0,0 @@ -mutation { - tablesUpdateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", - newKey: "" - ) { - key - type - status - error - required - array - _createdAt - _updatedAt - format - default - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/update.md b/docs/examples/1.8.x/server-graphql/examples/tables/update.md deleted file mode 100644 index 4aa434c3ed..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/update.md +++ /dev/null @@ -1,31 +0,0 @@ -mutation { - tablesUpdate( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], - rowSecurity: false, - enabled: false - ) { - _id - _createdAt - _updatedAt - _permissions - databaseId - name - enabled - rowSecurity - columns - indexes { - key - type - status - error - columns - lengths - orders - _createdAt - _updatedAt - } - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md deleted file mode 100644 index 480d7651bd..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -mutation { - tablesUpsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" - ) { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } -} diff --git a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md deleted file mode 100644 index 6015470c16..0000000000 --- a/docs/examples/1.8.x/server-graphql/examples/tables/upsert-rows.md +++ /dev/null @@ -1,18 +0,0 @@ -mutation { - tablesUpsertRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" - ) { - total - rows { - _id - _sequence - _tableId - _databaseId - _createdAt - _updatedAt - _permissions - data - } - } -} diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md deleted file mode 100644 index 2336ee90e0..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-boolean-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createBooleanColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - false, // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md deleted file mode 100644 index dd3df83dbf..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-datetime-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createDatetimeColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md deleted file mode 100644 index 3b130d1ecd..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-email-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createEmailColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "email@example.com", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md deleted file mode 100644 index 73c6e1c7de..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-enum-column.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createEnumColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - listOf(), // elements - false, // required - "<DEFAULT>", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md deleted file mode 100644 index dd6f207ff4..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-float-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createFloatColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // min (optional) - 0, // max (optional) - 0, // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md deleted file mode 100644 index 2a4df003c0..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-index.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; -import io.appwrite.enums.IndexType; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createIndex( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - IndexType.KEY, // type - listOf(), // columns - listOf(), // orders (optional) - listOf(), // lengths (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md deleted file mode 100644 index 3546ac8174..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-integer-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createIntegerColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // min (optional) - 0, // max (optional) - 0, // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md deleted file mode 100644 index 825d8b0c5c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-ip-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createIpColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md deleted file mode 100644 index 7a0b50a541..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-relationship-column.md +++ /dev/null @@ -1,31 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; -import io.appwrite.enums.RelationshipType; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createRelationshipColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<RELATED_TABLE_ID>", // relatedTableId - RelationshipType.ONETOONE, // type - false, // twoWay (optional) - "", // key (optional) - "", // twoWayKey (optional) - RelationMutate.CASCADE, // onDelete (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md deleted file mode 100644 index 7ba3678aad..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-row.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -tables.createRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md deleted file mode 100644 index c20aa2c11f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // rows - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md deleted file mode 100644 index b8cb626601..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-string-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createStringColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - 1, // size - false, // required - "<DEFAULT>", // default (optional) - false, // array (optional) - false, // encrypt (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md deleted file mode 100644 index 91e90c8bc4..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create-url-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.createUrlColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "https://example.com", // default (optional) - false, // array (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/create.md b/docs/examples/1.8.x/server-kotlin/java/tables/create.md deleted file mode 100644 index 6a9faf06dd..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/create.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.create( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<NAME>", // name - listOf("read("any")"), // permissions (optional) - false, // rowSecurity (optional) - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md deleted file mode 100644 index 9e79f36e14..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/decrement-row-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.decrementRowColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - "", // column - 0, // value (optional) - 0, // min (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md deleted file mode 100644 index f14390c905..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/delete-column.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.deleteColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md deleted file mode 100644 index 1b22eb00d8..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/delete-index.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.deleteIndex( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md deleted file mode 100644 index a48745a225..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/delete-row.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -tables.deleteRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md deleted file mode 100644 index 6a86321fad..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/delete-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.deleteRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/delete.md b/docs/examples/1.8.x/server-kotlin/java/tables/delete.md deleted file mode 100644 index e777c7292e..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/delete.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.delete( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md deleted file mode 100644 index b4f7e1298f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/get-column.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.getColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md deleted file mode 100644 index 5bcd59d4cd..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/get-index.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.getIndex( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md deleted file mode 100644 index 7f72c25cd8..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/get-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -tables.getRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/get.md b/docs/examples/1.8.x/server-kotlin/java/tables/get.md deleted file mode 100644 index 6f3c639450..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/get.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.get( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md deleted file mode 100644 index f9c828398a..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/increment-row-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.incrementRowColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - "", // column - 0, // value (optional) - 0, // max (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md deleted file mode 100644 index 05e1960021..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/list-columns.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.listColumns( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md deleted file mode 100644 index c9bd445fe8..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/list-indexes.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.listIndexes( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md deleted file mode 100644 index 8cbc356556..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/list-rows.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -tables.listRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/list.md b/docs/examples/1.8.x/server-kotlin/java/tables/list.md deleted file mode 100644 index c3e0c559aa..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/list.md +++ /dev/null @@ -1,25 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.list( - "<DATABASE_ID>", // databaseId - listOf(), // queries (optional) - "<SEARCH>", // search (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md deleted file mode 100644 index 647190e7bc..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-boolean-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateBooleanColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - false, // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md deleted file mode 100644 index 38e0e60da5..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-datetime-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateDatetimeColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md deleted file mode 100644 index 918884e0b3..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-email-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateEmailColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "email@example.com", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md deleted file mode 100644 index b1bbc83520..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-enum-column.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateEnumColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - listOf(), // elements - false, // required - "<DEFAULT>", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md deleted file mode 100644 index 977c23727c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-float-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateFloatColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // default - 0, // min (optional) - 0, // max (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md deleted file mode 100644 index d2ad81d0eb..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-integer-column.md +++ /dev/null @@ -1,30 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateIntegerColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - 0, // default - 0, // min (optional) - 0, // max (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md deleted file mode 100644 index cd6e67bc2c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-ip-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateIpColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md deleted file mode 100644 index e0dc185e0e..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-relationship-column.md +++ /dev/null @@ -1,27 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateRelationshipColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - RelationMutate.CASCADE, // onDelete (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md deleted file mode 100644 index 8270c3fa9b..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-row.md +++ /dev/null @@ -1,27 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession(""); // The user session to authenticate with - -Tables tables = new Tables(client); - -tables.updateRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data (optional) - listOf("read("any")"), // permissions (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md deleted file mode 100644 index a51878508f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-rows.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - mapOf( "a" to "b" ), // data (optional) - listOf(), // queries (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md deleted file mode 100644 index 31e279d068..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-string-column.md +++ /dev/null @@ -1,29 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateStringColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "<DEFAULT>", // default - 1, // size (optional) - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md b/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md deleted file mode 100644 index 201e578ac6..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update-url-column.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.updateUrlColumn( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "", // key - false, // required - "https://example.com", // default - "", // newKey (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/update.md b/docs/examples/1.8.x/server-kotlin/java/tables/update.md deleted file mode 100644 index cf560cb461..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/update.md +++ /dev/null @@ -1,28 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.update( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<NAME>", // name - listOf("read("any")"), // permissions (optional) - false, // rowSecurity (optional) - false, // enabled (optional) - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md deleted file mode 100644 index 11127c5bfa..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-row.md +++ /dev/null @@ -1,26 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token - -Tables tables = new Tables(client); - -tables.upsertRow( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - "<ROW_ID>", // rowId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md deleted file mode 100644 index 14b382263b..0000000000 --- a/docs/examples/1.8.x/server-kotlin/java/tables/upsert-rows.md +++ /dev/null @@ -1,24 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Tables; - -Client client = new Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>"); // Your secret API key - -Tables tables = new Tables(client); - -tables.upsertRows( - "<DATABASE_ID>", // databaseId - "<TABLE_ID>", // tableId - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - System.out.println(result); - }) -); - diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md deleted file mode 100644 index 68b8dc51bd..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createBooleanColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = false, // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md deleted file mode 100644 index 8740a71d3c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createDatetimeColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md deleted file mode 100644 index 34a6cb669f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createEmailColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "email@example.com", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md deleted file mode 100644 index d3d2fc9286..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createEnumColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - elements = listOf(), - required = false, - default = "<DEFAULT>", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md deleted file mode 100644 index 8540430cea..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createFloatColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - min = 0, // optional - max = 0, // optional - default = 0, // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md deleted file mode 100644 index 053c88a93a..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables -import io.appwrite.enums.IndexType - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createIndex( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - type = IndexType.KEY, - columns = listOf(), - orders = listOf(), // optional - lengths = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md deleted file mode 100644 index 1222746259..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createIntegerColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - min = 0, // optional - max = 0, // optional - default = 0, // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md deleted file mode 100644 index 277c756d24..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createIpColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md deleted file mode 100644 index aa07fac6a8..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-relationship-column.md +++ /dev/null @@ -1,22 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables -import io.appwrite.enums.RelationshipType - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createRelationshipColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - relatedTableId = "<RELATED_TABLE_ID>", - type = RelationshipType.ONETOONE, - twoWay = false, // optional - key = "", // optional - twoWayKey = "", // optional - onDelete = "cascade" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md deleted file mode 100644 index 5df0890f99..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -val tables = Tables(client) - -val response = tables.createRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), - permissions = listOf("read("any")") // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md deleted file mode 100644 index f549d6fb8c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rows = listOf() -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md deleted file mode 100644 index d82026c31d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createStringColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - size = 1, - required = false, - default = "<DEFAULT>", // optional - array = false, // optional - encrypt = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md deleted file mode 100644 index 42f50e9ec9..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.createUrlColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "https://example.com", // optional - array = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md deleted file mode 100644 index 3dc1d1a37d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/create.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.create( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - name = "<NAME>", - permissions = listOf("read("any")"), // optional - rowSecurity = false, // optional - enabled = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md deleted file mode 100644 index f78f7bbed7..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.decrementRowColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - column = "", - value = 0, // optional - min = 0 // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md deleted file mode 100644 index d41f2ceabf..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.deleteColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md deleted file mode 100644 index 7af6648f2f..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-index.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.deleteIndex( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md deleted file mode 100644 index d182ccff95..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val tables = Tables(client) - -val response = tables.deleteRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md deleted file mode 100644 index 54ff6b690c..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.deleteRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md deleted file mode 100644 index 5cbd03226a..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.delete( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md deleted file mode 100644 index 6f4d65b4dc..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-column.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.getColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md deleted file mode 100644 index 660502f228..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-index.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.getIndex( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md deleted file mode 100644 index cbaaa6c3e9..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val tables = Tables(client) - -val response = tables.getRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md deleted file mode 100644 index ff6d354c15..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/get.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.get( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md deleted file mode 100644 index 7917b7f939..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.incrementRowColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - column = "", - value = 0, // optional - max = 0 // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md deleted file mode 100644 index 4c1765193d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-columns.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.listColumns( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md deleted file mode 100644 index bcd1fe75ab..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-indexes.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.listIndexes( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md deleted file mode 100644 index 38b776acb8..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val tables = Tables(client) - -val response = tables.listRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md deleted file mode 100644 index 37b03445da..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/list.md +++ /dev/null @@ -1,16 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.list( - databaseId = "<DATABASE_ID>", - queries = listOf(), // optional - search = "<SEARCH>" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md deleted file mode 100644 index 10a0422d2d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateBooleanColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = false, - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md deleted file mode 100644 index 69ccf0354e..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateDatetimeColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md deleted file mode 100644 index 593a89b4ce..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateEmailColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "email@example.com", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md deleted file mode 100644 index b672e3e155..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateEnumColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - elements = listOf(), - required = false, - default = "<DEFAULT>", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md deleted file mode 100644 index 005c4e64a5..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateFloatColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = 0, - min = 0, // optional - max = 0, // optional - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md deleted file mode 100644 index 39da19d562..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateIntegerColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = 0, - min = 0, // optional - max = 0, // optional - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md deleted file mode 100644 index 40e54bcdfd..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateIpColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md deleted file mode 100644 index d4c36e8802..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-relationship-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateRelationshipColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - onDelete = "cascade", // optional - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md deleted file mode 100644 index 6d3d9a47f7..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -val tables = Tables(client) - -val response = tables.updateRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>", - data = mapOf( "a" to "b" ), // optional - permissions = listOf("read("any")") // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md deleted file mode 100644 index aac87c19b0..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - data = mapOf( "a" to "b" ), // optional - queries = listOf() // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md deleted file mode 100644 index bb5b1f4bcf..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateStringColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "<DEFAULT>", - size = 1, // optional - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md deleted file mode 100644 index 07f43e3907..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.updateUrlColumn( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - key = "", - required = false, - default = "https://example.com", - newKey = "" // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md deleted file mode 100644 index 381532316d..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/update.md +++ /dev/null @@ -1,19 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.update( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - name = "<NAME>", - permissions = listOf("read("any")"), // optional - rowSecurity = false, // optional - enabled = false // optional -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md deleted file mode 100644 index 6e02b3abe9..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -val tables = Tables(client) - -val response = tables.upsertRow( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>", - rowId = "<ROW_ID>" -) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md deleted file mode 100644 index d639e3d30b..0000000000 --- a/docs/examples/1.8.x/server-kotlin/kotlin/tables/upsert-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback -import io.appwrite.services.Tables - -val client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>") // Your secret API key - -val tables = Tables(client) - -val response = tables.upsertRows( - databaseId = "<DATABASE_ID>", - tableId = "<TABLE_ID>" -) diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md deleted file mode 100644 index 64893d77a8..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md deleted file mode 100644 index 0d63244727..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md deleted file mode 100644 index 2257fdd7d6..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md deleted file mode 100644 index dbc75feea5..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md deleted file mode 100644 index 690b5849eb..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md deleted file mode 100644 index aef047ba5f..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-index.md +++ /dev/null @@ -1,18 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - sdk.IndexType.Key, // type - [], // columns - [], // orders (optional) - [] // lengths (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md deleted file mode 100644 index 05e66b548c..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // min (optional) - null, // max (optional) - null, // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md deleted file mode 100644 index 69b5c635d2..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md deleted file mode 100644 index b6e7fa517f..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<RELATED_TABLE_ID>', // relatedTableId - sdk.RelationshipType.OneToOne, // type - false, // twoWay (optional) - '', // key (optional) - '', // twoWayKey (optional) - sdk.RelationMutate.Cascade // onDelete (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md deleted file mode 100644 index 84da608d41..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-row.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new sdk.Tables(client); - -const result = await tables.createRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md deleted file mode 100644 index 6a6918b8df..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // rows -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md deleted file mode 100644 index 8e14cb45c9..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - 1, // size - false, // required - '<DEFAULT>', // default (optional) - false, // array (optional) - false // encrypt (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md deleted file mode 100644 index 73cdfa3710..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.createUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default (optional) - false // array (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/create.md b/docs/examples/1.8.x/server-nodejs/examples/tables/create.md deleted file mode 100644 index 54d6bc61bd..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/create.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.create( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md deleted file mode 100644 index 2e7df6aa92..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.decrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // min (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md deleted file mode 100644 index a892c61baa..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-column.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.deleteColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md deleted file mode 100644 index f6bc7919db..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-index.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.deleteIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md deleted file mode 100644 index 5bc60cd6cb..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-row.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new sdk.Tables(client); - -const result = await tables.deleteRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md deleted file mode 100644 index 11b16b71ae..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/delete-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.deleteRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md b/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md deleted file mode 100644 index fed3eee5a4..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/delete.md +++ /dev/null @@ -1,13 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.delete( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md deleted file mode 100644 index daa20e17e2..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/get-column.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.getColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md deleted file mode 100644 index 56ba871d67..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/get-index.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.getIndex( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '' // key -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md deleted file mode 100644 index df952d9595..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/get-row.md +++ /dev/null @@ -1,15 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new sdk.Tables(client); - -const result = await tables.getRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/get.md b/docs/examples/1.8.x/server-nodejs/examples/tables/get.md deleted file mode 100644 index b078574b5c..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/get.md +++ /dev/null @@ -1,13 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.get( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md deleted file mode 100644 index bb5856c74a..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/increment-row-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.incrementRowColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - '', // column - null, // value (optional) - null // max (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md deleted file mode 100644 index f9af43bea5..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/list-columns.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.listColumns( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md deleted file mode 100644 index 7eaf4b8710..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/list-indexes.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.listIndexes( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md deleted file mode 100644 index aa5b341649..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/list-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new sdk.Tables(client); - -const result = await tables.listRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/list.md b/docs/examples/1.8.x/server-nodejs/examples/tables/list.md deleted file mode 100644 index 872a98df08..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/list.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.list( - '<DATABASE_ID>', // databaseId - [], // queries (optional) - '<SEARCH>' // search (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md deleted file mode 100644 index 84ff5d2bef..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateBooleanColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - false, // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md deleted file mode 100644 index c02559a171..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateDatetimeColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md deleted file mode 100644 index 9560b60e29..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-email-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateEmailColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'email@example.com', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md deleted file mode 100644 index 861fce6add..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-enum-column.md +++ /dev/null @@ -1,18 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateEnumColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - [], // elements - false, // required - '<DEFAULT>', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md deleted file mode 100644 index 01845ca3cc..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-float-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateFloatColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md deleted file mode 100644 index 0b7432247f..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-integer-column.md +++ /dev/null @@ -1,19 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateIntegerColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - null, // default - null, // min (optional) - null, // max (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md deleted file mode 100644 index 6ba5eccf3e..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-ip-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateIpColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md deleted file mode 100644 index 3409b8caad..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,16 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateRelationshipColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - sdk.RelationMutate.Cascade, // onDelete (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md deleted file mode 100644 index ff8e98eb38..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-row.md +++ /dev/null @@ -1,16 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setSession(''); // The user session to authenticate with - -const tables = new sdk.Tables(client); - -const result = await tables.updateRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>', // rowId - {}, // data (optional) - ["read("any")"] // permissions (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md deleted file mode 100644 index 72cef07202..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - {}, // data (optional) - [] // queries (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md deleted file mode 100644 index f9445a50c1..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-string-column.md +++ /dev/null @@ -1,18 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateStringColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - '<DEFAULT>', // default - 1, // size (optional) - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md deleted file mode 100644 index c6ffdf3044..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update-url-column.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.updateUrlColumn( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '', // key - false, // required - 'https://example.com', // default - '' // newKey (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/update.md b/docs/examples/1.8.x/server-nodejs/examples/tables/update.md deleted file mode 100644 index 4fd981ffbf..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/update.md +++ /dev/null @@ -1,17 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setProject('<YOUR_PROJECT_ID>') // Your project ID - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.update( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<NAME>', // name - ["read("any")"], // permissions (optional) - false, // rowSecurity (optional) - false // enabled (optional) -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md deleted file mode 100644 index 2b08d56785..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-row.md +++ /dev/null @@ -1,15 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -const tables = new sdk.Tables(client); - -const result = await tables.upsertRow( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>', // tableId - '<ROW_ID>' // rowId -); diff --git a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md deleted file mode 100644 index 75d681dbf0..0000000000 --- a/docs/examples/1.8.x/server-nodejs/examples/tables/upsert-rows.md +++ /dev/null @@ -1,13 +0,0 @@ -const sdk = require('node-appwrite'); - -const client = new sdk.Client() - .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key - -const tables = new sdk.Tables(client); - -const result = await tables.upsertRows( - '<DATABASE_ID>', // databaseId - '<TABLE_ID>' // tableId -); diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md deleted file mode 100644 index 28339753ac..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createBooleanColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: false, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md deleted file mode 100644 index d7f18f2ede..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createDatetimeColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md deleted file mode 100644 index 15ec2cf2e5..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-email-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createEmailColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: 'email@example.com', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md deleted file mode 100644 index aa2b6138f7..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-enum-column.md +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createEnumColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - elements: [], - required: false, - default: '<DEFAULT>', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md deleted file mode 100644 index 1f620dc887..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-float-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createFloatColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - min: null, // optional - max: null, // optional - default: null, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-index.md b/docs/examples/1.8.x/server-php/examples/tables/create-index.md deleted file mode 100644 index 9844e041d4..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-index.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; -use Appwrite\Enums\IndexType; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - type: IndexType::KEY(), - columns: [], - orders: [], // optional - lengths: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md deleted file mode 100644 index 185f12c5cb..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-integer-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createIntegerColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - min: null, // optional - max: null, // optional - default: null, // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md deleted file mode 100644 index 1f74e4dd72..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-ip-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createIpColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md deleted file mode 100644 index c86b4c558a..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; -use Appwrite\Enums\RelationshipType; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createRelationshipColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - relatedTableId: '<RELATED_TABLE_ID>', - type: RelationshipType::ONETOONE(), - twoWay: false, // optional - key: '', // optional - twoWayKey: '', // optional - onDelete: RelationMutate::CASCADE() // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-row.md b/docs/examples/1.8.x/server-php/examples/tables/create-row.md deleted file mode 100644 index 6b64a7e058..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-row.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setSession('') // The user session to authenticate with - ->setKey('<YOUR_API_KEY>') // Your secret API key - ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -$tables = new Tables($client); - -$result = $tables->createRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: [], - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-rows.md b/docs/examples/1.8.x/server-php/examples/tables/create-rows.md deleted file mode 100644 index a1bf72ad13..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setAdmin('') // - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rows: [] -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md deleted file mode 100644 index 085aff25c8..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-string-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createStringColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - size: 1, - required: false, - default: '<DEFAULT>', // optional - array: false, // optional - encrypt: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md deleted file mode 100644 index d0bdb55dd4..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create-url-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->createUrlColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: 'https://example.com', // optional - array: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/create.md b/docs/examples/1.8.x/server-php/examples/tables/create.md deleted file mode 100644 index 773d7a24eb..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/create.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->create( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md deleted file mode 100644 index b0c44b6d0a..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->decrementRowColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - column: '', - value: null, // optional - min: null // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-column.md b/docs/examples/1.8.x/server-php/examples/tables/delete-column.md deleted file mode 100644 index 9bd6738cb7..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/delete-column.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->deleteColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-index.md b/docs/examples/1.8.x/server-php/examples/tables/delete-index.md deleted file mode 100644 index bbd748433a..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/delete-index.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->deleteIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-row.md b/docs/examples/1.8.x/server-php/examples/tables/delete-row.md deleted file mode 100644 index 0c4ab6ef40..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/delete-row.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$tables = new Tables($client); - -$result = $tables->deleteRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md deleted file mode 100644 index b0c984cc17..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/delete-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->deleteRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/delete.md b/docs/examples/1.8.x/server-php/examples/tables/delete.md deleted file mode 100644 index f145eedc91..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/delete.md +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->delete( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-column.md b/docs/examples/1.8.x/server-php/examples/tables/get-column.md deleted file mode 100644 index b8b676564e..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/get-column.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->getColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-index.md b/docs/examples/1.8.x/server-php/examples/tables/get-index.md deleted file mode 100644 index 5d1139d596..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/get-index.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->getIndex( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get-row.md b/docs/examples/1.8.x/server-php/examples/tables/get-row.md deleted file mode 100644 index ccde387b89..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/get-row.md +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$tables = new Tables($client); - -$result = $tables->getRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/get.md b/docs/examples/1.8.x/server-php/examples/tables/get.md deleted file mode 100644 index d07ef7338a..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/get.md +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->get( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md deleted file mode 100644 index aa5a3c0d53..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/increment-row-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->incrementRowColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - column: '', - value: null, // optional - max: null // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-columns.md b/docs/examples/1.8.x/server-php/examples/tables/list-columns.md deleted file mode 100644 index 0338567240..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/list-columns.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->listColumns( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md deleted file mode 100644 index df1f8c6aca..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/list-indexes.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->listIndexes( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list-rows.md b/docs/examples/1.8.x/server-php/examples/tables/list-rows.md deleted file mode 100644 index 2041d72b05..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/list-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$tables = new Tables($client); - -$result = $tables->listRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/list.md b/docs/examples/1.8.x/server-php/examples/tables/list.md deleted file mode 100644 index 37df0a4baa..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/list.md +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->list( - databaseId: '<DATABASE_ID>', - queries: [], // optional - search: '<SEARCH>' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md deleted file mode 100644 index 8ad80506d8..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateBooleanColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: false, - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md deleted file mode 100644 index 5185357f17..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateDatetimeColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md deleted file mode 100644 index 7acbb811eb..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-email-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateEmailColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: 'email@example.com', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md deleted file mode 100644 index 478905af67..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-enum-column.md +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateEnumColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - elements: [], - required: false, - default: '<DEFAULT>', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md deleted file mode 100644 index 1d9c5fd997..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-float-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateFloatColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: null, - min: null, // optional - max: null, // optional - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md deleted file mode 100644 index f6998db0a2..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-integer-column.md +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateIntegerColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: null, - min: null, // optional - max: null, // optional - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md deleted file mode 100644 index e7906fbd0f..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-ip-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateIpColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md deleted file mode 100644 index d6505c77f1..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateRelationshipColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - onDelete: RelationMutate::CASCADE(), // optional - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-row.md b/docs/examples/1.8.x/server-php/examples/tables/update-row.md deleted file mode 100644 index 921c43d935..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-row.md +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setSession(''); // The user session to authenticate with - -$tables = new Tables($client); - -$result = $tables->updateRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>', - data: [], // optional - permissions: ["read("any")"] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-rows.md b/docs/examples/1.8.x/server-php/examples/tables/update-rows.md deleted file mode 100644 index f61fa2b17d..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-rows.md +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - data: [], // optional - queries: [] // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md deleted file mode 100644 index 8856ec19c1..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateStringColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: '<DEFAULT>', - size: 1, // optional - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md deleted file mode 100644 index faa46d1806..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update-url-column.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->updateUrlColumn( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - key: '', - required: false, - default: 'https://example.com', - newKey: '' // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/update.md b/docs/examples/1.8.x/server-php/examples/tables/update.md deleted file mode 100644 index 39f076b8f8..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/update.md +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setProject('<YOUR_PROJECT_ID>') // Your project ID - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->update( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md deleted file mode 100644 index 2bddd9b5b3..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/upsert-row.md +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setSession('') // The user session to authenticate with - ->setKey('<YOUR_API_KEY>') // Your secret API key - ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token - -$tables = new Tables($client); - -$result = $tables->upsertRow( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>', - rowId: '<ROW_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md deleted file mode 100644 index 5ed5f028a9..0000000000 --- a/docs/examples/1.8.x/server-php/examples/tables/upsert-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -use Appwrite\Client; -use Appwrite\Services\Tables; - -$client = (new Client()) - ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setAdmin('') // - ->setKey('<YOUR_API_KEY>'); // Your secret API key - -$tables = new Tables($client); - -$result = $tables->upsertRows( - databaseId: '<DATABASE_ID>', - tableId: '<TABLE_ID>' -); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md deleted file mode 100644 index cfbaa3b0ee..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_boolean_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = False, # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md deleted file mode 100644 index a9f76b5e5f..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_datetime_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md deleted file mode 100644 index 73ac0faad6..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_email_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = 'email@example.com', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md deleted file mode 100644 index 2013c39fa0..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_enum_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - elements = [], - required = False, - default = '<DEFAULT>', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md deleted file mode 100644 index a56a196093..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_float_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - min = None, # optional - max = None, # optional - default = None, # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-index.md b/docs/examples/1.8.x/server-python/examples/tables/create-index.md deleted file mode 100644 index 69086af0b0..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-index.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables -from appwrite.enums import IndexType - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_index( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - type = IndexType.KEY, - columns = [], - orders = [], # optional - lengths = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md deleted file mode 100644 index d52b14bc5c..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_integer_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - min = None, # optional - max = None, # optional - default = None, # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md deleted file mode 100644 index b5c7ef56db..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_ip_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md deleted file mode 100644 index 187271f887..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,21 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables -from appwrite.enums import RelationshipType - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_relationship_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - related_table_id = '<RELATED_TABLE_ID>', - type = RelationshipType.ONETOONE, - two_way = False, # optional - key = '', # optional - two_way_key = '', # optional - on_delete = RelationMutate.CASCADE # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-row.md b/docs/examples/1.8.x/server-python/examples/tables/create-row.md deleted file mode 100644 index 8850a974b8..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_session('') # The user session to authenticate with -client.set_key('<YOUR_API_KEY>') # Your secret API key -client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token - -tables = Tables(client) - -result = tables.create_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - data = {}, - permissions = ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-rows.md b/docs/examples/1.8.x/server-python/examples/tables/create-rows.md deleted file mode 100644 index 3fae165081..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_admin('') # -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - rows = [] -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md deleted file mode 100644 index 1308fea2ad..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_string_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - size = 1, - required = False, - default = '<DEFAULT>', # optional - array = False, # optional - encrypt = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md deleted file mode 100644 index f15c3e0574..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create_url_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = 'https://example.com', # optional - array = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/create.md b/docs/examples/1.8.x/server-python/examples/tables/create.md deleted file mode 100644 index 3a02843c4d..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/create.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.create( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - name = '<NAME>', - permissions = ["read("any")"], # optional - row_security = False, # optional - enabled = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md deleted file mode 100644 index bf027d6e76..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.decrement_row_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - column = '', - value = None, # optional - min = None # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-column.md b/docs/examples/1.8.x/server-python/examples/tables/delete-column.md deleted file mode 100644 index cf2dd6d5e5..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/delete-column.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.delete_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-index.md b/docs/examples/1.8.x/server-python/examples/tables/delete-index.md deleted file mode 100644 index 5f78d1ce1d..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/delete-index.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.delete_index( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-row.md b/docs/examples/1.8.x/server-python/examples/tables/delete-row.md deleted file mode 100644 index 40a8b09fcf..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -tables = Tables(client) - -result = tables.delete_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md deleted file mode 100644 index 236aea1c9b..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/delete-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.delete_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/delete.md b/docs/examples/1.8.x/server-python/examples/tables/delete.md deleted file mode 100644 index de48bfc2b5..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.delete( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-column.md b/docs/examples/1.8.x/server-python/examples/tables/get-column.md deleted file mode 100644 index 4bd4617142..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/get-column.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.get_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-index.md b/docs/examples/1.8.x/server-python/examples/tables/get-index.md deleted file mode 100644 index cf88017fbe..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/get-index.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.get_index( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get-row.md b/docs/examples/1.8.x/server-python/examples/tables/get-row.md deleted file mode 100644 index 25fefb23fd..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -tables = Tables(client) - -result = tables.get_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/get.md b/docs/examples/1.8.x/server-python/examples/tables/get.md deleted file mode 100644 index 789410cfb7..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/get.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.get( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md deleted file mode 100644 index cfb923029e..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/increment-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.increment_row_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - column = '', - value = None, # optional - max = None # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-columns.md b/docs/examples/1.8.x/server-python/examples/tables/list-columns.md deleted file mode 100644 index d9c5b16468..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/list-columns.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.list_columns( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md deleted file mode 100644 index 0b0bb585e7..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/list-indexes.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.list_indexes( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list-rows.md b/docs/examples/1.8.x/server-python/examples/tables/list-rows.md deleted file mode 100644 index 2ece6f6cf7..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -tables = Tables(client) - -result = tables.list_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/list.md b/docs/examples/1.8.x/server-python/examples/tables/list.md deleted file mode 100644 index 55a99e996d..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/list.md +++ /dev/null @@ -1,15 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.list( - database_id = '<DATABASE_ID>', - queries = [], # optional - search = '<SEARCH>' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md deleted file mode 100644 index 1bc7a4afac..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_boolean_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = False, - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md deleted file mode 100644 index 157ff44a7b..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_datetime_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md deleted file mode 100644 index 8b9e4cad36..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_email_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = 'email@example.com', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md deleted file mode 100644 index b46971beac..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_enum_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - elements = [], - required = False, - default = '<DEFAULT>', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md deleted file mode 100644 index 243a26f0aa..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_float_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = None, - min = None, # optional - max = None, # optional - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md deleted file mode 100644 index 99b55c17a7..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_integer_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = None, - min = None, # optional - max = None, # optional - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md deleted file mode 100644 index 2fb470ae6e..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_ip_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md deleted file mode 100644 index 35a307c7e2..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,17 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_relationship_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - on_delete = RelationMutate.CASCADE, # optional - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-row.md b/docs/examples/1.8.x/server-python/examples/tables/update-row.md deleted file mode 100644 index 4a71fc97f2..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_session('') # The user session to authenticate with - -tables = Tables(client) - -result = tables.update_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>', - data = {}, # optional - permissions = ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-rows.md b/docs/examples/1.8.x/server-python/examples/tables/update-rows.md deleted file mode 100644 index a834346678..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - data = {}, # optional - queries = [] # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md deleted file mode 100644 index 252c26433e..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_string_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = '<DEFAULT>', - size = 1, # optional - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md deleted file mode 100644 index 235e2f3bc4..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update_url_column( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - key = '', - required = False, - default = 'https://example.com', - new_key = '' # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/update.md b/docs/examples/1.8.x/server-python/examples/tables/update.md deleted file mode 100644 index c567bd5500..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/update.md +++ /dev/null @@ -1,18 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_project('<YOUR_PROJECT_ID>') # Your project ID -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.update( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - name = '<NAME>', - permissions = ["read("any")"], # optional - row_security = False, # optional - enabled = False # optional -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md deleted file mode 100644 index e418708bc3..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_session('') # The user session to authenticate with -client.set_key('<YOUR_API_KEY>') # Your secret API key -client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token - -tables = Tables(client) - -result = tables.upsert_row( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>', - row_id = '<ROW_ID>' -) diff --git a/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md deleted file mode 100644 index 85c2e94d69..0000000000 --- a/docs/examples/1.8.x/server-python/examples/tables/upsert-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -from appwrite.client import Client -from appwrite.services.tables import Tables - -client = Client() -client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_admin('') # -client.set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables(client) - -result = tables.upsert_rows( - database_id = '<DATABASE_ID>', - table_id = '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md deleted file mode 100644 index 4152d8538f..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/boolean HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": false, - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md deleted file mode 100644 index d5318d96db..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/datetime HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": , - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md deleted file mode 100644 index b213fa6ceb..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-email-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/email HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": "email@example.com", - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md deleted file mode 100644 index 125f617f1f..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-enum-column.md +++ /dev/null @@ -1,14 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/enum HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "elements": [], - "required": false, - "default": "<DEFAULT>", - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md deleted file mode 100644 index 2e010318ff..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-float-column.md +++ /dev/null @@ -1,15 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/float HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "min": 0, - "max": 0, - "default": 0, - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-index.md b/docs/examples/1.8.x/server-rest/examples/tables/create-index.md deleted file mode 100644 index eaddec973a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-index.md +++ /dev/null @@ -1,14 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/indexes HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "type": "key", - "columns": [], - "orders": [], - "lengths": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md deleted file mode 100644 index f284dc03ef..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-integer-column.md +++ /dev/null @@ -1,15 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/integer HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "min": 0, - "max": 0, - "default": 0, - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md deleted file mode 100644 index 8def17fc27..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-ip-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/ip HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": , - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md deleted file mode 100644 index d8feb21916..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,15 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/relationship HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "relatedTableId": "<RELATED_TABLE_ID>", - "type": "oneToOne", - "twoWay": false, - "key": , - "twoWayKey": , - "onDelete": "cascade" -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-row.md b/docs/examples/1.8.x/server-rest/examples/tables/create-row.md deleted file mode 100644 index 075be16fa4..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-row.md +++ /dev/null @@ -1,14 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - -{ - "rowId": "<ROW_ID>", - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md deleted file mode 100644 index ad3d6983cc..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-rows.md +++ /dev/null @@ -1,12 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - -{ - "rows": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md deleted file mode 100644 index e654a05e3a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-string-column.md +++ /dev/null @@ -1,15 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/string HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "size": 1, - "required": false, - "default": "<DEFAULT>", - "array": false, - "encrypt": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md deleted file mode 100644 index d98d77c68d..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create-url-column.md +++ /dev/null @@ -1,13 +0,0 @@ -POST /v1/databases/{databaseId}/tables/{tableId}/columns/url HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "key": , - "required": false, - "default": "https://example.com", - "array": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/create.md b/docs/examples/1.8.x/server-rest/examples/tables/create.md deleted file mode 100644 index 14e1f6ec05..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/create.md +++ /dev/null @@ -1,14 +0,0 @@ -POST /v1/databases/{databaseId}/tables HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "tableId": "<TABLE_ID>", - "name": "<NAME>", - "permissions": ["read(\"any\")"], - "rowSecurity": false, - "enabled": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md deleted file mode 100644 index a76efb3a69..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,11 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "value": 0, - "min": 0 -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md deleted file mode 100644 index 2bda57366c..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/delete-column.md +++ /dev/null @@ -1,7 +0,0 @@ -DELETE /v1/databases/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md deleted file mode 100644 index ffffc38c64..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/delete-index.md +++ /dev/null @@ -1,7 +0,0 @@ -DELETE /v1/databases/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md deleted file mode 100644 index f10adef821..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/delete-row.md +++ /dev/null @@ -1,9 +0,0 @@ -DELETE /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md deleted file mode 100644 index fcaf8fb472..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/delete-rows.md +++ /dev/null @@ -1,10 +0,0 @@ -DELETE /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "queries": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/delete.md b/docs/examples/1.8.x/server-rest/examples/tables/delete.md deleted file mode 100644 index 379bead1ad..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/delete.md +++ /dev/null @@ -1,7 +0,0 @@ -DELETE /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-column.md b/docs/examples/1.8.x/server-rest/examples/tables/get-column.md deleted file mode 100644 index 31d1856539..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/get-column.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/columns/{key} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-index.md b/docs/examples/1.8.x/server-rest/examples/tables/get-index.md deleted file mode 100644 index 076058d7f3..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/get-index.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/indexes/{key} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get-row.md b/docs/examples/1.8.x/server-rest/examples/tables/get-row.md deleted file mode 100644 index 0b827f18a8..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/get-row.md +++ /dev/null @@ -1,7 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/get.md b/docs/examples/1.8.x/server-rest/examples/tables/get.md deleted file mode 100644 index 74877ec0c0..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/get.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md deleted file mode 100644 index 480645c39c..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/increment-row-column.md +++ /dev/null @@ -1,11 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "value": 0, - "max": 0 -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md b/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md deleted file mode 100644 index 152b36ca26..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/list-columns.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/columns HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md deleted file mode 100644 index ee10a85d5e..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/list-indexes.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/indexes HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md deleted file mode 100644 index 46e69ab609..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/list-rows.md +++ /dev/null @@ -1,7 +0,0 @@ -GET /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/list.md b/docs/examples/1.8.x/server-rest/examples/tables/list.md deleted file mode 100644 index e856ef7241..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/list.md +++ /dev/null @@ -1,5 +0,0 @@ -GET /v1/databases/{databaseId}/tables HTTP/1.1 -Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md deleted file mode 100644 index e4a1c4602a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/boolean/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": false, - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md deleted file mode 100644 index 6b531dc604..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/datetime/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": , - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md deleted file mode 100644 index 531aa7a31a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-email-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/email/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": "email@example.com", - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md deleted file mode 100644 index b02936fc5a..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-enum-column.md +++ /dev/null @@ -1,13 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/enum/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "elements": [], - "required": false, - "default": "<DEFAULT>", - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md deleted file mode 100644 index 313acb6c20..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-float-column.md +++ /dev/null @@ -1,14 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/float/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "min": 0, - "max": 0, - "default": 0, - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md deleted file mode 100644 index a2552e93ff..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-integer-column.md +++ /dev/null @@ -1,14 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/integer/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "min": 0, - "max": 0, - "default": 0, - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md deleted file mode 100644 index b3cef978e2..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-ip-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/ip/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": , - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md deleted file mode 100644 index 19fed27fdf..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,11 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/{key}/relationship HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "onDelete": "cascade", - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-row.md b/docs/examples/1.8.x/server-rest/examples/tables/update-row.md deleted file mode 100644 index 20c92d746b..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-row.md +++ /dev/null @@ -1,13 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - -{ - "data": {}, - "permissions": ["read(\"any\")"] -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md deleted file mode 100644 index 249653070c..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-rows.md +++ /dev/null @@ -1,11 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "data": {}, - "queries": [] -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md deleted file mode 100644 index 7a25ee52e8..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-string-column.md +++ /dev/null @@ -1,13 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/string/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": "<DEFAULT>", - "size": 1, - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md deleted file mode 100644 index 2097e91d85..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update-url-column.md +++ /dev/null @@ -1,12 +0,0 @@ -PATCH /v1/databases/{databaseId}/tables/{tableId}/columns/url/{key} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "required": false, - "default": "https://example.com", - "newKey": -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/update.md b/docs/examples/1.8.x/server-rest/examples/tables/update.md deleted file mode 100644 index 786a36cf3c..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/update.md +++ /dev/null @@ -1,13 +0,0 @@ -PUT /v1/databases/{databaseId}/tables/{tableId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - -{ - "name": "<NAME>", - "permissions": ["read(\"any\")"], - "rowSecurity": false, - "enabled": false -} diff --git a/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md deleted file mode 100644 index 7edca8018c..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/upsert-row.md +++ /dev/null @@ -1,9 +0,0 @@ -PUT /v1/databases/{databaseId}/tables/{tableId}/rows/{rowId} HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Session: -X-Appwrite-Key: <YOUR_API_KEY> -X-Appwrite-JWT: <YOUR_JWT> - diff --git a/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md deleted file mode 100644 index cfcb914866..0000000000 --- a/docs/examples/1.8.x/server-rest/examples/tables/upsert-rows.md +++ /dev/null @@ -1,7 +0,0 @@ -PUT /v1/databases/{databaseId}/tables/{tableId}/rows HTTP/1.1 -Host: cloud.appwrite.io -Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 -X-Appwrite-Project: <YOUR_PROJECT_ID> -X-Appwrite-Key: <YOUR_API_KEY> - diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md deleted file mode 100644 index 7df3908513..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_boolean_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: false, # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md deleted file mode 100644 index 2d65509184..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_datetime_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md deleted file mode 100644 index 01f7ad43b5..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_email_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: 'email@example.com', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md deleted file mode 100644 index 97fcb589e4..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_enum_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - elements: [], - required: false, - default: '<DEFAULT>', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md deleted file mode 100644 index 9df32a3f5b..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_float_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - min: null, # optional - max: null, # optional - default: null, # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md deleted file mode 100644 index 3c8dfdfb6b..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-index.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite -include Appwrite::Enums - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_index( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - type: IndexType::KEY, - columns: [], - orders: [], # optional - lengths: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md deleted file mode 100644 index d0c5c78108..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_integer_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - min: null, # optional - max: null, # optional - default: null, # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md deleted file mode 100644 index 0c97840a27..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_ip_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md deleted file mode 100644 index 8f7fb841aa..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,22 +0,0 @@ -require 'appwrite' - -include Appwrite -include Appwrite::Enums - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_relationship_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - related_table_id: '<RELATED_TABLE_ID>', - type: RelationshipType::ONETOONE, - two_way: false, # optional - key: '', # optional - two_way_key: '', # optional - on_delete: RelationMutate::CASCADE # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md deleted file mode 100644 index a625249700..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-row.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_session('') # The user session to authenticate with - .set_key('<YOUR_API_KEY>') # Your secret API key - .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token - -tables = Tables.new(client) - -result = tables.create_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - data: {}, - permissions: ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md deleted file mode 100644 index 2e78b96cbc..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_admin('') # - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - rows: [] -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md deleted file mode 100644 index d47cf49e0c..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-string-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_string_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - size: 1, - required: false, - default: '<DEFAULT>', # optional - array: false, # optional - encrypt: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md deleted file mode 100644 index fcfebac7a8..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create_url_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: 'https://example.com', # optional - array: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/create.md b/docs/examples/1.8.x/server-ruby/examples/tables/create.md deleted file mode 100644 index 5a255fafac..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/create.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.create( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], # optional - row_security: false, # optional - enabled: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md deleted file mode 100644 index e22afcb0ad..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.decrement_row_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - column: '', - value: null, # optional - min: null # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md deleted file mode 100644 index 245864053f..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/delete-column.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.delete_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md deleted file mode 100644 index 54bd5455aa..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/delete-index.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.delete_index( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md deleted file mode 100644 index 9841fc2d2f..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/delete-row.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -tables = Tables.new(client) - -result = tables.delete_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md deleted file mode 100644 index 7be1e4bc70..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/delete-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.delete_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/delete.md b/docs/examples/1.8.x/server-ruby/examples/tables/delete.md deleted file mode 100644 index ca607f2b6b..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/delete.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.delete( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md deleted file mode 100644 index 1a1469d005..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/get-column.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.get_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md deleted file mode 100644 index 7d762ce8ae..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/get-index.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.get_index( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md deleted file mode 100644 index 4526bb7316..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/get-row.md +++ /dev/null @@ -1,17 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -tables = Tables.new(client) - -result = tables.get_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/get.md b/docs/examples/1.8.x/server-ruby/examples/tables/get.md deleted file mode 100644 index 22ba02aebc..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/get.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.get( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md deleted file mode 100644 index c0a91d4b62..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/increment-row-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.increment_row_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - column: '', - value: null, # optional - max: null # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md deleted file mode 100644 index 7e851564c2..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/list-columns.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.list_columns( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md deleted file mode 100644 index 0789291071..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/list-indexes.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.list_indexes( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md deleted file mode 100644 index bc9a0a49f6..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/list-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -tables = Tables.new(client) - -result = tables.list_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/list.md b/docs/examples/1.8.x/server-ruby/examples/tables/list.md deleted file mode 100644 index 7cf987ebb9..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/list.md +++ /dev/null @@ -1,16 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.list( - database_id: '<DATABASE_ID>', - queries: [], # optional - search: '<SEARCH>' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md deleted file mode 100644 index a09b365cd1..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_boolean_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: false, - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md deleted file mode 100644 index 55e0484b4c..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_datetime_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md deleted file mode 100644 index 285cd6655a..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-email-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_email_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: 'email@example.com', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md deleted file mode 100644 index 90773ed9e4..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-enum-column.md +++ /dev/null @@ -1,20 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_enum_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - elements: [], - required: false, - default: '<DEFAULT>', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md deleted file mode 100644 index 0bb992bd3c..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-float-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_float_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: null, - min: null, # optional - max: null, # optional - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md deleted file mode 100644 index 35f8c471a8..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-integer-column.md +++ /dev/null @@ -1,21 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_integer_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: null, - min: null, # optional - max: null, # optional - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md deleted file mode 100644 index 2ad1840a9d..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-ip-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_ip_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md deleted file mode 100644 index de86fd53d7..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,18 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_relationship_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - on_delete: RelationMutate::CASCADE, # optional - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md deleted file mode 100644 index 500927dcf0..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-row.md +++ /dev/null @@ -1,18 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_session('') # The user session to authenticate with - -tables = Tables.new(client) - -result = tables.update_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>', - data: {}, # optional - permissions: ["read("any")"] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md deleted file mode 100644 index 8cee1810be..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-rows.md +++ /dev/null @@ -1,17 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - data: {}, # optional - queries: [] # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md deleted file mode 100644 index 2240f49555..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_string_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: '<DEFAULT>', - size: 1, # optional - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md deleted file mode 100644 index 0947a78a9e..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update-url-column.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update_url_column( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - key: '', - required: false, - default: 'https://example.com', - new_key: '' # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/update.md b/docs/examples/1.8.x/server-ruby/examples/tables/update.md deleted file mode 100644 index 003d3d041c..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/update.md +++ /dev/null @@ -1,19 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_project('<YOUR_PROJECT_ID>') # Your project ID - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.update( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - name: '<NAME>', - permissions: ["read("any")"], # optional - row_security: false, # optional - enabled: false # optional -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md deleted file mode 100644 index d96172e1ec..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-row.md +++ /dev/null @@ -1,17 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_session('') # The user session to authenticate with - .set_key('<YOUR_API_KEY>') # Your secret API key - .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token - -tables = Tables.new(client) - -result = tables.upsert_row( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>', - row_id: '<ROW_ID>' -) diff --git a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md deleted file mode 100644 index 8987b1ee0e..0000000000 --- a/docs/examples/1.8.x/server-ruby/examples/tables/upsert-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -require 'appwrite' - -include Appwrite - -client = Client.new - .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_admin('') # - .set_key('<YOUR_API_KEY>') # Your secret API key - -tables = Tables.new(client) - -result = tables.upsert_rows( - database_id: '<DATABASE_ID>', - table_id: '<TABLE_ID>' -) diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md deleted file mode 100644 index 1b9627afac..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnBoolean = try await tables.createBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md deleted file mode 100644 index e002fb8042..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnDatetime = try await tables.createDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md deleted file mode 100644 index 338493dbc5..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnEmail = try await tables.createEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md deleted file mode 100644 index a6a9fff2c4..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnEnum = try await tables.createEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: [], - required: false, - default: "<DEFAULT>", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md deleted file mode 100644 index 12e4062454..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnFloat = try await tables.createFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, // optional - max: 0, // optional - default: 0, // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-index.md b/docs/examples/1.8.x/server-swift/examples/tables/create-index.md deleted file mode 100644 index 03dea1ac48..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-index.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite -import AppwriteEnums - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnIndex = try await tables.createIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - type: .key, - columns: [], - orders: [], // optional - lengths: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md deleted file mode 100644 index 6c04294025..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnInteger = try await tables.createIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - min: 0, // optional - max: 0, // optional - default: 0, // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md deleted file mode 100644 index 2cd0b2795f..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnIp = try await tables.createIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md deleted file mode 100644 index 66b993cf9a..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-relationship-column.md +++ /dev/null @@ -1,21 +0,0 @@ -import Appwrite -import AppwriteEnums - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnRelationship = try await tables.createRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - relatedTableId: "<RELATED_TABLE_ID>", - type: .oneToOne, - twoWay: false, // optional - key: "", // optional - twoWayKey: "", // optional - onDelete: .cascade // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-row.md b/docs/examples/1.8.x/server-swift/examples/tables/create-row.md deleted file mode 100644 index a736355127..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-row.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -let tables = Tables(client) - -let row = try await tables.createRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md deleted file mode 100644 index ee2095f08f..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let rowList = try await tables.createRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rows: [] -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md deleted file mode 100644 index e83ffdf367..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-string-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnString = try await tables.createStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - size: 1, - required: false, - default: "<DEFAULT>", // optional - array: false, // optional - encrypt: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md b/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md deleted file mode 100644 index 150b51309d..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnUrl = try await tables.createUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", // optional - array: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/create.md b/docs/examples/1.8.x/server-swift/examples/tables/create.md deleted file mode 100644 index 0843dfd242..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/create.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let table = try await tables.create( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md b/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md deleted file mode 100644 index ef24324780..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/decrement-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let row = try await tables.decrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, // optional - min: 0 // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md deleted file mode 100644 index 07f825ddbe..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/delete-column.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let result = try await tables.deleteColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md deleted file mode 100644 index b6d2e5bfea..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/delete-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let result = try await tables.deleteIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md deleted file mode 100644 index 92bc38777e..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/delete-row.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let tables = Tables(client) - -let result = try await tables.deleteRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md deleted file mode 100644 index d27fbce85f..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/delete-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let rowList = try await tables.deleteRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/delete.md b/docs/examples/1.8.x/server-swift/examples/tables/delete.md deleted file mode 100644 index aefa1d8cda..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let result = try await tables.delete( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-column.md b/docs/examples/1.8.x/server-swift/examples/tables/get-column.md deleted file mode 100644 index 653f79dce7..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/get-column.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let result = try await tables.getColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-index.md b/docs/examples/1.8.x/server-swift/examples/tables/get-index.md deleted file mode 100644 index 6835f56aa0..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/get-index.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnIndex = try await tables.getIndex( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get-row.md b/docs/examples/1.8.x/server-swift/examples/tables/get-row.md deleted file mode 100644 index e2ff10f09a..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/get-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let tables = Tables(client) - -let row = try await tables.getRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/get.md b/docs/examples/1.8.x/server-swift/examples/tables/get.md deleted file mode 100644 index 610bf42529..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/get.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let table = try await tables.get( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md b/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md deleted file mode 100644 index 6ea883d612..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/increment-row-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let row = try await tables.incrementRowColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - column: "", - value: 0, // optional - max: 0 // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md b/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md deleted file mode 100644 index 88c86137a4..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/list-columns.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnList = try await tables.listColumns( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md b/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md deleted file mode 100644 index 2ea8e99eca..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/list-indexes.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnIndexList = try await tables.listIndexes( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md deleted file mode 100644 index ca2e5b0d4b..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/list-rows.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let tables = Tables(client) - -let rowList = try await tables.listRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/list.md b/docs/examples/1.8.x/server-swift/examples/tables/list.md deleted file mode 100644 index e135b50289..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/list.md +++ /dev/null @@ -1,15 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let tableList = try await tables.list( - databaseId: "<DATABASE_ID>", - queries: [], // optional - search: "<SEARCH>" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md deleted file mode 100644 index e0d1ea2f9f..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-boolean-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnBoolean = try await tables.updateBooleanColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: false, - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md deleted file mode 100644 index f09e27920b..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-datetime-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnDatetime = try await tables.updateDatetimeColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md deleted file mode 100644 index f7b8cc4ede..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-email-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnEmail = try await tables.updateEmailColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "email@example.com", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md deleted file mode 100644 index 776da72e59..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-enum-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnEnum = try await tables.updateEnumColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - elements: [], - required: false, - default: "<DEFAULT>", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md deleted file mode 100644 index d6cd34c4b5..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-float-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnFloat = try await tables.updateFloatColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, // optional - max: 0, // optional - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md deleted file mode 100644 index e1265cedbf..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-integer-column.md +++ /dev/null @@ -1,20 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnInteger = try await tables.updateIntegerColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: 0, - min: 0, // optional - max: 0, // optional - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md deleted file mode 100644 index 4f3538bb7a..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-ip-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnIp = try await tables.updateIpColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md deleted file mode 100644 index 74bfd62750..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-relationship-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite -import AppwriteEnums - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnRelationship = try await tables.updateRelationshipColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - onDelete: .cascade, // optional - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-row.md b/docs/examples/1.8.x/server-swift/examples/tables/update-row.md deleted file mode 100644 index 7fa81f6b58..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-row.md +++ /dev/null @@ -1,17 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setSession("") // The user session to authenticate with - -let tables = Tables(client) - -let row = try await tables.updateRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>", - data: [:], // optional - permissions: ["read("any")"] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md deleted file mode 100644 index d7cd0697da..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-rows.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let rowList = try await tables.updateRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - data: [:], // optional - queries: [] // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md deleted file mode 100644 index ba14d9a96a..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-string-column.md +++ /dev/null @@ -1,19 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnString = try await tables.updateStringColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "<DEFAULT>", - size: 1, // optional - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md b/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md deleted file mode 100644 index 19015e4c88..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update-url-column.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let columnUrl = try await tables.updateUrlColumn( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - key: "", - required: false, - default: "https://example.com", - newKey: "" // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/update.md b/docs/examples/1.8.x/server-swift/examples/tables/update.md deleted file mode 100644 index c9840a0a51..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/update.md +++ /dev/null @@ -1,18 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setProject("<YOUR_PROJECT_ID>") // Your project ID - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let table = try await tables.update( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - name: "<NAME>", - permissions: ["read("any")"], // optional - rowSecurity: false, // optional - enabled: false // optional -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md b/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md deleted file mode 100644 index c5c5b73afc..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/upsert-row.md +++ /dev/null @@ -1,16 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token - -let tables = Tables(client) - -let row = try await tables.upsertRow( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>", - rowId: "<ROW_ID>" -) - diff --git a/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md b/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md deleted file mode 100644 index 037d927dc9..0000000000 --- a/docs/examples/1.8.x/server-swift/examples/tables/upsert-rows.md +++ /dev/null @@ -1,14 +0,0 @@ -import Appwrite - -let client = Client() - .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // - .setKey("<YOUR_API_KEY>") // Your secret API key - -let tables = Tables(client) - -let rowList = try await tables.upsertRows( - databaseId: "<DATABASE_ID>", - tableId: "<TABLE_ID>" -) - From cd5844b8e37733048713489b6db95171f4871ec9 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 30 Jul 2025 10:39:28 +0530 Subject: [PATCH 321/362] update: regen examples, references. --- .../java/databases/create-document.md | 4 +-- .../java/databases/upsert-document.md | 6 ++-- .../java/functions/create-execution.md | 2 +- .../client-android/java/grids/create-row.md | 26 +++++++++++++++ .../client-android/java/grids/delete-row.md | 24 ++++++++++++++ .../client-android/java/grids/get-row.md | 25 ++++++++++++++ .../client-android/java/grids/list-rows.md | 24 ++++++++++++++ .../client-android/java/grids/update-row.md | 26 +++++++++++++++ .../client-android/java/grids/upsert-row.md | 26 +++++++++++++++ .../kotlin/databases/create-document.md | 4 +-- .../kotlin/databases/upsert-document.md | 6 ++-- .../kotlin/functions/create-execution.md | 2 +- .../client-android/kotlin/grids/create-row.md | 17 ++++++++++ .../client-android/kotlin/grids/delete-row.md | 15 +++++++++ .../client-android/kotlin/grids/get-row.md | 16 +++++++++ .../client-android/kotlin/grids/list-rows.md | 15 +++++++++ .../client-android/kotlin/grids/update-row.md | 17 ++++++++++ .../client-android/kotlin/grids/upsert-row.md | 17 ++++++++++ .../examples/databases/create-document.md | 4 +-- .../examples/databases/upsert-document.md | 8 ++--- .../examples/functions/create-execution.md | 2 +- .../client-apple/examples/grids/create-row.md | 16 +++++++++ .../client-apple/examples/grids/delete-row.md | 14 ++++++++ .../client-apple/examples/grids/get-row.md | 15 +++++++++ .../client-apple/examples/grids/list-rows.md | 14 ++++++++ .../client-apple/examples/grids/update-row.md | 16 +++++++++ .../client-apple/examples/grids/upsert-row.md | 16 +++++++++ .../examples/databases/create-document.md | 4 +-- .../examples/databases/upsert-document.md | 6 ++-- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-row.md | 15 +++++++++ .../examples/grids/delete-row.md | 13 ++++++++ .../client-flutter/examples/grids/get-row.md | 14 ++++++++ .../examples/grids/list-rows.md | 13 ++++++++ .../examples/grids/update-row.md | 15 +++++++++ .../examples/grids/upsert-row.md | 15 +++++++++ .../examples/databases/upsert-document.md | 4 ++- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-row.md | 18 ++++++++++ .../examples/grids/delete-row.md | 9 +++++ .../client-graphql/examples/grids/get-row.md | 0 .../examples/grids/list-rows.md | 0 .../examples/grids/update-row.md | 18 ++++++++++ .../examples/grids/upsert-row.md | 18 ++++++++++ .../examples/storage/create-file.md | 2 +- .../examples/databases/create-document.md | 4 +-- .../examples/databases/upsert-document.md | 8 ++--- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-row.md | 17 ++++++++++ .../examples/grids/delete-row.md | 15 +++++++++ .../examples/grids/get-row.md | 16 +++++++++ .../examples/grids/list-rows.md | 15 +++++++++ .../examples/grids/update-row.md | 17 ++++++++++ .../examples/grids/upsert-row.md | 17 ++++++++++ .../account/create-anonymous-session.md | 2 +- .../account/create-email-password-session.md | 2 +- .../examples/account/create-email-token.md | 2 +- .../examples/account/create-j-w-t.md | 2 +- .../account/create-magic-u-r-l-token.md | 2 +- .../account/create-mfa-authenticator.md | 2 +- .../examples/account/create-mfa-challenge.md | 2 +- .../account/create-mfa-recovery-codes.md | 2 +- .../examples/account/create-o-auth2session.md | 2 +- .../examples/account/create-o-auth2token.md | 2 +- .../examples/account/create-phone-token.md | 2 +- .../account/create-phone-verification.md | 2 +- .../examples/account/create-push-target.md | 2 +- .../examples/account/create-recovery.md | 2 +- .../examples/account/create-session.md | 2 +- .../examples/account/create-verification.md | 2 +- .../client-rest/examples/account/create.md | 2 +- .../examples/account/delete-identity.md | 2 +- .../account/delete-mfa-authenticator.md | 2 +- .../examples/account/delete-push-target.md | 2 +- .../examples/account/delete-session.md | 2 +- .../examples/account/delete-sessions.md | 2 +- .../account/get-mfa-recovery-codes.md | 2 +- .../client-rest/examples/account/get-prefs.md | 2 +- .../examples/account/get-session.md | 2 +- .../1.8.x/client-rest/examples/account/get.md | 2 +- .../examples/account/list-identities.md | 2 +- .../client-rest/examples/account/list-logs.md | 2 +- .../examples/account/list-mfa-factors.md | 2 +- .../examples/account/list-sessions.md | 2 +- .../examples/account/update-email.md | 2 +- .../examples/account/update-m-f-a.md | 2 +- .../account/update-magic-u-r-l-session.md | 2 +- .../account/update-mfa-authenticator.md | 2 +- .../examples/account/update-mfa-challenge.md | 2 +- .../account/update-mfa-recovery-codes.md | 2 +- .../examples/account/update-name.md | 2 +- .../examples/account/update-password.md | 2 +- .../examples/account/update-phone-session.md | 2 +- .../account/update-phone-verification.md | 2 +- .../examples/account/update-phone.md | 2 +- .../examples/account/update-prefs.md | 2 +- .../examples/account/update-push-target.md | 2 +- .../examples/account/update-recovery.md | 2 +- .../examples/account/update-session.md | 2 +- .../examples/account/update-status.md | 2 +- .../examples/account/update-verification.md | 2 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../examples/avatars/get-favicon.md | 2 +- .../client-rest/examples/avatars/get-flag.md | 2 +- .../client-rest/examples/avatars/get-image.md | 2 +- .../examples/avatars/get-initials.md | 2 +- .../client-rest/examples/avatars/get-q-r.md | 2 +- .../examples/databases/create-document.md | 2 +- .../examples/databases/delete-document.md | 2 +- .../examples/databases/get-document.md | 2 +- .../examples/databases/list-documents.md | 2 +- .../examples/databases/update-document.md | 2 +- .../examples/databases/upsert-document.md | 6 +++- .../examples/functions/create-execution.md | 4 +-- .../examples/functions/get-execution.md | 2 +- .../examples/functions/list-executions.md | 2 +- .../client-rest/examples/graphql/mutation.md | 2 +- .../client-rest/examples/graphql/query.md | 2 +- .../client-rest/examples/grids/create-row.md | 13 ++++++++ .../client-rest/examples/grids/delete-row.md | 8 +++++ .../client-rest/examples/grids/get-row.md | 6 ++++ .../client-rest/examples/grids/list-rows.md | 6 ++++ .../client-rest/examples/grids/update-row.md | 12 +++++++ .../client-rest/examples/grids/upsert-row.md | 12 +++++++ .../1.8.x/client-rest/examples/locale/get.md | 2 +- .../client-rest/examples/locale/list-codes.md | 2 +- .../examples/locale/list-continents.md | 2 +- .../examples/locale/list-countries-e-u.md | 2 +- .../examples/locale/list-countries-phones.md | 2 +- .../examples/locale/list-countries.md | 2 +- .../examples/locale/list-currencies.md | 2 +- .../examples/locale/list-languages.md | 2 +- .../examples/messaging/create-subscriber.md | 2 +- .../examples/messaging/delete-subscriber.md | 2 +- .../examples/storage/create-file.md | 2 +- .../examples/storage/delete-file.md | 2 +- .../examples/storage/get-file-download.md | 2 +- .../examples/storage/get-file-preview.md | 2 +- .../examples/storage/get-file-view.md | 2 +- .../client-rest/examples/storage/get-file.md | 2 +- .../examples/storage/list-files.md | 2 +- .../examples/storage/update-file.md | 2 +- .../examples/teams/create-membership.md | 2 +- .../client-rest/examples/teams/create.md | 2 +- .../examples/teams/delete-membership.md | 2 +- .../client-rest/examples/teams/delete.md | 2 +- .../examples/teams/get-membership.md | 2 +- .../client-rest/examples/teams/get-prefs.md | 2 +- .../1.8.x/client-rest/examples/teams/get.md | 2 +- .../examples/teams/list-memberships.md | 2 +- .../1.8.x/client-rest/examples/teams/list.md | 2 +- .../teams/update-membership-status.md | 2 +- .../examples/teams/update-membership.md | 2 +- .../client-rest/examples/teams/update-name.md | 2 +- .../examples/teams/update-prefs.md | 2 +- .../examples/databases/create-document.md | 4 +-- .../examples/databases/upsert-document.md | 8 ++--- .../examples/functions/create-execution.md | 2 +- .../client-web/examples/grids/create-row.md | 17 ++++++++++ .../client-web/examples/grids/delete-row.md | 15 +++++++++ .../client-web/examples/grids/get-row.md | 16 +++++++++ .../client-web/examples/grids/list-rows.md | 15 +++++++++ .../client-web/examples/grids/update-row.md | 17 ++++++++++ .../client-web/examples/grids/upsert-row.md | 17 ++++++++++ .../examples/databases/upsert-document.md | 4 ++- .../examples/databases/upsert-documents.md | 3 +- .../examples/grids/create-boolean-column.md | 7 ++++ .../examples/grids/create-database.md | 4 +++ .../examples/grids/create-datetime-column.md | 7 ++++ .../examples/grids/create-email-column.md | 7 ++++ .../examples/grids/create-enum-column.md | 8 +++++ .../examples/grids/create-float-column.md | 9 +++++ .../examples/grids/create-index.md | 8 +++++ .../examples/grids/create-integer-column.md | 9 +++++ .../examples/grids/create-ip-column.md | 7 ++++ .../grids/create-relationship-column.md | 9 +++++ .../console-cli/examples/grids/create-row.md | 6 ++++ .../console-cli/examples/grids/create-rows.md | 4 +++ .../examples/grids/create-string-column.md | 9 +++++ .../examples/grids/create-table.md | 7 ++++ .../examples/grids/create-url-column.md | 7 ++++ .../examples/grids/decrement-row-column.md | 7 ++++ .../examples/grids/delete-column.md | 4 +++ .../examples/grids/delete-database.md | 2 ++ .../examples/grids/delete-index.md | 4 +++ .../console-cli/examples/grids/delete-row.md | 4 +++ .../console-cli/examples/grids/delete-rows.md | 4 +++ .../examples/grids/delete-table.md | 3 ++ .../console-cli/examples/grids/get-column.md | 4 +++ .../examples/grids/get-database-usage.md | 3 ++ .../examples/grids/get-database.md | 2 ++ .../console-cli/examples/grids/get-index.md | 4 +++ .../console-cli/examples/grids/get-row.md | 5 +++ .../examples/grids/get-table-usage.md | 4 +++ .../console-cli/examples/grids/get-table.md | 3 ++ .../examples/grids/increment-row-column.md | 7 ++++ .../examples/grids/list-columns.md | 4 +++ .../examples/grids/list-database-logs.md | 3 ++ .../examples/grids/list-database-usage.md | 2 ++ .../examples/grids/list-databases.md | 3 ++ .../examples/grids/list-indexes.md | 4 +++ .../examples/grids/list-row-logs.md | 5 +++ .../console-cli/examples/grids/list-rows.md | 4 +++ .../examples/grids/list-table-logs.md | 4 +++ .../console-cli/examples/grids/list-tables.md | 4 +++ .../examples/grids/update-boolean-column.md | 7 ++++ .../examples/grids/update-database.md | 4 +++ .../examples/grids/update-datetime-column.md | 7 ++++ .../examples/grids/update-email-column.md | 7 ++++ .../examples/grids/update-enum-column.md | 8 +++++ .../examples/grids/update-float-column.md | 9 +++++ .../examples/grids/update-integer-column.md | 9 +++++ .../examples/grids/update-ip-column.md | 7 ++++ .../grids/update-relationship-column.md | 6 ++++ .../console-cli/examples/grids/update-row.md | 6 ++++ .../console-cli/examples/grids/update-rows.md | 5 +++ .../examples/grids/update-string-column.md | 8 +++++ .../examples/grids/update-table.md | 7 ++++ .../examples/grids/update-url-column.md | 7 ++++ .../console-cli/examples/grids/upsert-row.md | 6 ++++ .../console-cli/examples/grids/upsert-rows.md | 4 +++ .../examples/databases/create-document.md | 4 +-- .../examples/databases/create-documents.md | 3 +- .../examples/databases/upsert-document.md | 8 ++--- .../examples/databases/upsert-documents.md | 6 ++-- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 18 ++++++++++ .../examples/grids/create-database.md | 15 +++++++++ .../examples/grids/create-datetime-column.md | 18 ++++++++++ .../examples/grids/create-email-column.md | 18 ++++++++++ .../examples/grids/create-enum-column.md | 19 +++++++++++ .../examples/grids/create-float-column.md | 20 +++++++++++ .../examples/grids/create-index.md | 19 +++++++++++ .../examples/grids/create-integer-column.md | 20 +++++++++++ .../examples/grids/create-ip-column.md | 18 ++++++++++ .../grids/create-relationship-column.md | 20 +++++++++++ .../console-web/examples/grids/create-row.md | 17 ++++++++++ .../console-web/examples/grids/create-rows.md | 15 +++++++++ .../examples/grids/create-string-column.md | 20 +++++++++++ .../examples/grids/create-table.md | 18 ++++++++++ .../examples/grids/create-url-column.md | 18 ++++++++++ .../examples/grids/decrement-row-column.md | 18 ++++++++++ .../examples/grids/delete-column.md | 15 +++++++++ .../examples/grids/delete-database.md | 13 ++++++++ .../examples/grids/delete-index.md | 15 +++++++++ .../console-web/examples/grids/delete-row.md | 15 +++++++++ .../console-web/examples/grids/delete-rows.md | 15 +++++++++ .../examples/grids/delete-table.md | 14 ++++++++ .../console-web/examples/grids/get-column.md | 15 +++++++++ .../examples/grids/get-database-usage.md | 14 ++++++++ .../examples/grids/get-database.md | 13 ++++++++ .../console-web/examples/grids/get-index.md | 15 +++++++++ .../console-web/examples/grids/get-row.md | 16 +++++++++ .../examples/grids/get-table-usage.md | 15 +++++++++ .../console-web/examples/grids/get-table.md | 14 ++++++++ .../examples/grids/increment-row-column.md | 18 ++++++++++ .../examples/grids/list-columns.md | 15 +++++++++ .../examples/grids/list-database-logs.md | 14 ++++++++ .../examples/grids/list-database-usage.md | 13 ++++++++ .../examples/grids/list-databases.md | 14 ++++++++ .../examples/grids/list-indexes.md | 15 +++++++++ .../examples/grids/list-row-logs.md | 16 +++++++++ .../console-web/examples/grids/list-rows.md | 15 +++++++++ .../examples/grids/list-table-logs.md | 15 +++++++++ .../console-web/examples/grids/list-tables.md | 15 +++++++++ .../examples/grids/update-boolean-column.md | 18 ++++++++++ .../examples/grids/update-database.md | 15 +++++++++ .../examples/grids/update-datetime-column.md | 18 ++++++++++ .../examples/grids/update-email-column.md | 18 ++++++++++ .../examples/grids/update-enum-column.md | 19 +++++++++++ .../examples/grids/update-float-column.md | 20 +++++++++++ .../examples/grids/update-integer-column.md | 20 +++++++++++ .../examples/grids/update-ip-column.md | 18 ++++++++++ .../grids/update-relationship-column.md | 17 ++++++++++ .../console-web/examples/grids/update-row.md | 17 ++++++++++ .../console-web/examples/grids/update-rows.md | 16 +++++++++ .../examples/grids/update-string-column.md | 19 +++++++++++ .../examples/grids/update-table.md | 18 ++++++++++ .../examples/grids/update-url-column.md | 18 ++++++++++ .../console-web/examples/grids/upsert-row.md | 17 ++++++++++ .../console-web/examples/grids/upsert-rows.md | 15 +++++++++ .../examples/databases/create-document.md | 5 ++- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 7 ++-- .../examples/databases/upsert-documents.md | 3 +- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 17 ++++++++++ .../examples/grids/create-database.md | 14 ++++++++ .../examples/grids/create-datetime-column.md | 17 ++++++++++ .../examples/grids/create-email-column.md | 17 ++++++++++ .../examples/grids/create-enum-column.md | 18 ++++++++++ .../examples/grids/create-float-column.md | 19 +++++++++++ .../examples/grids/create-index.md | 18 ++++++++++ .../examples/grids/create-integer-column.md | 19 +++++++++++ .../examples/grids/create-ip-column.md | 17 ++++++++++ .../grids/create-relationship-column.md | 19 +++++++++++ .../server-dart/examples/grids/create-row.md | 16 +++++++++ .../server-dart/examples/grids/create-rows.md | 14 ++++++++ .../examples/grids/create-string-column.md | 19 +++++++++++ .../examples/grids/create-table.md | 17 ++++++++++ .../examples/grids/create-url-column.md | 17 ++++++++++ .../examples/grids/decrement-row-column.md | 17 ++++++++++ .../examples/grids/delete-column.md | 14 ++++++++ .../examples/grids/delete-database.md | 12 +++++++ .../examples/grids/delete-index.md | 14 ++++++++ .../server-dart/examples/grids/delete-row.md | 14 ++++++++ .../server-dart/examples/grids/delete-rows.md | 14 ++++++++ .../examples/grids/delete-table.md | 13 ++++++++ .../server-dart/examples/grids/get-column.md | 14 ++++++++ .../examples/grids/get-database.md | 12 +++++++ .../server-dart/examples/grids/get-index.md | 14 ++++++++ .../server-dart/examples/grids/get-row.md | 15 +++++++++ .../server-dart/examples/grids/get-table.md | 13 ++++++++ .../examples/grids/increment-row-column.md | 17 ++++++++++ .../examples/grids/list-columns.md | 14 ++++++++ .../examples/grids/list-databases.md | 13 ++++++++ .../examples/grids/list-indexes.md | 14 ++++++++ .../server-dart/examples/grids/list-rows.md | 14 ++++++++ .../server-dart/examples/grids/list-tables.md | 14 ++++++++ .../examples/grids/update-boolean-column.md | 17 ++++++++++ .../examples/grids/update-database.md | 14 ++++++++ .../examples/grids/update-datetime-column.md | 17 ++++++++++ .../examples/grids/update-email-column.md | 17 ++++++++++ .../examples/grids/update-enum-column.md | 18 ++++++++++ .../examples/grids/update-float-column.md | 19 +++++++++++ .../examples/grids/update-integer-column.md | 19 +++++++++++ .../examples/grids/update-ip-column.md | 17 ++++++++++ .../grids/update-relationship-column.md | 16 +++++++++ .../server-dart/examples/grids/update-row.md | 16 +++++++++ .../server-dart/examples/grids/update-rows.md | 15 +++++++++ .../examples/grids/update-string-column.md | 18 ++++++++++ .../examples/grids/update-table.md | 17 ++++++++++ .../examples/grids/update-url-column.md | 17 ++++++++++ .../server-dart/examples/grids/upsert-row.md | 16 +++++++++ .../server-dart/examples/grids/upsert-rows.md | 14 ++++++++ .../examples/databases/create-document.md | 5 ++- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 9 ++--- .../examples/databases/upsert-documents.md | 5 +-- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 17 ++++++++++ .../examples/grids/create-database.md | 14 ++++++++ .../examples/grids/create-datetime-column.md | 17 ++++++++++ .../examples/grids/create-email-column.md | 17 ++++++++++ .../examples/grids/create-enum-column.md | 18 ++++++++++ .../examples/grids/create-float-column.md | 19 +++++++++++ .../examples/grids/create-index.md | 18 ++++++++++ .../examples/grids/create-integer-column.md | 19 +++++++++++ .../examples/grids/create-ip-column.md | 17 ++++++++++ .../grids/create-relationship-column.md | 19 +++++++++++ .../server-deno/examples/grids/create-row.md | 16 +++++++++ .../server-deno/examples/grids/create-rows.md | 14 ++++++++ .../examples/grids/create-string-column.md | 19 +++++++++++ .../examples/grids/create-table.md | 17 ++++++++++ .../examples/grids/create-url-column.md | 17 ++++++++++ .../examples/grids/decrement-row-column.md | 17 ++++++++++ .../examples/grids/delete-column.md | 14 ++++++++ .../examples/grids/delete-database.md | 12 +++++++ .../examples/grids/delete-index.md | 14 ++++++++ .../server-deno/examples/grids/delete-row.md | 14 ++++++++ .../server-deno/examples/grids/delete-rows.md | 14 ++++++++ .../examples/grids/delete-table.md | 13 ++++++++ .../server-deno/examples/grids/get-column.md | 14 ++++++++ .../examples/grids/get-database.md | 12 +++++++ .../server-deno/examples/grids/get-index.md | 14 ++++++++ .../server-deno/examples/grids/get-row.md | 15 +++++++++ .../server-deno/examples/grids/get-table.md | 13 ++++++++ .../examples/grids/increment-row-column.md | 17 ++++++++++ .../examples/grids/list-columns.md | 14 ++++++++ .../examples/grids/list-databases.md | 13 ++++++++ .../examples/grids/list-indexes.md | 14 ++++++++ .../server-deno/examples/grids/list-rows.md | 14 ++++++++ .../server-deno/examples/grids/list-tables.md | 14 ++++++++ .../examples/grids/update-boolean-column.md | 17 ++++++++++ .../examples/grids/update-database.md | 14 ++++++++ .../examples/grids/update-datetime-column.md | 17 ++++++++++ .../examples/grids/update-email-column.md | 17 ++++++++++ .../examples/grids/update-enum-column.md | 18 ++++++++++ .../examples/grids/update-float-column.md | 19 +++++++++++ .../examples/grids/update-integer-column.md | 19 +++++++++++ .../examples/grids/update-ip-column.md | 17 ++++++++++ .../grids/update-relationship-column.md | 16 +++++++++ .../server-deno/examples/grids/update-row.md | 16 +++++++++ .../server-deno/examples/grids/update-rows.md | 15 +++++++++ .../examples/grids/update-string-column.md | 18 ++++++++++ .../examples/grids/update-table.md | 17 ++++++++++ .../examples/grids/update-url-column.md | 17 ++++++++++ .../server-deno/examples/grids/upsert-row.md | 16 +++++++++ .../server-deno/examples/grids/upsert-rows.md | 14 ++++++++ .../examples/databases/create-document.md | 5 ++- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 9 ++--- .../examples/databases/upsert-documents.md | 5 +-- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 19 +++++++++++ .../examples/grids/create-database.md | 16 +++++++++ .../examples/grids/create-datetime-column.md | 19 +++++++++++ .../examples/grids/create-email-column.md | 19 +++++++++++ .../examples/grids/create-enum-column.md | 20 +++++++++++ .../examples/grids/create-float-column.md | 21 ++++++++++++ .../examples/grids/create-index.md | 21 ++++++++++++ .../examples/grids/create-integer-column.md | 21 ++++++++++++ .../examples/grids/create-ip-column.md | 19 +++++++++++ .../grids/create-relationship-column.md | 22 +++++++++++++ .../examples/grids/create-row.md | 18 ++++++++++ .../examples/grids/create-rows.md | 16 +++++++++ .../examples/grids/create-string-column.md | 21 ++++++++++++ .../examples/grids/create-table.md | 19 +++++++++++ .../examples/grids/create-url-column.md | 19 +++++++++++ .../examples/grids/decrement-row-column.md | 19 +++++++++++ .../examples/grids/delete-column.md | 16 +++++++++ .../examples/grids/delete-database.md | 14 ++++++++ .../examples/grids/delete-index.md | 16 +++++++++ .../examples/grids/delete-row.md | 16 +++++++++ .../examples/grids/delete-rows.md | 16 +++++++++ .../examples/grids/delete-table.md | 15 +++++++++ .../examples/grids/get-column.md | 16 +++++++++ .../examples/grids/get-database.md | 14 ++++++++ .../server-dotnet/examples/grids/get-index.md | 16 +++++++++ .../server-dotnet/examples/grids/get-row.md | 17 ++++++++++ .../server-dotnet/examples/grids/get-table.md | 15 +++++++++ .../examples/grids/increment-row-column.md | 19 +++++++++++ .../examples/grids/list-columns.md | 16 +++++++++ .../examples/grids/list-databases.md | 15 +++++++++ .../examples/grids/list-indexes.md | 16 +++++++++ .../server-dotnet/examples/grids/list-rows.md | 16 +++++++++ .../examples/grids/list-tables.md | 16 +++++++++ .../examples/grids/update-boolean-column.md | 19 +++++++++++ .../examples/grids/update-database.md | 16 +++++++++ .../examples/grids/update-datetime-column.md | 19 +++++++++++ .../examples/grids/update-email-column.md | 19 +++++++++++ .../examples/grids/update-enum-column.md | 20 +++++++++++ .../examples/grids/update-float-column.md | 21 ++++++++++++ .../examples/grids/update-integer-column.md | 21 ++++++++++++ .../examples/grids/update-ip-column.md | 19 +++++++++++ .../grids/update-relationship-column.md | 19 +++++++++++ .../examples/grids/update-row.md | 18 ++++++++++ .../examples/grids/update-rows.md | 17 ++++++++++ .../examples/grids/update-string-column.md | 20 +++++++++++ .../examples/grids/update-table.md | 19 +++++++++++ .../examples/grids/update-url-column.md | 19 +++++++++++ .../examples/grids/upsert-row.md | 18 ++++++++++ .../examples/grids/upsert-rows.md | 16 +++++++++ .../examples/databases/create-document.md | 3 +- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 5 +-- .../examples/databases/upsert-documents.md | 3 +- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 31 +++++++++++++++++ .../examples/grids/create-database.md | 28 ++++++++++++++++ .../examples/grids/create-datetime-column.md | 31 +++++++++++++++++ .../examples/grids/create-email-column.md | 31 +++++++++++++++++ .../examples/grids/create-enum-column.md | 32 ++++++++++++++++++ .../examples/grids/create-float-column.md | 33 +++++++++++++++++++ .../server-go/examples/grids/create-index.md | 32 ++++++++++++++++++ .../examples/grids/create-integer-column.md | 33 +++++++++++++++++++ .../examples/grids/create-ip-column.md | 31 +++++++++++++++++ .../grids/create-relationship-column.md | 33 +++++++++++++++++++ .../server-go/examples/grids/create-row.md | 30 +++++++++++++++++ .../server-go/examples/grids/create-rows.md | 28 ++++++++++++++++ .../examples/grids/create-string-column.md | 33 +++++++++++++++++++ .../server-go/examples/grids/create-table.md | 31 +++++++++++++++++ .../examples/grids/create-url-column.md | 31 +++++++++++++++++ .../examples/grids/decrement-row-column.md | 31 +++++++++++++++++ .../server-go/examples/grids/delete-column.md | 28 ++++++++++++++++ .../examples/grids/delete-database.md | 26 +++++++++++++++ .../server-go/examples/grids/delete-index.md | 28 ++++++++++++++++ .../server-go/examples/grids/delete-row.md | 28 ++++++++++++++++ .../server-go/examples/grids/delete-rows.md | 28 ++++++++++++++++ .../server-go/examples/grids/delete-table.md | 27 +++++++++++++++ .../server-go/examples/grids/get-column.md | 28 ++++++++++++++++ .../server-go/examples/grids/get-database.md | 26 +++++++++++++++ .../server-go/examples/grids/get-index.md | 28 ++++++++++++++++ .../1.8.x/server-go/examples/grids/get-row.md | 29 ++++++++++++++++ .../server-go/examples/grids/get-table.md | 27 +++++++++++++++ .../examples/grids/increment-row-column.md | 31 +++++++++++++++++ .../server-go/examples/grids/list-columns.md | 28 ++++++++++++++++ .../examples/grids/list-databases.md | 27 +++++++++++++++ .../server-go/examples/grids/list-indexes.md | 28 ++++++++++++++++ .../server-go/examples/grids/list-rows.md | 28 ++++++++++++++++ .../server-go/examples/grids/list-tables.md | 28 ++++++++++++++++ .../examples/grids/update-boolean-column.md | 31 +++++++++++++++++ .../examples/grids/update-database.md | 28 ++++++++++++++++ .../examples/grids/update-datetime-column.md | 31 +++++++++++++++++ .../examples/grids/update-email-column.md | 31 +++++++++++++++++ .../examples/grids/update-enum-column.md | 32 ++++++++++++++++++ .../examples/grids/update-float-column.md | 33 +++++++++++++++++++ .../examples/grids/update-integer-column.md | 33 +++++++++++++++++++ .../examples/grids/update-ip-column.md | 31 +++++++++++++++++ .../grids/update-relationship-column.md | 30 +++++++++++++++++ .../server-go/examples/grids/update-row.md | 30 +++++++++++++++++ .../server-go/examples/grids/update-rows.md | 29 ++++++++++++++++ .../examples/grids/update-string-column.md | 32 ++++++++++++++++++ .../server-go/examples/grids/update-table.md | 31 +++++++++++++++++ .../examples/grids/update-url-column.md | 31 +++++++++++++++++ .../server-go/examples/grids/upsert-row.md | 30 +++++++++++++++++ .../server-go/examples/grids/upsert-rows.md | 28 ++++++++++++++++ .../examples/databases/create-collection.md | 5 +-- .../examples/databases/create-index.md | 5 +-- .../examples/databases/update-collection.md | 5 +-- .../examples/databases/upsert-document.md | 4 ++- .../examples/databases/upsert-documents.md | 3 +- .../examples/functions/create-deployment.md | 2 +- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 20 +++++++++++ .../examples/grids/create-database.md | 13 ++++++++ .../examples/grids/create-datetime-column.md | 21 ++++++++++++ .../examples/grids/create-email-column.md | 21 ++++++++++++ .../examples/grids/create-enum-column.md | 23 +++++++++++++ .../examples/grids/create-float-column.md | 24 ++++++++++++++ .../examples/grids/create-index.md | 22 +++++++++++++ .../examples/grids/create-integer-column.md | 24 ++++++++++++++ .../examples/grids/create-ip-column.md | 21 ++++++++++++ .../grids/create-relationship-column.md | 27 +++++++++++++++ .../examples/grids/create-row.md | 18 ++++++++++ .../examples/grids/create-rows.md | 19 +++++++++++ .../examples/grids/create-string-column.md | 24 ++++++++++++++ .../examples/grids/create-table.md | 32 ++++++++++++++++++ .../examples/grids/create-url-column.md | 21 ++++++++++++ .../examples/grids/decrement-row-column.md | 19 +++++++++++ .../examples/grids/delete-column.md | 9 +++++ .../examples/grids/delete-database.md | 7 ++++ .../examples/grids/delete-index.md | 9 +++++ .../examples/grids/delete-row.md | 9 +++++ .../examples/grids/delete-rows.md | 19 +++++++++++ .../examples/grids/delete-table.md | 8 +++++ .../examples/grids/get-column.md | 0 .../examples/grids/get-database.md | 0 .../examples/grids/get-index.md | 0 .../server-graphql/examples/grids/get-row.md | 0 .../examples/grids/get-table.md | 0 .../examples/grids/increment-row-column.md | 19 +++++++++++ .../examples/grids/list-columns.md | 0 .../examples/grids/list-databases.md | 0 .../examples/grids/list-indexes.md | 0 .../examples/grids/list-rows.md | 0 .../examples/grids/list-tables.md | 0 .../examples/grids/update-boolean-column.md | 20 +++++++++++ .../examples/grids/update-database.md | 13 ++++++++ .../examples/grids/update-datetime-column.md | 21 ++++++++++++ .../examples/grids/update-email-column.md | 21 ++++++++++++ .../examples/grids/update-enum-column.md | 23 +++++++++++++ .../examples/grids/update-float-column.md | 24 ++++++++++++++ .../examples/grids/update-integer-column.md | 24 ++++++++++++++ .../examples/grids/update-ip-column.md | 21 ++++++++++++ .../grids/update-relationship-column.md | 24 ++++++++++++++ .../examples/grids/update-row.md | 18 ++++++++++ .../examples/grids/update-rows.md | 20 +++++++++++ .../examples/grids/update-string-column.md | 23 +++++++++++++ .../examples/grids/update-table.md | 32 ++++++++++++++++++ .../examples/grids/update-url-column.md | 21 ++++++++++++ .../examples/grids/upsert-row.md | 18 ++++++++++ .../examples/grids/upsert-rows.md | 19 +++++++++++ .../examples/sites/create-deployment.md | 2 +- .../examples/storage/create-file.md | 2 +- .../java/databases/create-document.md | 5 ++- .../java/databases/create-documents.md | 2 +- .../java/databases/upsert-document.md | 7 ++-- .../java/databases/upsert-documents.md | 3 +- .../java/functions/create-execution.md | 2 +- .../java/grids/create-boolean-column.md | 28 ++++++++++++++++ .../java/grids/create-database.md | 25 ++++++++++++++ .../java/grids/create-datetime-column.md | 28 ++++++++++++++++ .../java/grids/create-email-column.md | 28 ++++++++++++++++ .../java/grids/create-enum-column.md | 29 ++++++++++++++++ .../java/grids/create-float-column.md | 30 +++++++++++++++++ .../server-kotlin/java/grids/create-index.md | 30 +++++++++++++++++ .../java/grids/create-integer-column.md | 30 +++++++++++++++++ .../java/grids/create-ip-column.md | 28 ++++++++++++++++ .../java/grids/create-relationship-column.md | 31 +++++++++++++++++ .../server-kotlin/java/grids/create-row.md | 27 +++++++++++++++ .../server-kotlin/java/grids/create-rows.md | 25 ++++++++++++++ .../java/grids/create-string-column.md | 30 +++++++++++++++++ .../server-kotlin/java/grids/create-table.md | 28 ++++++++++++++++ .../java/grids/create-url-column.md | 28 ++++++++++++++++ .../java/grids/decrement-row-column.md | 28 ++++++++++++++++ .../server-kotlin/java/grids/delete-column.md | 25 ++++++++++++++ .../java/grids/delete-database.md | 23 +++++++++++++ .../server-kotlin/java/grids/delete-index.md | 25 ++++++++++++++ .../server-kotlin/java/grids/delete-row.md | 25 ++++++++++++++ .../server-kotlin/java/grids/delete-rows.md | 25 ++++++++++++++ .../server-kotlin/java/grids/delete-table.md | 24 ++++++++++++++ .../server-kotlin/java/grids/get-column.md | 25 ++++++++++++++ .../server-kotlin/java/grids/get-database.md | 23 +++++++++++++ .../server-kotlin/java/grids/get-index.md | 25 ++++++++++++++ .../1.8.x/server-kotlin/java/grids/get-row.md | 26 +++++++++++++++ .../server-kotlin/java/grids/get-table.md | 24 ++++++++++++++ .../java/grids/increment-row-column.md | 28 ++++++++++++++++ .../server-kotlin/java/grids/list-columns.md | 25 ++++++++++++++ .../java/grids/list-databases.md | 24 ++++++++++++++ .../server-kotlin/java/grids/list-indexes.md | 25 ++++++++++++++ .../server-kotlin/java/grids/list-rows.md | 25 ++++++++++++++ .../server-kotlin/java/grids/list-tables.md | 25 ++++++++++++++ .../java/grids/update-boolean-column.md | 28 ++++++++++++++++ .../java/grids/update-database.md | 25 ++++++++++++++ .../java/grids/update-datetime-column.md | 28 ++++++++++++++++ .../java/grids/update-email-column.md | 28 ++++++++++++++++ .../java/grids/update-enum-column.md | 29 ++++++++++++++++ .../java/grids/update-float-column.md | 30 +++++++++++++++++ .../java/grids/update-integer-column.md | 30 +++++++++++++++++ .../java/grids/update-ip-column.md | 28 ++++++++++++++++ .../java/grids/update-relationship-column.md | 27 +++++++++++++++ .../server-kotlin/java/grids/update-row.md | 27 +++++++++++++++ .../server-kotlin/java/grids/update-rows.md | 26 +++++++++++++++ .../java/grids/update-string-column.md | 29 ++++++++++++++++ .../server-kotlin/java/grids/update-table.md | 28 ++++++++++++++++ .../java/grids/update-url-column.md | 28 ++++++++++++++++ .../server-kotlin/java/grids/upsert-row.md | 27 +++++++++++++++ .../server-kotlin/java/grids/upsert-rows.md | 25 ++++++++++++++ .../kotlin/databases/create-document.md | 3 +- .../kotlin/databases/create-documents.md | 2 +- .../kotlin/databases/upsert-document.md | 7 ++-- .../kotlin/databases/upsert-documents.md | 5 +-- .../kotlin/functions/create-execution.md | 2 +- .../kotlin/grids/create-boolean-column.md | 19 +++++++++++ .../kotlin/grids/create-database.md | 16 +++++++++ .../kotlin/grids/create-datetime-column.md | 19 +++++++++++ .../kotlin/grids/create-email-column.md | 19 +++++++++++ .../kotlin/grids/create-enum-column.md | 20 +++++++++++ .../kotlin/grids/create-float-column.md | 21 ++++++++++++ .../kotlin/grids/create-index.md | 21 ++++++++++++ .../kotlin/grids/create-integer-column.md | 21 ++++++++++++ .../kotlin/grids/create-ip-column.md | 19 +++++++++++ .../grids/create-relationship-column.md | 22 +++++++++++++ .../server-kotlin/kotlin/grids/create-row.md | 18 ++++++++++ .../server-kotlin/kotlin/grids/create-rows.md | 16 +++++++++ .../kotlin/grids/create-string-column.md | 21 ++++++++++++ .../kotlin/grids/create-table.md | 19 +++++++++++ .../kotlin/grids/create-url-column.md | 19 +++++++++++ .../kotlin/grids/decrement-row-column.md | 19 +++++++++++ .../kotlin/grids/delete-column.md | 16 +++++++++ .../kotlin/grids/delete-database.md | 14 ++++++++ .../kotlin/grids/delete-index.md | 16 +++++++++ .../server-kotlin/kotlin/grids/delete-row.md | 16 +++++++++ .../server-kotlin/kotlin/grids/delete-rows.md | 16 +++++++++ .../kotlin/grids/delete-table.md | 15 +++++++++ .../server-kotlin/kotlin/grids/get-column.md | 16 +++++++++ .../kotlin/grids/get-database.md | 14 ++++++++ .../server-kotlin/kotlin/grids/get-index.md | 16 +++++++++ .../server-kotlin/kotlin/grids/get-row.md | 17 ++++++++++ .../server-kotlin/kotlin/grids/get-table.md | 15 +++++++++ .../kotlin/grids/increment-row-column.md | 19 +++++++++++ .../kotlin/grids/list-columns.md | 16 +++++++++ .../kotlin/grids/list-databases.md | 15 +++++++++ .../kotlin/grids/list-indexes.md | 16 +++++++++ .../server-kotlin/kotlin/grids/list-rows.md | 16 +++++++++ .../server-kotlin/kotlin/grids/list-tables.md | 16 +++++++++ .../kotlin/grids/update-boolean-column.md | 19 +++++++++++ .../kotlin/grids/update-database.md | 16 +++++++++ .../kotlin/grids/update-datetime-column.md | 19 +++++++++++ .../kotlin/grids/update-email-column.md | 19 +++++++++++ .../kotlin/grids/update-enum-column.md | 20 +++++++++++ .../kotlin/grids/update-float-column.md | 21 ++++++++++++ .../kotlin/grids/update-integer-column.md | 21 ++++++++++++ .../kotlin/grids/update-ip-column.md | 19 +++++++++++ .../grids/update-relationship-column.md | 18 ++++++++++ .../server-kotlin/kotlin/grids/update-row.md | 18 ++++++++++ .../server-kotlin/kotlin/grids/update-rows.md | 17 ++++++++++ .../kotlin/grids/update-string-column.md | 20 +++++++++++ .../kotlin/grids/update-table.md | 19 +++++++++++ .../kotlin/grids/update-url-column.md | 19 +++++++++++ .../server-kotlin/kotlin/grids/upsert-row.md | 18 ++++++++++ .../server-kotlin/kotlin/grids/upsert-rows.md | 16 +++++++++ .../examples/databases/create-document.md | 5 ++- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 9 ++--- .../examples/databases/upsert-documents.md | 5 +-- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 17 ++++++++++ .../examples/grids/create-database.md | 14 ++++++++ .../examples/grids/create-datetime-column.md | 17 ++++++++++ .../examples/grids/create-email-column.md | 17 ++++++++++ .../examples/grids/create-enum-column.md | 18 ++++++++++ .../examples/grids/create-float-column.md | 19 +++++++++++ .../examples/grids/create-index.md | 18 ++++++++++ .../examples/grids/create-integer-column.md | 19 +++++++++++ .../examples/grids/create-ip-column.md | 17 ++++++++++ .../grids/create-relationship-column.md | 19 +++++++++++ .../examples/grids/create-row.md | 16 +++++++++ .../examples/grids/create-rows.md | 14 ++++++++ .../examples/grids/create-string-column.md | 19 +++++++++++ .../examples/grids/create-table.md | 17 ++++++++++ .../examples/grids/create-url-column.md | 17 ++++++++++ .../examples/grids/decrement-row-column.md | 17 ++++++++++ .../examples/grids/delete-column.md | 14 ++++++++ .../examples/grids/delete-database.md | 12 +++++++ .../examples/grids/delete-index.md | 14 ++++++++ .../examples/grids/delete-row.md | 14 ++++++++ .../examples/grids/delete-rows.md | 14 ++++++++ .../examples/grids/delete-table.md | 13 ++++++++ .../examples/grids/get-column.md | 14 ++++++++ .../examples/grids/get-database.md | 12 +++++++ .../server-nodejs/examples/grids/get-index.md | 14 ++++++++ .../server-nodejs/examples/grids/get-row.md | 15 +++++++++ .../server-nodejs/examples/grids/get-table.md | 13 ++++++++ .../examples/grids/increment-row-column.md | 17 ++++++++++ .../examples/grids/list-columns.md | 14 ++++++++ .../examples/grids/list-databases.md | 13 ++++++++ .../examples/grids/list-indexes.md | 14 ++++++++ .../server-nodejs/examples/grids/list-rows.md | 14 ++++++++ .../examples/grids/list-tables.md | 14 ++++++++ .../examples/grids/update-boolean-column.md | 17 ++++++++++ .../examples/grids/update-database.md | 14 ++++++++ .../examples/grids/update-datetime-column.md | 17 ++++++++++ .../examples/grids/update-email-column.md | 17 ++++++++++ .../examples/grids/update-enum-column.md | 18 ++++++++++ .../examples/grids/update-float-column.md | 19 +++++++++++ .../examples/grids/update-integer-column.md | 19 +++++++++++ .../examples/grids/update-ip-column.md | 17 ++++++++++ .../grids/update-relationship-column.md | 16 +++++++++ .../examples/grids/update-row.md | 16 +++++++++ .../examples/grids/update-rows.md | 15 +++++++++ .../examples/grids/update-string-column.md | 18 ++++++++++ .../examples/grids/update-table.md | 17 ++++++++++ .../examples/grids/update-url-column.md | 17 ++++++++++ .../examples/grids/upsert-row.md | 16 +++++++++ .../examples/grids/upsert-rows.md | 14 ++++++++ .../examples/databases/create-document.md | 5 ++- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 9 ++--- .../examples/databases/upsert-documents.md | 5 +-- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 20 +++++++++++ .../examples/grids/create-database.md | 17 ++++++++++ .../examples/grids/create-datetime-column.md | 20 +++++++++++ .../examples/grids/create-email-column.md | 20 +++++++++++ .../examples/grids/create-enum-column.md | 21 ++++++++++++ .../examples/grids/create-float-column.md | 22 +++++++++++++ .../server-php/examples/grids/create-index.md | 22 +++++++++++++ .../examples/grids/create-integer-column.md | 22 +++++++++++++ .../examples/grids/create-ip-column.md | 20 +++++++++++ .../grids/create-relationship-column.md | 23 +++++++++++++ .../server-php/examples/grids/create-row.md | 19 +++++++++++ .../server-php/examples/grids/create-rows.md | 17 ++++++++++ .../examples/grids/create-string-column.md | 22 +++++++++++++ .../server-php/examples/grids/create-table.md | 20 +++++++++++ .../examples/grids/create-url-column.md | 20 +++++++++++ .../examples/grids/decrement-row-column.md | 20 +++++++++++ .../examples/grids/delete-column.md | 17 ++++++++++ .../examples/grids/delete-database.md | 15 +++++++++ .../server-php/examples/grids/delete-index.md | 17 ++++++++++ .../server-php/examples/grids/delete-row.md | 17 ++++++++++ .../server-php/examples/grids/delete-rows.md | 17 ++++++++++ .../server-php/examples/grids/delete-table.md | 16 +++++++++ .../server-php/examples/grids/get-column.md | 17 ++++++++++ .../server-php/examples/grids/get-database.md | 15 +++++++++ .../server-php/examples/grids/get-index.md | 17 ++++++++++ .../server-php/examples/grids/get-row.md | 18 ++++++++++ .../server-php/examples/grids/get-table.md | 16 +++++++++ .../examples/grids/increment-row-column.md | 20 +++++++++++ .../server-php/examples/grids/list-columns.md | 17 ++++++++++ .../examples/grids/list-databases.md | 16 +++++++++ .../server-php/examples/grids/list-indexes.md | 17 ++++++++++ .../server-php/examples/grids/list-rows.md | 17 ++++++++++ .../server-php/examples/grids/list-tables.md | 17 ++++++++++ .../examples/grids/update-boolean-column.md | 20 +++++++++++ .../examples/grids/update-database.md | 17 ++++++++++ .../examples/grids/update-datetime-column.md | 20 +++++++++++ .../examples/grids/update-email-column.md | 20 +++++++++++ .../examples/grids/update-enum-column.md | 21 ++++++++++++ .../examples/grids/update-float-column.md | 22 +++++++++++++ .../examples/grids/update-integer-column.md | 22 +++++++++++++ .../examples/grids/update-ip-column.md | 20 +++++++++++ .../grids/update-relationship-column.md | 19 +++++++++++ .../server-php/examples/grids/update-row.md | 19 +++++++++++ .../server-php/examples/grids/update-rows.md | 18 ++++++++++ .../examples/grids/update-string-column.md | 21 ++++++++++++ .../server-php/examples/grids/update-table.md | 20 +++++++++++ .../examples/grids/update-url-column.md | 20 +++++++++++ .../server-php/examples/grids/upsert-row.md | 19 +++++++++++ .../server-php/examples/grids/upsert-rows.md | 17 ++++++++++ .../examples/databases/create-document.md | 3 +- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 7 ++-- .../examples/databases/upsert-documents.md | 5 +-- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 18 ++++++++++ .../examples/grids/create-database.md | 15 +++++++++ .../examples/grids/create-datetime-column.md | 18 ++++++++++ .../examples/grids/create-email-column.md | 18 ++++++++++ .../examples/grids/create-enum-column.md | 19 +++++++++++ .../examples/grids/create-float-column.md | 20 +++++++++++ .../examples/grids/create-index.md | 20 +++++++++++ .../examples/grids/create-integer-column.md | 20 +++++++++++ .../examples/grids/create-ip-column.md | 18 ++++++++++ .../grids/create-relationship-column.md | 21 ++++++++++++ .../examples/grids/create-row.md | 17 ++++++++++ .../examples/grids/create-rows.md | 15 +++++++++ .../examples/grids/create-string-column.md | 20 +++++++++++ .../examples/grids/create-table.md | 18 ++++++++++ .../examples/grids/create-url-column.md | 18 ++++++++++ .../examples/grids/decrement-row-column.md | 18 ++++++++++ .../examples/grids/delete-column.md | 15 +++++++++ .../examples/grids/delete-database.md | 13 ++++++++ .../examples/grids/delete-index.md | 15 +++++++++ .../examples/grids/delete-row.md | 15 +++++++++ .../examples/grids/delete-rows.md | 15 +++++++++ .../examples/grids/delete-table.md | 14 ++++++++ .../examples/grids/get-column.md | 15 +++++++++ .../examples/grids/get-database.md | 13 ++++++++ .../server-python/examples/grids/get-index.md | 15 +++++++++ .../server-python/examples/grids/get-row.md | 16 +++++++++ .../server-python/examples/grids/get-table.md | 14 ++++++++ .../examples/grids/increment-row-column.md | 18 ++++++++++ .../examples/grids/list-columns.md | 15 +++++++++ .../examples/grids/list-databases.md | 14 ++++++++ .../examples/grids/list-indexes.md | 15 +++++++++ .../server-python/examples/grids/list-rows.md | 15 +++++++++ .../examples/grids/list-tables.md | 15 +++++++++ .../examples/grids/update-boolean-column.md | 18 ++++++++++ .../examples/grids/update-database.md | 15 +++++++++ .../examples/grids/update-datetime-column.md | 18 ++++++++++ .../examples/grids/update-email-column.md | 18 ++++++++++ .../examples/grids/update-enum-column.md | 19 +++++++++++ .../examples/grids/update-float-column.md | 20 +++++++++++ .../examples/grids/update-integer-column.md | 20 +++++++++++ .../examples/grids/update-ip-column.md | 18 ++++++++++ .../grids/update-relationship-column.md | 17 ++++++++++ .../examples/grids/update-row.md | 17 ++++++++++ .../examples/grids/update-rows.md | 16 +++++++++ .../examples/grids/update-string-column.md | 19 +++++++++++ .../examples/grids/update-table.md | 18 ++++++++++ .../examples/grids/update-url-column.md | 18 ++++++++++ .../examples/grids/upsert-row.md | 17 ++++++++++ .../examples/grids/upsert-rows.md | 15 +++++++++ .../account/create-anonymous-session.md | 2 +- .../account/create-email-password-session.md | 2 +- .../examples/account/create-email-token.md | 2 +- .../examples/account/create-j-w-t.md | 2 +- .../account/create-magic-u-r-l-token.md | 2 +- .../account/create-mfa-authenticator.md | 2 +- .../examples/account/create-mfa-challenge.md | 2 +- .../account/create-mfa-recovery-codes.md | 2 +- .../examples/account/create-o-auth2token.md | 2 +- .../examples/account/create-phone-token.md | 2 +- .../account/create-phone-verification.md | 2 +- .../examples/account/create-recovery.md | 2 +- .../examples/account/create-session.md | 2 +- .../examples/account/create-verification.md | 2 +- .../server-rest/examples/account/create.md | 2 +- .../examples/account/delete-identity.md | 2 +- .../account/delete-mfa-authenticator.md | 2 +- .../examples/account/delete-session.md | 2 +- .../examples/account/delete-sessions.md | 2 +- .../account/get-mfa-recovery-codes.md | 2 +- .../server-rest/examples/account/get-prefs.md | 2 +- .../examples/account/get-session.md | 2 +- .../1.8.x/server-rest/examples/account/get.md | 2 +- .../examples/account/list-identities.md | 2 +- .../server-rest/examples/account/list-logs.md | 2 +- .../examples/account/list-mfa-factors.md | 2 +- .../examples/account/list-sessions.md | 2 +- .../examples/account/update-email.md | 2 +- .../examples/account/update-m-f-a.md | 2 +- .../account/update-magic-u-r-l-session.md | 2 +- .../account/update-mfa-authenticator.md | 2 +- .../examples/account/update-mfa-challenge.md | 2 +- .../account/update-mfa-recovery-codes.md | 2 +- .../examples/account/update-name.md | 2 +- .../examples/account/update-password.md | 2 +- .../examples/account/update-phone-session.md | 2 +- .../account/update-phone-verification.md | 2 +- .../examples/account/update-phone.md | 2 +- .../examples/account/update-prefs.md | 2 +- .../examples/account/update-recovery.md | 2 +- .../examples/account/update-session.md | 2 +- .../examples/account/update-status.md | 2 +- .../examples/account/update-verification.md | 2 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../examples/avatars/get-favicon.md | 2 +- .../server-rest/examples/avatars/get-flag.md | 2 +- .../server-rest/examples/avatars/get-image.md | 2 +- .../examples/avatars/get-initials.md | 2 +- .../server-rest/examples/avatars/get-q-r.md | 2 +- .../databases/create-boolean-attribute.md | 2 +- .../examples/databases/create-collection.md | 2 +- .../databases/create-datetime-attribute.md | 2 +- .../examples/databases/create-document.md | 2 +- .../examples/databases/create-documents.md | 2 +- .../databases/create-email-attribute.md | 2 +- .../databases/create-enum-attribute.md | 2 +- .../databases/create-float-attribute.md | 2 +- .../examples/databases/create-index.md | 2 +- .../databases/create-integer-attribute.md | 2 +- .../examples/databases/create-ip-attribute.md | 2 +- .../create-relationship-attribute.md | 2 +- .../databases/create-string-attribute.md | 2 +- .../databases/create-url-attribute.md | 2 +- .../server-rest/examples/databases/create.md | 2 +- .../databases/decrement-document-attribute.md | 2 +- .../examples/databases/delete-attribute.md | 2 +- .../examples/databases/delete-collection.md | 2 +- .../examples/databases/delete-document.md | 2 +- .../examples/databases/delete-documents.md | 2 +- .../examples/databases/delete-index.md | 2 +- .../server-rest/examples/databases/delete.md | 2 +- .../examples/databases/get-attribute.md | 2 +- .../examples/databases/get-collection.md | 2 +- .../examples/databases/get-document.md | 2 +- .../examples/databases/get-index.md | 2 +- .../server-rest/examples/databases/get.md | 2 +- .../databases/increment-document-attribute.md | 2 +- .../examples/databases/list-attributes.md | 2 +- .../examples/databases/list-collections.md | 2 +- .../examples/databases/list-documents.md | 2 +- .../examples/databases/list-indexes.md | 2 +- .../server-rest/examples/databases/list.md | 2 +- .../databases/update-boolean-attribute.md | 2 +- .../examples/databases/update-collection.md | 2 +- .../databases/update-datetime-attribute.md | 2 +- .../examples/databases/update-document.md | 2 +- .../examples/databases/update-documents.md | 2 +- .../databases/update-email-attribute.md | 2 +- .../databases/update-enum-attribute.md | 2 +- .../databases/update-float-attribute.md | 2 +- .../databases/update-integer-attribute.md | 2 +- .../examples/databases/update-ip-attribute.md | 2 +- .../update-relationship-attribute.md | 2 +- .../databases/update-string-attribute.md | 2 +- .../databases/update-url-attribute.md | 2 +- .../server-rest/examples/databases/update.md | 2 +- .../examples/databases/upsert-document.md | 6 +++- .../examples/databases/upsert-documents.md | 5 ++- .../examples/functions/create-deployment.md | 2 +- .../functions/create-duplicate-deployment.md | 2 +- .../examples/functions/create-execution.md | 4 +-- .../functions/create-template-deployment.md | 2 +- .../examples/functions/create-variable.md | 2 +- .../functions/create-vcs-deployment.md | 2 +- .../server-rest/examples/functions/create.md | 2 +- .../examples/functions/delete-deployment.md | 2 +- .../examples/functions/delete-execution.md | 2 +- .../examples/functions/delete-variable.md | 2 +- .../server-rest/examples/functions/delete.md | 2 +- .../functions/get-deployment-download.md | 2 +- .../examples/functions/get-deployment.md | 2 +- .../examples/functions/get-execution.md | 2 +- .../examples/functions/get-variable.md | 2 +- .../server-rest/examples/functions/get.md | 2 +- .../examples/functions/list-deployments.md | 2 +- .../examples/functions/list-executions.md | 2 +- .../examples/functions/list-runtimes.md | 2 +- .../examples/functions/list-specifications.md | 2 +- .../examples/functions/list-variables.md | 2 +- .../server-rest/examples/functions/list.md | 2 +- .../functions/update-deployment-status.md | 2 +- .../functions/update-function-deployment.md | 2 +- .../examples/functions/update-variable.md | 2 +- .../server-rest/examples/functions/update.md | 2 +- .../server-rest/examples/graphql/mutation.md | 2 +- .../server-rest/examples/graphql/query.md | 2 +- .../examples/grids/create-boolean-column.md | 13 ++++++++ .../examples/grids/create-database.md | 12 +++++++ .../examples/grids/create-datetime-column.md | 13 ++++++++ .../examples/grids/create-email-column.md | 13 ++++++++ .../examples/grids/create-enum-column.md | 14 ++++++++ .../examples/grids/create-float-column.md | 15 +++++++++ .../examples/grids/create-index.md | 14 ++++++++ .../examples/grids/create-integer-column.md | 15 +++++++++ .../examples/grids/create-ip-column.md | 13 ++++++++ .../grids/create-relationship-column.md | 15 +++++++++ .../server-rest/examples/grids/create-row.md | 14 ++++++++ .../server-rest/examples/grids/create-rows.md | 12 +++++++ .../examples/grids/create-string-column.md | 15 +++++++++ .../examples/grids/create-table.md | 14 ++++++++ .../examples/grids/create-url-column.md | 13 ++++++++ .../examples/grids/decrement-row-column.md | 11 +++++++ .../examples/grids/delete-column.md | 7 ++++ .../examples/grids/delete-database.md | 7 ++++ .../examples/grids/delete-index.md | 7 ++++ .../server-rest/examples/grids/delete-row.md | 9 +++++ .../server-rest/examples/grids/delete-rows.md | 10 ++++++ .../examples/grids/delete-table.md | 7 ++++ .../server-rest/examples/grids/get-column.md | 5 +++ .../examples/grids/get-database.md | 5 +++ .../server-rest/examples/grids/get-index.md | 5 +++ .../server-rest/examples/grids/get-row.md | 7 ++++ .../server-rest/examples/grids/get-table.md | 5 +++ .../examples/grids/increment-row-column.md | 11 +++++++ .../examples/grids/list-columns.md | 5 +++ .../examples/grids/list-databases.md | 5 +++ .../examples/grids/list-indexes.md | 5 +++ .../server-rest/examples/grids/list-rows.md | 7 ++++ .../server-rest/examples/grids/list-tables.md | 5 +++ .../examples/grids/update-boolean-column.md | 12 +++++++ .../examples/grids/update-database.md | 11 +++++++ .../examples/grids/update-datetime-column.md | 12 +++++++ .../examples/grids/update-email-column.md | 12 +++++++ .../examples/grids/update-enum-column.md | 13 ++++++++ .../examples/grids/update-float-column.md | 14 ++++++++ .../examples/grids/update-integer-column.md | 14 ++++++++ .../examples/grids/update-ip-column.md | 12 +++++++ .../grids/update-relationship-column.md | 11 +++++++ .../server-rest/examples/grids/update-row.md | 13 ++++++++ .../server-rest/examples/grids/update-rows.md | 11 +++++++ .../examples/grids/update-string-column.md | 13 ++++++++ .../examples/grids/update-table.md | 13 ++++++++ .../examples/grids/update-url-column.md | 12 +++++++ .../server-rest/examples/grids/upsert-row.md | 13 ++++++++ .../server-rest/examples/grids/upsert-rows.md | 10 ++++++ .../examples/health/get-antivirus.md | 2 +- .../server-rest/examples/health/get-cache.md | 2 +- .../examples/health/get-certificate.md | 2 +- .../server-rest/examples/health/get-d-b.md | 2 +- .../examples/health/get-failed-jobs.md | 2 +- .../examples/health/get-pub-sub.md | 2 +- .../examples/health/get-queue-builds.md | 2 +- .../examples/health/get-queue-certificates.md | 2 +- .../examples/health/get-queue-databases.md | 2 +- .../examples/health/get-queue-deletes.md | 2 +- .../examples/health/get-queue-functions.md | 2 +- .../examples/health/get-queue-logs.md | 2 +- .../examples/health/get-queue-mails.md | 2 +- .../examples/health/get-queue-messaging.md | 2 +- .../examples/health/get-queue-migrations.md | 2 +- .../health/get-queue-stats-resources.md | 2 +- .../examples/health/get-queue-usage.md | 2 +- .../examples/health/get-queue-webhooks.md | 2 +- .../examples/health/get-storage-local.md | 2 +- .../examples/health/get-storage.md | 2 +- .../server-rest/examples/health/get-time.md | 2 +- .../1.8.x/server-rest/examples/health/get.md | 2 +- .../1.8.x/server-rest/examples/locale/get.md | 2 +- .../server-rest/examples/locale/list-codes.md | 2 +- .../examples/locale/list-continents.md | 2 +- .../examples/locale/list-countries-e-u.md | 2 +- .../examples/locale/list-countries-phones.md | 2 +- .../examples/locale/list-countries.md | 2 +- .../examples/locale/list-currencies.md | 2 +- .../examples/locale/list-languages.md | 2 +- .../messaging/create-apns-provider.md | 2 +- .../examples/messaging/create-email.md | 2 +- .../examples/messaging/create-fcm-provider.md | 2 +- .../messaging/create-mailgun-provider.md | 2 +- .../messaging/create-msg91provider.md | 2 +- .../examples/messaging/create-push.md | 2 +- .../messaging/create-sendgrid-provider.md | 2 +- .../examples/messaging/create-sms.md | 2 +- .../messaging/create-smtp-provider.md | 2 +- .../examples/messaging/create-subscriber.md | 2 +- .../messaging/create-telesign-provider.md | 2 +- .../messaging/create-textmagic-provider.md | 2 +- .../examples/messaging/create-topic.md | 2 +- .../messaging/create-twilio-provider.md | 2 +- .../messaging/create-vonage-provider.md | 2 +- .../examples/messaging/delete-provider.md | 2 +- .../examples/messaging/delete-subscriber.md | 2 +- .../examples/messaging/delete-topic.md | 2 +- .../server-rest/examples/messaging/delete.md | 2 +- .../examples/messaging/get-message.md | 2 +- .../examples/messaging/get-provider.md | 2 +- .../examples/messaging/get-subscriber.md | 2 +- .../examples/messaging/get-topic.md | 2 +- .../examples/messaging/list-message-logs.md | 2 +- .../examples/messaging/list-messages.md | 2 +- .../examples/messaging/list-provider-logs.md | 2 +- .../examples/messaging/list-providers.md | 2 +- .../messaging/list-subscriber-logs.md | 2 +- .../examples/messaging/list-subscribers.md | 2 +- .../examples/messaging/list-targets.md | 2 +- .../examples/messaging/list-topic-logs.md | 2 +- .../examples/messaging/list-topics.md | 2 +- .../messaging/update-apns-provider.md | 2 +- .../examples/messaging/update-email.md | 2 +- .../examples/messaging/update-fcm-provider.md | 2 +- .../messaging/update-mailgun-provider.md | 2 +- .../messaging/update-msg91provider.md | 2 +- .../examples/messaging/update-push.md | 2 +- .../messaging/update-sendgrid-provider.md | 2 +- .../examples/messaging/update-sms.md | 2 +- .../messaging/update-smtp-provider.md | 2 +- .../messaging/update-telesign-provider.md | 2 +- .../messaging/update-textmagic-provider.md | 2 +- .../examples/messaging/update-topic.md | 2 +- .../messaging/update-twilio-provider.md | 2 +- .../messaging/update-vonage-provider.md | 2 +- .../examples/sites/create-deployment.md | 2 +- .../sites/create-duplicate-deployment.md | 2 +- .../sites/create-template-deployment.md | 2 +- .../examples/sites/create-variable.md | 2 +- .../examples/sites/create-vcs-deployment.md | 2 +- .../server-rest/examples/sites/create.md | 2 +- .../examples/sites/delete-deployment.md | 2 +- .../server-rest/examples/sites/delete-log.md | 2 +- .../examples/sites/delete-variable.md | 2 +- .../server-rest/examples/sites/delete.md | 2 +- .../examples/sites/get-deployment-download.md | 2 +- .../examples/sites/get-deployment.md | 2 +- .../server-rest/examples/sites/get-log.md | 2 +- .../examples/sites/get-variable.md | 2 +- .../1.8.x/server-rest/examples/sites/get.md | 2 +- .../examples/sites/list-deployments.md | 2 +- .../examples/sites/list-frameworks.md | 2 +- .../server-rest/examples/sites/list-logs.md | 2 +- .../examples/sites/list-specifications.md | 2 +- .../examples/sites/list-variables.md | 2 +- .../1.8.x/server-rest/examples/sites/list.md | 2 +- .../sites/update-deployment-status.md | 2 +- .../examples/sites/update-site-deployment.md | 2 +- .../examples/sites/update-variable.md | 2 +- .../server-rest/examples/sites/update.md | 2 +- .../examples/storage/create-bucket.md | 2 +- .../examples/storage/create-file.md | 2 +- .../examples/storage/delete-bucket.md | 2 +- .../examples/storage/delete-file.md | 2 +- .../examples/storage/get-bucket.md | 2 +- .../examples/storage/get-file-download.md | 2 +- .../examples/storage/get-file-preview.md | 2 +- .../examples/storage/get-file-view.md | 2 +- .../server-rest/examples/storage/get-file.md | 2 +- .../examples/storage/list-buckets.md | 2 +- .../examples/storage/list-files.md | 2 +- .../examples/storage/update-bucket.md | 2 +- .../examples/storage/update-file.md | 2 +- .../examples/teams/create-membership.md | 2 +- .../server-rest/examples/teams/create.md | 2 +- .../examples/teams/delete-membership.md | 2 +- .../server-rest/examples/teams/delete.md | 2 +- .../examples/teams/get-membership.md | 2 +- .../server-rest/examples/teams/get-prefs.md | 2 +- .../1.8.x/server-rest/examples/teams/get.md | 2 +- .../examples/teams/list-memberships.md | 2 +- .../1.8.x/server-rest/examples/teams/list.md | 2 +- .../teams/update-membership-status.md | 2 +- .../examples/teams/update-membership.md | 2 +- .../server-rest/examples/teams/update-name.md | 2 +- .../examples/teams/update-prefs.md | 2 +- .../examples/tokens/create-file-token.md | 2 +- .../server-rest/examples/tokens/delete.md | 2 +- .../1.8.x/server-rest/examples/tokens/get.md | 2 +- .../1.8.x/server-rest/examples/tokens/list.md | 2 +- .../server-rest/examples/tokens/update.md | 2 +- .../examples/users/create-argon2user.md | 2 +- .../examples/users/create-bcrypt-user.md | 2 +- .../examples/users/create-j-w-t.md | 2 +- .../examples/users/create-m-d5user.md | 2 +- .../users/create-mfa-recovery-codes.md | 2 +- .../examples/users/create-p-h-pass-user.md | 2 +- .../examples/users/create-s-h-a-user.md | 2 +- .../users/create-scrypt-modified-user.md | 2 +- .../examples/users/create-scrypt-user.md | 2 +- .../examples/users/create-session.md | 2 +- .../examples/users/create-target.md | 2 +- .../examples/users/create-token.md | 2 +- .../server-rest/examples/users/create.md | 2 +- .../examples/users/delete-identity.md | 2 +- .../users/delete-mfa-authenticator.md | 2 +- .../examples/users/delete-session.md | 2 +- .../examples/users/delete-sessions.md | 2 +- .../examples/users/delete-target.md | 2 +- .../server-rest/examples/users/delete.md | 2 +- .../examples/users/get-mfa-recovery-codes.md | 2 +- .../server-rest/examples/users/get-prefs.md | 2 +- .../server-rest/examples/users/get-target.md | 2 +- .../1.8.x/server-rest/examples/users/get.md | 2 +- .../examples/users/list-identities.md | 2 +- .../server-rest/examples/users/list-logs.md | 2 +- .../examples/users/list-memberships.md | 2 +- .../examples/users/list-mfa-factors.md | 2 +- .../examples/users/list-sessions.md | 2 +- .../examples/users/list-targets.md | 2 +- .../1.8.x/server-rest/examples/users/list.md | 2 +- .../users/update-email-verification.md | 2 +- .../examples/users/update-email.md | 2 +- .../examples/users/update-labels.md | 2 +- .../users/update-mfa-recovery-codes.md | 2 +- .../server-rest/examples/users/update-mfa.md | 2 +- .../server-rest/examples/users/update-name.md | 2 +- .../examples/users/update-password.md | 2 +- .../users/update-phone-verification.md | 2 +- .../examples/users/update-phone.md | 2 +- .../examples/users/update-prefs.md | 2 +- .../examples/users/update-status.md | 2 +- .../examples/users/update-target.md | 2 +- .../examples/databases/create-document.md | 3 +- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 7 ++-- .../examples/databases/upsert-documents.md | 5 +-- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 19 +++++++++++ .../examples/grids/create-database.md | 16 +++++++++ .../examples/grids/create-datetime-column.md | 19 +++++++++++ .../examples/grids/create-email-column.md | 19 +++++++++++ .../examples/grids/create-enum-column.md | 20 +++++++++++ .../examples/grids/create-float-column.md | 21 ++++++++++++ .../examples/grids/create-index.md | 21 ++++++++++++ .../examples/grids/create-integer-column.md | 21 ++++++++++++ .../examples/grids/create-ip-column.md | 19 +++++++++++ .../grids/create-relationship-column.md | 22 +++++++++++++ .../server-ruby/examples/grids/create-row.md | 18 ++++++++++ .../server-ruby/examples/grids/create-rows.md | 16 +++++++++ .../examples/grids/create-string-column.md | 21 ++++++++++++ .../examples/grids/create-table.md | 19 +++++++++++ .../examples/grids/create-url-column.md | 19 +++++++++++ .../examples/grids/decrement-row-column.md | 19 +++++++++++ .../examples/grids/delete-column.md | 16 +++++++++ .../examples/grids/delete-database.md | 14 ++++++++ .../examples/grids/delete-index.md | 16 +++++++++ .../server-ruby/examples/grids/delete-row.md | 16 +++++++++ .../server-ruby/examples/grids/delete-rows.md | 16 +++++++++ .../examples/grids/delete-table.md | 15 +++++++++ .../server-ruby/examples/grids/get-column.md | 16 +++++++++ .../examples/grids/get-database.md | 14 ++++++++ .../server-ruby/examples/grids/get-index.md | 16 +++++++++ .../server-ruby/examples/grids/get-row.md | 17 ++++++++++ .../server-ruby/examples/grids/get-table.md | 15 +++++++++ .../examples/grids/increment-row-column.md | 19 +++++++++++ .../examples/grids/list-columns.md | 16 +++++++++ .../examples/grids/list-databases.md | 15 +++++++++ .../examples/grids/list-indexes.md | 16 +++++++++ .../server-ruby/examples/grids/list-rows.md | 16 +++++++++ .../server-ruby/examples/grids/list-tables.md | 16 +++++++++ .../examples/grids/update-boolean-column.md | 19 +++++++++++ .../examples/grids/update-database.md | 16 +++++++++ .../examples/grids/update-datetime-column.md | 19 +++++++++++ .../examples/grids/update-email-column.md | 19 +++++++++++ .../examples/grids/update-enum-column.md | 20 +++++++++++ .../examples/grids/update-float-column.md | 21 ++++++++++++ .../examples/grids/update-integer-column.md | 21 ++++++++++++ .../examples/grids/update-ip-column.md | 19 +++++++++++ .../grids/update-relationship-column.md | 18 ++++++++++ .../server-ruby/examples/grids/update-row.md | 18 ++++++++++ .../server-ruby/examples/grids/update-rows.md | 17 ++++++++++ .../examples/grids/update-string-column.md | 20 +++++++++++ .../examples/grids/update-table.md | 19 +++++++++++ .../examples/grids/update-url-column.md | 19 +++++++++++ .../server-ruby/examples/grids/upsert-row.md | 18 ++++++++++ .../server-ruby/examples/grids/upsert-rows.md | 16 +++++++++ .../examples/databases/create-document.md | 3 +- .../examples/databases/create-documents.md | 2 +- .../examples/databases/upsert-document.md | 7 ++-- .../examples/databases/upsert-documents.md | 5 +-- .../examples/functions/create-execution.md | 2 +- .../examples/grids/create-boolean-column.md | 18 ++++++++++ .../examples/grids/create-database.md | 15 +++++++++ .../examples/grids/create-datetime-column.md | 18 ++++++++++ .../examples/grids/create-email-column.md | 18 ++++++++++ .../examples/grids/create-enum-column.md | 19 +++++++++++ .../examples/grids/create-float-column.md | 20 +++++++++++ .../examples/grids/create-index.md | 20 +++++++++++ .../examples/grids/create-integer-column.md | 20 +++++++++++ .../examples/grids/create-ip-column.md | 18 ++++++++++ .../grids/create-relationship-column.md | 21 ++++++++++++ .../server-swift/examples/grids/create-row.md | 17 ++++++++++ .../examples/grids/create-rows.md | 15 +++++++++ .../examples/grids/create-string-column.md | 20 +++++++++++ .../examples/grids/create-table.md | 18 ++++++++++ .../examples/grids/create-url-column.md | 18 ++++++++++ .../examples/grids/decrement-row-column.md | 18 ++++++++++ .../examples/grids/delete-column.md | 15 +++++++++ .../examples/grids/delete-database.md | 13 ++++++++ .../examples/grids/delete-index.md | 15 +++++++++ .../server-swift/examples/grids/delete-row.md | 15 +++++++++ .../examples/grids/delete-rows.md | 15 +++++++++ .../examples/grids/delete-table.md | 14 ++++++++ .../server-swift/examples/grids/get-column.md | 15 +++++++++ .../examples/grids/get-database.md | 13 ++++++++ .../server-swift/examples/grids/get-index.md | 15 +++++++++ .../server-swift/examples/grids/get-row.md | 16 +++++++++ .../server-swift/examples/grids/get-table.md | 14 ++++++++ .../examples/grids/increment-row-column.md | 18 ++++++++++ .../examples/grids/list-columns.md | 15 +++++++++ .../examples/grids/list-databases.md | 14 ++++++++ .../examples/grids/list-indexes.md | 15 +++++++++ .../server-swift/examples/grids/list-rows.md | 15 +++++++++ .../examples/grids/list-tables.md | 15 +++++++++ .../examples/grids/update-boolean-column.md | 18 ++++++++++ .../examples/grids/update-database.md | 15 +++++++++ .../examples/grids/update-datetime-column.md | 18 ++++++++++ .../examples/grids/update-email-column.md | 18 ++++++++++ .../examples/grids/update-enum-column.md | 19 +++++++++++ .../examples/grids/update-float-column.md | 20 +++++++++++ .../examples/grids/update-integer-column.md | 20 +++++++++++ .../examples/grids/update-ip-column.md | 18 ++++++++++ .../grids/update-relationship-column.md | 18 ++++++++++ .../server-swift/examples/grids/update-row.md | 17 ++++++++++ .../examples/grids/update-rows.md | 16 +++++++++ .../examples/grids/update-string-column.md | 19 +++++++++++ .../examples/grids/update-table.md | 18 ++++++++++ .../examples/grids/update-url-column.md | 18 ++++++++++ .../server-swift/examples/grids/upsert-row.md | 17 ++++++++++ .../examples/grids/upsert-rows.md | 15 +++++++++ .../references/grids/create-boolean-column.md | 1 + docs/references/grids/create-database.md | 1 + .../grids/create-datetime-column.md | 1 + docs/references/grids/create-email-column.md | 1 + docs/references/grids/create-enum-column.md | 1 + docs/references/grids/create-float-column.md | 1 + docs/references/grids/create-index.md | 2 ++ .../references/grids/create-integer-column.md | 1 + docs/references/grids/create-ip-column.md | 1 + .../grids/create-relationship-column.md | 1 + docs/references/grids/create-row.md | 1 + docs/references/grids/create-rows.md | 1 + docs/references/grids/create-string-column.md | 1 + docs/references/grids/create-table.md | 1 + docs/references/grids/create-url-column.md | 1 + docs/references/grids/decrement-row-column.md | 1 + docs/references/grids/delete-column.md | 1 + docs/references/grids/delete-database.md | 1 + docs/references/grids/delete-index.md | 1 + docs/references/grids/delete-row.md | 1 + docs/references/grids/delete-rows.md | 1 + docs/references/grids/delete-table.md | 1 + docs/references/grids/get-column.md | 1 + docs/references/grids/get-database-usage.md | 1 + docs/references/grids/get-database.md | 1 + docs/references/grids/get-index.md | 1 + docs/references/grids/get-logs.md | 1 + docs/references/grids/get-row-logs.md | 1 + docs/references/grids/get-row.md | 1 + docs/references/grids/get-table-logs.md | 1 + docs/references/grids/get-table-usage.md | 1 + docs/references/grids/get-table.md | 1 + docs/references/grids/increment-row-column.md | 1 + docs/references/grids/list-columns.md | 1 + docs/references/grids/list-database-usage.md | 1 + docs/references/grids/list-databases.md | 1 + docs/references/grids/list-indexes.md | 1 + docs/references/grids/list-rows.md | 1 + docs/references/grids/list-tables.md | 1 + .../references/grids/update-boolean-column.md | 1 + docs/references/grids/update-database.md | 1 + .../grids/update-datetime-column.md | 1 + docs/references/grids/update-email-column.md | 1 + docs/references/grids/update-enum-column.md | 1 + docs/references/grids/update-float-column.md | 1 + .../references/grids/update-integer-column.md | 1 + docs/references/grids/update-ip-column.md | 1 + .../grids/update-relationship-column.md | 1 + docs/references/grids/update-row.md | 1 + docs/references/grids/update-rows.md | 1 + docs/references/grids/update-string-column.md | 1 + docs/references/grids/update-table.md | 1 + docs/references/grids/update-url-column.md | 1 + docs/references/grids/upsert-row.md | 1 + docs/references/grids/upsert-rows.md | 1 + 1339 files changed, 14234 insertions(+), 579 deletions(-) create mode 100644 docs/examples/1.8.x/client-android/java/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-android/java/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-android/java/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-android/java/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-android/java/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-android/java/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-apple/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-react-native/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-rest/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/client-web/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/client-web/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-database-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-table-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-database-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-database-usage.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-row-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-table-logs.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/console-cli/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-database-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-table-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-database-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-database-usage.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-row-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-table-logs.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/console-web/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-deno/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-go/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-database.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-table.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-database.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/delete-table.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-database.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-index.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/get-table.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-columns.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-databases.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/list-tables.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-database.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-rows.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-table.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md create mode 100644 docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md create mode 100644 docs/references/grids/create-boolean-column.md create mode 100644 docs/references/grids/create-database.md create mode 100644 docs/references/grids/create-datetime-column.md create mode 100644 docs/references/grids/create-email-column.md create mode 100644 docs/references/grids/create-enum-column.md create mode 100644 docs/references/grids/create-float-column.md create mode 100644 docs/references/grids/create-index.md create mode 100644 docs/references/grids/create-integer-column.md create mode 100644 docs/references/grids/create-ip-column.md create mode 100644 docs/references/grids/create-relationship-column.md create mode 100644 docs/references/grids/create-row.md create mode 100644 docs/references/grids/create-rows.md create mode 100644 docs/references/grids/create-string-column.md create mode 100644 docs/references/grids/create-table.md create mode 100644 docs/references/grids/create-url-column.md create mode 100644 docs/references/grids/decrement-row-column.md create mode 100644 docs/references/grids/delete-column.md create mode 100644 docs/references/grids/delete-database.md create mode 100644 docs/references/grids/delete-index.md create mode 100644 docs/references/grids/delete-row.md create mode 100644 docs/references/grids/delete-rows.md create mode 100644 docs/references/grids/delete-table.md create mode 100644 docs/references/grids/get-column.md create mode 100644 docs/references/grids/get-database-usage.md create mode 100644 docs/references/grids/get-database.md create mode 100644 docs/references/grids/get-index.md create mode 100644 docs/references/grids/get-logs.md create mode 100644 docs/references/grids/get-row-logs.md create mode 100644 docs/references/grids/get-row.md create mode 100644 docs/references/grids/get-table-logs.md create mode 100644 docs/references/grids/get-table-usage.md create mode 100644 docs/references/grids/get-table.md create mode 100644 docs/references/grids/increment-row-column.md create mode 100644 docs/references/grids/list-columns.md create mode 100644 docs/references/grids/list-database-usage.md create mode 100644 docs/references/grids/list-databases.md create mode 100644 docs/references/grids/list-indexes.md create mode 100644 docs/references/grids/list-rows.md create mode 100644 docs/references/grids/list-tables.md create mode 100644 docs/references/grids/update-boolean-column.md create mode 100644 docs/references/grids/update-database.md create mode 100644 docs/references/grids/update-datetime-column.md create mode 100644 docs/references/grids/update-email-column.md create mode 100644 docs/references/grids/update-enum-column.md create mode 100644 docs/references/grids/update-float-column.md create mode 100644 docs/references/grids/update-integer-column.md create mode 100644 docs/references/grids/update-ip-column.md create mode 100644 docs/references/grids/update-relationship-column.md create mode 100644 docs/references/grids/update-row.md create mode 100644 docs/references/grids/update-rows.md create mode 100644 docs/references/grids/update-string-column.md create mode 100644 docs/references/grids/update-table.md create mode 100644 docs/references/grids/update-url-column.md create mode 100644 docs/references/grids/upsert-row.md create mode 100644 docs/references/grids/upsert-rows.md diff --git a/docs/examples/1.8.x/client-android/java/databases/create-document.md b/docs/examples/1.8.x/client-android/java/databases/create-document.md index 7fb129bb0b..4804d751e3 100644 --- a/docs/examples/1.8.x/client-android/java/databases/create-document.md +++ b/docs/examples/1.8.x/client-android/java/databases/create-document.md @@ -4,9 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client(context) .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>"); // Your project ID Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/client-android/java/databases/upsert-document.md b/docs/examples/1.8.x/client-android/java/databases/upsert-document.md index ba7336f3f9..868576b982 100644 --- a/docs/examples/1.8.x/client-android/java/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-android/java/databases/upsert-document.md @@ -4,9 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client(context) .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>"); // Your project ID Databases databases = new Databases(client); @@ -14,6 +12,8 @@ databases.upsertDocument( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/client-android/java/functions/create-execution.md b/docs/examples/1.8.x/client-android/java/functions/create-execution.md index c138b0ef86..06c50278a5 100644 --- a/docs/examples/1.8.x/client-android/java/functions/create-execution.md +++ b/docs/examples/1.8.x/client-android/java/functions/create-execution.md @@ -15,7 +15,7 @@ functions.createExecution( "<PATH>", // path (optional) ExecutionMethod.GET, // method (optional) mapOf( "a" to "b" ), // headers (optional) - "", // scheduledAt (optional) + "<SCHEDULED_AT>", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/client-android/java/grids/create-row.md b/docs/examples/1.8.x/client-android/java/grids/create-row.md new file mode 100644 index 0000000000..93cea1f09c --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/grids/create-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Grids grids = new Grids(client); + +grids.createRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/grids/delete-row.md b/docs/examples/1.8.x/client-android/java/grids/delete-row.md new file mode 100644 index 0000000000..a73c03a06e --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/grids/delete-row.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Grids grids = new Grids(client); + +grids.deleteRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/grids/get-row.md b/docs/examples/1.8.x/client-android/java/grids/get-row.md new file mode 100644 index 0000000000..4968759d6b --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/grids/get-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Grids grids = new Grids(client); + +grids.getRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/grids/list-rows.md b/docs/examples/1.8.x/client-android/java/grids/list-rows.md new file mode 100644 index 0000000000..55336dc452 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/grids/list-rows.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Grids grids = new Grids(client); + +grids.listRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/grids/update-row.md b/docs/examples/1.8.x/client-android/java/grids/update-row.md new file mode 100644 index 0000000000..23dc0907eb --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/grids/update-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Grids grids = new Grids(client); + +grids.updateRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/java/grids/upsert-row.md b/docs/examples/1.8.x/client-android/java/grids/upsert-row.md new file mode 100644 index 0000000000..3938fde103 --- /dev/null +++ b/docs/examples/1.8.x/client-android/java/grids/upsert-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>"); // Your project ID + +Grids grids = new Grids(client); + +grids.upsertRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md index 0bafb315e7..849a636afb 100644 --- a/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md +++ b/docs/examples/1.8.x/client-android/kotlin/databases/create-document.md @@ -4,9 +4,7 @@ import io.appwrite.services.Databases val client = Client(context) .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID val databases = Databases(client) diff --git a/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md b/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md index 7939fde2be..a31dfc8797 100644 --- a/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-android/kotlin/databases/upsert-document.md @@ -4,9 +4,7 @@ import io.appwrite.services.Databases val client = Client(context) .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID val databases = Databases(client) @@ -14,4 +12,6 @@ val result = databases.upsertDocument( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")"), // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md b/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md index cb7c60bac1..5e1950b8d9 100644 --- a/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md +++ b/docs/examples/1.8.x/client-android/kotlin/functions/create-execution.md @@ -15,5 +15,5 @@ val result = functions.createExecution( path = "<PATH>", // (optional) method = ExecutionMethod.GET, // (optional) headers = mapOf( "a" to "b" ), // (optional) - scheduledAt = "", // (optional) + scheduledAt = "<SCHEDULED_AT>", // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/create-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/create-row.md new file mode 100644 index 0000000000..5b29ac0db0 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/grids/create-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val grids = Grids(client) + +val result = grids.createRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md new file mode 100644 index 0000000000..e85ff6c4ad --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/grids/delete-row.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val grids = Grids(client) + +val result = grids.deleteRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/get-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/get-row.md new file mode 100644 index 0000000000..0b6c313645 --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/grids/get-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val grids = Grids(client) + +val result = grids.getRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md b/docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md new file mode 100644 index 0000000000..153e62787f --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/grids/list-rows.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val grids = Grids(client) + +val result = grids.listRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf(), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/update-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/update-row.md new file mode 100644 index 0000000000..8dff0b157c --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/grids/update-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val grids = Grids(client) + +val result = grids.updateRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md b/docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md new file mode 100644 index 0000000000..a6f5bb846e --- /dev/null +++ b/docs/examples/1.8.x/client-android/kotlin/grids/upsert-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client(context) + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +val grids = Grids(client) + +val result = grids.upsertRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // (optional) + permissions = listOf("read("any")"), // (optional) +) \ No newline at end of file diff --git a/docs/examples/1.8.x/client-apple/examples/databases/create-document.md b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md index 6c2baee728..51adb64bb3 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/create-document.md @@ -2,9 +2,7 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID let databases = Databases(client) diff --git a/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md index bb713146ec..3e1bf83a66 100644 --- a/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-apple/examples/databases/upsert-document.md @@ -2,15 +2,15 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("") // - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID let databases = Databases(client) let document = try await databases.upsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>" + documentId: "<DOCUMENT_ID>", + data: [:], + permissions: ["read("any")"] // optional ) diff --git a/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md b/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md index 7470e9ebf6..b7311df846 100644 --- a/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-apple/examples/functions/create-execution.md @@ -14,6 +14,6 @@ let execution = try await functions.createExecution( path: "<PATH>", // optional method: .gET, // optional headers: [:], // optional - scheduledAt: "" // optional + scheduledAt: "<SCHEDULED_AT>" // optional ) diff --git a/docs/examples/1.8.x/client-apple/examples/grids/create-row.md b/docs/examples/1.8.x/client-apple/examples/grids/create-row.md new file mode 100644 index 0000000000..0739b27949 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/grids/create-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let grids = Grids(client) + +let row = try await grids.createRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/grids/delete-row.md b/docs/examples/1.8.x/client-apple/examples/grids/delete-row.md new file mode 100644 index 0000000000..58ae835ec5 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/grids/delete-row.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let grids = Grids(client) + +let result = try await grids.deleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/client-apple/examples/grids/get-row.md b/docs/examples/1.8.x/client-apple/examples/grids/get-row.md new file mode 100644 index 0000000000..fccdad1f34 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/grids/get-row.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let grids = Grids(client) + +let row = try await grids.getRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/grids/list-rows.md b/docs/examples/1.8.x/client-apple/examples/grids/list-rows.md new file mode 100644 index 0000000000..1b4d885a64 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/grids/list-rows.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let grids = Grids(client) + +let rowList = try await grids.listRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/grids/update-row.md b/docs/examples/1.8.x/client-apple/examples/grids/update-row.md new file mode 100644 index 0000000000..95a3611a92 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/grids/update-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let grids = Grids(client) + +let row = try await grids.updateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md new file mode 100644 index 0000000000..c5638a4881 --- /dev/null +++ b/docs/examples/1.8.x/client-apple/examples/grids/upsert-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + +let grids = Grids(client) + +let row = try await grids.upsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md index 4f286fff95..27efc34580 100644 --- a/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-flutter/examples/databases/create-document.md @@ -2,9 +2,7 @@ import 'package:appwrite/appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID Databases databases = Databases(client); diff --git a/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md index ec3af47c3a..398a99cb1d 100644 --- a/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-flutter/examples/databases/upsert-document.md @@ -2,9 +2,7 @@ import 'package:appwrite/appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID Databases databases = Databases(client); @@ -12,4 +10,6 @@ Document result = await databases.upsertDocument( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"], // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md b/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md index d2a3d9e00a..bbd7cd37a6 100644 --- a/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-flutter/examples/functions/create-execution.md @@ -13,5 +13,5 @@ Execution result = await functions.createExecution( path: '<PATH>', // optional method: ExecutionMethod.gET, // optional headers: {}, // optional - scheduledAt: '', // optional + scheduledAt: '<SCHEDULED_AT>', // optional ); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/create-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/create-row.md new file mode 100644 index 0000000000..2f80a01806 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/grids/create-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Grids grids = Grids(client); + +Row result = await grids.createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md new file mode 100644 index 0000000000..04f5aec544 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/grids/delete-row.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Grids grids = Grids(client); + +await grids.deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/get-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/get-row.md new file mode 100644 index 0000000000..a8a380ee7c --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/grids/get-row.md @@ -0,0 +1,14 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Grids grids = Grids(client); + +Row result = await grids.getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md b/docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md new file mode 100644 index 0000000000..6654c57aaa --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/grids/list-rows.md @@ -0,0 +1,13 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Grids grids = Grids(client); + +RowList result = await grids.listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/update-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/update-row.md new file mode 100644 index 0000000000..293f38877a --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/grids/update-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Grids grids = Grids(client); + +Row result = await grids.updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md new file mode 100644 index 0000000000..2cec5621b7 --- /dev/null +++ b/docs/examples/1.8.x/client-flutter/examples/grids/upsert-row.md @@ -0,0 +1,15 @@ +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +Grids grids = Grids(client); + +Row result = await grids.upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // optional + permissions: ["read("any")"], // optional +); diff --git a/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md index c381fe35a3..9d1e753081 100644 --- a/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-graphql/examples/databases/upsert-document.md @@ -2,7 +2,9 @@ mutation { databasesUpsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>" + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read("any")"] ) { _id _sequence diff --git a/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md b/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md index 1479aa3bb6..8979880723 100644 --- a/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-graphql/examples/functions/create-execution.md @@ -6,7 +6,7 @@ mutation { path: "<PATH>", method: "GET", headers: "{}", - scheduledAt: "" + scheduledAt: "<SCHEDULED_AT>" ) { _id _createdAt diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/create-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/create-row.md new file mode 100644 index 0000000000..cffb7361f2 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/grids/create-row.md @@ -0,0 +1,18 @@ +mutation { + gridsCreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md new file mode 100644 index 0000000000..40dcbdc219 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/grids/delete-row.md @@ -0,0 +1,9 @@ +mutation { + gridsDeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/get-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/get-row.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/list-rows.md b/docs/examples/1.8.x/client-graphql/examples/grids/list-rows.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/update-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/update-row.md new file mode 100644 index 0000000000..2bb105e8c0 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/grids/update-row.md @@ -0,0 +1,18 @@ +mutation { + gridsUpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md new file mode 100644 index 0000000000..f8e0606109 --- /dev/null +++ b/docs/examples/1.8.x/client-graphql/examples/grids/upsert-row.md @@ -0,0 +1,18 @@ +mutation { + gridsUpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md b/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md index 97e2150c39..50161e433f 100644 --- a/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md +++ b/docs/examples/1.8.x/client-graphql/examples/storage/create-file.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md index ec768fcfaf..1b28231ed3 100644 --- a/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-react-native/examples/databases/create-document.md @@ -2,9 +2,7 @@ import { Client, Databases } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); diff --git a/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md index 56d3af23ae..ae423d12a7 100644 --- a/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-react-native/examples/databases/upsert-document.md @@ -2,16 +2,16 @@ import { Client, Databases } from "react-native-appwrite"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); const result = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md b/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md index 72c71f7767..7d850c8103 100644 --- a/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-react-native/examples/functions/create-execution.md @@ -13,7 +13,7 @@ const result = await functions.createExecution( '<PATH>', // path (optional) ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '' // scheduledAt (optional) + '<SCHEDULED_AT>' // scheduledAt (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/create-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/create-row.md new file mode 100644 index 0000000000..9fdbce2dd9 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/grids/create-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/delete-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/delete-row.md new file mode 100644 index 0000000000..33a5a50a69 --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/grids/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/get-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/get-row.md new file mode 100644 index 0000000000..7df0636b2e --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/grids/get-row.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/list-rows.md b/docs/examples/1.8.x/client-react-native/examples/grids/list-rows.md new file mode 100644 index 0000000000..3fd58773ef --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/grids/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/update-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/update-row.md new file mode 100644 index 0000000000..39b147758f --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/grids/update-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-react-native/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-react-native/examples/grids/upsert-row.md new file mode 100644 index 0000000000..54443a6a4d --- /dev/null +++ b/docs/examples/1.8.x/client-react-native/examples/grids/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md index 2079b045d1..b62c82a6a8 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-anonymous-session.md @@ -1,6 +1,6 @@ POST /v1/account/sessions/anonymous HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md index 8aee0e5b15..1103d2ebfb 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-email-password-session.md @@ -1,7 +1,7 @@ POST /v1/account/sessions/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md index 98c5c9b454..552b724b9c 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-email-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md b/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md index a8da4695c3..62a7dee7e9 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-j-w-t.md @@ -1,6 +1,6 @@ POST /v1/account/jwts HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md index a3db43516a..29d68bd0fa 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-magic-u-r-l-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/magic-url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md index 8d6b52b877..62a068b6cf 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-authenticator.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md index 9a84c0ef69..dd5ef4c731 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-challenge.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/challenge HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md index 797824d5d7..f09323df0b 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-mfa-recovery-codes.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md index 293170b490..d136722ec8 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2session.md @@ -1,4 +1,4 @@ GET /v1/account/sessions/oauth2/{provider} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md index dd1dd3ec5e..8a0cab614f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-o-auth2token.md @@ -1,4 +1,4 @@ GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md b/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md index eef1021d9e..5127c8377a 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-phone-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md b/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md index d161e580ff..57b3b7d160 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-phone-verification.md @@ -1,7 +1,7 @@ POST /v1/account/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md index 5844ccc19e..459a2a2ecc 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-push-target.md @@ -1,7 +1,7 @@ POST /v1/account/targets/push HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md b/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md index c195b96a5e..ea0146228b 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-recovery.md @@ -1,7 +1,7 @@ POST /v1/account/recovery HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-session.md b/docs/examples/1.8.x/client-rest/examples/account/create-session.md index 18e3b1acdd..0acc50cda6 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-session.md @@ -1,7 +1,7 @@ POST /v1/account/sessions/token HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/create-verification.md b/docs/examples/1.8.x/client-rest/examples/account/create-verification.md index 1185d3a875..ed5479dbe5 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create-verification.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create-verification.md @@ -1,7 +1,7 @@ POST /v1/account/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/create.md b/docs/examples/1.8.x/client-rest/examples/account/create.md index f546c07de5..15bb386f41 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/create.md +++ b/docs/examples/1.8.x/client-rest/examples/account/create.md @@ -1,7 +1,7 @@ POST /v1/account HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md b/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md index edb036a593..bacca18870 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-identity.md @@ -1,7 +1,7 @@ DELETE /v1/account/identities/{identityId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md index de58948195..a0eb5a0869 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-mfa-authenticator.md @@ -1,7 +1,7 @@ DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md index fdfc75a41b..9ec6e20d27 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-push-target.md @@ -1,7 +1,7 @@ DELETE /v1/account/targets/{targetId}/push HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-session.md b/docs/examples/1.8.x/client-rest/examples/account/delete-session.md index 9454a84913..c9b0f48d6f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-session.md @@ -1,7 +1,7 @@ DELETE /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md b/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md index 97931c12e5..0b3fcd1c45 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md +++ b/docs/examples/1.8.x/client-rest/examples/account/delete-sessions.md @@ -1,7 +1,7 @@ DELETE /v1/account/sessions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md index 81edee5234..2ab10a2475 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/client-rest/examples/account/get-mfa-recovery-codes.md @@ -1,6 +1,6 @@ GET /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md b/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md index 13a0b74d8f..a038dacbfd 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md +++ b/docs/examples/1.8.x/client-rest/examples/account/get-prefs.md @@ -1,6 +1,6 @@ GET /v1/account/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/get-session.md b/docs/examples/1.8.x/client-rest/examples/account/get-session.md index 9417755b04..3e372a05ef 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/get-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/get-session.md @@ -1,6 +1,6 @@ GET /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/get.md b/docs/examples/1.8.x/client-rest/examples/account/get.md index 023a6d116f..104b643074 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/get.md +++ b/docs/examples/1.8.x/client-rest/examples/account/get.md @@ -1,6 +1,6 @@ GET /v1/account HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-identities.md b/docs/examples/1.8.x/client-rest/examples/account/list-identities.md index 65edceb8d6..5acb221584 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/list-identities.md +++ b/docs/examples/1.8.x/client-rest/examples/account/list-identities.md @@ -1,6 +1,6 @@ GET /v1/account/identities HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-logs.md b/docs/examples/1.8.x/client-rest/examples/account/list-logs.md index 71e2e138ef..8314123c9e 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/list-logs.md +++ b/docs/examples/1.8.x/client-rest/examples/account/list-logs.md @@ -1,6 +1,6 @@ GET /v1/account/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md index 217ec6cb30..c591143d4e 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md +++ b/docs/examples/1.8.x/client-rest/examples/account/list-mfa-factors.md @@ -1,6 +1,6 @@ GET /v1/account/mfa/factors HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md b/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md index 7bff23f25b..89ef6962c9 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md +++ b/docs/examples/1.8.x/client-rest/examples/account/list-sessions.md @@ -1,6 +1,6 @@ GET /v1/account/sessions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-email.md b/docs/examples/1.8.x/client-rest/examples/account/update-email.md index fc3baaf4a4..382327e31b 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-email.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-email.md @@ -1,7 +1,7 @@ PATCH /v1/account/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md b/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md index 803c47a857..a22b169751 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-m-f-a.md @@ -1,7 +1,7 @@ PATCH /v1/account/mfa HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md index 3238322e0f..1a82afbfcc 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-magic-u-r-l-session.md @@ -1,7 +1,7 @@ PUT /v1/account/sessions/magic-url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md index 9d3e5dceea..780472291c 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-authenticator.md @@ -1,7 +1,7 @@ PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md index ddc27ae334..b6a7e92b28 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-challenge.md @@ -1,7 +1,7 @@ PUT /v1/account/mfa/challenge HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md index e4ab8abb3b..74e9225f3e 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-mfa-recovery-codes.md @@ -1,7 +1,7 @@ PATCH /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-name.md b/docs/examples/1.8.x/client-rest/examples/account/update-name.md index f2f7caa204..4c9c0e302c 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-name.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-name.md @@ -1,7 +1,7 @@ PATCH /v1/account/name HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-password.md b/docs/examples/1.8.x/client-rest/examples/account/update-password.md index 4f69b9ab3f..e05a1c2b7f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-password.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-password.md @@ -1,7 +1,7 @@ PATCH /v1/account/password HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md index f1bc27d201..54872eecd2 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone-session.md @@ -1,7 +1,7 @@ PUT /v1/account/sessions/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md index ee6f5a68ff..1d4dc22520 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone-verification.md @@ -1,7 +1,7 @@ PUT /v1/account/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-phone.md b/docs/examples/1.8.x/client-rest/examples/account/update-phone.md index bbe602a181..791caadb0d 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-phone.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-phone.md @@ -1,7 +1,7 @@ PATCH /v1/account/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md b/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md index aeabc2b68f..24f2d3bcb6 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-prefs.md @@ -1,7 +1,7 @@ PATCH /v1/account/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md b/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md index 2e42a2d67f..95210b5a1c 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-push-target.md @@ -1,7 +1,7 @@ PUT /v1/account/targets/{targetId}/push HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md b/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md index 054aacc8ed..7d40ee79fe 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-recovery.md @@ -1,7 +1,7 @@ PUT /v1/account/recovery HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-session.md b/docs/examples/1.8.x/client-rest/examples/account/update-session.md index 9b2ba0e4a7..8e2257aeed 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-session.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-session.md @@ -1,7 +1,7 @@ PATCH /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-status.md b/docs/examples/1.8.x/client-rest/examples/account/update-status.md index 8a3e01db0b..557697fe5f 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-status.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-status.md @@ -1,7 +1,7 @@ PATCH /v1/account/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/account/update-verification.md b/docs/examples/1.8.x/client-rest/examples/account/update-verification.md index 0c5ed8b55d..a4dcbf76a3 100644 --- a/docs/examples/1.8.x/client-rest/examples/account/update-verification.md +++ b/docs/examples/1.8.x/client-rest/examples/account/update-verification.md @@ -1,7 +1,7 @@ PUT /v1/account/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md index e5f6f22ab5..9de9d99173 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-browser.md @@ -1,6 +1,6 @@ GET /v1/avatars/browsers/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md index ab513115f8..ed30226d3b 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-credit-card.md @@ -1,6 +1,6 @@ GET /v1/avatars/credit-cards/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md index 837dba633c..8eaca9452e 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-favicon.md @@ -1,6 +1,6 @@ GET /v1/avatars/favicon HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md index d0c92d7c02..07172e89d8 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-flag.md @@ -1,6 +1,6 @@ GET /v1/avatars/flags/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md index 2f80018f20..98d4898e6f 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-image.md @@ -1,6 +1,6 @@ GET /v1/avatars/image HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md index f3879b5d52..93a70a80ab 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-initials.md @@ -1,6 +1,6 @@ GET /v1/avatars/initials HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md b/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md index 263c54742c..39e513c810 100644 --- a/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md +++ b/docs/examples/1.8.x/client-rest/examples/avatars/get-q-r.md @@ -1,6 +1,6 @@ GET /v1/avatars/qr HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/create-document.md b/docs/examples/1.8.x/client-rest/examples/databases/create-document.md index 3126197555..e9b165e2ac 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/create-document.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md b/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md index 6b86aba853..2ee4f92ec4 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/delete-document.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/get-document.md b/docs/examples/1.8.x/client-rest/examples/databases/get-document.md index a32db40087..dac5e48131 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/get-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/get-document.md @@ -1,6 +1,6 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md b/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md index 22ca529e89..e5c4936d6f 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/list-documents.md @@ -1,6 +1,6 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/update-document.md b/docs/examples/1.8.x/client-rest/examples/databases/update-document.md index 945b957c6e..ffc5d36011 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/update-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/update-document.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md index 7cfa380a40..d2baeac6a8 100644 --- a/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-rest/examples/databases/upsert-document.md @@ -1,8 +1,12 @@ PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md b/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md index fec92ddab0..4ae83f3096 100644 --- a/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-rest/examples/functions/create-execution.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/executions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> @@ -12,5 +12,5 @@ X-Appwrite-JWT: <YOUR_JWT> "path": "<PATH>", "method": "GET", "headers": {}, - "scheduledAt": + "scheduledAt": "<SCHEDULED_AT>" } diff --git a/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md b/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md index 7df2f3acbe..e2f3e97d10 100644 --- a/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md +++ b/docs/examples/1.8.x/client-rest/examples/functions/get-execution.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md b/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md index b2ab0e05d1..445ed1fa83 100644 --- a/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md +++ b/docs/examples/1.8.x/client-rest/examples/functions/list-executions.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/executions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md b/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md index db3b1c0c78..4080765d58 100644 --- a/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/client-rest/examples/graphql/mutation.md @@ -2,7 +2,7 @@ POST /v1/graphql/mutation HTTP/1.1 Host: cloud.appwrite.io X-Sdk-Graphql: true Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/graphql/query.md b/docs/examples/1.8.x/client-rest/examples/graphql/query.md index 8fc41efcfe..b05ce724c8 100644 --- a/docs/examples/1.8.x/client-rest/examples/graphql/query.md +++ b/docs/examples/1.8.x/client-rest/examples/graphql/query.md @@ -2,7 +2,7 @@ POST /v1/graphql HTTP/1.1 Host: cloud.appwrite.io X-Sdk-Graphql: true Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/grids/create-row.md b/docs/examples/1.8.x/client-rest/examples/grids/create-row.md new file mode 100644 index 0000000000..98b261ecba --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/grids/create-row.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rowId": "<ROW_ID>", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/grids/delete-row.md b/docs/examples/1.8.x/client-rest/examples/grids/delete-row.md new file mode 100644 index 0000000000..6f702a8526 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/grids/delete-row.md @@ -0,0 +1,8 @@ +DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/client-rest/examples/grids/get-row.md b/docs/examples/1.8.x/client-rest/examples/grids/get-row.md new file mode 100644 index 0000000000..876fe0f796 --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/grids/get-row.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/grids/list-rows.md b/docs/examples/1.8.x/client-rest/examples/grids/list-rows.md new file mode 100644 index 0000000000..86751cfcaf --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/grids/list-rows.md @@ -0,0 +1,6 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/grids/update-row.md b/docs/examples/1.8.x/client-rest/examples/grids/update-row.md new file mode 100644 index 0000000000..bacfb5389a --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/grids/update-row.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md new file mode 100644 index 0000000000..7368fc436d --- /dev/null +++ b/docs/examples/1.8.x/client-rest/examples/grids/upsert-row.md @@ -0,0 +1,12 @@ +PUT /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/client-rest/examples/locale/get.md b/docs/examples/1.8.x/client-rest/examples/locale/get.md index 0d67644583..8f8a1741e6 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/get.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/get.md @@ -1,6 +1,6 @@ GET /v1/locale HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md b/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md index f362c5987e..61110f6527 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-codes.md @@ -1,6 +1,6 @@ GET /v1/locale/codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md b/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md index 93db4fb302..cb96cc4e16 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-continents.md @@ -1,6 +1,6 @@ GET /v1/locale/continents HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md index 09eba6168f..d4de74a879 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-e-u.md @@ -1,6 +1,6 @@ GET /v1/locale/countries/eu HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md index 94ef0bb943..0e1ed67a7d 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries-phones.md @@ -1,6 +1,6 @@ GET /v1/locale/countries/phones HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md b/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md index dc8289980a..58e487a875 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-countries.md @@ -1,6 +1,6 @@ GET /v1/locale/countries HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md b/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md index 9a3af20c94..a3a9b96c48 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-currencies.md @@ -1,6 +1,6 @@ GET /v1/locale/currencies HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md b/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md index 7d90c8b40a..8c7cbabddf 100644 --- a/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md +++ b/docs/examples/1.8.x/client-rest/examples/locale/list-languages.md @@ -1,6 +1,6 @@ GET /v1/locale/languages HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md index 94e98c4438..708ec0782a 100644 --- a/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md +++ b/docs/examples/1.8.x/client-rest/examples/messaging/create-subscriber.md @@ -1,7 +1,7 @@ POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md index e5ac0830a3..1cb9c3e516 100644 --- a/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.8.x/client-rest/examples/messaging/delete-subscriber.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/client-rest/examples/storage/create-file.md b/docs/examples/1.8.x/client-rest/examples/storage/create-file.md index f044b577b2..0f83797b70 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/create-file.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/create-file.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md b/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md index 8d074341fe..e00392a525 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/delete-file.md @@ -1,7 +1,7 @@ DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md index 58c9c6d276..92991d0727 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-download.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md index ff24de4ec4..e84dd4dd85 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-preview.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md index 9c95a2b48f..f482706f6f 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file-view.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/get-file.md b/docs/examples/1.8.x/client-rest/examples/storage/get-file.md index ffb3703fe1..4f929caadf 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/get-file.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/get-file.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/list-files.md b/docs/examples/1.8.x/client-rest/examples/storage/list-files.md index d1258b97de..977bb9e713 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/list-files.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/list-files.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/storage/update-file.md b/docs/examples/1.8.x/client-rest/examples/storage/update-file.md index 210433622b..fed35bb860 100644 --- a/docs/examples/1.8.x/client-rest/examples/storage/update-file.md +++ b/docs/examples/1.8.x/client-rest/examples/storage/update-file.md @@ -1,7 +1,7 @@ PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md index 83e4803502..f96f20c2b8 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/create-membership.md @@ -1,7 +1,7 @@ POST /v1/teams/{teamId}/memberships HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/create.md b/docs/examples/1.8.x/client-rest/examples/teams/create.md index c80b2bda8e..33cf95ba01 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/create.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/create.md @@ -1,7 +1,7 @@ POST /v1/teams HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md index 0fc17e11ee..8da481d5cf 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/delete-membership.md @@ -1,7 +1,7 @@ DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/delete.md b/docs/examples/1.8.x/client-rest/examples/teams/delete.md index ad614b17d1..d1dc59c23a 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/delete.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/delete.md @@ -1,7 +1,7 @@ DELETE /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md index dbe034f34b..6e7379b0d7 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/get-membership.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md b/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md index ddb863181d..e541fd3fd8 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/get-prefs.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/get.md b/docs/examples/1.8.x/client-rest/examples/teams/get.md index 730d23a03b..32d9156267 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/get.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/get.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md b/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md index 82a9f82c33..4e364053b3 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/list-memberships.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/memberships HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/list.md b/docs/examples/1.8.x/client-rest/examples/teams/list.md index 00a419269a..e5f0439a13 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/list.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/list.md @@ -1,6 +1,6 @@ GET /v1/teams HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md b/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md index 9d828118f0..da2c9189cd 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-membership-status.md @@ -1,7 +1,7 @@ PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md b/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md index 3768499d16..b1010ea460 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-membership.md @@ -1,7 +1,7 @@ PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-name.md b/docs/examples/1.8.x/client-rest/examples/teams/update-name.md index ec381348e8..cd92d686ce 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/update-name.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-name.md @@ -1,7 +1,7 @@ PUT /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md b/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md index 1db6300350..e17dcdb260 100644 --- a/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md +++ b/docs/examples/1.8.x/client-rest/examples/teams/update-prefs.md @@ -1,7 +1,7 @@ PUT /v1/teams/{teamId}/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/client-web/examples/databases/create-document.md b/docs/examples/1.8.x/client-web/examples/databases/create-document.md index 401a67488c..916cc92689 100644 --- a/docs/examples/1.8.x/client-web/examples/databases/create-document.md +++ b/docs/examples/1.8.x/client-web/examples/databases/create-document.md @@ -2,9 +2,7 @@ import { Client, Databases } from "appwrite"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); diff --git a/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md b/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md index a581396da8..cfefe06242 100644 --- a/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/client-web/examples/databases/upsert-document.md @@ -2,16 +2,16 @@ import { Client, Databases } from "appwrite"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('') // - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); const result = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/functions/create-execution.md b/docs/examples/1.8.x/client-web/examples/functions/create-execution.md index 8f07523b2b..be9bb508c0 100644 --- a/docs/examples/1.8.x/client-web/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/client-web/examples/functions/create-execution.md @@ -13,7 +13,7 @@ const result = await functions.createExecution( '<PATH>', // path (optional) ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '' // scheduledAt (optional) + '<SCHEDULED_AT>' // scheduledAt (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/create-row.md b/docs/examples/1.8.x/client-web/examples/grids/create-row.md new file mode 100644 index 0000000000..9dc6de2769 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/grids/create-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/delete-row.md b/docs/examples/1.8.x/client-web/examples/grids/delete-row.md new file mode 100644 index 0000000000..7d3fb7df7e --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/grids/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/get-row.md b/docs/examples/1.8.x/client-web/examples/grids/get-row.md new file mode 100644 index 0000000000..778377b61b --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/grids/get-row.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/list-rows.md b/docs/examples/1.8.x/client-web/examples/grids/list-rows.md new file mode 100644 index 0000000000..07de125329 --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/grids/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/update-row.md b/docs/examples/1.8.x/client-web/examples/grids/update-row.md new file mode 100644 index 0000000000..f37659e3ca --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/grids/update-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/client-web/examples/grids/upsert-row.md b/docs/examples/1.8.x/client-web/examples/grids/upsert-row.md new file mode 100644 index 0000000000..8850c27ebd --- /dev/null +++ b/docs/examples/1.8.x/client-web/examples/grids/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "appwrite"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md b/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md index 151e466d02..40932014ba 100644 --- a/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/console-cli/examples/databases/upsert-document.md @@ -1,4 +1,6 @@ appwrite databases upsertDocument \ --databaseId <DATABASE_ID> \ --collectionId <COLLECTION_ID> \ - --documentId <DOCUMENT_ID> + --documentId <DOCUMENT_ID> \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md b/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md index 30c7dc5b4b..cb1677b14c 100644 --- a/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/console-cli/examples/databases/upsert-documents.md @@ -1,3 +1,4 @@ appwrite databases upsertDocuments \ --databaseId <DATABASE_ID> \ - --collectionId <COLLECTION_ID> + --collectionId <COLLECTION_ID> \ + --documents one two three diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..3a26ed2935 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-boolean-column.md @@ -0,0 +1,7 @@ +appwrite grids createBooleanColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-database.md b/docs/examples/1.8.x/console-cli/examples/grids/create-database.md new file mode 100644 index 0000000000..741d5f83ee --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-database.md @@ -0,0 +1,4 @@ +appwrite grids createDatabase \ + --databaseId <DATABASE_ID> \ + --name <NAME> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..1efced687d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-datetime-column.md @@ -0,0 +1,7 @@ +appwrite grids createDatetimeColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-email-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-email-column.md new file mode 100644 index 0000000000..f0758d2753 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-email-column.md @@ -0,0 +1,7 @@ +appwrite grids createEmailColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-enum-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..e6ca5fdbd6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-enum-column.md @@ -0,0 +1,8 @@ +appwrite grids createEnumColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --elements one two three \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-float-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-float-column.md new file mode 100644 index 0000000000..a17535614d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-float-column.md @@ -0,0 +1,9 @@ +appwrite grids createFloatColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-index.md b/docs/examples/1.8.x/console-cli/examples/grids/create-index.md new file mode 100644 index 0000000000..9b92ecc614 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-index.md @@ -0,0 +1,8 @@ +appwrite grids createIndex \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --type key \ + --columns one two three \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-integer-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..0e7d408fea --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-integer-column.md @@ -0,0 +1,9 @@ +appwrite grids createIntegerColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-ip-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..bc16e6b9a7 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-ip-column.md @@ -0,0 +1,7 @@ +appwrite grids createIpColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..d60fd4516a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-relationship-column.md @@ -0,0 +1,9 @@ +appwrite grids createRelationshipColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --relatedTableId <RELATED_TABLE_ID> \ + --type oneToOne \ + + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-row.md b/docs/examples/1.8.x/console-cli/examples/grids/create-row.md new file mode 100644 index 0000000000..f59ac8253c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-row.md @@ -0,0 +1,6 @@ +appwrite grids createRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + --data '{ "key": "value" }' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/create-rows.md new file mode 100644 index 0000000000..8d89674dc6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-rows.md @@ -0,0 +1,4 @@ +appwrite grids createRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rows one two three diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-string-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-string-column.md new file mode 100644 index 0000000000..658bedec06 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-string-column.md @@ -0,0 +1,9 @@ +appwrite grids createStringColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --size 1 \ + --required false \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-table.md b/docs/examples/1.8.x/console-cli/examples/grids/create-table.md new file mode 100644 index 0000000000..9e707fde1c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-table.md @@ -0,0 +1,7 @@ +appwrite grids createTable \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --name <NAME> \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/create-url-column.md b/docs/examples/1.8.x/console-cli/examples/grids/create-url-column.md new file mode 100644 index 0000000000..88adbdbb5d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/create-url-column.md @@ -0,0 +1,7 @@ +appwrite grids createUrlColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/console-cli/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..f3c1a50c2d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/decrement-row-column.md @@ -0,0 +1,7 @@ +appwrite grids decrementRowColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + --column '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-column.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-column.md new file mode 100644 index 0000000000..0b60af67cc --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/delete-column.md @@ -0,0 +1,4 @@ +appwrite grids deleteColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-database.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-database.md new file mode 100644 index 0000000000..c5e0ad3c63 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/delete-database.md @@ -0,0 +1,2 @@ +appwrite grids deleteDatabase \ + --databaseId <DATABASE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-index.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-index.md new file mode 100644 index 0000000000..0a1f6dc404 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/delete-index.md @@ -0,0 +1,4 @@ +appwrite grids deleteIndex \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-row.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-row.md new file mode 100644 index 0000000000..b360f6919a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/delete-row.md @@ -0,0 +1,4 @@ +appwrite grids deleteRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-rows.md new file mode 100644 index 0000000000..46b768f28d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/delete-rows.md @@ -0,0 +1,4 @@ +appwrite grids deleteRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/delete-table.md b/docs/examples/1.8.x/console-cli/examples/grids/delete-table.md new file mode 100644 index 0000000000..416a07052d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/delete-table.md @@ -0,0 +1,3 @@ +appwrite grids deleteTable \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-column.md b/docs/examples/1.8.x/console-cli/examples/grids/get-column.md new file mode 100644 index 0000000000..f875d56d33 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-column.md @@ -0,0 +1,4 @@ +appwrite grids getColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-database-usage.md b/docs/examples/1.8.x/console-cli/examples/grids/get-database-usage.md new file mode 100644 index 0000000000..0c35ea978d --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-database-usage.md @@ -0,0 +1,3 @@ +appwrite grids getDatabaseUsage \ + --databaseId <DATABASE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-database.md b/docs/examples/1.8.x/console-cli/examples/grids/get-database.md new file mode 100644 index 0000000000..f2232bb5c0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-database.md @@ -0,0 +1,2 @@ +appwrite grids getDatabase \ + --databaseId <DATABASE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-index.md b/docs/examples/1.8.x/console-cli/examples/grids/get-index.md new file mode 100644 index 0000000000..6f88f74c23 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-index.md @@ -0,0 +1,4 @@ +appwrite grids getIndex \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-row.md b/docs/examples/1.8.x/console-cli/examples/grids/get-row.md new file mode 100644 index 0000000000..73cc207eec --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-row.md @@ -0,0 +1,5 @@ +appwrite grids getRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-table-usage.md b/docs/examples/1.8.x/console-cli/examples/grids/get-table-usage.md new file mode 100644 index 0000000000..e4002ec61e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-table-usage.md @@ -0,0 +1,4 @@ +appwrite grids getTableUsage \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/get-table.md b/docs/examples/1.8.x/console-cli/examples/grids/get-table.md new file mode 100644 index 0000000000..e44c98ad83 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/get-table.md @@ -0,0 +1,3 @@ +appwrite grids getTable \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> diff --git a/docs/examples/1.8.x/console-cli/examples/grids/increment-row-column.md b/docs/examples/1.8.x/console-cli/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..b4b84b6392 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/increment-row-column.md @@ -0,0 +1,7 @@ +appwrite grids incrementRowColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + --column '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-columns.md b/docs/examples/1.8.x/console-cli/examples/grids/list-columns.md new file mode 100644 index 0000000000..968643bb6c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-columns.md @@ -0,0 +1,4 @@ +appwrite grids listColumns \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-database-logs.md b/docs/examples/1.8.x/console-cli/examples/grids/list-database-logs.md new file mode 100644 index 0000000000..c135a2b358 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-database-logs.md @@ -0,0 +1,3 @@ +appwrite grids listDatabaseLogs \ + --databaseId <DATABASE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-database-usage.md b/docs/examples/1.8.x/console-cli/examples/grids/list-database-usage.md new file mode 100644 index 0000000000..f13c4e4e0a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-database-usage.md @@ -0,0 +1,2 @@ +appwrite grids listDatabaseUsage \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-databases.md b/docs/examples/1.8.x/console-cli/examples/grids/list-databases.md new file mode 100644 index 0000000000..11d448043a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-databases.md @@ -0,0 +1,3 @@ +appwrite grids listDatabases \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-indexes.md b/docs/examples/1.8.x/console-cli/examples/grids/list-indexes.md new file mode 100644 index 0000000000..85df307deb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-indexes.md @@ -0,0 +1,4 @@ +appwrite grids listIndexes \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-row-logs.md b/docs/examples/1.8.x/console-cli/examples/grids/list-row-logs.md new file mode 100644 index 0000000000..3a073e4708 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-row-logs.md @@ -0,0 +1,5 @@ +appwrite grids listRowLogs \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/list-rows.md new file mode 100644 index 0000000000..99bf470bfb --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-rows.md @@ -0,0 +1,4 @@ +appwrite grids listRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-table-logs.md b/docs/examples/1.8.x/console-cli/examples/grids/list-table-logs.md new file mode 100644 index 0000000000..e38af040a6 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-table-logs.md @@ -0,0 +1,4 @@ +appwrite grids listTableLogs \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/list-tables.md b/docs/examples/1.8.x/console-cli/examples/grids/list-tables.md new file mode 100644 index 0000000000..69f464ba86 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/list-tables.md @@ -0,0 +1,4 @@ +appwrite grids listTables \ + --databaseId <DATABASE_ID> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..a980b12aa0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-boolean-column.md @@ -0,0 +1,7 @@ +appwrite grids updateBooleanColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default false \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-database.md b/docs/examples/1.8.x/console-cli/examples/grids/update-database.md new file mode 100644 index 0000000000..079e88dfd0 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-database.md @@ -0,0 +1,4 @@ +appwrite grids updateDatabase \ + --databaseId <DATABASE_ID> \ + --name <NAME> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..97ee021e80 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-datetime-column.md @@ -0,0 +1,7 @@ +appwrite grids updateDatetimeColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-email-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-email-column.md new file mode 100644 index 0000000000..d8b0827d62 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-email-column.md @@ -0,0 +1,7 @@ +appwrite grids updateEmailColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default email@example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-enum-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..82eb62f996 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-enum-column.md @@ -0,0 +1,8 @@ +appwrite grids updateEnumColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --elements one two three \ + --required false \ + --default <DEFAULT> \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-float-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-float-column.md new file mode 100644 index 0000000000..ef3a4ad36f --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-float-column.md @@ -0,0 +1,9 @@ +appwrite grids updateFloatColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-integer-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..5b83ca938b --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-integer-column.md @@ -0,0 +1,9 @@ +appwrite grids updateIntegerColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default null \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-ip-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..b0e6b8cf3a --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-ip-column.md @@ -0,0 +1,7 @@ +appwrite grids updateIpColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default '' \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..00ddda788c --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-relationship-column.md @@ -0,0 +1,6 @@ +appwrite grids updateRelationshipColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-row.md b/docs/examples/1.8.x/console-cli/examples/grids/update-row.md new file mode 100644 index 0000000000..b89566b570 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-row.md @@ -0,0 +1,6 @@ +appwrite grids updateRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/update-rows.md new file mode 100644 index 0000000000..72c63ddb41 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-rows.md @@ -0,0 +1,5 @@ +appwrite grids updateRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-string-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-string-column.md new file mode 100644 index 0000000000..a6b6280560 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-string-column.md @@ -0,0 +1,8 @@ +appwrite grids updateStringColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default <DEFAULT> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-table.md b/docs/examples/1.8.x/console-cli/examples/grids/update-table.md new file mode 100644 index 0000000000..66e26b1752 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-table.md @@ -0,0 +1,7 @@ +appwrite grids updateTable \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --name <NAME> \ + + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/update-url-column.md b/docs/examples/1.8.x/console-cli/examples/grids/update-url-column.md new file mode 100644 index 0000000000..ad41af9fa1 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/update-url-column.md @@ -0,0 +1,7 @@ +appwrite grids updateUrlColumn \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --key '' \ + --required false \ + --default https://example.com \ + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/upsert-row.md b/docs/examples/1.8.x/console-cli/examples/grids/upsert-row.md new file mode 100644 index 0000000000..8a356e7a1e --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/upsert-row.md @@ -0,0 +1,6 @@ +appwrite grids upsertRow \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rowId <ROW_ID> \ + + diff --git a/docs/examples/1.8.x/console-cli/examples/grids/upsert-rows.md b/docs/examples/1.8.x/console-cli/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..e4e31c1e83 --- /dev/null +++ b/docs/examples/1.8.x/console-cli/examples/grids/upsert-rows.md @@ -0,0 +1,4 @@ +appwrite grids upsertRows \ + --databaseId <DATABASE_ID> \ + --tableId <TABLE_ID> \ + --rows one two three diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-document.md b/docs/examples/1.8.x/console-web/examples/databases/create-document.md index 4524017dd5..1b96d07899 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-document.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-document.md @@ -2,9 +2,7 @@ import { Client, Databases } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); diff --git a/docs/examples/1.8.x/console-web/examples/databases/create-documents.md b/docs/examples/1.8.x/console-web/examples/databases/create-documents.md index f7ffbe809c..09f3007208 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/console-web/examples/databases/create-documents.md @@ -2,8 +2,7 @@ import { Client, Databases } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); diff --git a/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md b/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md index 6d92656543..3b89ed3aef 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/console-web/examples/databases/upsert-document.md @@ -2,16 +2,16 @@ import { Client, Databases } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); const result = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md b/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md index 519b0ec160..2d12f7caec 100644 --- a/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/console-web/examples/databases/upsert-documents.md @@ -2,14 +2,14 @@ import { Client, Databases } from "@appwrite.io/console"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // - .setKey('<YOUR_API_KEY>'); // Your secret API key + .setProject('<YOUR_PROJECT_ID>'); // Your project ID const databases = new Databases(client); const result = await databases.upsertDocuments( '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId + '<COLLECTION_ID>', // collectionId + [] // documents ); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/functions/create-execution.md b/docs/examples/1.8.x/console-web/examples/functions/create-execution.md index 813e1fd0a7..1886a831f2 100644 --- a/docs/examples/1.8.x/console-web/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/console-web/examples/functions/create-execution.md @@ -13,7 +13,7 @@ const result = await functions.createExecution( '<PATH>', // path (optional) ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '' // scheduledAt (optional) + '<SCHEDULED_AT>' // scheduledAt (optional) ); console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..5a61510aa7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-database.md b/docs/examples/1.8.x/console-web/examples/grids/create-database.md new file mode 100644 index 0000000000..b7eeb33253 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-database.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createDatabase( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..7580178d62 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-email-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-email-column.md new file mode 100644 index 0000000000..9e44cbbd66 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-email-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-enum-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..c596b1408a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-enum-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-float-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-float-column.md new file mode 100644 index 0000000000..d1b4c21898 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-float-column.md @@ -0,0 +1,20 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-index.md b/docs/examples/1.8.x/console-web/examples/grids/create-index.md new file mode 100644 index 0000000000..2c22cafde8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-index.md @@ -0,0 +1,19 @@ +import { Client, Grids, IndexType } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + IndexType.Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-integer-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..709694e358 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-integer-column.md @@ -0,0 +1,20 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-ip-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..1691d3fc81 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-ip-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..5536e26488 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-relationship-column.md @@ -0,0 +1,20 @@ +import { Client, Grids, RelationshipType, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-row.md b/docs/examples/1.8.x/console-web/examples/grids/create-row.md new file mode 100644 index 0000000000..f5259cff2d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-rows.md b/docs/examples/1.8.x/console-web/examples/grids/create-rows.md new file mode 100644 index 0000000000..ff84c045cb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-string-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-string-column.md new file mode 100644 index 0000000000..4032caede0 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-string-column.md @@ -0,0 +1,20 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-table.md b/docs/examples/1.8.x/console-web/examples/grids/create-table.md new file mode 100644 index 0000000000..74227efe98 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-table.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/create-url-column.md b/docs/examples/1.8.x/console-web/examples/grids/create-url-column.md new file mode 100644 index 0000000000..4991da6cd6 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/create-url-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/console-web/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..6e0abb0ac8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/decrement-row-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-column.md b/docs/examples/1.8.x/console-web/examples/grids/delete-column.md new file mode 100644 index 0000000000..8e46121f01 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/delete-column.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-database.md b/docs/examples/1.8.x/console-web/examples/grids/delete-database.md new file mode 100644 index 0000000000..b34b4adfdb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/delete-database.md @@ -0,0 +1,13 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteDatabase( + '<DATABASE_ID>' // databaseId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-index.md b/docs/examples/1.8.x/console-web/examples/grids/delete-index.md new file mode 100644 index 0000000000..9e405de80f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/delete-index.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-row.md b/docs/examples/1.8.x/console-web/examples/grids/delete-row.md new file mode 100644 index 0000000000..cc49130d4f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/delete-row.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-rows.md b/docs/examples/1.8.x/console-web/examples/grids/delete-rows.md new file mode 100644 index 0000000000..fdaa4278fa --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/delete-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/delete-table.md b/docs/examples/1.8.x/console-web/examples/grids/delete-table.md new file mode 100644 index 0000000000..1817122ec3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/delete-table.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.deleteTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-column.md b/docs/examples/1.8.x/console-web/examples/grids/get-column.md new file mode 100644 index 0000000000..116cee2f24 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-column.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-database-usage.md b/docs/examples/1.8.x/console-web/examples/grids/get-database-usage.md new file mode 100644 index 0000000000..f961dc4fdf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-database-usage.md @@ -0,0 +1,14 @@ +import { Client, Grids, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getDatabaseUsage( + '<DATABASE_ID>', // databaseId + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-database.md b/docs/examples/1.8.x/console-web/examples/grids/get-database.md new file mode 100644 index 0000000000..d41e9c2d45 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-database.md @@ -0,0 +1,13 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getDatabase( + '<DATABASE_ID>' // databaseId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-index.md b/docs/examples/1.8.x/console-web/examples/grids/get-index.md new file mode 100644 index 0000000000..34880a8c0e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-index.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-row.md b/docs/examples/1.8.x/console-web/examples/grids/get-row.md new file mode 100644 index 0000000000..29b51f2225 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-row.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-table-usage.md b/docs/examples/1.8.x/console-web/examples/grids/get-table-usage.md new file mode 100644 index 0000000000..5684786fb7 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-table-usage.md @@ -0,0 +1,15 @@ +import { Client, Grids, GridUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getTableUsage( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + GridUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/get-table.md b/docs/examples/1.8.x/console-web/examples/grids/get-table.md new file mode 100644 index 0000000000..b98d321f28 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/get-table.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.getTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/increment-row-column.md b/docs/examples/1.8.x/console-web/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..5177cd6c08 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/increment-row-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-columns.md b/docs/examples/1.8.x/console-web/examples/grids/list-columns.md new file mode 100644 index 0000000000..cd72e91daf --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-columns.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-database-logs.md b/docs/examples/1.8.x/console-web/examples/grids/list-database-logs.md new file mode 100644 index 0000000000..cf20dc6b49 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-database-logs.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listDatabaseLogs( + '<DATABASE_ID>', // databaseId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-database-usage.md b/docs/examples/1.8.x/console-web/examples/grids/list-database-usage.md new file mode 100644 index 0000000000..09faf5f2f5 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-database-usage.md @@ -0,0 +1,13 @@ +import { Client, Grids, DatabaseUsageRange } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listDatabaseUsage( + DatabaseUsageRange.TwentyFourHours // range (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-databases.md b/docs/examples/1.8.x/console-web/examples/grids/list-databases.md new file mode 100644 index 0000000000..871d29ebe8 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-databases.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listDatabases( + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-indexes.md b/docs/examples/1.8.x/console-web/examples/grids/list-indexes.md new file mode 100644 index 0000000000..b8755d0b82 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-indexes.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-row-logs.md b/docs/examples/1.8.x/console-web/examples/grids/list-row-logs.md new file mode 100644 index 0000000000..0fcde33520 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-row-logs.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listRowLogs( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-rows.md b/docs/examples/1.8.x/console-web/examples/grids/list-rows.md new file mode 100644 index 0000000000..4eb3b71407 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-table-logs.md b/docs/examples/1.8.x/console-web/examples/grids/list-table-logs.md new file mode 100644 index 0000000000..e7f756886d --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-table-logs.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listTableLogs( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/list-tables.md b/docs/examples/1.8.x/console-web/examples/grids/list-tables.md new file mode 100644 index 0000000000..9288788dfe --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/list-tables.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.listTables( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..84dd95cd41 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-boolean-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-database.md b/docs/examples/1.8.x/console-web/examples/grids/update-database.md new file mode 100644 index 0000000000..abd6b285fd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-database.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateDatabase( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..81fa471471 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-datetime-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-email-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-email-column.md new file mode 100644 index 0000000000..3a63b0d4d3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-email-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-enum-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..7c6d2e1b03 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-enum-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-float-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-float-column.md new file mode 100644 index 0000000000..6662f4b00f --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-float-column.md @@ -0,0 +1,20 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-integer-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..95c0510a1a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-integer-column.md @@ -0,0 +1,20 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-ip-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..e92db67751 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-ip-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..bdfd71f71c --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-relationship-column.md @@ -0,0 +1,17 @@ +import { Client, Grids, RelationMutate } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-row.md b/docs/examples/1.8.x/console-web/examples/grids/update-row.md new file mode 100644 index 0000000000..a86f5fd58b --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-rows.md b/docs/examples/1.8.x/console-web/examples/grids/update-rows.md new file mode 100644 index 0000000000..939615a5bd --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-rows.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-string-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-string-column.md new file mode 100644 index 0000000000..b0b92f041e --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-string-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-table.md b/docs/examples/1.8.x/console-web/examples/grids/update-table.md new file mode 100644 index 0000000000..8988133beb --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-table.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/update-url-column.md b/docs/examples/1.8.x/console-web/examples/grids/update-url-column.md new file mode 100644 index 0000000000..ecad0043a3 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/update-url-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/upsert-row.md b/docs/examples/1.8.x/console-web/examples/grids/upsert-row.md new file mode 100644 index 0000000000..66764b001a --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/upsert-row.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); + +console.log(result); diff --git a/docs/examples/1.8.x/console-web/examples/grids/upsert-rows.md b/docs/examples/1.8.x/console-web/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..b79a74d7e1 --- /dev/null +++ b/docs/examples/1.8.x/console-web/examples/grids/upsert-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const grids = new Grids(client); + +const result = await grids.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); + +console.log(result); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-document.md b/docs/examples/1.8.x/server-dart/examples/databases/create-document.md index 1c9af5112c..1d58fc586c 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-document.md @@ -2,9 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with Databases databases = Databases(client); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md index f66ef9f1a9..ba0e34950b 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/create-documents.md @@ -2,7 +2,7 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // + .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key Databases databases = Databases(client); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md index f17f6cbbbd..93e306ebce 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/upsert-document.md @@ -2,9 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with Databases databases = Databases(client); @@ -12,4 +11,6 @@ Document result = await databases.upsertDocument( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', documentId: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"], // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md index f60a37935a..cd35014f63 100644 --- a/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-dart/examples/databases/upsert-documents.md @@ -2,7 +2,7 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // + .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key Databases databases = Databases(client); @@ -10,4 +10,5 @@ Databases databases = Databases(client); DocumentList result = await databases.upsertDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', + documents: [], ); diff --git a/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md b/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md index 2ae64bce55..64b28d5f0c 100644 --- a/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-dart/examples/functions/create-execution.md @@ -14,5 +14,5 @@ Execution result = await functions.createExecution( path: '<PATH>', // (optional) method: ExecutionMethod.gET, // (optional) headers: {}, // (optional) - scheduledAt: '', // (optional) + scheduledAt: '<SCHEDULED_AT>', // (optional) ); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..d462336207 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-boolean-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnBoolean result = await grids.createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: false, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-database.md b/docs/examples/1.8.x/server-dart/examples/grids/create-database.md new file mode 100644 index 0000000000..d77e3747c9 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-database.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Database result = await grids.createDatabase( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..88365e0d0f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-datetime-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnDatetime result = await grids.createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md new file mode 100644 index 0000000000..69d6c03d8f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-email-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnEmail result = await grids.createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..a3a1e3ff60 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-enum-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnEnum result = await grids.createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md new file mode 100644 index 0000000000..eba5e98ccc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-float-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnFloat result = await grids.createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-index.md b/docs/examples/1.8.x/server-dart/examples/grids/create-index.md new file mode 100644 index 0000000000..4926b9ec83 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-index.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnIndex result = await grids.createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType.key, + columns: [], + orders: [], // (optional) + lengths: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..d5bfdf3144 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-integer-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnInteger result = await grids.createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + min: 0, // (optional) + max: 0, // (optional) + xdefault: 0, // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..91b83fde8c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-ip-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnIp result = await grids.createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..99f0427a85 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-relationship-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnRelationship result = await grids.createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType.oneToOne, + twoWay: false, // (optional) + key: '', // (optional) + twoWayKey: '', // (optional) + onDelete: RelationMutate.cascade, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-row.md b/docs/examples/1.8.x/server-dart/examples/grids/create-row.md new file mode 100644 index 0000000000..4db0893686 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-row.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Grids grids = Grids(client); + +Row result = await grids.createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/create-rows.md new file mode 100644 index 0000000000..111d061c3e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +RowList result = await grids.createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md new file mode 100644 index 0000000000..74b9cb7fa6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-string-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnString result = await grids.createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + xrequired: false, + xdefault: '<DEFAULT>', // (optional) + array: false, // (optional) + encrypt: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-table.md b/docs/examples/1.8.x/server-dart/examples/grids/create-table.md new file mode 100644 index 0000000000..1bb7afadd3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-table.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Table result = await grids.createTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md new file mode 100644 index 0000000000..cc129fce97 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/create-url-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnUrl result = await grids.createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', // (optional) + array: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..ad0744dbc6 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/decrement-row-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Row result = await grids.decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: 0, // (optional) + min: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-column.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-column.md new file mode 100644 index 0000000000..e326064f4f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/delete-column.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +await grids.deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-database.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-database.md new file mode 100644 index 0000000000..0738454382 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/delete-database.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +await grids.deleteDatabase( + databaseId: '<DATABASE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-index.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-index.md new file mode 100644 index 0000000000..14dbccb979 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/delete-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +await grids.deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-row.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-row.md new file mode 100644 index 0000000000..8a37455490 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/delete-row.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Grids grids = Grids(client); + +await grids.deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md new file mode 100644 index 0000000000..dd2214fc68 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/delete-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +await grids.deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/delete-table.md b/docs/examples/1.8.x/server-dart/examples/grids/delete-table.md new file mode 100644 index 0000000000..af29d31b87 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/delete-table.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +await grids.deleteTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-column.md b/docs/examples/1.8.x/server-dart/examples/grids/get-column.md new file mode 100644 index 0000000000..4040124454 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/get-column.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + + result = await grids.getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-database.md b/docs/examples/1.8.x/server-dart/examples/grids/get-database.md new file mode 100644 index 0000000000..e8a674b1ab --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/get-database.md @@ -0,0 +1,12 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Database result = await grids.getDatabase( + databaseId: '<DATABASE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-index.md b/docs/examples/1.8.x/server-dart/examples/grids/get-index.md new file mode 100644 index 0000000000..6e66a55b37 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/get-index.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnIndex result = await grids.getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-row.md b/docs/examples/1.8.x/server-dart/examples/grids/get-row.md new file mode 100644 index 0000000000..da2a609d32 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/get-row.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Grids grids = Grids(client); + +Row result = await grids.getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/get-table.md b/docs/examples/1.8.x/server-dart/examples/grids/get-table.md new file mode 100644 index 0000000000..d38fca0455 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/get-table.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Table result = await grids.getTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..14c041404c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/increment-row-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Row result = await grids.incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: 0, // (optional) + max: 0, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-columns.md b/docs/examples/1.8.x/server-dart/examples/grids/list-columns.md new file mode 100644 index 0000000000..222b5ba172 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/list-columns.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnList result = await grids.listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-databases.md b/docs/examples/1.8.x/server-dart/examples/grids/list-databases.md new file mode 100644 index 0000000000..14e2c78b63 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/list-databases.md @@ -0,0 +1,13 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +DatabaseList result = await grids.listDatabases( + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md new file mode 100644 index 0000000000..218c3e0ccc --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/list-indexes.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnIndexList result = await grids.listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/list-rows.md new file mode 100644 index 0000000000..49f2a7ef21 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/list-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Grids grids = Grids(client); + +RowList result = await grids.listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/list-tables.md b/docs/examples/1.8.x/server-dart/examples/grids/list-tables.md new file mode 100644 index 0000000000..4f1e08b713 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/list-tables.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +TableList result = await grids.listTables( + databaseId: '<DATABASE_ID>', + queries: [], // (optional) + search: '<SEARCH>', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..e9e5a1fe32 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-boolean-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnBoolean result = await grids.updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: false, + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-database.md b/docs/examples/1.8.x/server-dart/examples/grids/update-database.md new file mode 100644 index 0000000000..d65a80185f --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-database.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Database result = await grids.updateDatabase( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..6eb1bb6cbf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-datetime-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnDatetime result = await grids.updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md new file mode 100644 index 0000000000..0fabb3e6a3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-email-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnEmail result = await grids.updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'email@example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..5aa1613b75 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-enum-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnEnum result = await grids.updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + xrequired: false, + xdefault: '<DEFAULT>', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md new file mode 100644 index 0000000000..0326f3c6f8 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-float-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnFloat result = await grids.updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..3572a064b3 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-integer-column.md @@ -0,0 +1,19 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnInteger result = await grids.updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 0, + min: 0, // (optional) + max: 0, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..a75ff07569 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-ip-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnIp result = await grids.updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..4ecb479124 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-relationship-column.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnRelationship result = await grids.updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate.cascade, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-row.md b/docs/examples/1.8.x/server-dart/examples/grids/update-row.md new file mode 100644 index 0000000000..f11cf400cb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-row.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Grids grids = Grids(client); + +Row result = await grids.updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/update-rows.md new file mode 100644 index 0000000000..6dd4db1d3c --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-rows.md @@ -0,0 +1,15 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +RowList result = await grids.updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: {}, // (optional) + queries: [], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md new file mode 100644 index 0000000000..2bc58912cb --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-string-column.md @@ -0,0 +1,18 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnString result = await grids.updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: '<DEFAULT>', + size: 1, // (optional) + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-table.md b/docs/examples/1.8.x/server-dart/examples/grids/update-table.md new file mode 100644 index 0000000000..c5c497eddf --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-table.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +Table result = await grids.updateTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // (optional) + rowSecurity: false, // (optional) + enabled: false, // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md new file mode 100644 index 0000000000..79359f5436 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/update-url-column.md @@ -0,0 +1,17 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +ColumnUrl result = await grids.updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + xrequired: false, + xdefault: 'https://example.com', + newKey: '', // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md new file mode 100644 index 0000000000..e8a697664e --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/upsert-row.md @@ -0,0 +1,16 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Grids grids = Grids(client); + +Row result = await grids.upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: {}, // (optional) + permissions: ["read("any")"], // (optional) +); diff --git a/docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..b12d6960f0 --- /dev/null +++ b/docs/examples/1.8.x/server-dart/examples/grids/upsert-rows.md @@ -0,0 +1,14 @@ +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Grids grids = Grids(client); + +RowList result = await grids.upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [], +); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-document.md b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md index f18b4f30dc..be8a1bdac9 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-document.md @@ -2,9 +2,8 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with const databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md index fa3fe84731..26c9796cf0 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/create-documents.md @@ -2,7 +2,7 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // + .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md index a8a61ca43c..f05100e3df 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/upsert-document.md @@ -2,14 +2,15 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with const databases = new Databases(client); const response = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) ); diff --git a/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md index bf9e7ded89..0cd804bfb6 100644 --- a/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-deno/examples/databases/upsert-documents.md @@ -2,12 +2,13 @@ import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // + .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new Databases(client); const response = await databases.upsertDocuments( '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId + '<COLLECTION_ID>', // collectionId + [] // documents ); diff --git a/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md b/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md index bec6a17db2..58c6c494b1 100644 --- a/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-deno/examples/functions/create-execution.md @@ -14,5 +14,5 @@ const response = await functions.createExecution( '<PATH>', // path (optional) ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '' // scheduledAt (optional) + '<SCHEDULED_AT>' // scheduledAt (optional) ); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..7097a84ebe --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-database.md b/docs/examples/1.8.x/server-deno/examples/grids/create-database.md new file mode 100644 index 0000000000..3b1a67d75a --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-database.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createDatabase( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..f33479cd2e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-email-column.md new file mode 100644 index 0000000000..eec09fb453 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-email-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..df68204c8b --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-enum-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-float-column.md new file mode 100644 index 0000000000..e7fdc524dc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-float-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-index.md b/docs/examples/1.8.x/server-deno/examples/grids/create-index.md new file mode 100644 index 0000000000..d1442d57be --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-index.md @@ -0,0 +1,18 @@ +import { Client, Grids, IndexType } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + IndexType.Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..0dc377dff2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-integer-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..222e262042 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-ip-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..5cfc17ebbd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-relationship-column.md @@ -0,0 +1,19 @@ +import { Client, Grids, RelationshipType, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-row.md b/docs/examples/1.8.x/server-deno/examples/grids/create-row.md new file mode 100644 index 0000000000..0bf0ec7f09 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-row.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new Grids(client); + +const response = await grids.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/create-rows.md new file mode 100644 index 0000000000..e5d81e6f68 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-rows.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-string-column.md new file mode 100644 index 0000000000..fb73a25faa --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-string-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-table.md b/docs/examples/1.8.x/server-deno/examples/grids/create-table.md new file mode 100644 index 0000000000..832b9c5218 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-table.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-deno/examples/grids/create-url-column.md new file mode 100644 index 0000000000..905d86c6cf --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/create-url-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-deno/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..cd86f6f8f3 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/decrement-row-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-column.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-column.md new file mode 100644 index 0000000000..d299323df6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/delete-column.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-database.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-database.md new file mode 100644 index 0000000000..aad02459e4 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/delete-database.md @@ -0,0 +1,12 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.deleteDatabase( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-index.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-index.md new file mode 100644 index 0000000000..2354fc2485 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/delete-index.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-row.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-row.md new file mode 100644 index 0000000000..b62fd2145f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/delete-row.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new Grids(client); + +const response = await grids.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-rows.md new file mode 100644 index 0000000000..a1c75d7fd2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/delete-rows.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/delete-table.md b/docs/examples/1.8.x/server-deno/examples/grids/delete-table.md new file mode 100644 index 0000000000..b7b09bc1ed --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/delete-table.md @@ -0,0 +1,13 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.deleteTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-column.md b/docs/examples/1.8.x/server-deno/examples/grids/get-column.md new file mode 100644 index 0000000000..cd78228565 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/get-column.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-database.md b/docs/examples/1.8.x/server-deno/examples/grids/get-database.md new file mode 100644 index 0000000000..c1fecfeff7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/get-database.md @@ -0,0 +1,12 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.getDatabase( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-index.md b/docs/examples/1.8.x/server-deno/examples/grids/get-index.md new file mode 100644 index 0000000000..8f3a48aec2 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/get-index.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-row.md b/docs/examples/1.8.x/server-deno/examples/grids/get-row.md new file mode 100644 index 0000000000..257b24b67e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/get-row.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new Grids(client); + +const response = await grids.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/get-table.md b/docs/examples/1.8.x/server-deno/examples/grids/get-table.md new file mode 100644 index 0000000000..5b9c36ab44 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/get-table.md @@ -0,0 +1,13 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.getTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-deno/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..d01174e938 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/increment-row-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-columns.md b/docs/examples/1.8.x/server-deno/examples/grids/list-columns.md new file mode 100644 index 0000000000..3e249e2782 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/list-columns.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-databases.md b/docs/examples/1.8.x/server-deno/examples/grids/list-databases.md new file mode 100644 index 0000000000..40ce554e50 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/list-databases.md @@ -0,0 +1,13 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.listDatabases( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-deno/examples/grids/list-indexes.md new file mode 100644 index 0000000000..e605c67cc6 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/list-indexes.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/list-rows.md new file mode 100644 index 0000000000..2416578d70 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/list-rows.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new Grids(client); + +const response = await grids.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/list-tables.md b/docs/examples/1.8.x/server-deno/examples/grids/list-tables.md new file mode 100644 index 0000000000..f68d5465b5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/list-tables.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.listTables( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..22c0fe97f8 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-boolean-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-database.md b/docs/examples/1.8.x/server-deno/examples/grids/update-database.md new file mode 100644 index 0000000000..0fc883028e --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-database.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateDatabase( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..00cee55b33 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-datetime-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-email-column.md new file mode 100644 index 0000000000..eb263b428f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-email-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..974dcc99cb --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-enum-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-float-column.md new file mode 100644 index 0000000000..c1375b015f --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-float-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..c46dbb1994 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-integer-column.md @@ -0,0 +1,19 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..2013e16429 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-ip-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..5151a5c5bc --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-relationship-column.md @@ -0,0 +1,16 @@ +import { Client, Grids, RelationMutate } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-row.md b/docs/examples/1.8.x/server-deno/examples/grids/update-row.md new file mode 100644 index 0000000000..5e37a9cb90 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-row.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new Grids(client); + +const response = await grids.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/update-rows.md new file mode 100644 index 0000000000..35dc58d22d --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-rows.md @@ -0,0 +1,15 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-string-column.md new file mode 100644 index 0000000000..ff0113baeb --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-string-column.md @@ -0,0 +1,18 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-table.md b/docs/examples/1.8.x/server-deno/examples/grids/update-table.md new file mode 100644 index 0000000000..ce01cd0fc7 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-table.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-deno/examples/grids/update-url-column.md new file mode 100644 index 0000000000..285f88fbfd --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/update-url-column.md @@ -0,0 +1,17 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-deno/examples/grids/upsert-row.md new file mode 100644 index 0000000000..33534265d5 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/upsert-row.md @@ -0,0 +1,16 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new Grids(client); + +const response = await grids.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-deno/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-deno/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..8cd7218f17 --- /dev/null +++ b/docs/examples/1.8.x/server-deno/examples/grids/upsert-rows.md @@ -0,0 +1,14 @@ +import { Client, Grids } from "https://deno.land/x/appwrite/mod.ts"; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new Grids(client); + +const response = await grids.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md index cb4bc62ced..52254e0c25 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-document.md @@ -4,9 +4,8 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetSession("") // The user session to authenticate with - .SetKey("<YOUR_API_KEY>") // Your secret API key - .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md index c46715b25d..dad710f0df 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/create-documents.md @@ -4,7 +4,7 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetAdmin("") // + .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md index c809a497fe..c0876bfa73 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-document.md @@ -4,14 +4,15 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetSession("") // The user session to authenticate with - .SetKey("<YOUR_API_KEY>") // Your secret API key - .SetJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with Databases databases = new Databases(client); Document result = await databases.UpsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>" + documentId: "<DOCUMENT_ID>", + data: [object], + permissions: ["read("any")"] // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md index 48c0aa7044..6c124c16e5 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-dotnet/examples/databases/upsert-documents.md @@ -4,12 +4,13 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .SetAdmin("") // + .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); DocumentList result = await databases.UpsertDocuments( databaseId: "<DATABASE_ID>", - collectionId: "<COLLECTION_ID>" + collectionId: "<COLLECTION_ID>", + documents: new List<object>() ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md b/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md index c8fd5595e9..98d1b2f3ff 100644 --- a/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-dotnet/examples/functions/create-execution.md @@ -17,5 +17,5 @@ Execution result = await functions.CreateExecution( path: "<PATH>", // optional method: ExecutionMethod.GET, // optional headers: [object], // optional - scheduledAt: "" // optional + scheduledAt: "<SCHEDULED_AT>" // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..e173d1189b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-boolean-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnBoolean result = await grids.CreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md new file mode 100644 index 0000000000..7006f00d01 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-database.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Database result = await grids.CreateDatabase( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..b4e730fc6d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-datetime-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnDatetime result = await grids.CreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md new file mode 100644 index 0000000000..bb2cad7dbd --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-email-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnEmail result = await grids.CreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..4ce99366ad --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-enum-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnEnum result = await grids.CreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md new file mode 100644 index 0000000000..3ecd76c367 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-float-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnFloat result = await grids.CreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md new file mode 100644 index 0000000000..854ed47e81 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-index.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnIndex result = await grids.CreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: IndexType.Key, + columns: new List<string>(), + orders: new List<string>(), // optional + lengths: new List<long>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..ef13d5569c --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-integer-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnInteger result = await grids.CreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..bfaa594d49 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-ip-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnIp result = await grids.CreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..614f5d4fec --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-relationship-column.md @@ -0,0 +1,22 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnRelationship result = await grids.CreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: RelationshipType.OneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: RelationMutate.Cascade // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md new file mode 100644 index 0000000000..235c9b5c4e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-row.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +Row result = await grids.CreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md new file mode 100644 index 0000000000..42ee3ef6a2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +RowList result = await grids.CreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: new List<object>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md new file mode 100644 index 0000000000..ca00dcf32e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-string-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnString result = await grids.CreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md new file mode 100644 index 0000000000..50fdfa878e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-table.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Table result = await grids.CreateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md new file mode 100644 index 0000000000..8a4f69bd26 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/create-url-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnUrl result = await grids.CreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..b17e902e45 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/decrement-row-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Row result = await grids.DecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + min: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md new file mode 100644 index 0000000000..24f23546ba --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-column.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +await grids.DeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md new file mode 100644 index 0000000000..38f28a001a --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-database.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +await grids.DeleteDatabase( + databaseId: "<DATABASE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md new file mode 100644 index 0000000000..5a037e2a96 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +await grids.DeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md new file mode 100644 index 0000000000..13972747a8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-row.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +await grids.DeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md new file mode 100644 index 0000000000..4ddd11b6d1 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +await grids.DeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md new file mode 100644 index 0000000000..9741ac2c2e --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/delete-table.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +await grids.DeleteTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md new file mode 100644 index 0000000000..2c6d7a3944 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/get-column.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + + result = await grids.GetColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md new file mode 100644 index 0000000000..5aebe5104d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/get-database.md @@ -0,0 +1,14 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Database result = await grids.GetDatabase( + databaseId: "<DATABASE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md new file mode 100644 index 0000000000..ff99a21ed0 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/get-index.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnIndex result = await grids.GetIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md new file mode 100644 index 0000000000..c75e0e50d5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/get-row.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +Row result = await grids.GetRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md b/docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md new file mode 100644 index 0000000000..7fcecc6170 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/get-table.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Table result = await grids.GetTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..3e6d044905 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/increment-row-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Row result = await grids.IncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + max: 0 // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md new file mode 100644 index 0000000000..e8478c1d23 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/list-columns.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnList result = await grids.ListColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md new file mode 100644 index 0000000000..f37deb8ef2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/list-databases.md @@ -0,0 +1,15 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +DatabaseList result = await grids.ListDatabases( + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md new file mode 100644 index 0000000000..b6f3737b43 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/list-indexes.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnIndexList result = await grids.ListIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md new file mode 100644 index 0000000000..a1a64fe256 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/list-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +RowList result = await grids.ListRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md b/docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md new file mode 100644 index 0000000000..85f431b7ef --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/list-tables.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +TableList result = await grids.ListTables( + databaseId: "<DATABASE_ID>", + queries: new List<string>(), // optional + search: "<SEARCH>" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..ff2376e403 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-boolean-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnBoolean result = await grids.UpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md new file mode 100644 index 0000000000..cd3b0a236d --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-database.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Database result = await grids.UpdateDatabase( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..7b630922e8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-datetime-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnDatetime result = await grids.UpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md new file mode 100644 index 0000000000..9ce04025ca --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-email-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnEmail result = await grids.UpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..b29b3615de --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-enum-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnEnum result = await grids.UpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: new List<string>(), + required: false, + default: "<DEFAULT>", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md new file mode 100644 index 0000000000..96db20a2c5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-float-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnFloat result = await grids.UpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..87e6b0fee2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-integer-column.md @@ -0,0 +1,21 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnInteger result = await grids.UpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..789c6c98e6 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-ip-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnIp result = await grids.UpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..a1d30a43a2 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-relationship-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnRelationship result = await grids.UpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: RelationMutate.Cascade, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md new file mode 100644 index 0000000000..2dc2b23d32 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-row.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +Row result = await grids.UpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md new file mode 100644 index 0000000000..c0103c9639 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-rows.md @@ -0,0 +1,17 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +RowList result = await grids.UpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [object], // optional + queries: new List<string>() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md new file mode 100644 index 0000000000..2277142eb8 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-string-column.md @@ -0,0 +1,20 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnString result = await grids.UpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md new file mode 100644 index 0000000000..76362573a5 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-table.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +Table result = await grids.UpdateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md new file mode 100644 index 0000000000..8054b60e3f --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/update-url-column.md @@ -0,0 +1,19 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +ColumnUrl result = await grids.UpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md new file mode 100644 index 0000000000..7f517a2f09 --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-row.md @@ -0,0 +1,18 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +Row result = await grids.UpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [object], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..1cb3b54d0b --- /dev/null +++ b/docs/examples/1.8.x/server-dotnet/examples/grids/upsert-rows.md @@ -0,0 +1,16 @@ +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +RowList result = await grids.UpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: new List<object>() +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-document.md b/docs/examples/1.8.x/server-go/examples/databases/create-document.md index 8990beaa8d..fe96a0d601 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-document.md @@ -9,9 +9,8 @@ import ( func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID client.WithSession("") // The user session to authenticate with - client.WithKey("<YOUR_API_KEY>") // Your secret API key - client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token ) service := databases.New(client) diff --git a/docs/examples/1.8.x/server-go/examples/databases/create-documents.md b/docs/examples/1.8.x/server-go/examples/databases/create-documents.md index d85d0d5395..9e4da5dac7 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-go/examples/databases/create-documents.md @@ -9,7 +9,7 @@ import ( func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithAdmin("") // + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID client.WithKey("<YOUR_API_KEY>") // Your secret API key ) diff --git a/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md index c5304b1860..e6241b9198 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-go/examples/databases/upsert-document.md @@ -9,9 +9,8 @@ import ( func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID client.WithSession("") // The user session to authenticate with - client.WithKey("<YOUR_API_KEY>") // Your secret API key - client.WithJWT("<YOUR_JWT>") // Your secret JSON Web Token ) service := databases.New(client) @@ -19,6 +18,8 @@ func main() { "<DATABASE_ID>", "<COLLECTION_ID>", "<DOCUMENT_ID>", + map[string]interface{}{}, + databases.WithUpsertDocumentPermissions(interface{}{"read("any")"}), ) if error != nil { diff --git a/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md index 5fe0fc5831..d2731cd128 100644 --- a/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-go/examples/databases/upsert-documents.md @@ -9,7 +9,7 @@ import ( func main() { client := client.New( client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - client.WithAdmin("") // + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID client.WithKey("<YOUR_API_KEY>") // Your secret API key ) @@ -17,6 +17,7 @@ func main() { response, error := service.UpsertDocuments( "<DATABASE_ID>", "<COLLECTION_ID>", + []interface{}{}, ) if error != nil { diff --git a/docs/examples/1.8.x/server-go/examples/functions/create-execution.md b/docs/examples/1.8.x/server-go/examples/functions/create-execution.md index 33657d2503..bc839e422e 100644 --- a/docs/examples/1.8.x/server-go/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-go/examples/functions/create-execution.md @@ -21,7 +21,7 @@ func main() { functions.WithCreateExecutionPath("<PATH>"), functions.WithCreateExecutionMethod("GET"), functions.WithCreateExecutionHeaders(map[string]interface{}{}), - functions.WithCreateExecutionScheduledAt(""), + functions.WithCreateExecutionScheduledAt("<SCHEDULED_AT>"), ) if error != nil { diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..11d8b0ca50 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-boolean-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateBooleanColumnDefault(false), + grids.WithCreateBooleanColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-database.md b/docs/examples/1.8.x/server-go/examples/grids/create-database.md new file mode 100644 index 0000000000..d66dea2c03 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-database.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateDatabase( + "<DATABASE_ID>", + "<NAME>", + grids.WithCreateDatabaseEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..e386f763ff --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-datetime-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateDatetimeColumnDefault(""), + grids.WithCreateDatetimeColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-email-column.md new file mode 100644 index 0000000000..9ecdf5cadf --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-email-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateEmailColumnDefault("email@example.com"), + grids.WithCreateEmailColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..35a2ed3f0f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-enum-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + grids.WithCreateEnumColumnDefault("<DEFAULT>"), + grids.WithCreateEnumColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-float-column.md new file mode 100644 index 0000000000..765eb58f24 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-float-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateFloatColumnMin(0), + grids.WithCreateFloatColumnMax(0), + grids.WithCreateFloatColumnDefault(0), + grids.WithCreateFloatColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-index.md b/docs/examples/1.8.x/server-go/examples/grids/create-index.md new file mode 100644 index 0000000000..ad39cc5c83 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-index.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + "key", + []interface{}{}, + grids.WithCreateIndexOrders([]interface{}{}), + grids.WithCreateIndexLengths([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..3b67883650 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-integer-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateIntegerColumnMin(0), + grids.WithCreateIntegerColumnMax(0), + grids.WithCreateIntegerColumnDefault(0), + grids.WithCreateIntegerColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..8954c91144 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-ip-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateIpColumnDefault(""), + grids.WithCreateIpColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..2ce5bd2acd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-relationship-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<RELATED_TABLE_ID>", + "oneToOne", + grids.WithCreateRelationshipColumnTwoWay(false), + grids.WithCreateRelationshipColumnKey(""), + grids.WithCreateRelationshipColumnTwoWayKey(""), + grids.WithCreateRelationshipColumnOnDelete("cascade"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-row.md b/docs/examples/1.8.x/server-go/examples/grids/create-row.md new file mode 100644 index 0000000000..b2e8aac2a2 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-row.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := grids.New(client) + response, error := service.CreateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + map[string]interface{}{}, + grids.WithCreateRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-rows.md b/docs/examples/1.8.x/server-go/examples/grids/create-rows.md new file mode 100644 index 0000000000..95442b0231 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-string-column.md new file mode 100644 index 0000000000..0033ea1af6 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-string-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + 1, + false, + grids.WithCreateStringColumnDefault("<DEFAULT>"), + grids.WithCreateStringColumnArray(false), + grids.WithCreateStringColumnEncrypt(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-table.md b/docs/examples/1.8.x/server-go/examples/grids/create-table.md new file mode 100644 index 0000000000..adc367db5c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-table.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateTable( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + grids.WithCreateTablePermissions(interface{}{"read("any")"}), + grids.WithCreateTableRowSecurity(false), + grids.WithCreateTableEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-go/examples/grids/create-url-column.md new file mode 100644 index 0000000000..3e93fe1838 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/create-url-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.CreateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + grids.WithCreateUrlColumnDefault("https://example.com"), + grids.WithCreateUrlColumnArray(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-go/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..cb36ada619 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/decrement-row-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.DecrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + grids.WithDecrementRowColumnValue(0), + grids.WithDecrementRowColumnMin(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-column.md b/docs/examples/1.8.x/server-go/examples/grids/delete-column.md new file mode 100644 index 0000000000..6b73e86c05 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/delete-column.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.DeleteColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-database.md b/docs/examples/1.8.x/server-go/examples/grids/delete-database.md new file mode 100644 index 0000000000..4d74f859fc --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/delete-database.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.DeleteDatabase( + "<DATABASE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-index.md b/docs/examples/1.8.x/server-go/examples/grids/delete-index.md new file mode 100644 index 0000000000..c34a2752ac --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/delete-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.DeleteIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-row.md b/docs/examples/1.8.x/server-go/examples/grids/delete-row.md new file mode 100644 index 0000000000..cb072c49bd --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/delete-row.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := grids.New(client) + response, error := service.DeleteRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-go/examples/grids/delete-rows.md new file mode 100644 index 0000000000..0ce880f996 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/delete-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.DeleteRows( + "<DATABASE_ID>", + "<TABLE_ID>", + grids.WithDeleteRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/delete-table.md b/docs/examples/1.8.x/server-go/examples/grids/delete-table.md new file mode 100644 index 0000000000..66e031a5ce --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/delete-table.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.DeleteTable( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-column.md b/docs/examples/1.8.x/server-go/examples/grids/get-column.md new file mode 100644 index 0000000000..bff6153550 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/get-column.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.GetColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-database.md b/docs/examples/1.8.x/server-go/examples/grids/get-database.md new file mode 100644 index 0000000000..4f80bf5590 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/get-database.md @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.GetDatabase( + "<DATABASE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-index.md b/docs/examples/1.8.x/server-go/examples/grids/get-index.md new file mode 100644 index 0000000000..5982b49b2e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/get-index.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.GetIndex( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-row.md b/docs/examples/1.8.x/server-go/examples/grids/get-row.md new file mode 100644 index 0000000000..1551d4969b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/get-row.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := grids.New(client) + response, error := service.GetRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + grids.WithGetRowQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/get-table.md b/docs/examples/1.8.x/server-go/examples/grids/get-table.md new file mode 100644 index 0000000000..1f96e8526d --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/get-table.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.GetTable( + "<DATABASE_ID>", + "<TABLE_ID>", + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-go/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..52f5858884 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/increment-row-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.IncrementRowColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + "", + grids.WithIncrementRowColumnValue(0), + grids.WithIncrementRowColumnMax(0), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-columns.md b/docs/examples/1.8.x/server-go/examples/grids/list-columns.md new file mode 100644 index 0000000000..ae411a216c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/list-columns.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.ListColumns( + "<DATABASE_ID>", + "<TABLE_ID>", + grids.WithListColumnsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-databases.md b/docs/examples/1.8.x/server-go/examples/grids/list-databases.md new file mode 100644 index 0000000000..e43bd7d100 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/list-databases.md @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.ListDatabases( + grids.WithListDatabasesQueries([]interface{}{}), + grids.WithListDatabasesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-go/examples/grids/list-indexes.md new file mode 100644 index 0000000000..092c75301a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/list-indexes.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.ListIndexes( + "<DATABASE_ID>", + "<TABLE_ID>", + grids.WithListIndexesQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-rows.md b/docs/examples/1.8.x/server-go/examples/grids/list-rows.md new file mode 100644 index 0000000000..b406f106bb --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/list-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := grids.New(client) + response, error := service.ListRows( + "<DATABASE_ID>", + "<TABLE_ID>", + grids.WithListRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/list-tables.md b/docs/examples/1.8.x/server-go/examples/grids/list-tables.md new file mode 100644 index 0000000000..f38879c65b --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/list-tables.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.ListTables( + "<DATABASE_ID>", + grids.WithListTablesQueries([]interface{}{}), + grids.WithListTablesSearch("<SEARCH>"), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..5ffc910caf --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-boolean-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateBooleanColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + false, + grids.WithUpdateBooleanColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-database.md b/docs/examples/1.8.x/server-go/examples/grids/update-database.md new file mode 100644 index 0000000000..9f9c95546a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-database.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateDatabase( + "<DATABASE_ID>", + "<NAME>", + grids.WithUpdateDatabaseEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..5bf6440a74 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-datetime-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateDatetimeColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + grids.WithUpdateDatetimeColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-email-column.md new file mode 100644 index 0000000000..8ebbdcabc4 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-email-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateEmailColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "email@example.com", + grids.WithUpdateEmailColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..edec1cbcc0 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-enum-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateEnumColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + []interface{}{}, + false, + "<DEFAULT>", + grids.WithUpdateEnumColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-float-column.md new file mode 100644 index 0000000000..80057dab06 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-float-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateFloatColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + grids.WithUpdateFloatColumnMin(0), + grids.WithUpdateFloatColumnMax(0), + grids.WithUpdateFloatColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..a3b9bd316c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-integer-column.md @@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateIntegerColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + 0, + grids.WithUpdateIntegerColumnMin(0), + grids.WithUpdateIntegerColumnMax(0), + grids.WithUpdateIntegerColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..888c69e9ee --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-ip-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateIpColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "", + grids.WithUpdateIpColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..db57f41995 --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-relationship-column.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateRelationshipColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + grids.WithUpdateRelationshipColumnOnDelete("cascade"), + grids.WithUpdateRelationshipColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-row.md b/docs/examples/1.8.x/server-go/examples/grids/update-row.md new file mode 100644 index 0000000000..e1a99f289f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-row.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := grids.New(client) + response, error := service.UpdateRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + grids.WithUpdateRowData(map[string]interface{}{}), + grids.WithUpdateRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-rows.md b/docs/examples/1.8.x/server-go/examples/grids/update-rows.md new file mode 100644 index 0000000000..f2b0c0c6de --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-rows.md @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateRows( + "<DATABASE_ID>", + "<TABLE_ID>", + grids.WithUpdateRowsData(map[string]interface{}{}), + grids.WithUpdateRowsQueries([]interface{}{}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-string-column.md new file mode 100644 index 0000000000..a50fcb704c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-string-column.md @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateStringColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "<DEFAULT>", + grids.WithUpdateStringColumnSize(1), + grids.WithUpdateStringColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-table.md b/docs/examples/1.8.x/server-go/examples/grids/update-table.md new file mode 100644 index 0000000000..cf1bef575f --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-table.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateTable( + "<DATABASE_ID>", + "<TABLE_ID>", + "<NAME>", + grids.WithUpdateTablePermissions(interface{}{"read("any")"}), + grids.WithUpdateTableRowSecurity(false), + grids.WithUpdateTableEnabled(false), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-go/examples/grids/update-url-column.md new file mode 100644 index 0000000000..0c28025e5c --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/update-url-column.md @@ -0,0 +1,31 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpdateUrlColumn( + "<DATABASE_ID>", + "<TABLE_ID>", + "", + false, + "https://example.com", + grids.WithUpdateUrlColumnNewKey(""), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-go/examples/grids/upsert-row.md new file mode 100644 index 0000000000..bc104a159a --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/upsert-row.md @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithSession("") // The user session to authenticate with + ) + + service := grids.New(client) + response, error := service.UpsertRow( + "<DATABASE_ID>", + "<TABLE_ID>", + "<ROW_ID>", + grids.WithUpsertRowData(map[string]interface{}{}), + grids.WithUpsertRowPermissions(interface{}{"read("any")"}), + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-go/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-go/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..6282f9da2e --- /dev/null +++ b/docs/examples/1.8.x/server-go/examples/grids/upsert-rows.md @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/grids" +) + +func main() { + client := client.New( + client.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + client.WithProject("<YOUR_PROJECT_ID>") // Your project ID + client.WithKey("<YOUR_API_KEY>") // Your secret API key + ) + + service := grids.New(client) + response, error := service.UpsertRows( + "<DATABASE_ID>", + "<TABLE_ID>", + []interface{}{}, + ) + + if error != nil { + panic(error) + } + + fmt.Println(response) +} diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md index 00dfba1e7b..7ee68b41c7 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-collection.md @@ -17,6 +17,9 @@ mutation { documentSecurity attributes indexes { + _id + _createdAt + _updatedAt key type status @@ -24,8 +27,6 @@ mutation { attributes lengths orders - _createdAt - _updatedAt } } } diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md b/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md index c647930943..38e64980b2 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/create-index.md @@ -8,6 +8,9 @@ mutation { orders: [], lengths: [] ) { + _id + _createdAt + _updatedAt key type status @@ -15,7 +18,5 @@ mutation { attributes lengths orders - _createdAt - _updatedAt } } diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md b/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md index 040578ae9d..ad43b879d2 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/update-collection.md @@ -17,6 +17,9 @@ mutation { documentSecurity attributes indexes { + _id + _createdAt + _updatedAt key type status @@ -24,8 +27,6 @@ mutation { attributes lengths orders - _createdAt - _updatedAt } } } diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md index c381fe35a3..9d1e753081 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-document.md @@ -2,7 +2,9 @@ mutation { databasesUpsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>" + documentId: "<DOCUMENT_ID>", + data: "{}", + permissions: ["read("any")"] ) { _id _sequence diff --git a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md index b4bf914eca..2bfb765915 100644 --- a/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-graphql/examples/databases/upsert-documents.md @@ -1,7 +1,8 @@ mutation { databasesUpsertDocuments( databaseId: "<DATABASE_ID>", - collectionId: "<COLLECTION_ID>" + collectionId: "<COLLECTION_ID>", + documents: [] ) { total documents { diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md index 0e7cc7d19a..3751448e57 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> Content-Length: *Length of your entity body in bytes* diff --git a/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md b/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md index 1479aa3bb6..8979880723 100644 --- a/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-graphql/examples/functions/create-execution.md @@ -6,7 +6,7 @@ mutation { path: "<PATH>", method: "GET", headers: "{}", - scheduledAt: "" + scheduledAt: "<SCHEDULED_AT>" ) { _id _createdAt diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..bd7abcb175 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-boolean-column.md @@ -0,0 +1,20 @@ +mutation { + gridsCreateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-database.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-database.md new file mode 100644 index 0000000000..41d37ebdee --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-database.md @@ -0,0 +1,13 @@ +mutation { + gridsCreateDatabase( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..aa14c43156 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-datetime-column.md @@ -0,0 +1,21 @@ +mutation { + gridsCreateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md new file mode 100644 index 0000000000..c9bc913726 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-email-column.md @@ -0,0 +1,21 @@ +mutation { + gridsCreateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..8ace10f9ac --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-enum-column.md @@ -0,0 +1,23 @@ +mutation { + gridsCreateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md new file mode 100644 index 0000000000..92031d03ca --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-float-column.md @@ -0,0 +1,24 @@ +mutation { + gridsCreateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-index.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-index.md new file mode 100644 index 0000000000..cc338ddad2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-index.md @@ -0,0 +1,22 @@ +mutation { + gridsCreateIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: "key", + columns: [], + orders: [], + lengths: [] + ) { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..735d47c8ac --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-integer-column.md @@ -0,0 +1,24 @@ +mutation { + gridsCreateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, + max: 0, + default: 0, + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..241d308f09 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-ip-column.md @@ -0,0 +1,21 @@ +mutation { + gridsCreateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..2c08478e09 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-relationship-column.md @@ -0,0 +1,27 @@ +mutation { + gridsCreateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: "oneToOne", + twoWay: false, + key: "", + twoWayKey: "", + onDelete: "cascade" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-row.md new file mode 100644 index 0000000000..cffb7361f2 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-row.md @@ -0,0 +1,18 @@ +mutation { + gridsCreateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md new file mode 100644 index 0000000000..cd134ec201 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-rows.md @@ -0,0 +1,19 @@ +mutation { + gridsCreateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md new file mode 100644 index 0000000000..57b42c6010 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-string-column.md @@ -0,0 +1,24 @@ +mutation { + gridsCreateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", + array: false, + encrypt: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-table.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-table.md new file mode 100644 index 0000000000..77335ad867 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-table.md @@ -0,0 +1,32 @@ +mutation { + gridsCreateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], + rowSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md new file mode 100644 index 0000000000..07ca9ab869 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/create-url-column.md @@ -0,0 +1,21 @@ +mutation { + gridsCreateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + array: false + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..6b47884a92 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/decrement-row-column.md @@ -0,0 +1,19 @@ +mutation { + gridsDecrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, + min: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md new file mode 100644 index 0000000000..0ad25321b5 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/delete-column.md @@ -0,0 +1,9 @@ +mutation { + gridsDeleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md new file mode 100644 index 0000000000..a3e3d1a5bf --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/delete-database.md @@ -0,0 +1,7 @@ +mutation { + gridsDeleteDatabase( + databaseId: "<DATABASE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md new file mode 100644 index 0000000000..0921aa0aef --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/delete-index.md @@ -0,0 +1,9 @@ +mutation { + gridsDeleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md new file mode 100644 index 0000000000..40dcbdc219 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/delete-row.md @@ -0,0 +1,9 @@ +mutation { + gridsDeleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md new file mode 100644 index 0000000000..69559934a4 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/delete-rows.md @@ -0,0 +1,19 @@ +mutation { + gridsDeleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md b/docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md new file mode 100644 index 0000000000..a145be50d9 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/delete-table.md @@ -0,0 +1,8 @@ +mutation { + gridsDeleteTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" + ) { + status + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-column.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-database.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-database.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-index.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-index.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-row.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/get-table.md b/docs/examples/1.8.x/server-graphql/examples/grids/get-table.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..709e6b2f0d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/increment-row-column.md @@ -0,0 +1,19 @@ +mutation { + gridsIncrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, + max: 0 + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-columns.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-columns.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-databases.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-databases.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-indexes.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-rows.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/list-tables.md b/docs/examples/1.8.x/server-graphql/examples/grids/list-tables.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..67c8495471 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-boolean-column.md @@ -0,0 +1,20 @@ +mutation { + gridsUpdateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-database.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-database.md new file mode 100644 index 0000000000..02c045b9cd --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-database.md @@ -0,0 +1,13 @@ +mutation { + gridsUpdateDatabase( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..5e19393c67 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-datetime-column.md @@ -0,0 +1,21 @@ +mutation { + gridsUpdateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md new file mode 100644 index 0000000000..caa6153896 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-email-column.md @@ -0,0 +1,21 @@ +mutation { + gridsUpdateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..c3d90f4e23 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-enum-column.md @@ -0,0 +1,23 @@ +mutation { + gridsUpdateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + elements + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md new file mode 100644 index 0000000000..a6b700ce73 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-float-column.md @@ -0,0 +1,24 @@ +mutation { + gridsUpdateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..fcc53102d1 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-integer-column.md @@ -0,0 +1,24 @@ +mutation { + gridsUpdateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, + max: 0, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + min + max + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..f867063151 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-ip-column.md @@ -0,0 +1,21 @@ +mutation { + gridsUpdateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..e24311b53a --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-relationship-column.md @@ -0,0 +1,24 @@ +mutation { + gridsUpdateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: "cascade", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + relatedTable + relationType + twoWay + twoWayKey + onDelete + side + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-row.md new file mode 100644 index 0000000000..2bb105e8c0 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-row.md @@ -0,0 +1,18 @@ +mutation { + gridsUpdateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md new file mode 100644 index 0000000000..99df9b0b99 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-rows.md @@ -0,0 +1,20 @@ +mutation { + gridsUpdateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: "{}", + queries: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md new file mode 100644 index 0000000000..c98f49a807 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-string-column.md @@ -0,0 +1,23 @@ +mutation { + gridsUpdateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + size + default + encrypt + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-table.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-table.md new file mode 100644 index 0000000000..cea6d5cfff --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-table.md @@ -0,0 +1,32 @@ +mutation { + gridsUpdateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], + rowSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + rowSecurity + columns + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + columns + lengths + orders + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md new file mode 100644 index 0000000000..c64d93882d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/update-url-column.md @@ -0,0 +1,21 @@ +mutation { + gridsUpdateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" + ) { + key + type + status + error + required + array + _createdAt + _updatedAt + format + default + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md new file mode 100644 index 0000000000..f8e0606109 --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/upsert-row.md @@ -0,0 +1,18 @@ +mutation { + gridsUpsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: "{}", + permissions: ["read("any")"] + ) { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..d456e9883d --- /dev/null +++ b/docs/examples/1.8.x/server-graphql/examples/grids/upsert-rows.md @@ -0,0 +1,19 @@ +mutation { + gridsUpsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] + ) { + total + rows { + _id + _sequence + _tableId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} diff --git a/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md index 8f77dd60eb..26970a18a8 100644 --- a/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md +++ b/docs/examples/1.8.x/server-graphql/examples/sites/create-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> Content-Length: *Length of your entity body in bytes* diff --git a/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md b/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md index 5b4f9a0c22..70bf6cbb1f 100644 --- a/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-graphql/examples/storage/create-file.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md index 368b816219..5231be33d6 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-document.md @@ -4,9 +4,8 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md index 77d79812a9..0de0c276ed 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/create-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md index b1b4de4db4..daa44141e2 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-document.md @@ -4,9 +4,8 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>"); // Your secret JSON Web Token + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with Databases databases = new Databases(client); @@ -14,6 +13,8 @@ databases.upsertDocument( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md index 0bf0c1778c..95e9a33ef2 100644 --- a/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-kotlin/java/databases/upsert-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>"); // Your secret API key Databases databases = new Databases(client); @@ -12,6 +12,7 @@ Databases databases = new Databases(client); databases.upsertDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId + listOf(), // documents new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md b/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md index 82d48fa55b..93efa0adf8 100644 --- a/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md +++ b/docs/examples/1.8.x/server-kotlin/java/functions/create-execution.md @@ -16,7 +16,7 @@ functions.createExecution( "<PATH>", // path (optional) ExecutionMethod.GET, // method (optional) mapOf( "a" to "b" ), // headers (optional) - "", // scheduledAt (optional) + "<SCHEDULED_AT>", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md new file mode 100644 index 0000000000..2981fc8cf4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-database.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-database.md new file mode 100644 index 0000000000..4c6155962e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-database.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createDatabase( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md new file mode 100644 index 0000000000..7389ea9a94 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md new file mode 100644 index 0000000000..be481047e1 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md new file mode 100644 index 0000000000..33c6b63e27 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md new file mode 100644 index 0000000000..d66f1b5c60 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-index.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-index.md new file mode 100644 index 0000000000..670310bb66 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-index.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; +import io.appwrite.enums.IndexType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + IndexType.KEY, // type + listOf(), // columns + listOf(), // orders (optional) + listOf(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md new file mode 100644 index 0000000000..342654ef1a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // min (optional) + 0, // max (optional) + 0, // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md new file mode 100644 index 0000000000..d72e7dd59d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md new file mode 100644 index 0000000000..2d1c5fb22a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-relationship-column.md @@ -0,0 +1,31 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; +import io.appwrite.enums.RelationshipType; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<RELATED_TABLE_ID>", // relatedTableId + RelationshipType.ONETOONE, // type + false, // twoWay (optional) + "", // key (optional) + "", // twoWayKey (optional) + RelationMutate.CASCADE, // onDelete (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-row.md new file mode 100644 index 0000000000..6b954814c0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +grids.createRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md new file mode 100644 index 0000000000..a55855d8f5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md new file mode 100644 index 0000000000..b819afb4b4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-string-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + 1, // size + false, // required + "<DEFAULT>", // default (optional) + false, // array (optional) + false, // encrypt (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-table.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-table.md new file mode 100644 index 0000000000..aa98b81de6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-table.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md new file mode 100644 index 0000000000..d8761440b3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/create-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.createUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default (optional) + false, // array (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md new file mode 100644 index 0000000000..407ea83f81 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/decrement-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.decrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // min (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md new file mode 100644 index 0000000000..cc3c40fba7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/delete-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.deleteColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md new file mode 100644 index 0000000000..fca41e75ea --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/delete-database.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.deleteDatabase( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md new file mode 100644 index 0000000000..43449e908f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/delete-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.deleteIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md new file mode 100644 index 0000000000..cb812bac12 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/delete-row.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +grids.deleteRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md new file mode 100644 index 0000000000..2425af9e8c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/delete-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.deleteRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md b/docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md new file mode 100644 index 0000000000..dbbb4781ba --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/delete-table.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.deleteTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-column.md new file mode 100644 index 0000000000..1d630f17d7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/get-column.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.getColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-database.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-database.md new file mode 100644 index 0000000000..bc7eea4dbb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/get-database.md @@ -0,0 +1,23 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.getDatabase( + "<DATABASE_ID>", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-index.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-index.md new file mode 100644 index 0000000000..14163c34a9 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/get-index.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.getIndex( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-row.md new file mode 100644 index 0000000000..e9d89c92b8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/get-row.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +grids.getRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/get-table.md b/docs/examples/1.8.x/server-kotlin/java/grids/get-table.md new file mode 100644 index 0000000000..39d090219b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/get-table.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.getTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md new file mode 100644 index 0000000000..aaccf0a1a3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/increment-row-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.incrementRowColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + "", // column + 0, // value (optional) + 0, // max (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md new file mode 100644 index 0000000000..f95ca925a6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/list-columns.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.listColumns( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md new file mode 100644 index 0000000000..97f7263dd4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/list-databases.md @@ -0,0 +1,24 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.listDatabases( + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md new file mode 100644 index 0000000000..aa5b11a8c2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/list-indexes.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.listIndexes( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md new file mode 100644 index 0000000000..ccf3d74a25 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/list-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +grids.listRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md b/docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md new file mode 100644 index 0000000000..0a60dbeebe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/list-tables.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.listTables( + "<DATABASE_ID>", // databaseId + listOf(), // queries (optional) + "<SEARCH>", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md new file mode 100644 index 0000000000..e3d6b71b70 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-boolean-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateBooleanColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + false, // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-database.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-database.md new file mode 100644 index 0000000000..da9bd7d04b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-database.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateDatabase( + "<DATABASE_ID>", // databaseId + "<NAME>", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md new file mode 100644 index 0000000000..ede33229ad --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-datetime-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateDatetimeColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md new file mode 100644 index 0000000000..48803eb4f4 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-email-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateEmailColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "email@example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md new file mode 100644 index 0000000000..63dc238d2e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-enum-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateEnumColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + listOf(), // elements + false, // required + "<DEFAULT>", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md new file mode 100644 index 0000000000..9833f5ec8b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-float-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateFloatColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md new file mode 100644 index 0000000000..059b1328d5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-integer-column.md @@ -0,0 +1,30 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateIntegerColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + 0, // default + 0, // min (optional) + 0, // max (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md new file mode 100644 index 0000000000..8e31214981 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-ip-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateIpColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md new file mode 100644 index 0000000000..b90b21b164 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-relationship-column.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateRelationshipColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + RelationMutate.CASCADE, // onDelete (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-row.md new file mode 100644 index 0000000000..5f95afb5f5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +grids.updateRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md new file mode 100644 index 0000000000..67c9a1be89 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-rows.md @@ -0,0 +1,26 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + mapOf( "a" to "b" ), // data (optional) + listOf(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md new file mode 100644 index 0000000000..13e266abc0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-string-column.md @@ -0,0 +1,29 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateStringColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "<DEFAULT>", // default + 1, // size (optional) + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-table.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-table.md new file mode 100644 index 0000000000..24dfc05e49 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-table.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateTable( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<NAME>", // name + listOf("read("any")"), // permissions (optional) + false, // rowSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md b/docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md new file mode 100644 index 0000000000..5217121225 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/update-url-column.md @@ -0,0 +1,28 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.updateUrlColumn( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "", // key + false, // required + "https://example.com", // default + "", // newKey (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md b/docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md new file mode 100644 index 0000000000..8f1b8670df --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/upsert-row.md @@ -0,0 +1,27 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Grids grids = new Grids(client); + +grids.upsertRow( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + "<ROW_ID>", // rowId + mapOf( "a" to "b" ), // data (optional) + listOf("read("any")"), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md new file mode 100644 index 0000000000..2081f0f19f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/java/grids/upsert-rows.md @@ -0,0 +1,25 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Grids; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Grids grids = new Grids(client); + +grids.upsertRows( + "<DATABASE_ID>", // databaseId + "<TABLE_ID>", // tableId + listOf(), // rows + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md index 93da01eefa..695fdbdfaa 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-document.md @@ -4,9 +4,8 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token val databases = Databases(client) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md index ddce31c71c..41a98dc016 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/create-documents.md @@ -4,7 +4,7 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key val databases = Databases(client) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md index df261dbcb6..d8be0e13db 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-document.md @@ -4,14 +4,15 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token val databases = Databases(client) val response = databases.upsertDocument( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - documentId = "<DOCUMENT_ID>" + documentId = "<DOCUMENT_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md index 1cb376f107..ca861c61b2 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/databases/upsert-documents.md @@ -4,12 +4,13 @@ import io.appwrite.services.Databases val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key val databases = Databases(client) val response = databases.upsertDocuments( databaseId = "<DATABASE_ID>", - collectionId = "<COLLECTION_ID>" + collectionId = "<COLLECTION_ID>", + documents = listOf() ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md index 94bfa2310c..2734412232 100644 --- a/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md +++ b/docs/examples/1.8.x/server-kotlin/kotlin/functions/create-execution.md @@ -16,5 +16,5 @@ val response = functions.createExecution( path = "<PATH>", // optional method = "GET", // optional headers = mapOf( "a" to "b" ), // optional - scheduledAt = "" // optional + scheduledAt = "<SCHEDULED_AT>" // optional ) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md new file mode 100644 index 0000000000..5966655e1e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md new file mode 100644 index 0000000000..bc9999ff18 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-database.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createDatabase( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md new file mode 100644 index 0000000000..f3b11b5018 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md new file mode 100644 index 0000000000..a70dd3ac45 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md new file mode 100644 index 0000000000..3858155479 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md new file mode 100644 index 0000000000..d7b4c0155d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md new file mode 100644 index 0000000000..df16a35cc2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-index.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids +import io.appwrite.enums.IndexType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + type = IndexType.KEY, + columns = listOf(), + orders = listOf(), // optional + lengths = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md new file mode 100644 index 0000000000..db8bde2d72 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + min = 0, // optional + max = 0, // optional + default = 0, // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md new file mode 100644 index 0000000000..f3ab36bd0c --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md new file mode 100644 index 0000000000..9ba4cafbb7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-relationship-column.md @@ -0,0 +1,22 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids +import io.appwrite.enums.RelationshipType + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + relatedTableId = "<RELATED_TABLE_ID>", + type = RelationshipType.ONETOONE, + twoWay = false, // optional + key = "", // optional + twoWayKey = "", // optional + onDelete = "cascade" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md new file mode 100644 index 0000000000..0c3d2531c5 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val grids = Grids(client) + +val response = grids.createRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md new file mode 100644 index 0000000000..9c7da7c93b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf() +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md new file mode 100644 index 0000000000..f6793c817b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-string-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + size = 1, + required = false, + default = "<DEFAULT>", // optional + array = false, // optional + encrypt = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md new file mode 100644 index 0000000000..55de471725 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-table.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md new file mode 100644 index 0000000000..33311e29ca --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/create-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.createUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", // optional + array = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md new file mode 100644 index 0000000000..9a450f66f3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/decrement-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.decrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + min = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md new file mode 100644 index 0000000000..09636dae09 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.deleteColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md new file mode 100644 index 0000000000..f872453a99 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-database.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.deleteDatabase( + databaseId = "<DATABASE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md new file mode 100644 index 0000000000..d3037ca6b0 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.deleteIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md new file mode 100644 index 0000000000..25b60e0e2d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-row.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val grids = Grids(client) + +val response = grids.deleteRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md new file mode 100644 index 0000000000..c3aa106eac --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.deleteRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md new file mode 100644 index 0000000000..f0208d4345 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/delete-table.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.deleteTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md new file mode 100644 index 0000000000..92890a7dc3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-column.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.getColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md new file mode 100644 index 0000000000..fd91ab0ad3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-database.md @@ -0,0 +1,14 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.getDatabase( + databaseId = "<DATABASE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md new file mode 100644 index 0000000000..7c0b2dc8cb --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-index.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.getIndex( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md new file mode 100644 index 0000000000..b217814b27 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-row.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val grids = Grids(client) + +val response = grids.getRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md new file mode 100644 index 0000000000..d8a4cd243e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/get-table.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.getTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>" +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md new file mode 100644 index 0000000000..adbe5c287e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/increment-row-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.incrementRowColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + column = "", + value = 0, // optional + max = 0 // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md new file mode 100644 index 0000000000..b033eb423d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-columns.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.listColumns( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md new file mode 100644 index 0000000000..c713568269 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-databases.md @@ -0,0 +1,15 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.listDatabases( + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md new file mode 100644 index 0000000000..84bbcbd232 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-indexes.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.listIndexes( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md new file mode 100644 index 0000000000..ea54280ff3 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val grids = Grids(client) + +val response = grids.listRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md new file mode 100644 index 0000000000..6bb5a588b2 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/list-tables.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.listTables( + databaseId = "<DATABASE_ID>", + queries = listOf(), // optional + search = "<SEARCH>" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md new file mode 100644 index 0000000000..b9360ec99e --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-boolean-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateBooleanColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = false, + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md new file mode 100644 index 0000000000..ae8aacc343 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-database.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateDatabase( + databaseId = "<DATABASE_ID>", + name = "<NAME>", + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md new file mode 100644 index 0000000000..50282217d7 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-datetime-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateDatetimeColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md new file mode 100644 index 0000000000..a9c2996800 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-email-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateEmailColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "email@example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md new file mode 100644 index 0000000000..c23eef358b --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-enum-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateEnumColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + elements = listOf(), + required = false, + default = "<DEFAULT>", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md new file mode 100644 index 0000000000..1054c34fbd --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-float-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateFloatColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md new file mode 100644 index 0000000000..288c74b4fe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-integer-column.md @@ -0,0 +1,21 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateIntegerColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = 0, + min = 0, // optional + max = 0, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md new file mode 100644 index 0000000000..cbc358a3b6 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-ip-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateIpColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md new file mode 100644 index 0000000000..99df537cfe --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-relationship-column.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateRelationshipColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + onDelete = "cascade", // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md new file mode 100644 index 0000000000..ae18af353a --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val grids = Grids(client) + +val response = grids.updateRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md new file mode 100644 index 0000000000..3682cd0724 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-rows.md @@ -0,0 +1,17 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + data = mapOf( "a" to "b" ), // optional + queries = listOf() // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md new file mode 100644 index 0000000000..8f7a213260 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-string-column.md @@ -0,0 +1,20 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateStringColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "<DEFAULT>", + size = 1, // optional + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md new file mode 100644 index 0000000000..99232d858f --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-table.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateTable( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + name = "<NAME>", + permissions = listOf("read("any")"), // optional + rowSecurity = false, // optional + enabled = false // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md new file mode 100644 index 0000000000..65d299dba8 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/update-url-column.md @@ -0,0 +1,19 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.updateUrlColumn( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + key = "", + required = false, + default = "https://example.com", + newKey = "" // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md new file mode 100644 index 0000000000..cbf0f38c8d --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-row.md @@ -0,0 +1,18 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val grids = Grids(client) + +val response = grids.upsertRow( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rowId = "<ROW_ID>", + data = mapOf( "a" to "b" ), // optional + permissions = listOf("read("any")") // optional +) diff --git a/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md b/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md new file mode 100644 index 0000000000..c767b66803 --- /dev/null +++ b/docs/examples/1.8.x/server-kotlin/kotlin/grids/upsert-rows.md @@ -0,0 +1,16 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Grids + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val grids = Grids(client) + +val response = grids.upsertRows( + databaseId = "<DATABASE_ID>", + tableId = "<TABLE_ID>", + rows = listOf() +) diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md index 44cfc3c199..a2e77b9241 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-document.md @@ -2,9 +2,8 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with const databases = new sdk.Databases(client); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md index 7ecaa6bef4..d73df44cd1 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/create-documents.md @@ -2,7 +2,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // + .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new sdk.Databases(client); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md index 7f2ffba3a3..fcc62d601c 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-document.md @@ -2,14 +2,15 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setSession('') // The user session to authenticate with - .setKey('<YOUR_API_KEY>') // Your secret API key - .setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with const databases = new sdk.Databases(client); const result = await databases.upsertDocument( '<DATABASE_ID>', // databaseId '<COLLECTION_ID>', // collectionId - '<DOCUMENT_ID>' // documentId + '<DOCUMENT_ID>', // documentId + {}, // data + ["read("any")"] // permissions (optional) ); diff --git a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md index 52f7b55e11..425b7ba51f 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-nodejs/examples/databases/upsert-documents.md @@ -2,12 +2,13 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - .setAdmin('') // + .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key const databases = new sdk.Databases(client); const result = await databases.upsertDocuments( '<DATABASE_ID>', // databaseId - '<COLLECTION_ID>' // collectionId + '<COLLECTION_ID>', // collectionId + [] // documents ); diff --git a/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md b/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md index 3c89030ca6..5671483191 100644 --- a/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-nodejs/examples/functions/create-execution.md @@ -14,5 +14,5 @@ const result = await functions.createExecution( '<PATH>', // path (optional) sdk.ExecutionMethod.GET, // method (optional) {}, // headers (optional) - '' // scheduledAt (optional) + '<SCHEDULED_AT>' // scheduledAt (optional) ); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..dae3f30840 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-boolean-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-database.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-database.md new file mode 100644 index 0000000000..720c0d6f23 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-database.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createDatabase( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..d2b5c7e00f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-datetime-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-email-column.md new file mode 100644 index 0000000000..ce56e96d85 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-email-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..653b1ed75c --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-enum-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-float-column.md new file mode 100644 index 0000000000..dc6aee4805 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-float-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-index.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-index.md new file mode 100644 index 0000000000..975fa3047e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-index.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + sdk.IndexType.Key, // type + [], // columns + [], // orders (optional) + [] // lengths (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..3444f82b58 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-integer-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // min (optional) + null, // max (optional) + null, // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..52a9e8fbeb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-ip-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..c0270dab85 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-relationship-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<RELATED_TABLE_ID>', // relatedTableId + sdk.RelationshipType.OneToOne, // type + false, // twoWay (optional) + '', // key (optional) + '', // twoWayKey (optional) + sdk.RelationMutate.Cascade // onDelete (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-row.md new file mode 100644 index 0000000000..a8495c4b94 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-row.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new sdk.Grids(client); + +const result = await grids.createRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md new file mode 100644 index 0000000000..c9400a4edf --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md new file mode 100644 index 0000000000..f72d042dfb --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-string-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + 1, // size + false, // required + '<DEFAULT>', // default (optional) + false, // array (optional) + false // encrypt (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-table.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-table.md new file mode 100644 index 0000000000..d022de372f --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-table.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/create-url-column.md new file mode 100644 index 0000000000..83c6d5a01b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/create-url-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.createUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default (optional) + false // array (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..a166a1bfc0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/decrement-row-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.decrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // min (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md new file mode 100644 index 0000000000..7130f48cae --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-column.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.deleteColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md new file mode 100644 index 0000000000..4a31d091b7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-database.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.deleteDatabase( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md new file mode 100644 index 0000000000..b266062053 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.deleteIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md new file mode 100644 index 0000000000..cf202374a0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-row.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new sdk.Grids(client); + +const result = await grids.deleteRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>' // rowId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md new file mode 100644 index 0000000000..aa36bacbda --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.deleteRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md new file mode 100644 index 0000000000..d3bb221e0d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/delete-table.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.deleteTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md new file mode 100644 index 0000000000..d3b08936d2 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/get-column.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.getColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md new file mode 100644 index 0000000000..7d27bbca94 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/get-database.md @@ -0,0 +1,12 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.getDatabase( + '<DATABASE_ID>' // databaseId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md new file mode 100644 index 0000000000..e47b942df9 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/get-index.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.getIndex( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '' // key +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md new file mode 100644 index 0000000000..15c753000a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/get-row.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new sdk.Grids(client); + +const result = await grids.getRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md b/docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md new file mode 100644 index 0000000000..f7b28eb191 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/get-table.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.getTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>' // tableId +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..ac5257f658 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/increment-row-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.incrementRowColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + '', // column + null, // value (optional) + null // max (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md new file mode 100644 index 0000000000..dbfaac0262 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/list-columns.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.listColumns( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-databases.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-databases.md new file mode 100644 index 0000000000..8a20b2ac88 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/list-databases.md @@ -0,0 +1,13 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.listDatabases( + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md new file mode 100644 index 0000000000..8a102996a6 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/list-indexes.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.listIndexes( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md new file mode 100644 index 0000000000..9f9bb3bc33 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/list-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new sdk.Grids(client); + +const result = await grids.listRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md b/docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md new file mode 100644 index 0000000000..e020b883e0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/list-tables.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.listTables( + '<DATABASE_ID>', // databaseId + [], // queries (optional) + '<SEARCH>' // search (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..b695e2d194 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-boolean-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateBooleanColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + false, // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-database.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-database.md new file mode 100644 index 0000000000..689c38f605 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-database.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateDatabase( + '<DATABASE_ID>', // databaseId + '<NAME>', // name + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..8ec6f1cda7 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-datetime-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateDatetimeColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-email-column.md new file mode 100644 index 0000000000..f8e0918819 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-email-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateEmailColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'email@example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..bda1aad53a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-enum-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateEnumColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + [], // elements + false, // required + '<DEFAULT>', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-float-column.md new file mode 100644 index 0000000000..ae3d5ceb4b --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-float-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateFloatColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..a3e28bc406 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-integer-column.md @@ -0,0 +1,19 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateIntegerColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + null, // default + null, // min (optional) + null, // max (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..ff8692f81e --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-ip-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateIpColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..19f957f67a --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-relationship-column.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateRelationshipColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + sdk.RelationMutate.Cascade, // onDelete (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-row.md new file mode 100644 index 0000000000..79c845f558 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-row.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new sdk.Grids(client); + +const result = await grids.updateRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md new file mode 100644 index 0000000000..65c8f63cbd --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-rows.md @@ -0,0 +1,15 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + {}, // data (optional) + [] // queries (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-string-column.md new file mode 100644 index 0000000000..b04f38bd5d --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-string-column.md @@ -0,0 +1,18 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateStringColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + '<DEFAULT>', // default + 1, // size (optional) + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-table.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-table.md new file mode 100644 index 0000000000..3d80666600 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-table.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateTable( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<NAME>', // name + ["read("any")"], // permissions (optional) + false, // rowSecurity (optional) + false // enabled (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-nodejs/examples/grids/update-url-column.md new file mode 100644 index 0000000000..aa368bfcc0 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/update-url-column.md @@ -0,0 +1,17 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.updateUrlColumn( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '', // key + false, // required + 'https://example.com', // default + '' // newKey (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-row.md new file mode 100644 index 0000000000..03476fc311 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-row.md @@ -0,0 +1,16 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const grids = new sdk.Grids(client); + +const result = await grids.upsertRow( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + '<ROW_ID>', // rowId + {}, // data (optional) + ["read("any")"] // permissions (optional) +); diff --git a/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..19f2ce1a90 --- /dev/null +++ b/docs/examples/1.8.x/server-nodejs/examples/grids/upsert-rows.md @@ -0,0 +1,14 @@ +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const grids = new sdk.Grids(client); + +const result = await grids.upsertRows( + '<DATABASE_ID>', // databaseId + '<TABLE_ID>', // tableId + [] // rows +); diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-document.md b/docs/examples/1.8.x/server-php/examples/databases/create-document.md index 8726b37719..bf1ee3f62a 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-php/examples/databases/create-document.md @@ -5,9 +5,8 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setSession('') // The user session to authenticate with - ->setKey('<YOUR_API_KEY>') // Your secret API key - ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with $databases = new Databases($client); diff --git a/docs/examples/1.8.x/server-php/examples/databases/create-documents.md b/docs/examples/1.8.x/server-php/examples/databases/create-documents.md index 9429b57aba..bc05f67260 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-php/examples/databases/create-documents.md @@ -5,7 +5,7 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setAdmin('') // + ->setProject('<YOUR_PROJECT_ID>') // Your project ID ->setKey('<YOUR_API_KEY>'); // Your secret API key $databases = new Databases($client); diff --git a/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md index 2f8464c995..6cff8296a3 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-php/examples/databases/upsert-document.md @@ -5,14 +5,15 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setSession('') // The user session to authenticate with - ->setKey('<YOUR_API_KEY>') // Your secret API key - ->setJWT('<YOUR_JWT>'); // Your secret JSON Web Token + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with $databases = new Databases($client); $result = $databases->upsertDocument( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documentId: '<DOCUMENT_ID>' + documentId: '<DOCUMENT_ID>', + data: [], + permissions: ["read("any")"] // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md index 11898dc33a..d9f9efda5c 100644 --- a/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-php/examples/databases/upsert-documents.md @@ -5,12 +5,13 @@ use Appwrite\Services\Databases; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint - ->setAdmin('') // + ->setProject('<YOUR_PROJECT_ID>') // Your project ID ->setKey('<YOUR_API_KEY>'); // Your secret API key $databases = new Databases($client); $result = $databases->upsertDocuments( databaseId: '<DATABASE_ID>', - collectionId: '<COLLECTION_ID>' + collectionId: '<COLLECTION_ID>', + documents: [] ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/functions/create-execution.md b/docs/examples/1.8.x/server-php/examples/functions/create-execution.md index 9aeb976cf3..cd11b5ea6e 100644 --- a/docs/examples/1.8.x/server-php/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-php/examples/functions/create-execution.md @@ -17,5 +17,5 @@ $result = $functions->createExecution( path: '<PATH>', // optional method: ExecutionMethod::GET(), // optional headers: [], // optional - scheduledAt: '' // optional + scheduledAt: '<SCHEDULED_AT>' // optional ); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..22e7cf8058 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-boolean-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-database.md b/docs/examples/1.8.x/server-php/examples/grids/create-database.md new file mode 100644 index 0000000000..ff7c3f73fb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-database.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createDatabase( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..afb847fd30 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-datetime-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-email-column.md new file mode 100644 index 0000000000..7516614820 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-email-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..f4a9ff2e5d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-enum-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-float-column.md new file mode 100644 index 0000000000..7a02a1790b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-float-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-index.md b/docs/examples/1.8.x/server-php/examples/grids/create-index.md new file mode 100644 index 0000000000..31bfdc2754 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-index.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; +use Appwrite\Enums\IndexType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + type: IndexType::KEY(), + columns: [], + orders: [], // optional + lengths: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..6495fc6309 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-integer-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + min: null, // optional + max: null, // optional + default: null, // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..65379a2f94 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-ip-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..cde72569ad --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-relationship-column.md @@ -0,0 +1,23 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; +use Appwrite\Enums\RelationshipType; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + relatedTableId: '<RELATED_TABLE_ID>', + type: RelationshipType::ONETOONE(), + twoWay: false, // optional + key: '', // optional + twoWayKey: '', // optional + onDelete: RelationMutate::CASCADE() // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-row.md b/docs/examples/1.8.x/server-php/examples/grids/create-row.md new file mode 100644 index 0000000000..58f678c6c3 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-row.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$grids = new Grids($client); + +$result = $grids->createRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-rows.md b/docs/examples/1.8.x/server-php/examples/grids/create-rows.md new file mode 100644 index 0000000000..531ebaf846 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-string-column.md new file mode 100644 index 0000000000..a5acf25859 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-string-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', // optional + array: false, // optional + encrypt: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-table.md b/docs/examples/1.8.x/server-php/examples/grids/create-table.md new file mode 100644 index 0000000000..ca6e017375 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-table.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-php/examples/grids/create-url-column.md new file mode 100644 index 0000000000..b0149f279b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/create-url-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->createUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', // optional + array: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..d7db09ed30 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/decrement-row-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->decrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + min: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-column.md b/docs/examples/1.8.x/server-php/examples/grids/delete-column.md new file mode 100644 index 0000000000..3862ecbde9 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/delete-column.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->deleteColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-database.md b/docs/examples/1.8.x/server-php/examples/grids/delete-database.md new file mode 100644 index 0000000000..761406ba9b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/delete-database.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->deleteDatabase( + databaseId: '<DATABASE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-index.md b/docs/examples/1.8.x/server-php/examples/grids/delete-index.md new file mode 100644 index 0000000000..913091455b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/delete-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->deleteIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-row.md b/docs/examples/1.8.x/server-php/examples/grids/delete-row.md new file mode 100644 index 0000000000..14b72e6e56 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/delete-row.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$grids = new Grids($client); + +$result = $grids->deleteRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-php/examples/grids/delete-rows.md new file mode 100644 index 0000000000..567b497f04 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/delete-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->deleteRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/delete-table.md b/docs/examples/1.8.x/server-php/examples/grids/delete-table.md new file mode 100644 index 0000000000..ea0eeda80f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/delete-table.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->deleteTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-column.md b/docs/examples/1.8.x/server-php/examples/grids/get-column.md new file mode 100644 index 0000000000..ac2c9bb0c4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/get-column.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->getColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-database.md b/docs/examples/1.8.x/server-php/examples/grids/get-database.md new file mode 100644 index 0000000000..c3e9f896c2 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/get-database.md @@ -0,0 +1,15 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->getDatabase( + databaseId: '<DATABASE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-index.md b/docs/examples/1.8.x/server-php/examples/grids/get-index.md new file mode 100644 index 0000000000..2434fd933b --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/get-index.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->getIndex( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-row.md b/docs/examples/1.8.x/server-php/examples/grids/get-row.md new file mode 100644 index 0000000000..e13ea67209 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/get-row.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$grids = new Grids($client); + +$result = $grids->getRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/get-table.md b/docs/examples/1.8.x/server-php/examples/grids/get-table.md new file mode 100644 index 0000000000..1c9721f1c7 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/get-table.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->getTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>' +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..fc9ee9a9eb --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/increment-row-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->incrementRowColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + column: '', + value: null, // optional + max: null // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-columns.md b/docs/examples/1.8.x/server-php/examples/grids/list-columns.md new file mode 100644 index 0000000000..7be7581a28 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/list-columns.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->listColumns( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-databases.md b/docs/examples/1.8.x/server-php/examples/grids/list-databases.md new file mode 100644 index 0000000000..f5fec16a25 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/list-databases.md @@ -0,0 +1,16 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->listDatabases( + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-php/examples/grids/list-indexes.md new file mode 100644 index 0000000000..d23248e5d4 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/list-indexes.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->listIndexes( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-rows.md b/docs/examples/1.8.x/server-php/examples/grids/list-rows.md new file mode 100644 index 0000000000..c8537651c6 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/list-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$grids = new Grids($client); + +$result = $grids->listRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/list-tables.md b/docs/examples/1.8.x/server-php/examples/grids/list-tables.md new file mode 100644 index 0000000000..95f4f7b65d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/list-tables.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->listTables( + databaseId: '<DATABASE_ID>', + queries: [], // optional + search: '<SEARCH>' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..bc7405d35d --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-boolean-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateBooleanColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: false, + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-database.md b/docs/examples/1.8.x/server-php/examples/grids/update-database.md new file mode 100644 index 0000000000..9d71e5e043 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-database.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateDatabase( + databaseId: '<DATABASE_ID>', + name: '<NAME>', + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..6850a6d373 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-datetime-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateDatetimeColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-email-column.md new file mode 100644 index 0000000000..6fe7f82477 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-email-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateEmailColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..4a18d02488 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-enum-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateEnumColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-float-column.md new file mode 100644 index 0000000000..5e58f8efaf --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-float-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateFloatColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..c097b7e286 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-integer-column.md @@ -0,0 +1,22 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateIntegerColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, // optional + max: null, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..9ce131b8e1 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-ip-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateIpColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..a0241afb06 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-relationship-column.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateRelationshipColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + onDelete: RelationMutate::CASCADE(), // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-row.md b/docs/examples/1.8.x/server-php/examples/grids/update-row.md new file mode 100644 index 0000000000..a0aae15730 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-row.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$grids = new Grids($client); + +$result = $grids->updateRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-rows.md b/docs/examples/1.8.x/server-php/examples/grids/update-rows.md new file mode 100644 index 0000000000..270489f44e --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-rows.md @@ -0,0 +1,18 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + data: [], // optional + queries: [] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-string-column.md new file mode 100644 index 0000000000..6213deb7aa --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-string-column.md @@ -0,0 +1,21 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateStringColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, // optional + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-table.md b/docs/examples/1.8.x/server-php/examples/grids/update-table.md new file mode 100644 index 0000000000..1483eee2a9 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-table.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateTable( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-php/examples/grids/update-url-column.md new file mode 100644 index 0000000000..7f7916c81a --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/update-url-column.md @@ -0,0 +1,20 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->updateUrlColumn( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + newKey: '' // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-php/examples/grids/upsert-row.md new file mode 100644 index 0000000000..a07cbe976f --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/upsert-row.md @@ -0,0 +1,19 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$grids = new Grids($client); + +$result = $grids->upsertRow( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rowId: '<ROW_ID>', + data: [], // optional + permissions: ["read("any")"] // optional +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..5d31648e02 --- /dev/null +++ b/docs/examples/1.8.x/server-php/examples/grids/upsert-rows.md @@ -0,0 +1,17 @@ +<?php + +use Appwrite\Client; +use Appwrite\Services\Grids; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$grids = new Grids($client); + +$result = $grids->upsertRows( + databaseId: '<DATABASE_ID>', + tableId: '<TABLE_ID>', + rows: [] +); \ No newline at end of file diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-document.md b/docs/examples/1.8.x/server-python/examples/databases/create-document.md index 1a8500b0f2..1eaf0246f3 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-python/examples/databases/create-document.md @@ -3,9 +3,8 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID client.set_session('') # The user session to authenticate with -client.set_key('<YOUR_API_KEY>') # Your secret API key -client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token databases = Databases(client) diff --git a/docs/examples/1.8.x/server-python/examples/databases/create-documents.md b/docs/examples/1.8.x/server-python/examples/databases/create-documents.md index 27ad6e8aa8..1b94e5165a 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-python/examples/databases/create-documents.md @@ -3,7 +3,7 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_admin('') # +client.set_project('<YOUR_PROJECT_ID>') # Your project ID client.set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases(client) diff --git a/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md index 8711e442c5..c491ea4f44 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-python/examples/databases/upsert-document.md @@ -3,14 +3,15 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID client.set_session('') # The user session to authenticate with -client.set_key('<YOUR_API_KEY>') # Your secret API key -client.set_jwt('<YOUR_JWT>') # Your secret JSON Web Token databases = Databases(client) result = databases.upsert_document( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - document_id = '<DOCUMENT_ID>' + document_id = '<DOCUMENT_ID>', + data = {}, + permissions = ["read("any")"] # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md index 79888c8be3..5136d5fcb1 100644 --- a/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-python/examples/databases/upsert-documents.md @@ -3,12 +3,13 @@ from appwrite.services.databases import Databases client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint -client.set_admin('') # +client.set_project('<YOUR_PROJECT_ID>') # Your project ID client.set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases(client) result = databases.upsert_documents( database_id = '<DATABASE_ID>', - collection_id = '<COLLECTION_ID>' + collection_id = '<COLLECTION_ID>', + documents = [] ) diff --git a/docs/examples/1.8.x/server-python/examples/functions/create-execution.md b/docs/examples/1.8.x/server-python/examples/functions/create-execution.md index b41c7e376c..f80b8646c2 100644 --- a/docs/examples/1.8.x/server-python/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-python/examples/functions/create-execution.md @@ -15,5 +15,5 @@ result = functions.create_execution( path = '<PATH>', # optional method = ExecutionMethod.GET, # optional headers = {}, # optional - scheduled_at = '' # optional + scheduled_at = '<SCHEDULED_AT>' # optional ) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..73d8323533 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-boolean-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = False, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-database.md b/docs/examples/1.8.x/server-python/examples/grids/create-database.md new file mode 100644 index 0000000000..a7749e4903 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-database.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_database( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..a98024c16c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-datetime-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-email-column.md new file mode 100644 index 0000000000..372cbafce3 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-email-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'email@example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..d7b47c80cb --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-enum-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-float-column.md new file mode 100644 index 0000000000..5a52128ac1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-float-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-index.md b/docs/examples/1.8.x/server-python/examples/grids/create-index.md new file mode 100644 index 0000000000..1d67b8abc0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-index.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids +from appwrite.enums import IndexType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + type = IndexType.KEY, + columns = [], + orders = [], # optional + lengths = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..aed49578aa --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-integer-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + min = None, # optional + max = None, # optional + default = None, # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..af873c91a1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-ip-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..3cb858d260 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-relationship-column.md @@ -0,0 +1,21 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids +from appwrite.enums import RelationshipType + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + related_table_id = '<RELATED_TABLE_ID>', + type = RelationshipType.ONETOONE, + two_way = False, # optional + key = '', # optional + two_way_key = '', # optional + on_delete = RelationMutate.CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-row.md b/docs/examples/1.8.x/server-python/examples/grids/create-row.md new file mode 100644 index 0000000000..5645f0bd23 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-row.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +grids = Grids(client) + +result = grids.create_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-rows.md b/docs/examples/1.8.x/server-python/examples/grids/create-rows.md new file mode 100644 index 0000000000..3274c48a10 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [] +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-string-column.md new file mode 100644 index 0000000000..3771a070ba --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-string-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + size = 1, + required = False, + default = '<DEFAULT>', # optional + array = False, # optional + encrypt = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-table.md b/docs/examples/1.8.x/server-python/examples/grids/create-table.md new file mode 100644 index 0000000000..64c1b50d69 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-table.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + row_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-python/examples/grids/create-url-column.md new file mode 100644 index 0000000000..45c1a2d82e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/create-url-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.create_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'https://example.com', # optional + array = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..9608337398 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/decrement-row-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.decrement_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '', + value = None, # optional + min = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-column.md b/docs/examples/1.8.x/server-python/examples/grids/delete-column.md new file mode 100644 index 0000000000..650a1c3578 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/delete-column.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.delete_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-database.md b/docs/examples/1.8.x/server-python/examples/grids/delete-database.md new file mode 100644 index 0000000000..9898c07bc8 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/delete-database.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.delete_database( + database_id = '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-index.md b/docs/examples/1.8.x/server-python/examples/grids/delete-index.md new file mode 100644 index 0000000000..fed36f1d9c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/delete-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.delete_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-row.md b/docs/examples/1.8.x/server-python/examples/grids/delete-row.md new file mode 100644 index 0000000000..eb1e661738 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/delete-row.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +grids = Grids(client) + +result = grids.delete_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-python/examples/grids/delete-rows.md new file mode 100644 index 0000000000..31503cdee1 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/delete-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.delete_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/delete-table.md b/docs/examples/1.8.x/server-python/examples/grids/delete-table.md new file mode 100644 index 0000000000..d170c31d20 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/delete-table.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.delete_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-column.md b/docs/examples/1.8.x/server-python/examples/grids/get-column.md new file mode 100644 index 0000000000..a724e07b0a --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/get-column.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.get_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-database.md b/docs/examples/1.8.x/server-python/examples/grids/get-database.md new file mode 100644 index 0000000000..e393d7587b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/get-database.md @@ -0,0 +1,13 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.get_database( + database_id = '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-index.md b/docs/examples/1.8.x/server-python/examples/grids/get-index.md new file mode 100644 index 0000000000..6e3753dea5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/get-index.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.get_index( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-row.md b/docs/examples/1.8.x/server-python/examples/grids/get-row.md new file mode 100644 index 0000000000..939a992868 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/get-row.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +grids = Grids(client) + +result = grids.get_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/get-table.md b/docs/examples/1.8.x/server-python/examples/grids/get-table.md new file mode 100644 index 0000000000..afe24bd0f2 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/get-table.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.get_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..598cf58874 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/increment-row-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.increment_row_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + column = '', + value = None, # optional + max = None # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-columns.md b/docs/examples/1.8.x/server-python/examples/grids/list-columns.md new file mode 100644 index 0000000000..b78327182c --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/list-columns.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.list_columns( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-databases.md b/docs/examples/1.8.x/server-python/examples/grids/list-databases.md new file mode 100644 index 0000000000..78c5cb4bd7 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/list-databases.md @@ -0,0 +1,14 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.list_databases( + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-python/examples/grids/list-indexes.md new file mode 100644 index 0000000000..a6b52416c6 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/list-indexes.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.list_indexes( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-rows.md b/docs/examples/1.8.x/server-python/examples/grids/list-rows.md new file mode 100644 index 0000000000..975f88f763 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/list-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +grids = Grids(client) + +result = grids.list_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/list-tables.md b/docs/examples/1.8.x/server-python/examples/grids/list-tables.md new file mode 100644 index 0000000000..3e2e5508bc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/list-tables.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.list_tables( + database_id = '<DATABASE_ID>', + queries = [], # optional + search = '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..6bcbf27355 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-boolean-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_boolean_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = False, + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-database.md b/docs/examples/1.8.x/server-python/examples/grids/update-database.md new file mode 100644 index 0000000000..2df676bcbc --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-database.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_database( + database_id = '<DATABASE_ID>', + name = '<NAME>', + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..6ae0e4dea5 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-datetime-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_datetime_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-email-column.md new file mode 100644 index 0000000000..c1ff1d0637 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-email-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_email_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'email@example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..6da49cfb81 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-enum-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_enum_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + elements = [], + required = False, + default = '<DEFAULT>', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-float-column.md new file mode 100644 index 0000000000..8d3d9edb5f --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-float-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_float_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..966f7b6805 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-integer-column.md @@ -0,0 +1,20 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_integer_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = None, + min = None, # optional + max = None, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..e5fccac320 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-ip-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_ip_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..fcff4591fd --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-relationship-column.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_relationship_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + on_delete = RelationMutate.CASCADE, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-row.md b/docs/examples/1.8.x/server-python/examples/grids/update-row.md new file mode 100644 index 0000000000..e379697ce4 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-row.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +grids = Grids(client) + +result = grids.update_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-rows.md b/docs/examples/1.8.x/server-python/examples/grids/update-rows.md new file mode 100644 index 0000000000..344bb5904b --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-rows.md @@ -0,0 +1,16 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + data = {}, # optional + queries = [] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-string-column.md new file mode 100644 index 0000000000..f303189b80 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-string-column.md @@ -0,0 +1,19 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_string_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = '<DEFAULT>', + size = 1, # optional + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-table.md b/docs/examples/1.8.x/server-python/examples/grids/update-table.md new file mode 100644 index 0000000000..cfd5b4d92e --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-table.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_table( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + name = '<NAME>', + permissions = ["read("any")"], # optional + row_security = False, # optional + enabled = False # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-python/examples/grids/update-url-column.md new file mode 100644 index 0000000000..ea6dc386ed --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/update-url-column.md @@ -0,0 +1,18 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.update_url_column( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + key = '', + required = False, + default = 'https://example.com', + new_key = '' # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-python/examples/grids/upsert-row.md new file mode 100644 index 0000000000..79528818e0 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/upsert-row.md @@ -0,0 +1,17 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +grids = Grids(client) + +result = grids.upsert_row( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + row_id = '<ROW_ID>', + data = {}, # optional + permissions = ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..b7573d4794 --- /dev/null +++ b/docs/examples/1.8.x/server-python/examples/grids/upsert-rows.md @@ -0,0 +1,15 @@ +from appwrite.client import Client +from appwrite.services.grids import Grids + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids(client) + +result = grids.upsert_rows( + database_id = '<DATABASE_ID>', + table_id = '<TABLE_ID>', + rows = [] +) diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md index 2079b045d1..b62c82a6a8 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-anonymous-session.md @@ -1,6 +1,6 @@ POST /v1/account/sessions/anonymous HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md index 8aee0e5b15..1103d2ebfb 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-email-password-session.md @@ -1,7 +1,7 @@ POST /v1/account/sessions/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md index 98c5c9b454..552b724b9c 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-email-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md b/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md index a8da4695c3..62a7dee7e9 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-j-w-t.md @@ -1,6 +1,6 @@ POST /v1/account/jwts HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md index a3db43516a..29d68bd0fa 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-magic-u-r-l-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/magic-url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md index 8d6b52b877..62a068b6cf 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-authenticator.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md index 9a84c0ef69..dd5ef4c731 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-challenge.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/challenge HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md index 797824d5d7..f09323df0b 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-mfa-recovery-codes.md @@ -1,7 +1,7 @@ POST /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md b/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md index dd1dd3ec5e..8a0cab614f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-o-auth2token.md @@ -1,4 +1,4 @@ GET /v1/account/tokens/oauth2/{provider} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md b/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md index eef1021d9e..5127c8377a 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-phone-token.md @@ -1,7 +1,7 @@ POST /v1/account/tokens/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md index d161e580ff..57b3b7d160 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-phone-verification.md @@ -1,7 +1,7 @@ POST /v1/account/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md b/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md index c195b96a5e..ea0146228b 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-recovery.md @@ -1,7 +1,7 @@ POST /v1/account/recovery HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-session.md b/docs/examples/1.8.x/server-rest/examples/account/create-session.md index 18e3b1acdd..0acc50cda6 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-session.md @@ -1,7 +1,7 @@ POST /v1/account/sessions/token HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/create-verification.md b/docs/examples/1.8.x/server-rest/examples/account/create-verification.md index 1185d3a875..ed5479dbe5 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create-verification.md @@ -1,7 +1,7 @@ POST /v1/account/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/create.md b/docs/examples/1.8.x/server-rest/examples/account/create.md index f546c07de5..15bb386f41 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/create.md +++ b/docs/examples/1.8.x/server-rest/examples/account/create.md @@ -1,7 +1,7 @@ POST /v1/account HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md b/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md index edb036a593..bacca18870 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-identity.md @@ -1,7 +1,7 @@ DELETE /v1/account/identities/{identityId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md index de58948195..a0eb5a0869 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-mfa-authenticator.md @@ -1,7 +1,7 @@ DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-session.md b/docs/examples/1.8.x/server-rest/examples/account/delete-session.md index 9454a84913..c9b0f48d6f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/delete-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-session.md @@ -1,7 +1,7 @@ DELETE /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md b/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md index 97931c12e5..0b3fcd1c45 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md +++ b/docs/examples/1.8.x/server-rest/examples/account/delete-sessions.md @@ -1,7 +1,7 @@ DELETE /v1/account/sessions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md index 81edee5234..2ab10a2475 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/account/get-mfa-recovery-codes.md @@ -1,6 +1,6 @@ GET /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md index 13a0b74d8f..a038dacbfd 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/account/get-prefs.md @@ -1,6 +1,6 @@ GET /v1/account/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get-session.md b/docs/examples/1.8.x/server-rest/examples/account/get-session.md index 9417755b04..3e372a05ef 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/get-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/get-session.md @@ -1,6 +1,6 @@ GET /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/get.md b/docs/examples/1.8.x/server-rest/examples/account/get.md index 023a6d116f..104b643074 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/get.md +++ b/docs/examples/1.8.x/server-rest/examples/account/get.md @@ -1,6 +1,6 @@ GET /v1/account HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-identities.md b/docs/examples/1.8.x/server-rest/examples/account/list-identities.md index 65edceb8d6..5acb221584 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/list-identities.md +++ b/docs/examples/1.8.x/server-rest/examples/account/list-identities.md @@ -1,6 +1,6 @@ GET /v1/account/identities HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-logs.md b/docs/examples/1.8.x/server-rest/examples/account/list-logs.md index 71e2e138ef..8314123c9e 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/list-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/account/list-logs.md @@ -1,6 +1,6 @@ GET /v1/account/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md b/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md index 217ec6cb30..c591143d4e 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md +++ b/docs/examples/1.8.x/server-rest/examples/account/list-mfa-factors.md @@ -1,6 +1,6 @@ GET /v1/account/mfa/factors HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md b/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md index 7bff23f25b..89ef6962c9 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md +++ b/docs/examples/1.8.x/server-rest/examples/account/list-sessions.md @@ -1,6 +1,6 @@ GET /v1/account/sessions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-email.md b/docs/examples/1.8.x/server-rest/examples/account/update-email.md index fc3baaf4a4..382327e31b 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-email.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-email.md @@ -1,7 +1,7 @@ PATCH /v1/account/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md b/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md index 803c47a857..a22b169751 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-m-f-a.md @@ -1,7 +1,7 @@ PATCH /v1/account/mfa HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md index 3238322e0f..1a82afbfcc 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-magic-u-r-l-session.md @@ -1,7 +1,7 @@ PUT /v1/account/sessions/magic-url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md index 9d3e5dceea..780472291c 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-authenticator.md @@ -1,7 +1,7 @@ PUT /v1/account/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md index ddc27ae334..b6a7e92b28 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-challenge.md @@ -1,7 +1,7 @@ PUT /v1/account/mfa/challenge HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md index e4ab8abb3b..74e9225f3e 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-mfa-recovery-codes.md @@ -1,7 +1,7 @@ PATCH /v1/account/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-name.md b/docs/examples/1.8.x/server-rest/examples/account/update-name.md index f2f7caa204..4c9c0e302c 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-name.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-name.md @@ -1,7 +1,7 @@ PATCH /v1/account/name HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-password.md b/docs/examples/1.8.x/server-rest/examples/account/update-password.md index 4f69b9ab3f..e05a1c2b7f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-password.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-password.md @@ -1,7 +1,7 @@ PATCH /v1/account/password HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md index f1bc27d201..54872eecd2 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone-session.md @@ -1,7 +1,7 @@ PUT /v1/account/sessions/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md index ee6f5a68ff..1d4dc22520 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone-verification.md @@ -1,7 +1,7 @@ PUT /v1/account/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-phone.md b/docs/examples/1.8.x/server-rest/examples/account/update-phone.md index bbe602a181..791caadb0d 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-phone.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-phone.md @@ -1,7 +1,7 @@ PATCH /v1/account/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md index aeabc2b68f..24f2d3bcb6 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-prefs.md @@ -1,7 +1,7 @@ PATCH /v1/account/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md b/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md index 054aacc8ed..7d40ee79fe 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-recovery.md @@ -1,7 +1,7 @@ PUT /v1/account/recovery HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-session.md b/docs/examples/1.8.x/server-rest/examples/account/update-session.md index 9b2ba0e4a7..8e2257aeed 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-session.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-session.md @@ -1,7 +1,7 @@ PATCH /v1/account/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-status.md b/docs/examples/1.8.x/server-rest/examples/account/update-status.md index 8a3e01db0b..557697fe5f 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-status.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-status.md @@ -1,7 +1,7 @@ PATCH /v1/account/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/account/update-verification.md b/docs/examples/1.8.x/server-rest/examples/account/update-verification.md index 0c5ed8b55d..a4dcbf76a3 100644 --- a/docs/examples/1.8.x/server-rest/examples/account/update-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/account/update-verification.md @@ -1,7 +1,7 @@ PUT /v1/account/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md index 3f18fa0d1e..36999839cc 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-browser.md @@ -1,6 +1,6 @@ GET /v1/avatars/browsers/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md index 59a38fe8f3..c9126af289 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-credit-card.md @@ -1,6 +1,6 @@ GET /v1/avatars/credit-cards/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md index 7a7c189da1..5a928fc9cc 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-favicon.md @@ -1,6 +1,6 @@ GET /v1/avatars/favicon HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md index b4cd119359..c29ba10970 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-flag.md @@ -1,6 +1,6 @@ GET /v1/avatars/flags/{code} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md index ca6b5105c3..dfc9fdcd92 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-image.md @@ -1,6 +1,6 @@ GET /v1/avatars/image HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md index eb90447158..c784f1ca56 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-initials.md @@ -1,6 +1,6 @@ GET /v1/avatars/initials HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md b/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md index 77f7a3d382..bac1987d4e 100644 --- a/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md +++ b/docs/examples/1.8.x/server-rest/examples/avatars/get-q-r.md @@ -1,6 +1,6 @@ GET /v1/avatars/qr HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md index 8ae6c2d9ff..fb11c03cbd 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-boolean-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md index ea298e3706..4f1e77728e 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-collection.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md index 6ec4b332a5..3d0e718634 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-datetime-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-document.md b/docs/examples/1.8.x/server-rest/examples/databases/create-document.md index a5c25315c2..e4ba6ec1ff 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-document.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md index 63503ebaaa..cee5405fb2 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-documents.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md index 0fb7aa2814..02b7095d64 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-email-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md index ba033a02ce..a921e10c5f 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-enum-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md index ee8cb7497f..ea9dde56ce 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-float-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/float HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-index.md b/docs/examples/1.8.x/server-rest/examples/databases/create-index.md index 6d9b486ed6..c78bdc37f9 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-index.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-index.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md index 721f10e0c7..cce3a3f265 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-integer-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md index 61378e6780..80afccb4c1 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-ip-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md index c519a4a494..d9e6c6441c 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-relationship-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/relationship HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md index 7a5eafdf2a..5591ca8d8a 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-string-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/string HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md index ea4d76ce06..4ee9595717 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create-url-attribute.md @@ -1,7 +1,7 @@ POST /v1/databases/{databaseId}/collections/{collectionId}/attributes/url HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/create.md b/docs/examples/1.8.x/server-rest/examples/databases/create.md index dab52ff67c..fd1ae143fa 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/create.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/create.md @@ -1,7 +1,7 @@ POST /v1/databases HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md index d569f8d7e6..53ee43c6c5 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/decrement-document-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md index 8b7f1eee07..5d8f7f2932 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-attribute.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md index 153b3a2bdd..96d044df4e 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-collection.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md index ca093c9177..b5580b04bf 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-document.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md index 49ab276fa6..cb27719953 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-documents.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md b/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md index 9c27a6fd4c..d8664ef7ca 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete-index.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/delete.md b/docs/examples/1.8.x/server-rest/examples/databases/delete.md index 19cf58549a..85d5f7bb0e 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/delete.md @@ -1,7 +1,7 @@ DELETE /v1/databases/{databaseId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md index c4cd093de0..60161187da 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-attribute.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md index 0e33fc4ef7..837138aaa0 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-collection.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-document.md b/docs/examples/1.8.x/server-rest/examples/databases/get-document.md index b71ec4f83c..78a0e7d37c 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-document.md @@ -1,6 +1,6 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get-index.md b/docs/examples/1.8.x/server-rest/examples/databases/get-index.md index 5aa5aa0fb2..58665ed283 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get-index.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get-index.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/get.md b/docs/examples/1.8.x/server-rest/examples/databases/get.md index 7c43330625..644f251f56 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/get.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/get.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md index 8658cb0ee6..accfca5b06 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/increment-document-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md b/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md index e829678007..1d16e3308d 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-attributes.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/attributes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md b/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md index 0cfdce9c8e..18499144d3 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-collections.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md index 0bc5c9b7f9..468956232d 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-documents.md @@ -1,6 +1,6 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md index e65ba2483c..1e1f134ef0 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list-indexes.md @@ -1,5 +1,5 @@ GET /v1/databases/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/list.md b/docs/examples/1.8.x/server-rest/examples/databases/list.md index 31db5cca0d..3b9530eec4 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/list.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/list.md @@ -1,5 +1,5 @@ GET /v1/databases HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md index 7a2ae34ce9..75f3d66b50 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-boolean-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md b/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md index 4cba7f5230..6d6e5603ed 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-collection.md @@ -1,7 +1,7 @@ PUT /v1/databases/{databaseId}/collections/{collectionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md index c9685e6c89..59a477aca7 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-datetime-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-document.md b/docs/examples/1.8.x/server-rest/examples/databases/update-document.md index 19b25bdf45..9a156375de 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-document.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md index f2606e3a1f..69ea7a0d6f 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-documents.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md index eece253459..08257e8906 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-email-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/email/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md index 47ef168090..8e69a703ea 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-enum-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md index bb35f3450c..214567660d 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-float-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/float/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md index 96290f4313..1f566c1369 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-integer-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md index 9e3cf7d4b5..31bc18c587 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-ip-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md index 645e8f8ae4..3cb7d4f679 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-relationship-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md index 650b6f1b8b..2026b854a9 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-string-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/string/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md b/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md index 8409285677..4f90c7ade3 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update-url-attribute.md @@ -1,7 +1,7 @@ PATCH /v1/databases/{databaseId}/collections/{collectionId}/attributes/url/{key} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/update.md b/docs/examples/1.8.x/server-rest/examples/databases/update.md index 02efbf5270..d57ad48927 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/update.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/update.md @@ -1,7 +1,7 @@ PUT /v1/databases/{databaseId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md index 7339c7e611..97b61bfc7f 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/upsert-document.md @@ -1,9 +1,13 @@ PUT /v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-JWT: <YOUR_JWT> +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md index 1a24810a03..4bcb9cb0c0 100644 --- a/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-rest/examples/databases/upsert-documents.md @@ -1,7 +1,10 @@ PUT /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> +{ + "documents": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md index 5d65eff5fd..f68e54dedc 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> Content-Length: *Length of your entity body in bytes* diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md index 898117c117..f2ba3c5f13 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-duplicate-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments/duplicate HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md index 5a4c7667cf..a2863046ce 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-execution.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/executions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> @@ -13,5 +13,5 @@ X-Appwrite-JWT: <YOUR_JWT> "path": "<PATH>", "method": "GET", "headers": {}, - "scheduledAt": + "scheduledAt": "<SCHEDULED_AT>" } diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md index 656c2e2a27..18ebf65efe 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-template-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments/template HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md index 7251a3a352..7f71f07417 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-variable.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/variables HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md index 1b5267ca14..cd409fa892 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create-vcs-deployment.md @@ -1,7 +1,7 @@ POST /v1/functions/{functionId}/deployments/vcs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/create.md b/docs/examples/1.8.x/server-rest/examples/functions/create.md index c5f364ad63..1f034e60a4 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/create.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/create.md @@ -1,7 +1,7 @@ POST /v1/functions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md index b70f282167..81a80209a8 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-deployment.md @@ -1,7 +1,7 @@ DELETE /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md index fb26ae47aa..020a9efc3e 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-execution.md @@ -1,7 +1,7 @@ DELETE /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md index aa01835ae4..88f4de15eb 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete-variable.md @@ -1,7 +1,7 @@ DELETE /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/delete.md b/docs/examples/1.8.x/server-rest/examples/functions/delete.md index 9f9ab74019..2148d8148b 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/delete.md @@ -1,7 +1,7 @@ DELETE /v1/functions/{functionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md index 9195d203ab..e9c9ce0073 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment-download.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/deployments/{deploymentId}/download HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md index 2557ca698e..aa6e92449b 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-deployment.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId}/deployments/{deploymentId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md b/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md index 52e54c2a6c..54da369660 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-execution.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md index 2a01307b0d..91f14f0db8 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get-variable.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/get.md b/docs/examples/1.8.x/server-rest/examples/functions/get.md index 062b7e67ec..fb0f049f6d 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/get.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/get.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md b/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md index 5b4dabc679..db89edf692 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-deployments.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId}/deployments HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md b/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md index b0ac3076ab..5876a8ba46 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-executions.md @@ -1,6 +1,6 @@ GET /v1/functions/{functionId}/executions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md b/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md index 762e47fbcb..d8e4bc4272 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-runtimes.md @@ -1,5 +1,5 @@ GET /v1/functions/runtimes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md b/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md index 989adc0576..1a84b56ac9 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-specifications.md @@ -1,5 +1,5 @@ GET /v1/functions/specifications HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md b/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md index b46b69fb5f..41bfde5e28 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list-variables.md @@ -1,5 +1,5 @@ GET /v1/functions/{functionId}/variables HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/list.md b/docs/examples/1.8.x/server-rest/examples/functions/list.md index 318a2d56ed..e12af0e774 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/list.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/list.md @@ -1,5 +1,5 @@ GET /v1/functions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md b/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md index 8788e21c2b..ba4a882910 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-deployment-status.md @@ -1,7 +1,7 @@ PATCH /v1/functions/{functionId}/deployments/{deploymentId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md b/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md index 1f89f35da0..d649b2ea69 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-function-deployment.md @@ -1,7 +1,7 @@ PATCH /v1/functions/{functionId}/deployment HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md b/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md index 36ae244548..5a0ad6805d 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/update-variable.md @@ -1,7 +1,7 @@ PUT /v1/functions/{functionId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/functions/update.md b/docs/examples/1.8.x/server-rest/examples/functions/update.md index ee3b8b8c6d..40329e5580 100644 --- a/docs/examples/1.8.x/server-rest/examples/functions/update.md +++ b/docs/examples/1.8.x/server-rest/examples/functions/update.md @@ -1,7 +1,7 @@ PUT /v1/functions/{functionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md b/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md index 7d58d77ede..2d59370324 100644 --- a/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md +++ b/docs/examples/1.8.x/server-rest/examples/graphql/mutation.md @@ -2,7 +2,7 @@ POST /v1/graphql/mutation HTTP/1.1 Host: cloud.appwrite.io X-Sdk-Graphql: true Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/server-rest/examples/graphql/query.md b/docs/examples/1.8.x/server-rest/examples/graphql/query.md index 8b87cd9f33..c7242de6ef 100644 --- a/docs/examples/1.8.x/server-rest/examples/graphql/query.md +++ b/docs/examples/1.8.x/server-rest/examples/graphql/query.md @@ -2,7 +2,7 @@ POST /v1/graphql HTTP/1.1 Host: cloud.appwrite.io X-Sdk-Graphql: true Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..d594385572 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-boolean-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/boolean HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": false, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-database.md b/docs/examples/1.8.x/server-rest/examples/grids/create-database.md new file mode 100644 index 0000000000..fd1ae143fa --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-database.md @@ -0,0 +1,12 @@ +POST /v1/databases HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "databaseId": "<DATABASE_ID>", + "name": "<NAME>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..88505a8a1f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-datetime-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/datetime HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md new file mode 100644 index 0000000000..28d733dab8 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-email-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/email HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "email@example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..35de1b5e2f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-enum-column.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/enum HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "elements": [], + "required": false, + "default": "<DEFAULT>", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md new file mode 100644 index 0000000000..9c9996aced --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-float-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/float HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-index.md b/docs/examples/1.8.x/server-rest/examples/grids/create-index.md new file mode 100644 index 0000000000..7a7487bdae --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-index.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "type": "key", + "columns": [], + "orders": [], + "lengths": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..be6eb92544 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-integer-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/integer HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "min": 0, + "max": 0, + "default": 0, + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..30406d7025 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-ip-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/ip HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": , + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..75f54c9602 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-relationship-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "relatedTableId": "<RELATED_TABLE_ID>", + "type": "oneToOne", + "twoWay": false, + "key": , + "twoWayKey": , + "onDelete": "cascade" +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-row.md b/docs/examples/1.8.x/server-rest/examples/grids/create-row.md new file mode 100644 index 0000000000..443b4e30c9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-row.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rowId": "<ROW_ID>", + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/create-rows.md new file mode 100644 index 0000000000..32578d87de --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-rows.md @@ -0,0 +1,12 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "rows": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md new file mode 100644 index 0000000000..2a0b0dc372 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-string-column.md @@ -0,0 +1,15 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/string HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "size": 1, + "required": false, + "default": "<DEFAULT>", + "array": false, + "encrypt": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-table.md b/docs/examples/1.8.x/server-rest/examples/grids/create-table.md new file mode 100644 index 0000000000..7c22e81e7c --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-table.md @@ -0,0 +1,14 @@ +POST /v1/databases/{databaseId}/grids/tables HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "tableId": "<TABLE_ID>", + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md new file mode 100644 index 0000000000..5dada907a0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/create-url-column.md @@ -0,0 +1,13 @@ +POST /v1/databases/{databaseId}/grids/tables/{tableId}/columns/url HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "key": , + "required": false, + "default": "https://example.com", + "array": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-rest/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..6548a58273 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/decrement-row-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId}/{column}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "min": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-column.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-column.md new file mode 100644 index 0000000000..2680bcf03a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/delete-column.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/columns/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-database.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-database.md new file mode 100644 index 0000000000..85d5f7bb0e --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/delete-database.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-index.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-index.md new file mode 100644 index 0000000000..ca7d67a1b4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/delete-index.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-row.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-row.md new file mode 100644 index 0000000000..8fd3f6ee7d --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/delete-row.md @@ -0,0 +1,9 @@ +DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md new file mode 100644 index 0000000000..af1fabdb7a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/delete-rows.md @@ -0,0 +1,10 @@ +DELETE /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/delete-table.md b/docs/examples/1.8.x/server-rest/examples/grids/delete-table.md new file mode 100644 index 0000000000..e068291849 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/delete-table.md @@ -0,0 +1,7 @@ +DELETE /v1/databases/{databaseId}/grids/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-column.md b/docs/examples/1.8.x/server-rest/examples/grids/get-column.md new file mode 100644 index 0000000000..0888fb7273 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/get-column.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/columns/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-database.md b/docs/examples/1.8.x/server-rest/examples/grids/get-database.md new file mode 100644 index 0000000000..644f251f56 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/get-database.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-index.md b/docs/examples/1.8.x/server-rest/examples/grids/get-index.md new file mode 100644 index 0000000000..3a9c1ae705 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/get-index.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-row.md b/docs/examples/1.8.x/server-rest/examples/grids/get-row.md new file mode 100644 index 0000000000..ba3b87bee0 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/get-row.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/get-table.md b/docs/examples/1.8.x/server-rest/examples/grids/get-table.md new file mode 100644 index 0000000000..e562f5c763 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/get-table.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-rest/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..4501951530 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/increment-row-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId}/{column}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "value": 0, + "max": 0 +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-columns.md b/docs/examples/1.8.x/server-rest/examples/grids/list-columns.md new file mode 100644 index 0000000000..82859eaabd --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/list-columns.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/columns HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-databases.md b/docs/examples/1.8.x/server-rest/examples/grids/list-databases.md new file mode 100644 index 0000000000..3b9530eec4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/list-databases.md @@ -0,0 +1,5 @@ +GET /v1/databases HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-rest/examples/grids/list-indexes.md new file mode 100644 index 0000000000..847b2342fe --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/list-indexes.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/list-rows.md new file mode 100644 index 0000000000..d22624083f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/list-rows.md @@ -0,0 +1,7 @@ +GET /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/list-tables.md b/docs/examples/1.8.x/server-rest/examples/grids/list-tables.md new file mode 100644 index 0000000000..d3a4230165 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/list-tables.md @@ -0,0 +1,5 @@ +GET /v1/databases/{databaseId}/grids/tables HTTP/1.1 +Host: cloud.appwrite.io +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..4327743a81 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-boolean-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/boolean/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": false, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-database.md b/docs/examples/1.8.x/server-rest/examples/grids/update-database.md new file mode 100644 index 0000000000..d57ad48927 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-database.md @@ -0,0 +1,11 @@ +PUT /v1/databases/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..bbdc0c3bc4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-datetime-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/datetime/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md new file mode 100644 index 0000000000..b9145a1c33 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-email-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/email/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "email@example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..8d3d6c359f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-enum-column.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/enum/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "elements": [], + "required": false, + "default": "<DEFAULT>", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md new file mode 100644 index 0000000000..5e1a67c6a1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-float-column.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/float/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..f45fbf278f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-integer-column.md @@ -0,0 +1,14 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/integer/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "min": 0, + "max": 0, + "default": 0, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..5080aaab25 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-ip-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/ip/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": , + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..d5d188ced4 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-relationship-column.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/{key}/relationship HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "onDelete": "cascade", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-row.md b/docs/examples/1.8.x/server-rest/examples/grids/update-row.md new file mode 100644 index 0000000000..015fa8faf1 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-row.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/update-rows.md new file mode 100644 index 0000000000..eb5b77bb31 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-rows.md @@ -0,0 +1,11 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "data": {}, + "queries": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md new file mode 100644 index 0000000000..eda416a4d9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-string-column.md @@ -0,0 +1,13 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/string/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "<DEFAULT>", + "size": 1, + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-table.md b/docs/examples/1.8.x/server-rest/examples/grids/update-table.md new file mode 100644 index 0000000000..02d68944f9 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-table.md @@ -0,0 +1,13 @@ +PUT /v1/databases/{databaseId}/grids/tables/{tableId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "name": "<NAME>", + "permissions": ["read(\"any\")"], + "rowSecurity": false, + "enabled": false +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md new file mode 100644 index 0000000000..4e0796887a --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/update-url-column.md @@ -0,0 +1,12 @@ +PATCH /v1/databases/{databaseId}/grids/tables/{tableId}/columns/url/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "required": false, + "default": "https://example.com", + "newKey": +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md new file mode 100644 index 0000000000..c461d7c981 --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/upsert-row.md @@ -0,0 +1,13 @@ +PUT /v1/databases/{databaseId}/grids/tables/{tableId}/rows/{rowId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Session: +X-Appwrite-Key: <YOUR_API_KEY> +X-Appwrite-JWT: <YOUR_JWT> + +{ + "data": {}, + "permissions": ["read(\"any\")"] +} diff --git a/docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..5d9446550f --- /dev/null +++ b/docs/examples/1.8.x/server-rest/examples/grids/upsert-rows.md @@ -0,0 +1,10 @@ +PUT /v1/databases/{databaseId}/grids/tables/{tableId}/rows HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.8.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +X-Appwrite-Key: <YOUR_API_KEY> + +{ + "rows": [] +} diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md b/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md index 2acacb5a5f..f0e27277b1 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-antivirus.md @@ -1,5 +1,5 @@ GET /v1/health/anti-virus HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-cache.md b/docs/examples/1.8.x/server-rest/examples/health/get-cache.md index c98dcf8af1..e0628a1b8a 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-cache.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-cache.md @@ -1,5 +1,5 @@ GET /v1/health/cache HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md b/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md index 9f4f5efee4..8928e8f25a 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-certificate.md @@ -1,5 +1,5 @@ GET /v1/health/certificate HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md b/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md index 9f1efb921b..f636c9c8e7 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-d-b.md @@ -1,5 +1,5 @@ GET /v1/health/db HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md b/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md index b646b7923f..b9bfab3b73 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-failed-jobs.md @@ -1,5 +1,5 @@ GET /v1/health/queue/failed/{name} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md b/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md index d28025f719..e9ab32729c 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-pub-sub.md @@ -1,5 +1,5 @@ GET /v1/health/pubsub HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md index d51b4d60b3..c3d9189a65 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-builds.md @@ -1,5 +1,5 @@ GET /v1/health/queue/builds HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md index 0f3c2f65fe..d70ee360a8 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-certificates.md @@ -1,5 +1,5 @@ GET /v1/health/queue/certificates HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md index ccc72c3404..60fc6db3b2 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-databases.md @@ -1,5 +1,5 @@ GET /v1/health/queue/databases HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md index a4c5e15586..5a9ce59da3 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-deletes.md @@ -1,5 +1,5 @@ GET /v1/health/queue/deletes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md index a28dbf921c..854100e092 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-functions.md @@ -1,5 +1,5 @@ GET /v1/health/queue/functions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md index 0c16e61757..9fa98f13f5 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-logs.md @@ -1,5 +1,5 @@ GET /v1/health/queue/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md index 82b6151af1..2bb61550bb 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-mails.md @@ -1,5 +1,5 @@ GET /v1/health/queue/mails HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md index 6082ec41bd..5fd0f35919 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-messaging.md @@ -1,5 +1,5 @@ GET /v1/health/queue/messaging HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md index c9687b3224..2832b1c980 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-migrations.md @@ -1,5 +1,5 @@ GET /v1/health/queue/migrations HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md index 90eefe75fc..6500b1f84c 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-stats-resources.md @@ -1,5 +1,5 @@ GET /v1/health/queue/stats-resources HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md index 663d39dd2f..9c4e797f32 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-usage.md @@ -1,5 +1,5 @@ GET /v1/health/queue/stats-usage HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md b/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md index 0843ad174f..4db6cf7d8c 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-queue-webhooks.md @@ -1,5 +1,5 @@ GET /v1/health/queue/webhooks HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md b/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md index 9047713439..31c9b8725f 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-storage-local.md @@ -1,5 +1,5 @@ GET /v1/health/storage/local HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-storage.md b/docs/examples/1.8.x/server-rest/examples/health/get-storage.md index 1d46ab179e..69c4ebd910 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-storage.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-storage.md @@ -1,5 +1,5 @@ GET /v1/health/storage HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get-time.md b/docs/examples/1.8.x/server-rest/examples/health/get-time.md index 7661df5732..5396aac6fb 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get-time.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get-time.md @@ -1,5 +1,5 @@ GET /v1/health/time HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/health/get.md b/docs/examples/1.8.x/server-rest/examples/health/get.md index c64b480826..b37e30c4f8 100644 --- a/docs/examples/1.8.x/server-rest/examples/health/get.md +++ b/docs/examples/1.8.x/server-rest/examples/health/get.md @@ -1,5 +1,5 @@ GET /v1/health HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/get.md b/docs/examples/1.8.x/server-rest/examples/locale/get.md index 7b300acb41..6c60c076b6 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/get.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/get.md @@ -1,6 +1,6 @@ GET /v1/locale HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md b/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md index 336ac1477f..3cc2aa9939 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-codes.md @@ -1,6 +1,6 @@ GET /v1/locale/codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md b/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md index d99b138653..8d2b0fa19d 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-continents.md @@ -1,6 +1,6 @@ GET /v1/locale/continents HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md index 3c94877234..ae341f5982 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-e-u.md @@ -1,6 +1,6 @@ GET /v1/locale/countries/eu HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md index 09619edb36..9d59f37a19 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries-phones.md @@ -1,6 +1,6 @@ GET /v1/locale/countries/phones HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md b/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md index 0f1be7e5df..19205d538d 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-countries.md @@ -1,6 +1,6 @@ GET /v1/locale/countries HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md b/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md index c1e03ecae2..fbf6d63496 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-currencies.md @@ -1,6 +1,6 @@ GET /v1/locale/currencies HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md b/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md index 1e2a125985..7f1304d6ff 100644 --- a/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md +++ b/docs/examples/1.8.x/server-rest/examples/locale/list-languages.md @@ -1,6 +1,6 @@ GET /v1/locale/languages HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md index b6860358c1..47d3b98615 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-apns-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/apns HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md index efec44982c..b6c1392bb2 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-email.md @@ -1,7 +1,7 @@ POST /v1/messaging/messages/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md index ec885465a7..f234c80e6e 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-fcm-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/fcm HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md index 8d0eb33938..fd138606e2 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-mailgun-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/mailgun HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md index 2877ff7b89..edbd690d5d 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-msg91provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/msg91 HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md index 6210273820..08ba0357fe 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-push.md @@ -1,7 +1,7 @@ POST /v1/messaging/messages/push HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md index a9f7c933dc..3fa7ee8dd8 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-sendgrid-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/sendgrid HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md index f885563f6f..82926e2a82 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-sms.md @@ -1,7 +1,7 @@ POST /v1/messaging/messages/sms HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md index bbb8e7d212..5963ee474c 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-smtp-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/smtp HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md index 2e61d50b5c..e22a626ac4 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-subscriber.md @@ -1,7 +1,7 @@ POST /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md index 198ccae6f5..a474db823f 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-telesign-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/telesign HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md index 2f2ce558a7..caa7bcd014 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-textmagic-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/textmagic HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md index a44af2764d..9974584212 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-topic.md @@ -1,7 +1,7 @@ POST /v1/messaging/topics HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md index 61fd63b52e..e612eed8be 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-twilio-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/twilio HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md index 16d1c6b594..fdd66526a9 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/create-vonage-provider.md @@ -1,7 +1,7 @@ POST /v1/messaging/providers/vonage HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md index e25c3dcc1c..cfd1ff3b30 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-provider.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/providers/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md index b988897d60..8226237777 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-subscriber.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-JWT: <YOUR_JWT> X-Appwrite-Session: diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md index 3c5c8a9cdb..d340209e93 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete-topic.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/topics/{topicId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/delete.md b/docs/examples/1.8.x/server-rest/examples/messaging/delete.md index a918c2b6f8..e076c96ebf 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/delete.md @@ -1,7 +1,7 @@ DELETE /v1/messaging/messages/{messageId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md index abe744e9c7..ef9ef2c8df 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-message.md @@ -1,5 +1,5 @@ GET /v1/messaging/messages/{messageId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md index 0d2ffe4eaa..361d634760 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-provider.md @@ -1,5 +1,5 @@ GET /v1/messaging/providers/{providerId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md index a1629d4546..c01c5876ac 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-subscriber.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics/{topicId}/subscribers/{subscriberId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md index 5d7efd06de..df5256f5e3 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/get-topic.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics/{topicId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md index 066970a9fb..d8c982e7ea 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-message-logs.md @@ -1,5 +1,5 @@ GET /v1/messaging/messages/{messageId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md index 03a286c376..88964162e3 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-messages.md @@ -1,5 +1,5 @@ GET /v1/messaging/messages HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md index 562264f48e..46c0f76a10 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-provider-logs.md @@ -1,5 +1,5 @@ GET /v1/messaging/providers/{providerId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md index 43522ee34f..e454b3101b 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-providers.md @@ -1,5 +1,5 @@ GET /v1/messaging/providers HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md index f403362529..7fb1192035 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscriber-logs.md @@ -1,5 +1,5 @@ GET /v1/messaging/subscribers/{subscriberId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md index a357f9dc3d..06f67c27c1 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-subscribers.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics/{topicId}/subscribers HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md index 0b4f8caf6f..7c793cfae0 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-targets.md @@ -1,5 +1,5 @@ GET /v1/messaging/messages/{messageId}/targets HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md index 80073b2165..e371aeb2b5 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-topic-logs.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics/{topicId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md b/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md index 2835277aeb..9f18e14b70 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/list-topics.md @@ -1,5 +1,5 @@ GET /v1/messaging/topics HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md index a398b186cb..a55c593039 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-apns-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/apns/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md index 0ef5b89409..97f3911ed1 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-email.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/messages/email/{messageId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md index 50e3a5400d..d485981c5b 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-fcm-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/fcm/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md index f05f0057e7..ec132692c5 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-mailgun-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/mailgun/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md index 1c88425fc1..1013915e5d 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-msg91provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/msg91/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md index adf269301c..438ef373e5 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-push.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/messages/push/{messageId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md index 28ffb526f8..fd30512320 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-sendgrid-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/sendgrid/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md index b5ad82d0f9..a917e270f7 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-sms.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/messages/sms/{messageId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md index 8e69659ce1..9fc45d6726 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-smtp-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/smtp/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md index 548d39dc92..919e99577e 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-telesign-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/telesign/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md index 724b0a4afe..94f965c44a 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-textmagic-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/textmagic/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md index add0bf8ee4..75644d9828 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-topic.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/topics/{topicId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md index 38730383b1..41d04c0c14 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-twilio-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/twilio/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md b/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md index 8c284c827f..0344691e51 100644 --- a/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md +++ b/docs/examples/1.8.x/server-rest/examples/messaging/update-vonage-provider.md @@ -1,7 +1,7 @@ PATCH /v1/messaging/providers/vonage/{providerId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md index 554d2a5365..669ac50a75 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> Content-Length: *Length of your entity body in bytes* diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md index 3da246715b..dbee572372 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-duplicate-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments/duplicate HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md index e37819bfb2..3b21f4f754 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-template-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments/template HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md index 73217d198c..c34be9d619 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-variable.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/variables HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md index 7d5fd3e92e..2e466da0f6 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create-vcs-deployment.md @@ -1,7 +1,7 @@ POST /v1/sites/{siteId}/deployments/vcs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/create.md b/docs/examples/1.8.x/server-rest/examples/sites/create.md index 5493e9d2b6..52b4d87219 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/create.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/create.md @@ -1,7 +1,7 @@ POST /v1/sites HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md index 35bac59efc..3df6aca50f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-deployment.md @@ -1,7 +1,7 @@ DELETE /v1/sites/{siteId}/deployments/{deploymentId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md index 0bd2f661cf..af1d1c339a 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-log.md @@ -1,7 +1,7 @@ DELETE /v1/sites/{siteId}/logs/{logId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md index c3f1d2d293..008ab4b190 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete-variable.md @@ -1,7 +1,7 @@ DELETE /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/delete.md b/docs/examples/1.8.x/server-rest/examples/sites/delete.md index cdb4ced577..0657fff9ef 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/delete.md @@ -1,7 +1,7 @@ DELETE /v1/sites/{siteId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md index d81a7dfc56..3ce065f600 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment-download.md @@ -1,6 +1,6 @@ GET /v1/sites/{siteId}/deployments/{deploymentId}/download HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md index 381c20db77..2ad95813d9 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-deployment.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/deployments/{deploymentId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-log.md b/docs/examples/1.8.x/server-rest/examples/sites/get-log.md index 6b8366461e..41dd30dc8f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get-log.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-log.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/logs/{logId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md index 7c9703ef88..c6d5e70211 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get-variable.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/get.md b/docs/examples/1.8.x/server-rest/examples/sites/get.md index f13b46ecab..da7b67883f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/get.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/get.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md b/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md index 22512f809d..0bc5467894 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-deployments.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/deployments HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md b/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md index 0007a7cd78..8c5f7ff318 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-frameworks.md @@ -1,5 +1,5 @@ GET /v1/sites/frameworks HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md b/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md index 7e77b7e755..57b35c4ef5 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-logs.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md b/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md index 17e8d281c6..cf31760070 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-specifications.md @@ -1,5 +1,5 @@ GET /v1/sites/specifications HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md b/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md index 4f99a74984..7e12fdfd02 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list-variables.md @@ -1,5 +1,5 @@ GET /v1/sites/{siteId}/variables HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/list.md b/docs/examples/1.8.x/server-rest/examples/sites/list.md index d1800f05e5..dc4dc3695f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/list.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/list.md @@ -1,5 +1,5 @@ GET /v1/sites HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md b/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md index 697d9ac371..d4f251c20f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-deployment-status.md @@ -1,7 +1,7 @@ PATCH /v1/sites/{siteId}/deployments/{deploymentId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md b/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md index 51d8736df5..c288b2bf00 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-site-deployment.md @@ -1,7 +1,7 @@ PATCH /v1/sites/{siteId}/deployment HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md b/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md index 61902ee02f..c7fe824ac4 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/update-variable.md @@ -1,7 +1,7 @@ PUT /v1/sites/{siteId}/variables/{variableId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/sites/update.md b/docs/examples/1.8.x/server-rest/examples/sites/update.md index ab3c4dddd1..370984721f 100644 --- a/docs/examples/1.8.x/server-rest/examples/sites/update.md +++ b/docs/examples/1.8.x/server-rest/examples/sites/update.md @@ -1,7 +1,7 @@ PUT /v1/sites/{siteId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md index 8ca9c5701b..59f1c4f403 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/create-bucket.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/create-file.md b/docs/examples/1.8.x/server-rest/examples/storage/create-file.md index e8a54e723b..086fd6dc72 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/create-file.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/create-file.md @@ -1,7 +1,7 @@ POST /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md index 3db8bfbb72..d6083186de 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/delete-bucket.md @@ -1,7 +1,7 @@ DELETE /v1/storage/buckets/{bucketId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md b/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md index cc8a2481f7..467fdf96d1 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/delete-file.md @@ -1,7 +1,7 @@ DELETE /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md index b7def1d44b..2ad1e577c5 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-bucket.md @@ -1,5 +1,5 @@ GET /v1/storage/buckets/{bucketId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md index 4d9c691ba9..af382d3a9a 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-download.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/download HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md index e8a1bdeedf..e00f0ff76f 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-preview.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/preview HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md index d41b8a3512..79f47dcabc 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file-view.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId}/view HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/get-file.md b/docs/examples/1.8.x/server-rest/examples/storage/get-file.md index e11aaa9f05..4a479a78fc 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/get-file.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/get-file.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md b/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md index 3061208d75..bd61c61082 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/list-buckets.md @@ -1,5 +1,5 @@ GET /v1/storage/buckets HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/list-files.md b/docs/examples/1.8.x/server-rest/examples/storage/list-files.md index 7cf8616335..b040ad3a65 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/list-files.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/list-files.md @@ -1,6 +1,6 @@ GET /v1/storage/buckets/{bucketId}/files HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md b/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md index adf12647e2..0f966da0b5 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/update-bucket.md @@ -1,7 +1,7 @@ PUT /v1/storage/buckets/{bucketId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/storage/update-file.md b/docs/examples/1.8.x/server-rest/examples/storage/update-file.md index d91ab4c2d6..1b0137a7de 100644 --- a/docs/examples/1.8.x/server-rest/examples/storage/update-file.md +++ b/docs/examples/1.8.x/server-rest/examples/storage/update-file.md @@ -1,7 +1,7 @@ PUT /v1/storage/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md index f52f796d90..773208cb45 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/create-membership.md @@ -1,7 +1,7 @@ POST /v1/teams/{teamId}/memberships HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/create.md b/docs/examples/1.8.x/server-rest/examples/teams/create.md index 27e7429464..2e1881b5ff 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/create.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/create.md @@ -1,7 +1,7 @@ POST /v1/teams HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md index e897d84a12..454a3f6f4a 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/delete-membership.md @@ -1,7 +1,7 @@ DELETE /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/delete.md b/docs/examples/1.8.x/server-rest/examples/teams/delete.md index 213489c7fb..1bdf2a89ac 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/delete.md @@ -1,7 +1,7 @@ DELETE /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md index 1d10cfe437..8a90498292 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/get-membership.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md index ddb863181d..e541fd3fd8 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/get-prefs.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/get.md b/docs/examples/1.8.x/server-rest/examples/teams/get.md index 4ecf74596b..491e04dc55 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/get.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/get.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md b/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md index 38cc17b71a..9b0fa00492 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/list-memberships.md @@ -1,6 +1,6 @@ GET /v1/teams/{teamId}/memberships HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/list.md b/docs/examples/1.8.x/server-rest/examples/teams/list.md index c67b429008..95b6178e31 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/list.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/list.md @@ -1,6 +1,6 @@ GET /v1/teams HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md b/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md index 9d828118f0..da2c9189cd 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-membership-status.md @@ -1,7 +1,7 @@ PATCH /v1/teams/{teamId}/memberships/{membershipId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md b/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md index 6730d5c27c..a5b8c28723 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-membership.md @@ -1,7 +1,7 @@ PATCH /v1/teams/{teamId}/memberships/{membershipId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-name.md b/docs/examples/1.8.x/server-rest/examples/teams/update-name.md index fa811a2438..1d32b77d39 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/update-name.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-name.md @@ -1,7 +1,7 @@ PUT /v1/teams/{teamId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md index 1db6300350..e17dcdb260 100644 --- a/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/teams/update-prefs.md @@ -1,7 +1,7 @@ PUT /v1/teams/{teamId}/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Session: X-Appwrite-JWT: <YOUR_JWT> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md b/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md index c1fbb63d2d..3d884e2c5d 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/create-file-token.md @@ -1,7 +1,7 @@ POST /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/delete.md b/docs/examples/1.8.x/server-rest/examples/tokens/delete.md index ee564b01c4..a955b4aef5 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/delete.md @@ -1,7 +1,7 @@ DELETE /v1/tokens/{tokenId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/get.md b/docs/examples/1.8.x/server-rest/examples/tokens/get.md index b39c8390e3..381945f58f 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/get.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/get.md @@ -1,5 +1,5 @@ GET /v1/tokens/{tokenId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/list.md b/docs/examples/1.8.x/server-rest/examples/tokens/list.md index 8909d05572..3b0782a81a 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/list.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/list.md @@ -1,5 +1,5 @@ GET /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/tokens/update.md b/docs/examples/1.8.x/server-rest/examples/tokens/update.md index 8ab9d60555..ab58a4842a 100644 --- a/docs/examples/1.8.x/server-rest/examples/tokens/update.md +++ b/docs/examples/1.8.x/server-rest/examples/tokens/update.md @@ -1,7 +1,7 @@ PATCH /v1/tokens/{tokenId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md b/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md index d557cf6d5f..4985ecefd0 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-argon2user.md @@ -1,7 +1,7 @@ POST /v1/users/argon2 HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md index cda7491160..eaf1628252 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-bcrypt-user.md @@ -1,7 +1,7 @@ POST /v1/users/bcrypt HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md b/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md index 83208adadb..8342089042 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-j-w-t.md @@ -1,7 +1,7 @@ POST /v1/users/{userId}/jwts HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md b/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md index d4896133a1..6e82969f00 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-m-d5user.md @@ -1,7 +1,7 @@ POST /v1/users/md5 HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md index 2f6524646d..bef314b585 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-mfa-recovery-codes.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md index 4c10b1a82d..b75c9e23c5 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-p-h-pass-user.md @@ -1,7 +1,7 @@ POST /v1/users/phpass HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md index 5c6467a2fe..7757b44500 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-s-h-a-user.md @@ -1,7 +1,7 @@ POST /v1/users/sha HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md index 19d0650840..9fb5f8de0f 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-modified-user.md @@ -1,7 +1,7 @@ POST /v1/users/scrypt-modified HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md index 008eab6848..ee8828f294 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-scrypt-user.md @@ -1,7 +1,7 @@ POST /v1/users/scrypt HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-session.md b/docs/examples/1.8.x/server-rest/examples/users/create-session.md index ec71d421e0..955e253d39 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-session.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-session.md @@ -1,7 +1,7 @@ POST /v1/users/{userId}/sessions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-target.md b/docs/examples/1.8.x/server-rest/examples/users/create-target.md index fced935c1b..08147220b2 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-target.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-target.md @@ -1,7 +1,7 @@ POST /v1/users/{userId}/targets HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create-token.md b/docs/examples/1.8.x/server-rest/examples/users/create-token.md index 4339252660..2d3b58435a 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create-token.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create-token.md @@ -1,7 +1,7 @@ POST /v1/users/{userId}/tokens HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/create.md b/docs/examples/1.8.x/server-rest/examples/users/create.md index 67d377255b..b638e6511e 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/create.md +++ b/docs/examples/1.8.x/server-rest/examples/users/create.md @@ -1,7 +1,7 @@ POST /v1/users HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md b/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md index c2aa5eed16..a9b2cd04f6 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-identity.md @@ -1,7 +1,7 @@ DELETE /v1/users/identities/{identityId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md b/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md index 9d9e2e950f..92d51fefb5 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-mfa-authenticator.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId}/mfa/authenticators/{type} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-session.md b/docs/examples/1.8.x/server-rest/examples/users/delete-session.md index be204911a2..1ae56081ab 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-session.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-session.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId}/sessions/{sessionId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md b/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md index 54f3a8d4f1..f620f1addc 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-sessions.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId}/sessions HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete-target.md b/docs/examples/1.8.x/server-rest/examples/users/delete-target.md index 77e2c23dd8..4ea75b979b 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete-target.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete-target.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId}/targets/{targetId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/delete.md b/docs/examples/1.8.x/server-rest/examples/users/delete.md index c31212aa71..be2533f442 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/delete.md +++ b/docs/examples/1.8.x/server-rest/examples/users/delete.md @@ -1,7 +1,7 @@ DELETE /v1/users/{userId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md index 58dd32d2a4..1f561f02ad 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/users/get-mfa-recovery-codes.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md b/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md index ac04cc5c44..4d55589a73 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/users/get-prefs.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/prefs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get-target.md b/docs/examples/1.8.x/server-rest/examples/users/get-target.md index 2f19db7c7a..3613d7acb6 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/get-target.md +++ b/docs/examples/1.8.x/server-rest/examples/users/get-target.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/targets/{targetId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/get.md b/docs/examples/1.8.x/server-rest/examples/users/get.md index f654676d9b..53357720cf 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/get.md +++ b/docs/examples/1.8.x/server-rest/examples/users/get.md @@ -1,5 +1,5 @@ GET /v1/users/{userId} HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-identities.md b/docs/examples/1.8.x/server-rest/examples/users/list-identities.md index 180a2127a4..40eed8beec 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-identities.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-identities.md @@ -1,5 +1,5 @@ GET /v1/users/identities HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-logs.md b/docs/examples/1.8.x/server-rest/examples/users/list-logs.md index 7149f50abe..526615b80f 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-logs.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-logs.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/logs HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md b/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md index 7d32f2f726..24de2cdc59 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-memberships.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/memberships HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md b/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md index a75b26e1c5..eb2d3691de 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-mfa-factors.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/mfa/factors HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md b/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md index 1ef39b835b..33efecd536 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-sessions.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/sessions HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list-targets.md b/docs/examples/1.8.x/server-rest/examples/users/list-targets.md index e9542c0da0..229559c958 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list-targets.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list-targets.md @@ -1,5 +1,5 @@ GET /v1/users/{userId}/targets HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/list.md b/docs/examples/1.8.x/server-rest/examples/users/list.md index a92f71439b..2938255449 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/list.md +++ b/docs/examples/1.8.x/server-rest/examples/users/list.md @@ -1,5 +1,5 @@ GET /v1/users HTTP/1.1 Host: cloud.appwrite.io -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md b/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md index cf65c72b0c..1db5556964 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-email-verification.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/verification HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-email.md b/docs/examples/1.8.x/server-rest/examples/users/update-email.md index 10ccafb079..48d871d8d4 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-email.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-email.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/email HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-labels.md b/docs/examples/1.8.x/server-rest/examples/users/update-labels.md index f01603f1f4..d6acca5c7a 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-labels.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-labels.md @@ -1,7 +1,7 @@ PUT /v1/users/{userId}/labels HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md b/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md index aa3bb3f6e6..91e657aec7 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-mfa-recovery-codes.md @@ -1,7 +1,7 @@ PUT /v1/users/{userId}/mfa/recovery-codes HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md b/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md index fce9198887..8a5d1f5052 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-mfa.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/mfa HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-name.md b/docs/examples/1.8.x/server-rest/examples/users/update-name.md index c8988dfb1d..ae1472387a 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-name.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-name.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/name HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-password.md b/docs/examples/1.8.x/server-rest/examples/users/update-password.md index fb796d5619..40220f80d5 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-password.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-password.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/password HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md b/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md index ca3958605b..837874a1e2 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-phone-verification.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/verification/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-phone.md b/docs/examples/1.8.x/server-rest/examples/users/update-phone.md index 5bc196d668..a36f0cc656 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-phone.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-phone.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/phone HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md b/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md index 1db82743e8..5de942c081 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-prefs.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/prefs HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-status.md b/docs/examples/1.8.x/server-rest/examples/users/update-status.md index 6d07f2e15f..95e29fb66e 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-status.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-status.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/status HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-rest/examples/users/update-target.md b/docs/examples/1.8.x/server-rest/examples/users/update-target.md index 926fb166a4..c5f92f342e 100644 --- a/docs/examples/1.8.x/server-rest/examples/users/update-target.md +++ b/docs/examples/1.8.x/server-rest/examples/users/update-target.md @@ -1,7 +1,7 @@ PATCH /v1/users/{userId}/targets/{targetId} HTTP/1.1 Host: cloud.appwrite.io Content-Type: application/json -X-Appwrite-Response-Format: 1.7.0 +X-Appwrite-Response-Format: 1.8.0 X-Appwrite-Project: <YOUR_PROJECT_ID> X-Appwrite-Key: <YOUR_API_KEY> diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md index ce8dea79ef..e6831084a1 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-document.md @@ -4,9 +4,8 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_session('') # The user session to authenticate with - .set_key('<YOUR_API_KEY>') # Your secret API key - .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token databases = Databases.new(client) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md index ecccdf5b21..16abc5e465 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/create-documents.md @@ -4,7 +4,7 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_admin('') # + .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases.new(client) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md index d165e1e6cd..238081864f 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-document.md @@ -4,14 +4,15 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_session('') # The user session to authenticate with - .set_key('<YOUR_API_KEY>') # Your secret API key - .set_jwt('<YOUR_JWT>') # Your secret JSON Web Token databases = Databases.new(client) result = databases.upsert_document( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', - document_id: '<DOCUMENT_ID>' + document_id: '<DOCUMENT_ID>', + data: {}, + permissions: ["read("any")"] # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md index 8e404e684e..30c42aa439 100644 --- a/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-ruby/examples/databases/upsert-documents.md @@ -4,12 +4,13 @@ include Appwrite client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint - .set_admin('') # + .set_project('<YOUR_PROJECT_ID>') # Your project ID .set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases.new(client) result = databases.upsert_documents( database_id: '<DATABASE_ID>', - collection_id: '<COLLECTION_ID>' + collection_id: '<COLLECTION_ID>', + documents: [] ) diff --git a/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md b/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md index b64b1d5c57..666b995d77 100644 --- a/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-ruby/examples/functions/create-execution.md @@ -16,5 +16,5 @@ result = functions.create_execution( path: '<PATH>', # optional method: ExecutionMethod::GET, # optional headers: {}, # optional - scheduled_at: '' # optional + scheduled_at: '<SCHEDULED_AT>' # optional ) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..592f6028aa --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-boolean-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: false, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-database.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-database.md new file mode 100644 index 0000000000..db94d2386e --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-database.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_database( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..4bc97b94ae --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-datetime-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md new file mode 100644 index 0000000000..4a1687d405 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-email-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..2a9b6de5de --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-enum-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md new file mode 100644 index 0000000000..0cd3bee568 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-float-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-index.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-index.md new file mode 100644 index 0000000000..7ef4c2c790 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-index.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + type: IndexType::KEY, + columns: [], + orders: [], # optional + lengths: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..ae7c416965 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-integer-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + min: null, # optional + max: null, # optional + default: null, # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..e407abaee8 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-ip-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..3aecd5757d --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-relationship-column.md @@ -0,0 +1,22 @@ +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + related_table_id: '<RELATED_TABLE_ID>', + type: RelationshipType::ONETOONE, + two_way: false, # optional + key: '', # optional + two_way_key: '', # optional + on_delete: RelationMutate::CASCADE # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-row.md new file mode 100644 index 0000000000..4c4433bd10 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-row.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +grids = Grids.new(client) + +result = grids.create_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md new file mode 100644 index 0000000000..1e619d25ce --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + rows: [] +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md new file mode 100644 index 0000000000..7808c6cfa2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-string-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + size: 1, + required: false, + default: '<DEFAULT>', # optional + array: false, # optional + encrypt: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-table.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-table.md new file mode 100644 index 0000000000..ef3bc4b5cf --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-table.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + row_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md new file mode 100644 index 0000000000..55ff12a1c0 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/create-url-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.create_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', # optional + array: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..fcbc6efedc --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/decrement-row-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.decrement_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '', + value: null, # optional + min: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md new file mode 100644 index 0000000000..79cf84f3fd --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/delete-column.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.delete_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md new file mode 100644 index 0000000000..54d3660b9f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/delete-database.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.delete_database( + database_id: '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md new file mode 100644 index 0000000000..3968cfb675 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/delete-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.delete_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md new file mode 100644 index 0000000000..183f02c5d3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/delete-row.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +grids = Grids.new(client) + +result = grids.delete_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md new file mode 100644 index 0000000000..560d63b033 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/delete-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.delete_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md b/docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md new file mode 100644 index 0000000000..d0c15da17c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/delete-table.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.delete_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-column.md new file mode 100644 index 0000000000..6288772e65 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/get-column.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.get_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-database.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-database.md new file mode 100644 index 0000000000..49a5cde300 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/get-database.md @@ -0,0 +1,14 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.get_database( + database_id: '<DATABASE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-index.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-index.md new file mode 100644 index 0000000000..78a923c0ff --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/get-index.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.get_index( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-row.md new file mode 100644 index 0000000000..e8dc2cb6b1 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/get-row.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +grids = Grids.new(client) + +result = grids.get_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/get-table.md b/docs/examples/1.8.x/server-ruby/examples/grids/get-table.md new file mode 100644 index 0000000000..bafdfe1140 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/get-table.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.get_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>' +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..d09f72080c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/increment-row-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.increment_row_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + column: '', + value: null, # optional + max: null # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md new file mode 100644 index 0000000000..343775300b --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/list-columns.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.list_columns( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md new file mode 100644 index 0000000000..21e54951ee --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/list-databases.md @@ -0,0 +1,15 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.list_databases( + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md new file mode 100644 index 0000000000..2229c87249 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/list-indexes.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.list_indexes( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md new file mode 100644 index 0000000000..40b7be88a7 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/list-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +grids = Grids.new(client) + +result = grids.list_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md b/docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md new file mode 100644 index 0000000000..69b213d3f3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/list-tables.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.list_tables( + database_id: '<DATABASE_ID>', + queries: [], # optional + search: '<SEARCH>' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..78055c777f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-boolean-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_boolean_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: false, + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-database.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-database.md new file mode 100644 index 0000000000..79216c3fd3 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-database.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_database( + database_id: '<DATABASE_ID>', + name: '<NAME>', + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..1737c5a020 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-datetime-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_datetime_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md new file mode 100644 index 0000000000..bc1f4cd7b6 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-email-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_email_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'email@example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..5012002e29 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-enum-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_enum_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + elements: [], + required: false, + default: '<DEFAULT>', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md new file mode 100644 index 0000000000..e05037f10c --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-float-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_float_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..3ec34bd2f2 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-integer-column.md @@ -0,0 +1,21 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_integer_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: null, + min: null, # optional + max: null, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..5394075ae5 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-ip-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_ip_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..2c730048de --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-relationship-column.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_relationship_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + on_delete: RelationMutate::CASCADE, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-row.md new file mode 100644 index 0000000000..57dd5cd381 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-row.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +grids = Grids.new(client) + +result = grids.update_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md new file mode 100644 index 0000000000..602670d67f --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-rows.md @@ -0,0 +1,17 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + data: {}, # optional + queries: [] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md new file mode 100644 index 0000000000..09de9ba697 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-string-column.md @@ -0,0 +1,20 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_string_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: '<DEFAULT>', + size: 1, # optional + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-table.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-table.md new file mode 100644 index 0000000000..742a0c9829 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-table.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_table( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + name: '<NAME>', + permissions: ["read("any")"], # optional + row_security: false, # optional + enabled: false # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md new file mode 100644 index 0000000000..fc3f055708 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/update-url-column.md @@ -0,0 +1,19 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.update_url_column( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + key: '', + required: false, + default: 'https://example.com', + new_key: '' # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md new file mode 100644 index 0000000000..2cf50d92d9 --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/upsert-row.md @@ -0,0 +1,18 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +grids = Grids.new(client) + +result = grids.upsert_row( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + row_id: '<ROW_ID>', + data: {}, # optional + permissions: ["read("any")"] # optional +) diff --git a/docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..af3a7e1dbf --- /dev/null +++ b/docs/examples/1.8.x/server-ruby/examples/grids/upsert-rows.md @@ -0,0 +1,16 @@ +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +grids = Grids.new(client) + +result = grids.upsert_rows( + database_id: '<DATABASE_ID>', + table_id: '<TABLE_ID>', + rows: [] +) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-document.md b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md index 4ee21048ab..daeaf144e1 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/create-document.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-document.md @@ -2,9 +2,8 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token let databases = Databases(client) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md index e4f8582f49..2e992d9e3a 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/create-documents.md @@ -2,7 +2,7 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key let databases = Databases(client) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md index 9c9684e42d..e78bd458a0 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/upsert-document.md @@ -2,15 +2,16 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setSession("") // The user session to authenticate with - .setKey("<YOUR_API_KEY>") // Your secret API key - .setJWT("<YOUR_JWT>") // Your secret JSON Web Token let databases = Databases(client) let document = try await databases.upsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documentId: "<DOCUMENT_ID>" + documentId: "<DOCUMENT_ID>", + data: [:], + permissions: ["read("any")"] // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md b/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md index e63b9a3e67..544f02f9c0 100644 --- a/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md +++ b/docs/examples/1.8.x/server-swift/examples/databases/upsert-documents.md @@ -2,13 +2,14 @@ import Appwrite let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint - .setAdmin("") // + .setProject("<YOUR_PROJECT_ID>") // Your project ID .setKey("<YOUR_API_KEY>") // Your secret API key let databases = Databases(client) let documentList = try await databases.upsertDocuments( databaseId: "<DATABASE_ID>", - collectionId: "<COLLECTION_ID>" + collectionId: "<COLLECTION_ID>", + documents: [] ) diff --git a/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md b/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md index aae7a0f52f..46c9d69087 100644 --- a/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md +++ b/docs/examples/1.8.x/server-swift/examples/functions/create-execution.md @@ -15,6 +15,6 @@ let execution = try await functions.createExecution( path: "<PATH>", // optional method: .gET, // optional headers: [:], // optional - scheduledAt: "" // optional + scheduledAt: "<SCHEDULED_AT>" // optional ) diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md new file mode 100644 index 0000000000..4d0a226eb2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-boolean-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnBoolean = try await grids.createBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-database.md b/docs/examples/1.8.x/server-swift/examples/grids/create-database.md new file mode 100644 index 0000000000..75ec62df4b --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-database.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let database = try await grids.createDatabase( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md new file mode 100644 index 0000000000..8271b44c9f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-datetime-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnDatetime = try await grids.createDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md new file mode 100644 index 0000000000..ca99534c78 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-email-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnEmail = try await grids.createEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md new file mode 100644 index 0000000000..3d52e94a96 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-enum-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnEnum = try await grids.createEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md new file mode 100644 index 0000000000..f0abdc7b9f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-float-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnFloat = try await grids.createFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-index.md b/docs/examples/1.8.x/server-swift/examples/grids/create-index.md new file mode 100644 index 0000000000..2d0c1272b2 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-index.md @@ -0,0 +1,20 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnIndex = try await grids.createIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + type: .key, + columns: [], + orders: [], // optional + lengths: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md new file mode 100644 index 0000000000..dca7968bfb --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-integer-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnInteger = try await grids.createIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + min: 0, // optional + max: 0, // optional + default: 0, // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md new file mode 100644 index 0000000000..9517ed960f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-ip-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnIp = try await grids.createIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md new file mode 100644 index 0000000000..1ead20f97d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-relationship-column.md @@ -0,0 +1,21 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnRelationship = try await grids.createRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + relatedTableId: "<RELATED_TABLE_ID>", + type: .oneToOne, + twoWay: false, // optional + key: "", // optional + twoWayKey: "", // optional + onDelete: .cascade // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-row.md b/docs/examples/1.8.x/server-swift/examples/grids/create-row.md new file mode 100644 index 0000000000..9d042b4034 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-row.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let grids = Grids(client) + +let row = try await grids.createRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/create-rows.md new file mode 100644 index 0000000000..3e1aced6e7 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let rowList = try await grids.createRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md new file mode 100644 index 0000000000..74eea86fe4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-string-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnString = try await grids.createStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + size: 1, + required: false, + default: "<DEFAULT>", // optional + array: false, // optional + encrypt: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-table.md b/docs/examples/1.8.x/server-swift/examples/grids/create-table.md new file mode 100644 index 0000000000..3792c0aee4 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-table.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let table = try await grids.createTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md b/docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md new file mode 100644 index 0000000000..7ea729aa1a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/create-url-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnUrl = try await grids.createUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", // optional + array: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md b/docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md new file mode 100644 index 0000000000..9445843d71 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/decrement-row-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let row = try await grids.decrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + min: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-column.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-column.md new file mode 100644 index 0000000000..b58a4d0890 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/delete-column.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let result = try await grids.deleteColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-database.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-database.md new file mode 100644 index 0000000000..e7600d7726 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/delete-database.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let result = try await grids.deleteDatabase( + databaseId: "<DATABASE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-index.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-index.md new file mode 100644 index 0000000000..d83cd551da --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/delete-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let result = try await grids.deleteIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-row.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-row.md new file mode 100644 index 0000000000..d2d77234a3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/delete-row.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let grids = Grids(client) + +let result = try await grids.deleteRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md new file mode 100644 index 0000000000..6a3f145526 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/delete-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let rowList = try await grids.deleteRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/delete-table.md b/docs/examples/1.8.x/server-swift/examples/grids/delete-table.md new file mode 100644 index 0000000000..8abdfcae2d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/delete-table.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let result = try await grids.deleteTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-column.md b/docs/examples/1.8.x/server-swift/examples/grids/get-column.md new file mode 100644 index 0000000000..68c0d3933d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/get-column.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let result = try await grids.getColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-database.md b/docs/examples/1.8.x/server-swift/examples/grids/get-database.md new file mode 100644 index 0000000000..f3936ae4ba --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/get-database.md @@ -0,0 +1,13 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let database = try await grids.getDatabase( + databaseId: "<DATABASE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-index.md b/docs/examples/1.8.x/server-swift/examples/grids/get-index.md new file mode 100644 index 0000000000..24c3be9e27 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/get-index.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnIndex = try await grids.getIndex( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-row.md b/docs/examples/1.8.x/server-swift/examples/grids/get-row.md new file mode 100644 index 0000000000..4d3e53cba6 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/get-row.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let grids = Grids(client) + +let row = try await grids.getRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/get-table.md b/docs/examples/1.8.x/server-swift/examples/grids/get-table.md new file mode 100644 index 0000000000..9ad5e0c202 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/get-table.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let table = try await grids.getTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>" +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md b/docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md new file mode 100644 index 0000000000..00d9663c22 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/increment-row-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let row = try await grids.incrementRowColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + column: "", + value: 0, // optional + max: 0 // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-columns.md b/docs/examples/1.8.x/server-swift/examples/grids/list-columns.md new file mode 100644 index 0000000000..facf87f9a3 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/list-columns.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnList = try await grids.listColumns( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-databases.md b/docs/examples/1.8.x/server-swift/examples/grids/list-databases.md new file mode 100644 index 0000000000..26d50a24b1 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/list-databases.md @@ -0,0 +1,14 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let databaseList = try await grids.listDatabases( + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md b/docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md new file mode 100644 index 0000000000..c31f162d5d --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/list-indexes.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnIndexList = try await grids.listIndexes( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/list-rows.md new file mode 100644 index 0000000000..01dd6637fc --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/list-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let grids = Grids(client) + +let rowList = try await grids.listRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/list-tables.md b/docs/examples/1.8.x/server-swift/examples/grids/list-tables.md new file mode 100644 index 0000000000..af8cdd1264 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/list-tables.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let tableList = try await grids.listTables( + databaseId: "<DATABASE_ID>", + queries: [], // optional + search: "<SEARCH>" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md new file mode 100644 index 0000000000..8994b79e7c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-boolean-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnBoolean = try await grids.updateBooleanColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: false, + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-database.md b/docs/examples/1.8.x/server-swift/examples/grids/update-database.md new file mode 100644 index 0000000000..827245bd97 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-database.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let database = try await grids.updateDatabase( + databaseId: "<DATABASE_ID>", + name: "<NAME>", + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md new file mode 100644 index 0000000000..7a59cd1ef1 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-datetime-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnDatetime = try await grids.updateDatetimeColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md new file mode 100644 index 0000000000..3704401fa5 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-email-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnEmail = try await grids.updateEmailColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "email@example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md new file mode 100644 index 0000000000..946804a88c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-enum-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnEnum = try await grids.updateEnumColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + elements: [], + required: false, + default: "<DEFAULT>", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md new file mode 100644 index 0000000000..10f0babb2c --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-float-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnFloat = try await grids.updateFloatColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md new file mode 100644 index 0000000000..60e145e3b0 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-integer-column.md @@ -0,0 +1,20 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnInteger = try await grids.updateIntegerColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: 0, + min: 0, // optional + max: 0, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md new file mode 100644 index 0000000000..17f490d644 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-ip-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnIp = try await grids.updateIpColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md new file mode 100644 index 0000000000..994feefa92 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-relationship-column.md @@ -0,0 +1,18 @@ +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnRelationship = try await grids.updateRelationshipColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + onDelete: .cascade, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-row.md b/docs/examples/1.8.x/server-swift/examples/grids/update-row.md new file mode 100644 index 0000000000..3e4408f700 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-row.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let grids = Grids(client) + +let row = try await grids.updateRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/update-rows.md new file mode 100644 index 0000000000..c57463cc8a --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-rows.md @@ -0,0 +1,16 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let rowList = try await grids.updateRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + data: [:], // optional + queries: [] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md new file mode 100644 index 0000000000..e9e2d71c62 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-string-column.md @@ -0,0 +1,19 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnString = try await grids.updateStringColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "<DEFAULT>", + size: 1, // optional + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-table.md b/docs/examples/1.8.x/server-swift/examples/grids/update-table.md new file mode 100644 index 0000000000..8b3fa5e12e --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-table.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let table = try await grids.updateTable( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + name: "<NAME>", + permissions: ["read("any")"], // optional + rowSecurity: false, // optional + enabled: false // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md b/docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md new file mode 100644 index 0000000000..b72666e240 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/update-url-column.md @@ -0,0 +1,18 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let columnUrl = try await grids.updateUrlColumn( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + key: "", + required: false, + default: "https://example.com", + newKey: "" // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md b/docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md new file mode 100644 index 0000000000..1d09e7b767 --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/upsert-row.md @@ -0,0 +1,17 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let grids = Grids(client) + +let row = try await grids.upsertRow( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rowId: "<ROW_ID>", + data: [:], // optional + permissions: ["read("any")"] // optional +) + diff --git a/docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md b/docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md new file mode 100644 index 0000000000..84173c9c0f --- /dev/null +++ b/docs/examples/1.8.x/server-swift/examples/grids/upsert-rows.md @@ -0,0 +1,15 @@ +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let grids = Grids(client) + +let rowList = try await grids.upsertRows( + databaseId: "<DATABASE_ID>", + tableId: "<TABLE_ID>", + rows: [] +) + diff --git a/docs/references/grids/create-boolean-column.md b/docs/references/grids/create-boolean-column.md new file mode 100644 index 0000000000..c528ede1a2 --- /dev/null +++ b/docs/references/grids/create-boolean-column.md @@ -0,0 +1 @@ +Create a boolean column. diff --git a/docs/references/grids/create-database.md b/docs/references/grids/create-database.md new file mode 100644 index 0000000000..b608485341 --- /dev/null +++ b/docs/references/grids/create-database.md @@ -0,0 +1 @@ +Create a new Database. diff --git a/docs/references/grids/create-datetime-column.md b/docs/references/grids/create-datetime-column.md new file mode 100644 index 0000000000..ad92750639 --- /dev/null +++ b/docs/references/grids/create-datetime-column.md @@ -0,0 +1 @@ +Create a date time column according to the ISO 8601 standard. \ No newline at end of file diff --git a/docs/references/grids/create-email-column.md b/docs/references/grids/create-email-column.md new file mode 100644 index 0000000000..91aa5c9326 --- /dev/null +++ b/docs/references/grids/create-email-column.md @@ -0,0 +1 @@ +Create an email column. diff --git a/docs/references/grids/create-enum-column.md b/docs/references/grids/create-enum-column.md new file mode 100644 index 0000000000..b9e5a3ebe4 --- /dev/null +++ b/docs/references/grids/create-enum-column.md @@ -0,0 +1 @@ +Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. \ No newline at end of file diff --git a/docs/references/grids/create-float-column.md b/docs/references/grids/create-float-column.md new file mode 100644 index 0000000000..0b133eef28 --- /dev/null +++ b/docs/references/grids/create-float-column.md @@ -0,0 +1 @@ +Create a float column. Optionally, minimum and maximum values can be provided. diff --git a/docs/references/grids/create-index.md b/docs/references/grids/create-index.md new file mode 100644 index 0000000000..6ce853a217 --- /dev/null +++ b/docs/references/grids/create-index.md @@ -0,0 +1,2 @@ +Creates an index on the columns listed. Your index should include all the columns you will query in a single request. +Columns can be `key`, `fulltext`, and `unique`. \ No newline at end of file diff --git a/docs/references/grids/create-integer-column.md b/docs/references/grids/create-integer-column.md new file mode 100644 index 0000000000..5f51b3965a --- /dev/null +++ b/docs/references/grids/create-integer-column.md @@ -0,0 +1 @@ +Create an integer column. Optionally, minimum and maximum values can be provided. diff --git a/docs/references/grids/create-ip-column.md b/docs/references/grids/create-ip-column.md new file mode 100644 index 0000000000..012431dbae --- /dev/null +++ b/docs/references/grids/create-ip-column.md @@ -0,0 +1 @@ +Create IP address column. diff --git a/docs/references/grids/create-relationship-column.md b/docs/references/grids/create-relationship-column.md new file mode 100644 index 0000000000..d87d8bccf8 --- /dev/null +++ b/docs/references/grids/create-relationship-column.md @@ -0,0 +1 @@ +Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). diff --git a/docs/references/grids/create-row.md b/docs/references/grids/create-row.md new file mode 100644 index 0000000000..a07abfa04d --- /dev/null +++ b/docs/references/grids/create-row.md @@ -0,0 +1 @@ +Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/grids/create-rows.md b/docs/references/grids/create-rows.md new file mode 100644 index 0000000000..cea67913b4 --- /dev/null +++ b/docs/references/grids/create-rows.md @@ -0,0 +1 @@ +Create new Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/grids/create-string-column.md b/docs/references/grids/create-string-column.md new file mode 100644 index 0000000000..7395e26a11 --- /dev/null +++ b/docs/references/grids/create-string-column.md @@ -0,0 +1 @@ +Create a string column. diff --git a/docs/references/grids/create-table.md b/docs/references/grids/create-table.md new file mode 100644 index 0000000000..263638ea00 --- /dev/null +++ b/docs/references/grids/create-table.md @@ -0,0 +1 @@ +Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/grids/create-url-column.md b/docs/references/grids/create-url-column.md new file mode 100644 index 0000000000..e731d758ce --- /dev/null +++ b/docs/references/grids/create-url-column.md @@ -0,0 +1 @@ +Create a URL column. diff --git a/docs/references/grids/decrement-row-column.md b/docs/references/grids/decrement-row-column.md new file mode 100644 index 0000000000..b7b32d6148 --- /dev/null +++ b/docs/references/grids/decrement-row-column.md @@ -0,0 +1 @@ +Decrement a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/grids/delete-column.md b/docs/references/grids/delete-column.md new file mode 100644 index 0000000000..efba8b1d77 --- /dev/null +++ b/docs/references/grids/delete-column.md @@ -0,0 +1 @@ +Deletes a column. \ No newline at end of file diff --git a/docs/references/grids/delete-database.md b/docs/references/grids/delete-database.md new file mode 100644 index 0000000000..605fa290d3 --- /dev/null +++ b/docs/references/grids/delete-database.md @@ -0,0 +1 @@ +Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database. \ No newline at end of file diff --git a/docs/references/grids/delete-index.md b/docs/references/grids/delete-index.md new file mode 100644 index 0000000000..c5b8f49e5f --- /dev/null +++ b/docs/references/grids/delete-index.md @@ -0,0 +1 @@ +Delete an index. \ No newline at end of file diff --git a/docs/references/grids/delete-row.md b/docs/references/grids/delete-row.md new file mode 100644 index 0000000000..c0b9dfbdaf --- /dev/null +++ b/docs/references/grids/delete-row.md @@ -0,0 +1 @@ +Delete a row by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/delete-rows.md b/docs/references/grids/delete-rows.md new file mode 100644 index 0000000000..9d5189ce76 --- /dev/null +++ b/docs/references/grids/delete-rows.md @@ -0,0 +1 @@ +Bulk delete rows using queries, if no queries are passed then all rows are deleted. \ No newline at end of file diff --git a/docs/references/grids/delete-table.md b/docs/references/grids/delete-table.md new file mode 100644 index 0000000000..ad74ca3233 --- /dev/null +++ b/docs/references/grids/delete-table.md @@ -0,0 +1 @@ +Delete a table by its unique ID. Only users with write permissions have access to delete this resource. \ No newline at end of file diff --git a/docs/references/grids/get-column.md b/docs/references/grids/get-column.md new file mode 100644 index 0000000000..cd8b8797a9 --- /dev/null +++ b/docs/references/grids/get-column.md @@ -0,0 +1 @@ +Get column by ID. \ No newline at end of file diff --git a/docs/references/grids/get-database-usage.md b/docs/references/grids/get-database-usage.md new file mode 100644 index 0000000000..d9298f4814 --- /dev/null +++ b/docs/references/grids/get-database-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/grids/get-database.md b/docs/references/grids/get-database.md new file mode 100644 index 0000000000..24183f6f6b --- /dev/null +++ b/docs/references/grids/get-database.md @@ -0,0 +1 @@ +Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata. \ No newline at end of file diff --git a/docs/references/grids/get-index.md b/docs/references/grids/get-index.md new file mode 100644 index 0000000000..cdea5b4f27 --- /dev/null +++ b/docs/references/grids/get-index.md @@ -0,0 +1 @@ +Get index by ID. \ No newline at end of file diff --git a/docs/references/grids/get-logs.md b/docs/references/grids/get-logs.md new file mode 100644 index 0000000000..8e49da4603 --- /dev/null +++ b/docs/references/grids/get-logs.md @@ -0,0 +1 @@ +Get the database activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/get-row-logs.md b/docs/references/grids/get-row-logs.md new file mode 100644 index 0000000000..1d494ed53e --- /dev/null +++ b/docs/references/grids/get-row-logs.md @@ -0,0 +1 @@ +Get the row activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/get-row.md b/docs/references/grids/get-row.md new file mode 100644 index 0000000000..6a30fa472c --- /dev/null +++ b/docs/references/grids/get-row.md @@ -0,0 +1 @@ +Get a row by its unique ID. This endpoint response returns a JSON object with the row data. \ No newline at end of file diff --git a/docs/references/grids/get-table-logs.md b/docs/references/grids/get-table-logs.md new file mode 100644 index 0000000000..8b00c7f317 --- /dev/null +++ b/docs/references/grids/get-table-logs.md @@ -0,0 +1 @@ +Get the table activity logs list by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/get-table-usage.md b/docs/references/grids/get-table-usage.md new file mode 100644 index 0000000000..08e28af0a6 --- /dev/null +++ b/docs/references/grids/get-table-usage.md @@ -0,0 +1 @@ +Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/grids/get-table.md b/docs/references/grids/get-table.md new file mode 100644 index 0000000000..67b8428431 --- /dev/null +++ b/docs/references/grids/get-table.md @@ -0,0 +1 @@ +Get a table by its unique ID. This endpoint response returns a JSON object with the table metadata. \ No newline at end of file diff --git a/docs/references/grids/increment-row-column.md b/docs/references/grids/increment-row-column.md new file mode 100644 index 0000000000..7a19b3fbc7 --- /dev/null +++ b/docs/references/grids/increment-row-column.md @@ -0,0 +1 @@ +Increment a specific column of a row by a given value. \ No newline at end of file diff --git a/docs/references/grids/list-columns.md b/docs/references/grids/list-columns.md new file mode 100644 index 0000000000..aacf373082 --- /dev/null +++ b/docs/references/grids/list-columns.md @@ -0,0 +1 @@ +List columns in the table. \ No newline at end of file diff --git a/docs/references/grids/list-database-usage.md b/docs/references/grids/list-database-usage.md new file mode 100644 index 0000000000..2bf5ed81e1 --- /dev/null +++ b/docs/references/grids/list-database-usage.md @@ -0,0 +1 @@ +List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. \ No newline at end of file diff --git a/docs/references/grids/list-databases.md b/docs/references/grids/list-databases.md new file mode 100644 index 0000000000..d93fb9d7a8 --- /dev/null +++ b/docs/references/grids/list-databases.md @@ -0,0 +1 @@ +Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. \ No newline at end of file diff --git a/docs/references/grids/list-indexes.md b/docs/references/grids/list-indexes.md new file mode 100644 index 0000000000..a0c7b2f861 --- /dev/null +++ b/docs/references/grids/list-indexes.md @@ -0,0 +1 @@ +List indexes in the table. \ No newline at end of file diff --git a/docs/references/grids/list-rows.md b/docs/references/grids/list-rows.md new file mode 100644 index 0000000000..68185fc192 --- /dev/null +++ b/docs/references/grids/list-rows.md @@ -0,0 +1 @@ +Get a list of all the user's rows in a given table. You can use the query params to filter your results. \ No newline at end of file diff --git a/docs/references/grids/list-tables.md b/docs/references/grids/list-tables.md new file mode 100644 index 0000000000..e14795eeac --- /dev/null +++ b/docs/references/grids/list-tables.md @@ -0,0 +1 @@ +Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results. \ No newline at end of file diff --git a/docs/references/grids/update-boolean-column.md b/docs/references/grids/update-boolean-column.md new file mode 100644 index 0000000000..f5167d97b6 --- /dev/null +++ b/docs/references/grids/update-boolean-column.md @@ -0,0 +1 @@ +Update a boolean column. Changing the `default` value will not update already existing rows. \ No newline at end of file diff --git a/docs/references/grids/update-database.md b/docs/references/grids/update-database.md new file mode 100644 index 0000000000..4e99bf2e07 --- /dev/null +++ b/docs/references/grids/update-database.md @@ -0,0 +1 @@ +Update a database by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/update-datetime-column.md b/docs/references/grids/update-datetime-column.md new file mode 100644 index 0000000000..e793b41921 --- /dev/null +++ b/docs/references/grids/update-datetime-column.md @@ -0,0 +1 @@ +Update a date time column. Changing the `default` value will not update already existing rows. \ No newline at end of file diff --git a/docs/references/grids/update-email-column.md b/docs/references/grids/update-email-column.md new file mode 100644 index 0000000000..0db17e29bd --- /dev/null +++ b/docs/references/grids/update-email-column.md @@ -0,0 +1 @@ +Update an email column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-enum-column.md b/docs/references/grids/update-enum-column.md new file mode 100644 index 0000000000..df172cbc38 --- /dev/null +++ b/docs/references/grids/update-enum-column.md @@ -0,0 +1 @@ +Update an enum column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-float-column.md b/docs/references/grids/update-float-column.md new file mode 100644 index 0000000000..4e0eb9ddb2 --- /dev/null +++ b/docs/references/grids/update-float-column.md @@ -0,0 +1 @@ +Update a float column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-integer-column.md b/docs/references/grids/update-integer-column.md new file mode 100644 index 0000000000..0f2a07ea6e --- /dev/null +++ b/docs/references/grids/update-integer-column.md @@ -0,0 +1 @@ +Update an integer column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-ip-column.md b/docs/references/grids/update-ip-column.md new file mode 100644 index 0000000000..115c87a7e1 --- /dev/null +++ b/docs/references/grids/update-ip-column.md @@ -0,0 +1 @@ +Update an ip column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-relationship-column.md b/docs/references/grids/update-relationship-column.md new file mode 100644 index 0000000000..dfdcd8ae5a --- /dev/null +++ b/docs/references/grids/update-relationship-column.md @@ -0,0 +1 @@ +Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). diff --git a/docs/references/grids/update-row.md b/docs/references/grids/update-row.md new file mode 100644 index 0000000000..b532ea411d --- /dev/null +++ b/docs/references/grids/update-row.md @@ -0,0 +1 @@ +Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated. \ No newline at end of file diff --git a/docs/references/grids/update-rows.md b/docs/references/grids/update-rows.md new file mode 100644 index 0000000000..334b91aec1 --- /dev/null +++ b/docs/references/grids/update-rows.md @@ -0,0 +1 @@ +Update all rows that match your queries, if no queries are submitted then all rows are updated. You can pass only specific fields to be updated. \ No newline at end of file diff --git a/docs/references/grids/update-string-column.md b/docs/references/grids/update-string-column.md new file mode 100644 index 0000000000..617214b4c9 --- /dev/null +++ b/docs/references/grids/update-string-column.md @@ -0,0 +1 @@ +Update a string column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/update-table.md b/docs/references/grids/update-table.md new file mode 100644 index 0000000000..bbd676d3b8 --- /dev/null +++ b/docs/references/grids/update-table.md @@ -0,0 +1 @@ +Update a table by its unique ID. \ No newline at end of file diff --git a/docs/references/grids/update-url-column.md b/docs/references/grids/update-url-column.md new file mode 100644 index 0000000000..6080d71509 --- /dev/null +++ b/docs/references/grids/update-url-column.md @@ -0,0 +1 @@ +Update an url column. Changing the `default` value will not update already existing rows. diff --git a/docs/references/grids/upsert-row.md b/docs/references/grids/upsert-row.md new file mode 100644 index 0000000000..1132afd53c --- /dev/null +++ b/docs/references/grids/upsert-row.md @@ -0,0 +1 @@ +Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/grids/upsert-rows.md b/docs/references/grids/upsert-rows.md new file mode 100644 index 0000000000..21aa3da1ef --- /dev/null +++ b/docs/references/grids/upsert-rows.md @@ -0,0 +1 @@ +Create or update Rows. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateTable) API or directly from your database console. From 0023d5afc2154efbf62a5c49a8d16d77f0b6983a Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Wed, 30 Jul 2025 14:35:25 +0530 Subject: [PATCH 322/362] update: sdk-gen. --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index cae0976158..3fc23b8dcf 100644 --- a/composer.lock +++ b/composer.lock @@ -4810,16 +4810,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.24", + "version": "0.41.26", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "c9ebf8daa25332ca701515d42e8d0c4a7be6a489" + "reference": "5a13191a5a4bdec8fe1b1180ff67f75c4ff6ac0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/c9ebf8daa25332ca701515d42e8d0c4a7be6a489", - "reference": "c9ebf8daa25332ca701515d42e8d0c4a7be6a489", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/5a13191a5a4bdec8fe1b1180ff67f75c4ff6ac0b", + "reference": "5a13191a5a4bdec8fe1b1180ff67f75c4ff6ac0b", "shasum": "" }, "require": { @@ -4855,9 +4855,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.24" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.26" }, - "time": "2025-07-28T06:27:00+00:00" + "time": "2025-07-30T06:53:12+00:00" }, { "name": "doctrine/annotations", From e76aba3fd478e34aaa28aab75df39e8dce065a80 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Thu, 31 Jul 2025 13:19:55 +0300 Subject: [PATCH 323/362] Revert composer --- composer.json | 2 +- composer.lock | 27 +++++++++------------------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index d76918fa7e..40740b711f 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "dev-cast-sequence as 0.73.2", + "utopia-php/database": "0.73.*", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index db551ed0f4..bddc8ec936 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": "69f5a2e965cd9c1233044629699d3d28", + "content-hash": "f152305ec0b90245773867cde288582d", "packages": [ { "name": "adhocore/jwt", @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "dev-cast-sequence", + "version": "0.73.2", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "749cb0606a88ad4282b182feaa7e380627126b86" + "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/749cb0606a88ad4282b182feaa7e380627126b86", - "reference": "749cb0606a88ad4282b182feaa7e380627126b86", + "url": "https://api.github.com/repos/utopia-php/database/zipball/68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", + "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/cast-sequence" + "source": "https://github.com/utopia-php/database/tree/0.73.2" }, - "time": "2025-07-29T05:33:45+00:00" + "time": "2025-07-29T03:23:04+00:00" }, { "name": "utopia-php/detector", @@ -8237,18 +8237,9 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [ - { - "package": "utopia-php/database", - "version": "dev-cast-sequence", - "alias": "0.73.2", - "alias_normalized": "0.73.2.0" - } - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/database": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From 6ead087e916a4d6c789e7d9eca8d56b41cdfb5e6 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Thu, 31 Jul 2025 14:26:36 +0300 Subject: [PATCH 324/362] fix nesting if --- app/init/resources.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/init/resources.php b/app/init/resources.php index be59871dfe..4d1e0444c5 100644 --- a/app/init/resources.php +++ b/app/init/resources.php @@ -239,13 +239,11 @@ App::setResource('user', function ($mode, $project, $console, $request, $respons if (!empty(Auth::$unique)) { if ($mode === APP_MODE_ADMIN) { $user = $dbForPlatform->getDocument('users', Auth::$unique); - } else { - if (!$project->isEmpty()) { - if ($project->getId() === 'console') { - $user = $dbForPlatform->getDocument('users', Auth::$unique); - } else { - $user = $dbForProject->getDocument('users', Auth::$unique); - } + } elseif (!$project->isEmpty()) { + if ($project->getId() === 'console') { + $user = $dbForPlatform->getDocument('users', Auth::$unique); + } else { + $user = $dbForProject->getDocument('users', Auth::$unique); } } } From de6ee12daf4920160e659f13ff1fe13979f323c0 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Fri, 1 Aug 2025 01:42:57 +1200 Subject: [PATCH 325/362] Update db --- composer.json | 2 +- composer.lock | 110 ++++++++++++++++++++++++++++++-------------------- 2 files changed, 68 insertions(+), 44 deletions(-) diff --git a/composer.json b/composer.json index e0c9dc36af..51d3b89ec7 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.73.*", + "utopia-php/database": "0.74.*", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index 3fc23b8dcf..a5b20cd761 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": "a2740535c6a9ebbcf6d01df4d35bb78d", + "content-hash": "c4ae112243a897e16552c507c5e94097", "packages": [ { "name": "adhocore/jwt", @@ -2547,16 +2547,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.1", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64" + "reference": "1c064a0c67749923483216b081066642751cc2c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/4403d87a2c16f33345dca93407a8714ee8c05a64", - "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64", + "url": "https://api.github.com/repos/symfony/http-client/zipball/1c064a0c67749923483216b081066642751cc2c7", + "reference": "1c064a0c67749923483216b081066642751cc2c7", "shasum": "" }, "require": { @@ -2622,7 +2622,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.1" + "source": "https://github.com/symfony/http-client/tree/v7.3.2" }, "funding": [ { @@ -2633,12 +2633,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-06-28T07:58:39+00:00" + "time": "2025-07-15T11:36:08+00:00" }, { "name": "symfony/http-client-contracts", @@ -3493,16 +3497,16 @@ }, { "name": "utopia-php/database", - "version": "0.73.2", + "version": "0.74.2", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480" + "reference": "0e9b85b9ce1a2e754c5a644a2b235dc6e23905b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", - "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", + "url": "https://api.github.com/repos/utopia-php/database/zipball/0e9b85b9ce1a2e754c5a644a2b235dc6e23905b3", + "reference": "0e9b85b9ce1a2e754c5a644a2b235dc6e23905b3", "shasum": "" }, "require": { @@ -3543,9 +3547,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.73.2" + "source": "https://github.com/utopia-php/database/tree/0.74.2" }, - "time": "2025-07-29T03:23:04+00:00" + "time": "2025-07-31T13:40:40+00:00" }, { "name": "utopia-php/detector", @@ -7258,16 +7262,16 @@ }, { "name": "symfony/console", - "version": "v7.3.1", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" + "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", + "url": "https://api.github.com/repos/symfony/console/zipball/5f360ebc65c55265a74d23d7fe27f957870158a1", + "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1", "shasum": "" }, "require": { @@ -7332,7 +7336,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.1" + "source": "https://github.com/symfony/console/tree/v7.3.2" }, "funding": [ { @@ -7343,25 +7347,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-06-27T19:55:54+00:00" + "time": "2025-07-30T17:13:41+00:00" }, { "name": "symfony/filesystem", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", - "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", "shasum": "" }, "require": { @@ -7398,7 +7406,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.0" + "source": "https://github.com/symfony/filesystem/tree/v7.3.2" }, "funding": [ { @@ -7409,25 +7417,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-10-25T15:15:23+00:00" + "time": "2025-07-07T08:17:47+00:00" }, { "name": "symfony/finder", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d" + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ec2344cf77a48253bbca6939aa3d2477773ea63d", - "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d", + "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", "shasum": "" }, "require": { @@ -7462,7 +7474,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.0" + "source": "https://github.com/symfony/finder/tree/v7.3.2" }, "funding": [ { @@ -7473,25 +7485,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-12-30T19:00:26+00:00" + "time": "2025-07-15T13:41:35+00:00" }, { "name": "symfony/options-resolver", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "afb9a8038025e5dbc657378bfab9198d75f10fca" + "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/afb9a8038025e5dbc657378bfab9198d75f10fca", - "reference": "afb9a8038025e5dbc657378bfab9198d75f10fca", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/119bcf13e67dbd188e5dbc74228b1686f66acd37", + "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37", "shasum": "" }, "require": { @@ -7529,7 +7545,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.3.0" + "source": "https://github.com/symfony/options-resolver/tree/v7.3.2" }, "funding": [ { @@ -7540,12 +7556,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-04T13:12:05+00:00" + "time": "2025-07-15T11:36:08+00:00" }, { "name": "symfony/polyfill-ctype", @@ -7924,16 +7944,16 @@ }, { "name": "symfony/string", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125" + "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f3570b8c61ca887a9e2938e85cb6458515d2b125", - "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125", + "url": "https://api.github.com/repos/symfony/string/zipball/42f505aff654e62ac7ac2ce21033818297ca89ca", + "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca", "shasum": "" }, "require": { @@ -7991,7 +8011,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.3.0" + "source": "https://github.com/symfony/string/tree/v7.3.2" }, "funding": [ { @@ -8002,12 +8022,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-20T20:19:01+00:00" + "time": "2025-07-10T08:47:49+00:00" }, { "name": "textalk/websocket", From d6b0d139917f326edd699a2eb763e66961b6eaaf Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Thu, 31 Jul 2025 16:58:51 +0300 Subject: [PATCH 326/362] Run tests --- composer.json | 2 +- composer.lock | 135 +++++++++++++++++++++++++++++++------------------- 2 files changed, 85 insertions(+), 52 deletions(-) diff --git a/composer.json b/composer.json index e0c9dc36af..2d7b85f646 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.73.*", + "utopia-php/database": "dev-primary-attribute as 0.73.2", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index 3fc23b8dcf..f0cbe1beb5 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": "a2740535c6a9ebbcf6d01df4d35bb78d", + "content-hash": "5f540db5a1e36b3345e4f56fc491da3a", "packages": [ { "name": "adhocore/jwt", @@ -2547,16 +2547,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.1", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64" + "reference": "1c064a0c67749923483216b081066642751cc2c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/4403d87a2c16f33345dca93407a8714ee8c05a64", - "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64", + "url": "https://api.github.com/repos/symfony/http-client/zipball/1c064a0c67749923483216b081066642751cc2c7", + "reference": "1c064a0c67749923483216b081066642751cc2c7", "shasum": "" }, "require": { @@ -2622,7 +2622,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.1" + "source": "https://github.com/symfony/http-client/tree/v7.3.2" }, "funding": [ { @@ -2633,12 +2633,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-06-28T07:58:39+00:00" + "time": "2025-07-15T11:36:08+00:00" }, { "name": "symfony/http-client-contracts", @@ -3493,16 +3497,16 @@ }, { "name": "utopia-php/database", - "version": "0.73.2", + "version": "dev-primary-attribute", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480" + "reference": "9961ba26ccfd7eb64b59accfa729349ad772f743" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", - "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", + "url": "https://api.github.com/repos/utopia-php/database/zipball/9961ba26ccfd7eb64b59accfa729349ad772f743", + "reference": "9961ba26ccfd7eb64b59accfa729349ad772f743", "shasum": "" }, "require": { @@ -3543,9 +3547,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.73.2" + "source": "https://github.com/utopia-php/database/tree/primary-attribute" }, - "time": "2025-07-29T03:23:04+00:00" + "time": "2025-07-31T13:07:59+00:00" }, { "name": "utopia-php/detector", @@ -3993,16 +3997,16 @@ }, { "name": "utopia-php/migration", - "version": "0.13.5", + "version": "0.13.6", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "8142d722d8eeec443e6d5df91b69ecf89b86df8e" + "reference": "610b4e7a6c0d538703e4b2d74605ce5377a36617" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/8142d722d8eeec443e6d5df91b69ecf89b86df8e", - "reference": "8142d722d8eeec443e6d5df91b69ecf89b86df8e", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/610b4e7a6c0d538703e4b2d74605ce5377a36617", + "reference": "610b4e7a6c0d538703e4b2d74605ce5377a36617", "shasum": "" }, "require": { @@ -4043,9 +4047,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.13.5" + "source": "https://github.com/utopia-php/migration/tree/0.13.6" }, - "time": "2025-07-29T04:15:45+00:00" + "time": "2025-07-31T13:51:25+00:00" }, { "name": "utopia-php/orchestration", @@ -7258,16 +7262,16 @@ }, { "name": "symfony/console", - "version": "v7.3.1", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" + "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", + "url": "https://api.github.com/repos/symfony/console/zipball/5f360ebc65c55265a74d23d7fe27f957870158a1", + "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1", "shasum": "" }, "require": { @@ -7332,7 +7336,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.1" + "source": "https://github.com/symfony/console/tree/v7.3.2" }, "funding": [ { @@ -7343,25 +7347,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-06-27T19:55:54+00:00" + "time": "2025-07-30T17:13:41+00:00" }, { "name": "symfony/filesystem", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", - "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", "shasum": "" }, "require": { @@ -7398,7 +7406,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.0" + "source": "https://github.com/symfony/filesystem/tree/v7.3.2" }, "funding": [ { @@ -7409,25 +7417,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-10-25T15:15:23+00:00" + "time": "2025-07-07T08:17:47+00:00" }, { "name": "symfony/finder", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d" + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ec2344cf77a48253bbca6939aa3d2477773ea63d", - "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d", + "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", "shasum": "" }, "require": { @@ -7462,7 +7474,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.0" + "source": "https://github.com/symfony/finder/tree/v7.3.2" }, "funding": [ { @@ -7473,25 +7485,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-12-30T19:00:26+00:00" + "time": "2025-07-15T13:41:35+00:00" }, { "name": "symfony/options-resolver", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "afb9a8038025e5dbc657378bfab9198d75f10fca" + "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/afb9a8038025e5dbc657378bfab9198d75f10fca", - "reference": "afb9a8038025e5dbc657378bfab9198d75f10fca", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/119bcf13e67dbd188e5dbc74228b1686f66acd37", + "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37", "shasum": "" }, "require": { @@ -7529,7 +7545,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.3.0" + "source": "https://github.com/symfony/options-resolver/tree/v7.3.2" }, "funding": [ { @@ -7540,12 +7556,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-04T13:12:05+00:00" + "time": "2025-07-15T11:36:08+00:00" }, { "name": "symfony/polyfill-ctype", @@ -7924,16 +7944,16 @@ }, { "name": "symfony/string", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125" + "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f3570b8c61ca887a9e2938e85cb6458515d2b125", - "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125", + "url": "https://api.github.com/repos/symfony/string/zipball/42f505aff654e62ac7ac2ce21033818297ca89ca", + "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca", "shasum": "" }, "require": { @@ -7991,7 +8011,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.3.0" + "source": "https://github.com/symfony/string/tree/v7.3.2" }, "funding": [ { @@ -8002,12 +8022,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-20T20:19:01+00:00" + "time": "2025-07-10T08:47:49+00:00" }, { "name": "textalk/websocket", @@ -8237,9 +8261,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-primary-attribute", + "alias": "0.73.2", + "alias_normalized": "0.73.2.0" + } + ], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/database": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From a54cf58610b1a32a94e7f7e11f1196fc84adce05 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Thu, 31 Jul 2025 17:03:21 +0300 Subject: [PATCH 327/362] Run tests --- composer.lock | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/composer.lock b/composer.lock index a5b20cd761..f0cbe1beb5 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": "c4ae112243a897e16552c507c5e94097", + "content-hash": "5f540db5a1e36b3345e4f56fc491da3a", "packages": [ { "name": "adhocore/jwt", @@ -3497,16 +3497,16 @@ }, { "name": "utopia-php/database", - "version": "0.74.2", + "version": "dev-primary-attribute", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "0e9b85b9ce1a2e754c5a644a2b235dc6e23905b3" + "reference": "9961ba26ccfd7eb64b59accfa729349ad772f743" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/0e9b85b9ce1a2e754c5a644a2b235dc6e23905b3", - "reference": "0e9b85b9ce1a2e754c5a644a2b235dc6e23905b3", + "url": "https://api.github.com/repos/utopia-php/database/zipball/9961ba26ccfd7eb64b59accfa729349ad772f743", + "reference": "9961ba26ccfd7eb64b59accfa729349ad772f743", "shasum": "" }, "require": { @@ -3547,9 +3547,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.74.2" + "source": "https://github.com/utopia-php/database/tree/primary-attribute" }, - "time": "2025-07-31T13:40:40+00:00" + "time": "2025-07-31T13:07:59+00:00" }, { "name": "utopia-php/detector", @@ -3997,16 +3997,16 @@ }, { "name": "utopia-php/migration", - "version": "0.13.5", + "version": "0.13.6", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "8142d722d8eeec443e6d5df91b69ecf89b86df8e" + "reference": "610b4e7a6c0d538703e4b2d74605ce5377a36617" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/8142d722d8eeec443e6d5df91b69ecf89b86df8e", - "reference": "8142d722d8eeec443e6d5df91b69ecf89b86df8e", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/610b4e7a6c0d538703e4b2d74605ce5377a36617", + "reference": "610b4e7a6c0d538703e4b2d74605ce5377a36617", "shasum": "" }, "require": { @@ -4047,9 +4047,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.13.5" + "source": "https://github.com/utopia-php/migration/tree/0.13.6" }, - "time": "2025-07-29T04:15:45+00:00" + "time": "2025-07-31T13:51:25+00:00" }, { "name": "utopia-php/orchestration", @@ -8261,9 +8261,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-primary-attribute", + "alias": "0.73.2", + "alias_normalized": "0.73.2.0" + } + ], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/database": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From de69692ff2ee52a7e3f676bf4eea49ac09d77654 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 31 Jul 2025 20:32:14 +0530 Subject: [PATCH 328/362] added modify createdAt/updatedAt support --- composer.json | 2 +- composer.lock | 122 ++- .../Collections/Documents/Bulk/Update.php | 22 +- .../Collections/Documents/Bulk/Upsert.php | 20 +- .../Collections/Documents/Create.php | 24 +- .../Collections/Documents/Update.php | 16 +- .../Collections/Documents/Upsert.php | 28 +- .../Databases/Legacy/DatabasesBase.php | 18 +- .../Legacy/DatabasesCustomClientTest.php | 153 +++ .../Legacy/DatabasesCustomServerTest.php | 932 ++++++++++++++++++ 10 files changed, 1246 insertions(+), 91 deletions(-) diff --git a/composer.json b/composer.json index 659d6221f7..08329aaa05 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.73.0", + "utopia-php/database": "0.74.*", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index 718dbaf64b..d3b9c42015 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": "f4876940be4499bea26a77a036dece4f", + "content-hash": "43a92af943693f80341a8582cf582986", "packages": [ { "name": "adhocore/jwt", @@ -2547,16 +2547,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.1", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64" + "reference": "1c064a0c67749923483216b081066642751cc2c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/4403d87a2c16f33345dca93407a8714ee8c05a64", - "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64", + "url": "https://api.github.com/repos/symfony/http-client/zipball/1c064a0c67749923483216b081066642751cc2c7", + "reference": "1c064a0c67749923483216b081066642751cc2c7", "shasum": "" }, "require": { @@ -2622,7 +2622,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.1" + "source": "https://github.com/symfony/http-client/tree/v7.3.2" }, "funding": [ { @@ -2633,12 +2633,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-06-28T07:58:39+00:00" + "time": "2025-07-15T11:36:08+00:00" }, { "name": "symfony/http-client-contracts", @@ -3493,16 +3497,16 @@ }, { "name": "utopia-php/database", - "version": "0.73.0", + "version": "0.74.3", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "f9b6c587e54069dc64c2d29174ce8a42b7ba6491" + "reference": "065b4812799d57fd2c596f88aadd51644247c7e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/f9b6c587e54069dc64c2d29174ce8a42b7ba6491", - "reference": "f9b6c587e54069dc64c2d29174ce8a42b7ba6491", + "url": "https://api.github.com/repos/utopia-php/database/zipball/065b4812799d57fd2c596f88aadd51644247c7e3", + "reference": "065b4812799d57fd2c596f88aadd51644247c7e3", "shasum": "" }, "require": { @@ -3543,9 +3547,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.73.0" + "source": "https://github.com/utopia-php/database/tree/0.74.3" }, - "time": "2025-07-27T04:10:06+00:00" + "time": "2025-07-31T15:00:30+00:00" }, { "name": "utopia-php/detector", @@ -4810,16 +4814,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.24", + "version": "0.41.26", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "c9ebf8daa25332ca701515d42e8d0c4a7be6a489" + "reference": "5a13191a5a4bdec8fe1b1180ff67f75c4ff6ac0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/c9ebf8daa25332ca701515d42e8d0c4a7be6a489", - "reference": "c9ebf8daa25332ca701515d42e8d0c4a7be6a489", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/5a13191a5a4bdec8fe1b1180ff67f75c4ff6ac0b", + "reference": "5a13191a5a4bdec8fe1b1180ff67f75c4ff6ac0b", "shasum": "" }, "require": { @@ -4855,9 +4859,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.24" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.26" }, - "time": "2025-07-28T06:27:00+00:00" + "time": "2025-07-30T06:53:12+00:00" }, { "name": "doctrine/annotations", @@ -7258,16 +7262,16 @@ }, { "name": "symfony/console", - "version": "v7.3.1", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" + "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", + "url": "https://api.github.com/repos/symfony/console/zipball/5f360ebc65c55265a74d23d7fe27f957870158a1", + "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1", "shasum": "" }, "require": { @@ -7332,7 +7336,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.1" + "source": "https://github.com/symfony/console/tree/v7.3.2" }, "funding": [ { @@ -7343,25 +7347,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-06-27T19:55:54+00:00" + "time": "2025-07-30T17:13:41+00:00" }, { "name": "symfony/filesystem", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", - "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", "shasum": "" }, "require": { @@ -7398,7 +7406,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.0" + "source": "https://github.com/symfony/filesystem/tree/v7.3.2" }, "funding": [ { @@ -7409,25 +7417,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-10-25T15:15:23+00:00" + "time": "2025-07-07T08:17:47+00:00" }, { "name": "symfony/finder", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d" + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ec2344cf77a48253bbca6939aa3d2477773ea63d", - "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d", + "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", "shasum": "" }, "require": { @@ -7462,7 +7474,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.0" + "source": "https://github.com/symfony/finder/tree/v7.3.2" }, "funding": [ { @@ -7473,25 +7485,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-12-30T19:00:26+00:00" + "time": "2025-07-15T13:41:35+00:00" }, { "name": "symfony/options-resolver", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "afb9a8038025e5dbc657378bfab9198d75f10fca" + "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/afb9a8038025e5dbc657378bfab9198d75f10fca", - "reference": "afb9a8038025e5dbc657378bfab9198d75f10fca", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/119bcf13e67dbd188e5dbc74228b1686f66acd37", + "reference": "119bcf13e67dbd188e5dbc74228b1686f66acd37", "shasum": "" }, "require": { @@ -7529,7 +7545,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.3.0" + "source": "https://github.com/symfony/options-resolver/tree/v7.3.2" }, "funding": [ { @@ -7540,12 +7556,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-04T13:12:05+00:00" + "time": "2025-07-15T11:36:08+00:00" }, { "name": "symfony/polyfill-ctype", @@ -7924,16 +7944,16 @@ }, { "name": "symfony/string", - "version": "v7.3.0", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125" + "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f3570b8c61ca887a9e2938e85cb6458515d2b125", - "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125", + "url": "https://api.github.com/repos/symfony/string/zipball/42f505aff654e62ac7ac2ce21033818297ca89ca", + "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca", "shasum": "" }, "require": { @@ -7991,7 +8011,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.3.0" + "source": "https://github.com/symfony/string/tree/v7.3.2" }, "funding": [ { @@ -8002,12 +8022,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-20T20:19:01+00:00" + "time": "2025-07-10T08:47:49+00:00" }, { "name": "textalk/websocket", diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index daa7179395..14bd71c5ea 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -125,16 +125,18 @@ class Update extends Action $documents = []; try { - $modified = $dbForProject->updateDocuments( - 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), - new Document($data), - $queries, - onNext: function (Document $document) use ($plan, &$documents) { - if (\count($documents) < ($plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH)) { - $documents[] = $document; - } - }, - ); + $modified = $dbForProject->withPreserveDates(function () use ($plan, &$documents, $dbForProject, $database, $collection, $data, $queries) { + return $dbForProject->updateDocuments( + 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + new Document($data), + $queries, + onNext: function (Document $document) use ($plan, &$documents) { + if (\count($documents) < ($plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH)) { + $documents[] = $document; + } + }, + ); + }); } catch (ConflictException) { throw new Exception($this->getConflictException()); } catch (RelationshipException $e) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php index 6b5da25a2c..23e6453138 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Upsert.php @@ -106,15 +106,17 @@ class Upsert extends Action $upserted = []; try { - $modified = $dbForProject->createOrUpdateDocuments( - 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), - $documents, - onNext: function (Document $document) use ($plan, &$upserted) { - if (\count($upserted) < ($plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH)) { - $upserted[] = $document; - } - }, - ); + $modified = $dbForProject->withPreserveDates(function () use ($dbForProject, $database, $collection, $documents, $plan, &$upserted) { + return $dbForProject->createOrUpdateDocuments( + 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + $documents, + onNext: function (Document $document) use ($plan, &$upserted) { + if (\count($upserted) < ($plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH)) { + $upserted[] = $document; + } + }, + ); + }); } catch (ConflictException) { throw new Exception($this->getConflictException()); } catch (DuplicateException) { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 46bf9c3f55..9156599d25 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -332,7 +332,7 @@ class Create extends Action } }; - $documents = \array_map(function ($document) use ($collection, $permissions, $checkPermissions, $isBulk, $documentId, $setPermissions) { + $documents = \array_map(function ($document) use ($collection, $permissions, $checkPermissions, $isBulk, $documentId, $setPermissions, $isAPIKey) { $document['$collection'] = $collection->getId(); // Determine the source ID depending on whether it's a bulk operation. @@ -350,6 +350,20 @@ class Create extends Action // Assign a unique ID if needed, otherwise use the provided ID. $document['$id'] = $sourceId === 'unique()' ? ID::unique() : $sourceId; + + // Allowing to add createdAt and updatedAt timestamps if server side(api key) + $createdAt = $document['$createdAt'] ?? null; + $updatedAt = $document['$updatedAt'] ?? null; + if (!$isAPIKey) { + if ($createdAt !== null) { + throw new Exception($this->getInvalidStructureException(), 'Attribute "$createdAt" is not allowed'); + } + + if ($updatedAt !== null) { + throw new Exception($this->getInvalidStructureException(), 'Attribute "$updatedAt" is not allowed'); + } + } + $document = new Document($document); $setPermissions($document, $permissions); $checkPermissions($collection, $document, Database::PERMISSION_CREATE); @@ -358,9 +372,11 @@ class Create extends Action }, $documents); try { - $dbForProject->createDocuments( - 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), - $documents + $dbForProject->withPreserveDates( + fn () => $dbForProject->createDocuments( + 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + $documents, + ) ); } catch (DuplicateException) { throw new Exception($this->getDuplicateException()); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 0be66f0f40..8d0cdc9cec 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -109,6 +109,18 @@ class Update extends Action throw new Exception($this->getParentNotFoundException()); } + // Allowing to add createdAt and updatedAt timestamps if server side(api key) + $createdAt = $data['$createdAt'] ?? null; + $updatedAt = $data['$updatedAt'] ?? null; + if (!$isAPIKey) { + if ($createdAt !== null) { + throw new Exception($this->getInvalidStructureException(), 'Attribute "$createdAt" is not allowed'); + } + + if ($updatedAt !== null) { + throw new Exception($this->getInvalidStructureException(), 'Attribute "$updatedAt" is not allowed'); + } + } // Read permission should not be required for update /** @var Document $document */ $document = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $documentId)); @@ -233,11 +245,11 @@ class Update extends Action try { $document = $dbForProject->withRequestTimestamp( $requestTimestamp, - fn () => $dbForProject->updateDocument( + fn () => $dbForProject->withPreserveDates(fn () => $dbForProject->updateDocument( 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), $document->getId(), $newDocument - ) + )) ); } catch (ConflictException) { throw new Exception($this->getConflictException()); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index c42b4ee6fd..2864204f93 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -153,6 +153,18 @@ class Upsert extends Action } } } + // Allowing to add createdAt and updatedAt timestamps if server side(api key) + $createdAt = $data['$createdAt'] ?? null; + $updatedAt = $data['$updatedAt'] ?? null; + if (!$isAPIKey) { + if ($createdAt !== null) { + throw new Exception($this->getInvalidStructureException(), 'Attribute "$createdAt" is not allowed'); + } + + if ($updatedAt !== null) { + throw new Exception($this->getInvalidStructureException(), 'Attribute "$updatedAt" is not allowed'); + } + } $data['$id'] = $documentId; $data['$permissions'] = $permissions ?? []; @@ -236,13 +248,15 @@ class Upsert extends Action $upserted = []; try { - $dbForProject->createOrUpdateDocuments( - 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), - [$newDocument], - onNext: function (Document $document) use (&$upserted) { - $upserted[] = $document; - }, - ); + $dbForProject->withPreserveDates(function () use (&$upserted, $dbForProject, $database, $collection, $newDocument) { + return $dbForProject->createOrUpdateDocuments( + 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(), + [$newDocument], + onNext: function (Document $document) use (&$upserted) { + $upserted[] = $document; + }, + ); + }); } catch (ConflictException) { throw new Exception($this->getConflictException()); } catch (DuplicateException) { diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 6aab125478..f837f05ce1 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -2876,7 +2876,6 @@ trait DatabasesBase 'releaseYear' => 2017, 'birthDay' => '1976-06-12 14:12:55', 'actors' => [], - '$createdAt' => 5 // Should be ignored ], 'permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), @@ -4206,17 +4205,18 @@ trait DatabasesBase $document = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['moviesId'] . '/documents/' . $documentId, $headers, [ 'data' => [ 'title' => 'Again Updated Date Test', - '$createdAt' => '2022-08-01 13:09:23.040', // $createdAt is not updatable - '$updatedAt' => '2022-08-01 13:09:23.050' // system will update it not api + '$createdAt' => '2022-08-01 13:09:23.040', + '$updatedAt' => '2022-08-01 13:09:23.050' ] ]); + if ($this->getSide() === 'client') { + $this->assertEquals($document['headers']['status-code'], 400); + } else { + $this->assertEquals($document['body']['title'], 'Again Updated Date Test'); + $this->assertEquals($document['body']['$createdAt'], DateTime::formatTz('2022-08-01 13:09:23.040')); + $this->assertEquals($document['body']['$updatedAt'], DateTime::formatTz('2022-08-01 13:09:23.050')); - $this->assertEquals($document['body']['title'], 'Again Updated Date Test'); - $this->assertEquals($document['body']['$createdAt'], $createdAt); - $this->assertNotEquals($document['body']['$createdAt'], '2022-08-01 13:09:23.040'); - $this->assertNotEquals($document['body']['$updatedAt'], $updatedAt); - $this->assertNotEquals($document['body']['$updatedAt'], $updatedAtSecond); - $this->assertNotEquals($document['body']['$updatedAt'], '2022-08-01 13:09:23.050'); + } return $data; } diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomClientTest.php index 699a2b8f25..23153e8f39 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomClientTest.php @@ -889,4 +889,157 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); } + public function testModifyCreatedAtUpdatedAtSingleDocument(): void + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database' + ]); + + $databaseId = $database['body']['$id']; + + $table = $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' => 'Test Table', + 'documentsecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], + ]); + $collectionId = $table['body']['$id']; + + // Create string column + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + + sleep(1); + + // Test 1: Try to create document with $createdAt - should return 400 + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'Test Movie', + '$createdAt' => '2000-01-01T10:00:00.000+00:00' + ] + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // Test 2: Try to create document with $updatedAt - should return 400 + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'Test Movie', + '$updatedAt' => '2000-01-01T10:00:00.000+00:00' + ] + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // Test 3: Try to create document with both $createdAt and $updatedAt - should return 400 + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'Test Movie', + '$createdAt' => '2000-01-01T10:00:00.000+00:00', + '$updatedAt' => '2000-01-01T10:00:00.000+00:00' + ] + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // Test 4: Create a valid document first + $validRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'title' => 'Valid Movie' + ] + ]); + + $this->assertEquals(201, $validRow['headers']['status-code']); + $documentId = $validRow['body']['$id']; + + // Test 5: Try to update document with $createdAt - should return 400 + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Updated Movie', + '$createdAt' => '2000-01-01T10:00:00.000+00:00' + ] + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // Test 6: Try to update document with $updatedAt - should return 400 + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Updated Movie', + '$updatedAt' => '2000-01-01T10:00:00.000+00:00' + ] + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // Test 7: Try to update document with both $createdAt and $updatedAt - should return 400 + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $documentId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Updated Movie', + '$createdAt' => '2000-01-01T10:00:00.000+00:00', + '$updatedAt' => '2000-01-01T10:00:00.000+00:00' + ] + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $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'] + ])); + } } diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php index 84cd8aeb41..bbede25b59 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php @@ -5243,4 +5243,936 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); } + + public function testDateTimeDocument(): void + { + $databaseId = $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' => 'DateTime Test Database', + ]); + + $this->assertEquals(201, $databaseId['headers']['status-code']); + $databaseId = $databaseId['body']['$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' => 'create_modify_dates', + 'documentSecurity' => true, + 'permissions' => [], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + $collectionId = $collection['body']['$id']; + + // Create string attribute + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'string', + 'size' => 128, + 'required' => false, + ]); + + // Create datetime attribute + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/datetime', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'datetime', + 'required' => false, + 'format' => 'datetime', + ]); + + sleep(1); + + $date = '2000-01-01T10:00:00.000+00:00'; + + // Test - default behaviour of external datetime attribute not changed + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => 'doc1', + 'data' => [ + 'datetime' => '' + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + $this->assertNotEmpty($doc['body']['datetime']); + $this->assertNotEmpty($doc['body']['$createdAt']); + $this->assertNotEmpty($doc['body']['$updatedAt']); + + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/doc1', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertNotEmpty($doc['body']['datetime']); + $this->assertNotEmpty($doc['body']['$createdAt']); + $this->assertNotEmpty($doc['body']['$updatedAt']); + + // Test - modifying $createdAt and $updatedAt + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => 'doc2', + 'data' => [ + '$createdAt' => $date + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + $this->assertEquals($doc['body']['$createdAt'], $date); + $this->assertNotEmpty($doc['body']['$updatedAt']); + $this->assertNotEquals($doc['body']['$updatedAt'], $date); + + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/doc2', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertEquals($doc['body']['$createdAt'], $date); + $this->assertNotEmpty($doc['body']['$updatedAt']); + $this->assertNotEquals($doc['body']['$updatedAt'], $date); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $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 testSingleDocumentDateOperations(): void + { + $databaseId = $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' => 'Single Date Operations Database', + ]); + + $this->assertEquals(201, $databaseId['headers']['status-code']); + $databaseId = $databaseId['body']['$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' => 'normal_date_operations', + 'documentSecurity' => true, + 'permissions' => [], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + $collectionId = $collection['body']['$id']; + + // Create string attribute + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'string', + 'size' => 128, + 'required' => false, + ]); + + sleep(1); + + $createDate = '2000-01-01T10:00:00.000+00:00'; + $updateDate = '2000-02-01T15:30:00.000+00:00'; + $date1 = '2000-01-01T10:00:00.000+00:00'; + $date2 = '2000-02-01T15:30:00.000+00:00'; + $date3 = '2000-03-01T20:45:00.000+00:00'; + + // Test 1: Create with custom createdAt, then update with custom updatedAt + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => 'doc1', + 'data' => [ + 'string' => 'initial', + '$createdAt' => $createDate + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + $this->assertEquals($createDate, $doc['body']['$createdAt']); + $this->assertNotEquals($createDate, $doc['body']['$updatedAt']); + + // Update with custom updatedAt + $updatedDoc = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/doc1', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'updated', + '$updatedAt' => $updateDate + ] + ]); + + $this->assertEquals(200, $updatedDoc['headers']['status-code']); + $this->assertEquals($createDate, $updatedDoc['body']['$createdAt']); + $this->assertEquals($updateDate, $updatedDoc['body']['$updatedAt']); + + // Test 2: Create with both custom dates + $doc2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => 'doc2', + 'data' => [ + 'string' => 'both_dates', + '$createdAt' => $createDate, + '$updatedAt' => $updateDate + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $doc2['headers']['status-code']); + $this->assertEquals($createDate, $doc2['body']['$createdAt']); + $this->assertEquals($updateDate, $doc2['body']['$updatedAt']); + + // Test 3: Create without dates, then update with custom dates + $doc3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => 'doc3', + 'data' => [ + 'string' => 'no_dates' + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $doc3['headers']['status-code']); + + $updatedDoc3 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/doc3', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'updated_no_dates', + '$createdAt' => $createDate, + '$updatedAt' => $updateDate + ] + ]); + + $this->assertEquals(200, $updatedDoc3['headers']['status-code']); + $this->assertEquals($createDate, $updatedDoc3['body']['$createdAt']); + $this->assertEquals($updateDate, $updatedDoc3['body']['$updatedAt']); + + // Test 4: Update only createdAt + $doc4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => 'doc4', + 'data' => [ + 'string' => 'initial' + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $doc4['headers']['status-code']); + $originalCreatedAt4 = $doc4['body']['$createdAt']; + $originalUpdatedAt4 = $doc4['body']['$updatedAt']; + + $updatedDoc4 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/doc4', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'updated', + '$updatedAt' => null, + '$createdAt' => null + ], + ]); + + $this->assertEquals(200, $updatedDoc4['headers']['status-code']); + $this->assertEquals($originalCreatedAt4, $updatedDoc4['body']['$createdAt']); + $this->assertNotEquals($originalUpdatedAt4, $updatedDoc4['body']['$updatedAt']); + + // Test 5: Update only updatedAt + $finalDoc4 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/doc4', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'final', + '$updatedAt' => $updateDate, + '$createdAt' => $createDate + ] + ]); + + $this->assertEquals(200, $finalDoc4['headers']['status-code']); + $this->assertEquals($createDate, $finalDoc4['body']['$createdAt']); + $this->assertEquals($updateDate, $finalDoc4['body']['$updatedAt']); + + // Test 6: Create with updatedAt, update with createdAt + $doc5 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => 'doc5', + 'data' => [ + 'string' => 'doc5', + '$updatedAt' => $date2 + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $doc5['headers']['status-code']); + $this->assertNotEquals($date2, $doc5['body']['$createdAt']); + $this->assertEquals($date2, $doc5['body']['$updatedAt']); + + $updatedDoc5 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/doc5', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'doc5_updated', + '$createdAt' => $date1 + ] + ]); + + $this->assertEquals(200, $updatedDoc5['headers']['status-code']); + $this->assertEquals($date1, $updatedDoc5['body']['$createdAt']); + $this->assertNotEquals($date2, $updatedDoc5['body']['$updatedAt']); + + // Test 7: Create with both dates, update with different dates + $doc6 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => 'doc6', + 'data' => [ + 'string' => 'doc6', + '$createdAt' => $date1, + '$updatedAt' => $date2 + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $doc6['headers']['status-code']); + $this->assertEquals($date1, $doc6['body']['$createdAt']); + $this->assertEquals($date2, $doc6['body']['$updatedAt']); + + $updatedDoc6 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/doc6', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'doc6_updated', + '$createdAt' => $date3, + '$updatedAt' => $date3 + ] + ]); + + $this->assertEquals(200, $updatedDoc6['headers']['status-code']); + $this->assertEquals($date3, $updatedDoc6['body']['$createdAt']); + $this->assertEquals($date3, $updatedDoc6['body']['$updatedAt']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $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 testBulkDocumentDateOperations(): void + { + $databaseId = $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' => 'Bulk Date Operations Database', + ]); + + $this->assertEquals(201, $databaseId['headers']['status-code']); + $databaseId = $databaseId['body']['$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' => 'bulk_date_operations', + 'documentSecurity' => true, + 'permissions' => [], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + $collectionId = $collection['body']['$id']; + + // Create string attribute + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'string', + 'size' => 128, + 'required' => false, + ]); + + sleep(1); + + $createDate = '2000-01-01T10:00:00.000+00:00'; + $updateDate = '2000-02-01T15:30:00.000+00:00'; + + // Test 1: Bulk create with different date configurations + $documents = [ + [ + '$id' => 'doc1', + 'string' => 'doc1', + '$createdAt' => $createDate, + '$permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])),] + ], + [ + '$id' => 'doc2', + 'string' => 'doc2', + '$updatedAt' => $updateDate, + '$permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])),] + ], + [ + '$id' => 'doc3', + 'string' => 'doc3', + '$createdAt' => $createDate, + '$updatedAt' => $updateDate, + '$permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])),] + ], + [ + '$id' => 'doc4', + 'string' => 'doc4', + '$permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])),] + ], + [ + '$id' => 'doc5', + 'string' => 'doc5', + '$createdAt' => null, + '$permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])),] + ], + [ + '$id' => 'doc6', + 'string' => 'doc6', + '$updatedAt' => null, + '$permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])),] + ] + ]; + + // Create all documents in one bulk operation + $bulkCreateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documents' => $documents + ]); + + $this->assertEquals(201, $bulkCreateResponse['headers']['status-code']); + $this->assertCount(count($documents), $bulkCreateResponse['body']['documents']); + + // Verify initial state + foreach (['doc1', 'doc3'] as $id) { + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertEquals($createDate, $doc['body']['$createdAt'], "createdAt mismatch for $id"); + } + + foreach (['doc2', 'doc3'] as $id) { + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertEquals($updateDate, $doc['body']['$updatedAt'], "updatedAt mismatch for $id"); + } + + foreach (['doc4', 'doc5', 'doc6'] as $id) { + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertNotEmpty($doc['body']['$createdAt'], "createdAt missing for $id"); + $this->assertNotEmpty($doc['body']['$updatedAt'], "updatedAt missing for $id"); + } + + // Test 2: Bulk update with custom dates + $updateData = [ + 'data' => [ + 'string' => 'updated', + '$createdAt' => $createDate, + '$updatedAt' => $updateDate, + '$permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])),] + ], + ]; + + // Use bulk update instead of individual updates + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), $updateData); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(6, $response['body']['documents']); + + // Verify updated state + foreach (['doc1', 'doc3'] as $id) { + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertEquals($createDate, $doc['body']['$createdAt'], "createdAt mismatch for $id"); + $this->assertEquals($updateDate, $doc['body']['$updatedAt'], "updatedAt mismatch for $id"); + $this->assertEquals('updated', $doc['body']['string'], "string mismatch for $id"); + } + + foreach (['doc2', 'doc4', 'doc5', 'doc6'] as $id) { + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertEquals($updateDate, $doc['body']['$updatedAt'], "updatedAt mismatch for $id"); + $this->assertEquals('updated', $doc['body']['string'], "string mismatch for $id"); + } + + $newDate = '2000-03-01T20:45:00.000+00:00'; + $updateDataEnabled = [ + 'data' => [ + 'string' => 'enabled_update', + '$createdAt' => $newDate, + '$updatedAt' => $newDate + ], + ]; + + // Use bulk update instead of individual updates + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), $updateDataEnabled); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(6, $response['body']['documents']); + + // Verify final state + foreach (['doc1', 'doc2', 'doc3', 'doc4', 'doc5', 'doc6'] as $id) { + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertEquals($newDate, $doc['body']['$createdAt'], "createdAt mismatch for $id"); + $this->assertEquals($newDate, $doc['body']['$updatedAt'], "updatedAt mismatch for $id"); + $this->assertEquals('enabled_update', $doc['body']['string'], "string mismatch for $id"); + } + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $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 testUpsertDateOperations(): void + { + $databaseId = $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' => 'Upsert Date Operations Database', + ]); + + $this->assertEquals(201, $databaseId['headers']['status-code']); + $databaseId = $databaseId['body']['$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' => 'upsert_date_operations', + 'documentSecurity' => true, + 'permissions' => [], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + $collectionId = $collection['body']['$id']; + + // Create string attribute + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'string', + 'size' => 128, + 'required' => false, + ]); + + sleep(1); + + $createDate = '2000-01-01T10:00:00.000+00:00'; + $updateDate = '2000-02-01T15:30:00.000+00:00'; + $date1 = '2000-01-01T10:00:00.000+00:00'; + $date2 = '2000-02-01T15:30:00.000+00:00'; + $date3 = '2000-03-01T20:45:00.000+00:00'; + + // Test 1: Upsert new document with custom createdAt + $upsertDoc1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => 'upsert1', + 'data' => [ + 'string' => 'upsert1_initial', + '$permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ], + '$createdAt' => $createDate + ], + ]); + + $this->assertEquals(201, $upsertDoc1['headers']['status-code']); + $this->assertEquals($createDate, $upsertDoc1['body']['$createdAt']); + $this->assertNotEquals($createDate, $upsertDoc1['body']['$updatedAt']); + + // Test 2: Upsert existing document with custom updatedAt + $updatedUpsertDoc1 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/upsert1', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'upsert1_updated', + '$updatedAt' => $updateDate + ], + ]); + + $this->assertEquals(200, $updatedUpsertDoc1['headers']['status-code']); + $this->assertEquals($createDate, $updatedUpsertDoc1['body']['$createdAt']); + $this->assertEquals($updateDate, $updatedUpsertDoc1['body']['$updatedAt']); + + // Test 3: Upsert new document with both custom dates + $upsertDoc2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documentId' => 'upsert2', + 'data' => [ + 'string' => 'upsert2_both_dates', + '$permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ], + '$createdAt' => $createDate, + '$updatedAt' => $updateDate + ], + ]); + + $this->assertEquals(201, $upsertDoc2['headers']['status-code']); + $this->assertEquals($createDate, $upsertDoc2['body']['$createdAt']); + $this->assertEquals($updateDate, $upsertDoc2['body']['$updatedAt']); + + // Test 4: Upsert existing document with different dates + $updatedUpsertDoc2 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/upsert2', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'upsert2_updated', + '$createdAt' => $date3, + '$updatedAt' => $date3, + '$permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ], + ] + ]); + + $this->assertEquals(200, $updatedUpsertDoc2['headers']['status-code']); + $this->assertEquals($date3, $updatedUpsertDoc2['body']['$createdAt']); + $this->assertEquals($date3, $updatedUpsertDoc2['body']['$updatedAt']); + + // Test 5: Bulk upsert operations with custom dates + $upsertDocuments = [ + [ + '$id' => 'bulk_upsert1', + 'string' => 'bulk_upsert1_initial', + '$createdAt' => $createDate + ], + [ + '$id' => 'bulk_upsert2', + 'string' => 'bulk_upsert2_initial', + '$updatedAt' => $updateDate + ], + [ + '$id' => 'bulk_upsert3', + 'string' => 'bulk_upsert3_initial', + '$createdAt' => $createDate, + '$updatedAt' => $updateDate + ], + [ + '$id' => 'bulk_upsert4', + 'string' => 'bulk_upsert4_initial' + ] + ]; + + // Create documents using bulk upsert + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documents' => $upsertDocuments + ]); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(4, $response['body']['documents']); + + // Test 7: Verify initial bulk upsert state + foreach (['bulk_upsert1', 'bulk_upsert3'] as $id) { + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertEquals($createDate, $doc['body']['$createdAt'], "createdAt mismatch for $id"); + } + + foreach (['bulk_upsert2', 'bulk_upsert3'] as $id) { + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertEquals($updateDate, $doc['body']['$updatedAt'], "updatedAt mismatch for $id"); + } + + foreach (['bulk_upsert4'] as $id) { + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertNotEmpty($doc['body']['$createdAt'], "createdAt missing for $id"); + $this->assertNotEmpty($doc['body']['$updatedAt'], "updatedAt missing for $id"); + } + + // Test 8: Bulk upsert update with custom dates + $newDate = '2000-04-01T12:00:00.000+00:00'; + $updateUpsertData = [ + 'data' => [ + 'string' => 'bulk_upsert_updated', + '$createdAt' => $newDate, + '$updatedAt' => $newDate + ], + 'queries' => [Query::equal('$id', ['bulk_upsert1','bulk_upsert2','bulk_upsert3','bulk_upsert4'])->toString()] + ]; + + $upsertIds = ['bulk_upsert1', 'bulk_upsert2', 'bulk_upsert3', 'bulk_upsert4']; + + // Use bulk update instead of individual updates + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), $updateUpsertData); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(4, $response['body']['documents']); + + // Verify updated state + foreach ($upsertIds as $id) { + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertEquals($newDate, $doc['body']['$createdAt'], "createdAt mismatch for $id"); + $this->assertEquals($newDate, $doc['body']['$updatedAt'], "updatedAt mismatch for $id"); + $this->assertEquals('bulk_upsert_updated', $doc['body']['string'], "string mismatch for $id"); + } + + // Test 9: checking by passing null to each + $updateUpsertDataNull = [ + 'data' => [ + 'string' => 'bulk_upsert_null_test', + '$createdAt' => null, + '$updatedAt' => null + ], + 'queries' => [Query::equal('$id', ['bulk_upsert1','bulk_upsert2','bulk_upsert3','bulk_upsert4'])->toString()] + ]; + + // Use bulk update instead of individual updates + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), $updateUpsertDataNull); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(4, $response['body']['documents']); + + // Verify null handling + foreach ($upsertIds as $id) { + $doc = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId . '/documents/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $doc['headers']['status-code']); + $this->assertNotEmpty($doc['body']['$createdAt'], "createdAt missing for $id"); + $this->assertNotEmpty($doc['body']['$updatedAt'], "updatedAt missing for $id"); + } + + + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $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 29973e41822640752be46b78745bba287ec7d2b8 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Fri, 1 Aug 2025 03:09:36 +1200 Subject: [PATCH 329/362] Update db + migrations --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index a5b20cd761..5e87399337 100644 --- a/composer.lock +++ b/composer.lock @@ -3497,16 +3497,16 @@ }, { "name": "utopia-php/database", - "version": "0.74.2", + "version": "0.74.3", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "0e9b85b9ce1a2e754c5a644a2b235dc6e23905b3" + "reference": "065b4812799d57fd2c596f88aadd51644247c7e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/0e9b85b9ce1a2e754c5a644a2b235dc6e23905b3", - "reference": "0e9b85b9ce1a2e754c5a644a2b235dc6e23905b3", + "url": "https://api.github.com/repos/utopia-php/database/zipball/065b4812799d57fd2c596f88aadd51644247c7e3", + "reference": "065b4812799d57fd2c596f88aadd51644247c7e3", "shasum": "" }, "require": { @@ -3547,9 +3547,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.74.2" + "source": "https://github.com/utopia-php/database/tree/0.74.3" }, - "time": "2025-07-31T13:40:40+00:00" + "time": "2025-07-31T15:00:30+00:00" }, { "name": "utopia-php/detector", @@ -3997,16 +3997,16 @@ }, { "name": "utopia-php/migration", - "version": "0.13.5", + "version": "0.13.7", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "8142d722d8eeec443e6d5df91b69ecf89b86df8e" + "reference": "fc25d50c3a19e701e905c56a9465143cacb02717" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/8142d722d8eeec443e6d5df91b69ecf89b86df8e", - "reference": "8142d722d8eeec443e6d5df91b69ecf89b86df8e", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/fc25d50c3a19e701e905c56a9465143cacb02717", + "reference": "fc25d50c3a19e701e905c56a9465143cacb02717", "shasum": "" }, "require": { @@ -4047,9 +4047,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.13.5" + "source": "https://github.com/utopia-php/migration/tree/0.13.7" }, - "time": "2025-07-29T04:15:45+00:00" + "time": "2025-07-31T15:08:29+00:00" }, { "name": "utopia-php/orchestration", From 983d102ff29ccf4e2f968025f1a6b67292d1a1b2 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 1 Aug 2025 12:31:29 +0530 Subject: [PATCH 330/362] Restrict createdAt and updatedAt attributes for non-API key and non-privileged users in Create, Update, and Upsert actions --- .../Http/Databases/Collections/Documents/Create.php | 12 +++++------- .../Http/Databases/Collections/Documents/Update.php | 8 +++----- .../Http/Databases/Collections/Documents/Upsert.php | 8 +++----- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 9156599d25..17243caa8f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -332,7 +332,7 @@ class Create extends Action } }; - $documents = \array_map(function ($document) use ($collection, $permissions, $checkPermissions, $isBulk, $documentId, $setPermissions, $isAPIKey) { + $documents = \array_map(function ($document) use ($collection, $permissions, $checkPermissions, $isBulk, $documentId, $setPermissions, $isAPIKey, $isPrivilegedUser) { $document['$collection'] = $collection->getId(); // Determine the source ID depending on whether it's a bulk operation. @@ -351,15 +351,13 @@ class Create extends Action // Assign a unique ID if needed, otherwise use the provided ID. $document['$id'] = $sourceId === 'unique()' ? ID::unique() : $sourceId; - // Allowing to add createdAt and updatedAt timestamps if server side(api key) - $createdAt = $document['$createdAt'] ?? null; - $updatedAt = $document['$updatedAt'] ?? null; - if (!$isAPIKey) { - if ($createdAt !== null) { + // Allowing to add createdAt and updatedAt timestamps if server side(api key + if (!$isAPIKey && !$isPrivilegedUser) { + if (isset($document['$createdAt'])) { throw new Exception($this->getInvalidStructureException(), 'Attribute "$createdAt" is not allowed'); } - if ($updatedAt !== null) { + if (isset($document['$updatedAt'])) { throw new Exception($this->getInvalidStructureException(), 'Attribute "$updatedAt" is not allowed'); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 8d0cdc9cec..17993d47a1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -110,14 +110,12 @@ class Update extends Action } // Allowing to add createdAt and updatedAt timestamps if server side(api key) - $createdAt = $data['$createdAt'] ?? null; - $updatedAt = $data['$updatedAt'] ?? null; - if (!$isAPIKey) { - if ($createdAt !== null) { + if (!$isAPIKey && !$isPrivilegedUser) { + if (isset($data['$createdAt'])) { throw new Exception($this->getInvalidStructureException(), 'Attribute "$createdAt" is not allowed'); } - if ($updatedAt !== null) { + if (isset($data['$updatedAt'])) { throw new Exception($this->getInvalidStructureException(), 'Attribute "$updatedAt" is not allowed'); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index 2864204f93..ecd9ac79df 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -154,14 +154,12 @@ class Upsert extends Action } } // Allowing to add createdAt and updatedAt timestamps if server side(api key) - $createdAt = $data['$createdAt'] ?? null; - $updatedAt = $data['$updatedAt'] ?? null; - if (!$isAPIKey) { - if ($createdAt !== null) { + if (!$isAPIKey && !$isPrivilegedUser) { + if (isset($data['$createdAt'])) { throw new Exception($this->getInvalidStructureException(), 'Attribute "$createdAt" is not allowed'); } - if ($updatedAt !== null) { + if (isset($data['$updatedAt'])) { throw new Exception($this->getInvalidStructureException(), 'Attribute "$updatedAt" is not allowed'); } } From 82fbc524f8dfc98ee1a605c9057c45215f39fb2b Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 1 Aug 2025 13:53:04 +0530 Subject: [PATCH 331/362] Add comprehensive tests for date and time operations in database rows - Implemented `testDateTimeRow` to validate the behavior of datetime columns, including creation, retrieval, and modification of rows with custom createdAt and updatedAt timestamps. - Added `testSingleRowDateOperations` to cover various scenarios for single row operations with custom date handling. - Created `testBulkRowDateOperations` to test bulk creation and updates of rows with date fields. - Introduced `testUpsertRowDateOperations` to verify upsert functionality with custom date fields. - Cleaned up legacy test file by removing unnecessary blank lines. --- .../Databases/Grids/DatabasesBase.php | 19 +- .../Grids/DatabasesCustomClientTest.php | 154 +++ .../Grids/DatabasesCustomServerTest.php | 943 ++++++++++++++++++ .../Legacy/DatabasesCustomServerTest.php | 3 - 4 files changed, 1107 insertions(+), 12 deletions(-) diff --git a/tests/e2e/Services/Databases/Grids/DatabasesBase.php b/tests/e2e/Services/Databases/Grids/DatabasesBase.php index 882d73f63f..77c5a958ac 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesBase.php @@ -2850,7 +2850,6 @@ trait DatabasesBase 'releaseYear' => 2017, 'birthDay' => '1976-06-12 14:12:55', 'actors' => [], - '$createdAt' => 5 // Should be ignored ], 'permissions' => [ Permission::read(Role::user($this->getUser()['$id'])), @@ -4215,17 +4214,19 @@ trait DatabasesBase $row = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/grids/tables/' . $data['moviesId'] . '/rows/' . $rowId, $headers, [ 'data' => [ 'title' => 'Again Updated Date Test', - '$createdAt' => '2022-08-01 13:09:23.040', // $createdAt is not updatable - '$updatedAt' => '2022-08-01 13:09:23.050' // system will update it not api + '$createdAt' => '2022-08-01 13:09:23.040', + '$updatedAt' => '2022-08-01 13:09:23.050' ] ]); - $this->assertEquals($row['body']['title'], 'Again Updated Date Test'); - $this->assertEquals($row['body']['$createdAt'], $createdAt); - $this->assertNotEquals($row['body']['$createdAt'], '2022-08-01 13:09:23.040'); - $this->assertNotEquals($row['body']['$updatedAt'], $updatedAt); - $this->assertNotEquals($row['body']['$updatedAt'], $updatedAtSecond); - $this->assertNotEquals($row['body']['$updatedAt'], '2022-08-01 13:09:23.050'); + if ($this->getSide() === 'client') { + $this->assertEquals($row['headers']['status-code'], 400); + } else { + $this->assertEquals($row['body']['title'], 'Again Updated Date Test'); + $this->assertEquals($row['body']['$createdAt'], DateTime::formatTz('2022-08-01 13:09:23.040')); + $this->assertEquals($row['body']['$updatedAt'], DateTime::formatTz('2022-08-01 13:09:23.050')); + + } return $data; } diff --git a/tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php index e75039b22e..f07b648890 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesCustomClientTest.php @@ -890,4 +890,158 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); } + + public function testModifyCreatedAtUpdatedAtSingleRow(): void + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database' + ]); + + $databaseId = $database['body']['$id']; + + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'Test Table', + 'rowSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], + ]); + $tableId = $table['body']['$id']; + + // Create string column + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'title', + 'size' => 256, + 'required' => true, + ]); + + sleep(1); + + // Test 1: Try to create row with $createdAt - should return 400 + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Test Movie', + '$createdAt' => '2000-01-01T10:00:00.000+00:00' + ] + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // Test 2: Try to create row with $updatedAt - should return 400 + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Test Movie', + '$updatedAt' => '2000-01-01T10:00:00.000+00:00' + ] + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // Test 3: Try to create row with both $createdAt and $updatedAt - should return 400 + $response = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Test Movie', + '$createdAt' => '2000-01-01T10:00:00.000+00:00', + '$updatedAt' => '2000-01-01T10:00:00.000+00:00' + ] + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // Test 4: Create a valid row first + $validRow = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'rowId' => ID::unique(), + 'data' => [ + 'title' => 'Valid Movie' + ] + ]); + + $this->assertEquals(201, $validRow['headers']['status-code']); + $rowId = $validRow['body']['$id']; + + // Test 5: Try to update row with $createdAt - should return 400 + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Updated Movie', + '$createdAt' => '2000-01-01T10:00:00.000+00:00' + ] + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // Test 6: Try to update row with $updatedAt - should return 400 + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Updated Movie', + '$updatedAt' => '2000-01-01T10:00:00.000+00:00' + ] + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // Test 7: Try to update row with both $createdAt and $updatedAt - should return 400 + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $rowId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'title' => 'Updated Movie', + '$createdAt' => '2000-01-01T10:00:00.000+00:00', + '$updatedAt' => '2000-01-01T10:00:00.000+00:00' + ] + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $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'] + ])); + } } diff --git a/tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php index ba137a0b74..d2c24ca2f1 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesCustomServerTest.php @@ -5189,4 +5189,947 @@ class DatabasesCustomServerTest extends Scope $this->assertEquals(400, $response['headers']['status-code']); } + + public function testDateTimeRow(): void + { + $databaseId = $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' => 'DateTime Test Database', + ]); + + $this->assertEquals(201, $databaseId['headers']['status-code']); + $databaseId = $databaseId['body']['$id']; + + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'create_modify_dates', + 'rowSecurity' => true, + 'permissions' => [], + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + $tableId = $table['body']['$id']; + + // Create string column + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'string', + 'size' => 128, + 'required' => false, + ]); + + // Create datetime column + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/datetime', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'datetime', + 'required' => false, + 'format' => 'datetime', + ]); + + sleep(1); + + $date = '2000-01-01T10:00:00.000+00:00'; + + // Test - default behaviour of external datetime column not changed + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'row1', + 'data' => [ + 'datetime' => '' + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $row['headers']['status-code']); + $this->assertNotEmpty($row['body']['datetime']); + $this->assertNotEmpty($row['body']['$createdAt']); + $this->assertNotEmpty($row['body']['$updatedAt']); + + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row1', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertNotEmpty($row['body']['datetime']); + $this->assertNotEmpty($row['body']['$createdAt']); + $this->assertNotEmpty($row['body']['$updatedAt']); + + // Test - modifying $createdAt and $updatedAt + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'row2', + 'data' => [ + '$createdAt' => $date + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $row['headers']['status-code']); + $this->assertEquals($row['body']['$createdAt'], $date); + $this->assertNotEmpty($row['body']['$updatedAt']); + $this->assertNotEquals($row['body']['$updatedAt'], $date); + + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row2', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($row['body']['$createdAt'], $date); + $this->assertNotEmpty($row['body']['$updatedAt']); + $this->assertNotEquals($row['body']['$updatedAt'], $date); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $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 testSingleRowDateOperations(): void + { + $databaseId = $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' => 'Single Date Operations Database', + ]); + + $this->assertEquals(201, $databaseId['headers']['status-code']); + $databaseId = $databaseId['body']['$id']; + + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'normal_date_operations', + 'rowSecurity' => true, + 'permissions' => [], + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + $tableId = $table['body']['$id']; + + // Create string column + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'string', + 'size' => 128, + 'required' => false, + ]); + + sleep(1); + + $createDate = '2000-01-01T10:00:00.000+00:00'; + $updateDate = '2000-02-01T15:30:00.000+00:00'; + $date1 = '2000-01-01T10:00:00.000+00:00'; + $date2 = '2000-02-01T15:30:00.000+00:00'; + $date3 = '2000-03-01T20:45:00.000+00:00'; + + // Test 1: Create with custom createdAt, then update with custom updatedAt + $row = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'row1', + 'data' => [ + 'string' => 'initial', + '$createdAt' => $createDate + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $row['headers']['status-code']); + $this->assertEquals($createDate, $row['body']['$createdAt']); + $this->assertNotEquals($createDate, $row['body']['$updatedAt']); + + // Update with custom updatedAt + $updatedRow = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row1', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'updated', + '$updatedAt' => $updateDate + ] + ]); + + $this->assertEquals(200, $updatedRow['headers']['status-code']); + $this->assertEquals($createDate, $updatedRow['body']['$createdAt']); + $this->assertEquals($updateDate, $updatedRow['body']['$updatedAt']); + + // Test 2: Create with both custom dates + $row2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'row2', + 'data' => [ + 'string' => 'both_dates', + '$createdAt' => $createDate, + '$updatedAt' => $updateDate + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $row2['headers']['status-code']); + $this->assertEquals($createDate, $row2['body']['$createdAt']); + $this->assertEquals($updateDate, $row2['body']['$updatedAt']); + + // Test 3: Create without dates, then update with custom dates + $row3 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'row3', + 'data' => [ + 'string' => 'no_dates' + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $row3['headers']['status-code']); + + $updatedRow3 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row3', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'updated_no_dates', + '$createdAt' => $createDate, + '$updatedAt' => $updateDate + ] + ]); + + $this->assertEquals(200, $updatedRow3['headers']['status-code']); + $this->assertEquals($createDate, $updatedRow3['body']['$createdAt']); + $this->assertEquals($updateDate, $updatedRow3['body']['$updatedAt']); + + // Test 4: Update only createdAt + $row4 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'row4', + 'data' => [ + 'string' => 'initial' + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $row4['headers']['status-code']); + $originalCreatedAt4 = $row4['body']['$createdAt']; + $originalUpdatedAt4 = $row4['body']['$updatedAt']; + + $updatedRow4 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row4', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'updated', + '$updatedAt' => null, + '$createdAt' => null + ], + ]); + + $this->assertEquals(200, $updatedRow4['headers']['status-code']); + $this->assertEquals($originalCreatedAt4, $updatedRow4['body']['$createdAt']); + $this->assertNotEquals($originalUpdatedAt4, $updatedRow4['body']['$updatedAt']); + + // Test 5: Update only updatedAt + $finalRow4 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row4', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'final', + '$updatedAt' => $updateDate, + '$createdAt' => $createDate + ] + ]); + + $this->assertEquals(200, $finalRow4['headers']['status-code']); + $this->assertEquals($createDate, $finalRow4['body']['$createdAt']); + $this->assertEquals($updateDate, $finalRow4['body']['$updatedAt']); + + // Test 6: Create with updatedAt, update with createdAt + $row5 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'row5', + 'data' => [ + 'string' => 'row5', + '$updatedAt' => $date2 + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $row5['headers']['status-code']); + $this->assertNotEquals($date2, $row5['body']['$createdAt']); + $this->assertEquals($date2, $row5['body']['$updatedAt']); + + $updatedRow5 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row5', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'row5_updated', + '$createdAt' => $date1 + ] + ]); + + $this->assertEquals(200, $updatedRow5['headers']['status-code']); + $this->assertEquals($date1, $updatedRow5['body']['$createdAt']); + $this->assertNotEquals($date2, $updatedRow5['body']['$updatedAt']); + + // Test 7: Create with both dates, update with different dates + $row6 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'row6', + 'data' => [ + 'string' => 'row6', + '$createdAt' => $date1, + '$updatedAt' => $date2 + ], + 'permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ] + ]); + + $this->assertEquals(201, $row6['headers']['status-code']); + $this->assertEquals($date1, $row6['body']['$createdAt']); + $this->assertEquals($date2, $row6['body']['$updatedAt']); + + $updatedRow6 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/row6', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'row6_updated', + '$createdAt' => $date3, + '$updatedAt' => $date3 + ] + ]); + + $this->assertEquals(200, $updatedRow6['headers']['status-code']); + $this->assertEquals($date3, $updatedRow6['body']['$createdAt']); + $this->assertEquals($date3, $updatedRow6['body']['$updatedAt']); + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $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 testBulkRowDateOperations(): void + { + $databaseId = $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' => 'Bulk Date Operations Database', + ]); + + $this->assertEquals(201, $databaseId['headers']['status-code']); + $databaseId = $databaseId['body']['$id']; + + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'bulk_date_operations', + 'rowSecurity' => true, + 'permissions' => [], + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + $tableId = $table['body']['$id']; + + // Create string column + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'string', + 'size' => 128, + 'required' => false, + ]); + + sleep(1); + + $createDate = '2000-01-01T10:00:00.000+00:00'; + $updateDate = '2000-02-01T15:30:00.000+00:00'; + + // Test 1: Bulk create with different date configurations + $rows = [ + [ + '$id' => 'row1', + 'string' => 'row1', + '$createdAt' => $createDate, + '$permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ], + [ + '$id' => 'row2', + 'string' => 'row2', + '$updatedAt' => $updateDate, + '$permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ], + [ + '$id' => 'row3', + 'string' => 'row3', + '$createdAt' => $createDate, + '$updatedAt' => $updateDate, + '$permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ], + [ + '$id' => 'row4', + 'string' => 'row4', + '$permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ], + [ + '$id' => 'row5', + 'string' => 'row5', + '$createdAt' => null, + '$permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ], + [ + '$id' => 'row6', + 'string' => 'row6', + '$updatedAt' => null, + '$permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ] + ]; + + // Create all rows in one bulk operation + $bulkCreateResponse = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rows' => $rows + ]); + + $this->assertEquals(201, $bulkCreateResponse['headers']['status-code']); + $this->assertCount(count($rows), $bulkCreateResponse['body']['rows']); + + // Verify initial state + foreach (['row1', 'row3'] as $id) { + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($createDate, $row['body']['$createdAt'], "createdAt mismatch for $id"); + } + + foreach (['row2', 'row3'] as $id) { + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($updateDate, $row['body']['$updatedAt'], "updatedAt mismatch for $id"); + } + + foreach (['row4', 'row5', 'row6'] as $id) { + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertNotEmpty($row['body']['$createdAt'], "createdAt missing for $id"); + $this->assertNotEmpty($row['body']['$updatedAt'], "updatedAt missing for $id"); + } + + // Test 2: Bulk update with custom dates + $updateData = [ + 'data' => [ + 'string' => 'updated', + '$createdAt' => $createDate, + '$updatedAt' => $updateDate, + '$permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ], + ]; + + // Use bulk update instead of individual updates + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), $updateData); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(6, $response['body']['rows']); + + // Verify updated state + foreach (['row1', 'row3'] as $id) { + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($createDate, $row['body']['$createdAt'], "createdAt mismatch for $id"); + $this->assertEquals($updateDate, $row['body']['$updatedAt'], "updatedAt mismatch for $id"); + $this->assertEquals('updated', $row['body']['string'], "string mismatch for $id"); + } + + foreach (['row2', 'row4', 'row5', 'row6'] as $id) { + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($updateDate, $row['body']['$updatedAt'], "updatedAt mismatch for $id"); + $this->assertEquals('updated', $row['body']['string'], "string mismatch for $id"); + } + + $newDate = '2000-03-01T20:45:00.000+00:00'; + $updateDataEnabled = [ + 'data' => [ + 'string' => 'enabled_update', + '$createdAt' => $newDate, + '$updatedAt' => $newDate + ], + ]; + + // Use bulk update instead of individual updates + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), $updateDataEnabled); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(6, $response['body']['rows']); + + // Verify final state + foreach (['row1', 'row2', 'row3', 'row4', 'row5', 'row6'] as $id) { + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($newDate, $row['body']['$createdAt'], "createdAt mismatch for $id"); + $this->assertEquals($newDate, $row['body']['$updatedAt'], "updatedAt mismatch for $id"); + $this->assertEquals('enabled_update', $row['body']['string'], "string mismatch for $id"); + } + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $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 testUpsertRowDateOperations(): void + { + $databaseId = $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' => 'Upsert Date Operations Database', + ]); + + $this->assertEquals(201, $databaseId['headers']['status-code']); + $databaseId = $databaseId['body']['$id']; + + $table = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'tableId' => ID::unique(), + 'name' => 'upsert_date_operations', + 'rowSecurity' => true, + 'permissions' => [], + ]); + + $this->assertEquals(201, $table['headers']['status-code']); + $tableId = $table['body']['$id']; + + // Create string column + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/columns/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'string', + 'size' => 128, + 'required' => false, + ]); + + sleep(1); + + $createDate = '2000-01-01T10:00:00.000+00:00'; + $updateDate = '2000-02-01T15:30:00.000+00:00'; + $date1 = '2000-01-01T10:00:00.000+00:00'; + $date2 = '2000-02-01T15:30:00.000+00:00'; + $date3 = '2000-03-01T20:45:00.000+00:00'; + + // Test 1: Upsert new row with custom createdAt + $upsertRow1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'upsert1', + 'data' => [ + 'string' => 'upsert1_initial', + '$permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ], + '$createdAt' => $createDate + ], + ]); + + $this->assertEquals(201, $upsertRow1['headers']['status-code']); + $this->assertEquals($createDate, $upsertRow1['body']['$createdAt']); + $this->assertNotEquals($createDate, $upsertRow1['body']['$updatedAt']); + + // Test 2: Upsert existing row with custom updatedAt + $updatedUpsertRow1 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/upsert1', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'upsert1_updated', + '$updatedAt' => $updateDate + ], + ]); + + $this->assertEquals(200, $updatedUpsertRow1['headers']['status-code']); + $this->assertEquals($createDate, $updatedUpsertRow1['body']['$createdAt']); + $this->assertEquals($updateDate, $updatedUpsertRow1['body']['$updatedAt']); + + // Test 3: Upsert new row with both custom dates + $upsertRow2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rowId' => 'upsert2', + 'data' => [ + 'string' => 'upsert2_both_dates', + '$permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ], + '$createdAt' => $createDate, + '$updatedAt' => $updateDate + ], + ]); + + $this->assertEquals(201, $upsertRow2['headers']['status-code']); + $this->assertEquals($createDate, $upsertRow2['body']['$createdAt']); + $this->assertEquals($updateDate, $upsertRow2['body']['$updatedAt']); + + // Test 4: Upsert existing row with different dates + $updatedUpsertRow2 = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/upsert2', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'string' => 'upsert2_updated', + '$createdAt' => $date3, + '$updatedAt' => $date3, + '$permissions' => [ + Permission::read(Role::any()), + Permission::write(Role::any()), + Permission::update(Role::any()), + ], + ] + ]); + + $this->assertEquals(200, $updatedUpsertRow2['headers']['status-code']); + $this->assertEquals($date3, $updatedUpsertRow2['body']['$createdAt']); + $this->assertEquals($date3, $updatedUpsertRow2['body']['$updatedAt']); + + // Test 5: Bulk upsert operations with custom dates + $upsertRows = [ + [ + '$id' => 'bulk_upsert1', + 'string' => 'bulk_upsert1_initial', + '$createdAt' => $createDate + ], + [ + '$id' => 'bulk_upsert2', + 'string' => 'bulk_upsert2_initial', + '$updatedAt' => $updateDate + ], + [ + '$id' => 'bulk_upsert3', + 'string' => 'bulk_upsert3_initial', + '$createdAt' => $createDate, + '$updatedAt' => $updateDate + ], + [ + '$id' => 'bulk_upsert4', + 'string' => 'bulk_upsert4_initial' + ] + ]; + + // Create rows using bulk upsert + $response = $this->client->call(Client::METHOD_PUT, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'rows' => $upsertRows + ]); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(4, $response['body']['rows']); + + // Test 7: Verify initial bulk upsert state + foreach (['bulk_upsert1', 'bulk_upsert3'] as $id) { + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($createDate, $row['body']['$createdAt'], "createdAt mismatch for $id"); + } + + foreach (['bulk_upsert2', 'bulk_upsert3'] as $id) { + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($updateDate, $row['body']['$updatedAt'], "updatedAt mismatch for $id"); + } + + foreach (['bulk_upsert4'] as $id) { + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertNotEmpty($row['body']['$createdAt'], "createdAt missing for $id"); + $this->assertNotEmpty($row['body']['$updatedAt'], "updatedAt missing for $id"); + } + + // Test 8: Bulk upsert update with custom dates + $newDate = '2000-04-01T12:00:00.000+00:00'; + $updateUpsertData = [ + 'data' => [ + 'string' => 'bulk_upsert_updated', + '$createdAt' => $newDate, + '$updatedAt' => $newDate + ], + 'queries' => [Query::equal('$id', ['bulk_upsert1','bulk_upsert2','bulk_upsert3','bulk_upsert4'])->toString()] + ]; + + $upsertIds = ['bulk_upsert1', 'bulk_upsert2', 'bulk_upsert3', 'bulk_upsert4']; + + // Use bulk update instead of individual updates + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), $updateUpsertData); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(4, $response['body']['rows']); + + // Verify updated state + foreach ($upsertIds as $id) { + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertEquals($newDate, $row['body']['$createdAt'], "createdAt mismatch for $id"); + $this->assertEquals($newDate, $row['body']['$updatedAt'], "updatedAt mismatch for $id"); + $this->assertEquals('bulk_upsert_updated', $row['body']['string'], "string mismatch for $id"); + } + + // Test 9: checking by passing null to each + $updateUpsertDataNull = [ + 'data' => [ + 'string' => 'bulk_upsert_null_test', + '$createdAt' => null, + '$updatedAt' => null + ], + 'queries' => [Query::equal('$id', ['bulk_upsert1','bulk_upsert2','bulk_upsert3','bulk_upsert4'])->toString()] + ]; + + // Use bulk update instead of individual updates + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), $updateUpsertDataNull); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(4, $response['body']['rows']); + + // Verify null handling + foreach ($upsertIds as $id) { + $row = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/grids/tables/' . $tableId . '/rows/' . $id, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $row['headers']['status-code']); + $this->assertNotEmpty($row['body']['$createdAt'], "createdAt missing for $id"); + $this->assertNotEmpty($row['body']['$updatedAt'], "updatedAt missing for $id"); + } + + // Cleanup + $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/grids/tables/' . $tableId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $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'] + ])); + } } diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php index bbede25b59..3d61b529fb 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php @@ -6159,8 +6159,6 @@ class DatabasesCustomServerTest extends Scope $this->assertNotEmpty($doc['body']['$updatedAt'], "updatedAt missing for $id"); } - - // Cleanup $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([ 'content-type' => 'application/json', @@ -6174,5 +6172,4 @@ class DatabasesCustomServerTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ])); } - } From 67582b103ce92b3c5f439c87c2020fde2cf3599c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 1 Aug 2025 13:57:38 +0530 Subject: [PATCH 332/362] updated composer --- composer.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.lock b/composer.lock index 84de95fd24..72200f7531 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": "43a92af943693f80341a8582cf582986", + "content-hash": "c4ae112243a897e16552c507c5e94097", "packages": [ { "name": "adhocore/jwt", @@ -69,16 +69,16 @@ }, { "name": "appwrite/appwrite", - "version": "15.0.0", + "version": "15.1.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-for-php.git", - "reference": "deb97b62e0abed8a4fd5c5d48e77365cf89867cf" + "reference": "c438b3885071ac7c0329199dce5e6f6a24dd215b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/deb97b62e0abed8a4fd5c5d48e77365cf89867cf", - "reference": "deb97b62e0abed8a4fd5c5d48e77365cf89867cf", + "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/c438b3885071ac7c0329199dce5e6f6a24dd215b", + "reference": "c438b3885071ac7c0329199dce5e6f6a24dd215b", "shasum": "" }, "require": { @@ -104,10 +104,10 @@ "support": { "email": "team@appwrite.io", "issues": "https://github.com/appwrite/sdk-for-php/issues", - "source": "https://github.com/appwrite/sdk-for-php/tree/15.0.0", + "source": "https://github.com/appwrite/sdk-for-php/tree/15.1.0", "url": "https://appwrite.io/support" }, - "time": "2025-05-18T09:47:10+00:00" + "time": "2025-08-01T04:50:51+00:00" }, { "name": "appwrite/php-clamav", @@ -4814,16 +4814,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.26", + "version": "0.41.27", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "5a13191a5a4bdec8fe1b1180ff67f75c4ff6ac0b" + "reference": "083fd2e8163d6a4e59ee971ac6cb97277d831dd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/5a13191a5a4bdec8fe1b1180ff67f75c4ff6ac0b", - "reference": "5a13191a5a4bdec8fe1b1180ff67f75c4ff6ac0b", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/083fd2e8163d6a4e59ee971ac6cb97277d831dd5", + "reference": "083fd2e8163d6a4e59ee971ac6cb97277d831dd5", "shasum": "" }, "require": { @@ -4859,9 +4859,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.26" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.27" }, - "time": "2025-07-30T06:53:12+00:00" + "time": "2025-07-31T10:20:46+00:00" }, { "name": "doctrine/annotations", From f6c4457398ef0cbcbf5e10e1df2c7f7e4649920a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Fri, 1 Aug 2025 14:54:15 +0530 Subject: [PATCH 333/362] changed the error message for client side --- .../Databases/Http/Databases/Collections/Documents/Create.php | 4 ++-- .../Databases/Http/Databases/Collections/Documents/Update.php | 4 ++-- .../Databases/Http/Databases/Collections/Documents/Upsert.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 17243caa8f..9e7a31c4be 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -354,11 +354,11 @@ class Create extends Action // Allowing to add createdAt and updatedAt timestamps if server side(api key if (!$isAPIKey && !$isPrivilegedUser) { if (isset($document['$createdAt'])) { - throw new Exception($this->getInvalidStructureException(), 'Attribute "$createdAt" is not allowed'); + throw new Exception($this->getInvalidStructureException(), 'Attribute "$createdAt" can not be modified. Please use a server SDK with an API key to modify server attributes.'); } if (isset($document['$updatedAt'])) { - throw new Exception($this->getInvalidStructureException(), 'Attribute "$updatedAt" is not allowed'); + throw new Exception($this->getInvalidStructureException(), 'Attribute "$updatedAt" can not be modified. Please use a server SDK with an API key to modify server attributes.'); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 17993d47a1..1d06e6d0da 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -112,11 +112,11 @@ class Update extends Action // Allowing to add createdAt and updatedAt timestamps if server side(api key) if (!$isAPIKey && !$isPrivilegedUser) { if (isset($data['$createdAt'])) { - throw new Exception($this->getInvalidStructureException(), 'Attribute "$createdAt" is not allowed'); + throw new Exception($this->getInvalidStructureException(), 'Attribute "$createdAt" can not be modified. Please use a server SDK with an API key to modify server attributes.'); } if (isset($data['$updatedAt'])) { - throw new Exception($this->getInvalidStructureException(), 'Attribute "$updatedAt" is not allowed'); + throw new Exception($this->getInvalidStructureException(), 'Attribute "$updatedAt" can not be modified. Please use a server SDK with an API key to modify server attributes.'); } } // Read permission should not be required for update diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php index ecd9ac79df..e862896a40 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Upsert.php @@ -156,11 +156,11 @@ class Upsert extends Action // Allowing to add createdAt and updatedAt timestamps if server side(api key) if (!$isAPIKey && !$isPrivilegedUser) { if (isset($data['$createdAt'])) { - throw new Exception($this->getInvalidStructureException(), 'Attribute "$createdAt" is not allowed'); + throw new Exception($this->getInvalidStructureException(), 'Attribute "$createdAt" can not be modified. Please use a server SDK with an API key to modify server attributes.'); } if (isset($data['$updatedAt'])) { - throw new Exception($this->getInvalidStructureException(), 'Attribute "$updatedAt" is not allowed'); + throw new Exception($this->getInvalidStructureException(), 'Attribute "$updatedAt" can not be modified. Please use a server SDK with an API key to modify server attributes.'); } } From bc53c73a7aaa461be4b97c6e1b1eb9fe2ea7d907 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Sun, 3 Aug 2025 09:00:24 +0300 Subject: [PATCH 334/362] Remove $sequence --- composer.lock | 8 ++++---- .../Functions/Http/Deployments/Duplicate/Create.php | 2 +- .../Modules/Sites/Http/Deployments/Duplicate/Create.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index f0cbe1beb5..0acd5f13f1 100644 --- a/composer.lock +++ b/composer.lock @@ -3501,12 +3501,12 @@ "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "9961ba26ccfd7eb64b59accfa729349ad772f743" + "reference": "b10964171b2a716d0c9a9f80c1b13b18ccef4ff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/9961ba26ccfd7eb64b59accfa729349ad772f743", - "reference": "9961ba26ccfd7eb64b59accfa729349ad772f743", + "url": "https://api.github.com/repos/utopia-php/database/zipball/b10964171b2a716d0c9a9f80c1b13b18ccef4ff2", + "reference": "b10964171b2a716d0c9a9f80c1b13b18ccef4ff2", "shasum": "" }, "require": { @@ -3549,7 +3549,7 @@ "issues": "https://github.com/utopia-php/database/issues", "source": "https://github.com/utopia-php/database/tree/primary-attribute" }, - "time": "2025-07-31T13:07:59+00:00" + "time": "2025-07-31T14:14:16+00:00" }, { "name": "utopia-php/detector", diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Duplicate/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Duplicate/Create.php index 28861f71f1..e2d49ecb8b 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Duplicate/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Duplicate/Create.php @@ -97,8 +97,8 @@ class Create extends Action $deviceForFunctions->transfer($path, $destination, $deviceForFunctions); $deployment->removeAttribute('$sequence'); + $deployment = $dbForProject->createDocument('deployments', $deployment->setAttributes([ - '$sequence' => '', '$id' => $deploymentId, 'sourcePath' => $destination, 'totalSize' => $deployment->getAttribute('sourceSize', 0), diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Duplicate/Create.php b/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Duplicate/Create.php index 22a7a47390..065dd13e88 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Duplicate/Create.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Duplicate/Create.php @@ -111,8 +111,8 @@ class Create extends Action } $deployment->removeAttribute('$sequence'); + $deployment = $dbForProject->createDocument('deployments', $deployment->setAttributes([ - '$sequence' => '', '$id' => $deploymentId, 'sourcePath' => $destination, 'totalSize' => $deployment->getAttribute('sourceSize', 0), From e55aaf1da9f0deb049fc6436e9a46ee3239886cc Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Sun, 3 Aug 2025 09:04:47 +0300 Subject: [PATCH 335/362] Pull main --- composer.lock | 51 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/composer.lock b/composer.lock index 72200f7531..bf5830d75d 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": "c4ae112243a897e16552c507c5e94097", + "content-hash": "5f540db5a1e36b3345e4f56fc491da3a", "packages": [ { "name": "adhocore/jwt", @@ -3497,16 +3497,16 @@ }, { "name": "utopia-php/database", - "version": "0.74.3", + "version": "dev-primary-attribute", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "065b4812799d57fd2c596f88aadd51644247c7e3" + "reference": "b10964171b2a716d0c9a9f80c1b13b18ccef4ff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/065b4812799d57fd2c596f88aadd51644247c7e3", - "reference": "065b4812799d57fd2c596f88aadd51644247c7e3", + "url": "https://api.github.com/repos/utopia-php/database/zipball/b10964171b2a716d0c9a9f80c1b13b18ccef4ff2", + "reference": "b10964171b2a716d0c9a9f80c1b13b18ccef4ff2", "shasum": "" }, "require": { @@ -3547,9 +3547,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.74.3" + "source": "https://github.com/utopia-php/database/tree/primary-attribute" }, - "time": "2025-07-31T15:00:30+00:00" + "time": "2025-07-31T14:14:16+00:00" }, { "name": "utopia-php/detector", @@ -4814,16 +4814,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.27", + "version": "0.41.28", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "083fd2e8163d6a4e59ee971ac6cb97277d831dd5" + "reference": "8eace11070264c62c8da3c69498fb8dc98fcfaf7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/083fd2e8163d6a4e59ee971ac6cb97277d831dd5", - "reference": "083fd2e8163d6a4e59ee971ac6cb97277d831dd5", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/8eace11070264c62c8da3c69498fb8dc98fcfaf7", + "reference": "8eace11070264c62c8da3c69498fb8dc98fcfaf7", "shasum": "" }, "require": { @@ -4859,9 +4859,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.27" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.28" }, - "time": "2025-07-31T10:20:46+00:00" + "time": "2025-08-01T11:06:30+00:00" }, { "name": "doctrine/annotations", @@ -5280,16 +5280,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.13.3", + "version": "1.13.4", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "faed855a7b5f4d4637717c2b3863e277116beb36" + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/faed855a7b5f4d4637717c2b3863e277116beb36", - "reference": "faed855a7b5f4d4637717c2b3863e277116beb36", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", "shasum": "" }, "require": { @@ -5328,7 +5328,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.3" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" }, "funding": [ { @@ -5336,7 +5336,7 @@ "type": "tidelift" } ], - "time": "2025-07-05T12:25:42+00:00" + "time": "2025-08-01T08:46:24+00:00" }, { "name": "nikic/php-parser", @@ -8261,9 +8261,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-primary-attribute", + "alias": "0.73.2", + "alias_normalized": "0.73.2.0" + } + ], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/database": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From e3f08fa010167666f7afd56895aded1217a3ab31 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Sun, 3 Aug 2025 10:15:25 +0300 Subject: [PATCH 336/362] Run tests --- composer.json | 2 +- composer.lock | 27 +++++++++------------------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 2d7b85f646..e0c9dc36af 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "dev-primary-attribute as 0.73.2", + "utopia-php/database": "0.73.*", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index bf5830d75d..655175bea1 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": "5f540db5a1e36b3345e4f56fc491da3a", + "content-hash": "a2740535c6a9ebbcf6d01df4d35bb78d", "packages": [ { "name": "adhocore/jwt", @@ -3497,16 +3497,16 @@ }, { "name": "utopia-php/database", - "version": "dev-primary-attribute", + "version": "0.73.2", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "b10964171b2a716d0c9a9f80c1b13b18ccef4ff2" + "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/b10964171b2a716d0c9a9f80c1b13b18ccef4ff2", - "reference": "b10964171b2a716d0c9a9f80c1b13b18ccef4ff2", + "url": "https://api.github.com/repos/utopia-php/database/zipball/68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", + "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", "shasum": "" }, "require": { @@ -3547,9 +3547,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/primary-attribute" + "source": "https://github.com/utopia-php/database/tree/0.73.2" }, - "time": "2025-07-31T14:14:16+00:00" + "time": "2025-07-29T03:23:04+00:00" }, { "name": "utopia-php/detector", @@ -8261,18 +8261,9 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [ - { - "package": "utopia-php/database", - "version": "dev-primary-attribute", - "alias": "0.73.2", - "alias_normalized": "0.73.2.0" - } - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/database": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From 27ae4f316d7dd4323479cf8f2d24459880fceee5 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Sun, 3 Aug 2025 10:35:31 +0300 Subject: [PATCH 337/362] Run tests --- composer.json | 2 +- composer.lock | 27 ++++++++++++++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index e0c9dc36af..2d7b85f646 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.73.*", + "utopia-php/database": "dev-primary-attribute as 0.73.2", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index 655175bea1..95a1ddd6ec 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": "a2740535c6a9ebbcf6d01df4d35bb78d", + "content-hash": "5f540db5a1e36b3345e4f56fc491da3a", "packages": [ { "name": "adhocore/jwt", @@ -3497,16 +3497,16 @@ }, { "name": "utopia-php/database", - "version": "0.73.2", + "version": "dev-primary-attribute", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480" + "reference": "ab1d5c826e8909f8f7406f0e36b345af86b29c44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", - "reference": "68545dfd5d1ac41ca2f4f5a59719b890fcd8f480", + "url": "https://api.github.com/repos/utopia-php/database/zipball/ab1d5c826e8909f8f7406f0e36b345af86b29c44", + "reference": "ab1d5c826e8909f8f7406f0e36b345af86b29c44", "shasum": "" }, "require": { @@ -3547,9 +3547,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.73.2" + "source": "https://github.com/utopia-php/database/tree/primary-attribute" }, - "time": "2025-07-29T03:23:04+00:00" + "time": "2025-08-03T06:07:59+00:00" }, { "name": "utopia-php/detector", @@ -8261,9 +8261,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-primary-attribute", + "alias": "0.73.2", + "alias_normalized": "0.73.2.0" + } + ], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "utopia-php/database": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From 992d10afb51f8f34692f54db145b480a5d0431ef Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 4 Aug 2025 09:07:36 +0300 Subject: [PATCH 338/362] Run tests --- composer.json | 2 +- composer.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 2d7b85f646..3846f66319 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "dev-primary-attribute as 0.73.2", + "utopia-php/database": "dev-fix-encode-permissions as 0.73.2", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index 95a1ddd6ec..6029d325d4 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": "5f540db5a1e36b3345e4f56fc491da3a", + "content-hash": "f770275cec58c4afcf7765a293aa3c20", "packages": [ { "name": "adhocore/jwt", @@ -3497,16 +3497,16 @@ }, { "name": "utopia-php/database", - "version": "dev-primary-attribute", + "version": "dev-fix-encode-permissions", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "ab1d5c826e8909f8f7406f0e36b345af86b29c44" + "reference": "8735c8fce78d64bb64f134dc2207ea684c9848a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/ab1d5c826e8909f8f7406f0e36b345af86b29c44", - "reference": "ab1d5c826e8909f8f7406f0e36b345af86b29c44", + "url": "https://api.github.com/repos/utopia-php/database/zipball/8735c8fce78d64bb64f134dc2207ea684c9848a0", + "reference": "8735c8fce78d64bb64f134dc2207ea684c9848a0", "shasum": "" }, "require": { @@ -3547,9 +3547,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/primary-attribute" + "source": "https://github.com/utopia-php/database/tree/fix-encode-permissions" }, - "time": "2025-08-03T06:07:59+00:00" + "time": "2025-08-03T15:04:19+00:00" }, { "name": "utopia-php/detector", @@ -8264,7 +8264,7 @@ "aliases": [ { "package": "utopia-php/database", - "version": "dev-primary-attribute", + "version": "dev-fix-encode-permissions", "alias": "0.73.2", "alias_normalized": "0.73.2.0" } From 7d82d3d9453861eb532ac9ed0f0bfb2090b3c60f Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Mon, 4 Aug 2025 11:04:33 +0300 Subject: [PATCH 339/362] Run tests --- composer.json | 2 +- composer.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 3846f66319..2d7b85f646 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "dev-fix-encode-permissions as 0.73.2", + "utopia-php/database": "dev-primary-attribute as 0.73.2", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index 6029d325d4..95a1ddd6ec 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": "f770275cec58c4afcf7765a293aa3c20", + "content-hash": "5f540db5a1e36b3345e4f56fc491da3a", "packages": [ { "name": "adhocore/jwt", @@ -3497,16 +3497,16 @@ }, { "name": "utopia-php/database", - "version": "dev-fix-encode-permissions", + "version": "dev-primary-attribute", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "8735c8fce78d64bb64f134dc2207ea684c9848a0" + "reference": "ab1d5c826e8909f8f7406f0e36b345af86b29c44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/8735c8fce78d64bb64f134dc2207ea684c9848a0", - "reference": "8735c8fce78d64bb64f134dc2207ea684c9848a0", + "url": "https://api.github.com/repos/utopia-php/database/zipball/ab1d5c826e8909f8f7406f0e36b345af86b29c44", + "reference": "ab1d5c826e8909f8f7406f0e36b345af86b29c44", "shasum": "" }, "require": { @@ -3547,9 +3547,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/fix-encode-permissions" + "source": "https://github.com/utopia-php/database/tree/primary-attribute" }, - "time": "2025-08-03T15:04:19+00:00" + "time": "2025-08-03T06:07:59+00:00" }, { "name": "utopia-php/detector", @@ -8264,7 +8264,7 @@ "aliases": [ { "package": "utopia-php/database", - "version": "dev-fix-encode-permissions", + "version": "dev-primary-attribute", "alias": "0.73.2", "alias_normalized": "0.73.2.0" } From 59026a17dcc013776004cddd126447abb762615c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Mon, 4 Aug 2025 19:01:48 +0530 Subject: [PATCH 340/362] feat: Enhance database operations with event queues and improve test coverage for bulk operations - Added event queue injections in Bulk Update and Create classes for better event handling. - Modified getUser method in Scope class to allow for user retrieval with an override option. - Expanded RealtimeCustomClientTest to include comprehensive tests for bulk create, update, and delete operations, ensuring proper event emissions for multiple clients. - Improved assertions in tests to validate event data and permissions for created, updated, and deleted documents. --- .../Collections/Documents/Action.php | 46 ++ .../Collections/Documents/Bulk/Delete.php | 18 +- .../Collections/Documents/Bulk/Update.php | 18 +- .../Collections/Documents/Create.php | 16 +- .../Http/Grids/Tables/Rows/Bulk/Delete.php | 4 + .../Http/Grids/Tables/Rows/Bulk/Update.php | 4 + .../Http/Grids/Tables/Rows/Create.php | 3 + tests/e2e/Scopes/Scope.php | 4 +- .../Realtime/RealtimeCustomClientTest.php | 633 +++++++++++++++++- 9 files changed, 739 insertions(+), 7 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index 9a1c5f3dad..6766097f81 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents; +use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Utopia\Database\Database; use Utopia\Database\Document; @@ -279,4 +280,49 @@ abstract class Action extends UtopiaAction return true; } + + /** + * For triggering different queues for each document for a bulk documents + * @param string $event + * @param Document $database + * @param Document $collection + * @param Document[] $documents + * @param Event $queueForEvents + * @param Event $queueForRealtime + * @param Event $queueForFunctions + * @param Event $queueForWebhooks + * @return void + */ + final protected function triggerQueuesForBulkDocuments(string $event, Document $database, Document $collection, array $documents, Event $queueForEvents, Event $queueForRealtime, Event $queueForFunctions, Event $queueForWebhooks) + { + foreach ($documents as $document) { + $queueForEvents + ->setEvent($event) + ->setParam('databaseId', $database->getId()) + ->setContext('database', $database) + ->setParam('collectionId', $collection->getId()) + ->setParam('tableId', $collection->getId()) + ->setParam('documentId', $document->getId()) + ->setParam('rowId', $document->getId()) + ->setPayload($document->getArrayCopy()) + ->setContext($this->getCollectionsEventsContext(), $collection); + + $queueForRealtime + ->from($queueForEvents) + ->trigger(); + + $queueForFunctions + ->from($queueForEvents) + ->trigger(); + + $queueForWebhooks + ->from($queueForEvents) + ->trigger(); + } + + $queueForEvents->reset(); + $queueForRealtime->reset(); + $queueForFunctions->reset(); + $queueForWebhooks->reset(); + } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index 440927d45c..17c524b23c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk; +use Appwrite\Event\Event; use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Action; @@ -73,10 +74,14 @@ class Delete extends Action ->inject('dbForProject') ->inject('queueForStatsUsage') ->inject('plan') + ->inject('queueForEvents') + ->inject('queueForRealtime') + ->inject('queueForFunctions') + ->inject('queueForWebhooks') ->callback($this->action(...)); } - public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, array $plan): void + public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, array $plan, Event $queueForEvents, Event $queueForRealtime, Event $queueForFunctions, Event $queueForWebhooks): void { $database = $dbForProject->getDocument('databases', $databaseId); if ($database->isEmpty()) { @@ -134,5 +139,16 @@ class Delete extends Action 'total' => $modified, $this->getSdkGroup() => $documents, ]), $this->getResponseModel()); + + $this->triggerQueuesForBulkDocuments( + 'databases.[databaseId].collections.[collectionId].documents.[documentId].delete', + $database, + $collection, + $documents, + $queueForEvents, + $queueForRealtime, + $queueForFunctions, + $queueForWebhooks + ); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index 14bd71c5ea..908817f31d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -2,6 +2,7 @@ namespace Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Bulk; +use Appwrite\Event\Event; use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception; use Appwrite\Platform\Modules\Databases\Http\Databases\Collections\Documents\Action; @@ -77,10 +78,14 @@ class Update extends Action ->inject('dbForProject') ->inject('queueForStatsUsage') ->inject('plan') + ->inject('queueForEvents') + ->inject('queueForRealtime') + ->inject('queueForFunctions') + ->inject('queueForWebhooks') ->callback($this->action(...)); } - public function action(string $databaseId, string $collectionId, string|array $data, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, array $plan): void + public function action(string $databaseId, string $collectionId, string|array $data, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, array $plan, Event $queueForEvents, Event $queueForRealtime, Event $queueForFunctions, Event $queueForWebhooks): void { $data = \is_string($data) ? \json_decode($data, true) @@ -158,5 +163,16 @@ class Update extends Action 'total' => $modified, $this->getSdkGroup() => $documents ]), $this->getResponseModel()); + + $this->triggerQueuesForBulkDocuments( + 'databases.[databaseId].collections.[collectionId].documents.[documentId].update', + $database, + $collection, + $documents, + $queueForEvents, + $queueForRealtime, + $queueForFunctions, + $queueForWebhooks + ); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index 9e7a31c4be..d961f400eb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -122,10 +122,12 @@ class Create extends Action ->inject('user') ->inject('queueForEvents') ->inject('queueForStatsUsage') + ->inject('queueForRealtime') + ->inject('queueForFunctions') + ->inject('queueForWebhooks') ->callback($this->action(...)); } - - public function action(string $databaseId, string $documentId, string $collectionId, string|array $data, ?array $permissions, ?array $documents, UtopiaResponse $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage): void + public function action(string $databaseId, string $documentId, string $collectionId, string|array $data, ?array $permissions, ?array $documents, UtopiaResponse $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage, Event $queueForRealtime, Event $queueForFunctions, Event $queueForWebhooks): void { $data = \is_string($data) ? \json_decode($data, true) @@ -417,6 +419,16 @@ class Create extends Action $this->getSdkGroup() => $documents ]), $this->getBulkResponseModel()); + $this->triggerQueuesForBulkDocuments( + 'databases.[databaseId].collections.[collectionId].documents.[documentId].create', + $database, + $collection, + $documents, + $queueForEvents, + $queueForRealtime, + $queueForFunctions, + $queueForWebhooks + ); return; } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php index 4837d30e46..aab4906d02 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php @@ -60,6 +60,10 @@ class Delete extends DocumentsDelete ->inject('dbForProject') ->inject('queueForStatsUsage') ->inject('plan') + ->inject('queueForEvents') + ->inject('queueForRealtime') + ->inject('queueForFunctions') + ->inject('queueForWebhooks') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php index c72d82d65d..2c373ffbc6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php @@ -62,6 +62,10 @@ class Update extends DocumentsUpdate ->inject('dbForProject') ->inject('queueForStatsUsage') ->inject('plan') + ->inject('queueForEvents') + ->inject('queueForRealtime') + ->inject('queueForFunctions') + ->inject('queueForWebhooks') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php index 56933b882c..6fadbe1412 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php @@ -101,6 +101,9 @@ class Create extends DocumentCreate ->inject('user') ->inject('queueForEvents') ->inject('queueForStatsUsage') + ->inject('queueForRealtime') + ->inject('queueForFunctions') + ->inject('queueForWebhooks') ->callback($this->action(...)); } } diff --git a/tests/e2e/Scopes/Scope.php b/tests/e2e/Scopes/Scope.php index 2ee0d0198e..a9451cc22b 100644 --- a/tests/e2e/Scopes/Scope.php +++ b/tests/e2e/Scopes/Scope.php @@ -182,9 +182,9 @@ abstract class Scope extends TestCase /** * @return array */ - public function getUser(): array + public function getUser(bool $override = false): array { - if (isset(self::$user[$this->getProject()['$id']])) { + if (!$override && isset(self::$user[$this->getProject()['$id']])) { return self::$user[$this->getProject()['$id']]; } diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index 1844f3bce4..f234209b88 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -819,7 +819,6 @@ class RealtimeCustomClientTest extends Scope ]); $response = json_decode($client->receive(), true); - $this->assertArrayHasKey('type', $response); $this->assertArrayHasKey('data', $response); $this->assertEquals('event', $response['type']); @@ -898,9 +897,641 @@ class RealtimeCustomClientTest extends Scope $this->assertNotEmpty($response['data']['payload']); $this->assertEquals('Bradley Cooper', $response['data']['payload']['name']); + // test bulk create + $documents = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$actorsId}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documents' => [ + [ + '$id' => ID::unique(), + 'name' => 'Robert Downey Jr.', + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ], + [ + '$id' => ID::unique(), + 'name' => 'Scarlett Johansson', + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ] + ], + ]); + + // Receive first document event + $response = json_decode($client->receive(), true); + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(6, $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response['data']['payload']['$id']}.create", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.create", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.*.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.create", $response['data']['events']); + $this->assertContains("databases.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + $this->assertIsArray($response['data']['payload']); + $this->assertArrayHasKey('$id', $response['data']['payload']); + $this->assertArrayHasKey('name', $response['data']['payload']); + $this->assertArrayHasKey('$permissions', $response['data']['payload']); + $this->assertIsArray($response['data']['payload']['$permissions']); + $this->assertContains(Permission::read(Role::any()), $response['data']['payload']['$permissions']); + $this->assertContains(Permission::update(Role::any()), $response['data']['payload']['$permissions']); + $this->assertContains(Permission::delete(Role::any()), $response['data']['payload']['$permissions']); + + // Receive second document event + $response = json_decode($client->receive(), true); + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(6, $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response['data']['payload']['$id']}.create", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.create", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.create", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.*.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.create", $response['data']['events']); + $this->assertContains("databases.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + $this->assertIsArray($response['data']['payload']); + $this->assertArrayHasKey('$id', $response['data']['payload']); + $this->assertArrayHasKey('name', $response['data']['payload']); + $this->assertArrayHasKey('$permissions', $response['data']['payload']); + $this->assertIsArray($response['data']['payload']['$permissions']); + $this->assertContains(Permission::read(Role::any()), $response['data']['payload']['$permissions']); + $this->assertContains(Permission::update(Role::any()), $response['data']['payload']['$permissions']); + $this->assertContains(Permission::delete(Role::any()), $response['data']['payload']['$permissions']); + + // test bulk update + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $actorsId . '/documents/', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'name' => 'Marvel Hero' + ], + ]); + $this->assertEquals(200, $response['headers']['status-code']); + + // Receive first document update event + $response = json_decode($client->receive(), true); + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(6, $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response['data']['payload']['$id']}.update", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.*.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("databases.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + $this->assertIsArray($response['data']['payload']); + $this->assertArrayHasKey('$id', $response['data']['payload']); + $this->assertEquals('Marvel Hero', $response['data']['payload']['name']); + $this->assertArrayHasKey('$permissions', $response['data']['payload']); + + // Receive second document update event + $response = json_decode($client->receive(), true); + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(6, $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response['data']['payload']['$id']}.update", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.*.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("databases.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + $this->assertIsArray($response['data']['payload']); + $this->assertArrayHasKey('$id', $response['data']['payload']); + $this->assertEquals('Marvel Hero', $response['data']['payload']['name']); + $this->assertArrayHasKey('$permissions', $response['data']['payload']); + + // Receive third document update event + $response = json_decode($client->receive(), true); + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(6, $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response['data']['payload']['$id']}.update", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.update", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.*.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response['data']['events']); + $this->assertContains("databases.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + $this->assertIsArray($response['data']['payload']); + $this->assertArrayHasKey('$id', $response['data']['payload']); + $this->assertEquals('Marvel Hero', $response['data']['payload']['name']); + $this->assertArrayHasKey('$permissions', $response['data']['payload']); + + // Test bulk delete + $response = $this->client->call(Client::METHOD_DELETE, "/databases/{$databaseId}/collections/{$actorsId}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $response['headers']['status-code']); + + // Receive first document delete event + $response = json_decode($client->receive(), true); + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(6, $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response['data']['payload']['$id']}.delete", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.*.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + $this->assertIsArray($response['data']['payload']); + $this->assertArrayHasKey('$id', $response['data']['payload']); + $this->assertArrayHasKey('name', $response['data']['payload']); + $this->assertArrayHasKey('$permissions', $response['data']['payload']); + $this->assertIsArray($response['data']['payload']['$permissions']); + + // Receive second document delete event + $response = json_decode($client->receive(), true); + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(6, $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response['data']['payload']['$id']}.delete", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.*.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + $this->assertIsArray($response['data']['payload']); + $this->assertArrayHasKey('$id', $response['data']['payload']); + $this->assertArrayHasKey('name', $response['data']['payload']); + $this->assertArrayHasKey('$permissions', $response['data']['payload']); + $this->assertIsArray($response['data']['payload']['$permissions']); + + // Receive third document delete event + $response = json_decode($client->receive(), true); + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('event', $response['type']); + $this->assertNotEmpty($response['data']); + $this->assertArrayHasKey('timestamp', $response['data']); + $this->assertCount(6, $response['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response['data']['payload']['$id']}.delete", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.*.collections.*", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response['data']['events']); + $this->assertContains("databases.*", $response['data']['events']); + $this->assertNotEmpty($response['data']['payload']); + $this->assertIsArray($response['data']['payload']); + $this->assertArrayHasKey('$id', $response['data']['payload']); + $this->assertArrayHasKey('name', $response['data']['payload']); + $this->assertArrayHasKey('$permissions', $response['data']['payload']); + $this->assertIsArray($response['data']['payload']['$permissions']); + $client->close(); } + public function testChannelDatabaseBulkOperationMultipleClient() + { + // user with api key will do operations and other valid users + $user1 = $this->getUser(true); + $user1Id = $user1['$id']; + $session = $user1['session'] ?? ''; + $projectId = $this->getProject()['$id']; + + $client1 = $this->getWebsocket(['documents', 'collections'], [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $projectId . '=' . $session + ]); + + $response = json_decode($client1->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('connected', $response['type']); + $this->assertNotEmpty($response['data']); + + $user2 = $this->getUser(override:true); + $user2Id = $user2['$id']; + $session = $user2['session'] ?? ''; + $projectId = $this->getProject()['$id']; + + $client2 = $this->getWebsocket(['documents', 'collections'], [ + 'origin' => 'http://localhost', + 'cookie' => 'a_session_' . $projectId . '=' . $session + ]); + + $response = json_decode($client2->receive(), true); + + $this->assertArrayHasKey('type', $response); + $this->assertArrayHasKey('data', $response); + $this->assertEquals('connected', $response['type']); + $this->assertNotEmpty($response['data']); + + + /** + * Test Database Create + */ + $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' => 'Actors DB', + ]); + + $databaseId = $database['body']['$id']; + + /** + * Test Collection Create + */ + $actors = $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' => 'Actors', + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + ], + 'documentSecurity' => true, + ]); + + $actorsId = $actors['body']['$id']; + + $name = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $actorsId . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + $this->assertEquals(202, $name['headers']['status-code']); + $this->assertEquals('name', $name['body']['key']); + $this->assertEquals('string', $name['body']['type']); + $this->assertEquals(256, $name['body']['size']); + $this->assertTrue($name['body']['required']); + + sleep(2); + + // create + $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$actorsId}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'documents' => [ + [ + '$id' => ID::unique(), + 'name' => 'Any', + '$permissions' => [ + Permission::read(Role::any()), + Permission::update(Role::any()), + Permission::delete(Role::any()), + ], + ], + [ + '$id' => ID::unique(), + 'name' => 'Users', + '$permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ], + ], + [ + '$id' => ID::unique(), + 'name' => 'User1', + '$permissions' => [ + Permission::read(Role::user($user1Id)), + ], + ], + [ + '$id' => ID::unique(), + 'name' => 'User2', + '$permissions' => [ + Permission::read(Role::user($user2Id)), + ], + ], + [ + '$id' => ID::unique(), + 'name' => 'User2-1', + '$permissions' => [ + Permission::read(Role::user($user2Id)), + ], + ] + ], + ]); + + // Receive and assert for client1 - should receive 3 individual document events + for ($i = 0; $i < 3; $i++) { + $response1 = json_decode($client1->receive(), true); + $this->assertArrayHasKey('type', $response1); + $this->assertArrayHasKey('data', $response1); + $this->assertEquals('event', $response1['type']); + $this->assertNotEmpty($response1['data']); + $this->assertArrayHasKey('timestamp', $response1['data']); + $this->assertCount(6, $response1['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response1['data']['payload']['$id']}.create", $response1['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.create", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.create", $response1['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.create", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response1['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response1['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response1['data']['events']); + $this->assertContains("databases.*.collections.*", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response1['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.create", $response1['data']['events']); + $this->assertContains("databases.*", $response1['data']['events']); + $this->assertNotEmpty($response1['data']['payload']); + $this->assertIsArray($response1['data']['payload']); + $this->assertArrayHasKey('$id', $response1['data']['payload']); + $this->assertArrayHasKey('name', $response1['data']['payload']); + $this->assertArrayHasKey('$permissions', $response1['data']['payload']); + $this->assertIsArray($response1['data']['payload']['$permissions']); + } + + // Receive and assert for client2 - should receive 4 individual document events + for ($i = 0; $i < 4; $i++) { + $response2 = json_decode($client2->receive(), true); + $this->assertArrayHasKey('type', $response2); + $this->assertArrayHasKey('data', $response2); + $this->assertEquals('event', $response2['type']); + $this->assertNotEmpty($response2['data']); + $this->assertArrayHasKey('timestamp', $response2['data']); + $this->assertCount(6, $response2['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response2['data']['payload']['$id']}.create", $response2['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.create", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.create", $response2['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.create", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response2['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response2['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response2['data']['events']); + $this->assertContains("databases.*.collections.*", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response2['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.create", $response2['data']['events']); + $this->assertContains("databases.*", $response2['data']['events']); + $this->assertNotEmpty($response2['data']['payload']); + $this->assertIsArray($response2['data']['payload']); + $this->assertArrayHasKey('$id', $response2['data']['payload']); + $this->assertArrayHasKey('name', $response2['data']['payload']); + $this->assertArrayHasKey('$permissions', $response2['data']['payload']); + $this->assertIsArray($response2['data']['payload']['$permissions']); + } + + + // Perform bulk update + $response = $this->client->call(Client::METHOD_PATCH, "/databases/{$databaseId}/collections/{$actorsId}/documents/", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'name' => 'Marvel Hero' + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + // Receive and assert for client1 - should receive 3 individual document update events + for ($i = 0; $i < 3; $i++) { + $response1 = json_decode($client1->receive(), true); + $this->assertArrayHasKey('type', $response1); + $this->assertArrayHasKey('data', $response1); + $this->assertEquals('event', $response1['type']); + $this->assertNotEmpty($response1['data']); + $this->assertArrayHasKey('timestamp', $response1['data']); + $this->assertCount(6, $response1['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response1['data']['payload']['$id']}.update", $response1['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.update", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response1['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.update", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response1['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response1['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response1['data']['events']); + $this->assertContains("databases.*.collections.*", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response1['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response1['data']['events']); + $this->assertContains("databases.*", $response1['data']['events']); + $this->assertNotEmpty($response1['data']['payload']); + $this->assertIsArray($response1['data']['payload']); + $this->assertArrayHasKey('$id', $response1['data']['payload']); + $this->assertEquals('Marvel Hero', $response1['data']['payload']['name']); + $this->assertArrayHasKey('$permissions', $response1['data']['payload']); + } + + // Receive and assert for client2 - should receive 4 individual document update events + for ($i = 0; $i < 4; $i++) { + $response2 = json_decode($client2->receive(), true); + $this->assertArrayHasKey('type', $response2); + $this->assertArrayHasKey('data', $response2); + $this->assertEquals('event', $response2['type']); + $this->assertNotEmpty($response2['data']); + $this->assertArrayHasKey('timestamp', $response2['data']); + $this->assertCount(6, $response2['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response2['data']['payload']['$id']}.update", $response2['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.update", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response2['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.update", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response2['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response2['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response2['data']['events']); + $this->assertContains("databases.*.collections.*", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response2['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response2['data']['events']); + $this->assertContains("databases.*", $response2['data']['events']); + $this->assertNotEmpty($response2['data']['payload']); + $this->assertIsArray($response2['data']['payload']); + $this->assertArrayHasKey('$id', $response2['data']['payload']); + $this->assertEquals('Marvel Hero', $response2['data']['payload']['name']); + $this->assertArrayHasKey('$permissions', $response2['data']['payload']); + } + + // Perform bulk delete + $response = $this->client->call(Client::METHOD_DELETE, "/databases/{$databaseId}/collections/{$actorsId}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $response['headers']['status-code']); + + // Receive and assert for client1 - should receive 3 individual document delete events + for ($i = 0; $i < 3; $i++) { + $response1 = json_decode($client1->receive(), true); + $this->assertArrayHasKey('type', $response1); + $this->assertArrayHasKey('data', $response1); + $this->assertEquals('event', $response1['type']); + $this->assertNotEmpty($response1['data']); + $this->assertArrayHasKey('timestamp', $response1['data']); + $this->assertCount(6, $response1['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response1['data']['payload']['$id']}.delete", $response1['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.delete", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response1['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.delete", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response1['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response1['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response1['data']['events']); + $this->assertContains("databases.*.collections.*", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response1['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response1['data']['events']); + $this->assertContains("databases.*", $response1['data']['events']); + $this->assertNotEmpty($response1['data']['payload']); + $this->assertIsArray($response1['data']['payload']); + $this->assertArrayHasKey('$id', $response1['data']['payload']); + $this->assertArrayHasKey('name', $response1['data']['payload']); + $this->assertArrayHasKey('$permissions', $response1['data']['payload']); + $this->assertIsArray($response1['data']['payload']['$permissions']); + } + + // Receive and assert for client2 - should receive 4 individual document delete events + for ($i = 0; $i < 4; $i++) { + $response2 = json_decode($client2->receive(), true); + $this->assertArrayHasKey('type', $response2); + $this->assertArrayHasKey('data', $response2); + $this->assertEquals('event', $response2['type']); + $this->assertNotEmpty($response2['data']); + $this->assertArrayHasKey('timestamp', $response2['data']); + $this->assertCount(6, $response2['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response2['data']['payload']['$id']}.delete", $response2['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.delete", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response2['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.delete", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response2['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response2['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response2['data']['events']); + $this->assertContains("databases.*.collections.*", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response2['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.delete", $response2['data']['events']); + $this->assertContains("databases.*", $response2['data']['events']); + $this->assertNotEmpty($response2['data']['payload']); + $this->assertIsArray($response2['data']['payload']); + $this->assertArrayHasKey('$id', $response2['data']['payload']); + $this->assertArrayHasKey('name', $response2['data']['payload']); + $this->assertArrayHasKey('$permissions', $response2['data']['payload']); + $this->assertIsArray($response2['data']['payload']['$permissions']); + } + + $client1->close(); + $client2->close(); + } + public function testChannelDatabaseCollectionPermissions() { $user = $this->getUser(); From 7334efbf3a769ebe2e753e17339845bfb1cfa925 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 Aug 2025 11:52:58 +0530 Subject: [PATCH 341/362] feat: Initialize event and payload properties in Event class and optimize bulk document queue triggering --- src/Appwrite/Event/Event.php | 2 ++ .../Databases/Collections/Documents/Action.php | 16 +++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Appwrite/Event/Event.php b/src/Appwrite/Event/Event.php index 2c38811022..2557bf3f26 100644 --- a/src/Appwrite/Event/Event.php +++ b/src/Appwrite/Event/Event.php @@ -383,6 +383,8 @@ class Event { $this->params = []; $this->sensitive = []; + $this->event = ''; + $this->payload = []; return $this; } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index 6766097f81..8b33e64ba8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -295,17 +295,19 @@ abstract class Action extends UtopiaAction */ final protected function triggerQueuesForBulkDocuments(string $event, Document $database, Document $collection, array $documents, Event $queueForEvents, Event $queueForRealtime, Event $queueForFunctions, Event $queueForWebhooks) { + $queueForEvents + ->setEvent($event) + ->setParam('databaseId', $database->getId()) + ->setContext('database', $database) + ->setParam('collectionId', $collection->getId()) + ->setParam('tableId', $collection->getId()) + ->setContext($this->getCollectionsEventsContext(), $collection); + foreach ($documents as $document) { $queueForEvents - ->setEvent($event) - ->setParam('databaseId', $database->getId()) - ->setContext('database', $database) - ->setParam('collectionId', $collection->getId()) - ->setParam('tableId', $collection->getId()) ->setParam('documentId', $document->getId()) ->setParam('rowId', $document->getId()) - ->setPayload($document->getArrayCopy()) - ->setContext($this->getCollectionsEventsContext(), $collection); + ->setPayload($document->getArrayCopy()); $queueForRealtime ->from($queueForEvents) From a144d41020f3584aa237fd282cb5f4b9383f975a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 Aug 2025 11:53:17 +0530 Subject: [PATCH 342/362] feat: Enhance RealtimeCustomClientTest with permission updates and timeout assertions for clients --- .../Realtime/RealtimeCustomClientTest.php | 140 ++++++++++++++++-- 1 file changed, 128 insertions(+), 12 deletions(-) diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index f234209b88..bc842be74e 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -3,6 +3,7 @@ namespace Tests\E2E\Services\Realtime; use CURLFile; +use Exception; use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; @@ -12,6 +13,7 @@ use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use WebSocket\ConnectionException; +use WebSocket\TimeoutException; class RealtimeCustomClientTest extends Scope { @@ -996,7 +998,12 @@ class RealtimeCustomClientTest extends Scope 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'data' => [ - 'name' => 'Marvel Hero' + 'name' => 'Marvel Hero', + '$permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] ], ]); $this->assertEquals(200, $response['headers']['status-code']); @@ -1313,7 +1320,7 @@ class RealtimeCustomClientTest extends Scope ], [ '$id' => ID::unique(), - 'name' => 'User2-1', + 'name' => 'User2', '$permissions' => [ Permission::read(Role::user($user2Id)), ], @@ -1384,21 +1391,26 @@ class RealtimeCustomClientTest extends Scope } - // Perform bulk update + // Perform bulk update(making it only accessible by user1) $response = $this->client->call(Client::METHOD_PATCH, "/databases/{$databaseId}/collections/{$actorsId}/documents/", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], 'x-appwrite-key' => $this->getProject()['apiKey'] ]), [ 'data' => [ - 'name' => 'Marvel Hero' + 'name' => 'Marvel Hero', + '$permissions' => [ + Permission::read(Role::user($user1Id)), + Permission::update(Role::user($user1Id)), + Permission::delete(Role::user($user1Id)), + ] ], ]); $this->assertEquals(200, $response['headers']['status-code']); - // Receive and assert for client1 - should receive 3 individual document update events - for ($i = 0; $i < 3; $i++) { + // Receive and assert for client1 + for ($i = 0; $i < 5; $i++) { $response1 = json_decode($client1->receive(), true); $this->assertArrayHasKey('type', $response1); $this->assertArrayHasKey('data', $response1); @@ -1427,8 +1439,112 @@ class RealtimeCustomClientTest extends Scope $this->assertArrayHasKey('$permissions', $response1['data']['payload']); } - // Receive and assert for client2 - should receive 4 individual document update events - for ($i = 0; $i < 4; $i++) { + // client2 shouldn't receive any event and lead to timeout + try { + json_decode($client2->receive(), true); + $this->fail('Expected TimeoutException was not thrown.'); + } catch (Exception $e) { + $this->assertInstanceOf(TimeoutException::class, $e); + } + + // Perform bulk update(making it only accessible by user2) + $response = $this->client->call(Client::METHOD_PATCH, "/databases/{$databaseId}/collections/{$actorsId}/documents/", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'name' => 'Marvel Hero', + '$permissions' => [ + Permission::read(Role::user($user2Id)), + Permission::update(Role::user($user2Id)), + Permission::delete(Role::user($user2Id)), + ] + ], + ]); + + // Receive and assert for client2 + for ($i = 0; $i < 5; $i++) { + $response2 = json_decode($client2->receive(), true); + $this->assertArrayHasKey('type', $response2); + $this->assertArrayHasKey('data', $response2); + $this->assertEquals('event', $response2['type']); + $this->assertNotEmpty($response2['data']); + $this->assertArrayHasKey('timestamp', $response2['data']); + $this->assertCount(6, $response2['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response2['data']['payload']['$id']}.update", $response2['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.update", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response2['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.update", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response2['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response2['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response2['data']['events']); + $this->assertContains("databases.*.collections.*", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response2['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response2['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response2['data']['events']); + $this->assertContains("databases.*", $response2['data']['events']); + $this->assertNotEmpty($response2['data']['payload']); + $this->assertIsArray($response2['data']['payload']); + $this->assertArrayHasKey('$id', $response2['data']['payload']); + $this->assertEquals('Marvel Hero', $response2['data']['payload']['name']); + $this->assertArrayHasKey('$permissions', $response2['data']['payload']); + } + + // client1 shouldn't receive any event and lead to timeout + try { + json_decode($client1->receive(), true); + $this->fail('Expected TimeoutException was not thrown.'); + } catch (Exception $e) { + $this->assertInstanceOf(TimeoutException::class, $e); + } + + // Updating the permission for both the users + $response = $this->client->call(Client::METHOD_PATCH, "/databases/{$databaseId}/collections/{$actorsId}/documents/", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'data' => [ + 'name' => 'Marvel Hero', + '$permissions' => [ + Permission::read(Role::users()), + Permission::update(Role::users()), + Permission::delete(Role::users()), + ] + ], + ]); + // both user1 and user2 should receive the event + for ($i = 0; $i < 5; $i++) { + $response1 = json_decode($client1->receive(), true); + $this->assertArrayHasKey('type', $response1); + $this->assertArrayHasKey('data', $response1); + $this->assertEquals('event', $response1['type']); + $this->assertNotEmpty($response1['data']); + $this->assertArrayHasKey('timestamp', $response1['data']); + $this->assertCount(6, $response1['data']['channels']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.{$response1['data']['payload']['$id']}.update", $response1['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*.update", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response1['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*.update", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}.documents.*", $response1['data']['events']); + $this->assertContains("databases.*.collections.*.documents.*", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*", $response1['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}.documents.*", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.{$actorsId}", $response1['data']['events']); + $this->assertContains("databases.*.collections.*", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*", $response1['data']['events']); + $this->assertContains("databases.*.collections.{$actorsId}", $response1['data']['events']); + $this->assertContains("databases.{$databaseId}.collections.*.documents.*.update", $response1['data']['events']); + $this->assertContains("databases.*", $response1['data']['events']); + $this->assertNotEmpty($response1['data']['payload']); + $this->assertIsArray($response1['data']['payload']); + $this->assertArrayHasKey('$id', $response1['data']['payload']); + $this->assertEquals('Marvel Hero', $response1['data']['payload']['name']); + $this->assertArrayHasKey('$permissions', $response1['data']['payload']); + $response2 = json_decode($client2->receive(), true); $this->assertArrayHasKey('type', $response2); $this->assertArrayHasKey('data', $response2); @@ -1466,8 +1582,8 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); - // Receive and assert for client1 - should receive 3 individual document delete events - for ($i = 0; $i < 3; $i++) { + // Receive and assert for client1 + for ($i = 0; $i < 5; $i++) { $response1 = json_decode($client1->receive(), true); $this->assertArrayHasKey('type', $response1); $this->assertArrayHasKey('data', $response1); @@ -1497,8 +1613,8 @@ class RealtimeCustomClientTest extends Scope $this->assertIsArray($response1['data']['payload']['$permissions']); } - // Receive and assert for client2 - should receive 4 individual document delete events - for ($i = 0; $i < 4; $i++) { + // Receive and assert for client2 + for ($i = 0; $i < 5; $i++) { $response2 = json_decode($client2->receive(), true); $this->assertArrayHasKey('type', $response2); $this->assertArrayHasKey('data', $response2); From 5baa2ad113a5ef14f5cdee4b429de6cab72ec42f Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 Aug 2025 13:29:38 +0530 Subject: [PATCH 343/362] refactor: Rename triggerQueuesForBulkDocuments to triggerBulk for consistency across document actions --- .../Http/Databases/Collections/Documents/Action.php | 12 ++++++++++-- .../Databases/Collections/Documents/Bulk/Delete.php | 6 +++--- .../Databases/Collections/Documents/Bulk/Update.php | 6 +++--- .../Http/Databases/Collections/Documents/Create.php | 2 +- .../Databases/Http/Grids/Tables/Rows/Bulk/Delete.php | 2 +- .../Databases/Http/Grids/Tables/Rows/Bulk/Update.php | 2 +- tests/e2e/Scopes/Scope.php | 4 ++-- 7 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index 8b33e64ba8..7e9aafad75 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -293,8 +293,16 @@ abstract class Action extends UtopiaAction * @param Event $queueForWebhooks * @return void */ - final protected function triggerQueuesForBulkDocuments(string $event, Document $database, Document $collection, array $documents, Event $queueForEvents, Event $queueForRealtime, Event $queueForFunctions, Event $queueForWebhooks) - { + protected function triggerBulk( + string $event, + Document $database, + Document $collection, + array $documents, + Event $queueForEvents, + Event $queueForRealtime, + Event $queueForFunctions, + Event $queueForWebhooks + ): void { $queueForEvents ->setEvent($event) ->setParam('databaseId', $database->getId()) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php index 17c524b23c..f44e54f2b4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Delete.php @@ -73,15 +73,15 @@ class Delete extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->inject('plan') ->inject('queueForEvents') ->inject('queueForRealtime') ->inject('queueForFunctions') ->inject('queueForWebhooks') + ->inject('plan') ->callback($this->action(...)); } - public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, array $plan, Event $queueForEvents, Event $queueForRealtime, Event $queueForFunctions, Event $queueForWebhooks): void + public function action(string $databaseId, string $collectionId, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, Event $queueForEvents, Event $queueForRealtime, Event $queueForFunctions, Event $queueForWebhooks, array $plan): void { $database = $dbForProject->getDocument('databases', $databaseId); if ($database->isEmpty()) { @@ -140,7 +140,7 @@ class Delete extends Action $this->getSdkGroup() => $documents, ]), $this->getResponseModel()); - $this->triggerQueuesForBulkDocuments( + $this->triggerBulk( 'databases.[databaseId].collections.[collectionId].documents.[documentId].delete', $database, $collection, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index 908817f31d..82b39ef178 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -77,15 +77,15 @@ class Update extends Action ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->inject('plan') ->inject('queueForEvents') ->inject('queueForRealtime') ->inject('queueForFunctions') ->inject('queueForWebhooks') + ->inject('plan') ->callback($this->action(...)); } - public function action(string $databaseId, string $collectionId, string|array $data, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, array $plan, Event $queueForEvents, Event $queueForRealtime, Event $queueForFunctions, Event $queueForWebhooks): void + public function action(string $databaseId, string $collectionId, string|array $data, array $queries, UtopiaResponse $response, Database $dbForProject, StatsUsage $queueForStatsUsage, Event $queueForEvents, Event $queueForRealtime, Event $queueForFunctions, Event $queueForWebhooks, array $plan): void { $data = \is_string($data) ? \json_decode($data, true) @@ -164,7 +164,7 @@ class Update extends Action $this->getSdkGroup() => $documents ]), $this->getResponseModel()); - $this->triggerQueuesForBulkDocuments( + $this->triggerBulk( 'databases.[databaseId].collections.[collectionId].documents.[documentId].update', $database, $collection, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index d961f400eb..0691249943 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -419,7 +419,7 @@ class Create extends Action $this->getSdkGroup() => $documents ]), $this->getBulkResponseModel()); - $this->triggerQueuesForBulkDocuments( + $this->triggerBulk( 'databases.[databaseId].collections.[collectionId].documents.[documentId].create', $database, $collection, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php index aab4906d02..9a594245b3 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php @@ -59,11 +59,11 @@ class Delete extends DocumentsDelete ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->inject('plan') ->inject('queueForEvents') ->inject('queueForRealtime') ->inject('queueForFunctions') ->inject('queueForWebhooks') + ->inject('plan') ->callback($this->action(...)); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php index 2c373ffbc6..d33e8b0fb6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php @@ -61,11 +61,11 @@ class Update extends DocumentsUpdate ->inject('response') ->inject('dbForProject') ->inject('queueForStatsUsage') - ->inject('plan') ->inject('queueForEvents') ->inject('queueForRealtime') ->inject('queueForFunctions') ->inject('queueForWebhooks') + ->inject('plan') ->callback($this->action(...)); } } diff --git a/tests/e2e/Scopes/Scope.php b/tests/e2e/Scopes/Scope.php index a9451cc22b..c072fdca35 100644 --- a/tests/e2e/Scopes/Scope.php +++ b/tests/e2e/Scopes/Scope.php @@ -182,9 +182,9 @@ abstract class Scope extends TestCase /** * @return array */ - public function getUser(bool $override = false): array + public function getUser(bool $fresh = false): array { - if (!$override && isset(self::$user[$this->getProject()['$id']])) { + if (!$fresh && isset(self::$user[$this->getProject()['$id']])) { return self::$user[$this->getProject()['$id']]; } From 697ac3447bf9a7b5ca84bf65d996d6fac791705c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 Aug 2025 13:37:24 +0530 Subject: [PATCH 344/362] fix: Update getUser method call in RealtimeCustomClientTest for clarity --- tests/e2e/Services/Realtime/RealtimeCustomClientTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index bc842be74e..60f58bd8ee 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -1211,7 +1211,7 @@ class RealtimeCustomClientTest extends Scope $this->assertEquals('connected', $response['type']); $this->assertNotEmpty($response['data']); - $user2 = $this->getUser(override:true); + $user2 = $this->getUser(true); $user2Id = $user2['$id']; $session = $user2['session'] ?? ''; $projectId = $this->getProject()['$id']; From f06af411badfb757aa05cc8a18626519c65aa585 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 Aug 2025 16:48:05 +0530 Subject: [PATCH 345/362] Add 'type' attribute to database creation and update tests --- app/config/collections/projects.php | 9 ++++++ .../Databases/Http/Databases/Create.php | 4 ++- .../Utopia/Response/Model/Database.php | 6 ++++ .../Databases/Grids/DatabasesBase.php | 28 +++++++++++++++++++ .../Databases/Legacy/DatabasesBase.php | 28 +++++++++++++++++++ 5 files changed, 74 insertions(+), 1 deletion(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index ac14421382..3c840094ec 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -51,6 +51,15 @@ return [ 'default' => null, 'array' => false, ], + [ + '$id' => ID::custom('type'), + 'type' => Database::VAR_STRING, + 'size' => 128, + 'required' => true, + 'signed' => true, + 'array' => false, + 'filters' => [], + ], ], 'indexes' => [ [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index 9b52b482bb..487b1fb420 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -80,13 +80,14 @@ class Create extends Action ->param('databaseId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Database name. Max length: 128 chars.') ->param('enabled', true, new Boolean(), 'Is the database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) + ->param('type', 'mysql', new Text(128), 'Database type.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') ->callback($this->action(...)); } - public function action(string $databaseId, string $name, bool $enabled, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void + public function action(string $databaseId, string $name, bool $enabled, string $type, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents): void { $databaseId = $databaseId == 'unique()' ? ID::unique() : $databaseId; @@ -96,6 +97,7 @@ class Create extends Action 'name' => $name, 'enabled' => $enabled, 'search' => implode(' ', [$databaseId, $name]), + 'type' => $type ])); } catch (DuplicateException) { throw new Exception(Exception::DATABASE_ALREADY_EXISTS); diff --git a/src/Appwrite/Utopia/Response/Model/Database.php b/src/Appwrite/Utopia/Response/Model/Database.php index 90b4ac8cb4..61e435cd9f 100644 --- a/src/Appwrite/Utopia/Response/Model/Database.php +++ b/src/Appwrite/Utopia/Response/Model/Database.php @@ -40,6 +40,12 @@ class Database extends Model 'default' => true, 'example' => false, ]) + ->addRule('type', [ + 'type' => self::TYPE_STRING, + 'description' => 'Database type.', + 'default' => 'mysql', + 'example' => 'mysql', + ]) ; } diff --git a/tests/e2e/Services/Databases/Grids/DatabasesBase.php b/tests/e2e/Services/Databases/Grids/DatabasesBase.php index 77c5a958ac..a6a0e704fb 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesBase.php @@ -32,6 +32,34 @@ trait DatabasesBase $this->assertNotEmpty($database['body']['$id']); $this->assertEquals(201, $database['headers']['status-code']); $this->assertEquals('Test Database', $database['body']['name']); + $this->assertEquals('mysql', $database['body']['type']); + + // testing to create a database with type + $database2 = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database with type', + 'type' => 'mongodb' + ]); + + $this->assertNotEmpty($database2['body']['$id']); + $this->assertEquals(201, $database2['headers']['status-code']); + $this->assertEquals('Test Database with type', $database2['body']['name']); + $this->assertEquals('mongodb', $database2['body']['type']); + + // cleanup(for database2) + $databaseId = $database2['body']['$id']; + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $this->assertEquals(204, $response['headers']['status-code']); return ['databaseId' => $database['body']['$id']]; } diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 2e263f9699..838948d57e 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -32,6 +32,34 @@ trait DatabasesBase $this->assertNotEmpty($database['body']['$id']); $this->assertEquals(201, $database['headers']['status-code']); $this->assertEquals('Test Database', $database['body']['name']); + $this->assertEquals('mysql', $database['body']['type']); + + // testing to create a database with type + $database2 = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database with type', + 'type' => 'mongodb' + ]); + + $this->assertNotEmpty($database2['body']['$id']); + $this->assertEquals(201, $database2['headers']['status-code']); + $this->assertEquals('Test Database with type', $database2['body']['name']); + $this->assertEquals('mongodb', $database2['body']['type']); + + // cleanup(for database2) + $databaseId = $database2['body']['$id']; + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]); + + $this->assertEquals(204, $response['headers']['status-code']); return ['databaseId' => $database['body']['$id']]; } From 8c82119bd71a8568f3ac634b1e6bbe1918ca71f3 Mon Sep 17 00:00:00 2001 From: fogelito <fogelshmuel@gmail.com> Date: Tue, 5 Aug 2025 14:41:43 +0300 Subject: [PATCH 346/362] Update database 0.75.* --- composer.json | 2 +- composer.lock | 27 +++++++++------------------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 2d7b85f646..e08b3e04d4 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "utopia-php/cache": "0.13.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "dev-primary-attribute as 0.73.2", + "utopia-php/database": "0.75.*", "utopia-php/detector": "0.1.*", "utopia-php/domains": "0.8.*", "utopia-php/dsn": "0.2.1", diff --git a/composer.lock b/composer.lock index 95a1ddd6ec..01e2b5a8c9 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": "5f540db5a1e36b3345e4f56fc491da3a", + "content-hash": "8dd2ec8206f7c2dc31fef4de39569ae8", "packages": [ { "name": "adhocore/jwt", @@ -3497,16 +3497,16 @@ }, { "name": "utopia-php/database", - "version": "dev-primary-attribute", + "version": "0.75.2", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "ab1d5c826e8909f8f7406f0e36b345af86b29c44" + "reference": "669f38dc1686fbbbafbdadc266e0c3c112d8a70c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/ab1d5c826e8909f8f7406f0e36b345af86b29c44", - "reference": "ab1d5c826e8909f8f7406f0e36b345af86b29c44", + "url": "https://api.github.com/repos/utopia-php/database/zipball/669f38dc1686fbbbafbdadc266e0c3c112d8a70c", + "reference": "669f38dc1686fbbbafbdadc266e0c3c112d8a70c", "shasum": "" }, "require": { @@ -3547,9 +3547,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/primary-attribute" + "source": "https://github.com/utopia-php/database/tree/0.75.2" }, - "time": "2025-08-03T06:07:59+00:00" + "time": "2025-08-05T08:33:18+00:00" }, { "name": "utopia-php/detector", @@ -8261,18 +8261,9 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [ - { - "package": "utopia-php/database", - "version": "dev-primary-attribute", - "alias": "0.73.2", - "alias_normalized": "0.73.2.0" - } - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/database": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From ed05870239e6a3c75cd34cbf31ee433619ed4ac0 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 Aug 2025 18:05:46 +0530 Subject: [PATCH 347/362] updated migration release --- composer.json | 2 +- composer.lock | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/composer.json b/composer.json index 51d3b89ec7..31d41d16d8 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.13.*", + "utopia-php/migration": "0.14.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index 72200f7531..7de89e4e02 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": "c4ae112243a897e16552c507c5e94097", + "content-hash": "46c2cbde34a776114f761e7978c077e0", "packages": [ { "name": "adhocore/jwt", @@ -3997,16 +3997,16 @@ }, { "name": "utopia-php/migration", - "version": "0.13.7", + "version": "0.14.0", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "fc25d50c3a19e701e905c56a9465143cacb02717" + "reference": "f9a7e87413b82975dbd87b7850aec2543aeac7ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/fc25d50c3a19e701e905c56a9465143cacb02717", - "reference": "fc25d50c3a19e701e905c56a9465143cacb02717", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/f9a7e87413b82975dbd87b7850aec2543aeac7ee", + "reference": "f9a7e87413b82975dbd87b7850aec2543aeac7ee", "shasum": "" }, "require": { @@ -4047,9 +4047,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.13.7" + "source": "https://github.com/utopia-php/migration/tree/0.14.0" }, - "time": "2025-07-31T15:08:29+00:00" + "time": "2025-08-05T12:33:09+00:00" }, { "name": "utopia-php/orchestration", @@ -4814,16 +4814,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.27", + "version": "0.41.28", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "083fd2e8163d6a4e59ee971ac6cb97277d831dd5" + "reference": "8eace11070264c62c8da3c69498fb8dc98fcfaf7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/083fd2e8163d6a4e59ee971ac6cb97277d831dd5", - "reference": "083fd2e8163d6a4e59ee971ac6cb97277d831dd5", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/8eace11070264c62c8da3c69498fb8dc98fcfaf7", + "reference": "8eace11070264c62c8da3c69498fb8dc98fcfaf7", "shasum": "" }, "require": { @@ -4859,9 +4859,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.27" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.28" }, - "time": "2025-07-31T10:20:46+00:00" + "time": "2025-08-01T11:06:30+00:00" }, { "name": "doctrine/annotations", @@ -5280,16 +5280,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.13.3", + "version": "1.13.4", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "faed855a7b5f4d4637717c2b3863e277116beb36" + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/faed855a7b5f4d4637717c2b3863e277116beb36", - "reference": "faed855a7b5f4d4637717c2b3863e277116beb36", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", "shasum": "" }, "require": { @@ -5328,7 +5328,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.3" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" }, "funding": [ { @@ -5336,7 +5336,7 @@ "type": "tidelift" } ], - "time": "2025-07-05T12:25:42+00:00" + "time": "2025-08-01T08:46:24+00:00" }, { "name": "nikic/php-parser", From 28cf4e1d947c7394f29c561e7d5d782b5836af9f Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 Aug 2025 18:07:11 +0530 Subject: [PATCH 348/362] updated the validator of type of database to validator --- .../Modules/Databases/Http/Databases/Create.php | 3 ++- .../e2e/Services/Databases/Grids/DatabasesBase.php | 14 ++++++++++++-- .../Services/Databases/Legacy/DatabasesBase.php | 14 ++++++++++++-- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index 487b1fb420..e5256deb3b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -23,6 +23,7 @@ use Utopia\Platform\Action; use Utopia\Swoole\Response as SwooleResponse; use Utopia\Validator\Boolean; use Utopia\Validator\Text; +use Utopia\Validator\WhiteList; class Create extends Action { @@ -80,7 +81,7 @@ class Create extends Action ->param('databaseId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Database name. Max length: 128 chars.') ->param('enabled', true, new Boolean(), 'Is the database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) - ->param('type', 'mysql', new Text(128), 'Database type.', true) + ->param('type', 'sql', new WhiteList(['sql','nosql']), 'Database type.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') diff --git a/tests/e2e/Services/Databases/Grids/DatabasesBase.php b/tests/e2e/Services/Databases/Grids/DatabasesBase.php index a6a0e704fb..2e0f7bc6ea 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesBase.php @@ -32,7 +32,7 @@ trait DatabasesBase $this->assertNotEmpty($database['body']['$id']); $this->assertEquals(201, $database['headers']['status-code']); $this->assertEquals('Test Database', $database['body']['name']); - $this->assertEquals('mysql', $database['body']['type']); + $this->assertEquals('sql', $database['body']['type']); // testing to create a database with type $database2 = $this->client->call(Client::METHOD_POST, '/databases', [ @@ -44,11 +44,21 @@ trait DatabasesBase 'name' => 'Test Database with type', 'type' => 'mongodb' ]); + $this->assertEquals(400, $database2['headers']['status-code']); + $database2 = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database with type', + 'type' => 'nosql' + ]); $this->assertNotEmpty($database2['body']['$id']); $this->assertEquals(201, $database2['headers']['status-code']); $this->assertEquals('Test Database with type', $database2['body']['name']); - $this->assertEquals('mongodb', $database2['body']['type']); + $this->assertEquals('nosql', $database2['body']['type']); // cleanup(for database2) $databaseId = $database2['body']['$id']; diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 838948d57e..72e2d6140f 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -32,7 +32,7 @@ trait DatabasesBase $this->assertNotEmpty($database['body']['$id']); $this->assertEquals(201, $database['headers']['status-code']); $this->assertEquals('Test Database', $database['body']['name']); - $this->assertEquals('mysql', $database['body']['type']); + $this->assertEquals('sql', $database['body']['type']); // testing to create a database with type $database2 = $this->client->call(Client::METHOD_POST, '/databases', [ @@ -44,11 +44,21 @@ trait DatabasesBase 'name' => 'Test Database with type', 'type' => 'mongodb' ]); + $this->assertEquals(400, $database2['headers']['status-code']); + $database2 = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Test Database with type', + 'type' => 'nosql' + ]); $this->assertNotEmpty($database2['body']['$id']); $this->assertEquals(201, $database2['headers']['status-code']); $this->assertEquals('Test Database with type', $database2['body']['name']); - $this->assertEquals('mongodb', $database2['body']['type']); + $this->assertEquals('nosql', $database2['body']['type']); // cleanup(for database2) $databaseId = $database2['body']['$id']; From 272256438de40c46848ec486de37dc18b615bedd Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 Aug 2025 18:10:06 +0530 Subject: [PATCH 349/362] updaetd composer version --- composer.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.lock b/composer.lock index 8ca6a86ff5..db7e4abffa 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": "8dd2ec8206f7c2dc31fef4de39569ae8", + "content-hash": "dc0c77f38bf1b26bdce75c61d5b4eec8", "packages": [ { "name": "adhocore/jwt", @@ -8263,7 +8263,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { From 0fddbd5caaec5a572edc1467364178eb0776e7d2 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 Aug 2025 18:15:55 +0530 Subject: [PATCH 350/362] updated database response model rules --- src/Appwrite/Utopia/Response/Model/Database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Model/Database.php b/src/Appwrite/Utopia/Response/Model/Database.php index 61e435cd9f..a9ce20da74 100644 --- a/src/Appwrite/Utopia/Response/Model/Database.php +++ b/src/Appwrite/Utopia/Response/Model/Database.php @@ -43,8 +43,8 @@ class Database extends Model ->addRule('type', [ 'type' => self::TYPE_STRING, 'description' => 'Database type.', - 'default' => 'mysql', - 'example' => 'mysql', + 'default' => 'sql', + 'example' => 'sql', ]) ; } From 7d798f5373036c2ff8118ea0b6a0f45929057e5d Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 Aug 2025 19:34:19 +0530 Subject: [PATCH 351/362] added migration to self hosted version --- src/Appwrite/Migration/Migration.php | 1 + src/Appwrite/Migration/Version/V23.php | 61 ++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 src/Appwrite/Migration/Version/V23.php diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index d47490e604..2d82b9c486 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -89,6 +89,7 @@ abstract class Migration '1.7.2' => 'V22', '1.7.3' => 'V22', '1.7.4' => 'V22', + '1.8.0' => 'V23' ]; /** diff --git a/src/Appwrite/Migration/Version/V23.php b/src/Appwrite/Migration/Version/V23.php new file mode 100644 index 0000000000..d54b6ddc87 --- /dev/null +++ b/src/Appwrite/Migration/Version/V23.php @@ -0,0 +1,61 @@ +<?php + +namespace Appwrite\Migration\Version; + +use Appwrite\ID; +use Appwrite\Migration\Migration; +use Exception; +use Throwable; +use Utopia\CLI\Console; +use Utopia\Database\Database; +use Utopia\Database\Document; + +class V23 extends Migration +{ + /** + * @throws Throwable + */ + public function execute(): void + { + /** + * Disable SubQueries for Performance. + */ + foreach (['subQueryIndexes', 'subQueryPlatforms', 'subQueryDomains', 'subQueryKeys', 'subQueryDevKeys', 'subQueryWebhooks', 'subQuerySessions', 'subQueryTokens', 'subQueryMemberships', 'subQueryVariables', 'subQueryChallenges', 'subQueryProjectVariables', 'subQueryTargets', 'subQueryTopicTargets'] as $name) { + Database::addFilter( + $name, + fn () => null, + fn () => [] + ); + } + + Console::info('Migrating databases'); + $this->migrateDatabases(); + } + + /** + * Migrate Databases. + * + * @return void + * @throws Exception|Throwable + */ + private function migrateDatabases(): void + { + if ($this->project->getId() === 'console') { + return; + } + + // since required + default can't be used together + // so first creating the attribute then bulk updating the attribute + $this->dbForProject->createAttributes('databases', [new Document([ + '$id' => ID::custom('type'), + 'type' => Database::VAR_STRING, + 'size' => 128, + 'required' => true, + 'signed' => true, + 'array' => false, + 'filters' => [], + ])]); + $this->dbForProject->updateDocuments('databases', new Document(['$id' => 'type','type' => 'sql'])); + } + +} From 066c801a4556f2dc8d3b7cd3a66c695856ca1bc8 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Tue, 5 Aug 2025 21:56:31 +0530 Subject: [PATCH 352/362] removed $id to get updated --- src/Appwrite/Migration/Version/V23.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Migration/Version/V23.php b/src/Appwrite/Migration/Version/V23.php index d54b6ddc87..7d24756c14 100644 --- a/src/Appwrite/Migration/Version/V23.php +++ b/src/Appwrite/Migration/Version/V23.php @@ -55,7 +55,7 @@ class V23 extends Migration 'array' => false, 'filters' => [], ])]); - $this->dbForProject->updateDocuments('databases', new Document(['$id' => 'type','type' => 'sql'])); + $this->dbForProject->updateDocuments('databases', new Document(['type' => 'sql'])); } } From 320171822c07da00fa7baa557c6c06254881ffee Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 6 Aug 2025 10:56:42 +0530 Subject: [PATCH 353/362] replaced create attribute with a util createAttributeFromCollection method --- src/Appwrite/Migration/Version/V23.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Appwrite/Migration/Version/V23.php b/src/Appwrite/Migration/Version/V23.php index 7d24756c14..88f6d0451b 100644 --- a/src/Appwrite/Migration/Version/V23.php +++ b/src/Appwrite/Migration/Version/V23.php @@ -2,7 +2,6 @@ namespace Appwrite\Migration\Version; -use Appwrite\ID; use Appwrite\Migration\Migration; use Exception; use Throwable; @@ -46,15 +45,7 @@ class V23 extends Migration // since required + default can't be used together // so first creating the attribute then bulk updating the attribute - $this->dbForProject->createAttributes('databases', [new Document([ - '$id' => ID::custom('type'), - 'type' => Database::VAR_STRING, - 'size' => 128, - 'required' => true, - 'signed' => true, - 'array' => false, - 'filters' => [], - ])]); + $this->createAttributeFromCollection($this->dbForProject, 'databases', 'type'); $this->dbForProject->updateDocuments('databases', new Document(['type' => 'sql'])); } From 02438fda932cc011f0f0bf5fc9fe1174527d9cbc Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 6 Aug 2025 10:57:45 +0530 Subject: [PATCH 354/362] updated composer --- composer.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index 26fb8dee71..c8b4ad7ee8 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": "b6ec099ac43f7f5955b3f7d54ef21764", + "content-hash": "ced183858d8fde850249c5c34f6f1b73", "packages": [ { "name": "adhocore/jwt", From 162358deff298751f12f45c2ecf883ba0a1d749d Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Wed, 6 Aug 2025 17:36:28 +1200 Subject: [PATCH 355/362] Fix refs --- tests/e2e/Services/Migrations/MigrationsBase.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index bf5b489dcf..120767c287 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -1135,7 +1135,7 @@ trait MigrationsBase ] ); - $this->assertEventually(function () use ($migration, $databaseId, $collectionId) { + $this->assertEventually(function () use ($migration, $databaseId, $tableId) { $migrationId = $migration['body']['$id']; $migration = $this->client->call(Client::METHOD_GET, '/migrations/'.$migrationId, array_merge([ 'content-type' => 'application/json', @@ -1162,10 +1162,10 @@ trait MigrationsBase ] ]); - $this->assertEquals(200, $documents['headers']['status-code']); - $this->assertIsArray($documents['body']['documents']); - $this->assertIsNumeric($documents['body']['total']); - $this->assertEquals(100, $documents['body']['total']); + $this->assertEquals(200, $rows['headers']['status-code']); + $this->assertIsArray($rows['body']['documents']); + $this->assertIsNumeric($rows['body']['total']); + $this->assertEquals(100, $rows['body']['total']); // all data exists and includes internals, pass. $migration = $this->performCsvMigration( @@ -1173,11 +1173,11 @@ trait MigrationsBase 'endpoint' => 'http://localhost/v1', 'fileId' => $fileIds['documents-internals'], 'bucketId' => $bucketIds['documents-internals'], - 'resourceId' => $databaseId . ':' . $collectionId, + 'resourceId' => $databaseId . ':' . $tableId, ] ); - $this->assertEventually(function () use ($migration, $databaseId, $collectionId) { + $this->assertEventually(function () use ($migration, $databaseId, $tableId) { $migrationId = $migration['body']['$id']; $migration = $this->client->call(Client::METHOD_GET, '/migrations/'.$migrationId, array_merge([ 'content-type' => 'application/json', From abad8bce70b28652c2b0f8ec7e0868b90c595bc8 Mon Sep 17 00:00:00 2001 From: Jake Barnby <jakeb994@gmail.com> Date: Wed, 6 Aug 2025 18:05:00 +1200 Subject: [PATCH 356/362] Fix tests --- tests/e2e/Services/Migrations/MigrationsBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index 120767c287..1de1137861 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -1163,7 +1163,7 @@ trait MigrationsBase ]); $this->assertEquals(200, $rows['headers']['status-code']); - $this->assertIsArray($rows['body']['documents']); + $this->assertIsArray($rows['body']['rows']); $this->assertIsNumeric($rows['body']['total']); $this->assertEquals(100, $rows['body']['total']); From ee9f1f864505a17cb064a55c654567f8dc91ffbd Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Wed, 6 Aug 2025 17:30:11 +0530 Subject: [PATCH 357/362] updated database type to grids and legacy --- composer.lock | 24 +++++++++---------- src/Appwrite/Migration/Version/V23.php | 2 +- .../Databases/Http/Databases/Create.php | 2 +- .../Utopia/Response/Model/Database.php | 4 ++-- .../Databases/Grids/DatabasesBase.php | 6 ++--- .../Databases/Legacy/DatabasesBase.php | 6 ++--- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/composer.lock b/composer.lock index c8b4ad7ee8..0e535c7c0c 100644 --- a/composer.lock +++ b/composer.lock @@ -4042,16 +4042,16 @@ }, { "name": "utopia-php/migration", - "version": "0.14.0", + "version": "0.14.1", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "f9a7e87413b82975dbd87b7850aec2543aeac7ee" + "reference": "34bb7c487b00cefa35fddcff0621e704a23f4ebf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/f9a7e87413b82975dbd87b7850aec2543aeac7ee", - "reference": "f9a7e87413b82975dbd87b7850aec2543aeac7ee", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/34bb7c487b00cefa35fddcff0621e704a23f4ebf", + "reference": "34bb7c487b00cefa35fddcff0621e704a23f4ebf", "shasum": "" }, "require": { @@ -4092,9 +4092,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.14.0" + "source": "https://github.com/utopia-php/migration/tree/0.14.1" }, - "time": "2025-08-05T12:33:09+00:00" + "time": "2025-08-06T11:46:44+00:00" }, { "name": "utopia-php/orchestration", @@ -4859,16 +4859,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.28", + "version": "0.41.29", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "8eace11070264c62c8da3c69498fb8dc98fcfaf7" + "reference": "4af563f3b0879747efc8434eb8ed8bf97e75039f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/8eace11070264c62c8da3c69498fb8dc98fcfaf7", - "reference": "8eace11070264c62c8da3c69498fb8dc98fcfaf7", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/4af563f3b0879747efc8434eb8ed8bf97e75039f", + "reference": "4af563f3b0879747efc8434eb8ed8bf97e75039f", "shasum": "" }, "require": { @@ -4904,9 +4904,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.28" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.29" }, - "time": "2025-08-01T11:06:30+00:00" + "time": "2025-08-04T04:34:45+00:00" }, { "name": "doctrine/annotations", diff --git a/src/Appwrite/Migration/Version/V23.php b/src/Appwrite/Migration/Version/V23.php index 88f6d0451b..d5caf2ab3c 100644 --- a/src/Appwrite/Migration/Version/V23.php +++ b/src/Appwrite/Migration/Version/V23.php @@ -46,7 +46,7 @@ class V23 extends Migration // since required + default can't be used together // so first creating the attribute then bulk updating the attribute $this->createAttributeFromCollection($this->dbForProject, 'databases', 'type'); - $this->dbForProject->updateDocuments('databases', new Document(['type' => 'sql'])); + $this->dbForProject->updateDocuments('databases', new Document(['type' => 'legacy'])); } } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index e5256deb3b..b2f89f92f2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -81,7 +81,7 @@ class Create extends Action ->param('databaseId', '', new CustomId(), 'Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Database name. Max length: 128 chars.') ->param('enabled', true, new Boolean(), 'Is the database enabled? When set to \'disabled\', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.', true) - ->param('type', 'sql', new WhiteList(['sql','nosql']), 'Database type.', true) + ->param('type', 'grids', new WhiteList(['grids','legacy']), 'Database type.', true) ->inject('response') ->inject('dbForProject') ->inject('queueForEvents') diff --git a/src/Appwrite/Utopia/Response/Model/Database.php b/src/Appwrite/Utopia/Response/Model/Database.php index a9ce20da74..b38f828047 100644 --- a/src/Appwrite/Utopia/Response/Model/Database.php +++ b/src/Appwrite/Utopia/Response/Model/Database.php @@ -43,8 +43,8 @@ class Database extends Model ->addRule('type', [ 'type' => self::TYPE_STRING, 'description' => 'Database type.', - 'default' => 'sql', - 'example' => 'sql', + 'default' => 'grids', + 'example' => 'grids', ]) ; } diff --git a/tests/e2e/Services/Databases/Grids/DatabasesBase.php b/tests/e2e/Services/Databases/Grids/DatabasesBase.php index 2e0f7bc6ea..1ec957a50e 100644 --- a/tests/e2e/Services/Databases/Grids/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Grids/DatabasesBase.php @@ -32,7 +32,7 @@ trait DatabasesBase $this->assertNotEmpty($database['body']['$id']); $this->assertEquals(201, $database['headers']['status-code']); $this->assertEquals('Test Database', $database['body']['name']); - $this->assertEquals('sql', $database['body']['type']); + $this->assertEquals('grids', $database['body']['type']); // testing to create a database with type $database2 = $this->client->call(Client::METHOD_POST, '/databases', [ @@ -53,12 +53,12 @@ trait DatabasesBase ], [ 'databaseId' => ID::unique(), 'name' => 'Test Database with type', - 'type' => 'nosql' + 'type' => 'legacy' ]); $this->assertNotEmpty($database2['body']['$id']); $this->assertEquals(201, $database2['headers']['status-code']); $this->assertEquals('Test Database with type', $database2['body']['name']); - $this->assertEquals('nosql', $database2['body']['type']); + $this->assertEquals('legacy', $database2['body']['type']); // cleanup(for database2) $databaseId = $database2['body']['$id']; diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 449d3621c5..3fbb589fb0 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -32,7 +32,7 @@ trait DatabasesBase $this->assertNotEmpty($database['body']['$id']); $this->assertEquals(201, $database['headers']['status-code']); $this->assertEquals('Test Database', $database['body']['name']); - $this->assertEquals('sql', $database['body']['type']); + $this->assertEquals('grids', $database['body']['type']); // testing to create a database with type $database2 = $this->client->call(Client::METHOD_POST, '/databases', [ @@ -53,12 +53,12 @@ trait DatabasesBase ], [ 'databaseId' => ID::unique(), 'name' => 'Test Database with type', - 'type' => 'nosql' + 'type' => 'legacy' ]); $this->assertNotEmpty($database2['body']['$id']); $this->assertEquals(201, $database2['headers']['status-code']); $this->assertEquals('Test Database with type', $database2['body']['name']); - $this->assertEquals('nosql', $database2['body']['type']); + $this->assertEquals('legacy', $database2['body']['type']); // cleanup(for database2) $databaseId = $database2['body']['$id']; From 7572ca15113a312ece37f4baf63850fa60aa07b2 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k <arnabchatterjee.ac.2@gmail.com> Date: Thu, 7 Aug 2025 10:24:22 +0530 Subject: [PATCH 358/362] upgraded composer for utopia migration --- composer.lock | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/composer.lock b/composer.lock index 0e535c7c0c..7137e3d708 100644 --- a/composer.lock +++ b/composer.lock @@ -1228,16 +1228,16 @@ }, { "name": "open-telemetry/context", - "version": "1.2.1", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/context.git", - "reference": "1eb2b837ee9362db064a6b65d5ecce15a9f9f020" + "reference": "4d5d98f1d4311a55b8d07e3d4c06d2430b4e6efc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/1eb2b837ee9362db064a6b65d5ecce15a9f9f020", - "reference": "1eb2b837ee9362db064a6b65d5ecce15a9f9f020", + "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/4d5d98f1d4311a55b8d07e3d4c06d2430b4e6efc", + "reference": "4d5d98f1d4311a55b8d07e3d4c06d2430b4e6efc", "shasum": "" }, "require": { @@ -1283,7 +1283,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-05-07T23:36:50+00:00" + "time": "2025-08-04T03:25:06+00:00" }, { "name": "open-telemetry/exporter-otlp", @@ -1414,16 +1414,16 @@ }, { "name": "open-telemetry/sdk", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sdk.git", - "reference": "1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a" + "reference": "86287cf30fd6549444d7b8f7d8758d92e24086ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a", - "reference": "1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a", + "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/86287cf30fd6549444d7b8f7d8758d92e24086ac", + "reference": "86287cf30fd6549444d7b8f7d8758d92e24086ac", "shasum": "" }, "require": { @@ -1442,7 +1442,7 @@ "ramsey/uuid": "^3.0 || ^4.0", "symfony/polyfill-mbstring": "^1.23", "symfony/polyfill-php82": "^1.26", - "tbachert/spi": "^1.0.1" + "tbachert/spi": "^1.0.5" }, "suggest": { "ext-gmp": "To support unlimited number of synchronous metric readers", @@ -1456,6 +1456,9 @@ "OpenTelemetry\\API\\Instrumentation\\Configuration\\General\\ConfigEnv\\EnvComponentLoaderHttpConfig", "OpenTelemetry\\API\\Instrumentation\\Configuration\\General\\ConfigEnv\\EnvComponentLoaderPeerConfig" ], + "OpenTelemetry\\SDK\\Common\\Configuration\\Resolver\\ResolverInterface": [ + "OpenTelemetry\\SDK\\Common\\Configuration\\Resolver\\SdkConfigurationResolver" + ], "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\HookManagerInterface": [ "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\ExtensionHookManager" ] @@ -1504,20 +1507,20 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-06-19T23:36:51+00:00" + "time": "2025-08-06T03:07:06+00:00" }, { "name": "open-telemetry/sem-conv", - "version": "1.32.1", + "version": "1.36.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/sem-conv.git", - "reference": "94daa85ea61a8e2b7e1b0af6be0e875bedda7c22" + "reference": "60dd18fd21d45e6f4234ecab89c14021b6e3de9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/94daa85ea61a8e2b7e1b0af6be0e875bedda7c22", - "reference": "94daa85ea61a8e2b7e1b0af6be0e875bedda7c22", + "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/60dd18fd21d45e6f4234ecab89c14021b6e3de9a", + "reference": "60dd18fd21d45e6f4234ecab89c14021b6e3de9a", "shasum": "" }, "require": { @@ -1561,7 +1564,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-06-24T02:32:27+00:00" + "time": "2025-08-04T03:22:08+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -4042,16 +4045,16 @@ }, { "name": "utopia-php/migration", - "version": "0.14.1", + "version": "0.14.2", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "34bb7c487b00cefa35fddcff0621e704a23f4ebf" + "reference": "025b9953aca5c34dbb4afacacf9ef0e3159e42be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/34bb7c487b00cefa35fddcff0621e704a23f4ebf", - "reference": "34bb7c487b00cefa35fddcff0621e704a23f4ebf", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/025b9953aca5c34dbb4afacacf9ef0e3159e42be", + "reference": "025b9953aca5c34dbb4afacacf9ef0e3159e42be", "shasum": "" }, "require": { @@ -4092,9 +4095,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.14.1" + "source": "https://github.com/utopia-php/migration/tree/0.14.2" }, - "time": "2025-08-06T11:46:44+00:00" + "time": "2025-08-07T04:52:14+00:00" }, { "name": "utopia-php/orchestration", From ad79f3dcca84a13a828e89dea00fdc22653841e1 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 8 Aug 2025 13:34:33 +0530 Subject: [PATCH 359/362] fix: wrong resource path. --- .../Http/Databases/Collections/Documents/Logs/XList.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index f8ae29bd3e..f464eb6ae6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -106,8 +106,12 @@ class XList extends Action ]); $audit = new Audit($dbForProject); - // getContext() => `document` or `row`. - $resource = 'database/' . $databaseId . '/collection/' . $collectionId . '/' .$this->getContext(). '/' . $document->getId(); + + // returns what we want, ignore the naming! + $type = $this->getCollectionsEventsContext(); + $item = $this->getContext() === ROWS ? 'row' : 'document'; + + $resource = "database/$databaseId/$type/{$collectionId}/$item/{$document->getId()}"; $logs = $audit->getLogsByResource($resource, $queries); $output = []; From 65c767c2b0c60d6cbc151ff6e7c2da7575ecab47 Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 8 Aug 2025 16:03:00 +0530 Subject: [PATCH 360/362] update: `grid` on resource events. --- .../Databases/Collections/Documents/Logs/XList.php | 11 +++++++++-- .../Http/Databases/Collections/Logs/XList.php | 3 ++- .../Http/Grids/Tables/Columns/Boolean/Create.php | 2 +- .../Http/Grids/Tables/Columns/Boolean/Update.php | 2 +- .../Http/Grids/Tables/Columns/Datetime/Create.php | 2 +- .../Http/Grids/Tables/Columns/Datetime/Update.php | 2 +- .../Databases/Http/Grids/Tables/Columns/Delete.php | 2 +- .../Http/Grids/Tables/Columns/Email/Create.php | 2 +- .../Http/Grids/Tables/Columns/Email/Update.php | 2 +- .../Http/Grids/Tables/Columns/Enum/Create.php | 2 +- .../Http/Grids/Tables/Columns/Enum/Update.php | 2 +- .../Http/Grids/Tables/Columns/Float/Create.php | 2 +- .../Http/Grids/Tables/Columns/Float/Update.php | 2 +- .../Databases/Http/Grids/Tables/Columns/IP/Create.php | 2 +- .../Databases/Http/Grids/Tables/Columns/IP/Update.php | 2 +- .../Http/Grids/Tables/Columns/Integer/Create.php | 2 +- .../Http/Grids/Tables/Columns/Integer/Update.php | 2 +- .../Http/Grids/Tables/Columns/Relationship/Create.php | 2 +- .../Http/Grids/Tables/Columns/Relationship/Update.php | 2 +- .../Http/Grids/Tables/Columns/String/Create.php | 2 +- .../Http/Grids/Tables/Columns/String/Update.php | 2 +- .../Http/Grids/Tables/Columns/URL/Create.php | 2 +- .../Http/Grids/Tables/Columns/URL/Update.php | 2 +- .../Modules/Databases/Http/Grids/Tables/Create.php | 2 +- .../Modules/Databases/Http/Grids/Tables/Delete.php | 2 +- .../Databases/Http/Grids/Tables/Indexes/Create.php | 2 +- .../Databases/Http/Grids/Tables/Indexes/Delete.php | 2 +- .../Databases/Http/Grids/Tables/Rows/Bulk/Delete.php | 2 +- .../Databases/Http/Grids/Tables/Rows/Bulk/Update.php | 2 +- .../Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php | 2 +- .../Http/Grids/Tables/Rows/Column/Decrement.php | 2 +- .../Http/Grids/Tables/Rows/Column/Increment.php | 2 +- .../Databases/Http/Grids/Tables/Rows/Create.php | 2 +- .../Databases/Http/Grids/Tables/Rows/Delete.php | 2 +- .../Databases/Http/Grids/Tables/Rows/Update.php | 2 +- .../Databases/Http/Grids/Tables/Rows/Upsert.php | 2 +- .../Modules/Databases/Http/Grids/Tables/Update.php | 2 +- 37 files changed, 46 insertions(+), 38 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index f464eb6ae6..0e5a51df7b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -106,12 +106,19 @@ class XList extends Action ]); $audit = new Audit($dbForProject); + $isRows = $this->getContext() === ROWS; // returns what we want, ignore the naming! $type = $this->getCollectionsEventsContext(); - $item = $this->getContext() === ROWS ? 'row' : 'document'; + $item = $isRows ? 'row' : 'document'; + + if (!$isRows) { + $resource = "database/$databaseId/$type/$collectionId/$item/{$document->getId()}"; + } else { + // grid + $resource = "database/$databaseId/grid/$type/$collectionId/$item/{$document->getId()}"; + } - $resource = "database/$databaseId/$type/{$collectionId}/$item/{$document->getId()}"; $logs = $audit->getLogsByResource($resource, $queries); $output = []; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 0eca31e679..3a4de7e03c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -103,7 +103,8 @@ class XList extends Action ]); $audit = new Audit($dbForProject); - $resource = 'database/' . $databaseId . '/' . $this->getContext() . '/' . $collectionId; + $prefix = $this->getContext() === TABLES ? 'grid/' : ''; + $resource = "database/$databaseId/$prefix{$this->getContext()}/$collectionId"; $logs = $audit->getLogsByResource($resource, $queries); $output = []; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php index baa4eaa146..a28b52aef0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Create.php @@ -35,7 +35,7 @@ class Create extends BooleanCreate ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php index 2ea5314163..c2f40c96fb 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Boolean/Update.php @@ -37,7 +37,7 @@ class Update extends BooleanUpdate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php index 501cc044d4..f1214f707b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Create.php @@ -37,7 +37,7 @@ class Create extends DatetimeCreate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php index 34384e4d35..f2f5001242 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Datetime/Update.php @@ -39,7 +39,7 @@ class Update extends DatetimeUpdate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php index d0934b799f..9af55bee70 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Delete.php @@ -36,7 +36,7 @@ class Delete extends AttributesDelete ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.delete') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php index 841d18016f..3fd8d88fb5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Create.php @@ -36,7 +36,7 @@ class Create extends EmailCreate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php index f162a18494..180ce40b6d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Email/Update.php @@ -38,7 +38,7 @@ class Update extends EmailUpdate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php index 430d3f0220..c3ccffec1e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Create.php @@ -38,7 +38,7 @@ class Create extends EnumCreate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php index 6562742937..32f77a488a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Enum/Update.php @@ -40,7 +40,7 @@ class Update extends EnumUpdate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php index 4dd9c53950..42699ca45e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Create.php @@ -36,7 +36,7 @@ class Create extends FloatCreate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php index 3130e8ba2e..cd801450c7 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Float/Update.php @@ -38,7 +38,7 @@ class Update extends FloatUpdate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php index beae222ceb..541214897e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Create.php @@ -36,7 +36,7 @@ class Create extends IPCreate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php index c187c06801..c52105c812 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/IP/Update.php @@ -38,7 +38,7 @@ class Update extends IPUpdate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php index f97f4079ee..9873ad83b1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Create.php @@ -36,7 +36,7 @@ class Create extends IntegerCreate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php index ad4832ed10..e70f8bf7b0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Integer/Update.php @@ -38,7 +38,7 @@ class Update extends IntegerUpdate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php index c340d1c574..d6942a4d15 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Create.php @@ -37,7 +37,7 @@ class Create extends RelationshipCreate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php index 0811025ae3..729760bde0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/Relationship/Update.php @@ -37,7 +37,7 @@ class Update extends RelationshipUpdate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php index 4ae844fd84..5829ce5361 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Create.php @@ -38,7 +38,7 @@ class Create extends StringCreate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php index ed54ae9139..6333443686 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/String/Update.php @@ -40,7 +40,7 @@ class Update extends StringUpdate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php index 7ae3214cb9..429ef06dbd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Create.php @@ -36,7 +36,7 @@ class Create extends URLCreate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php index 17570a9842..de4b4ab79b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Columns/URL/Update.php @@ -38,7 +38,7 @@ class Update extends URLUpdate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php index 15aec531e7..f4274079bc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Create.php @@ -38,7 +38,7 @@ class Create extends CollectionCreate ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'table.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{response.$id}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: null, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php index cb2923f572..13c3a7196b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Delete.php @@ -34,7 +34,7 @@ class Delete extends CollectionDelete ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].delete') ->label('audits.event', 'table.delete') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: null, diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php index 3d9c8709a6..9bb3d6f123 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Create.php @@ -40,7 +40,7 @@ class Create extends IndexCreate ->label('scope', 'tables.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'index.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php index a2c23ea60b..679de9b77c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Indexes/Delete.php @@ -39,7 +39,7 @@ class Delete extends IndexDelete ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].update') ->label('audits.event', 'index.delete') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: $this->getSdkGroup(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php index 9a594245b3..6816fc3b13 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Delete.php @@ -35,7 +35,7 @@ class Delete extends DocumentsDelete ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.delete') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php index d33e8b0fb6..8c640f00f8 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Update.php @@ -36,7 +36,7 @@ class Update extends DocumentsUpdate ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php index b85ee87782..35f0a99bdc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Bulk/Upsert.php @@ -35,7 +35,7 @@ class Upsert extends DocumentsUpsert ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php index fd642de09e..272510335f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Decrement.php @@ -36,7 +36,7 @@ class Decrement extends DecrementDocumentAttribute ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.decrement') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php index b3af9bb1b9..2a28418a6e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Column/Increment.php @@ -36,7 +36,7 @@ class Increment extends IncrementDocumentAttribute ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.increment') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php index 6fadbe1412..d5a84bbb7c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Create.php @@ -44,7 +44,7 @@ class Create extends DocumentCreate ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php index b1f93164df..f821aabe6e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Delete.php @@ -40,7 +40,7 @@ class Delete extends DocumentDelete ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].delete') ->label('audits.event', 'row.delete') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{request.rowId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}/row/{request.rowId}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php index f9b1ce693e..7731e10e9d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Update.php @@ -37,7 +37,7 @@ class Update extends DocumentUpdate ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}/row/{response.$id}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php index 145217e03b..d9756eab87 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Rows/Upsert.php @@ -37,7 +37,7 @@ class Upsert extends DocumentUpsert ->label('scope', 'rows.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.upsert') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}/row/{response.$id}') ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php index bbc82aa52d..b4e8df6e57 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Grids/Tables/Update.php @@ -37,7 +37,7 @@ class Update extends CollectionUpdate ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].update') ->label('audits.event', 'table.update') - ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') + ->label('audits.resource', 'database/{request.databaseId}/grid/table/{request.tableId}') ->label('sdk', new Method( namespace: $this->getSdkNamespace(), group: null, From 0556f8fdca3a73eb9eb7040d019b8279ca85faad Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 8 Aug 2025 16:06:19 +0530 Subject: [PATCH 361/362] update: readability. --- .../Http/Databases/Collections/Logs/XList.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 3a4de7e03c..1341edd1a9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -103,8 +103,16 @@ class XList extends Action ]); $audit = new Audit($dbForProject); - $prefix = $this->getContext() === TABLES ? 'grid/' : ''; - $resource = "database/$databaseId/$prefix{$this->getContext()}/$collectionId"; + + $context = $this->getContext(); + $isTables = $context === TABLES; + + if (!$isTables) { + $resource = "database/$databaseId/$context/$collectionId"; + } else { + $resource = "database/$databaseId/grid/$context/$collectionId"; + } + $logs = $audit->getLogsByResource($resource, $queries); $output = []; From bc55639bf793e766d1993d007e3b2d0c01fe70bb Mon Sep 17 00:00:00 2001 From: Darshan <itznotabug@gmail.com> Date: Fri, 8 Aug 2025 16:25:48 +0530 Subject: [PATCH 362/362] update: if/else > switch > match --- .../Collections/Documents/Logs/XList.php | 16 +++++----------- .../Http/Databases/Collections/Logs/XList.php | 12 ++++-------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php index 0e5a51df7b..0f8a8688c6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Logs/XList.php @@ -106,18 +106,12 @@ class XList extends Action ]); $audit = new Audit($dbForProject); - $isRows = $this->getContext() === ROWS; - - // returns what we want, ignore the naming! $type = $this->getCollectionsEventsContext(); - $item = $isRows ? 'row' : 'document'; - - if (!$isRows) { - $resource = "database/$databaseId/$type/$collectionId/$item/{$document->getId()}"; - } else { - // grid - $resource = "database/$databaseId/grid/$type/$collectionId/$item/{$document->getId()}"; - } + $context = $this->getContext(); + $resource = match ($context) { + ROWS => "database/$databaseId/grid/$type/$collectionId/$context/{$document->getId()}", + default => "database/$databaseId/$type/$collectionId/$context/{$document->getId()}", + }; $logs = $audit->getLogsByResource($resource, $queries); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 1341edd1a9..359fed118a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -103,15 +103,11 @@ class XList extends Action ]); $audit = new Audit($dbForProject); - $context = $this->getContext(); - $isTables = $context === TABLES; - - if (!$isTables) { - $resource = "database/$databaseId/$context/$collectionId"; - } else { - $resource = "database/$databaseId/grid/$context/$collectionId"; - } + $resource = match ($context) { + TABLES => "database/$databaseId/grid/$context/$collectionId", + default => "database/$databaseId/$context/$collectionId", + }; $logs = $audit->getLogsByResource($resource, $queries);